rpms/lldpad/F-12 lldpad-0.9.19-init-lsb.patch, NONE, 1.1 lldpad-0.9.7-init.patch, NONE, 1.1 lldpad-0.9.7-make.patch, NONE, 1.1 lldpad.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Jan Zeleny jzeleny at fedoraproject.org
Mon Mar 1 12:23:38 UTC 2010


Author: jzeleny

Update of /cvs/extras/rpms/lldpad/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23463

Modified Files:
	.cvsignore sources 
Added Files:
	lldpad-0.9.19-init-lsb.patch lldpad-0.9.7-init.patch 
	lldpad-0.9.7-make.patch lldpad.spec 
Log Message:
initial commit

lldpad-0.9.19-init-lsb.patch:
 lldpad.init |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

--- NEW FILE lldpad-0.9.19-init-lsb.patch ---
--- lldpad-0.9.26/lldpad.init.orig	2010-02-25 10:32:30.000000000 +0100
+++ lldpad-0.9.26/lldpad.init	2010-02-25 10:52:52.000000000 +0100
@@ -151,12 +151,14 @@
 # See how we were called.
 case "$1" in
 	start)
+		[ "$EUID" = "0" ] || exit 4
 		echo -n $"Starting $LLDPAD: "
 		start_daemon $LLDPAD_BIN -d $OPTIONS
 		rc_status -v
 		[ $? -eq 0 ] && touch /var/lock/subsys/lldpad
 		;;
 	stop)
+		[ "$EUID" = "0" ] || exit 4
 		echo -n $"Shutting down $LLDPAD: "
 		killproc $LLDPAD
 		rc_status -v
@@ -177,6 +179,14 @@
 		
 		# NOTE: checkproc returns LSB compliant status values.
 		checkproc $LLDPAD_BIN
+		RC=$?
+		if [ "$RC" = "3" -a -f /var/lock/subsys/lldpad ]; then
+			rc_failed 2
+		elif [ "$RC" = "3" ]; then
+			rc_failed 3
+		elif [ "$RC" = "1" ]; then
+			rc_failed 1
+		fi
 		# NOTE: rc_status knows that we called this init script with
 		# "status" option and adapts its messages accordingly.
 		rc_status -v
@@ -236,9 +246,13 @@
 		rc_failed 3
 		rc_status -v
 		;;
+	usage)
+		echo $"Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
+		exit 0
+	;;
 	*)
        		echo $"Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
-		exit 1
+		exit 2
 esac
 
 rc_exit

lldpad-0.9.7-init.patch:
 lldpad.init |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- NEW FILE lldpad-0.9.7-init.patch ---
diff -Nurp dcbd-0.9.7-current/dcbd.init dcbd-0.9.7-corrected/dcbd.init
--- dcbd-0.9.7-current/lldpad.init	2009-03-11 17:51:59.000000000 +0100
+++ dcbd-0.9.7-corrected/lldpad.init	2009-03-11 18:19:10.000000000 +0100
@@ -33,15 +33,16 @@
 # lldpad	This shell script takes care of starting and stopping
 #		lldpad (including DCB capabilities exchange protocol)
 #
-# chkconfig: 345 20 80
+# chkconfig: - 20 80
 # description: Data Center Bridging Exchange protocol daemon
 #
 ### BEGIN INIT INFO
 # Provides: lldpad
 # Required-Start: network
 # Required-Stop:
-# Default-Start: 3 5
+# Default-Start:
 # Default-Stop:
+# Short-Description: Data Center Bridging Exchange protocol daemon
 # Description: Data Center Bridging Exchange protocol daemon
 ### END INIT INFO
 

lldpad-0.9.7-make.patch:
 Makefile.am |    1 +
 Makefile.in |    1 +
 2 files changed, 2 insertions(+)

--- NEW FILE lldpad-0.9.7-make.patch ---
--- lldpad-0.9.26/Makefile.am.orig	2010-02-25 11:11:35.000000000 +0100
+++ lldpad-0.9.26/Makefile.am	2010-02-25 11:10:19.000000000 +0100
@@ -28,6 +28,7 @@
 ## system has a shared libconfig, use it
 AM_CFLAGS = $(LIBCONFIG_CFLAGS)
 AM_LDFLAGS = $(LIBCONFIG_LIBS)
+lldpad_LDFLAGS = $(LIBCONFIG_LIBS)
 endif
 
 ## header files to be installed, for programs using the client interface to lldpad 
--- lldpad-0.9.26/Makefile.in.orig	2010-02-25 11:12:19.000000000 +0100
+++ lldpad-0.9.26/Makefile.in	2010-02-25 11:13:00.000000000 +0100
@@ -296,6 +296,7 @@
 @BUILTIN_LIBCONFIG_TRUE at lldptool_LDADD = libconfig-1.3.2/libconfig.la
 @BUILTIN_LIBCONFIG_FALSE at AM_CFLAGS = $(LIBCONFIG_CFLAGS)
 @BUILTIN_LIBCONFIG_FALSE at AM_LDFLAGS = $(LIBCONFIG_LIBS)
