[ladvd/f14/master] - new upstream version 0.9.2 - package ladvdc - client command - simplify initscript, rely on protoc

Tomasz Torcz ttorcz at fedoraproject.org
Sun Feb 13 15:03:48 UTC 2011


commit 8b9d8cc5a58003c52c8928884113ba3f27be96cf
Author: Tomasz Torcz <zdzichu at irc.pl>
Date:   Sun Feb 13 15:59:25 2011 +0100

    - new upstream version 0.9.2
    - package ladvdc - client command
    - simplify initscript, rely on protocol autodetection like upstream suggests
    - move homedir to /var/run/ladvd

 ladvd.init      |   17 +++--------------
 ladvd.spec      |   20 ++++++++++++++++----
 ladvd.sysconfig |   25 ++++++-------------------
 sources         |    2 +-
 4 files changed, 26 insertions(+), 38 deletions(-)
---
diff --git a/ladvd.init b/ladvd.init
index 3e3ce1a..3a3eec2 100644
--- a/ladvd.init
+++ b/ladvd.init
@@ -13,6 +13,7 @@
 # Provides: ladvd
 # Required-Start: $local_fs $network
 # Required-Stop: $local_fs $network
+# Default-Stop:  1
 # Short-Description: start and stop cdp/lldp sender
 # Description: ladvd uses cdp / lldp frames to inform switches
 #  about connected hosts, which simplifies ethernet
@@ -28,24 +29,12 @@
 
 [ -r /etc/sysconfig/ladvd ] && . /etc/sysconfig/ladvd
 
-ARGS=""
-
-[ "$CDP" != "yes" ] && [ "$LLDP" != "yes" ] && \
-        echo "Need at least CDP or LDP activated" && \
-        exit 1
-
-[ "$CDP" == "yes" ] && ARGS=$ARGS" -c"
-[ "$LLDP" == "yes" ] && ARGS=$ARGS" -l"
-[ "$MGMT" != "" ] && ARGS=$ARGS" -m $MGMT"
-[ "$COUNTRY" != "" ] && ARGS=$ARGS" -C $COUNTRY"
-[ "$LOCATION" != "" ] && ARGS=$ARGS" -L $LOCATION"
-
 start() 
 {
-	[ -z "$ARGS" ] && exit 6
+	[ -z "$LADVD_OPTIONS" ] && exit 6
 
         echo -n $"Starting ladvd: "
-        daemon /usr/sbin/ladvd $ARGS $LADVDARGS
+        daemon /usr/sbin/ladvd $LADVD_OPTIONS
 	RETVAL=$?
         echo
 	[ $RETVAL = 0 ] && touch /var/lock/subsys/ladvd
diff --git a/ladvd.spec b/ladvd.spec
index e85418c..e991e2e 100644
--- a/ladvd.spec
+++ b/ladvd.spec
@@ -1,6 +1,6 @@
 %global uid 47
 %global username ladvd
-%global homedir /tmp
+%global homedir %{_localstatedir}/run/%{name}
 %global gecos CDP/LLDP sender for unix
 
 %define selinux_variants mls strict targeted
@@ -8,7 +8,7 @@
 %define modulename ladvd
 
 Name:           ladvd
-Version:        0.8
+Version:        0.9.2
 Release:        1%{?dist}
 Summary:        CDP/LLDP sender for unix
 
@@ -24,6 +24,8 @@ Source5:        %{modulename}.if
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libevent-devel
+BuildRequires:  pkgconfig
+BuildRequires:  libcap-ng-devel
 
 %bcond_without  fedora
 BuildRequires:  fedora-usermgmt-devel
@@ -88,6 +90,7 @@ make install DESTDIR=%{buildroot}
 rm -rf %{buildroot}%{_docdir}/ladvd
 install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
 install -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/%{name}
+mkdir -p %{buildroot}%{homedir}
 
 cd SELinux
 for selinuxvariant in %{selinux_variants}
@@ -154,8 +157,11 @@ fi
 %doc doc/ChangeLog doc/README doc/LICENSE doc/TODO
 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
 %{_initrddir}/%{name}
-%{_sbindir}/ladvd
-%{_mandir}/man8/ladvd.8*
+%{_sbindir}/%{name}
+%{_sbindir}/%{name}c
+%{_mandir}/man8/%{name}.8*
+%{_mandir}/man8/%{name}c.8*
+%ghost %attr(0755,root,root) %dir %{_localstatedir}/run/%{name}
 
 
 %files selinux
@@ -165,6 +171,12 @@ fi
 
 
 %changelog
+* Sun Feb 13 2011 Tomasz Torcz <ttorcz at fedoraproject.org> - 0.9.2-1
+- new upstream version 0.9.2
+- package ladvdc - client command
+- simplify initscript, rely on protocol autodetection like upstream suggests
+- move homedir to /var/run/ladvd
+
 * Wed Aug 26 2009 Andreas Thienemann <andreas at bawue.net> - 0.8-1
 - Rebase to new upstream release
 
diff --git a/ladvd.sysconfig b/ladvd.sysconfig
index eec9ec3..d4cfe37 100644
--- a/ladvd.sysconfig
+++ b/ladvd.sysconfig
@@ -1,19 +1,6 @@
-# Cisco Discovery Protocol
-CDP=no
-
-# Link Layer Discovery Protocol
-LLDP=no
-
-# Management adress for unnumbered interfaces
-# Can be specified for IPv4 and IPv6
-MGMT=
-
-# Two-letter ISO 3166 country code
-# (required for LLDP location support)
-COUNTRY=
-
-# The physical location of the server
-LOCATION=
-
-# Other arguments to ladvd
-LADVDARGS=
+# Arguments when starting ladvd. The most important one is:
+# -a	Auto-enable protocols based on received packets.
+#
+# Optionally a list of interfaces which ladvd should utilize can be supplied.
+#
+LADVD_OPTIONS="-a"
diff --git a/sources b/sources
index 93b58ce..1a5531e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9a80b45ac830faf0151d23623aed5494  ladvd-0.8.tar.gz
+54421aa74b2bc179dc08d42d8bb7307c  ladvd-0.9.2.tar.gz


More information about the scm-commits mailing list