diff options
-rw-r--r-- | recipes-extended/webmin/files/disable-version-check.patch | 38 | ||||
-rw-r--r-- | recipes-extended/webmin/files/mount-excludefs.patch | 17 | ||||
-rw-r--r-- | recipes-extended/webmin/files/remove-startup-option.patch | 29 | ||||
-rw-r--r-- | recipes-extended/webmin/webmin_1.570.bb | 11 |
4 files changed, 92 insertions, 3 deletions
diff --git a/recipes-extended/webmin/files/disable-version-check.patch b/recipes-extended/webmin/files/disable-version-check.patch new file mode 100644 index 0000000..585303f --- /dev/null +++ b/recipes-extended/webmin/files/disable-version-check.patch @@ -0,0 +1,38 @@ +# Disable OS version check in status screen, since it is not able to +# accurately detect the correct distro/version at the moment +# +# Upstream-status: Inappropriate +# +# Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> +--- webmin-1.570.orig/webmin/webmin-lib.pl ++++ webmin-1.570/webmin/webmin-lib.pl +@@ -1055,17 +1055,18 @@ my %miniserv; + &load_theme_library(); # So that UI functions work + + # Need OS upgrade +-my %realos = &detect_operating_system(undef, 1); +-if (($realos{'os_version'} ne $gconfig{'os_version'} || +- $realos{'os_type'} ne $gconfig{'os_type'}) && +- &foreign_available("webmin")) { +- push(@notifs, +- &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi"). +- &text('os_incorrect', $realos{'real_os_type'}, +- $realos{'real_os_version'})."<p>\n". +- &ui_form_end([ [ undef, $text{'os_fix'} ] ]) +- ); +- } ++# Disabled for now as os-chooser.pl does not work on our system ++#my %realos = &detect_operating_system(undef, 1); ++#if (($realos{'os_version'} ne $gconfig{'os_version'} || ++# $realos{'os_type'} ne $gconfig{'os_type'}) && ++# &foreign_available("webmin")) { ++# push(@notifs, ++# &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi"). ++# &text('os_incorrect', $realos{'real_os_type'}, ++# $realos{'real_os_version'})."<p>\n". ++# &ui_form_end([ [ undef, $text{'os_fix'} ] ]) ++# ); ++# } + + # Password close to expiry + my $warn_days = $config{'warn_days'}; diff --git a/recipes-extended/webmin/files/mount-excludefs.patch b/recipes-extended/webmin/files/mount-excludefs.patch new file mode 100644 index 0000000..58257eb --- /dev/null +++ b/recipes-extended/webmin/files/mount-excludefs.patch @@ -0,0 +1,17 @@ +Index: webmin-1.570/mount/index.cgi +=================================================================== +--- webmin-1.570.orig/mount/index.cgi ++++ webmin-1.570/mount/index.cgi +@@ -33,10 +33,12 @@ elsif ($config{'sort_mode'} == 1) { + } + + # Build visible filesystems list ++@excludefs = split(/,/, $config{excludefs}); + foreach $m (@all) { + @minfo = @$m; + $p = &simplify_mount_path($minfo[0], $minfo[2]); + next if ($ignore{$minfo[2]}); ++ next if (grep {$_ eq $minfo[2]} @excludefs); + @mmodes = &mount_modes($minfo[2], $minfo[0], $minfo[1]); + $canedit = $can_edit{$minfo[2]} && !$mmodes[4] && + &can_edit_fs(@minfo); diff --git a/recipes-extended/webmin/files/remove-startup-option.patch b/recipes-extended/webmin/files/remove-startup-option.patch new file mode 100644 index 0000000..8493af8 --- /dev/null +++ b/recipes-extended/webmin/files/remove-startup-option.patch @@ -0,0 +1,29 @@ +# Remove "start on boot" option from webmin configuration, as +# end-users should not need to configure this from the web interface +# +# Upstream-status: Inappropriate +# +# Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> +--- webmin-1.570.orig/webmin/index.cgi ++++ webmin-1.570/webmin/index.cgi +@@ -79,20 +79,6 @@ print &ui_buttons_start(); + my %miniserv; + &get_miniserv_config(\%miniserv); + +-if (&foreign_check("init")) { +- &foreign_require("init", "init-lib.pl"); +- my $starting = &init::action_status("webmin"); +- print &ui_buttons_row("bootup.cgi", +- $text{'index_boot'}, +- $text{'index_bootmsg'}. +- ($miniserv{'inetd'} ? "<b>$text{'index_inetd'}</b>" : +- !$ENV{'MINISERV_CONFIG'} ? "<b>$text{'index_apache'}</b>" : ""), +- &ui_hidden("starting", $starting), +- &ui_radio("boot", $starting == 2 ? 1 : 0, +- [ [ 1, $text{'yes'} ], +- [ 0, $text{'no'} ] ])); +- } +- + # Restart Webmin + if (!$miniserv{'inetd'} && $ENV{'MINISERV_CONFIG'}) { + print &ui_buttons_row("restart.cgi", diff --git a/recipes-extended/webmin/webmin_1.570.bb b/recipes-extended/webmin/webmin_1.570.bb index deeda9d..08aebe4 100644 --- a/recipes-extended/webmin/webmin_1.570.bb +++ b/recipes-extended/webmin/webmin_1.570.bb @@ -9,13 +9,16 @@ RDEPENDS_${PN} += "perl-module-warnings perl-module-warnings-register perl-modul RDEPENDS_${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant" RDEPENDS_${PN} += "perl-module-file perl-module-file-glob perl-module-sdbm perl-module-sdbm-file" -PR = "r2" +PR = "r3" SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \ file://setup.sh \ file://init-exclude.patch \ file://net-generic.patch \ - file://fdisk-partprobe-fix.patch" + file://fdisk-partprobe-fix.patch \ + file://remove-startup-option.patch \ + file://disable-version-check.patch \ + file://mount-excludefs.patch" inherit allarch perlnative update-rc.d @@ -35,13 +38,15 @@ do_configure() { mv init/config-debian-linux init/config-generic-linux sed -i "s/shutdown_command=.*/shutdown_command=poweroff/" init/config-generic-linux 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" >> init/config-generic-linux + echo "excludefs=devpts,devtmpfs,usbdevfs,proc,tmpfs,sysfs" >> mount/config-generic-linux # Fix insane naming that causes problems at packaging time (must be done before deleting below) find . -name "*\**" -exec rename \* ALL {} \; # Remove some other files we don't need find . -name "config-*" -a \! -name "config-generic-linux" -a \! -name "config-ALL-linux" -a \! -name "*.pl" -delete - rm -f webmin-gentoo-init + find . -regextype posix-extended -regex ".*/(openserver|aix|osf1|osf|openbsd|netbsd|freebsd|unixware|solaris|macos|irix|hpux|cygwin|windows)-lib\.pl" -delete + rm -f webmin-gentoo-init webmin-caldera-init webmin-debian-pam webmin-pam # Don't need these at runtime (and we have our own setup script) rm -f setup.sh |