laine pushed to netcf (f20). "update to 0.2.8-1"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 8 23:24:07 UTC 2015


>From 7ca82a48f0feb367e1655f92c1615b71a525573b Mon Sep 17 00:00:00 2001
From: Laine Stump <laine at laine.org>
Date: Wed, 8 Apr 2015 19:23:49 -0400
Subject: update to 0.2.8-1


diff --git a/.gitignore b/.gitignore
index b4bbd56..cabb990 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ netcf-0.1.6.tar.gz
 /netcf-0.2.1.tar.gz
 /netcf-0.2.2.tar.gz
 /netcf-0.2.3.tar.gz
+/netcf-0.2.8.tar.gz
diff --git a/netcf.spec b/netcf.spec
index 606f9d8..3ad5f90 100644
--- a/netcf.spec
+++ b/netcf.spec
@@ -1,17 +1,56 @@
 Name:           netcf
-Version:        0.2.3
-Release:        6%{?dist}%{?extra_release}
+Version:        0.2.8
+Release:        1%{?dist}%{?extra_release}
 Summary:        Cross-platform network configuration library
 
 Group:          System Environment/Libraries
 License:        LGPLv2+
 URL:            https://fedorahosted.org/netcf/
 Source0:        https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
-
-# Fix reading bridge stp value (bz #1031053)
-Patch0001: 0001-transform-STP-value-from-yes-no-to-on-off-in-redhat-.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+# Patches
+# One patch per line, in this format:
+# Patch001: file1.patch
+# Patch002: file2.patch
+# ...
+#
+# The patches will automatically be put into the build source tree
+# during the %prep stage (using git, which is now required for an rpm
+# build)
+#
+
+# Default to skipping autoreconf.  Distros can change just this one
+# line (or provide a command-line override) if they backport any
+# patches that touch configure.ac or Makefile.am.
+%{!?enable_autotools:%define enable_autotools 0}
+
+# git is used to build a source tree with patches applied (see the
+# %prep section)
+BuildRequires: git
+
+# Fedora 20 / RHEL-7 are where netcf first uses systemd. Although earlier
+# Fedora has systemd, netcf still used sysvinit there.
+%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
+    %define with_systemd 1
+%else
+    %define with_systemd 0
+%endif
+
+%if %{with_systemd}
+BuildRequires: systemd
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+%endif
+%if 0%{?enable_autotools}
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: gettext-devel
+BuildRequires: libtool
+BuildRequires: /usr/bin/pod2man
+%endif
+
 BuildRequires:  readline-devel augeas-devel >= 0.5.2
 BuildRequires:  libxml2-devel libxslt-devel
 
@@ -53,56 +92,150 @@ developing applications that use %{name}.
 Summary:        Libraries for %{name}
 Group:          System Environment/Libraries
 
+# bridge-utils is needed because /sbin/ifup calls brctl
+# if you create a bridge device
+Requires:       bridge-utils
+
 %description    libs
 The libraries for %{name}.
 
 %prep
 %setup -q
 
-# Fix reading bridge stp value (bz #1031053)
-%patch0001 -p1
+# Patches have to be stored in a temporary file because RPM has
+# a limit on the length of the result of any macro expansion;
+# if the string is longer, it's silently cropped
+%{lua:
+    tmp = os.tmpname();
+    f = io.open(tmp, "w+");
+    count = 0;
+    for i, p in ipairs(patches) do
+        f:write(p.."\n");
+        count = count + 1;
+    end;
+    f:close();
+    print("PATCHCOUNT="..count.."\n")
+    print("PATCHLIST="..tmp.."\n")
+}
+
+git init -q
+git config user.name rpm-build
+git config user.email rpm-build
+git config gc.auto 0
+git add .
+git commit -q -a --author 'rpm-build <rpm-build>' \
+           -m '%{name}-%{version} base'
+
+COUNT=$(grep '\.patch$' $PATCHLIST | wc -l)
+if [ $COUNT -ne $PATCHCOUNT ]; then
+    echo "Found $COUNT patches in $PATCHLIST, expected $PATCHCOUNT"
+    exit 1
+fi
+if [ $COUNT -gt 0 ]; then
+    xargs git am <$PATCHLIST || exit 1
+fi
+echo "Applied $COUNT patches"
+rm -f $PATCHLIST
+
 
 %build
 %if %{with_libnl1}
 %define _with_libnl1 --with-libnl1
 %endif
