/usr/bin/dh_apparmor is in dh-apparmor 2.7.102-0ubuntu3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | #!/usr/bin/perl -w
=head1 NAME
dh_apparmor - reload AppArmor profile and create local include
=cut
use strict;
use Debian::Debhelper::Dh_Lib;
=head1 SYNOPSIS
B<dh_apparmor> B<--profile-name=>I<profilename>
=head1 DESCRIPTION
dh_apparmor is a debhelper program that will create/remove the
/etc/apparmor.d/local/<profilename> include file in maintainer scripts. It
also reloads the specified AppArmor profile in postinst using:
=over 4
apparmor_parser -r -W -T /etc/apparmor.d/<profilename>
=back
By using '-W -T' we ensure that any abstraction updates are also pulled in.
=head1 OPTIONS
=over 4
=item B<--profile-name=><profilename>
Specify the profile name.
=back
=head1 NOTES
Note that for packages that have multiple binary packages, you will want to
pass '-p<package name>' to dh_apparmor, otherwise dh_apparmor will add
AppArmor reload commands for all packages rather than just the one that
ships the profile.
=cut
init(options => {
"profile-name=s" => \$dh{PROFILE_NAME},
});
foreach my $package (@{$dh{DOPACKAGES}}) {
if (! $dh{PROFILE_NAME}) {
error("Must specify --profile-name");
}
my $pname = $dh{PROFILE_NAME};
autoscript($package,"postinst","postinst-apparmor","s/#PROFILE#/$pname/");
autoscript($package,"postrm","postrm-apparmor","s/#PROFILE#/$pname/");
}
=head1 SEE ALSO
L<debhelper>
This program is a part of debhelper.
=head1 AUTHOR
Jamie Strandboge <jamie@canonical.com>
=cut
|