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

Revision 12373, 10.4 KB checked in by tomop, 4 years ago (diff)

updated 4 packages

dhcp-4.1.ESV.R16-1

libssh-0.9.4-1

orc-0.4.31-1

rpcbind-1.2.5-2

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