+%if %{with_systemd}
+    %define sysinit --with-sysinit=systemd
+%else
+    %define sysinit --with-sysinit=initscripts
+%endif
+
+
+%if 0%{?enable_autotools}
+ autoreconf -if
+%endif
 
 %configure --disable-static \
-           %{?_with_libnl1}
+           %{?_with_libnl1} \
+           %{sysinit}
 make %{?_smp_mflags}
 
 %install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p"
-find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+make install DESTDIR=$RPM_BUILD_ROOT SYSTEMD_UNIT_DIR=%{_unitdir} \
+     INSTALL="%{__install} -p"
+find $RPM_BUILD_ROOT -name '*.la' -delete
+
+%preun libs
+
+%if %{with_systemd}
+    %systemd_preun netcf-transaction.service
+%else
+if [ $1 = 0 ]; then
+    /sbin/chkconfig --del netcf-transaction
+fi
+%endif
+
+%post libs
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+/sbin/ldconfig
+%if %{with_systemd}
+    %systemd_post netcf-transaction.service
+    /bin/systemctl --no-reload enable netcf-transaction.service >/dev/null 2>&1 || :
+%else
+/sbin/chkconfig --add netcf-transaction
+%endif
 
-%post libs -p /sbin/ldconfig
+%postun libs
 
-%postun libs -p /sbin/ldconfig
+/sbin/ldconfig
+%if %{with_systemd}
+    %systemd_postun netcf-transaction.service
+%endif
 
 %files
-%defattr(-,root,root,-)
 %{_bindir}/ncftool
 %{_mandir}/man1/ncftool.1*
 
 %files libs
-%defattr(-,root,root,-)
 %{_datadir}/netcf
 %{_libdir}/*.so.*
+%if %{with_systemd}
+%{_unitdir}/netcf-transaction.service
+%else
 %{_sysconfdir}/rc.d/init.d/netcf-transaction
+%endif
+%attr(0755, root, root) %{_libexecdir}/netcf-transaction.sh
 %doc AUTHORS COPYING NEWS
 
 %files devel
-%defattr(-,root,root,-)
 %doc
 %{_includedir}/*
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/netcf.pc
 
 %changelog
+* Wed Apr 08 2015 Laine Stump <laine at redhat.com> - 0.2.8-1
+ - rebase to netcf-0.2.8
+ - resolve CVE-2014-8119
+ - Fix build on systems with newer libnl3 that doesn't
+   #include <linux/if.h>
+ - support multiple IPv4 addresses in interface config (redhat driver)
+ - allow static IPv4 config simultaneous with DHCPv4 (redhat driver)
+ - recognize IPADDR0/NETMASK0/PREFIX0
+ - remove extra quotes from IPV6ADDR_SECONDARIES (redhat+suse drivers)
+ - miscellaneous systemd service fixes
+ - use git to apply patches in rpm specfile
+ - allow interleaved elements in interface XML schema
+ - allow <link> element in vlan and bond interfaces
+ - report link state/speed in interface status
+ - change DHCPv6 to DHCPV6C in ifcfg files
+ - max vlan id is 4095, not 4096
+ - wait for IFF_UP and IFF_RUNNING after calling ifup
+ - don't require IFF_RUNNING for bridge devices
+ - avoid memory leak in debian when listing interfaces
+ - avoid use of uninitialized data when getting mac address
+   (fixes https://bugzilla.redhat.com/show_bug.cgi?id=1046594 )
+ - limit interface names to IFNAMSIZ-1 characters in length
+ - support systemd for netcf-transaction
+
 * Sat May 03 2014 Cole Robinson <crobinso at redhat.com> - 0.2.3-6
 - Fix reading bridge stp value (bz #1031053)
 
diff --git a/sources b/sources
index 4dc5d99..ae6ebd7 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-bee292470b06201b59af0fad473a1b65  netcf-0.2.3.tar.gz
+8edfc9a5856468ae4f8ee97415a3dbf3  netcf-0.2.8.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/netcf.git/commit/?h=f20&id=7ca82a48f0feb367e1655f92c1615b71a525573b


More information about the scm-commits mailing list