diff --git a/Ezmlm/trunk/Ezmlm/GpgEzmlm.pm b/Ezmlm/trunk/Ezmlm/GpgEzmlm.pm index fe87dcf..1105fa7 100644 --- a/Ezmlm/trunk/Ezmlm/GpgEzmlm.pm +++ b/Ezmlm/trunk/Ezmlm/GpgEzmlm.pm @@ -65,6 +65,7 @@ The Mail::Ezmlm::GpgEzmlm class is inherited from the Mail::Ezmlm class. # == Begin site dependant variables == $GPG_EZMLM_BASE = '/usr/bin'; # Autoinserted by Makefile.PL +$GPG_BIN = '/usr/bin/gpg' # Autoinserted by Makefile.PL # == clean up the path for taint checking == local $ENV{PATH}; @@ -101,6 +102,7 @@ sub new { bless $self, ref $class || $class || 'Mail::Ezmlm::GpgEzmlm'; # define the available (supported) options for gpg-ezmlm == @{$self->{SUPPORTED_OPTIONS}} = ( + "GnupG", "KeyDir", "RequireSub", "RequireSigs", @@ -321,14 +323,16 @@ sub update { my ($result); + # restore the ususal ezmlm-idx config file (for v0.4xx) &_enable_plaintext_config_file($self->thislist()); + # let ezmlm-make do the setup $result = $self->SUPER::update($options); + # restore the gpg-ezmlm config file &_enable_encryption_config_file($self->thislist()); - # "repair" the dotqmail files + # "repair" the dotqmail files (use "gpg-ezmlm-send" instead of "ezmlm-send") &_cleanup_dotqmail_files($self->thislist()); - # the normal configuration via "ezmlm-make" may not happen, since - # this would overwrite the dotqmail files. Thus we just do nothing. + return the result of the ezmlm-make run return $result; } @@ -352,6 +356,11 @@ sub update_special { return undef; } + # always set the default value for the "gpg" setting explicitely - otherwise + # gpg-ezmlm breaks on most systems (its default location is + # /usr/local/bin/gpg) + $ok_switches{GnuPG} = $GPG_BIN; + @delete_switches = (); # check if all supplied settings are supported # btw we change the case (upper/lower) of the setting to the default one diff --git a/Ezmlm/trunk/Makefile.PL b/Ezmlm/trunk/Makefile.PL index e591cac..b543bdf 100644 --- a/Ezmlm/trunk/Makefile.PL +++ b/Ezmlm/trunk/Makefile.PL @@ -200,6 +200,7 @@ EOM or die "Unable to read temp file: $!"; while() { s{^\$GPG_EZMLM_BASE\s*=\s*['"].+?['"]\s*;\s*(#.*|)$}{\$GPG_EZMLM_BASE = '$gpg_ezmlm_path'; # Autoinserted by Makefile.PL}; + s{^\$GPG_BIN\s*=\s*['"].+?['"]\s*;\s*(#.*|)$}{\$GPG_BIN = '$gpg_bin'; # Autoinserted by Makefile.PL} if ($gpg_bin_requested); print GPGEZMLM; } close TMP; close GPGEZMLM; @@ -228,3 +229,4 @@ EOM return {}; } +