source: projects/specs/trunk/r/rpcbind/rpcbind-vl.spec @ 11953

Revision 11953, 8.8 KB checked in by tomop, 5 years ago (diff)

rpcbind-1.2.5-1

Line 
1%{!?_initddir:%define _initddir /etc/rc.d/init.d}
2
3%define _unpackaged_files_terminate_build 1
4
5Name:           rpcbind
6Version:        1.2.5
7Release:                1%{?_dist_release}
8Summary:        Universal Addresses to RPC Program Number Mapper
9Group:          System Environment/Daemons
10License:        GPL
11URL:            http://nfsv4.bullopensource.org
12
13BuildRoot:      %{_tmppath}/%{name}-%{version}-root
14Source0:        http://downloads.sourceforge.net/rpcbind/%{name}-%{version}.tar.bz2
15Source1: rpcbind.init
16Source2: %{name}.sysconfig
17
18Patch001: rpcbind-1.2.5-rpcinfo-bufoverflow.patch
19
20Requires: glibc-common setup
21Conflicts: man-pages < 2.43-12
22BuildRequires: automake, autoconf, libtool
23BuildRequires: libtirpc-devel
24BuildRequires: quota
25BuildRequires: tcp_wrappers
26#BuildRequires: quota-devel
27#BuildRequires: tcp_wrappers-devel
28Requires(pre): /usr/sbin/groupadd  /usr/sbin/groupdel
29Requires(pre): /usr/sbin/useradd  /usr/sbin/userdel
30Requires(pre): coreutils
31Requires(post): /sbin/chkconfig
32Requires(post): /sbin/chkconfig
33
34#Provides: portmap = %{version}-%{release}
35Provides: portmap = 4.0-66%{_dist_release}
36Obsoletes: portmap <= 4.0-65.3
37
38Vendor: Project Vine
39Distribution: Vine Linux
40
41%description
42The rpcbind utility is a server that converts RPC program numbers into
43universal addresses.  It must be running on the host to be able to make
44RPC calls on a server on that machine.
45
46%prep
47%setup -q
48# 1637562 - rpcinfo: Fix stack buffer overflow
49%patch001 -p1
50
51%build
52%ifarch s390 s390x
53PIE="-fPIE"
54%else
55PIE="-fpie"
56%endif
57export PIE
58
59RPCBUSR=rpc
60RPCBDIR=/var/lib/rpcbind
61CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`"
62
63autoreconf -fisv
64%configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
65    --enable-warmstarts \
66    --with-statedir="$RPCBDIR" \
67    --with-rpcuser="$RPCBUSR" \
68    --with-nss-modules="files altfiles" \
69    --enable-libwrap \
70    --with-systemdsystemunitdir=no \
71    --enable-debug
72
73make all
74
75
76%install
77rm -rf %{buildroot}
78mkdir -p %{buildroot}/sbin
79mkdir -p %{buildroot}/usr/sbin
80mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
81mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
82mkdir -p %{buildroot}%{_mandir}/man8
83mkdir -p %{buildroot}/var/lib/rpcbind
84make DESTDIR=$RPM_BUILD_ROOT install
85
86install -m 755 %{SOURCE1} %{buildroot}%{_initddir}/rpcbind
87install -m 644 %{SOURCE2} %{buildroot}/etc/sysconfig/rpcbind
88
89mv %{buildroot}%{_sbindir}/rpcbind %{buildroot}/sbin/
90mv %{buildroot}%{_bindir}/rpcinfo %{buildroot}%{_sbindir}/
91
92%clean
93rm -rf %{buildroot}
94
95%pre
96
97# Check the validity of the rpc uid and gid.
98# If they don't exist, create them
99# If they exist but are the wrong value, remove them
100#   and recreate them with the correct value
101# If they exist and are the correct value do nothing
102rpcid=`getent passwd rpc | cut -d: -f 3`
103if [ -n "$rpcid" -a "$rpcid" != "32" ]; then
104        /usr/sbin/userdel  rpc 2> /dev/null || :
105        /usr/sbin/groupdel rpc 2> /dev/null || :
106fi
107if [ -z "$rpcid" -o "$rpcid" != "32" ]; then
108        /usr/sbin/groupadd -o -g 32 rpc > /dev/null 2>&1
109        /usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/lib/rpcbind -g 32 \
110        -M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1
111fi
112%post
113/sbin/chkconfig --add %{name}
114
115%preun
116if [ $1 -eq 0 ]; then
117    service rpcbind stop > /dev/null 2>&1
118    /sbin/chkconfig --del %{name}
119        /usr/sbin/userdel  rpc 2>/dev/null || :
120        /usr/sbin/groupdel rpc 2>/dev/null || :
121        rm -rf /var/lib/rpcbind
122fi
123%postun
124if [ "$1" -ge "1" ]; then
125    service rpcbind condrestart > /dev/null 2>&1
126fi
127
128%files
129%defattr(-,root,root)
130%doc AUTHORS ChangeLog README
131/sbin/rpcbind
132%{_sbindir}/rpcinfo
133%{_mandir}/man8/*
134%config %{_initddir}/rpcbind
135%config(noreplace) /etc/sysconfig/rpcbind
136
137%dir %attr(700,rpc,rpc) /var/lib/rpcbind
138
139%changelog
140* Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.2.5-1
141- updated to 1.2.5.
142- added Patch001.
143
144* Mon Nov 23 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.2.1-1
145- update to 0.2.1
146- remove Patch100
147
148* Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.2.0-6
149- rebuild with VineSeed environment
150
151* Sun Feb 14 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.2.0-5
152- Initial build for Vine Linux
153
154* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4
155- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
156
157* Mon Jul 06 2009 Adam Jackson <ajax@redhat.com> 0.2.0-3
158- Requires(pre): coreutils for cut(1).
159
160* Thu Jun 25 2009 Steve Dickson <steved@redhat.com> - 0.2.0-2
161- Fixed pre scriptle failure during upgrades (bz 507364)
162- Corrected the usage info to match what the rpcbind man
163    page says. (bz 466332)
164- Correct package issues (bz 503508)
165
166* Fri May 29 2009 Steve Dickson <steved@redhat.com> - 0.2.0-1
167- Updated to latest upstream release: 0.2.0
168
169* Tue May 19 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.1.7-3
170- Replace the Sun RPC license with the BSD license, with the explicit permission of Sun Microsystems
171
172* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.7-2
173- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
174
175* Wed Nov 19 2008 Steve Dickson <steved@redhat.com>  0.1.7-1
176- Update to latest upstream release: 0.1.7
177
178* Tue Sep 30 2008 Steve Dickson <steved@redhat.com>  0.1.6-3
179- Fixed a typo in the rpcbind.init script that stop warm starts
180  from happening with conrestarts
181- Fixed scriptlet failure (bz 462533)
182
183* Tue Sep 16 2008 Steve Dickson <steved@redhat.com> 0.1.6-2
184- Added usptream patches 01 thru 03 that do:
185    * Introduce helpers for ipprot/netid mapping
186    * Change how we decide on the netids to use for portmap
187    * Simplify port live check in pmap_svc.c
188
189* Wed Jul  9 2008 Steve Dickson <steved@redhat.com> 0.1.6-1
190- Updated to latest upstream release 0.1.6
191
192* Wed Jul  2 2008 Steve Dickson <steved@redhat.com> 0.1.5-5
193- Fixed SYNOPSIS section in the rpcinfo man page (bz 453729)
194
195* Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-4
196- Removed the documentation about the non-existent
197  '-L' flag (bz 446915)
198
199* Fri Jun 27 2008 Steve Dickson <steved@redhat.com> 0.1.5-3
200- Set password and service lookups to be local (bz 447092)
201
202* Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-2
203- rpcbind needs to downgrade to non-priviledgied group.
204
205* Mon Jun 23 2008 Steve Dickson <steved@redhat.com> 0.1.5-1
206- Updated to latest upstream release 0.1.5
207
208* Mon Feb 11 2008 Steve Dickson <steved@redhat.com> 0.1.4-14
209- Fixed a warning in pmap_svc.c
210- Cleaned up warmstarts so uid are longer needed, also
211  changed condrestarts to use warmstarts. (bz 428496)
212
213* Thu Jan 24 2008 Steve Dickson <steved@redhat.com> 0.1.4-13
214- Fixed connectivity with Mac OS clients by making sure handle_reply()
215  sets the correct fromlen in its recvfrom() call (bz 244492)
216
217* Mon Dec 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-12
218- Changed is_loopback() and check_access() see if the calling
219  address is an address on a local interface, just not a loopback
220  address (bz 358621).
221
222* Wed Oct 17 2007 Steve Dickson <steved@redhat.com> 0.1.4-11
223- Reworked logic in initscript so the correct exit is
224  used when networking does not exist or is set up
225  incorrectly.
226
227* Tue Oct 16 2007 Steve Dickson <steved@redhat.com> 0.1.4-10
228- Corrected a typo in the initscript from previous
229  commit.
230
231* Mon Oct 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-9
232- Fixed typo in Summary (bz 331811)
233- Corrected init script (bz 247046)
234
235* Sat Sep 15 2007 Steve Dickson <steved@redhat.com> 0.1.4-8
236- Fixed typo in init script (bz 248285)
237- Added autoconf rules to turn on secure host checking
238  via libwrap. Also turned on host check by default (bz 248284)
239- Changed init script to start service in runlevel 2 (bz 251568)
240- Added a couple missing Requires(pre) (bz 247134)
241
242* Fri May 25 2007 Steve Dickson <steved@redhat.com> 0.1.4-7
243- Fixed condrestarts (bz 241332)
244
245* Tue May 22 2007 Steve Dickson <steved@redhat.com> 0.1.4-6
246- Fixed an ipv6 related segfault on startup (bz 240873)
247
248* Wed Apr 18 2007 Steve Dickson <steved@redhat.com> 0.1.4-5
249- Added dependency on setup which contains the correct
250  rpcbind /etc/service entry which in turns stops
251  rpcbind from haning when NIS is enabled. (bz 236865)
252
253* Wed Apr 11 2007 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
254- change man-pages requires into a conflicts as we don't have to have
255  man-pages installed, but if we do, we need the newer version
256
257* Fri Apr  6 2007 Steve Dickson <steved@redhat.com> 0.1.4-3
258- Fixed the Provides and Obsoletes statments to correctly
259  obsolete the portmap package.
260* Tue Apr  3 2007 Steve Dickson <steved@redhat.com> 0.1.4-2
261- Added dependency on glibc-common which allows the
262  rpcinfo command to be installed in the correct place.
263- Added dependency on man-pages so the rpcinfo man
264  pages don't conflict.
265- Added the creation of /var/lib/rpcbind which will be
266  used to store state files.
267- Make rpcbind run with the 'rpc' uid/gid when it exists.
268
269* Wed Feb 21 2007 Steve Dickson <steved@redhat.com> 0.1.4-1
270- Initial commit
271- Spec reviewed (bz 228894)
272- Added the Provides/Obsoletes which should
273  cause rpcbind to replace portmapper
Note: See TracBrowser for help on using the repository browser.