diff --git a/configure b/configure index a43282f2..437ce9fa 100755 --- a/configure +++ b/configure @@ -83,7 +83,10 @@ generate() { [[ "$profile" =~ ^\# ]] && continue path="${ROOT:?}/apparmor.d/profiles/$profile" - [[ -f "$path" ]] || _die "Profile $profile not found" + if [[ -f "$path" ]]; then + [[ "$DISTRIBUTION" == debian ]] && continue + _die "Profile $profile not found" + fi # If flags is set, overwrite profile flag if [[ -n "$flags" ]]; then diff --git a/debian/apparmor.d.install b/debian/apparmor.d.install new file mode 100644 index 00000000..b7b46f4f --- /dev/null +++ b/debian/apparmor.d.install @@ -0,0 +1,6 @@ +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +_build/apparmor.d/* etc/apparmor.d +_build/root/etc/* etc/ +_build/root/usr/* usr/ diff --git a/debian/apparmor.d.postinst b/debian/apparmor.d.postinst new file mode 100644 index 00000000..0f8a1b34 --- /dev/null +++ b/debian/apparmor.d.postinst @@ -0,0 +1,10 @@ +#!/bin/bash +# Post remove install. +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +systemctl reload apparmor.service >/dev/null 2>&1 || true + +#DEBHELPER# + +exit 0 \ No newline at end of file diff --git a/debian/apparmor.d.postrm b/debian/apparmor.d.postrm new file mode 100644 index 00000000..8b6c6597 --- /dev/null +++ b/debian/apparmor.d.postrm @@ -0,0 +1,10 @@ +#!/bin/bash +# Post remove script. +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +systemctl reload apparmor.service >/dev/null 2>&1 || true + +#DEBHELPER# + +exit 0 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..1339aebf --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +apparmor.d (21.0403-1) stable; urgency=medium + + * Release 21.0403-1 + + -- Alexandre Pujol Sat, 03 Apr 2021 22:16:22 +0000 \ No newline at end of file diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..48082f72 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +12 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..72f5f768 --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: apparmor.d +Section: admin +Priority: optional +Maintainer: Alexandre Pujol +Build-Depends: debhelper (>= 12), config-package-dev, curl +Homepage: https://gitlab.com/archlex/hardening/apparmor.d +Vcs-Browser: https://gitlab.com/archlex/hardening/apparmor.d +Vcs-Git: https://gitlab.com/archlex/hardening/apparmor.d.git +Standards-Version: 4.5.0 + +Package: apparmor.d +Architecture: all +Depends: apparmor-profiles, ${misc:Depends} +Description: Full set of apparmor profiles \ No newline at end of file diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..5d991553 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,8 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: apparmor.d +Upstream-Contact: Alexandre Pujol +Source: https://gitlab.com/archlex/hardening/apparmor.d + +Files: * +Copyright: 2021 Alexandre Pujol +License: GPL-2 diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..cda55735 --- /dev/null +++ b/debian/rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f +# rules makefile. +# Copyright (C) 2021 Alexandre Pujol +# + +#export DH_VERBOSE=1 + +%: + dh $@ --with=config-package + +override_dh_auto_configure: + ./configure --distribution=debian --flavor=desktop diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 00000000..28e830a7 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=4 +opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/hardened-$1\.tar\.gz/ \ + https://gitlab.com/archlex/hardening/apparmor.d/tags .*/v?(\d\S+)\.tar\.gz \ No newline at end of file