Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
262f94d9d7 | ||
|
|
26e989b0ce | ||
|
|
41ade91633 |
5 changed files with 72 additions and 206 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,4 +1 @@
|
|||
netlabel_tools-0.19.tar.gz
|
||||
/netlabel_tools-0.20.tar.gz
|
||||
/netlabel_tools-0.21.tar.gz
|
||||
/netlabel_tools-0.30.0.tar.gz
|
||||
|
|
|
|||
34
netlabel_tools-0.17-new-hdrs.patch
Normal file
34
netlabel_tools-0.17-new-hdrs.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
diff -up netlabel_tools-0.19/Makefile.new-hdrs netlabel_tools-0.19/Makefile
|
||||
--- netlabel_tools-0.19/Makefile.new-hdrs 2009-01-05 22:24:24.000000000 +0100
|
||||
+++ netlabel_tools-0.19/Makefile 2010-06-16 13:36:55.170646610 +0200
|
||||
@@ -41,8 +41,9 @@ INSTALL_SBIN_DIR = $(INSTALL_PREFIX)/sbi
|
||||
INSTALL_BIN_DIR = $(INSTALL_PREFIX)/bin
|
||||
INSTALL_MAN_DIR = $(INSTALL_PREFIX)/share/man
|
||||
|
||||
-OWNER = root
|
||||
-GROUP = root
|
||||
+# Mock doesn't allow this.
|
||||
+# OWNER = root
|
||||
+# GROUP = root
|
||||
|
||||
#
|
||||
# targets
|
||||
@@ -70,15 +71,15 @@ install: $(SUBDIRS)
|
||||
@echo "INFO: installing files in $(INSTALL_PREFIX)"
|
||||
@mkdir -p $(INSTALL_SBIN_DIR)
|
||||
@mkdir -p $(INSTALL_MAN_DIR)/man8
|
||||
- @install -o $(OWNER) -g $(GROUP) -m 755 netlabelctl/netlabelctl \
|
||||
+ @install -m 755 netlabelctl/netlabelctl \
|
||||
$(INSTALL_SBIN_DIR)/netlabelctl
|
||||
- @install -o $(OWNER) -g $(GROUP) -m 644 docs/man/netlabelctl.8 \
|
||||
+ @install -m 644 docs/man/netlabelctl.8 \
|
||||
$(INSTALL_MAN_DIR)/man8
|
||||
|
||||
$(VERSION_HDR): version_info
|
||||
@echo "INFO: creating the version header file"
|
||||
@hdr="$(VERSION_HDR)"; \
|
||||
- . version_info; \
|
||||
+ . ./version_info; \
|
||||
echo "/* automatically generated - do not edit */" > $$hdr; \
|
||||
echo "#ifndef _VERSION_H" >> $$hdr; \
|
||||
echo "#define _VERSION_H" >> $$hdr; \
|
||||
|
|
@ -1,183 +1,56 @@
|
|||
Summary: Tools to manage the Linux NetLabel subsystem
|
||||
Name: netlabel_tools
|
||||
Version: 0.30.0
|
||||
Release: 21%{?dist}
|
||||
License: GPL-2.0-only
|
||||
URL: https://github.com/netlabel/netlabel_tools
|
||||
Source: https://github.com/netlabel/netlabel_tools/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: rhbz1683434.patch
|
||||
|
||||
Requires: libnl3
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc
|
||||
BuildRequires: kernel-headers
|
||||
BuildRequires: libnl3-devel
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: systemd
|
||||
Version: 0.19
|
||||
Release: 7%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Daemons
|
||||
URL: http://netlabel.sf.net/
|
||||
Source0: http://downloads.sourceforge.net/netlabel/%{name}-%{version}.tar.gz
|
||||
Source1: netlabel
|
||||
Source2: netlabel.rules
|
||||
Patch1: netlabel_tools-0.17-new-hdrs.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}
|
||||
BuildRequires: kernel-headers >= 2.6.18
|
||||
BuildRequires: libnl-devel
|
||||
|
||||
%description
|
||||
NetLabel is a kernel subsystem which implements explicit packet labeling
|
||||
protocols such as CIPSO for Linux. Packet labeling is used in secure networks
|
||||
to mark packets with the security attributes of the data they contain. This
|
||||
package provides the necessary user space tools to query and configure the
|
||||
kernel subsystem.
|
||||
protocols such as CIPSO and RIPSO for Linux. Packet labeling is used in
|
||||
secure networks to mark packets with the security attributes of the data they
|
||||
contain. This package provides the necessary user space tools to query and
|
||||
configure the kernel subsystem.
|
||||
|
||||
%prep
|
||||
%autosetup -p 1
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
# Build fixes.
|
||||
%patch1 -p1 -b .new-hdrs
|
||||
|
||||
%build
|
||||
%configure
|
||||
make V=1 %{?_smp_mflags}
|
||||
# Don't use _smp_mflags, it's small and a hand crafted Makefile
|
||||
make
|
||||
|
||||
%install
|
||||
rm -rf "%{buildroot}"
|
||||
mkdir -p "%{buildroot}/etc"
|
||||
mkdir -p "%{buildroot}/%{_sbindir}"
|
||||
mkdir -p "%{buildroot}/%{_unitdir}"
|
||||
mkdir -p "%{buildroot}/%{_mandir}"
|
||||
make V=1 DESTDIR="%{buildroot}" install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make INSTALL_PREFIX=${RPM_BUILD_ROOT} \
|
||||
INSTALL_MAN_DIR=${RPM_BUILD_ROOT}/usr/share/man \
|
||||
install
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
|
||||
install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/
|
||||
install -m 0640 %{SOURCE2} $RPM_BUILD_ROOT/etc/
|
||||
|
||||
# NOTE: disable since the tests require messing with the running kernel
|
||||
#%check
|
||||
#make V=1 check
|
||||
|
||||
%preun
|
||||
%systemd_preun netlabel.service
|
||||
|
||||
%postun
|
||||
%systemd_postun netlabel.service
|
||||
|
||||
%post
|
||||
%systemd_post netlabel.service
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license LICENSE
|
||||
%doc README
|
||||
%doc CHANGELOG
|
||||
%doc SUBMITTING_PATCHES
|
||||
%defattr(-,root,root)
|
||||
%doc docs/*.txt
|
||||
%attr(0755,root,root) /sbin/*
|
||||
%attr(0755,root,root) /etc/rc.d/init.d/netlabel
|
||||
%config(noreplace) %attr(640,root,root) /etc/netlabel.rules
|
||||
%attr(0644,root,root) %{_mandir}/man8/*
|
||||
%attr(0755,root,root) %{_sbindir}/netlabelctl
|
||||
%attr(0755,root,root) %{_sbindir}/netlabel-config
|
||||
%attr(0644,root,root) %{_unitdir}/netlabel.service
|
||||
%attr(0644,root,root) %config(noreplace) /etc/netlabel.rules
|
||||
|
||||
%changelog
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-21
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Fri Aug 02 2019 Paul Moore <paul@paul-moore.com> - 0.30.0-8
|
||||
- Applied upstream patch to improve netlabel-config error reporting (rhbz #1683434)
|
||||
- Removed the kernel dependency (rhbz #1733605)
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.30.0-1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Thu Dec 08 2016 Paul Moore <pmoore@redhat.com> - 0.30.0-0
|
||||
-New upstream version
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Fri Jul 10 2015 Paul Moore <pmoore@redhat.com> - 0.21-0
|
||||
- New upstream version
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sat Mar 21 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.20-5
|
||||
- Add patch to support libnl3
|
||||
- Use %%license
|
||||
- Cleanup spec
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Thu Feb 27 2014 Paul Moore <pmoore@redhat.com> - 0.20-2
|
||||
- Build with CFLAGS="${optflags}"
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Mon Jun 3 2013 Paul Moore <pmoore@redhat.com> - 0.20-0
|
||||
- Version bump to match latest upstream
|
||||
- Cleanups in the specfile due to changes in the upstream package
|
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.19-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.19-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.19-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.19-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Thu Jun 17 2010 Peter Vrabec <pvrabec@redhat.com> - 0.19-8
|
||||
- fixing return codes (#602291)
|
||||
|
||||
* Wed Jun 16 2010 Peter Vrabec <pvrabec@redhat.com> - 0.19-7
|
||||
- make initscript LSB compliant (#522818)
|
||||
- show version of netlabelctl and libnetlabel in help (#602577)
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
From 578a65904ff6426c01d81826873d27d0af35f355 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Moore <paul@paul-moore.com>
|
||||
Date: Sun, 17 Mar 2019 17:13:55 -0400
|
||||
Subject: [PATCH] netlabel_config: better error reporting on load
|
||||
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
netlabelctl/netlabel-config | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/netlabelctl/netlabel-config b/netlabelctl/netlabel-config
|
||||
index 717d795..15c74f7 100755
|
||||
--- a/netlabelctl/netlabel-config
|
||||
+++ b/netlabelctl/netlabel-config
|
||||
@@ -114,15 +114,21 @@ function nlbl_reset() {
|
||||
# load the NetLabel configuration from the configuration file
|
||||
function nlbl_load() {
|
||||
local ret_rc=0
|
||||
+ local line_num=0
|
||||
local line
|
||||
while read line; do
|
||||
+ line_num=$(($line_num + 1))
|
||||
# skip comments and blank lines
|
||||
echo "$line" | egrep '^#|^$' >& /dev/null && continue
|
||||
|
||||
# perform the configuration
|
||||
- netlabelctl $line >& /dev/null
|
||||
+ output=$(netlabelctl $line 2>&1)
|
||||
rc=$?
|
||||
- [[ $rc -ne 0 ]] && ret_rc=1
|
||||
+ if [[ $rc -ne 0 ]]; then
|
||||
+ ret_rc=1
|
||||
+ echo "error: line $line_num \"$line\""
|
||||
+ echo "$output"
|
||||
+ fi
|
||||
done < "$CFG_FILE"
|
||||
|
||||
return $ret_rc
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
fc6b07bf01bc3f68f5f05071072e521e netlabel_tools-0.30.0.tar.gz
|
||||
f7a9f397e5bf2364676e2beba1a61beb netlabel_tools-0.19.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue