Skip to contentSkip to conversation

webmin: add from meta-baryon

PATCH New Paul Eggleton 1 participant 1 message Jul 13, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 webmin: add from meta-baryon

No changes.

---
 .../webmin/files/disable-version-check.patch       |  45 +++
 .../webmin/files/exports-lib.pl.patch              |  32 ++
 .../webmin/files/init-exclude.patch                |  67 ++++
 .../recipes-webadmin/webmin/files/media-tomb.patch |  65 ++++
 .../webmin/files/mount-excludefs.patch             |  25 ++
 .../webmin/files/net-generic.patch                 |  21 ++
 .../recipes-webadmin/webmin/files/net-lib.pl.patch |  19 ++
 .../recipes-webadmin/webmin/files/nfs-export.patch |  39 +++
 .../webmin/files/proftpd-config-fix.patch          |  18 ++
 .../webmin/files/remove-startup-option.patch       |  29 ++
 .../webmin/files/samba-config-fix.patch            |  32 ++
 .../recipes-webadmin/webmin/files/setup.sh         | 340 +++++++++++++++++++++
 .../recipes-webadmin/webmin/webmin_1.620.bb        | 139 +++++++++
 13 files changed, 871 insertions(+)
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/net-generic.patch
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/proftpd-config-fix.patch
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/remove-startup-option.patch
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/samba-config-fix.patch
 create mode 100755 meta-webserver/recipes-webadmin/webmin/files/setup.sh
 create mode 100644 meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb
meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch new file +45 -0
new file mode 100644
index 0000000..a9ee405
@@ -0,0 +1,45 @@
+Disable OS version check in status screen
+
+The code is not able to accurately detect the correct distro/version at
+the moment.
+
+Upstream-status: Inappropriate
+
+Signed-off-by: Paul Eggleton <[email protected]>
+
+diff --git a/webmin/webmin-lib.pl b/webmin/webmin-lib.pl
+index 57a37f7..838b944 100755
+--- a/webmin/webmin-lib.pl
++++ b/webmin/webmin-lib.pl
+@@ -1059,18 +1059,19 @@ 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'}) &&
+-    $realos{'os_version'} && $realos{'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'}) &&
++#    $realos{'os_version'} && $realos{'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'};
meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch new file +32 -0
new file mode 100644
index 0000000..140ae7e
@@ -0,0 +1,32 @@
+From 7eba4c98c6953fa6ea76c1620d19524bcfa3a576 Mon Sep 17 00:00:00 2001
+From: Kevin Strasser <[email protected]>
+Date: Wed, 1 Aug 2012 11:51:26 -0700
+Subject: [PATCH] nfs export: remove nfsd check
+
+nfsd runs as a kernel process and does not have a pid. This means
+that the command assigned to apply_cmd will never be executed when
+the user tries to apply changes to nfs exports.
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Kevin Strasser <[email protected]>
+---
+ exports/exports-lib.pl |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/exports/exports-lib.pl b/exports/exports-lib.pl
+index 22891c0..1c67494 100755
+--- a/exports/exports-lib.pl
++++ b/exports/exports-lib.pl
+@@ -273,7 +273,7 @@ return !&has_command("rpc.nfsd") && !&has_command("nfsd") &&
+ sub restart_mountd
+ {
+ # Try exportfs -r first
+-if ($config{'apply_cmd'} && &find_byname("nfsd") && &find_byname("mountd")) {
++if ($config{'apply_cmd'} && &find_byname("mountd")) {
+ 	local $out = &backquote_logged("$config{'apply_cmd'} 2>&1 </dev/null");
+ 	if (!$? && $out !~ /invalid|error|failed/i) {
+ 		# Looks like it worked!
+-- 
+1.7.9.5
+
meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch new file +67 -0

67 lines not on this page · raw message

meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch new file +65 -0

65 lines not on this page · raw message

meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch new file +25 -0
new file mode 100644
index 0000000..8cb74c4
@@ -0,0 +1,25 @@
+Add excludefs config option to mount module
+
+Adds a configuration option (currently hidden) to allow the distro to
+hide certain filesystems from the mount module within Webmin (e.g. /dev)
+since these shouldn't be modified from the web interface.
+
+Signed-off-by: Paul Eggleton <[email protected]>
+
+Upstream-status: Pending
+
+--- 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);
meta-webserver/recipes-webadmin/webmin/files/net-generic.patch new file +21 -0
new file mode 100644
index 0000000..7d20aff
@@ -0,0 +1,21 @@
+# Add support for configuring network interfaces on a generic linux system
+#
+# Upstream-status: Not appropriate [config]
+#
+# Signed-off-by: Paul Eggleton <[email protected]>
+--- webmin-1.570.orig/net/module.info
++++ webmin-1.570/net/module.info
+@@ -11,7 +11,7 @@ desc_ko_KR.UTF-8=네트워크 구성
+ name=Networking
+ desc_tr=A� Yap�land�rmas�
+ desc_de=Netzwerkkonfiguration
+-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
++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
+ desc_sk=Konfigur�cia siete
+ desc_zh_CN=��������
+ risk=low medium high
+--- /dev/null
++++ webmin-1.570/net/generic-linux-lib.pl
+@@ -0,0 +1,2 @@
++do 'linux-lib.pl';
++
meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch new file +19 -0
new file mode 100644
index 0000000..bdba5e7
@@ -0,0 +1,19 @@
+Upstream-Status: Inappropriate [config]
+
+XXX: need to work out a better fix.
+
+Signed-off-by: Dexuan Cui <[email protected]>
+
+diff -Nru webmin-1.570.orig//net/net-lib.pl webmin-1.570/net/net-lib.pl
+--- webmin-1.570.orig//net/net-lib.pl	2011-10-03 09:01:48.000000000 +0800
++++ webmin-1.570/net/net-lib.pl	2011-10-28 13:52:56.138873664 +0800
+@@ -21,7 +21,8 @@
+ 	do "$gconfig{'os_type'}-9.1-ALL-lib.pl";
+ 	}
+ else {
+-	do "$gconfig{'os_type'}-lib.pl";
++	#do "$gconfig{'os_type'}-lib.pl";
++	do "debian-linux-lib.pl";
+ 	}
+ 
+ # list_hosts()
meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch new file +39 -0
new file mode 100644
index 0000000..c17e3b2
@@ -0,0 +1,39 @@
+commit e48f61d2f6df32a518bcb84db8c6eacfe5435c32
+Author: Yu Ke <[email protected]>
+Date:   Fri Oct 28 14:40:51 2011 +0800
+
+NFS export: fix syntax issue
+
+fix two syntax issue in /etc/exports:
+1. if it is exported to everyone, should use "*", e.g. "/export  *(xxx)"
+2. explicitly specify subtree_check or no_subtree_check, required by latest nfs-utils
+
+Upstream-Status: Pending
+
+Signed-off-by: Yu Ke <[email protected]>
+
+diff --git a/exports/save_export.cgi b/exports/save_export.cgi
+index 3bc2f97..3e60298 100755
+--- a/exports/save_export.cgi
++++ b/exports/save_export.cgi
+@@ -40,7 +40,7 @@ else {
+ 			&error(&text('save_enetmask', $in{'netmask'}));
+ 		$exp{'host'} = $in{'network'}."/".$in{'netmask'};
+ 		}
+-	elsif ($in{'mode'} == 3) { $exp{'host'} = ""; }
++	elsif ($in{'mode'} == 3) { $exp{'host'} = "*"; }
+ 	else {
+ 		$in{'host'} =~ /\*/ || &to_ipaddress($in{'host'}) ||
+ 			&error(&text('save_ehost', $in{'host'}));
+@@ -70,6 +70,11 @@ else {
+ 
+ 	delete($opts{'no_subtree_check'}); delete($opts{'subtree_check'});
+ 	$opts{'no_subtree_check'} = "" if ($in{'no_subtree_check'});
++	if ($in{'no_subtree_check'}) {
++		$opts{'no_subtree_check'} = "";
++	} else {
++		$opts{'subtree_check'} = "";
++	}
+ 
+ 	delete($opts{'nohide'}); delete($opts{'hide'});
+ 	$opts{'nohide'} = "" if ($in{'nohide'});
meta-webserver/recipes-webadmin/webmin/files/proftpd-config-fix.patch new file +18 -0
new file mode 100644
index 0000000..492a652
@@ -0,0 +1,18 @@
+Upstream-status: Inappropriate [configuration]
+
+Signed-off-by: Zhai Edwin <[email protected]>
+
+Index: webmin-1.570/proftpd/config
+===================================================================
+--- webmin-1.570.orig/proftpd/config	2011-10-25 20:18:37.000000000 +0800
++++ webmin-1.570/proftpd/config	2011-10-25 20:21:13.000000000 +0800
+@@ -1,6 +1,6 @@
+-proftpd_path=/usr/local/sbin/proftpd
+-proftpd_conf=/usr/local/etc/proftpd.conf
+-pid_file=/usr/local/var/proftpd.pid
++proftpd_path=/usr/sbin/proftpd
++proftpd_conf=/etc/proftpd.conf
++pid_file=/var/proftpd.pid
+ ftpusers=/etc/ftpusers
+ test_config=1
+ test_always=0
meta-webserver/recipes-webadmin/webmin/files/remove-startup-option.patch new file +29 -0
new file mode 100644
index 0000000..8493af8
@@ -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 <[email protected]>
+--- 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",
meta-webserver/recipes-webadmin/webmin/files/samba-config-fix.patch new file +32 -0
new file mode 100644
index 0000000..46645ac
@@ -0,0 +1,32 @@
+Upstream-status: Inappropriate [configuration]
+
+Signed-off-by: Zhai Edwin <[email protected]>
+
+Index: webmin-1.570/samba/config-generic-linux
+===================================================================
+--- webmin-1.570.orig/samba/config-generic-linux	2011-10-25 20:11:35.000000000 +0800
++++ webmin-1.570/samba/config-generic-linux	2011-10-25 20:15:41.000000000 +0800
+@@ -1,15 +1,15 @@
+ list_printers_command=lpc status | grep "[A-z0-9]:" | sed -e 's/://g'
+-smb_passwd=/usr/local/samba/private/smbpasswd
++smb_passwd=/usr/bin/smbpasswd
+ text_lists=0
+ dont_convert=-499
+-name_server=/usr/local/samba/bin/nmbd
+-smb_conf=/usr/local/samba/lib/smb.conf
+-samba_server=/usr/local/samba/bin/smbd
++name_server=/usr/sbin/nmbd
++smb_conf=/etc/samba/smb.conf
++samba_server=/usr/sbin/smbd
+ run_from_inetd=0
+-samba_password_program=/usr/local/samba/bin/smbpasswd
+-samba_status_program=/usr/local/samba/bin/smbstatus
++samba_password_program=/usr/bin/smbpasswd
++samba_status_program=/usr/bin/smbstatus
+ swat_path=/usr/local/samba/bin/swat
+ sort_mode=0
+ smbgroupedit=/usr/local/samba/bin/smbgroupedit
+-pdbedit=/usr/local/samba/bin/pdbedit
+-net=/usr/local/samba/bin/net
++pdbedit=/usr/bin/pdbedit
++net=/usr/bin/net
meta-webserver/recipes-webadmin/webmin/files/setup.sh new file +340 -0

340 lines not on this page · raw message

meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb new file +139 -0

139 lines not on this page · raw message

Signature · 1 line
1.8.1.2