From bb4fedff5f6f74165c52f3c978ed98c7f3f5539e Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Wed, 20 Aug 2014 02:24:18 -0400 Subject: webmin: uprev from 1.620 to 1.700 Changed: - Adjust or remake the following patches based on 1.700: init-exclude.patch exports-lib.pl.patch Signed-off-by: Jackie Huang Signed-off-by: Martin Jansa --- .../webmin/files/exports-lib.pl.patch | 2 +- .../webmin/files/init-exclude.patch | 35 +++-- .../recipes-webadmin/webmin/webmin_1.620.bb | 148 --------------------- .../recipes-webadmin/webmin/webmin_1.700.bb | 148 +++++++++++++++++++++ 4 files changed, 172 insertions(+), 161 deletions(-) delete mode 100644 meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb create mode 100644 meta-webserver/recipes-webadmin/webmin/webmin_1.700.bb (limited to 'meta-webserver/recipes-webadmin/webmin') diff --git a/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch b/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch index 140ae7e450..177d8a372e 100644 --- a/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch +++ b/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch @@ -24,7 +24,7 @@ index 22891c0..1c67494 100755 # 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 &1 ---- webmin-1.570.orig/init/index.cgi -+++ webmin-1.570/init/index.cgi -@@ -48,19 +48,20 @@ elsif ($init_mode eq "init" && $access{' +# Signed-off-by: Jackie Huang +--- + init/index.cgi | 27 ++++++++++++++------------- + init/init-lib.pl | 5 +++-- + 2 files changed, 17 insertions(+), 15 deletions(-) + +diff --git a/init/index.cgi b/init/index.cgi +index d48b793..30dafd4 100755 +--- a/init/index.cgi ++++ b/init/index.cgi +@@ -45,19 +45,20 @@ elsif ($init_mode eq "init" && $access{'bootup'}) { : "$config{'init_dir'}/$ac[0]"); } @runlevels = &list_runlevels(); @@ -41,11 +49,11 @@ # For each action, look at /etc/rc*.d/* files to see if it is # started at boot -Index: webmin-1.570/init/init-lib.pl -=================================================================== ---- webmin-1.570.orig/init/init-lib.pl -+++ webmin-1.570/init/init-lib.pl -@@ -108,15 +108,17 @@ List boot time action names from init.d, +diff --git a/init/init-lib.pl b/init/init-lib.pl +index ead21ed..b41794b 100755 +--- a/init/init-lib.pl ++++ b/init/init-lib.pl +@@ -119,8 +119,9 @@ List boot time action names from init.d, such as httpd and cron. =cut sub list_actions { @@ -56,12 +64,15 @@ Index: webmin-1.570/init/init-lib.pl opendir(DIR, $dir); foreach $f (sort { lc($a) cmp lc($b) } readdir(DIR)) { if ($f eq "." || $f eq ".." || $f =~ /\.bak$/ || $f eq "functions" || - $f eq "core" || $f eq "README" || $f eq "rc" || $f eq "rcS" || +@@ -128,7 +129,7 @@ foreach $f (sort { lc($a) cmp lc($b) } readdir(DIR)) { -d "$dir/$f" || $f =~ /\.swp$/ || $f eq "skeleton" || $f =~ /\.lock$/ || $f =~ /\.dpkg-(old|dist)$/ || -- $f =~ /^\.depend\./ || $f eq '.legacy-bootordering') { next; } -+ $f =~ /^\.depend\./ || $f eq '.legacy-bootordering' || -+ grep {$_ eq $f} @exclude ) { next; } + $f =~ /^\.depend\./ || $f eq '.legacy-bootordering' || +- $f =~ /^mandrake/) { next; } ++ $f =~ /^mandrake/ || grep {$_ eq $f} @exclude ) { next; } if (@stbuf = stat("$dir/$f")) { push(@rv, "$f $stbuf[1]"); } +-- +2.0.0 + diff --git a/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb b/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb deleted file mode 100644 index 95540ccb73..0000000000 --- a/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb +++ /dev/null @@ -1,148 +0,0 @@ -SUMMARY = "Web-based administration interface" -HOMEPAGE = "http://www.webmin.com" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENCE;md5=0373ac9f611e542ddebe1ec6394afc3c" - -SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \ - file://setup.sh \ - file://init-exclude.patch \ - file://net-generic.patch \ - file://remove-startup-option.patch \ - file://disable-version-check.patch \ - file://nfs-export.patch \ - file://exports-lib.pl.patch \ - file://mount-excludefs.patch \ - file://samba-config-fix.patch \ - file://proftpd-config-fix.patch \ - file://net-lib.pl.patch \ - file://media-tomb.patch" - -SRC_URI[md5sum] = "e93bc5057a5b7d7e31ecb2bb228d7044" -SRC_URI[sha256sum] = "3d36153406d8e5d3dcaeadba34dfb5cdbc4060b75c38339174ac97b2277f284b" - -inherit perlnative update-rc.d - -do_configure() { - # Remove binaries and plugins for other platforms - rm -rf acl/Authen-SolarisRBAC-0.1* - rm -rf format bsdexports hpuxexports sgiexports - rm -rf zones rbac smf ipfw ipfilter dfsadmin - rm -f mount/freebsd-mounts* mount/netbsd-mounts* - rm -f mount/openbsd-mounts* mount/macos-mounts* - - # Remove some plugins for the moment - rm -rf lilo frox wuftpd telnet pserver cpan shorewall webalizer cfengine fsdump pap - rm -rf majordomo fetchmail sendmail mailboxes procmail filter mailcap dovecot exim spam qmailadmin postfix - rm -rf stunnel squid sarg pptp-client pptp-server jabber openslp sentry cluster-* vgetty burner heartbeat - - # Adjust configs - [ -f init/config-debian-linux ] && 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,functions.initscripts,read-only-rootfs-hook.sh" >> init/config-generic-linux - echo "excludefs=devpts,devtmpfs,usbdevfs,proc,tmpfs,sysfs,debugfs" >> mount/config-generic-linux - - [ -f exports/config-debian-linux ] && mv exports/config-debian-linux exports/config-generic-linux - sed -i "s/killall -HUP rpc.nfsd && //" exports/config-generic-linux - sed -i "s/netstd_nfs/nfsserver/g" exports/config-generic-linux - - # Fix insane naming that causes problems at packaging time (must be done before deleting below) - find . -name "*\**" | while read from - do - to=`echo "$from" | sed "s/*/ALL/"` - mv "$from" "$to" - done - - # 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 - 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 - rm -f setup.pl - - # Use pidof for finding PIDs - sed -i "s/find_pid_command=.*/find_pid_command=pidof NAME/" config-generic-linux -} - -WEBMIN_LOGIN ?= "admin" -WEBMIN_PASSWORD ?= "password" - -do_install() { - install -d ${D}${sysconfdir} - install -d ${D}${sysconfdir}/webmin - install -d ${D}${sysconfdir}/init.d - install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin - - install -d ${D}${localstatedir} - install -d ${D}${localstatedir}/webmin - - install -d ${D}${libexecdir}/webmin - cp -pPR ${S}/* ${D}${libexecdir}/webmin - rm -f ${D}${libexecdir}/webmin/webmin-init - rm -rf ${D}${libexecdir}/webmin/patches - - # Run setup script - export perl=perl - export perl_runtime=${bindir}/perl - export prefix=${D} - export tempdir=${S}/install_tmp - export wadir=${libexecdir}/webmin - export config_dir=${sysconfdir}/webmin - export var_dir=${localstatedir}/webmin - export os_type=generic-linux - export os_version=0 - export real_os_type="${DISTRO_NAME}" - export real_os_version="${DISTRO_VERSION}" - export port=10000 - export login=${WEBMIN_LOGIN} - export password=${WEBMIN_PASSWORD} - export ssl=0 - export atboot=1 - export no_pam=1 - mkdir -p $tempdir - ${S}/../setup.sh -} - -INITSCRIPT_NAME = "webmin" -INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." - -# FIXME: some of this should be figured out automatically -RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict" -RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader" -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-glob perl-module-file-copy perl-module-sdbm perl-module-sdbm-file perl-module-feature" - -PACKAGES_DYNAMIC += "webmin-module-* webmin-theme-*" -RRECOMMENDS_${PN} += "webmin-module-system-status" - -PACKAGES += "${PN}-module-proc ${PN}-module-raid ${PN}-module-exports ${PN}-module-fdisk ${PN}-module-lvm" -RDEPENDS_${PN}-module-proc = "procps" -RDEPENDS_${PN}-module-raid = "mdadm" -RDEPENDS_${PN}-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix" -RRECOMMENDS_${PN}-module-fdisk = "parted" -RRECOMMENDS_${PN}-module-lvm = "lvm2" - -python populate_packages_prepend() { - import os, os.path - - wadir = bb.data.expand('${libexecdir}/webmin', d) - wadir_image = bb.data.expand('${D}', d) + wadir - modules = [] - themes = [] - for mod in os.listdir(wadir_image): - modinfo = os.path.join(wadir_image, mod, "module.info") - themeinfo = os.path.join(wadir_image, mod, "theme.info") - if os.path.exists(modinfo): - modules.append(mod) - elif os.path.exists(themeinfo): - themes.append(mod) - - do_split_packages(d, wadir, '^(%s)$' % "|".join(modules), 'webmin-module-%s', 'Webmin module for %s', allow_dirs=True, prepend=True) - do_split_packages(d, wadir, '^(%s)$' % "|".join(themes), 'webmin-theme-%s', 'Webmin theme for %s', allow_dirs=True, prepend=True) -} - -# Time-savers -package_do_pkgconfig() { - : -} diff --git a/meta-webserver/recipes-webadmin/webmin/webmin_1.700.bb b/meta-webserver/recipes-webadmin/webmin/webmin_1.700.bb new file mode 100644 index 0000000000..45d635e099 --- /dev/null +++ b/meta-webserver/recipes-webadmin/webmin/webmin_1.700.bb @@ -0,0 +1,148 @@ +SUMMARY = "Web-based administration interface" +HOMEPAGE = "http://www.webmin.com" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENCE;md5=0373ac9f611e542ddebe1ec6394afc3c" + +SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \ + file://setup.sh \ + file://init-exclude.patch \ + file://net-generic.patch \ + file://remove-startup-option.patch \ + file://disable-version-check.patch \ + file://nfs-export.patch \ + file://exports-lib.pl.patch \ + file://mount-excludefs.patch \ + file://samba-config-fix.patch \ + file://proftpd-config-fix.patch \ + file://net-lib.pl.patch \ + file://media-tomb.patch" + +SRC_URI[md5sum] = "e5261114a6a6ed10caf570d3239ed5b7" +SRC_URI[sha256sum] = "1a6a8aa62c32c04932b902d17fc1864ee8f3fba03012bd25f709aa65e7e9b0f2" + +inherit perlnative update-rc.d + +do_configure() { + # Remove binaries and plugins for other platforms + rm -rf acl/Authen-SolarisRBAC-0.1* + rm -rf format bsdexports hpuxexports sgiexports + rm -rf zones rbac smf ipfw ipfilter dfsadmin + rm -f mount/freebsd-mounts* mount/netbsd-mounts* + rm -f mount/openbsd-mounts* mount/macos-mounts* + + # Remove some plugins for the moment + rm -rf lilo frox wuftpd telnet pserver cpan shorewall webalizer cfengine fsdump pap + rm -rf majordomo fetchmail sendmail mailboxes procmail filter mailcap dovecot exim spam qmailadmin postfix + rm -rf stunnel squid sarg pptp-client pptp-server jabber openslp sentry cluster-* vgetty burner heartbeat + + # Adjust configs + [ -f init/config-debian-linux ] && 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,functions.initscripts,read-only-rootfs-hook.sh" >> init/config-generic-linux + echo "excludefs=devpts,devtmpfs,usbdevfs,proc,tmpfs,sysfs,debugfs" >> mount/config-generic-linux + + [ -f exports/config-debian-linux ] && mv exports/config-debian-linux exports/config-generic-linux + sed -i "s/killall -HUP rpc.nfsd && //" exports/config-generic-linux + sed -i "s/netstd_nfs/nfsserver/g" exports/config-generic-linux + + # Fix insane naming that causes problems at packaging time (must be done before deleting below) + find . -name "*\**" | while read from + do + to=`echo "$from" | sed "s/*/ALL/"` + mv "$from" "$to" + done + + # 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 + 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 + rm -f setup.pl + + # Use pidof for finding PIDs + sed -i "s/find_pid_command=.*/find_pid_command=pidof NAME/" config-generic-linux +} + +WEBMIN_LOGIN ?= "admin" +WEBMIN_PASSWORD ?= "password" + +do_install() { + install -d ${D}${sysconfdir} + install -d ${D}${sysconfdir}/webmin + install -d ${D}${sysconfdir}/init.d + install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin + + install -d ${D}${localstatedir} + install -d ${D}${localstatedir}/webmin + + install -d ${D}${libexecdir}/webmin + cp -pPR ${S}/* ${D}${libexecdir}/webmin + rm -f ${D}${libexecdir}/webmin/webmin-init + rm -rf ${D}${libexecdir}/webmin/patches + + # Run setup script + export perl=perl + export perl_runtime=${bindir}/perl + export prefix=${D} + export tempdir=${S}/install_tmp + export wadir=${libexecdir}/webmin + export config_dir=${sysconfdir}/webmin + export var_dir=${localstatedir}/webmin + export os_type=generic-linux + export os_version=0 + export real_os_type="${DISTRO_NAME}" + export real_os_version="${DISTRO_VERSION}" + export port=10000 + export login=${WEBMIN_LOGIN} + export password=${WEBMIN_PASSWORD} + export ssl=0 + export atboot=1 + export no_pam=1 + mkdir -p $tempdir + ${S}/../setup.sh +} + +INITSCRIPT_NAME = "webmin" +INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." + +# FIXME: some of this should be figured out automatically +RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict" +RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader" +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-glob perl-module-file-copy perl-module-sdbm perl-module-sdbm-file perl-module-feature" + +PACKAGES_DYNAMIC += "webmin-module-* webmin-theme-*" +RRECOMMENDS_${PN} += "webmin-module-system-status" + +PACKAGES += "${PN}-module-proc ${PN}-module-raid ${PN}-module-exports ${PN}-module-fdisk ${PN}-module-lvm" +RDEPENDS_${PN}-module-proc = "procps" +RDEPENDS_${PN}-module-raid = "mdadm" +RDEPENDS_${PN}-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix" +RRECOMMENDS_${PN}-module-fdisk = "parted" +RRECOMMENDS_${PN}-module-lvm = "lvm2" + +python populate_packages_prepend() { + import os, os.path + + wadir = bb.data.expand('${libexecdir}/webmin', d) + wadir_image = bb.data.expand('${D}', d) + wadir + modules = [] + themes = [] + for mod in os.listdir(wadir_image): + modinfo = os.path.join(wadir_image, mod, "module.info") + themeinfo = os.path.join(wadir_image, mod, "theme.info") + if os.path.exists(modinfo): + modules.append(mod) + elif os.path.exists(themeinfo): + themes.append(mod) + + do_split_packages(d, wadir, '^(%s)$' % "|".join(modules), 'webmin-module-%s', 'Webmin module for %s', allow_dirs=True, prepend=True) + do_split_packages(d, wadir, '^(%s)$' % "|".join(themes), 'webmin-theme-%s', 'Webmin theme for %s', allow_dirs=True, prepend=True) +} + +# Time-savers +package_do_pkgconfig() { + : +} -- cgit 1.2.3-korg