mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Revert "Merge branch 'master' into dev/load-email-images-by-server"
This reverts commita5ba7ebe05, reversing changes made to0e93560003.
This commit is contained in:
@@ -9635,8 +9635,8 @@ SSL mode 0 = HTTP, 1 = HTTPS, 2 = FTP.
|
||||
=cut
|
||||
sub parse_http_url
|
||||
{
|
||||
if ($_[0] =~ /^(http|https|ftp):\/\/([^\@\/]+\@)?\[([^\]]+)\](:(\d+))?(\/\S*)?$/ ||
|
||||
$_[0] =~ /^(http|https|ftp):\/\/([^\@\/]+\@)?([^:\/]+)(:(\d+))?(\/\S*)?$/) {
|
||||
if ($_[0] =~ /^(http|https|ftp):\/\/([^\@]+\@)?\[([^\]]+)\](:(\d+))?(\/\S*)?$/ ||
|
||||
$_[0] =~ /^(http|https|ftp):\/\/([^\@]+\@)?([^:\/]+)(:(\d+))?(\/\S*)?$/) {
|
||||
# An absolute URL
|
||||
my $ssl = $1 eq 'https' ? 1 : $1 eq 'ftp' ? 2 : 0;
|
||||
my @rv = ($3,
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
require './webmin-lib.pl';
|
||||
&ReadParse();
|
||||
my $devkey = "$module_root_directory/developers-key.asc";
|
||||
|
||||
if (-r $webmin_yum_repo_file) {
|
||||
# Fix up YUM repo
|
||||
@@ -17,7 +16,9 @@ if (-r $webmin_yum_repo_file) {
|
||||
$l = "mirrorlist=".$webmin_yum_repo_mirrorlist;
|
||||
}
|
||||
elsif ($l =~ /^\s*gpgkey\s*=\s*file:\/\/(\S+)/) {
|
||||
©_source_dest($devkey, $webmin_yum_repo_key)
|
||||
©_source_dest(
|
||||
"$module_root_directory/developers-key.asc",
|
||||
$webmin_yum_repo_key)
|
||||
if (!-r $webmin_yum_repo_key);
|
||||
$l = "gpgkey=file://".$webmin_yum_repo_key;
|
||||
}
|
||||
@@ -32,24 +33,17 @@ foreach my $repo ($webmin_apt_repo_file, $global_apt_repo_file) {
|
||||
next if (!-r $repo);
|
||||
&lock_file($repo);
|
||||
my $lref = &read_file_lines($repo);
|
||||
my $fixed = 0;
|
||||
foreach my $l (@$lref) {
|
||||
if ($l =~ /^\s*deb\s+((http|https):\/\/download.webmin.com\/download\/repository)\s+sarge\s+contrib/) {
|
||||
$l = "deb $webmin_apt_repo_url stable contrib";
|
||||
$fixed++;
|
||||
}
|
||||
elsif ($l =~ /^\s*deb\s+\[signed-by=(\S+)\]\s+((http|https):\/\/download.webmin.com\/download\/repository)\s+sarge\s+contrib/) {
|
||||
$l = "deb [signed-by=$webmin_apt_repo_key] $webmin_apt_repo_url stable contrib";
|
||||
$fixed++;
|
||||
}
|
||||
}
|
||||
&flush_file_lines($repo);
|
||||
&unlock_file($repo);
|
||||
if ($fixed) {
|
||||
# Put the new key into place
|
||||
&system_logged("gpg --import $devkey >/dev/null 2>&1 </dev/null");
|
||||
&system_logged("cat $devkey | gpg --dearmor >$webmin_apt_repo_key 2>/dev/null </dev/null");
|
||||
}
|
||||
# XXX import key
|
||||
}
|
||||
|
||||
&webmin_log("fixrepo");
|
||||
|
||||
Reference in New Issue
Block a user