Add Debian packaging.

This commit is contained in:
Alexandre Pujol 2021-04-03 23:22:09 +01:00
parent 646cbec874
commit b6ac70f80d
No known key found for this signature in database
GPG Key ID: C5469996F0DF68EC
11 changed files with 74 additions and 1 deletions

5
configure vendored
View File

@ -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

6
debian/apparmor.d.install vendored Normal file
View File

@ -0,0 +1,6 @@
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
_build/apparmor.d/* etc/apparmor.d
_build/root/etc/* etc/
_build/root/usr/* usr/

10
debian/apparmor.d.postinst vendored Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Post remove install.
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
systemctl reload apparmor.service >/dev/null 2>&1 || true
#DEBHELPER#
exit 0

10
debian/apparmor.d.postrm vendored Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Post remove script.
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
systemctl reload apparmor.service >/dev/null 2>&1 || true
#DEBHELPER#
exit 0

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
apparmor.d (21.0403-1) stable; urgency=medium
* Release 21.0403-1
-- Alexandre Pujol <alexandre@pujol.io> Sat, 03 Apr 2021 22:16:22 +0000

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
12

14
debian/control vendored Normal file
View File

@ -0,0 +1,14 @@
Source: apparmor.d
Section: admin
Priority: optional
Maintainer: Alexandre Pujol <alexandre@pujol.io>
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

8
debian/copyright vendored Normal file
View File

@ -0,0 +1,8 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: apparmor.d
Upstream-Contact: Alexandre Pujol <alexandre@pujol.io>
Source: https://gitlab.com/archlex/hardening/apparmor.d
Files: *
Copyright: 2021 Alexandre Pujol <alexandre@pujol.io>
License: GPL-2

12
debian/rules vendored Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/make -f
# rules makefile.
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
#
#export DH_VERBOSE=1
%:
dh $@ --with=config-package
override_dh_auto_configure:
./configure --distribution=debian --flavor=desktop

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

3
debian/watch vendored Normal file
View File

@ -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