diff --git a/SOURCES/rpcbind-0.2.0-rpcinfo-mantypo.patch b/SOURCES/rpcbind-0.2.0-rpcinfo-mantypo.patch new file mode 100644 index 0000000..2f85edf --- /dev/null +++ b/SOURCES/rpcbind-0.2.0-rpcinfo-mantypo.patch @@ -0,0 +1,22 @@ +commit 6e67b1e5e3a36649ad05829f8bae9d2a9e703594 +Author: Steve Dickson +Date: Mon Sep 22 08:49:08 2014 -0400 + + rpcinfo: Fixed typo in rpcinfo man page + + Signed-off-by: Steve Dickson + +diff --git a/man/rpcinfo.8 b/man/rpcinfo.8 +index 5ece18f..750ffce 100644 +--- a/man/rpcinfo.8 ++++ b/man/rpcinfo.8 +@@ -20,8 +20,7 @@ + .Nm "rpcinfo" + .Fl l + .Op Fl T Ar transport +-.Ar host Ar prognum +-.Op Ar versnum ++.Ar host Ar prognum Ar versnum + .Nm "rpcinfo" + .Op Fl n Ar portnum + .Fl u diff --git a/SOURCES/rpcbind-0.2.0-warnings.patch b/SOURCES/rpcbind-0.2.0-warnings.patch new file mode 100644 index 0000000..f586406 --- /dev/null +++ b/SOURCES/rpcbind-0.2.0-warnings.patch @@ -0,0 +1,39 @@ +commit d62f79d7905149719715f74c188b47d7911c928c +Author: Steve Dickson +Date: Mon Aug 18 11:44:19 2014 -0400 + + rpcbind: Remove a strict-aliasing warning + + src/util.c: In function ?in6_fillscopeid?: + src/util.c:106:3: warning: dereferencing type-punned pointer will break + strict-aliasing rules [-Wstrict-aliasing] + ifindex = ntohs(*(u_int16_t *)&sin6->sin6_addr.s6_addr[2]); + ^ + + src/util.c:109:4: warning: dereferencing type-punned pointer will break + strict-aliasing rules [-Wstrict-aliasing] + *(u_int16_t *)&sin6->sin6_addr.s6_addr[2] = 0; + + Signed-off-by: Steve Dickson + +diff --git a/src/util.c b/src/util.c +index 9a5fb69..7d56479 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -101,12 +101,14 @@ static void + in6_fillscopeid(struct sockaddr_in6 *sin6) + { + u_int16_t ifindex; ++ u_int16_t *addr; + + if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { +- ifindex = ntohs(*(u_int16_t *)&sin6->sin6_addr.s6_addr[2]); ++ addr = (u_int16_t *)&sin6->sin6_addr.s6_addr[2]; ++ ifindex = ntohs(*addr); + if (sin6->sin6_scope_id == 0 && ifindex != 0) { + sin6->sin6_scope_id = ifindex; +- *(u_int16_t *)&sin6->sin6_addr.s6_addr[2] = 0; ++ *addr = 0; + } + } + } diff --git a/SOURCES/rpcbind.service b/SOURCES/rpcbind.service index e825b87..265c677 100644 --- a/SOURCES/rpcbind.service +++ b/SOURCES/rpcbind.service @@ -1,7 +1,6 @@ [Unit] Description=RPC bind service Requires=rpcbind.socket -After=syslog.target network.target [Service] Type=forking @@ -9,5 +8,4 @@ EnvironmentFile=/etc/sysconfig/rpcbind ExecStart=/sbin/rpcbind -w ${RPCBIND_ARGS} [Install] -WantedBy=multi-user.target Also=rpcbind.socket diff --git a/SPECS/rpcbind.spec b/SPECS/rpcbind.spec index f914886..ac27d06 100644 --- a/SPECS/rpcbind.spec +++ b/SPECS/rpcbind.spec @@ -1,6 +1,6 @@ Name: rpcbind Version: 0.2.0 -Release: 23%{?dist} +Release: 26%{?dist} Summary: Universal Addresses to RPC Program Number Mapper Group: System Environment/Daemons License: BSD @@ -13,6 +13,8 @@ Source2: rpcbind.socket Source3: rpcbind.sysconfig Patch001: rpcbind-0_2_1-rc4.patch +Patch002: rpcbind-0.2.0-warnings.patch +Patch003: rpcbind-0.2.0-rpcinfo-mantypo.patch Requires: glibc-common setup Conflicts: man-pages < 2.43-12 @@ -34,6 +36,11 @@ RPC calls on a server on that machine. %prep %setup -q %patch001 -p1 +# 884165 - Package rpcbind-0.2.0-16.el7 failed RHEL7 RPMdiff testing +%patch002 -p1 +# 963512 - Cmd rpcinfo usage info is not correct +%patch003 -p1 + %build %ifarch s390 s390x @@ -43,9 +50,11 @@ PIE="-fpie" %endif export PIE +RELRO="-Wl,-z,relro,-z,now" + RPCBUSR=rpc RPCBDIR=/var/lib/rpcbind -CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`" +CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE $RELRO`" autoreconf -fisv %configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \ @@ -65,7 +74,7 @@ mkdir -p %{buildroot}%{_mandir}/man8 mkdir -p %{buildroot}/var/lib/rpcbind make DESTDIR=$RPM_BUILD_ROOT install -mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcbind ${RPM_BUILD_ROOT}/sbin +mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcbind ${RPM_BUILD_ROOT}%{_sbindir} mv -f ${RPM_BUILD_ROOT}%{_bindir}/rpcinfo ${RPM_BUILD_ROOT}%{_sbindir} install -m644 %{SOURCE1} %{buildroot}%{_unitdir} install -m644 %{SOURCE2} %{buildroot}%{_unitdir} @@ -124,7 +133,7 @@ fi %defattr(-,root,root) %config(noreplace) /etc/sysconfig/rpcbind %doc AUTHORS ChangeLog README -/sbin/rpcbind +%{_sbindir}/rpcbind %{_sbindir}/rpcinfo %{_mandir}/man8/* %{_unitdir}/rpcbind.service @@ -133,6 +142,17 @@ fi %dir %attr(700,rpc,rpc) /var/lib/rpcbind %changelog +* Sat Nov 15 2014 Steve Dickson - 0.2.0-26 +- Moved rpcbind from /sbin to /usr/sbin (bz 1159683) + +* Mon Sep 22 2014 Steve Dickson - 0.2.0-25 +- Fixed some warnings in in6_fillscopeid() (bz 884165) +- Fixed typo in rpcinfo manpage (bz 963512) +- Removed unnecessary targets from rpcbind.service (bz 1036791) + +* Fri Sep 19 2014 Steve Dickson - 0.2.0-24 +- Added the RELRO CFLAGS (bz 1092513) + * Fri Jan 24 2014 Daniel Mach - 0.2.0-23 - Mass rebuild 2014-01-24