diff options
13 files changed, 871 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch b/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch new file mode 100644 index 0000000000..a9ee405075 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | Disable OS version check in status screen | ||
| 2 | |||
| 3 | The code is not able to accurately detect the correct distro/version at | ||
| 4 | the moment. | ||
| 5 | |||
| 6 | Upstream-status: Inappropriate | ||
| 7 | |||
| 8 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 9 | |||
| 10 | diff --git a/webmin/webmin-lib.pl b/webmin/webmin-lib.pl | ||
| 11 | index 57a37f7..838b944 100755 | ||
| 12 | --- a/webmin/webmin-lib.pl | ||
| 13 | +++ b/webmin/webmin-lib.pl | ||
| 14 | @@ -1059,18 +1059,19 @@ my %miniserv; | ||
| 15 | &load_theme_library(); # So that UI functions work | ||
| 16 | |||
| 17 | # Need OS upgrade | ||
| 18 | -my %realos = &detect_operating_system(undef, 1); | ||
| 19 | -if (($realos{'os_version'} ne $gconfig{'os_version'} || | ||
| 20 | - $realos{'os_type'} ne $gconfig{'os_type'}) && | ||
| 21 | - $realos{'os_version'} && $realos{'os_type'} && | ||
| 22 | - &foreign_available("webmin")) { | ||
| 23 | - push(@notifs, | ||
| 24 | - &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi"). | ||
| 25 | - &text('os_incorrect', $realos{'real_os_type'}, | ||
| 26 | - $realos{'real_os_version'})."<p>\n". | ||
| 27 | - &ui_form_end([ [ undef, $text{'os_fix'} ] ]) | ||
| 28 | - ); | ||
| 29 | - } | ||
| 30 | +# Disabled for now as os-chooser.pl does not work on our system | ||
| 31 | +#my %realos = &detect_operating_system(undef, 1); | ||
| 32 | +#if (($realos{'os_version'} ne $gconfig{'os_version'} || | ||
| 33 | +# $realos{'os_type'} ne $gconfig{'os_type'}) && | ||
| 34 | +# $realos{'os_version'} && $realos{'os_type'} && | ||
| 35 | +# &foreign_available("webmin")) { | ||
| 36 | +# push(@notifs, | ||
| 37 | +# &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi"). | ||
| 38 | +# &text('os_incorrect', $realos{'real_os_type'}, | ||
| 39 | +# $realos{'real_os_version'})."<p>\n". | ||
| 40 | +# &ui_form_end([ [ undef, $text{'os_fix'} ] ]) | ||
| 41 | +# ); | ||
| 42 | +# } | ||
| 43 | |||
| 44 | # Password close to expiry | ||
| 45 | my $warn_days = $config{'warn_days'}; | ||
diff --git a/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch b/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch new file mode 100644 index 0000000000..140ae7e450 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 7eba4c98c6953fa6ea76c1620d19524bcfa3a576 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Kevin Strasser <kevin.strasser@linux.intel.com> | ||
| 3 | Date: Wed, 1 Aug 2012 11:51:26 -0700 | ||
| 4 | Subject: [PATCH] nfs export: remove nfsd check | ||
| 5 | |||
| 6 | nfsd runs as a kernel process and does not have a pid. This means | ||
| 7 | that the command assigned to apply_cmd will never be executed when | ||
| 8 | the user tries to apply changes to nfs exports. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [config] | ||
| 11 | |||
| 12 | Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com> | ||
| 13 | --- | ||
| 14 | exports/exports-lib.pl | 2 +- | ||
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/exports/exports-lib.pl b/exports/exports-lib.pl | ||
| 18 | index 22891c0..1c67494 100755 | ||
| 19 | --- a/exports/exports-lib.pl | ||
| 20 | +++ b/exports/exports-lib.pl | ||
| 21 | @@ -273,7 +273,7 @@ return !&has_command("rpc.nfsd") && !&has_command("nfsd") && | ||
| 22 | sub restart_mountd | ||
| 23 | { | ||
| 24 | # Try exportfs -r first | ||
| 25 | -if ($config{'apply_cmd'} && &find_byname("nfsd") && &find_byname("mountd")) { | ||
| 26 | +if ($config{'apply_cmd'} && &find_byname("mountd")) { | ||
| 27 | local $out = &backquote_logged("$config{'apply_cmd'} 2>&1 </dev/null"); | ||
| 28 | if (!$? && $out !~ /invalid|error|failed/i) { | ||
| 29 | # Looks like it worked! | ||
| 30 | -- | ||
| 31 | 1.7.9.5 | ||
| 32 | |||
diff --git a/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch b/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch new file mode 100644 index 0000000000..135492d713 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | # Hack in support for an "exclude" config option for the init module, so | ||
| 2 | # we can hide certain system services that shouldn't really be configurable | ||
| 3 | # via the web interface | ||
| 4 | # | ||
| 5 | # Upstream-status: Pending | ||
| 6 | # | ||
| 7 | # Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 8 | --- webmin-1.570.orig/init/index.cgi | ||
| 9 | +++ webmin-1.570/init/index.cgi | ||
| 10 | @@ -48,19 +48,20 @@ elsif ($init_mode eq "init" && $access{' | ||
| 11 | : "$config{'init_dir'}/$ac[0]"); | ||
| 12 | } | ||
| 13 | @runlevels = &list_runlevels(); | ||
| 14 | - foreach $r (@runlevels) { | ||
| 15 | - foreach $w ("S", "K") { | ||
| 16 | - foreach $a (&runlevel_actions($r, $w)) { | ||
| 17 | - @ac = split(/\s+/, $a); | ||
| 18 | - if (!$nodemap{$ac[2]}) { | ||
| 19 | - push(@acts, $ac[1]); | ||
| 20 | - push(@actsl, | ||
| 21 | - "1+$r+$ac[0]+$ac[1]+$ac[2]+$w"); | ||
| 22 | - push(@actsf, "$config{'init_base'}/rc$r.d/$w$ac[0]$ac[1]"); | ||
| 23 | - } | ||
| 24 | - } | ||
| 25 | - } | ||
| 26 | - } | ||
| 27 | + # Assume there won't be any of these broken actions | ||
| 28 | + #foreach $r (@runlevels) { | ||
| 29 | + # foreach $w ("S", "K") { | ||
| 30 | + # foreach $a (&runlevel_actions($r, $w)) { | ||
| 31 | + # @ac = split(/\s+/, $a); | ||
| 32 | + # if (!$nodemap{$ac[2]}) { | ||
| 33 | + # push(@acts, $ac[1]); | ||
| 34 | + # push(@actsl, | ||
| 35 | + # "1+$r+$ac[0]+$ac[1]+$ac[2]+$w"); | ||
| 36 | + # push(@actsf, "$config{'init_base'}/rc$r.d/$w$ac[0]$ac[1]"); | ||
| 37 | + # } | ||
| 38 | + # } | ||
| 39 | + # } | ||
| 40 | + # } | ||
| 41 | |||
| 42 | # For each action, look at /etc/rc*.d/* files to see if it is | ||
| 43 | # started at boot | ||
| 44 | Index: webmin-1.570/init/init-lib.pl | ||
| 45 | =================================================================== | ||
| 46 | --- webmin-1.570.orig/init/init-lib.pl | ||
| 47 | +++ webmin-1.570/init/init-lib.pl | ||
| 48 | @@ -108,15 +108,17 @@ List boot time action names from init.d, | ||
| 49 | =cut | ||
| 50 | sub list_actions | ||
| 51 | { | ||
| 52 | -local($dir, $f, @stbuf, @rv); | ||
| 53 | +local($dir, $f, @stbuf, @rv, @exclude); | ||
| 54 | $dir = $config{init_dir}; | ||
| 55 | +@exclude = split(/,/, $config{exclude}); | ||
| 56 | opendir(DIR, $dir); | ||
| 57 | foreach $f (sort { lc($a) cmp lc($b) } readdir(DIR)) { | ||
| 58 | if ($f eq "." || $f eq ".." || $f =~ /\.bak$/ || $f eq "functions" || | ||
| 59 | $f eq "core" || $f eq "README" || $f eq "rc" || $f eq "rcS" || | ||
| 60 | -d "$dir/$f" || $f =~ /\.swp$/ || $f eq "skeleton" || | ||
| 61 | $f =~ /\.lock$/ || $f =~ /\.dpkg-(old|dist)$/ || | ||
| 62 | - $f =~ /^\.depend\./ || $f eq '.legacy-bootordering') { next; } | ||
| 63 | + $f =~ /^\.depend\./ || $f eq '.legacy-bootordering' || | ||
| 64 | + grep {$_ eq $f} @exclude ) { next; } | ||
| 65 | if (@stbuf = stat("$dir/$f")) { | ||
| 66 | push(@rv, "$f $stbuf[1]"); | ||
| 67 | } | ||
diff --git a/meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch b/meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch new file mode 100644 index 0000000000..46f3109796 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | diff -Nru webmin-1.570.bak/mediatomb/index.cgi webmin-1.570/mediatomb/index.cgi | ||
| 2 | --- webmin-1.570.bak/mediatomb/index.cgi 1969-12-31 16:00:00.000000000 -0800 | ||
| 3 | +++ webmin-1.570/mediatomb/index.cgi 2011-10-26 10:00:05.992522036 -0700 | ||
| 4 | @@ -0,0 +1,13 @@ | ||
| 5 | +#!/usr/bin/perl | ||
| 6 | +# index.cgi | ||
| 7 | +# Display MediaTomb option categories | ||
| 8 | + | ||
| 9 | +require './mediatomb-lib.pl'; | ||
| 10 | + | ||
| 11 | +ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1); | ||
| 12 | + | ||
| 13 | + | ||
| 14 | +$ipaddress = &get_my_address(); | ||
| 15 | +print &text('index_desc', $ipaddress),"<p>\n"; | ||
| 16 | + | ||
| 17 | +ui_print_footer("/", $text{'index'}); | ||
| 18 | diff -Nru webmin-1.570.bak/mediatomb/lang/en webmin-1.570/mediatomb/lang/en | ||
| 19 | --- webmin-1.570.bak/mediatomb/lang/en 1969-12-31 16:00:00.000000000 -0800 | ||
| 20 | +++ webmin-1.570/mediatomb/lang/en 2011-10-26 10:01:13.340522186 -0700 | ||
| 21 | @@ -0,0 +1,2 @@ | ||
| 22 | +index_title=MediaTomb | ||
| 23 | +index_desc=MediaTomb is an open source (GPL) UPnP MediaServer with a nice web user interface. You can access it via <a href='http://$1:49153'>here</a>. | ||
| 24 | diff -Nru webmin-1.570.bak/mediatomb/mediatomb-lib.pl webmin-1.570/mediatomb/mediatomb-lib.pl | ||
| 25 | --- webmin-1.570.bak/mediatomb/mediatomb-lib.pl 1969-12-31 16:00:00.000000000 -0800 | ||
| 26 | +++ webmin-1.570/mediatomb/mediatomb-lib.pl 2011-10-26 10:01:34.692522079 -0700 | ||
| 27 | @@ -0,0 +1,31 @@ | ||
| 28 | +#!/usr/bin/perl | ||
| 29 | +# mediatomb-lib.pl | ||
| 30 | +# Common functions for the MediaTomb module | ||
| 31 | + | ||
| 32 | +BEGIN { push(@INC, ".."); }; | ||
| 33 | +use WebminCore; | ||
| 34 | +&init_config(); | ||
| 35 | + | ||
| 36 | +sub get_my_address | ||
| 37 | +{ | ||
| 38 | +my $myip; | ||
| 39 | +if (&foreign_check("net")) { | ||
| 40 | + # Try to get ethernet interface | ||
| 41 | + &foreign_require("net", "net-lib.pl"); | ||
| 42 | + my @act = &net::active_interfaces(); | ||
| 43 | + my @ifaces = grep { &net::iface_type($_->{'fullname'}) =~ /ether/i } | ||
| 44 | + @act; | ||
| 45 | + @ifaces = ( $act[0] ) if (!@ifaces && @act); | ||
| 46 | + if (@ifaces) { | ||
| 47 | + return wantarray ? ( map { $_->{'address'} } @ifaces ) | ||
| 48 | + : $ifaces[0]->{'address'}; | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | +$myip = &to_ipaddress(&get_system_hostname()); | ||
| 52 | +if ($myip) { | ||
| 53 | + # Can resolve hostname .. use that | ||
| 54 | + return wantarray ? ( $myip ) : $myip; | ||
| 55 | + } | ||
| 56 | +return wantarray ? ( ) : undef; | ||
| 57 | +} | ||
| 58 | + | ||
| 59 | diff -Nru webmin-1.570.bak/mediatomb/module.info webmin-1.570/mediatomb/module.info | ||
| 60 | --- webmin-1.570.bak/mediatomb/module.info 1969-12-31 16:00:00.000000000 -0800 | ||
| 61 | +++ webmin-1.570/mediatomb/module.info 2011-10-26 09:59:50.428528369 -0700 | ||
| 62 | @@ -0,0 +1,3 @@ | ||
| 63 | +desc=MediaTomb | ||
| 64 | +category=others | ||
| 65 | +longdesc=MediaTomb access module | ||
diff --git a/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch b/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch new file mode 100644 index 0000000000..8cb74c4b13 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | Add excludefs config option to mount module | ||
| 2 | |||
| 3 | Adds a configuration option (currently hidden) to allow the distro to | ||
| 4 | hide certain filesystems from the mount module within Webmin (e.g. /dev) | ||
| 5 | since these shouldn't be modified from the web interface. | ||
| 6 | |||
| 7 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 8 | |||
| 9 | Upstream-status: Pending | ||
| 10 | |||
| 11 | --- webmin-1.570.orig/mount/index.cgi | ||
| 12 | +++ webmin-1.570/mount/index.cgi | ||
| 13 | @@ -33,10 +33,12 @@ elsif ($config{'sort_mode'} == 1) { | ||
| 14 | } | ||
| 15 | |||
| 16 | # Build visible filesystems list | ||
| 17 | +@excludefs = split(/,/, $config{excludefs}); | ||
| 18 | foreach $m (@all) { | ||
| 19 | @minfo = @$m; | ||
| 20 | $p = &simplify_mount_path($minfo[0], $minfo[2]); | ||
| 21 | next if ($ignore{$minfo[2]}); | ||
| 22 | + next if (grep {$_ eq $minfo[2]} @excludefs); | ||
| 23 | @mmodes = &mount_modes($minfo[2], $minfo[0], $minfo[1]); | ||
| 24 | $canedit = $can_edit{$minfo[2]} && !$mmodes[4] && | ||
| 25 | &can_edit_fs(@minfo); | ||
diff --git a/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch b/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch new file mode 100644 index 0000000000..7d20affb22 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | # Add support for configuring network interfaces on a generic linux system | ||
| 2 | # | ||
| 3 | # Upstream-status: Not appropriate [config] | ||
| 4 | # | ||
| 5 | # Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 6 | --- webmin-1.570.orig/net/module.info | ||
| 7 | +++ webmin-1.570/net/module.info | ||
| 8 | @@ -11,7 +11,7 @@ desc_ko_KR.UTF-8=ë„¤íŠ¸ì›Œí¬ êµ¬ì„± | ||
| 9 | name=Networking | ||
| 10 | desc_tr=Að Yapýlandýrmasý | ||
| 11 | desc_de=Netzwerkkonfiguration | ||
| 12 | -os_support=solaris coherent-linux redhat-linux/5.0-* mandrake-linux united-linux suse-linux/6.0-* open-linux unixware turbo-linux/4.0 freebsd/3.2-* openbsd debian-linux/2.2-* cobalt-linux/2.2-* msc-linux gentoo-linux macos/1.5-* trustix-linux slackware-linux/8.0-* openmamba-linux cygwin windows pardus-linux | ||
| 13 | +os_support=generic-linux solaris coherent-linux redhat-linux/5.0-* mandrake-linux united-linux suse-linux/6.0-* open-linux unixware turbo-linux/4.0 freebsd/3.2-* openbsd debian-linux/2.2-* cobalt-linux/2.2-* msc-linux gentoo-linux macos/1.5-* trustix-linux slackware-linux/8.0-* openmamba-linux cygwin windows pardus-linux | ||
| 14 | desc_sk=Konfigurácia siete | ||
| 15 | desc_zh_CN=ÍøÂçÅäÖà | ||
| 16 | risk=low medium high | ||
| 17 | --- /dev/null | ||
| 18 | +++ webmin-1.570/net/generic-linux-lib.pl | ||
| 19 | @@ -0,0 +1,2 @@ | ||
| 20 | +do 'linux-lib.pl'; | ||
| 21 | + | ||
diff --git a/meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch b/meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch new file mode 100644 index 0000000000..bdba5e73f8 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | Upstream-Status: Inappropriate [config] | ||
| 2 | |||
| 3 | XXX: need to work out a better fix. | ||
| 4 | |||
| 5 | Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> | ||
| 6 | |||
| 7 | diff -Nru webmin-1.570.orig//net/net-lib.pl webmin-1.570/net/net-lib.pl | ||
| 8 | --- webmin-1.570.orig//net/net-lib.pl 2011-10-03 09:01:48.000000000 +0800 | ||
| 9 | +++ webmin-1.570/net/net-lib.pl 2011-10-28 13:52:56.138873664 +0800 | ||
| 10 | @@ -21,7 +21,8 @@ | ||
| 11 | do "$gconfig{'os_type'}-9.1-ALL-lib.pl"; | ||
| 12 | } | ||
| 13 | else { | ||
| 14 | - do "$gconfig{'os_type'}-lib.pl"; | ||
| 15 | + #do "$gconfig{'os_type'}-lib.pl"; | ||
| 16 | + do "debian-linux-lib.pl"; | ||
| 17 | } | ||
| 18 | |||
| 19 | # list_hosts() | ||
diff --git a/meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch b/meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch new file mode 100644 index 0000000000..c17e3b2167 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | commit e48f61d2f6df32a518bcb84db8c6eacfe5435c32 | ||
| 2 | Author: Yu Ke <ke.yu@intel.com> | ||
| 3 | Date: Fri Oct 28 14:40:51 2011 +0800 | ||
| 4 | |||
| 5 | NFS export: fix syntax issue | ||
| 6 | |||
| 7 | fix two syntax issue in /etc/exports: | ||
| 8 | 1. if it is exported to everyone, should use "*", e.g. "/export *(xxx)" | ||
| 9 | 2. explicitly specify subtree_check or no_subtree_check, required by latest nfs-utils | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | Signed-off-by: Yu Ke <ke.yu@intel.com> | ||
| 14 | |||
| 15 | diff --git a/exports/save_export.cgi b/exports/save_export.cgi | ||
| 16 | index 3bc2f97..3e60298 100755 | ||
| 17 | --- a/exports/save_export.cgi | ||
| 18 | +++ b/exports/save_export.cgi | ||
| 19 | @@ -40,7 +40,7 @@ else { | ||
| 20 | &error(&text('save_enetmask', $in{'netmask'})); | ||
| 21 | $exp{'host'} = $in{'network'}."/".$in{'netmask'}; | ||
| 22 | } | ||
| 23 | - elsif ($in{'mode'} == 3) { $exp{'host'} = ""; } | ||
| 24 | + elsif ($in{'mode'} == 3) { $exp{'host'} = "*"; } | ||
| 25 | else { | ||
| 26 | $in{'host'} =~ /\*/ || &to_ipaddress($in{'host'}) || | ||
| 27 | &error(&text('save_ehost', $in{'host'})); | ||
| 28 | @@ -70,6 +70,11 @@ else { | ||
| 29 | |||
| 30 | delete($opts{'no_subtree_check'}); delete($opts{'subtree_check'}); | ||
| 31 | $opts{'no_subtree_check'} = "" if ($in{'no_subtree_check'}); | ||
| 32 | + if ($in{'no_subtree_check'}) { | ||
| 33 | + $opts{'no_subtree_check'} = ""; | ||
| 34 | + } else { | ||
| 35 | + $opts{'subtree_check'} = ""; | ||
| 36 | + } | ||
| 37 | |||
| 38 | delete($opts{'nohide'}); delete($opts{'hide'}); | ||
| 39 | $opts{'nohide'} = "" if ($in{'nohide'}); | ||
diff --git a/meta-webserver/recipes-webadmin/webmin/files/proftpd-config-fix.patch b/meta-webserver/recipes-webadmin/webmin/files/proftpd-config-fix.patch new file mode 100644 index 0000000000..492a652d48 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/proftpd-config-fix.patch | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | Upstream-status: Inappropriate [configuration] | ||
| 2 | |||
| 3 | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> | ||
| 4 | |||
| 5 | Index: webmin-1.570/proftpd/config | ||
| 6 | =================================================================== | ||
| 7 | --- webmin-1.570.orig/proftpd/config 2011-10-25 20:18:37.000000000 +0800 | ||
| 8 | +++ webmin-1.570/proftpd/config 2011-10-25 20:21:13.000000000 +0800 | ||
| 9 | @@ -1,6 +1,6 @@ | ||
| 10 | -proftpd_path=/usr/local/sbin/proftpd | ||
| 11 | -proftpd_conf=/usr/local/etc/proftpd.conf | ||
| 12 | -pid_file=/usr/local/var/proftpd.pid | ||
| 13 | +proftpd_path=/usr/sbin/proftpd | ||
| 14 | +proftpd_conf=/etc/proftpd.conf | ||
| 15 | +pid_file=/var/proftpd.pid | ||
| 16 | ftpusers=/etc/ftpusers | ||
| 17 | test_config=1 | ||
| 18 | test_always=0 | ||
diff --git a/meta-webserver/recipes-webadmin/webmin/files/remove-startup-option.patch b/meta-webserver/recipes-webadmin/webmin/files/remove-startup-option.patch new file mode 100644 index 0000000000..8493af8526 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/remove-startup-option.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # Remove "start on boot" option from webmin configuration, as | ||
| 2 | # end-users should not need to configure this from the web interface | ||
| 3 | # | ||
| 4 | # Upstream-status: Inappropriate | ||
| 5 | # | ||
| 6 | # Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 7 | --- webmin-1.570.orig/webmin/index.cgi | ||
| 8 | +++ webmin-1.570/webmin/index.cgi | ||
| 9 | @@ -79,20 +79,6 @@ print &ui_buttons_start(); | ||
| 10 | my %miniserv; | ||
| 11 | &get_miniserv_config(\%miniserv); | ||
| 12 | |||
| 13 | -if (&foreign_check("init")) { | ||
| 14 | - &foreign_require("init", "init-lib.pl"); | ||
| 15 | - my $starting = &init::action_status("webmin"); | ||
| 16 | - print &ui_buttons_row("bootup.cgi", | ||
| 17 | - $text{'index_boot'}, | ||
| 18 | - $text{'index_bootmsg'}. | ||
| 19 | - ($miniserv{'inetd'} ? "<b>$text{'index_inetd'}</b>" : | ||
| 20 | - !$ENV{'MINISERV_CONFIG'} ? "<b>$text{'index_apache'}</b>" : ""), | ||
| 21 | - &ui_hidden("starting", $starting), | ||
| 22 | - &ui_radio("boot", $starting == 2 ? 1 : 0, | ||
| 23 | - [ [ 1, $text{'yes'} ], | ||
| 24 | - [ 0, $text{'no'} ] ])); | ||
| 25 | - } | ||
| 26 | - | ||
| 27 | # Restart Webmin | ||
| 28 | if (!$miniserv{'inetd'} && $ENV{'MINISERV_CONFIG'}) { | ||
| 29 | print &ui_buttons_row("restart.cgi", | ||
diff --git a/meta-webserver/recipes-webadmin/webmin/files/samba-config-fix.patch b/meta-webserver/recipes-webadmin/webmin/files/samba-config-fix.patch new file mode 100644 index 0000000000..46645ac30e --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/samba-config-fix.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | Upstream-status: Inappropriate [configuration] | ||
| 2 | |||
| 3 | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> | ||
| 4 | |||
| 5 | Index: webmin-1.570/samba/config-generic-linux | ||
| 6 | =================================================================== | ||
| 7 | --- webmin-1.570.orig/samba/config-generic-linux 2011-10-25 20:11:35.000000000 +0800 | ||
| 8 | +++ webmin-1.570/samba/config-generic-linux 2011-10-25 20:15:41.000000000 +0800 | ||
| 9 | @@ -1,15 +1,15 @@ | ||
| 10 | list_printers_command=lpc status | grep "[A-z0-9]:" | sed -e 's/://g' | ||
| 11 | -smb_passwd=/usr/local/samba/private/smbpasswd | ||
| 12 | +smb_passwd=/usr/bin/smbpasswd | ||
| 13 | text_lists=0 | ||
| 14 | dont_convert=-499 | ||
| 15 | -name_server=/usr/local/samba/bin/nmbd | ||
| 16 | -smb_conf=/usr/local/samba/lib/smb.conf | ||
| 17 | -samba_server=/usr/local/samba/bin/smbd | ||
| 18 | +name_server=/usr/sbin/nmbd | ||
| 19 | +smb_conf=/etc/samba/smb.conf | ||
| 20 | +samba_server=/usr/sbin/smbd | ||
| 21 | run_from_inetd=0 | ||
| 22 | -samba_password_program=/usr/local/samba/bin/smbpasswd | ||
| 23 | -samba_status_program=/usr/local/samba/bin/smbstatus | ||
| 24 | +samba_password_program=/usr/bin/smbpasswd | ||
| 25 | +samba_status_program=/usr/bin/smbstatus | ||
| 26 | swat_path=/usr/local/samba/bin/swat | ||
| 27 | sort_mode=0 | ||
| 28 | smbgroupedit=/usr/local/samba/bin/smbgroupedit | ||
| 29 | -pdbedit=/usr/local/samba/bin/pdbedit | ||
| 30 | -net=/usr/local/samba/bin/net | ||
| 31 | +pdbedit=/usr/bin/pdbedit | ||
| 32 | +net=/usr/bin/net | ||
diff --git a/meta-webserver/recipes-webadmin/webmin/files/setup.sh b/meta-webserver/recipes-webadmin/webmin/files/setup.sh new file mode 100755 index 0000000000..8d24f928f6 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/files/setup.sh | |||
| @@ -0,0 +1,340 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # Modified version of setup.sh distributed with webmin | ||
| 3 | |||
| 4 | if [ "$wadir" = "" ]; then | ||
| 5 | echo "ERROR: wadir not specified" | ||
| 6 | echo "" | ||
| 7 | exit 1 | ||
| 8 | fi | ||
| 9 | |||
| 10 | config_dir_runtime=$config_dir | ||
| 11 | config_dir=$prefix$config_dir | ||
| 12 | |||
| 13 | wadir_runtime=$wadir | ||
| 14 | wadir=$prefix$wadir | ||
| 15 | |||
| 16 | ver=`cat "$wadir/version"` | ||
| 17 | |||
| 18 | cd "$wadir" | ||
| 19 | |||
| 20 | # Work out perl library path | ||
| 21 | PERLLIB=$wadir | ||
| 22 | |||
| 23 | # Validate source directory | ||
| 24 | allmods=`cd "$wadir"; echo */module.info | sed -e 's/\/module.info//g'` | ||
| 25 | if [ "$allmods" = "" ]; then | ||
| 26 | echo "ERROR: Failed to get module list" | ||
| 27 | echo "" | ||
| 28 | exit 1 | ||
| 29 | fi | ||
| 30 | echo "" | ||
| 31 | |||
| 32 | if [ "$login" = "webmin" ]; then | ||
| 33 | echo "ERROR: Username 'webmin' is reserved for internal use" | ||
| 34 | echo "" | ||
| 35 | exit 14 | ||
| 36 | fi | ||
| 37 | |||
| 38 | # Create webserver config file | ||
| 39 | echo $perl > $config_dir/perl-path | ||
| 40 | echo $var_dir > $config_dir/var-path | ||
| 41 | echo "Creating web server config files.." | ||
| 42 | cfile=$config_dir/miniserv.conf | ||
| 43 | echo "port=$port" >> $cfile | ||
| 44 | echo "root=$wadir_runtime" >> $cfile | ||
| 45 | echo "mimetypes=$wadir_runtime/mime.types" >> $cfile | ||
| 46 | echo "addtype_cgi=internal/cgi" >> $cfile | ||
| 47 | echo "realm=Webmin Server" >> $cfile | ||
| 48 | echo "logfile=$var_dir/miniserv.log" >> $cfile | ||
| 49 | echo "errorlog=$var_dir/miniserv.error" >> $cfile | ||
| 50 | echo "pidfile=$var_dir/miniserv.pid" >> $cfile | ||
| 51 | echo "logtime=168" >> $cfile | ||
| 52 | echo "ppath=$ppath" >> $cfile | ||
| 53 | echo "ssl=$ssl" >> $cfile | ||
| 54 | echo "env_WEBMIN_CONFIG=$config_dir_runtime" >> $cfile | ||
| 55 | echo "env_WEBMIN_VAR=$var_dir" >> $cfile | ||
| 56 | echo "atboot=$atboot" >> $cfile | ||
| 57 | echo "logout=$config_dir_runtime/logout-flag" >> $cfile | ||
| 58 | if [ "$listen" != "" ]; then | ||
| 59 | echo "listen=$listen" >> $cfile | ||
| 60 | else | ||
| 61 | echo "listen=10000" >> $cfile | ||
| 62 | fi | ||
| 63 | echo "denyfile=\\.pl\$" >> $cfile | ||
| 64 | echo "log=1" >> $cfile | ||
| 65 | echo "blockhost_failures=5" >> $cfile | ||
| 66 | echo "blockhost_time=60" >> $cfile | ||
| 67 | echo "syslog=1" >> $cfile | ||
| 68 | if [ "$allow" != "" ]; then | ||
| 69 | echo "allow=$allow" >> $cfile | ||
| 70 | fi | ||
| 71 | if [ "$session" != "" ]; then | ||
| 72 | echo "session=$session" >> $cfile | ||
| 73 | else | ||
| 74 | echo "session=1" >> $cfile | ||
| 75 | fi | ||
| 76 | if [ "$pam" != "" ]; then | ||
| 77 | echo "pam=$pam" >> $cfile | ||
| 78 | fi | ||
| 79 | if [ "$no_pam" != "" ]; then | ||
| 80 | echo "no_pam=$no_pam" >> $cfile | ||
| 81 | fi | ||
| 82 | echo premodules=WebminCore >> $cfile | ||
| 83 | echo "server=MiniServ/$ver" >> $cfile | ||
| 84 | |||
| 85 | md5pass=`$perl -e 'print crypt("test", "\\$1\\$A9wB3O18\\$zaZgqrEmb9VNltWTL454R/") eq "\\$1\\$A9wB3O18\\$zaZgqrEmb9VNltWTL454R/" ? "1\n" : "0\n"'` | ||
| 86 | |||
| 87 | ufile=$config_dir/miniserv.users | ||
| 88 | if [ "$crypt" != "" ]; then | ||
| 89 | echo "$login:$crypt:0" > $ufile | ||
| 90 | else | ||
| 91 | if [ "$md5pass" = "1" ]; then | ||
| 92 | $perl -e 'print "$ARGV[0]:",crypt($ARGV[1], "\$1\$XXXXXXXX"),":0\n"' "$login" "$password" > $ufile | ||
| 93 | else | ||
| 94 | $perl -e 'print "$ARGV[0]:",crypt($ARGV[1], "XX"),":0\n"' "$login" "$password" > $ufile | ||
| 95 | fi | ||
| 96 | fi | ||
| 97 | chmod 600 $ufile | ||
| 98 | echo "userfile=$config_dir_runtime/miniserv.users" >> $cfile | ||
| 99 | |||
| 100 | kfile=$config_dir/miniserv.pem | ||
| 101 | openssl version >/dev/null 2>&1 | ||
| 102 | if [ "$?" = "0" ]; then | ||
| 103 | # We can generate a new SSL key for this host | ||
| 104 | host=`hostname` | ||
| 105 | openssl req -newkey rsa:512 -x509 -nodes -out $tempdir/cert -keyout $tempdir/key -days 1825 >/dev/null 2>&1 <<EOF | ||
| 106 | . | ||
| 107 | . | ||
| 108 | . | ||
| 109 | Webmin Webserver on $host | ||
| 110 | . | ||
| 111 | * | ||
| 112 | root@$host | ||
| 113 | EOF | ||
| 114 | if [ "$?" = "0" ]; then | ||
| 115 | cat $tempdir/cert $tempdir/key >$kfile | ||
| 116 | fi | ||
| 117 | rm -f $tempdir/cert $tempdir/key | ||
| 118 | fi | ||
| 119 | if [ ! -r $kfile ]; then | ||
| 120 | # Fall back to the built-in key | ||
| 121 | cp "$wadir/miniserv.pem" $kfile | ||
| 122 | fi | ||
| 123 | chmod 600 $kfile | ||
| 124 | echo "keyfile=$config_dir_runtime/miniserv.pem" >> $cfile | ||
| 125 | |||
| 126 | chmod 600 $cfile | ||
| 127 | echo "..done" | ||
| 128 | echo "" | ||
| 129 | |||
| 130 | echo "Creating access control file.." | ||
| 131 | afile=$config_dir/webmin.acl | ||
| 132 | rm -f $afile | ||
| 133 | if [ "$defaultmods" = "" ]; then | ||
| 134 | echo "$login: $allmods" >> $afile | ||
| 135 | else | ||
| 136 | echo "$login: $defaultmods" >> $afile | ||
| 137 | fi | ||
| 138 | chmod 600 $afile | ||
| 139 | echo "..done" | ||
| 140 | echo "" | ||
| 141 | |||
| 142 | if [ "$login" != "root" -a "$login" != "admin" ]; then | ||
| 143 | # Allow use of RPC by this user | ||
| 144 | echo rpc=1 >>$config_dir/$login.acl | ||
| 145 | fi | ||
| 146 | |||
| 147 | if [ "$noperlpath" = "" ]; then | ||
| 148 | echo "Inserting path to perl into scripts.." | ||
| 149 | (find "$wadir" -name '*.cgi' -print ; find "$wadir" -name '*.pl' -print) | $perl "$wadir/perlpath.pl" $perl_runtime - | ||
| 150 | echo "..done" | ||
| 151 | echo "" | ||
| 152 | fi | ||
| 153 | |||
| 154 | echo "Creating start and stop scripts.." | ||
| 155 | rm -f $config_dir/stop $config_dir/start $config_dir/restart $config_dir/reload | ||
| 156 | echo "#!/bin/sh" >>$config_dir/start | ||
| 157 | echo "echo Starting Webmin server in $wadir_runtime" >>$config_dir/start | ||
| 158 | echo "trap '' 1" >>$config_dir/start | ||
| 159 | echo "LANG=" >>$config_dir/start | ||
| 160 | echo "export LANG" >>$config_dir/start | ||
| 161 | echo "#PERLIO=:raw" >>$config_dir/start | ||
| 162 | echo "unset PERLIO" >>$config_dir/start | ||
| 163 | echo "export PERLIO" >>$config_dir/start | ||
| 164 | echo "PERLLIB=$PERLLIB" >>$config_dir/start | ||
| 165 | echo "export PERLLIB" >>$config_dir/start | ||
| 166 | uname -a | grep -i 'HP/*UX' >/dev/null | ||
| 167 | if [ $? = "0" ]; then | ||
| 168 | echo "exec '$wadir_runtime/miniserv.pl' $config_dir_runtime/miniserv.conf &" >>$config_dir/start | ||
| 169 | else | ||
| 170 | echo "exec '$wadir_runtime/miniserv.pl' $config_dir_runtime/miniserv.conf" >>$config_dir/start | ||
| 171 | fi | ||
| 172 | |||
| 173 | echo "#!/bin/sh" >>$config_dir/stop | ||
| 174 | echo "echo Stopping Webmin server in $wadir_runtime" >>$config_dir/stop | ||
| 175 | echo "pidfile=\`grep \"^pidfile=\" $config_dir_runtime/miniserv.conf | sed -e 's/pidfile=//g'\`" >>$config_dir/stop | ||
| 176 | echo "kill \`cat \$pidfile\`" >>$config_dir/stop | ||
| 177 | |||
| 178 | echo "#!/bin/sh" >>$config_dir/restart | ||
| 179 | echo "$config_dir_runtime/stop && $config_dir_runtime/start" >>$config_dir/restart | ||
| 180 | |||
| 181 | echo "#!/bin/sh" >>$config_dir/reload | ||
| 182 | echo "echo Reloading Webmin server in $wadir_runtime" >>$config_dir/reload | ||
| 183 | echo "pidfile=\`grep \"^pidfile=\" $config_dir_runtime/miniserv.conf | sed -e 's/pidfile=//g'\`" >>$config_dir/reload | ||
| 184 | echo "kill -USR1 \`cat \$pidfile\`" >>$config_dir/reload | ||
| 185 | |||
| 186 | chmod 755 $config_dir/start $config_dir/stop $config_dir/restart $config_dir/reload | ||
| 187 | echo "..done" | ||
| 188 | echo "" | ||
| 189 | |||
| 190 | if [ "$upgrading" = 1 ]; then | ||
| 191 | echo "Updating config files.." | ||
| 192 | else | ||
| 193 | echo "Copying config files.." | ||
| 194 | fi | ||
| 195 | newmods=`$perl "$wadir/copyconfig.pl" "$os_type/$real_os_type" "$os_version/$real_os_version" "$wadir" $config_dir "" $allmods` | ||
| 196 | # Store the OS and version | ||
| 197 | echo "os_type=$os_type" >> $config_dir/config | ||
| 198 | echo "os_version=$os_version" >> $config_dir/config | ||
| 199 | echo "real_os_type=$real_os_type" >> $config_dir/config | ||
| 200 | echo "real_os_version=$real_os_version" >> $config_dir/config | ||
| 201 | if [ -r /etc/system.cnf ]; then | ||
| 202 | # Found a caldera system config file .. get the language | ||
| 203 | source /etc/system.cnf | ||
| 204 | if [ "$CONF_LST_LANG" = "us" ]; then | ||
| 205 | CONF_LST_LANG=en | ||
| 206 | elif [ "$CONF_LST_LANG" = "uk" ]; then | ||
| 207 | CONF_LST_LANG=en | ||
| 208 | fi | ||
| 209 | grep "lang=$CONF_LST_LANG," "$wadir/lang_list.txt" >/dev/null 2>&1 | ||
| 210 | if [ "$?" = 0 ]; then | ||
| 211 | echo "lang=$CONF_LST_LANG" >> $config_dir/config | ||
| 212 | fi | ||
| 213 | fi | ||
| 214 | |||
| 215 | # Turn on logging by default | ||
| 216 | echo "log=1" >> $config_dir/config | ||
| 217 | |||
| 218 | # Use licence module specified by environment variable | ||
| 219 | if [ "$licence_module" != "" ]; then | ||
| 220 | echo licence_module=$licence_module >>$config_dir/config | ||
| 221 | fi | ||
| 222 | |||
| 223 | # Disallow unknown referers by default | ||
| 224 | echo "referers_none=1" >>$config_dir/config | ||
| 225 | echo $ver > $config_dir/version | ||
| 226 | echo "..done" | ||
| 227 | echo "" | ||
| 228 | |||
| 229 | # Set passwd_ fields in miniserv.conf from global config | ||
| 230 | for field in passwd_file passwd_uindex passwd_pindex passwd_cindex passwd_mindex; do | ||
| 231 | grep $field= $config_dir/miniserv.conf >/dev/null | ||
| 232 | if [ "$?" != "0" ]; then | ||
| 233 | grep $field= $config_dir/config >> $config_dir/miniserv.conf | ||
| 234 | fi | ||
| 235 | done | ||
| 236 | grep passwd_mode= $config_dir/miniserv.conf >/dev/null | ||
| 237 | if [ "$?" != "0" ]; then | ||
| 238 | echo passwd_mode=0 >> $config_dir/miniserv.conf | ||
| 239 | fi | ||
| 240 | |||
| 241 | # If Perl crypt supports MD5, then make it the default | ||
| 242 | if [ "$md5pass" = "1" ]; then | ||
| 243 | echo md5pass=1 >> $config_dir/config | ||
| 244 | fi | ||
| 245 | |||
| 246 | # Set a special theme if none was set before | ||
| 247 | if [ "$theme" = "" ]; then | ||
| 248 | theme=`cat "$wadir/defaulttheme" 2>/dev/null` | ||
| 249 | fi | ||
| 250 | oldthemeline=`grep "^theme=" $config_dir/config` | ||
| 251 | oldtheme=`echo $oldthemeline | sed -e 's/theme=//g'` | ||
| 252 | if [ "$theme" != "" ] && [ "$oldthemeline" = "" ] && [ -d "$wadir/$theme" ]; then | ||
| 253 | themelist=$theme | ||
| 254 | fi | ||
| 255 | |||
| 256 | # Set a special overlay if none was set before | ||
| 257 | if [ "$overlay" = "" ]; then | ||
| 258 | overlay=`cat "$wadir/defaultoverlay" 2>/dev/null` | ||
| 259 | fi | ||
| 260 | if [ "$overlay" != "" ] && [ "$theme" != "" ] && [ -d "$wadir/$overlay" ]; then | ||
| 261 | themelist="$themelist $overlay" | ||
| 262 | fi | ||
| 263 | |||
| 264 | # Apply the theme and maybe overlay | ||
| 265 | if [ "$themelist" != "" ]; then | ||
| 266 | echo "theme=$themelist" >> $config_dir/config | ||
| 267 | echo "preroot=$themelist" >> $config_dir/miniserv.conf | ||
| 268 | fi | ||
| 269 | |||
| 270 | # Set the product field in the global config | ||
| 271 | grep product= $config_dir/config >/dev/null | ||
| 272 | if [ "$?" != "0" ]; then | ||
| 273 | echo product=webmin >> $config_dir/config | ||
| 274 | fi | ||
| 275 | |||
| 276 | if [ "$makeboot" = "1" ]; then | ||
| 277 | echo "Configuring Webmin to start at boot time.." | ||
| 278 | (cd "$wadir/init" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/init/atboot.pl" $bootscript) | ||
| 279 | echo "..done" | ||
| 280 | echo "" | ||
| 281 | fi | ||
| 282 | |||
| 283 | # If password delays are not specifically disabled, enable them | ||
| 284 | grep passdelay= $config_dir/miniserv.conf >/dev/null | ||
| 285 | if [ "$?" != "0" ]; then | ||
| 286 | echo passdelay=1 >> $config_dir/miniserv.conf | ||
| 287 | fi | ||
| 288 | |||
| 289 | echo "Changing ownership and permissions .." | ||
| 290 | # Make all config dirs non-world-readable | ||
| 291 | for m in $newmods; do | ||
| 292 | chown -R root $config_dir/$m | ||
| 293 | chgrp -R bin $config_dir/$m | ||
| 294 | chmod -R og-rw $config_dir/$m | ||
| 295 | done | ||
| 296 | # Make miniserv config files non-world-readable | ||
| 297 | for f in miniserv.conf miniserv.pem miniserv.users; do | ||
| 298 | chown -R root $config_dir/$f | ||
| 299 | chgrp -R bin $config_dir/$f | ||
| 300 | chmod -R og-rw $config_dir/$f | ||
| 301 | done | ||
| 302 | chmod +r $config_dir/version | ||
| 303 | if [ "$nochown" = "" ]; then | ||
| 304 | # Make program directory non-world-writable, but executable | ||
| 305 | chown -R root "$wadir" | ||
| 306 | chgrp -R bin "$wadir" | ||
| 307 | chmod -R og-w "$wadir" | ||
| 308 | chmod -R a+rx "$wadir" | ||
| 309 | fi | ||
| 310 | if [ $var_dir != "/var" ]; then | ||
| 311 | # Make log directory non-world-readable or writable | ||
| 312 | chown -R root $prefix$var_dir | ||
| 313 | chgrp -R bin $prefix$var_dir | ||
| 314 | chmod -R og-rwx $prefix$var_dir | ||
| 315 | fi | ||
| 316 | # Fix up bad permissions from some older installs | ||
| 317 | for m in ldap-client ldap-server ldap-useradmin mailboxes mysql postgresql servers virtual-server; do | ||
| 318 | if [ -d "$config_dir/$m" ]; then | ||
| 319 | chown root $config_dir/$m | ||
| 320 | chgrp bin $config_dir/$m | ||
| 321 | chmod og-rw $config_dir/$m | ||
| 322 | chmod og-rw $config_dir/$m/config 2>/dev/null | ||
| 323 | fi | ||
| 324 | done | ||
| 325 | |||
| 326 | if [ "$nopostinstall" = "" ]; then | ||
| 327 | echo "Running postinstall scripts .." | ||
| 328 | (cd "$wadir" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/run-postinstalls.pl") | ||
| 329 | echo "..done" | ||
| 330 | echo "" | ||
| 331 | fi | ||
| 332 | |||
| 333 | # Enable background collection | ||
| 334 | if [ "$upgrading" != 1 -a -r $config_dir/system-status/enable-collection.pl ]; then | ||
| 335 | echo "Enabling background status collection .." | ||
| 336 | $config_dir/system-status/enable-collection.pl 5 | ||
| 337 | echo "..done" | ||
| 338 | echo "" | ||
| 339 | fi | ||
| 340 | |||
diff --git a/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb b/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb new file mode 100644 index 0000000000..8822b92fb3 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb | |||
| @@ -0,0 +1,139 @@ | |||
| 1 | SUMMARY = "Web-based administration interface" | ||
| 2 | HOMEPAGE = "http://www.webmin.com" | ||
| 3 | LICENSE = "BSD" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENCE;md5=0373ac9f611e542ddebe1ec6394afc3c" | ||
| 5 | |||
| 6 | SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \ | ||
| 7 | file://setup.sh \ | ||
| 8 | file://init-exclude.patch \ | ||
| 9 | file://net-generic.patch \ | ||
| 10 | file://remove-startup-option.patch \ | ||
| 11 | file://disable-version-check.patch \ | ||
| 12 | file://nfs-export.patch \ | ||
| 13 | file://exports-lib.pl.patch \ | ||
| 14 | file://mount-excludefs.patch \ | ||
| 15 | file://samba-config-fix.patch \ | ||
| 16 | file://proftpd-config-fix.patch \ | ||
| 17 | file://net-lib.pl.patch \ | ||
| 18 | file://media-tomb.patch" | ||
| 19 | |||
| 20 | SRC_URI[md5sum] = "e93bc5057a5b7d7e31ecb2bb228d7044" | ||
| 21 | SRC_URI[sha256sum] = "3d36153406d8e5d3dcaeadba34dfb5cdbc4060b75c38339174ac97b2277f284b" | ||
| 22 | |||
| 23 | inherit allarch perlnative update-rc.d | ||
| 24 | |||
| 25 | do_configure() { | ||
| 26 | # Remove binaries and plugins for other platforms | ||
| 27 | rm -rf acl/Authen-SolarisRBAC-0.1* | ||
| 28 | rm -rf format bsdexports hpuxexports sgiexports | ||
| 29 | rm -rf zones rbac smf ipfw ipfilter dfsadmin | ||
| 30 | rm -f mount/freebsd-mounts* mount/netbsd-mounts* | ||
| 31 | rm -f mount/openbsd-mounts* mount/macos-mounts* | ||
| 32 | |||
| 33 | # Remove some plugins for the moment | ||
| 34 | rm -rf lilo frox wuftpd telnet pserver cpan shorewall webalizer cfengine fsdump pap | ||
| 35 | rm -rf majordomo fetchmail sendmail mailboxes procmail filter mailcap dovecot exim spam qmailadmin postfix | ||
| 36 | rm -rf stunnel squid sarg pptp-client pptp-server jabber openslp sentry cluster-* vgetty burner heartbeat | ||
| 37 | |||
| 38 | # Adjust configs | ||
| 39 | mv init/config-debian-linux init/config-generic-linux | ||
| 40 | sed -i "s/shutdown_command=.*/shutdown_command=poweroff/" init/config-generic-linux | ||
| 41 | echo "exclude=bootmisc.sh,single,halt,reboot,hostname.sh,modutils.sh,mountall.sh,mountnfs.sh,networking,populate-volatile.sh,rmnologin.sh,save-rtc.sh,umountfs,umountnfs.sh,hwclock.sh,checkroot.sh,banner.sh,udev,udev-cache,devpts.sh,psplash.sh,sendsigs,fbsetup,bootlogd,stop-bootlogd,sysfs.sh,syslog,syslog.busybox,urandom,webmin,functions.initscripts,read-only-rootfs-hook.sh" >> init/config-generic-linux | ||
| 42 | echo "excludefs=devpts,devtmpfs,usbdevfs,proc,tmpfs,sysfs,debugfs" >> mount/config-generic-linux | ||
| 43 | |||
| 44 | mv exports/config-debian-linux exports/config-generic-linux | ||
| 45 | sed -i "s/killall -HUP rpc.nfsd && //" exports/config-generic-linux | ||
| 46 | sed -i "s/netstd_nfs/nfsserver/g" exports/config-generic-linux | ||
| 47 | |||
| 48 | # Fix insane naming that causes problems at packaging time (must be done before deleting below) | ||
| 49 | find . -name "*\**" | while read from | ||
| 50 | do | ||
| 51 | to=`echo "$from" | sed "s/*/ALL/"` | ||
| 52 | mv "$from" "$to" | ||
| 53 | done | ||
| 54 | |||
| 55 | # Remove some other files we don't need | ||
| 56 | find . -name "config-*" -a \! -name "config-generic-linux" -a \! -name "config-ALL-linux" -a \! -name "*.pl" -delete | ||
| 57 | find . -regextype posix-extended -regex ".*/(openserver|aix|osf1|osf|openbsd|netbsd|freebsd|unixware|solaris|macos|irix|hpux|cygwin|windows)-lib\.pl" -delete | ||
| 58 | rm -f webmin-gentoo-init webmin-caldera-init webmin-debian-pam webmin-pam | ||
| 59 | |||
| 60 | # Don't need these at runtime (and we have our own setup script) | ||
| 61 | rm -f setup.sh | ||
| 62 | rm -f setup.pl | ||
| 63 | |||
| 64 | # Use pidof for finding PIDs | ||
| 65 | sed -i "s/find_pid_command=.*/find_pid_command=pidof NAME/" config-generic-linux | ||
| 66 | } | ||
| 67 | |||
| 68 | do_install() { | ||
| 69 | install -d ${D}${sysconfdir} | ||
| 70 | install -d ${D}${sysconfdir}/webmin | ||
| 71 | install -d ${D}${sysconfdir}/init.d | ||
| 72 | install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin | ||
| 73 | |||
| 74 | install -d ${D}${localstatedir} | ||
| 75 | install -d ${D}${localstatedir}/webmin | ||
| 76 | |||
| 77 | install -d ${D}${libexecdir}/webmin | ||
| 78 | cp -pPR ${S}/* ${D}${libexecdir}/webmin | ||
| 79 | rm -f ${D}${libexecdir}/webmin/webmin-init | ||
| 80 | rm -rf ${D}${libexecdir}/webmin/patches | ||
| 81 | |||
| 82 | # Run setup script | ||
| 83 | export perl=perl | ||
| 84 | export perl_runtime=${bindir}/perl | ||
| 85 | export prefix=${D} | ||
| 86 | export tempdir=${S}/install_tmp | ||
| 87 | export wadir=${libexecdir}/webmin | ||
| 88 | export config_dir=${sysconfdir}/webmin | ||
| 89 | export var_dir=${localstatedir}/webmin | ||
| 90 | export os_type=generic-linux | ||
| 91 | export os_version=0 | ||
| 92 | export real_os_type="${DISTRO_NAME}" | ||
| 93 | export real_os_version="${DISTRO_VERSION}" | ||
| 94 | export port=10000 | ||
| 95 | export login=admin | ||
| 96 | export password=password | ||
| 97 | export ssl=0 | ||
| 98 | export atboot=1 | ||
| 99 | export no_pam=1 | ||
| 100 | mkdir -p $tempdir | ||
| 101 | ${S}/../setup.sh | ||
| 102 | } | ||
| 103 | |||
| 104 | INITSCRIPT_NAME = "webmin" | ||
| 105 | INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." | ||
| 106 | |||
| 107 | # FIXME: some of this should be figured out automatically | ||
| 108 | RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict" | ||
| 109 | RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader" | ||
| 110 | RDEPENDS_${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant" | ||
| 111 | RDEPENDS_${PN} += "perl-module-file-glob perl-module-file-copy perl-module-sdbm perl-module-sdbm-file perl-module-timelocal perl-module-feature" | ||
| 112 | |||
| 113 | PACKAGES_DYNAMIC += "webmin-module-*" | ||
| 114 | RRECOMMENDS_${PN} += "webmin-module-system-status" | ||
| 115 | |||
| 116 | RDEPENDS_webmin-module-proc = "procps" | ||
| 117 | RDEPENDS_webmin-module-raid = "mdadm" | ||
| 118 | RDEPENDS_webmin-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix" | ||
| 119 | RRECOMMENDS_webmin-module-fdisk = "parted" | ||
| 120 | RRECOMMENDS_webmin-module-lvm = "lvm2" | ||
| 121 | |||
| 122 | python populate_packages_prepend() { | ||
| 123 | import os, os.path | ||
| 124 | |||
| 125 | wadir = bb.data.expand('${libexecdir}/webmin', d) | ||
| 126 | wadir_image = bb.data.expand('${D}', d) + wadir | ||
| 127 | modules = [] | ||
| 128 | for mod in os.listdir(wadir_image): | ||
| 129 | modinfo = os.path.join(wadir_image, mod, "module.info") | ||
| 130 | if os.path.exists(modinfo): | ||
| 131 | modules.append(mod) | ||
| 132 | |||
| 133 | do_split_packages(d, wadir, '^(%s)$' % "|".join(modules), 'webmin-module-%s', 'Webmin module for %s', allow_dirs=True, prepend=True) | ||
| 134 | } | ||
| 135 | |||
| 136 | # Time-savers | ||
| 137 | package_do_pkgconfig() { | ||
| 138 | : | ||
| 139 | } | ||
