Accepting request 782842 from home:kukuk:container
- rpc-user.conf: use sysusers method to create rpc user - Minimize dependencies for container usage OBS-URL: https://build.opensuse.org/request/show/782842 OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=88
This commit is contained in:
parent
e951bde97d
commit
86d3df17ff
2
rpc-user.conf
Normal file
2
rpc-user.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Type Name ID GECOS [HOME]
|
||||||
|
u rpc - "User for rpcbind" /var/lib/empty
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 9 08:54:14 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
- rpc-user.conf: use sysusers method to create rpc user
|
||||||
|
- Minimize dependencies for container usage
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 12 08:11:40 UTC 2019 - Thomas Blume <Thomas.Blume@suse.com>
|
Wed Jun 12 08:11:40 UTC 2019 - Thomas Blume <Thomas.Blume@suse.com>
|
||||||
|
|
||||||
|
22
rpcbind.spec
22
rpcbind.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package rpcbind
|
# spec file for package rpcbind
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -31,23 +31,24 @@ URL: http://rpcbind.sourceforge.net
|
|||||||
Source: https://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
|
Source: https://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
|
||||||
Source2: sysconfig.rpcbind
|
Source2: sysconfig.rpcbind
|
||||||
Source4: pmap_set.c
|
Source4: pmap_set.c
|
||||||
|
Source5: rpc-user.conf
|
||||||
Patch1: 0001-systemd-unit-files.patch
|
Patch1: 0001-systemd-unit-files.patch
|
||||||
Patch2: 0001-change-lockingdir-to-run.patch
|
Patch2: 0001-change-lockingdir-to-run.patch
|
||||||
Patch31: 0031-rpcbind-manpage.patch
|
Patch31: 0031-rpcbind-manpage.patch
|
||||||
BuildRequires: libtirpc-devel >= 1.0.1
|
BuildRequires: libtirpc-devel >= 1.0.1
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: sysuser-shadow
|
||||||
|
BuildRequires: sysuser-tools
|
||||||
BuildRequires: tcpd-devel
|
BuildRequires: tcpd-devel
|
||||||
BuildRequires: pkgconfig(libsystemd)
|
BuildRequires: pkgconfig(libsystemd)
|
||||||
Requires(post): %fillup_prereq
|
Requires(post): %fillup_prereq
|
||||||
Requires(pre): shadow
|
|
||||||
Provides: portmap
|
Provides: portmap
|
||||||
%{?systemd_requires}
|
%{?systemd_ordering}
|
||||||
%if 0%{?suse_version} >= 1330
|
%if 0%{?suse_version} >= 1330
|
||||||
BuildRequires: libnsl-devel
|
BuildRequires: libnsl-devel
|
||||||
Requires(pre): group(nobody)
|
|
||||||
%endif
|
%endif
|
||||||
|
%sysusers_requires
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Rpcbind is a replacement for portmap. Whereas portmap supports only UDP
|
Rpcbind is a replacement for portmap. Whereas portmap supports only UDP
|
||||||
@ -79,12 +80,16 @@ export LDFLAGS="-pie -Wl,-z,relro,-z,now"
|
|||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
gcc -I/usr/include/tirpc -pie -fpie -fwhole-program -Wl,-z,relro,-z,now %{optflags} pmap_set.c -o pmap_set -ltirpc
|
gcc -I/usr/include/tirpc -pie -fpie -fwhole-program -Wl,-z,relro,-z,now %{optflags} pmap_set.c -o pmap_set -ltirpc
|
||||||
|
%sysusers_generate_pre %{SOURCE5} rpc
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
# fillup template
|
# fillup template
|
||||||
mkdir -p %{buildroot}%{_fillupdir}
|
mkdir -p %{buildroot}%{_fillupdir}
|
||||||
install -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/
|
install -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/
|
||||||
|
# sysusers.d config
|
||||||
|
mkdir -p %{buildroot}%{_sysusersdir}
|
||||||
|
install -m 644 %{SOURCE5} %{buildroot}%{_sysusersdir}/
|
||||||
#
|
#
|
||||||
install -m 755 pmap_set %{buildroot}/sbin/pmap_set2
|
install -m 755 pmap_set %{buildroot}/sbin/pmap_set2
|
||||||
# create symlink for rcrpcbind
|
# create symlink for rcrpcbind
|
||||||
@ -92,13 +97,9 @@ mkdir -p %{buildroot}/%{_sbindir}
|
|||||||
ln -s service %{buildroot}/%{_sbindir}/rc%{name}
|
ln -s service %{buildroot}/%{_sbindir}/rc%{name}
|
||||||
ln -s /bin/rpcinfo %{buildroot}/sbin/rpcinfo
|
ln -s /bin/rpcinfo %{buildroot}/sbin/rpcinfo
|
||||||
|
|
||||||
%pre
|
%pre -f rpc.pre
|
||||||
%service_add_pre %{name}.service %{name}.socket
|
%service_add_pre %{name}.service %{name}.socket
|
||||||
|
|
||||||
# Add "rpc" user
|
|
||||||
getent passwd rpc >/dev/null || %{_sbindir}/useradd -r -g nobody -d %{_localstatedir}/lib/empty -s /sbin/nologin -c "user for rpcbind" rpc
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%service_del_preun %{name}.service %{name}.socket
|
%service_del_preun %{name}.service %{name}.socket
|
||||||
|
|
||||||
@ -119,6 +120,7 @@ exit 0
|
|||||||
%{_sbindir}/rc%{name}
|
%{_sbindir}/rc%{name}
|
||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
%{_fillupdir}/sysconfig.%{name}
|
%{_fillupdir}/sysconfig.%{name}
|
||||||
|
%{_sysusersdir}/rpc-user.conf
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
%{_unitdir}/%{name}.socket
|
%{_unitdir}/%{name}.socket
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user