summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorDominick Grift <dominick.grift@defensec.nl>2023-08-20 15:44:41 +0200
committerDominick Grift <dominick.grift@defensec.nl>2023-08-20 15:46:23 +0200
commit0c187b6ff97f91c41dab65a6426dc61f77305cdf (patch)
tree1e35f5851154500a8a39428a45a5671f9488e1da /debian
downloadselinux-policy-0c187b6ff97f91c41dab65a6426dc61f77305cdf.tar.gz
Import dssp5
Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
Diffstat (limited to 'debian')
-rw-r--r--debian/README.Debian6
-rw-r--r--debian/changelog5
-rw-r--r--debian/control23
-rw-r--r--debian/copyright31
-rw-r--r--debian/dssp5-docs.docs1
-rw-r--r--debian/dssp5.install2
-rw-r--r--debian/postinst48
-rw-r--r--debian/postrm39
-rwxr-xr-xdebian/rules26
-rw-r--r--debian/source/format1
10 files changed, 182 insertions, 0 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..0e668c2
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,6 @@
+dssp5 for Debian
+--------------------
+
+First release.
+
+ -- Dominick Grift <dominick.grift@defensec.nl> Sun, 20 Aug 2023 12:17:46 +0200
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..e0f1595
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+dssp5 (1.0-1) UNRELEASED; urgency=medium
+
+ * Initial release.
+
+ -- Dominick Grift <dominick.grift@defensec.nl> Sun, 20 Aug 2023 12:17:46 +0200
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..de497c2
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,23 @@
+Source: dssp5
+Section: admin
+Priority: optional
+Maintainer: Dominick Grift <dominick.grift@defensec.nl>
+Rules-Requires-Root: no
+Build-Depends:
+ debhelper-compat (= 13),
+ findutils (>= 4.9.0),
+ make (>= 4.3),
+ policycoreutils (>= 3.4),
+Standards-Version: 4.6.2
+Homepage: https://www.defensec.nl
+#Vcs-Browser: https://salsa.debian.org/debian/dssp5
+#Vcs-Git: https://salsa.debian.org/debian/dssp5.git
+
+Package: dssp5
+Architecture: any
+Multi-Arch: foreign
+Depends:
+ policycoreutils (>= 3.4),
+ ${misc:Depends},
+Description: Defensec SELinux security policy
+ Modular variant suitable for Debian
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..a4090d7
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,31 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+
+Files:
+ *
+Copyright:
+ 2023 Dominick Grift <dominick.grift@defensec.nl>
+License: PD
+ This is free and unencumbered software released into the public domain.
+ .
+ Anyone is free to copy, modify, publish, use, compile, sell, or
+ distribute this software, either in source code form or as a compiled
+ binary, for any purpose, commercial or non-commercial, and by any
+ means.
+ .
+ In jurisdictions that recognize copyright laws, the author or authors
+ of this software dedicate any and all copyright interest in the
+ software to the public domain. We make this dedication for the benefit
+ of the public at large and to the detriment of our heirs and
+ successors. We intend this dedication to be an overt act of
+ relinquishment in perpetuity of all present and future rights to this
+ software under copyright law.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ .
+ For more information, please refer to <https://unlicense.org>
diff --git a/debian/dssp5-docs.docs b/debian/dssp5-docs.docs
new file mode 100644
index 0000000..86ca00f
--- /dev/null
+++ b/debian/dssp5-docs.docs
@@ -0,0 +1 @@
+README.Debian
diff --git a/debian/dssp5.install b/debian/dssp5.install
new file mode 100644
index 0000000..f512df3
--- /dev/null
+++ b/debian/dssp5.install
@@ -0,0 +1,2 @@
+/etc/selinux/dssp5
+/var/lib/selinux/dssp5
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..479e1ed
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,48 @@
+#!/bin/sh
+# postinst script for dssp5.
+#
+# See: dh_installdeb(1).
+
+set -e
+
+# Summary of how this script can be called:
+# * <postinst> 'configure' <most-recently-configured-version>
+# * <old-postinst> 'abort-upgrade' <new version>
+# * <conflictor's-postinst> 'abort-remove' 'in-favour' <package>
+# <new-version>
+# * <postinst> 'abort-remove'
+# * <deconfigured's-postinst> 'abort-deconfigure' 'in-favour'
+# <failed-install-package> <version> 'removing'
+# <conflicting-package> <version>
+# for details, see https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package.
+
+
+case "$1" in
+ configure)
+ echo "Updating dssp5 SELinux policy"
+
+ if [ ! -e /etc/selinux/config ]; then
+ echo "SELINUX=enforcing" > /etc/selinux/config
+ echo "SELINUXTYPE=dssp5" >> /etc/selinux/config
+ else
+ . /etc/selinux/config
+ [ "${SELINUXTYPE}" = "dssp5" ] && semodule -BPNs dssp5 && selinuxenabled && load_policy
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument '$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..39cf1b9
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,39 @@
+#!/bin/sh
+# postrm script for dssp5.
+#
+# See: dh_installdeb(1).
+
+set -e
+
+# Summary of how this script can be called:
+# * <postrm> 'remove'
+# * <postrm> 'purge'
+# * <old-postrm> 'upgrade' <new-version>
+# * <new-postrm> 'failed-upgrade' <old-version>
+# * <new-postrm> 'abort-install'
+# * <new-postrm> 'abort-install' <old-version>
+# * <new-postrm> 'abort-upgrade' <old-version>
+# * <disappearer's-postrm> 'disappear' <overwriter>
+# <overwriter-version>
+# for details, see https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package.
+
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ rm -rf /etc/selinux/dssp5 /var/lib/selinux/dssp5
+ [ -d /var/lib/selinux/final ] && rmdir --ignore-fail-on-non-empty /var/lib/selinux/final
+ ;;
+
+ *)
+ echo "postrm called with unknown argument '$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..4a021d3
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,26 @@
+#!/usr/bin/make -f
+
+# See debhelper(7) (uncomment to enable).
+# Output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+
+# See FEATURE AREAS in dpkg-buildflags(1).
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# See ENVIRONMENT in dpkg-buildflags(1).
+# Package maintainers to append CFLAGS.
+#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+# Package maintainers to append LDFLAGS.
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+
+%:
+ dh $@
+
+override_dh_auto_build:
+override_dh_auto_test:
+override_dh_auto_install:
+ make modular_install DESTDIR=$(CURDIR)/debian/tmp
+ rm -f $(CURDIR)/debian/tmp/etc/selinux/dssp5/contexts/files/file_contexts.bin
+ rm -f $(CURDIR)/debian/tmp/etc/selinux/dssp5/contexts/files/file_contexts.homedirs.bin
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)