2011-02-03 22:31:10 +01:00
|
|
|
From: Jeff Mahoney <jeffm@suse.com>
|
|
|
|
Subject: apparmor-utils: Allow repository to be completely disabled
|
|
|
|
|
|
|
|
This patch allows the repository to be completely disabled. It's been
|
|
|
|
subject to massive bitrot and isn't really maintained.
|
|
|
|
|
|
|
|
It will only confuse the user if they are asked for repository information
|
|
|
|
and it doesn't work.
|
|
|
|
|
|
|
|
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|
|
|
---
|
2011-03-25 09:04:51 +01:00
|
|
|
utils/Immunix/AppArmor.pm | 5 +++++
|
|
|
|
utils/logprof.conf | 4 ++++
|
2011-02-03 22:31:10 +01:00
|
|
|
2 files changed, 9 insertions(+)
|
|
|
|
|
2011-03-25 09:04:51 +01:00
|
|
|
--- a/utils/Immunix/AppArmor.pm
|
|
|
|
+++ b/utils/Immunix/AppArmor.pm
|
|
|
|
@@ -3153,6 +3153,8 @@ sub UI_repo_signup() {
|
|
|
|
sub UI_ask_to_enable_repo() {
|
2011-02-03 22:31:10 +01:00
|
|
|
|
|
|
|
my $q = { };
|
|
|
|
+ return if (defined $cfg->{settings}{allow_repository} &&
|
|
|
|
+ $cfg->{settings}{allow_repository} eq "no");
|
|
|
|
return if ( not defined $cfg->{repository}{url} );
|
|
|
|
$q->{headers} = [
|
|
|
|
gettext("Repository"), $cfg->{repository}{url},
|
2011-03-25 09:04:51 +01:00
|
|
|
@@ -3277,6 +3279,8 @@ sub get_preferred_user ($) {
|
2011-02-03 22:31:10 +01:00
|
|
|
|
|
|
|
sub repo_is_enabled () {
|
|
|
|
my $enabled;
|
|
|
|
+ return 0 if defined($cfg->{settings}{allow_repository}) &&
|
|
|
|
+ $cfg->{settings}{allow_repository} eq "no";
|
|
|
|
if ($cfg->{repository}{url} &&
|
|
|
|
$repo_cfg &&
|
|
|
|
$repo_cfg->{repository}{enabled} &&
|
2011-03-25 09:04:51 +01:00
|
|
|
@@ -3290,6 +3294,7 @@ sub repo_is_enabled () {
|
|
|
|
sub update_repo_profile($) {
|
2011-02-03 22:31:10 +01:00
|
|
|
my $profile = shift;
|
|
|
|
|
|
|
|
+ return undef if not repo_is_enabled();
|
|
|
|
return undef if ( not is_repo_profile($profile) );
|
|
|
|
my $distro = $cfg->{repository}{distro};
|
|
|
|
my $url = $profile->{repo}{url};
|
|
|
|
--- a/utils/logprof.conf
|
|
|
|
+++ b/utils/logprof.conf
|
2011-03-25 09:04:51 +01:00
|
|
|
@@ -34,6 +34,10 @@
|
2011-02-03 22:31:10 +01:00
|
|
|
# files.
|
|
|
|
custom_includes =
|
|
|
|
|
|
|
|
+ # whether to prompt to enable repositories (values: yes/no)
|
|
|
|
+ # This feature has fallen to bitrot and should not be used.
|
|
|
|
+ allow_repository = no
|
|
|
|
+
|
|
|
|
|
|
|
|
[repository]
|
|
|
|
distro = ubuntu-intrepid
|