+ at BUILTIN_LIBCONFIG_FALSE@lldpad_LDFLAGS = $(LIBCONFIG_LIBS)
 lldpad_includedir = ${includedir}/lldpad
 lldpad_include_HEADERS = include/dcb_types.h include/dcbtool.h \
 include/dcb_osdep.h include/clif.h include/lldp_dcbx_cmds.h include/common.h \


--- NEW FILE lldpad.spec ---
Name:           lldpad
Version:        0.9.26
Release:        2%{?dist}
Summary:        Intel LLDP Agent

Group:          System Environment/Daemons
License:        GPLv2
URL:            http://e1000.sourceforge.net
Source0:        http://downloads.sourceforge.net/project/e1000/DCB%20Tools/%{name}/%{version}/%{name}-%{version}.tar.gz
# Patch updating Makefile.am and Makefile.in, so the package is compiled with system libconfig
Patch0:         lldpad-0.9.7-make.patch
# Update of init script header
Patch1:         lldpad-0.9.7-init.patch
# Patch modifying the init script, so the return codes match LSB
Patch2:         lldpad-0.9.19-init-lsb.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires:         kernel >= 2.6.31
BuildRequires:    libconfig-devel >= 1.3.2 kernel-headers >= 2.6.31
Requires(post):   chkconfig
Requires(preun):  chkconfig initscripts
Requires(postun): initscripts
Provides:         dcbd = %{version}-%{release}
Obsoletes:        dcbd < 0.9.26

%description
This package contains the Linux user space daemon and configuration tool for
Intel LLDP Agent with Enhanced Ethernet support for the Data Center.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    devel
The %{name}-devel package contains header files for developing applications
that use %{name}.

%prep
%setup -q
%patch0 -p1 -b .make
%patch1 -p1 -b .init
%patch2 -p1 -b .init-lsb


%build
%configure
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_initddir}
mv %{buildroot}/etc/init.d/%{name} %{buildroot}%{_initddir}
rm -rf %{buildroot}/etc/init.d
rm -f %{buildroot}%{_mandir}/man8/dcbd.8


%clean
rm -rf %{buildroot}


%post
/sbin/chkconfig --add %{name}

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

%postun
if [ "$1" -ge "1" ]; then
        /sbin/service %{name} condrestart > /dev/null  2>&1 || :
fi


%files
%defattr(-,root,root,-)
%doc COPYING README ChangeLog
%{_sbindir}/*
%dir %{_sharedstatedir}/%{name}
%{_initddir}/%{name}
%{_mandir}/man8/*

%files devel
%defattr(-,root,root,-)
%doc COPYING
%doc README
%{_includedir}/*
%{_libdir}/pkgconfig/*.pc


%changelog
* Fri Feb 26 2010 Jan Zeleny <jzeleny at redhat.com> - 0.9.26-2
- updated spec file and LSB init script patch for re-review
  (#568641)
* Thu Feb 25 2010 Jan Zeleny <jzeleny at redhat.com> - 0.9.26-1
- rebased to 0.9.26
- package renamed to lldpad
- enahanced functionality (LLDP supported as well as DCBX)

* Fri Nov 13 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.19-2
- init script patch adding LSB compliance

* Thu Oct 08 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.19-1
- update to new upstream version

* Mon Oct 05 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.15-5
- replaced the last patch, which was not fully functional, with
  the new one

* Wed Sep 09 2009 Karsten Hopp <karsten at redhat.com> 0.9.15-4
- buildrequire libconfig-devel >= 1.3.2, it doesn't build with 1.3.1 due to
  the different config_lookup_string api

* Thu Aug 20 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.15-3
- update of config_lookup_string() function calls

* Thu Aug 20 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.15-2
- rebuild in order to match new libconfig

* Mon Aug 17 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.15-1
- rebase to 0.9.15

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Mar 20 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.7-4
- updated scriptlets in spec file to follow the rules

* Wed Mar 11 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.7-3
- added devel files again to support fcoe-utils package
- added kernel >= 2.6.29 to Requires, deleted dcbnl.h, since it is
  aviable in kernel 2.6.29-rc7
- changed config dir from /etc/sysconfig/dcbd to /etc/dcbd
- updated init script: added mandatory Short description tag,
  deleted default runlevels, which should start the script

* Tue Mar 10 2009 Jan Zeleny <jzeleny at redhat.com> - 0.9.7-2
- added patch to enable usage of libconfig shared in system
- removed devel part of package

* Mon Mar 2 2009 Chris Leech <christopher.leech at intel.com> - 0.9.7-1
- Updated to 0.9.7
- Added a private copy of dcbnl.h until kernel-headers includes it.
  Export patch is making it's way to the upstream kernel via net-2.6,
  expected in 2.6.29-rc7

* Thu Feb 26 2009 Chris Leech <christopher.leech at intel.com> - 0.9.5-1
- initial RPM packaging



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/lldpad/F-12/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	26 Feb 2010 18:01:01 -0000	1.1
+++ .cvsignore	1 Mar 2010 12:23:38 -0000	1.2
@@ -0,0 +1 @@
+lldpad-0.9.26.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/lldpad/F-12/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	26 Feb 2010 18:01:02 -0000	1.1
+++ sources	1 Mar 2010 12:23:38 -0000	1.2
@@ -0,0 +1 @@
+96cfc9310336ad7f2614722146033857  lldpad-0.9.26.tar.gz



More information about the scm-commits mailing list