0.9.41 bump
Spec cleanup, BR changes, scriptlets sanitization
This commit is contained in:
parent
58bd133a89
commit
14868abda1
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
lldpad-0.9.38.tar.gz
|
||||
/lldpad-0.9.41.tar.bz2
|
||||
|
@ -1,53 +0,0 @@
|
||||
--- lldpad-0.9.38/lldpad.init.orig 2010-06-23 10:52:43.000000000 +0200
|
||||
+++ lldpad-0.9.38/lldpad.init 2010-06-23 11:01:02.000000000 +0200
|
||||
@@ -151,6 +151,7 @@
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
+ [ "$EUID" = "0" ] || exit 4
|
||||
echo -n $"Starting $LLDPAD: "
|
||||
$LLDPAD_BIN -k
|
||||
start_daemon $LLDPAD_BIN -d $OPTIONS
|
||||
@@ -158,6 +159,7 @@
|
||||
[ $? -eq 0 ] && touch /var/lock/subsys/lldpad
|
||||
;;
|
||||
stop)
|
||||
+ [ "$EUID" = "0" ] || exit 4
|
||||
echo -n $"Shutting down $LLDPAD: "
|
||||
killproc $LLDPAD
|
||||
rc_status -v
|
||||
@@ -166,6 +168,19 @@
|
||||
status)
|
||||
echo -n "Checking for service $LLDPAD: "
|
||||
p=`pidof $LLDPAD`
|
||||
+ RC=$?
|
||||
+ if [ "$RC" = "1" ]; then
|
||||
+ echo "stopped"
|
||||
+ if [ -f /var/lock/subsys/lldpad ]; then
|
||||
+ rc_failed 2
|
||||
+ elif [ -f /var/run/lldpad.pid ]; then
|
||||
+ rc_failed 1
|
||||
+ else
|
||||
+ rc_failed 3
|
||||
+ fi
|
||||
+ else
|
||||
+ echo "running"
|
||||
+ fi
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart|condrestart)
|
||||
@@ -226,9 +238,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
|
@ -1,39 +0,0 @@
|
||||
--- lldpad-0.9.29/Makefile.am.make 2010-03-09 20:09:09.000000000 +0100
|
||||
+++ lldpad-0.9.29/Makefile.am 2010-03-15 10:01:56.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
|
||||
@@ -101,9 +102,6 @@
|
||||
|
||||
install-data-hook:
|
||||
/sbin/chkconfig --add lldpad || true
|
||||
- ## provide legacy support for apps that use the old dcbd interface.
|
||||
- test -e $(includedir)/dcbd || `ln -T -s $(includedir)/lldpad $(includedir)/dcbd`
|
||||
- test -e $(includedir)/dcbd/clif_cmds.h || `ln -T -s $(includedir)/lldpad/lldp_dcbx_cmds.h $(includedir)/dcbd/clif_cmds.h`
|
||||
|
||||
uninstall-local:
|
||||
/sbin/chkconfig --del lldpad || true
|
||||
--- lldpad-0.9.29/Makefile.in.make 2010-03-09 20:09:22.000000000 +0100
|
||||
+++ lldpad-0.9.29/Makefile.in 2010-03-15 10:01:45.000000000 +0100
|
||||
@@ -289,6 +289,7 @@
|
||||
@BUILTIN_LIBCONFIG_TRUE@lldptool_LDADD = libconfig-1.3.2/libconfig.la
|
||||
@BUILTIN_LIBCONFIG_FALSE@AM_CFLAGS = $(LIBCONFIG_CFLAGS)
|
||||
@BUILTIN_LIBCONFIG_FALSE@AM_LDFLAGS = $(LIBCONFIG_LIBS)
|
||||
+@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 \
|
||||
@@ -1092,8 +1093,6 @@
|
||||
|
||||
install-data-hook:
|
||||
/sbin/chkconfig --add lldpad || true
|
||||
- test -e $(includedir)/dcbd || `ln -T -s $(includedir)/lldpad $(includedir)/dcbd`
|
||||
- test -e $(includedir)/dcbd/clif_cmds.h || `ln -T -s $(includedir)/lldpad/lldp_dcbx_cmds.h $(includedir)/dcbd/clif_cmds.h`
|
||||
|
||||
uninstall-local:
|
||||
/sbin/chkconfig --del lldpad || true
|
19
lldpad-0.9.41-init.patch
Normal file
19
lldpad-0.9.41-init.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- lldpad-0.9.41/lldpad.init 2011-01-11 03:35:01.000000000 +0100
|
||||
+++ lldpad-0.9.41/lldpad.init.new 2011-02-04 10:05:37.414483161 +0100
|
||||
@@ -33,14 +33,14 @@
|
||||
# lldpad This shell script takes care of starting and stopping
|
||||
# lldpad (including DCB capabilities exchange protocol)
|
||||
#
|
||||
-# chkconfig: - 20 80
|
||||
+# chkconfig: 2345 20 80
|
||||
# description: Link Layer Discovery Protocol Agent Daemon
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: lldpad
|
||||
# Required-Start: network
|
||||
# Required-Stop:
|
||||
-# Default-Start:
|
||||
+# Default-Start: 3 5
|
||||
# Default-Stop:
|
||||
# Short Description: Link Layer Discovery Protocol Agent Daemon
|
||||
# Description: Link Layer Discovery Protocol Agent Daemon
|
11
lldpad-0.9.41-lldptool-invalid-pointer.patch
Normal file
11
lldpad-0.9.41-lldptool-invalid-pointer.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- lldpad-0.9.41/clif.c 2011-01-11 03:35:01.000000000 +0100
|
||||
+++ lldpad-0.9.41/clif.c.new 2011-02-04 10:20:27.639483158 +0100
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
/* Allocate maximum buffer usage */
|
||||
if (tlvs_hex && attach) {
|
||||
- buf = malloc(sizeof(char)*(strlen(tlvs_hex) + 1));
|
||||
+ buf = malloc(sizeof(char)*(strlen(tlvs_hex) + 2));
|
||||
sprintf(buf, "%s%s","A",tlvs_hex);
|
||||
} else if (attach) {
|
||||
buf = malloc(sizeof(char) * 2);
|
12
lldpad-0.9.41-make.patch
Normal file
12
lldpad-0.9.41-make.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- lldpad-0.9.41/Makefile.am 2011-01-11 03:35:01.000000000 +0100
|
||||
+++ lldpad-0.9.41/Makefile.am.new 2011-02-04 10:11:55.904482987 +0100
|
||||
@@ -86,9 +86,6 @@
|
||||
|
||||
install-data-hook:
|
||||
/sbin/chkconfig --add lldpad || true
|
||||
- ## provide legacy support for apps that use the old dcbd interface.
|
||||
- test -e $(includedir)/dcbd || `ln -T -s $(includedir)/lldpad $(includedir)/dcbd`
|
||||
- test -e $(includedir)/dcbd/clif_cmds.h || `ln -T -s $(includedir)/lldpad/lldp_dcbx_cmds.h $(includedir)/dcbd/clif_cmds.h`
|
||||
|
||||
uninstall-local:
|
||||
/sbin/chkconfig --del lldpad || true
|
@ -1,22 +0,0 @@
|
||||
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: Link Layer Discovery Protocol Agent Daemon
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: lldpad
|
||||
# Required-Start: network
|
||||
# Required-Stop:
|
||||
-# Default-Start: 3 5
|
||||
+# Default-Start:
|
||||
# Default-Stop:
|
||||
+# Short-Description: Link Layer Discovery Protocol Agent Daemon
|
||||
# Description: Link Layer Discovery Protocol Agent Daemon
|
||||
### END INIT INFO
|
||||
|
54
lldpad.spec
54
lldpad.spec
@ -1,23 +1,22 @@
|
||||
Name: lldpad
|
||||
Version: 0.9.38
|
||||
Release: 2%{?dist}
|
||||
Version: 0.9.41
|
||||
Release: 1%{?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
|
||||
# - also data hooks were removed for clean build
|
||||
Patch0: lldpad-0.9.29-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)
|
||||
URL: http://open-lldp.org/
|
||||
# Source is a git snapshot, git://open-lldp.org/lldp-open-lldp.git
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Patch0: lldpad-0.9.41-init.patch
|
||||
Patch1: lldpad-0.9.41-make.patch
|
||||
Patch2: lldpad-0.9.41-lldptool-invalid-pointer.patch
|
||||
|
||||
Requires: kernel >= 2.6.32
|
||||
BuildRequires: libconfig-devel >= 1.3.2 kernel-headers >= 2.6.32
|
||||
BuildRequires: flex >= 2.5.33
|
||||
BuildRequires: automake autoconf libtool
|
||||
BuildRequires: libnl-devel libnl
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig initscripts
|
||||
Requires(postun): initscripts
|
||||
@ -40,30 +39,25 @@ The %{name}-devel package contains header files for developing applications
|
||||
that use %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -c -n %{name}-%{version}
|
||||
%patch0 -p1 -b .make
|
||||
%patch1 -p1 -b .init
|
||||
%patch2 -p1 -b .init-lsb
|
||||
|
||||
|
||||
%build
|
||||
./bootstrap.sh
|
||||
%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}
|
||||
|
||||
@ -80,12 +74,20 @@ fi
|
||||
|
||||
%post devel
|
||||
## provide legacy support for apps that use the old dcbd interface.
|
||||
test -e %{_includedir}/dcbd || `ln -T -s %{_includedir}/lldpad %{_includedir}/dcbd`
|
||||
test -e %{_includedir}/dcbd/clif_cmds.h || `ln -T -s %{_includedir}/lldpad/lldp_dcbx_cmds.h %{_includedir}/dcbd/clif_cmds.h`
|
||||
if [ ! -e %{_includedir}/dcbd ]; then
|
||||
ln -T -s %{_includedir}/lldpad %{_includedir}/dcbd
|
||||
fi
|
||||
if [ ! -e %{_includedir}/dcbd/clif_cmds.h ]; then
|
||||
ln -T -s %{_includedir}/lldpad/lldp_dcbx_cmds.h %{_includedir}/dcbd/clif_cmds.h
|
||||
fi
|
||||
|
||||
%preun devel
|
||||
test -e %{_includedir}/dcbd/clif_cmds.h && `rm -f %{_includedir}/dcbd/clif_cmds.h`
|
||||
test -e %{_includedir}/dcbd && `rm -f %{_includedir}/dcbd`
|
||||
if [ -e %{_includedir}/dcbd/clif_cmds.h ]; then
|
||||
rm -f %{_includedir}/dcbd/clif_cmds.h
|
||||
fi
|
||||
if [ -e %{_includedir}/dcbd ]; then
|
||||
rm -f %{_includedir}/dcbd
|
||||
fi
|
||||
|
||||
|
||||
%files
|
||||
@ -105,6 +107,12 @@ test -e %{_includedir}/dcbd && `rm -f %{_includedir}/dcbd`
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Feb 10 2011 Petr Sabata <psabata@redhat.com>
|
||||
- 0.9.41 bump
|
||||
- New BR: autotools, flex
|
||||
- Buildroot garbage removed
|
||||
- Devel post and preun scriptlets sanitized
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.38-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user