From 1e525c96b6dee0371206ab0c85ed69361bb22d4d Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 24 May 2014 08:11:52 +0200 Subject: [PATCH] - updated to 0.2.4 - updated pld_interfaces patch - added systemd patch (install both initscripts and systemd support files) --- netcf-pld_interfaces.patch | 4 +- netcf-systemd.patch | 108 +++++++++++++++++++++++++++++++++++++ netcf.spec | 17 ++++-- 3 files changed, 122 insertions(+), 7 deletions(-) create mode 100644 netcf-systemd.patch diff --git a/netcf-pld_interfaces.patch b/netcf-pld_interfaces.patch index e9cd190..04bd4a0 100644 --- a/netcf-pld_interfaces.patch +++ b/netcf-pld_interfaces.patch @@ -17,8 +17,8 @@ { "/augeas/load/Ifcfg/excl[1]", "*~" }, { "/augeas/load/Ifcfg/excl[2]", "*.bak" }, { "/augeas/load/Ifcfg/excl[3]", "*.orig" }, ---- netcf-0.1.9/src/netcf-transaction.init.sh.orig 2011-05-20 20:40:22.000000000 +0200 -+++ netcf-0.1.9/src/netcf-transaction.init.sh 2011-08-13 09:14:09.519761783 +0200 +--- netcf-0.2.4/src/netcf-transaction.sh.in.orig 2011-05-20 20:40:22.000000000 +0200 ++++ netcf-0.2.4/src/netcf-transaction.sh.in 2011-08-13 09:14:09.519761783 +0200 @@ -30,13 +30,12 @@ sysconfdir="@sysconfdir@" localstatedir="@localstatedir@" diff --git a/netcf-systemd.patch b/netcf-systemd.patch new file mode 100644 index 0000000..a7206f2 --- /dev/null +++ b/netcf-systemd.patch @@ -0,0 +1,108 @@ +--- netcf-0.2.4/configure.ac.orig 2014-05-14 12:01:08.000000000 +0200 ++++ netcf-0.2.4/configure.ac 2014-05-24 07:27:55.530147003 +0200 +@@ -104,7 +104,7 @@ + AC_MSG_CHECKING([for system init flavor]) + AC_ARG_WITH([sysinit], + [AS_HELP_STRING([--with-sysinit@<:@=STYLE@:>@], +- [Style of init script to install: initscripts, systemd, ++ [Style of init script to install: initscripts, systemd, both, + check, none @<:@default=check@:>@])], + [],[with_sysinit=check]) + +@@ -113,6 +113,8 @@ + ;; + initscripts) + ;; ++ both) ++ ;; + none) + ;; + check) +@@ -135,8 +137,8 @@ + with_sysinit=none + fi + +-AM_CONDITIONAL([NETCF_USE_INITSCRIPTS], test "$with_sysinit" = "initscripts") +-AM_CONDITIONAL([NETCF_USE_SYSTEMD], test "$with_sysinit" = "systemd") ++AM_CONDITIONAL([NETCF_USE_INITSCRIPTS], test "$with_sysinit" = "initscripts" -o "$with_sysinit" = "both") ++AM_CONDITIONAL([NETCF_USE_SYSTEMD], test "$with_sysinit" = "systemd" -o "$with_sysinit" = "both") + AM_CONDITIONAL([NETCF_TRANSACTION_SUPPORT], test "$with_sysinit" != "none") + AC_MSG_RESULT($with_sysinit) + if test "$with_sysinit" != "none" && test "$with_driver" != "redhat"; then +--- netcf-0.2.4/src/Makefile.am.orig 2014-05-09 13:37:17.000000000 +0200 ++++ netcf-0.2.4/src/Makefile.am 2014-05-24 07:51:17.630117778 +0200 +@@ -119,10 +119,6 @@ + + if NETCF_DRIVER_REDHAT + +-install-data-local: install-sysinit +- +-uninstall-local: uninstall-sysinit +- + # This is for the shell script that handles network config change + # transactions. It is used by both the initscripts and systemd + # flavors, as well as by libnetcf.so itself +@@ -136,13 +132,19 @@ + + BUILT_SOURCES += netcf-transaction.sh + ++INSTALL_TARGETS = ++UNINSTALL_TARGETS = ++ + if NETCF_USE_INITSCRIPTS +-install-sysinit: netcf-transaction.init ++INSTALL_TARGETS += install-sysinit-init ++UNINSTALL_TARGETS += uninstall-sysinit-init ++ ++install-sysinit-init: netcf-transaction.init + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d + $(INSTALL_SCRIPT) netcf-transaction.init \ + $(DESTDIR)$(sysconfdir)/rc.d/init.d/netcf-transaction + +-uninstall-sysinit: ++uninstall-sysinit-init: + rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/netcf-transaction \ + $(DESTDIR)$(sysconfdir)/sysconfig/netcf-transaction + +@@ -157,17 +159,20 @@ + + BUILT_SOURCES += netcf-transaction.init + +-else ! NETCF_USE_INITSCRIPTS ++endif NETCF_USE_INITSCRIPTS + + if NETCF_USE_SYSTEMD ++INSTALL_TARGETS += install-sysinit-systemd ++UNINSTALL_TARGETS += uninstall-sysinit-systemd ++ + SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system + +-install-sysinit: netcf-transaction.service ++install-sysinit-systemd: netcf-transaction.service + $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) + $(INSTALL_DATA) netcf-transaction.service \ + $(DESTDIR)$(SYSTEMD_UNIT_DIR)/netcf-transaction.service + +-uninstall-sysinit: ++uninstall-sysinit-systemd: + rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/netcf-transaction.service + rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||: + +@@ -180,11 +185,12 @@ + + BUILT_SOURCES += netcf-transaction.service + +-else ! NETCF_USE_SYSTEMD +-install-sysinit: +-uninstall-sysinit: +-endif ! NETCF_USE_SYSTEMD +-endif ! NETCF_USE_INITSCRIPTS ++endif NETCF_USE_SYSTEMD ++ ++install-data-local: $(INSTALL_TARGETS) ++ ++uninstall-local: $(UNINSTALL_TARGETS) ++ + endif NETCF_DRIVER_REDHAT + + DISTCLEANFILES += $(BUILT_SOURCES) diff --git a/netcf.spec b/netcf.spec index 0d34c3c..510b448 100644 --- a/netcf.spec +++ b/netcf.spec @@ -3,13 +3,14 @@ Summary: netcf - a cross-platform network configuration library Summary(pl.UTF-8): netcf - wieloplatformowa biblioteka do konfiguracji sieci Name: netcf -Version: 0.2.3 -Release: 3 +Version: 0.2.4 +Release: 1 License: GPL v2 Group: Administration/System Source0: https://fedorahosted.org/released/netcf/%{name}-%{version}.tar.gz -# Source0-md5: bee292470b06201b59af0fad473a1b65 +# Source0-md5: 91d3a8e26544406ad4b3a1ee376ef6d8 Patch0: %{name}-pld_interfaces.patch +Patch1: %{name}-systemd.patch URL: https://fedorahosted.org/netcf/ BuildRequires: autoconf >= 2.50 BuildRequires: automake >= 1:1.11 @@ -71,6 +72,7 @@ Ten pakiet zawiera statyczną bibliotekę netcf. %prep %setup -q %patch0 -p1 +%patch1 -p1 -b .orig %build %{__libtoolize} @@ -80,14 +82,16 @@ Ten pakiet zawiera statyczną bibliotekę netcf. %{__automake} %configure \ --disable-silent-rules \ - --with-driver=redhat + --with-driver=redhat \ + --with-sysinit=both %{__make} %install rm -rf $RPM_BUILD_ROOT %{__make} install \ - DESTDIR=$RPM_BUILD_ROOT + DESTDIR=$RPM_BUILD_ROOT \ + SYSTEMD_UNIT_DIR=%{systemdunitdir} %clean rm -rf $RPM_BUILD_ROOT @@ -99,11 +103,14 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/ncftool %attr(754,root,root) /etc/rc.d/init.d/netcf-transaction +%attr(754,root,root) %{_libexecdir}/netcf-transaction.sh +%{systemdunitdir}/netcf-transaction.service %{_datadir}/netcf %{_mandir}/man1/ncftool.1* %files libs %defattr(644,root,root,755) +%doc AUTHORS NEWS README %attr(755,root,root) %{_libdir}/libnetcf.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libnetcf.so.1 -- 2.44.0