Hello community, here is the log from the commit of package openhpi for openSUSE:Factory checked in at 2014-10-25 08:32:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openhpi (Old) and /work/SRC/openSUSE:Factory/.openhpi.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openhpi" Changes: -------- --- /work/SRC/openSUSE:Factory/openhpi/openhpi.changes 2014-07-23 22:06:13.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.openhpi.new/openhpi.changes 2014-10-25 08:32:28.000000000 +0200 @@ -1,0 +2,21 @@ +Sun Oct 19 18:25:50 UTC 2014 - [email protected] + +- Update to version 3.5.0 + see http://www.openhpi.org/Changelogs/3.5.0 +- Remove included patches + + openhpi-3.4.0_missing_header.patch + + openhpi-3.4.0_undefined_behavior.patch +- Add systemd support for openSUSE > 11.4 + + Add openhpi-3.4.0-systemd.patch + + Pass --with-systemdsystemunitdir option in configure +- Remove redundant %clean section +- Remove --enable-snmp_client configure option; configure doesn't + unrecognized it +- Add --enable-ipmidirect configure option; build the new ipmidirect + plugin +- Remove unneeded dependencies; remove xorg-x11 and xorg-x11-devel + build requirements +- Add autoconf, automake and libtool dependencies +- Call autoreconf before configure; needed because of systemd patch + +------------------------------------------------------------------- Old: ---- openhpi-3.4.0.tar.gz openhpi-3.4.0_missing_header.patch openhpi-3.4.0_undefined_behavior.patch New: ---- openhpi-3.4.0-systemd.patch openhpi-3.5.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openhpi.spec ++++++ --- /var/tmp/diff_new_pack.swylQN/_old 2014-10-25 08:32:30.000000000 +0200 +++ /var/tmp/diff_new_pack.swylQN/_new 2014-10-25 08:32:30.000000000 +0200 @@ -15,12 +15,17 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +%if 0%{?suse_version} > 1140 +%define has_systemd 1 +%endif Name: openhpi -Version: 3.4.0 +Version: 3.5.0 Release: 0 # # +BuildRequires: autoconf +BuildRequires: automake BuildRequires: OpenIPMI-devel BuildRequires: docbook-toys BuildRequires: docbook-utils @@ -28,22 +33,23 @@ BuildRequires: gcc-c++ BuildRequires: gdbm-devel BuildRequires: glib2-devel +BuildRequires: libtool BuildRequires: libxml2-devel BuildRequires: ncurses-devel BuildRequires: net-snmp-devel BuildRequires: tcpd-devel -BuildRequires: xorg-x11 -BuildRequires: xorg-x11-devel +%if 0%{?has_systemd} +BuildRequires: systemd +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build # Url: http://sourceforge.net/projects/openhpi/ -# http://sourceforge.net/projects/openhpi/files/openhpi-stable/3.4.0/openhpi-3.4.0.tar.gz/download +# http://sourceforge.net/projects/openhpi/files/openhpi-stable/3.5.0/openhpi-3.5.0.tar.gz/download Source: openhpi-%{version}.tar.gz Source1: openhpi-rpmlintrc Source2: AUTHORS Patch: unlink-pidfile-on-error.patch -Patch1: openhpi-3.4.0_missing_header.patch -Patch2: openhpi-3.4.0_undefined_behavior.patch +Patch3: openhpi-3.4.0-systemd.patch # Summary: Implementation of SA Forum's Hardware Platform Interface (HPI) License: BSD-3-Clause @@ -108,7 +114,11 @@ Requires: openhpi = %{version} Summary: Implementation of SA Forum's Hardware Platform Interface (HPI) Group: System/Monitoring +%if 0%{?has_systemd} +%{?systemd_requires} +%else PreReq: %insserv_prereq %fillup_prereq +%endif %description daemon OpenHPI is an open source project created with the intent of providing @@ -131,19 +141,28 @@ %prep %setup -q %patch -p1 -%patch1 -%patch2 +%if 0%{?has_systemd} +%patch3 -p1 +%endif %build cp %{S:2} . -#autoreconf --install --force +autoreconf -fiv + +# fix permissions +chmod a-x plugins/simulator/*.[ch] +chmod a-x clients/*.[ch] + export CFLAGS="%{optflags} -fno-strict-aliasing -DGLIB_DISABLE_DEPRECATION_WARNINGS" export CXXFLAGS="${CFLAGS}" %configure \ --disable-static \ --enable-ipmi --disable-sysfs --enable-daemon \ - --enable-snmp_client --enable-simulator --enable-clients \ + --enable-ipmidirect--enable-simulator --enable-clients \ --enable-ilo2_ribcl --enable-oa_soap \ +%if 0%{?has_systemd} + --with-systemdsystemunitdir=%{_unitdir} \ +%endif --with-varpath=/var/lib/%{name} %{__make} %{__make} documentation @@ -160,25 +179,39 @@ %{__rm} -rv %{buildroot}%{_datadir}/doc/%{name}-%{version} %{__rm} -v %{buildroot}%{_libdir}/{,openhpi/}*.la -%clean -%{__rm} -rv %{buildroot} - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig +%if 0%{?has_systemd} +%pre daemon +%service_add_pre openhpid.service +%endif + %preun daemon +%if 0%{?has_systemd} +%service_del_preun openhpid.service +%else %stop_on_removal openhpid +%endif %post daemon /sbin/ldconfig +%if 0%{?has_systemd} +%service_add_post openhpid.service +%else %fillup_and_insserv -f openhpid +%endif echo "Check OPENHPI_UNCONFIGURED in /etc/openhpi/openhpi.conf !" %postun daemon /sbin/ldconfig +%if 0%{?has_systemd} +%service_del_postun openhpid.service +%else %insserv_cleanup %restart_on_update openhpid +%endif %files %defattr(-,root,root,0755) @@ -209,7 +242,11 @@ %files daemon %defattr(-,root,root) %doc README.daemon +%if 0%{?has_systemd} +%{_unitdir}/openhpid.service +%else /etc/init.d/openhpid +%endif %{_sbindir}/openhpid %{_mandir}/man8/openhpid.8* ++++++ openhpi-3.4.0-systemd.patch ++++++ >From d82555d0f32fc341d8f3e58a08f63894a3eb7ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <[email protected]> Date: Tue, 6 Mar 2012 11:23:01 +0100 Subject: [PATCH] add support for systemd New configure parameter is introduced (--with-systemdsystemunitdir) and when set it means that systemd service file will be installed instead of the classis initscript. --- configure.ac | 12 ++++++++++++ openhpid/Makefile.am | 7 +++++++ openhpid/openhpid.service.in | 11 +++++++++++ 3 files changed, 30 insertions(+) create mode 100644 openhpid/openhpid.service.in diff --git a/configure.ac b/configure.ac index e538fb4..80157af 100644 --- a/configure.ac +++ b/configure.ac @@ -709,6 +709,17 @@ AC_ARG_ENABLE([man], AC_SUBST(MAN,"") fi]) +dnl systemd system unit files location +AC_ARG_WITH([systemdsystemunitdir], + AS_HELP_STRING([--with-systemdsystemunitdir@<:@=DIR@:>@],[systemd system unit files location]), + [enable_systemd=yes], + [enable_systemd=no]) + +dnl enable systemd and set unit dir +AM_CONDITIONAL([ENABLE_SYSTEMD], [test "x$enable_systemd" = "xyes"]) +unitdir=$with_systemdsystemunitdir +AC_SUBST(unitdir) + AC_CONFIG_FILES([openhpi.spec openhpi.pc rt-env.sh @@ -751,6 +762,7 @@ AC_CONFIG_FILES([openhpi.spec docs/man/Makefile openhpid/Makefile openhpid/openhpid.sh + openhpid/openhpid.service openhpid/t/Makefile openhpid/t/ohpi/Makefile hpi_shell/Makefile diff --git a/openhpid/Makefile.am b/openhpid/Makefile.am index bccbce5..bfc6e73 100644 --- a/openhpid/Makefile.am +++ b/openhpid/Makefile.am @@ -28,6 +28,7 @@ DIST_SUBDIRS = t EXTRA_DIST = \ openhpid.sh.in \ + openhpid.service.in \ Makefile.mingw32 \ openhpid-win32.cpp \ version.rc @@ -83,11 +84,17 @@ endif install-data-local: +if ENABLE_SYSTEMD + $(mkinstalldirs) $(DESTDIR)$(unitdir) + $(INSTALL) -m 0644 openhpid.service $(DESTDIR)$(unitdir) +else $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/init.d $(INSTALL) -m 0755 openhpid.sh $(DESTDIR)$(sysconfdir)/init.d/openhpid +endif uninstall-local: rm -f $(DESTDIR)$(sysconfdir)/init.d/openhpid + rm -f $(DESTDIR)$(unitdir)/openhpid.service clean-local: rm -f *~ core core.* diff --git a/openhpid/openhpid.service.in b/openhpid/openhpid.service.in new file mode 100644 index 0000000..69b1348 --- /dev/null +++ b/openhpid/openhpid.service.in @@ -0,0 +1,11 @@ +[Unit] +Description=Daemon providing access to the SAF Hardware Platform Interface +After=syslog.target + +[Service] +Type=forking +PIDFile=/var/run/openhpid.pid +ExecStart=@sbindir@/openhpid -c @sysconfdir@/openhpi/openhpi.conf + +[Install] +WantedBy=multi-user.target ++++++ openhpi-3.4.0.tar.gz -> openhpi-3.5.0.tar.gz ++++++ /work/SRC/openSUSE:Factory/openhpi/openhpi-3.4.0.tar.gz /work/SRC/openSUSE:Factory/.openhpi.new/openhpi-3.5.0.tar.gz differ: char 5, line 1 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
