rpms/gvrpcd/devel gvrpcd-fedora.patch, NONE, 1.1 gvrpcd.spec, NONE, 1.1 import.log, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Jasper Capel jasper at fedoraproject.org
Sat May 16 15:14:16 UTC 2009


Author: jasper

Update of /cvs/pkgs/rpms/gvrpcd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26865/devel

Modified Files:
	.cvsignore sources 
Added Files:
	gvrpcd-fedora.patch gvrpcd.spec import.log 
Log Message:
1.3-2

gvrpcd-fedora.patch:

--- NEW FILE gvrpcd-fedora.patch ---
commit 0bd6d849648c0bdf33a35c4a6511fecd935a2572
Author: Jasper Capel <jasper at newnewyork.nl>
Date:   Fri Apr 3 14:38:19 2009 +0200

    Fedora style sysconfig and init files

diff --git a/gvrpcd-fedora.init b/gvrpcd-fedora.init
new file mode 100644
index 0000000..0176c1e
--- /dev/null
+++ b/gvrpcd-fedora.init
@@ -0,0 +1,167 @@
+#!/bin/sh
+#
+# gvrpcd A program for announcing VLANs using GVRP
+#
+# chkconfig:   2345 11 89 
+# description: gvrpcd implements end-node GVRP functionality as a user-space \
+#              daemon.
+#
+
+ 
+### BEGIN INIT INFO
+# Provides: gvrpcd
+# Required-Start: network
+# Required-Stop: network
+# Should-Start: 
+# Should-Stop: 
+# Default-Start: 
+# Default-Stop: 
+# Short-Description: A program for announcing VLANs using GVRP
+# Description: gvrpcd implements end-node GVRP functionality as a user-space \
+#              daemon
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+exec="/usr/sbin/gvrpcd"
+prog="gvrpcd"
+lockfilebase=/var/lock/subsys/gvrpcd
+config=/proc/net/vlan/config
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+# See if any interfaces were passed to the init script.
+if [ "$#" -gt 1 ]; then
+       originalopts="$@"
+       shift
+       interfaces="$@"
+       set $originalopts
+fi
+
+start() {
+    # Wrapper to start all interfaces
+    [ -x $exec ] || exit 5
+    [ -z $interfaces ] && exit 5
+    [ -f $config ] || exit 6
+    retval=0
+    for interface in $interfaces
+    do
+        start_if $interface
+        subretval=$?
+        [ $subretval -ne 0 ] && retval=$subretval
+    done
+    return $retval
+}
+
+start_if() {
+    # Starts one interface
+    ifname=$1
+    ifprog=${prog}-${ifname}
+    lockfile=${lockfilebase}-${ifname}
+    pidfile=/var/run/${ifprog}.pid
+    echo -n $"Starting ${ifprog}: "
+    daemon $exec -d -i $ifname -p $pidfile $gvrpcd_options
+    # if not running, start it up here, usually something like "daemon $exec"
+    retval=$?
+    echo
+    [ $retval -eq 0 ] && touch $lockfile
+    return $retval
+}
+
+stop() {
+    # Wrapper to stop all interfaces
+    retval=0
+    for interface in $interfaces
+    do
+        stop_if $interface
+        subretval=$?
+        [ $subretval -ne 0 ] && retval=$subretval
+    done
+    return $retval
+}
+
+stop_if() {
+    # Stops one interface
+    ifname=$1
+    ifprog=${prog}-${ifname}
+    lockfile=${lockfilebase}-${ifname}
+    pidfile=/var/run/$ifprog.pid
+    echo -n $"Stopping ${ifprog}: "
+    killproc -p $pidfile $ifprog
+    retval=$?
+    echo
+    [ $retval -eq 0 ] && rm -f $lockfile
+    return $retval
+}
+
+restart() {
+    stop
+    start
+}
+
+reload() {
+    restart
+}
+
+force_reload() {
+    restart
+}
+
+rh_status() {
+    # Status wrapper for all interfaces 
+    retval=0
+    for interface in $interfaces
+    do
+        rh_status_if $interface
+        subretval=$?
+        [ $subretval -ne 0 ] && retval=$subretval
+    done
+    return $retval
+}
+rh_status_if() {
+    # run checks to determine if the service is running or use generic status
+    ifname=$1
+    ifprog=${prog}-${ifname}
+    pidfile=/var/run/${prog}-${ifname}.pid
+    status -p $pidfile $ifprog
+}
+
+rh_status_q() {
+    rh_status >/dev/null 2>&1
+}
+
+
+case "$1" in
+    start)
+        rh_status_q && exit 0
+        $1
+        ;;
+    stop)
+        rh_status_q || exit 0
+        $1
+        ;;
+    restart)
+        $1
+        ;;
+    reload)
+        rh_status_q || exit 7
+        $1
+        ;;
+    force-reload)
+        force_reload
+        ;;
+    status)
+        rh_status
+        ;;
+    condrestart|try-restart)
+        rh_status_q || exit 0
+        restart
+        ;;
+    *)
+        echo $"Usage: $0
+{start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+        exit 2
+esac
+exit $?
+
diff --git a/gvrpcd-fedora.sysconfig b/gvrpcd-fedora.sysconfig
new file mode 100644
index 0000000..97456e1
--- /dev/null
+++ b/gvrpcd-fedora.sysconfig
@@ -0,0 +1,9 @@
+# Default configuration values for gvrpcd can be overridden here.
+
+# interface - this specifies the interfaces the GVRP daemon will operate on.
+# You can specify multiple interfaces here, seperated by
+# spaces. This is mandatory.
+interfaces="eth0"
+
+# Specify other options to pass to gvrpcd. See: gvrpcd -h.
+#gvrpcd_options=""


--- NEW FILE gvrpcd.spec ---
Name:           gvrpcd
Version:        1.3
Release:        2%{?dist}
Summary:        A program for announcing VLANs using GVRP

Group:          System Environment/Daemons
License:        GPLv2
URL:            http://sokrates.mimuw.edu.pl/~sebek/gvrpcd/
Source0:        http://sokrates.mimuw.edu.pl/~sebek/%{name}/%{name}-%{version}.tar.gz
Patch0:         gvrpcd-fedora.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  libnet-devel

Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
# This is for /sbin/service
Requires(preun): /sbin/service


%description
gvrpcd implements end-node GVRP functionality as a user-space daemon.
It generates periodically GVRP "JOIN" packets with information about
VLANs that server has defined on given NIC, or more generically - that it
wants to be able to connect to.


%post
# This adds the proper /etc/rc*.d links for the script
/sbin/chkconfig --add gvrpcd


%preun
if [ $1 = 0 ] ; then
    /sbin/service gvrpcd stop >/dev/null 2>&1
    /sbin/chkconfig --del gvrpcd
fi


%prep
%setup -q
%patch0 -p1

%build
make %{?_smp_mflags} CFLAGS="%{optflags}"


%install
rm -rf $RPM_BUILD_ROOT
install -p -D -m0755 gvrpcd $RPM_BUILD_ROOT%{_sbindir}/gvrpcd
install -p -D -m0755 gvrpcd-fedora.init $RPM_BUILD_ROOT%{_initrddir}/gvrpcd
install -p -D -m0644 gvrpcd-fedora.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/gvrpcd


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING README
%{_sbindir}/gvrpcd
%{_initrddir}/gvrpcd
%config(noreplace) %{_sysconfdir}/sysconfig/gvrpcd


%changelog
* Fri May 15 2009 Jasper Capel <jasper at fedoraproject.org> - 1.3-2
- Depend on /sbin/service and /sbin/chkconfig instead of initscripts and
  chkconfig.
* Thu May 14 2009 Jasper Capel <jasper at fedoraproject.org> - 1.3-1
- Release bump
* Wed May 13 2009 Jasper Capel <jasper at fedoraproject.org> - 1.2-3
- Included Jeroen van Meeuwen's patch to eliminate a compiler-time warning
* Sat Apr 18 2009 Jasper Capel <jasper at fedoraproject.org> - 1.2-2
- Corrected source URL
- Fixed typo in initscript description
- Fail with the "config missing" error code if /proc/net/vlan/config does not exist.
* Fri Apr 03 2009 Jasper Capel <jasper at fedoraproject.org> - 1.2-1
- Release bump
- Init script is now multiple interfaces aware
* Tue Mar 03 2009 Jasper Capel <jasper at fedoraproject.org> - 1.1-3
- Added a Fedora-compliant init-script
- Fixed sysconfig-file permissions
* Wed Feb 25 2009 Jasper Capel <jasper at fedoraproject.org> - 1.1-2
- Preserve timestamps when installing files
- Use global compiler flags
* Tue Feb 24 2009 Jasper Capel <jasper at fedoraproject.org> - 1.1-1
- Initial build



--- NEW FILE import.log ---
gvrpcd-1_3-2_fc11:HEAD:gvrpcd-1.3-2.fc11.src.rpm:1242486810


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gvrpcd/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	15 May 2009 23:42:21 -0000	1.1
+++ .cvsignore	16 May 2009 15:13:46 -0000	1.2
@@ -0,0 +1 @@
+gvrpcd-1.3.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gvrpcd/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	15 May 2009 23:42:21 -0000	1.1
+++ sources	16 May 2009 15:13:46 -0000	1.2
@@ -0,0 +1 @@
+7cb76832e139520c0cbdae31b723c3f4  gvrpcd-1.3.tar.gz




More information about the scm-commits mailing list