rpcbind/rpcbind.spec

140 lines
4.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package rpcbind
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif
Name: rpcbind
Version: 0.2.4
Release: 0
Summary: Transport independent RPC portmapper
# Git-Web: http://git.linux-nfs.org/?p=steved/rpcbind.git;a=summary
License: BSD-4-Clause
Group: Productivity/Networking/System
Url: http://rpcbind.sourceforge.net
Source: https://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
Source2: sysconfig.rpcbind
Source3: rpcbind.xml
Source4: pmap_set.c
Patch1: 0001-systemd-unit-files.patch
Accepting request 264790 from home:kukuk:NIS Update to rpcbind 0.2.2 and port most patches to it. 6 are still missing. - Split off 0003-systemd-no-dualmode.patch from 0001-systemd-enhancements.patch for easier upstream submission. - Split off 0004-systemd-sd_notify.patch from 0001-systemd-enhancements.patch for easier upstream submission. - Rename 0001-systemd-enhancements.patch to 0001-systemd-unit-files.patch - Update to latest rpcbind 0.2.2 upstream release. - Following patches are upstream: - 0001-Fix-building-one-systems-w-out-nss.h.patch - 0002-Rename-configure.in-to-configure.ac.patch - 0003-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch - 0004-Silence-a-warning-about-setgroups-being-implicitly-d.patch - Adjust following patches: - 0005-Remove-obsolete-function-in6_fillscopeid.patch - 0006-In-init_transport-move-creation-of-COTS-sockets-clos.patch - 0018-configure-check-for-nss.h.patch - Obsolete patches: - 0015-When-using-systemd-activation-make-rpcbind-notify-sy.patch - 0016-Notify-systemd-unconditionally.patch - 0012-Support-systemd-activation.patch - 0013-socket-activation-Fix-rpcbind.service-to-use-separat.patch - 0017-Pull-the-sysconfig-file-into-rpcbind.service-and-use.patch - 0025-rpcinfo-warmstat_no-warning-about-missing-file.patch - 0026-systemd-no-default-dep - 0027-socket-before-service.patch - 0028-rpcbind-after-var-run.patch - 0029-rpcbind-sd-notify-stupid-errmsg.patch - New patches: - 0001-systemd-enhancements.patch - 0002-rpcinfo_warmstart-no_warning_about_missing_file.patch OBS-URL: https://build.opensuse.org/request/show/264790 OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=51
2014-12-11 19:00:24 +01:00
Patch8: 0008-First-part-of-init_transport-refactoring.patch
Patch9: 0009-init_transport-move-the-registration-code-into-a-sep.patch
Patch10: 0010-Fix-the-behavior-when-specifying-the-h-option.patch
Accepting request 264790 from home:kukuk:NIS Update to rpcbind 0.2.2 and port most patches to it. 6 are still missing. - Split off 0003-systemd-no-dualmode.patch from 0001-systemd-enhancements.patch for easier upstream submission. - Split off 0004-systemd-sd_notify.patch from 0001-systemd-enhancements.patch for easier upstream submission. - Rename 0001-systemd-enhancements.patch to 0001-systemd-unit-files.patch - Update to latest rpcbind 0.2.2 upstream release. - Following patches are upstream: - 0001-Fix-building-one-systems-w-out-nss.h.patch - 0002-Rename-configure.in-to-configure.ac.patch - 0003-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch - 0004-Silence-a-warning-about-setgroups-being-implicitly-d.patch - Adjust following patches: - 0005-Remove-obsolete-function-in6_fillscopeid.patch - 0006-In-init_transport-move-creation-of-COTS-sockets-clos.patch - 0018-configure-check-for-nss.h.patch - Obsolete patches: - 0015-When-using-systemd-activation-make-rpcbind-notify-sy.patch - 0016-Notify-systemd-unconditionally.patch - 0012-Support-systemd-activation.patch - 0013-socket-activation-Fix-rpcbind.service-to-use-separat.patch - 0017-Pull-the-sysconfig-file-into-rpcbind.service-and-use.patch - 0025-rpcinfo-warmstat_no-warning-about-missing-file.patch - 0026-systemd-no-default-dep - 0027-socket-before-service.patch - 0028-rpcbind-after-var-run.patch - 0029-rpcbind-sd-notify-stupid-errmsg.patch - New patches: - 0001-systemd-enhancements.patch - 0002-rpcinfo_warmstart-no_warning_about_missing_file.patch OBS-URL: https://build.opensuse.org/request/show/264790 OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=51
2014-12-11 19:00:24 +01:00
Patch11: 0011-Clean-up-the-way-we-handle-the-h-option-in-init_tran.patch
Patch14: 0014-When-using-systemd-redirect-syslog-calls-to-the-syst.patch
Patch30: 0030-systemd-fix-rmtcall.patch
Patch31: 0031-rpcbind-manpage.patch
Patch32: svc-freeargs.patch
BuildRequires: libtirpc-devel >= 1.0.1
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: systemd-rpm-macros
BuildRequires: tcpd-devel
BuildRequires: pkgconfig(libsystemd)
PreReq: %fillup_prereq
Requires(pre): %{_sbindir}/useradd
Provides: portmap
%{?systemd_requires}
%if 0%{?suse_version} >= 1330
BuildRequires: libnsl-devel
%endif
%if 0%{?suse_version} >= 1330
Requires(pre): group(nobody)
%endif
%description
Rpcbind is a replacement for portmap. Whereas portmap supports only UDP
and TCP transports over INET (IPv4), rpcbind can be configured to work
on various transports supported by the TI-RPC. This includes TCP and
UDP over IPv6. Moreover, rpcbind provides additional functions in
regards to portmap.
%prep
%setup -q
cp %{SOURCE4} .
%patch1 -p1
Accepting request 264790 from home:kukuk:NIS Update to rpcbind 0.2.2 and port most patches to it. 6 are still missing. - Split off 0003-systemd-no-dualmode.patch from 0001-systemd-enhancements.patch for easier upstream submission. - Split off 0004-systemd-sd_notify.patch from 0001-systemd-enhancements.patch for easier upstream submission. - Rename 0001-systemd-enhancements.patch to 0001-systemd-unit-files.patch - Update to latest rpcbind 0.2.2 upstream release. - Following patches are upstream: - 0001-Fix-building-one-systems-w-out-nss.h.patch - 0002-Rename-configure.in-to-configure.ac.patch - 0003-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch - 0004-Silence-a-warning-about-setgroups-being-implicitly-d.patch - Adjust following patches: - 0005-Remove-obsolete-function-in6_fillscopeid.patch - 0006-In-init_transport-move-creation-of-COTS-sockets-clos.patch - 0018-configure-check-for-nss.h.patch - Obsolete patches: - 0015-When-using-systemd-activation-make-rpcbind-notify-sy.patch - 0016-Notify-systemd-unconditionally.patch - 0012-Support-systemd-activation.patch - 0013-socket-activation-Fix-rpcbind.service-to-use-separat.patch - 0017-Pull-the-sysconfig-file-into-rpcbind.service-and-use.patch - 0025-rpcinfo-warmstat_no-warning-about-missing-file.patch - 0026-systemd-no-default-dep - 0027-socket-before-service.patch - 0028-rpcbind-after-var-run.patch - 0029-rpcbind-sd-notify-stupid-errmsg.patch - New patches: - 0001-systemd-enhancements.patch - 0002-rpcinfo_warmstart-no_warning_about_missing_file.patch OBS-URL: https://build.opensuse.org/request/show/264790 OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=51
2014-12-11 19:00:24 +01:00
#%patch8 -p1
#%patch9 -p1
#%patch10 -p1
#%patch11 -p1
#%patch14 -p1
#%patch30 -p1
%patch31 -p1
%patch32 -p1
%build
autoreconf -fiv
export CFLAGS="%{optflags} -fpie"
export LDFLAGS="-pie -Wl,-z,relro,-z,now"
%configure \
--bindir=/sbin \
--enable-libwrap \
--enable-warmstarts \
--disable-debug \
--with-statedir=%{_rundir}/%{name} \
--with-rpcuser=rpc \
--with-systemdsystemunitdir=%{_unitdir}
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
%install
%make_install
# fillup template
mkdir -p %{buildroot}%{_fillupdir}
install -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/
mkdir -p %{buildroot}%{_datadir}/omc/svcinfo.d
install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/omc/svcinfo.d/
#
install -m 755 pmap_set %{buildroot}/sbin/pmap_set2
# create symlink for rcrpcbind
mkdir -p %{buildroot}%{_sbindir}
ln -s /sbin/service %{buildroot}%{_sbindir}/rc%{name}
%pre
%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
%service_del_preun %{name}.service %{name}.socket
%post
%{fillup_only -n rpcbind}
%service_add_post %{name}.service %{name}.socket
%postun
%service_del_postun %{name}.service %{name}.socket
%files
%doc AUTHORS COPYING README
/sbin/pmap_set2
/sbin/%{name}
/sbin/rpcinfo
%{_sbindir}/rc%{name}
%{_mandir}/*/*
%{_fillupdir}/sysconfig.%{name}
%{_datadir}/omc/svcinfo.d/%{name}.xml
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}.socket
%changelog