[cgdcbxd/f17] Resolves: bz 835170

Neil Horman nhorman at fedoraproject.org
Wed Aug 8 16:57:32 UTC 2012


commit 3be970393460acc22f51b01cbc01f32ed69969fe
Author: Neil Horman <nhorman at tuxdriver.com>
Date:   Wed Aug 8 12:57:13 2012 -0400

    Resolves: bz 835170

 .gitignore      |    1 +
 cgdcbxd.service |   10 +++++++
 cgdcbxd.spec    |   71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources         |    1 +
 4 files changed, 83 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..3f54888 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/jrfastab-cgdcbxd-v1.0.1-0-g87bd754.tar.gz
diff --git a/cgdcbxd.service b/cgdcbxd.service
new file mode 100644
index 0000000..d773423
--- /dev/null
+++ b/cgdcbxd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=cgdcbxd daemon
+After=syslog.target
+
+[Service]
+ExecStart=/usr/sbin/cgdcbxd -n
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/cgdcbxd.spec b/cgdcbxd.spec
new file mode 100644
index 0000000..b20f7aa
--- /dev/null
+++ b/cgdcbxd.spec
@@ -0,0 +1,71 @@
+Name:		cgdcbxd
+Version:	1.0.1
+Release:	1%{?dist}
+Summary:	DCB network priority management daemon	
+Group:		System Environment/Base
+License:	GPLv2
+URL:		https://github.com/jrfastab/cgdcbxd
+
+# The source for this package was pullled from upstreams vcs.  Specifically it
+# was pulled from the projects github site using the following dynamic tarball
+# generating url:
+# https://github.com/jrfastab/cgdcbxd/zipball/v1.0.1
+Source0:	jrfastab-%{name}-v%{version}-0-g87bd754.tar.gz
+
+# The service file was created locally for the fedora project, but will be sent
+# upstream shortly
+Source1:	%{name}.service
+BuildRequires:	libcgroup-devel libmnl-devel libtool systemd-units
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+
+%description
+This is a daemon to manage the priority of network traffic in dcb enabled
+environments.  By using the information exchanged over the dcbx protocol on a
+LAN, this package will enforce network priority on running applications on your
+host using the net_prio cgroup
+
+%prep
+%setup -q -n jrfastab-cgdcbxd-87bd754
+
+%build
+./bootstrap.sh
+%{configure}
+make
+
+%install
+make DESTDIR=$RPM_BUILD_ROOT install
+rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}
+install -D -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/cgdcbxd.service
+
+%files
+%doc COPYING
+%{_unitdir}/cgdcbxd.service
+%{_mandir}/man8/*
+%{_sbindir}/*
+
+%post
+if [ $1 -eq 1 ] ; then 
+	# Initial installation 
+	/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+
+%preun
+if [ $1 -eq 0 ] ; then
+	# Package removal, not upgrade
+	/bin/systemctl --no-reload disable cgdcbxd.service > /dev/null 2>&1 ||
+:
+	/bin/systemctl stop cgdcbxd.service > /dev/null 2>&1 || :
+fi
+
+%postun
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+	# Package upgrade, not uninstall
+	/bin/systemctl try-restart cgdcbxd.service >/dev/null 2>&1 || :
+fi
+
+%changelog
+* Mon Jun 25 2012 Neil Horman <nhorman at tuxdriver.com> 1.0.1-1 
+- Initial build
diff --git a/sources b/sources
index e69de29..9c27a9e 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+385af753412644ed4e1c2bfdafe98b66  jrfastab-cgdcbxd-v1.0.1-0-g87bd754.tar.gz


More information about the scm-commits mailing list