[sblim-cmpi-syslog] Use latest upstream CVS (because of rsyslog support), Build against sblim-cmpi-devel and instead of

vcrhonek vcrhonek at fedoraproject.org
Thu Mar 15 14:25:07 UTC 2012


commit be7dda9eb17ce926b95a4b963ff376ae17dbc1b9
Author: Vitezslav Crhonek <Vitezslav.Crhonek at seznam.cz>
Date:   Thu Mar 15 15:24:59 2012 +0100

    Use latest upstream CVS (because of rsyslog support), Build against sblim-cmpi-devel and instead of tog-pegasus-devel, Fix rsyslog support to work with systemd

 .gitignore                            |    1 +
 sblim-cmpi-syslog-0.8.0-systemd.patch |   61 +++++++++++++++++++++++++++++++++
 sblim-cmpi-syslog.spec                |   25 +++++++++++---
 sources                               |    2 +-
 4 files changed, 83 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 281daf1..c5341fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 sblim-cmpi-syslog-0.7.11.tar.bz2
 /sblim-cmpi-syslog-0.8.0.tar.bz2
+/sblim-cmpi-syslog-0.8.0.tar.xz
diff --git a/sblim-cmpi-syslog-0.8.0-systemd.patch b/sblim-cmpi-syslog-0.8.0-systemd.patch
new file mode 100644
index 0000000..78df078
--- /dev/null
+++ b/sblim-cmpi-syslog-0.8.0-systemd.patch
@@ -0,0 +1,61 @@
+diff -up sblim-cmpi-syslog-0.8.0/syslog-service/util/syslog-service.sh.orig sblim-cmpi-syslog-0.8.0/syslog-service/util/syslog-service.sh
+--- sblim-cmpi-syslog-0.8.0/syslog-service/util/syslog-service.sh.orig	2011-06-09 00:17:24.000000000 +0200
++++ sblim-cmpi-syslog-0.8.0/syslog-service/util/syslog-service.sh	2012-03-15 15:12:00.026507029 +0100
+@@ -45,23 +45,23 @@ case "$1" in
+     echo "Unsupported method for RedHat!"
+     exit 0
+ esac
+-elif [ -x /etc/init.d/rsyslog ];
++elif [ -f /lib/systemd/system/rsyslog.service ];
+ then
+ case "$1" in
+  start)
+-   /etc/init.d/rsyslog start
++   systemctl start rsyslog.service
+    ;;
+  stop)
+-   /etc/init.d/rsyslog stop
++   systemctl stop rsyslog.service
+    ;;
+  restart|reload)
+-   /etc/init.d/rsyslog restart
++   systemctl restart rsyslog.service
+    ;;
+  condrestart)
+-   /etc/init.d/rsyslog condrestart
++   systemctl condrestart rsyslog.service
+    ;;
+  status)
+-   output=`/etc/init.d/rsyslog status`
++   output=`systemctl status rsyslog.service`
+    if echo "$output" | grep Active: | grep inactive > /dev/null 2>&1; then
+        echo "stopped"
+    else
+diff -up sblim-cmpi-syslog-0.8.0/syslog-service/util/syslogserviceutil.c.orig sblim-cmpi-syslog-0.8.0/syslog-service/util/syslogserviceutil.c
+--- sblim-cmpi-syslog-0.8.0/syslog-service/util/syslogserviceutil.c.orig	2011-06-09 00:17:24.000000000 +0200
++++ sblim-cmpi-syslog-0.8.0/syslog-service/util/syslogserviceutil.c	2012-03-15 15:12:00.030507125 +0100
+@@ -79,7 +79,7 @@ int Syslog_Service_Next_Enum(void *handl
+                      svname);
+         if (strcmp(svname, "syslogd")==0) svc->syslogd = pid;
+         if (strcmp(svname, "klogd")==0) svc->klogd = pid;
+-	if (strcmp(svname, "rsyslogd")==0) {
++	if (strcmp(svname, "rsyslog")==0) {
+ 	  /* rsyslog acts as both syslog and klogd */
+ 	  svc->syslogd = svc->klogd = pid;
+ 	}
+@@ -154,11 +154,15 @@ int Syslog_Service_Operation(const char
+      goto err;
+    if (!(fcmdout = fopen(cmdout,"r")))
+      goto err;
++/* there's no output from systemctl */
++/*
+    if (fgets(result,resultlen,fcmdout)) {
+      fclose(fcmdout);
+      return 0;
+    }
++*/
+    fclose(fcmdout);
++   return 0;
+  } 
+ 
+ err:
diff --git a/sblim-cmpi-syslog.spec b/sblim-cmpi-syslog.spec
index 039474b..bff9016 100644
--- a/sblim-cmpi-syslog.spec
+++ b/sblim-cmpi-syslog.spec
@@ -1,18 +1,26 @@
-%define provider_dir %{_libdir}/cmpi
+%global provider_dir %{_libdir}/cmpi
 
 Summary:        SBLIM syslog instrumentation
 Name:           sblim-cmpi-syslog
 Version:        0.8.0
-Release:        3%{?dist}
+Release:        4.20120315cvs%{?dist}
 License:        EPL
 Group:          Applications/System
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 URL:            http://sourceforge.net/projects/sblim/
-Source0:        http://downloads.sourceforge.net/project/sblim/%{name}/%{version}/%{name}-%{version}.tar.bz2
+# The source for this package was pulled from upstream's vcs.  Use the
+# following commands to generate the tarball:
+#  cvs -z3 -d:pserver:anonymous at sblim.cvs.sourceforge.net:/cvsroot/sblim co -P cmpi-syslog
+#  mv cmpi-syslog sblim-cmpi-syslog-0.8.0
+#  tar -cJvf sblim-cmpi-syslog-0.8.0.tar.xz sblim-cmpi-syslog-0.8.0
+Source0:        %{name}-%{version}.tar.xz
 
-BuildRequires:  tog-pegasus-devel >= %{tog_pegasus_version}
+Patch0:         sblim-cmpi-syslog-0.8.0-systemd.patch
+
+BuildRequires:  sblim-cmpi-devel
 BuildRequires:  sblim-cmpi-base-devel >= 1.5.4
 BuildRequires:  sed
+BuildRequires:  libtool
 Requires:       sblim-cmpi-base >= 1.5.4 cim-server
 Requires:       /etc/ld.so.conf.d
 Requires(post): /sbin/ldconfig
@@ -41,8 +49,10 @@ SBLIM Base Syslog Testcase Files for SBLIM Testsuite
 
 %prep
 %setup -q
+%patch0 -p1 -b .systemd
 # removing COPYING, because it's misleading
 rm -f COPYING
+./autoconfiscate.sh
 
 %build
 %ifarch s390 s390x ppc ppc64
@@ -52,7 +62,7 @@ export CFLAGS="$RPM_OPT_FLAGS"
 %endif
 %configure \
         TESTSUITEDIR=%{_datadir}/sblim-testsuite \
-        CIMSERVER=pegasus \
+        CIMSERVER=sfcb \
         PROVIDERDIR=%{provider_dir}
 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
@@ -128,6 +138,11 @@ fi
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Thu Mar 15 2012 Vitezslav Crhonek <vcrhonek at redhat.com> - 0.8.0-4.20120315cvs
+- Use latest upstream CVS (because of rsyslog support)
+- Build against sblim-cmpi-devel and instead of tog-pegasus-devel
+- Fix rsyslog support to work with systemd
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
diff --git a/sources b/sources
index fc01277..b882cc9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a8d0ffc23fcdcab2a823e774a4af4f82  sblim-cmpi-syslog-0.8.0.tar.bz2
+7f8dd3a1d75705021f95a565cddd4b68  sblim-cmpi-syslog-0.8.0.tar.xz


More information about the scm-commits mailing list