forked from rpms/rpcbind
Commited Spec file and patche files
This commit is contained in:
parent
b006cee060
commit
c6715076e1
@ -0,0 +1 @@
|
||||
rpcbind-0.1.4.tar.bz2
|
21
rpcbind-0.1.4-compile.patch
Normal file
21
rpcbind-0.1.4-compile.patch
Normal file
@ -0,0 +1,21 @@
|
||||
--- rpcbind-0.1.4/man/Makefile.am.orig 2006-08-09 19:42:58.000000000 -0400
|
||||
+++ rpcbind-0.1.4/man/Makefile.am 2006-08-09 19:45:01.000000000 -0400
|
||||
@@ -0,0 +1,2 @@
|
||||
+man8_MANS = rpcbind.8
|
||||
+EXTRA_DIST = $(man8_MANS)
|
||||
--- rpcbind-0.1.4/configure.in.orig 2005-01-03 09:03:29.000000000 -0500
|
||||
+++ rpcbind-0.1.4/configure.in 2006-08-09 19:39:16.000000000 -0400
|
||||
@@ -20,6 +20,6 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h ne
|
||||
AC_CHECK_LIB([pthread], [pthread_create])
|
||||
AC_CHECK_LIB([tirpc], [clnt_create])
|
||||
|
||||
-AC_CONFIG_FILES([Makefile src/Makefile])
|
||||
+AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
|
||||
AC_OUTPUT()
|
||||
|
||||
--- rpcbind-0.1.4/Makefile.am.orig 2004-11-04 06:51:42.000000000 -0500
|
||||
+++ rpcbind-0.1.4/Makefile.am 2006-08-09 19:43:57.000000000 -0400
|
||||
@@ -1,2 +1,2 @@
|
||||
-SUBDIRS= src
|
||||
+SUBDIRS= src man
|
||||
|
31
rpcbind-0.1.4-debug.patch
Normal file
31
rpcbind-0.1.4-debug.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- rpcbind-0.1.4/src/Makefile.am.debug 2004-11-15 08:38:02.000000000 -0500
|
||||
+++ rpcbind-0.1.4/src/Makefile.am 2006-08-10 10:28:58.000000000 -0400
|
||||
@@ -18,8 +18,10 @@ rpcbind_LDFLAGS = -lpthread -ltirpc
|
||||
rpcbind_LDADD = $(LIB_TIRPC)
|
||||
AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \
|
||||
-DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO
|
||||
-## -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL \
|
||||
-## -DND_DEBUG -DBIND_DEBUG
|
||||
+if DEBUG
|
||||
+INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL
|
||||
+INCLUDES += -DND_DEBUG -DBIND_DEBUG
|
||||
+endif
|
||||
|
||||
$(rpcbind_OBJECTS) : security.o util.o check_bound.o pmap_svc.o \
|
||||
rpcb_svc.o rpcb_svc_com.o rpcb_svc_4.o \
|
||||
--- rpcbind-0.1.4/configure.in.debug 2006-08-09 20:26:22.000000000 -0400
|
||||
+++ rpcbind-0.1.4/configure.in 2006-08-10 10:33:31.000000000 -0400
|
||||
@@ -10,6 +10,13 @@ AC_CONFIG_SRCDIR([src/rpcbind.c])
|
||||
AC_HEADER_DIRENT
|
||||
AC_PREFIX_DEFAULT(/usr)
|
||||
|
||||
+AC_ARG_ENABLE(debug,[ --enable-debug Turns on rpcbind debugging],
|
||||
+ [case "${enableval}" in
|
||||
+ yes) debug=true ;;
|
||||
+ no) debug=no ;;
|
||||
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
|
||||
+ esac],[debug=false])
|
||||
+AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
|
||||
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \
|
||||
netinet/in.h stdlib.h string.h \
|
62
rpcbind-0.1.4-warmstarts.patch
Normal file
62
rpcbind-0.1.4-warmstarts.patch
Normal file
@ -0,0 +1,62 @@
|
||||
--- rpcbind-0.1.4/man/rpcbind.8.orig 2004-10-25 08:07:44.000000000 -0400
|
||||
+++ rpcbind-0.1.4/man/rpcbind.8 2006-08-10 16:19:55.000000000 -0400
|
||||
@@ -131,6 +131,14 @@ to use non-privileged ports for outgoing
|
||||
clients from using
|
||||
.Nm
|
||||
to connect to services from a privileged port.
|
||||
+.It Fl w
|
||||
+Cause
|
||||
+.Nm
|
||||
+to do a "warm start" by read a state file (in /tmp) when
|
||||
+.Nm
|
||||
+starts up. The state file is created when
|
||||
+.Nm
|
||||
+terminates.
|
||||
.El
|
||||
.Sh NOTES
|
||||
All RPC servers must be restarted if
|
||||
--- rpcbind-0.1.4/src/Makefile.am.orig 2006-08-10 14:56:50.000000000 -0400
|
||||
+++ rpcbind-0.1.4/src/Makefile.am 2006-08-10 15:36:04.000000000 -0400
|
||||
@@ -1,5 +1,14 @@
|
||||
INCLUDES = -I$(srcdir)/tirpc -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \
|
||||
-D_GNU_SOURCE -Wall -pipe
|
||||
+if DEBUG
|
||||
+INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL
|
||||
+INCLUDES += -DND_DEBUG -DBIND_DEBUG
|
||||
+endif
|
||||
+
|
||||
+if WARMSTART
|
||||
+INCLUDES += -DWARMSTART
|
||||
+endif
|
||||
+
|
||||
|
||||
bin_PROGRAMS = rpcbind rpcinfo
|
||||
|
||||
@@ -18,10 +27,6 @@ rpcbind_LDFLAGS = -lpthread -ltirpc
|
||||
rpcbind_LDADD = $(LIB_TIRPC)
|
||||
AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \
|
||||
-DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO
|
||||
-if DEBUG
|
||||
-INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL
|
||||
-INCLUDES += -DND_DEBUG -DBIND_DEBUG
|
||||
-endif
|
||||
|
||||
$(rpcbind_OBJECTS) : security.o util.o check_bound.o pmap_svc.o \
|
||||
rpcb_svc.o rpcb_svc_com.o rpcb_svc_4.o \
|
||||
--- rpcbind-0.1.4/configure.in.orig 2006-08-10 10:47:42.000000000 -0400
|
||||
+++ rpcbind-0.1.4/configure.in 2006-08-10 15:37:29.000000000 -0400
|
||||
@@ -18,6 +18,14 @@ AC_ARG_ENABLE(debug,[ --enable-debug
|
||||
esac],[debug=false])
|
||||
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
|
||||
|
||||
+AC_ARG_ENABLE(warmstarts,[ --enable-warmstarts Enables Warm Starts],
|
||||
+ [case "${enableval}" in
|
||||
+ yes) warmstarts=true ;;
|
||||
+ no) warmstarts=no ;;
|
||||
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-warmstarts) ;;
|
||||
+ esac],[warmstarts=false])
|
||||
+AM_CONDITIONAL(WARMSTART, test x$warmstarts = xtrue)
|
||||
+
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \
|
||||
netinet/in.h stdlib.h string.h \
|
||||
sys/param.h sys/socket.h \
|
91
rpcbind.init
Executable file
91
rpcbind.init
Executable file
@ -0,0 +1,91 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# rpcbind Start/Stop RPCbind
|
||||
#
|
||||
# chkconfig: 345 13 87
|
||||
# description: The rpcbind utility is a server that converts RPC program \
|
||||
# numbers into universal addresses. It must be running on the \
|
||||
# host to be able to make RPC calls on a server on that machine.
|
||||
#
|
||||
# processname: rpcbind
|
||||
# probe: true
|
||||
# config: /etc/sysconfig/nfs
|
||||
|
||||
|
||||
|
||||
# This is an interactive program, we need the current locale
|
||||
[ -f /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh
|
||||
# We can't Japanese on normal console at boot time, so force LANG=C.
|
||||
if [ "$LANG" = "ja" -o "$LANG" = "ja_JP.eucJP" ]; then
|
||||
if [ "$TERM" = "linux" ] ; then
|
||||
LANG=C
|
||||
fi
|
||||
fi
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
# Get config.
|
||||
if [ -f /etc/sysconfig/network ]; then
|
||||
. /etc/sysconfig/network
|
||||
else
|
||||
echo $"Networking not configured - exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
prog="rpcbind"
|
||||
|
||||
# Check that networking is up.
|
||||
if [ "$NETWORKING" = "no" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
[ -f /usr/bin/$prog ] || exit 0
|
||||
|
||||
[ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
|
||||
|
||||
RETVAL=0
|
||||
|
||||
start() {
|
||||
echo -n $"Starting $prog: "
|
||||
daemon $prog $RPCBIND_ARGS
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $prog: "
|
||||
killproc $prog
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status $prog
|
||||
;;
|
||||
restart|reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
condrestart)
|
||||
[ -f /var/lock/subsys/$prog ] && restart || :
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
92
rpcbind.spec
Normal file
92
rpcbind.spec
Normal file
@ -0,0 +1,92 @@
|
||||
%{!?_initdir:%define _initdir /etc/rc.d/init.d}
|
||||
|
||||
Name: rpcbind
|
||||
Version: 0.1.4
|
||||
Release: 1%{?dist}
|
||||
Summary: Universal Addresses to RPC Program Number Napper
|
||||
Group: System Environment/Daemons
|
||||
License: GPL
|
||||
URL: http://nfsv4.bullopensource.org
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
|
||||
Source0: http://nfsv4.bullopensource.org/tarballs/rpcbind/rpcbind-0.1.4.tar.bz2
|
||||
Source1: rpcbind.init
|
||||
|
||||
BuildRequires: automake, autoconf, libtool
|
||||
BuildRequires: libtirpc-devel
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires: libtirpc
|
||||
|
||||
Patch1: rpcbind-0.1.4-compile.patch
|
||||
Patch2: rpcbind-0.1.4-debug.patch
|
||||
Patch3: rpcbind-0.1.4-warmstarts.patch
|
||||
|
||||
%description
|
||||
The rpcbind utility is a server that converts RPC program numbers into
|
||||
universal addresses. It must be running on the host to be able to make
|
||||
RPC calls on a server on that machine.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
%ifarch s390 s390x
|
||||
PIE="-fPIE"
|
||||
%else
|
||||
PIE="-fpie"
|
||||
%endif
|
||||
export PIE
|
||||
CFLAGS="`echo $RPM_OPT_FLAGS $ARCH_OPT_FLAGS $PIE`"
|
||||
|
||||
autoreconf -fisv
|
||||
%configure CFLAGS="$CFLAGS" LDFLAGS="-pie" \
|
||||
--enable-warmstarts \
|
||||
--enable-debug \
|
||||
--prefix=%{buildroot}
|
||||
|
||||
make all
|
||||
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
mkdir -p %{buildroot}/usr/bin
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
|
||||
mkdir -p %{buildroot}%{_mandir}/man8
|
||||
make DESTDIR=%{buildroot} install
|
||||
|
||||
install -m 755 ${RPM_SOURCE_DIR}/rpcbind.init ${RPM_BUILD_ROOT}%{_initdir}/rpcbind
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add %{name}
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
service rpcbind stop > /dev/null 2>&1
|
||||
/sbin/chkconfig --del %{name}
|
||||
fi
|
||||
%postun
|
||||
if [ "$1" -ge "1" ]; then
|
||||
service rpcbind condrestart > /dev/null 2>&1
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS ChangeLog README
|
||||
%{_bindir}/rpcinfo
|
||||
%{_bindir}/rpcbind
|
||||
%{_mandir}/man8/*
|
||||
%config %{_initdir}/rpcbind
|
||||
|
||||
%changelog
|
||||
* Wed Aug 9 2006 Steve Dickson <steved@redhat.com> 0.1.4-1
|
||||
- Initial commit
|
||||
|
Loading…
Reference in New Issue
Block a user