package created using the webbuild interface [release 0.2.1-1mamba;Sat May 10 2014]

This commit is contained in:
Silvan Calarco 2024-01-05 17:28:41 +01:00
parent bb977baaec
commit c3d27c7515
8 changed files with 191 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# rpcbind
The rpcbind program is a replacement for portmap. It is required for import or export of Network File System (NFS) shared directories.

View File

@ -0,0 +1,26 @@
commit b3b031b07cc5909aaf964f9d4cf46f6097769320
Author: Steve Dickson <steved@redhat.com>
Date: Wed Aug 21 14:40:22 2013 -0400
rpcbind: rpcuser not being set in Makefile.am
Commit 8d7a0708 cause a regression where the rpcuser id was not
being set, which in turn cause rpcbind to immediately exit.
This patch removes the extra ',' that was in the AC_ARG_WITH
statement in the configure.ac file.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/configure.ac b/configure.ac
index 2b67720..1cf42d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ AC_ARG_WITH([statedir],
AC_SUBST([statedir], [$with_statedir])
AC_ARG_WITH([rpcuser],
- AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@]),
+ AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@])
,, [with_rpcuser=root])
AC_SUBST([rpcuser], [$with_rpcuser])

12
rpcbind-0.2.1-run.patch Normal file
View File

@ -0,0 +1,12 @@
diff -Nru rpcbind-0.2.1.orig/src/rpcbind.c rpcbind-0.2.1/src/rpcbind.c
--- rpcbind-0.2.1.orig/src/rpcbind.c 2013-08-19 14:49:34.000000000 +0000
+++ rpcbind-0.2.1/src/rpcbind.c 2014-05-10 10:01:50.952301477 +0000
@@ -93,7 +93,7 @@
/* who to suid to if -s is given */
#define RUN_AS "daemon"
-#define RPCBINDDLOCK "/var/run/rpcbind.lock"
+#define RPCBINDDLOCK "/run/rpcbind.lock"
int runasdaemon = 0;
int insecure = 0;

View File

@ -0,0 +1,24 @@
diff -Nru rpcbind-0.2.1.orig/src/rpcbind.c rpcbind-0.2.1/src/rpcbind.c
--- rpcbind-0.2.1.orig/src/rpcbind.c 2014-05-10 10:49:15.907412342 +0000
+++ rpcbind-0.2.1/src/rpcbind.c 2014-05-10 10:50:50.537551178 +0000
@@ -117,7 +117,7 @@
char *udp_uaddr; /* Universal UDP address */
char *tcp_uaddr; /* Universal TCP address */
#endif
-static char servname[] = "rpcbind";
+static char servname[] = "sunrpc";
static char superuser[] = "superuser";
int main __P((int, char *[]));
diff -Nru rpcbind-0.2.1.orig/src/rpcinfo.c rpcbind-0.2.1/src/rpcinfo.c
--- rpcbind-0.2.1.orig/src/rpcinfo.c 2013-08-19 14:49:34.000000000 +0000
+++ rpcbind-0.2.1/src/rpcinfo.c 2014-05-10 10:51:05.958410935 +0000
@@ -632,7 +632,7 @@
{
memset (&hints, 0, sizeof hints);
hints.ai_family = AF_INET;
- if ((error = getaddrinfo (host, "rpcbind", &hints, &res)) != 0 &&
+ if ((error = getaddrinfo (host, "sunrpc", &hints, &res)) != 0 &&
(error = getaddrinfo (host, "portmapper", &hints, &res)) != 0)
{
fprintf (stderr, "rpcinfo: %s: %s\n",

11
rpcbind.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=RPC bind service
Requires=rpcbind.socket
[Service]
Type=forking
EnvironmentFile=/etc/sysconfig/rpcbind
ExecStart=/sbin/rpcbind -w ${RPCBIND_ARGS}
[Install]
Also=rpcbind.socket

8
rpcbind.socket Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=RPCbind Server Activation Socket
[Socket]
ListenStream=/run/rpcbind.sock
[Install]
WantedBy=sockets.target

105
rpcbind.spec Normal file
View File

@ -0,0 +1,105 @@
%define groupid 59
%define userid 59
Name: rpcbind
Version: 0.2.1
Release: 1mamba
Summary: A replacement for portmap required for import or export of NFS shared directories
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://rpcbind.sourceforge.net/
Source: http://downloads.sourceforge.net/rpcbind/rpcbind-%{version}.tar.bz2
Source1: rpcbind.service
Source2: rpcbind.socket
Source3: rpcbind.sysconfig
Patch0: rpcbind-0.2.1-run.patch
Patch1: rpcbind-0.2.1-rpcuser.patch
Patch2: rpcbind-0.2.1-services-sunrpc.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libtirpc-devel
## AUTOBUILDREQ-END
Provides: portmap
Obsoletes: portmap
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
The rpcbind program is a replacement for portmap. It is required for import or export of Network File System (NFS) shared directories.
%debug_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
autoreconf -fisv
%configure \
--enable-warmstarts \
--with-statedir=/var/lib/rpcbind \
--with-rpcuser=rpc \
--enable-libwrap \
--enable-debug
%make all
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
install -d -m0755 %{buildroot}{/sbin,%{_sbindir}}
mv -f %{buildroot}%{_bindir}/rpcbind %{buildroot}/sbin
mv -f %{buildroot}%{_bindir}/rpcinfo %{buildroot}%{_sbindir}
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/rpcbind.service
install -D -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/rpcbind.socket
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/rpcbind
install -d %{buildroot}/var/lib/rpcbind
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
if [ $1 -ge 1 ]; then
/usr/sbin/groupadd rpc -g %{groupid} &>/dev/null
/usr/sbin/useradd -u %{userid} -g rpc -c 'RPC bind daemon' \
-d /var/empty -s /bin/false rpc &>/dev/null
exit 0
fi
:
%post
if [ $1 -ge 1 ]; then
systemctl -q daemon-reload
fi
if [ $1 -eq 1 ]; then
/bin/systemctl -q enable rpcbind >/dev/null 2>&1 || :
fi
:
%postun
if [ $1 -eq 0 ]; then
systemctl -q daemon-reload
/usr/sbin/userdel rpc &>/dev/null
/usr/sbin/groupdel rpc &>/dev/null
fi
:
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/rpcbind
/sbin/rpcbind
%{_sbindir}/rpcinfo
%{_unitdir}/rpcbind.service
%{_unitdir}/rpcbind.socket
%{_mandir}/man8/rpcbind.8*
%{_mandir}/man8/rpcinfo.8*
%dir %attr(700,rpc,rpc) /var/lib/rpcbind
%doc AUTHORS COPYING
%changelog
* Sat May 10 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.1-1mamba
- package created using the webbuild interface

3
rpcbind.sysconfig Normal file
View File

@ -0,0 +1,3 @@
#
# Optional arguments passed to rpcbind. See rpcbind(8)
RPCBIND_ARGS=""