From 0c187b6ff97f91c41dab65a6426dc61f77305cdf Mon Sep 17 00:00:00 2001 From: Dominick Grift Date: Sun, 20 Aug 2023 15:44:41 +0200 Subject: Import dssp5 Signed-off-by: Dominick Grift --- debian/README.Debian | 6 ++++++ debian/changelog | 5 +++++ debian/control | 23 +++++++++++++++++++++++ debian/copyright | 31 +++++++++++++++++++++++++++++++ debian/dssp5-docs.docs | 1 + debian/dssp5.install | 2 ++ debian/postinst | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ debian/postrm | 39 +++++++++++++++++++++++++++++++++++++++ debian/rules | 26 ++++++++++++++++++++++++++ debian/source/format | 1 + 10 files changed, 182 insertions(+) create mode 100644 debian/README.Debian create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dssp5-docs.docs create mode 100644 debian/dssp5.install create mode 100644 debian/postinst create mode 100644 debian/postrm create mode 100755 debian/rules create mode 100644 debian/source/format (limited to 'debian') 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 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 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 +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 +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 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: +# * 'configure' +# * 'abort-upgrade' +# * 'abort-remove' 'in-favour' +# +# * 'abort-remove' +# * 'abort-deconfigure' 'in-favour' +# 'removing' +# +# 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: +# * 'remove' +# * 'purge' +# * 'upgrade' +# * 'failed-upgrade' +# * 'abort-install' +# * 'abort-install' +# * 'abort-upgrade' +# * 'disappear' +# +# 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) -- cgit v1.2.3