[ladvd: 2/3] - version 1.0.0 - spec: - drop patch for GCC issue fixed upstream - drop BuildRoot: tag - unit f
Tomasz Torcz
ttorcz at fedoraproject.org
Tue Jan 24 14:23:39 UTC 2012
commit 72af8b974689918415f25acb5f82c09f23707c5c
Author: Tomasz Torcz <tomek at pipebreaker.pl>
Date: Tue Jan 24 15:18:53 2012 +0100
- version 1.0.0
- spec:
- drop patch for GCC issue fixed upstream
- drop BuildRoot: tag
- unit file:
- remove StandardOutput=syslog (it is default now)
- add "-z" option, to have upstream switch name put in interface's ifAlias
ladvd-0.9.2-add-attribute-unused-to-tlv.patch | 36 ----------
ladvd.service | 3 +-
ladvd.spec | 86 +++++++++++++++++++-----
3 files changed, 69 insertions(+), 56 deletions(-)
---
diff --git a/ladvd.service b/ladvd.service
index b9a225e..b8623bc 100644
--- a/ladvd.service
+++ b/ladvd.service
@@ -6,9 +6,8 @@ Description=uses CDP / LLDP frames to inform switches about connected hosts
Requires=network.target
[Service]
-ExecStart=/usr/sbin/ladvd -f -a
+ExecStart=/usr/sbin/ladvd -f -a -z
PIDFile=/var/run/ladvd.pid
-StandardOutput=syslog
[Install]
WantedBy=multi-user.target
diff --git a/ladvd.spec b/ladvd.spec
index 04d215f..f14b321 100644
--- a/ladvd.spec
+++ b/ladvd.spec
@@ -1,29 +1,31 @@
%global uid 47
%global username ladvd
-%global homedir /tmp
-%global gecos CDP/LLDP sender for unix
+%global homedir %{_localstatedir}/run/%{name}
+%global gecos CDP/LLDP sender for UNIX
%define selinux_variants mls strict targeted
%global selinux_policyver %(%{__sed} -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp || echo 0.0.0)
%define modulename ladvd
Name: ladvd
-Version: 0.8
-Release: 2%{?dist}
-Summary: CDP/LLDP sender for unix
+Version: 1.0.0
+Release: 1%{?dist}
+Summary: CDP/LLDP sender for UNIX
Group: Applications/Internet
License: ISC
URL: http://www.blinkenlights.nl/software/ladvd/
Source0: http://www.blinkenlights.nl/software/ladvd/ladvd-%{version}.tar.gz
-Source1: ladvd.sysconfig
-Source2: ladvd.init
+Source1: ladvd.service
+Source2: ladvd.tmpfiles
Source3: %{modulename}.te
Source4: %{modulename}.fc
Source5: %{modulename}.if
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libevent-devel
+BuildRequires: libcap-ng-devel
+BuildRequires: libpcap-devel
+BuildRequires: pkgconfig
%bcond_without fedora
BuildRequires: fedora-usermgmt-devel
@@ -35,11 +37,13 @@ Provides: user(%username) = %uid
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
+Requires: systemd-units
+Requires: initscripts
%description
-ladvd uses cdp / lldp frames to inform switches about connected hosts, which
-simplifies ethernet switch management. Every 30 seconds it will transmit CDP/
+ladvd uses CDP / LLDP frames to inform switches about connected hosts, which
+simplifies Ethernet switch management. Every 30 seconds it will transmit CDP/
LLDP packets reflecting the current system state. Interfaces (bridge, bonding,
wireless), capabilities (bridging, forwarding, wireless) and addresses (IPv4,
IPv6) are detected dynamically.
@@ -86,8 +90,12 @@ cd -
rm -rf %{buildroot}
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}
+mkdir -p %{buildroot}%{_libdir}/../lib/tmpfiles.d
+install -m 0644 %{SOURCE2} %{buildroot}%{_libdir}/../lib/tmpfiles.d/%{name}.conf
+mkdir -p %{buildroot}%{_unitdir}
+cp -p %SOURCE1 %{buildroot}%{_unitdir}
+
cd SELinux
for selinuxvariant in %{selinux_variants}
@@ -112,8 +120,7 @@ rm -rf %{buildroot}
%post
-/sbin/chkconfig --add %{name}
-
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%preun
if [ $1 = 0 ]; then
@@ -148,14 +155,22 @@ done
/sbin/restorecon -R %{_localstatedir}/cache/myapp &> /dev/null || :
fi
+%triggerun -- ladvd < 0.9.2-2
+if /sbin/chkconfig --level 3 ladvd ; then
+ /bin/systemctl enable ladvd.service >/dev/null 2>&1 || :
+fi
+
%files
%defattr(-,root,root,-)
%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}
+%{_libdir}/../lib/tmpfiles.d/%{name}.conf
+%{_unitdir}/%{name}.service
%files selinux
@@ -165,6 +180,41 @@ fi
%changelog
+* Mon Jan 24 2012 Tomasz Torcz <ttorcz at fedoraproject.org> - 1.0.0-1
+- version 1.0.0
+- spec:
+ - drop patch for GCC issue fixed upstream
+ - drop BuildRoot: tag
+- unit file:
+ - remove StandardOutput=syslog (it is default now)
+ - add "-z" option, to have upstream switch name put in interface's ifAlias
+
+* Mon Aug 15 2011 Tomasz Torcz <ttorcz at fedoraproject.org> - 0.9.2-6
+- remove sysconfig mention from unit file
+
+* Sat Aug 13 2011 Tomasz Torcz <ttorcz at fedoraproject.org> - 0.9.2-5
+- place tmpfiles.d conf in /usr/lib/tmpfiles.d
+- drop SysV init script and sysconfig file
+
+* Fri May 6 2011 Tomasz Torcz <ttorcz at fedoraproject.org> - 0.9.2-4
+- Fix systemd-related scriptlets (from Bill Nottingham):
+
+ - since we install a systemd service file, run 'systemctl daemon-reload'
+ - chkconfig without a level forwards to systemctl, which is not useful for
+ SysV migrations. Pass an explicit level.
+
+* Sun Feb 13 2011 Tomasz Torcz <ttorcz at fedoraproject.org> - 0.9.2-3
+- fix FTBFS caused by -Werror=unused-but-set-variable
+
+* Sun Feb 13 2011 Tomasz Torcz <ttorcz at fedoraproject.org> - 0.9.2-2
+- provide systemd and tmpfiles integration bits
+
+* 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
+
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list