diff options
Diffstat (limited to 'abs/extra/webmin/PKGBUILD')
-rw-r--r-- | abs/extra/webmin/PKGBUILD | 369 |
1 files changed, 173 insertions, 196 deletions
diff --git a/abs/extra/webmin/PKGBUILD b/abs/extra/webmin/PKGBUILD index c823016..e6d7fb1 100644 --- a/abs/extra/webmin/PKGBUILD +++ b/abs/extra/webmin/PKGBUILD @@ -1,225 +1,202 @@ -# $Id$ -# Maintainer: Tobias Powalowski <tpowa@archlinux.org> +# Maintainer: Amish <contact at via dot aur> +# Contributor: Daniel Milde <daniel at milde dot cz> +# Contributor: Felix Schindler <ftschindler at aur dot archlinux> + pkgname=webmin -pkgver=1.780 +pkgver=1.941 pkgrel=1 -pkgdesc="a web-based interface for system administration" -arch=(i686 x86_64) +pkgdesc="A web-based administration interface for Unix systems" +arch=(x86_64) license=('custom:webmin') url="http://www.webmin.com/" -depends=('perl' 'perl-perl4-corelibs') -makedepends=('perl-net-ssleay') -backup=('etc/webmin/miniserv.conf' 'etc/webmin/miniserv.users' 'etc/webmin/config' 'etc/webmin/webmin.cats' \ -'etc/webmin/pacman/config' \ -'etc/webmin/at/config' \ +depends=('perl' 'perl-net-ssleay' 'perl-authen-pam' 'perl-encode-detect' 'openssl') +backup=('etc/webmin/miniserv.conf' 'etc/webmin/miniserv.users' \ +'etc/webmin/config' 'etc/webmin/webmin.acl' \ 'etc/webmin/acl/config' \ -'etc/webmin/lvm/config' \ -'etc/webmin/net/config' \ -'etc/webmin/nis/config' \ -'etc/webmin/pam/config' \ -'etc/webmin/cron/config' \ -'etc/webmin/file/config' \ -'etc/webmin/grub/config' \ -'etc/webmin/init/config' \ -'etc/webmin/ipfw/config' \ -'etc/webmin/lilo/config' \ -'etc/webmin/proc/config' \ -'etc/webmin/raid/config' \ -'etc/webmin/spam/config' \ -'etc/webmin/sshd/config' \ -'etc/webmin/time/config' \ +'etc/webmin/adsl-client/config' \ +'etc/webmin/ajaxterm/config' \ +'etc/webmin/apache/config' \ +'etc/webmin/at/config' \ +'etc/webmin/backup-config/config' \ +'etc/webmin/bacula-backup/config' \ +'etc/webmin/bandwidth/config' \ +'etc/webmin/bind8/config' \ +'etc/webmin/change-user/config' \ +'etc/webmin/cluster-copy/config' \ +'etc/webmin/cluster-cron/config' \ 'etc/webmin/cluster-passwd/config' \ -'etc/webmin/software/config' \ -'etc/webmin/webminlog/config' \ +'etc/webmin/cluster-shell/config' \ +'etc/webmin/cluster-software/config' \ +'etc/webmin/cluster-useradmin/config' \ +'etc/webmin/cluster-usermin/config' \ 'etc/webmin/cluster-webmin/config' \ -'etc/webmin/bind8/config' \ +'etc/webmin/cron/config' \ +'etc/webmin/custom/config' \ 'etc/webmin/dhcpd/config' \ +'etc/webmin/dovecot/config' \ +'etc/webmin/exim/config' \ +'etc/webmin/exports/config' \ +'etc/webmin/fail2ban/config' \ 'etc/webmin/fdisk/config' \ +'etc/webmin/fetchmail/config' \ +'etc/webmin/filemin/config' \ +'etc/webmin/filter/config' \ +'etc/webmin/firewall/config' \ +'etc/webmin/firewall6/config' \ +'etc/webmin/firewalld/config' \ +'etc/webmin/fsdump/config' \ +'etc/webmin/heartbeat/config' \ +'etc/webmin/htaccess-htpasswd/config' \ +'etc/webmin/idmapd/config' \ +'etc/webmin/init/config' \ +'etc/webmin/inittab/config' \ +'etc/webmin/ipsec/config' \ +'etc/webmin/iscsi-client/config' \ +'etc/webmin/iscsi-server/config' \ +'etc/webmin/iscsi-target/config' \ +'etc/webmin/iscsi-tgtd/config' \ +'etc/webmin/jabber/config' \ +'etc/webmin/krb5/config' \ +'etc/webmin/ldap-client/config' \ +'etc/webmin/ldap-server/config' \ +'etc/webmin/ldap-useradmin/config' \ +'etc/webmin/logrotate/config' \ +'etc/webmin/lpadmin/config' \ +'etc/webmin/lvm/config' \ +'etc/webmin/mailboxes/config' \ +'etc/webmin/mailcap/config' \ +'etc/webmin/man/config' \ +'etc/webmin/mon/config' \ 'etc/webmin/mount/config' \ 'etc/webmin/mysql/config' \ +'etc/webmin/net/config' \ +'etc/webmin/nis/config' \ +'etc/webmin/openslp/config' \ +'etc/webmin/pam/config' \ +'etc/webmin/pap/config' \ +'etc/webmin/passwd/config' \ +'etc/webmin/phpini/config' \ +'etc/webmin/postfix/config' \ +'etc/webmin/postgresql/config' \ +'etc/webmin/ppp-client/config' \ +'etc/webmin/pptp-client/config' \ +'etc/webmin/pptp-server/config' \ +'etc/webmin/proc/config' \ +'etc/webmin/procmail/config' \ +'etc/webmin/proftpd/config' \ +'etc/webmin/qmailadmin/config' \ 'etc/webmin/quota/config' \ +'etc/webmin/raid/config' \ 'etc/webmin/samba/config' \ +'etc/webmin/sarg/config' \ +'etc/webmin/sendmail/config' \ +'etc/webmin/servers/config' \ 'etc/webmin/shell/config' \ +'etc/webmin/shorewall/config' \ +'etc/webmin/shorewall6/config' \ +'etc/webmin/smart-status/config' \ +'etc/webmin/spam/config' \ 'etc/webmin/squid/config' \ -'etc/webmin/adsl-client/config' \ -'etc/webmin/servers/config' \ -'etc/webmin/cluster-shell/config' \ -'etc/webmin/bandwidth/config' \ -'etc/webmin/ppp-client/config' \ -'etc/webmin/lpadmin/config' \ -'etc/webmin/apache/config' \ -'etc/webmin/firewall/config' \ -'etc/webmin/stunnel/config' \ -'etc/webmin/burner/config' \ -'etc/webmin/exports/config' \ -'etc/webmin/backup-config/config' \ -'etc/webmin/custom/config' \ -'etc/webmin/htaccess-htpasswd/config' \ -'etc/webmin/logrotate/config' \ -'etc/webmin/format/config' \ -'etc/webmin/fsdump/config' \ -'etc/webmin/passwd/config' \ -'etc/webmin/cluster-useradmin/config' \ -'etc/webmin/cluster-software/config' \ -'etc/webmin/cluster-copy/config' \ -'etc/webmin/cluster-cron/config' \ -'etc/webmin/telnet/config' \ +'etc/webmin/sshd/config' \ 'etc/webmin/status/config' \ +'etc/webmin/stunnel/config' \ 'etc/webmin/syslog/config' \ +'etc/webmin/system-status/config' \ +'etc/webmin/tcpwrappers/config' \ +'etc/webmin/telnet/config' \ +'etc/webmin/time/config' \ +'etc/webmin/tunnel/config' \ 'etc/webmin/updown/config' \ +'etc/webmin/useradmin/config' \ 'etc/webmin/usermin/config' \ +'etc/webmin/vgetty/config' \ +'etc/webmin/webalizer/config' \ 'etc/webmin/webmin/config' \ +'etc/webmin/webmincron/config' \ +'etc/webmin/webminlog/config' \ +'etc/webmin/wuftpd/config' \ 'etc/webmin/xinetd/config' \ -'etc/webmin/openslp/config' \ -'etc/webmin/procmail/config' \ -'etc/webmin/fetchmail/config' \ -'etc/webmin/postgresql/config' \ -'etc/webmin/useradmin/config' \ -'etc/webmin/mailboxes/config' \ -'etc/webmin/inittab/config' \ -'etc/webmin/change-user/config' \ -'etc/webmin/postfix/config' \ -'etc/webmin/proftpd/config' \ -'etc/webmin/pserver/config' \ -'etc/webmin/dnsadmin/config' ) -install=webmin.install -source=(http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz - ftp://ftp.archlinux.org/other/webmin/webmin-config.tar.bz2 - ftp://ftp.archlinux.org/other/webmin/webmin-pacman.tar.bz2 +'etc/logrotate.d/webmin' \ +'etc/pam.d/webmin' ) +source=("http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz" + setup-pre.sh + setup-post.sh + webmin-config.tar.bz2 + webmin.pam + webmin.logrotate + webmin.tmpfiles webmin.service) -options=(!strip) +options=(!strip !zipman) + +prepare() { + cd "$srcdir"/$pkgname-$pkgver + + # remove modules that we do not support and stuff that is not needed + rm -r {bsdexports,bsdfdisk,cpan,dfsadmin,format,grub,hpuxexports,inetd,ipfilter,ipfw,package-updates,rbac,sgiexports,smf,software,syslog-ng,zones} + rm mount/freebsd-mounts* mount/netbsd-mounts* mount/openbsd-mounts* mount/macos-mounts* + rm webmin-gentoo-init webmin-init webmin-daemon + + # dont allow webmin to update itself, must update via pacman + rm {webmin,usermin}/{update.cgi,update.pl,update_sched.cgi,upgrade.cgi,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi} + + # remove config files for other distros, make Arch linux related additions + find . ! -name 'config-generic-linux' ! -name 'config-ALL-linux' ! -name 'config-lib.pl' -name 'config-*' -exec rm '{}' \+ + echo 'LinHES Any version generic-linux * -d "/etc/pacman.d"' > os_list.txt + cp -rp "$srcdir"/webmin-config/* "$srcdir"/$pkgname-$pkgver/ + install -m 700 "$srcdir"/setup-{pre,post}.sh "$srcdir"/$pkgname-$pkgver/ +} package() { - # NOTE: USE --asroot build option to avoid fakeroot error! - cd "$srcdir"/$pkgname-$pkgver - # add patches from webmin.com - #for i in ../*.wbm - #do tar xvf $i - #done - #for i in ../*.wbt - #do tar xvf $i - #done - # delete stuff that's not needed - rm -f mount/freebsd-mounts* - rm -f mount/openbsd-mounts* - rm -f mount/macos-mounts* - - # remove modules we do not support - rm -rf {bacula-backup,ldap-useradmin,mon,sentry,frox,jabber,majordomo,qmail,sendmail,sarg,wuftpd,webalizer,inetd,ipsec,pap,pptp-client,pptp-server,shorewall,smart-status,vgetty,heartbeat,cfengine,cpan,sgiexports,hpuxexports,qmailadmin,bsdexports,dfsadmin} - - #remove config files from other distros - rm -f $(find . ! -name 'config-generic-linux' ! -name 'config-\*-linux' ! -name 'config-lib.pl' -name 'config-*') - - # remove caldera theme - rm -rf caldera - - # remove init-scripts from other distros - rm webmin-gentoo-init - rm webmin-init - rm webmin-caldera-init - rm webmin-daemon - - # remove update stuff to avoid problems with updating webmin,modules and themes without pacman - rm -f webmin/{update.cgi,update.pl,update_sched.cgi,upgrade.cgi,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi} - rm -f usermin/{upgrade.cgi,update.cgi,update.pl,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi} - - # remove modules add because we don't want files installed without pacman control - rm -f webmin/{install_mod.cgi,delete_mod.cgi} - - # setting perl path - (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl - - - # create dirs - mkdir -p "$pkgdir"/opt/webmin - mkdir -p "$pkgdir"/var/log/webmin - mkdir -p "$pkgdir"/etc/webmin - - # install pam stuff - install -D -m 644 webmin-pam "$pkgdir"/etc/pam.d/webmin - - # remove other distros and add only Archlinux don't change next line else it will not work! - rm os_list.txt - echo 'LinHES Any version generic-linux * -d "/etc/pacman.d"' >> os_list.txt - - # Add rc.conf support to boot and shutdown menu and lock editing of this module - cd init/ - sed -i -e 's:^local_down=.*:local_down=Archlinux RC.CONF,3,None:g' $(find . ! -name 'config.info.pl' -name 'config.info*') - sed -i -e 's:^local_script=.*:local_script=Archlinux RC.LOCAL,3,None:g' $(find . ! -name 'config.info.pl' -name 'config.info*') - sed -i -e 's:^index_downscript=.*:index_downscript=Archlinux RC.CONF:g' lang/* - sed -i -e 's:^index_script=.*:index_script=Archlinux RC.LOCAL:g' lang/* - sed -i -e 's:^noconfig=0:noconfig=1:g' defaultacl - - # Add pacman menu - cd "$srcdir"/$pkgname-$pkgver - cp -rf custom/ pacman - cp -rf mscstyle3/custom mscstyle3/pacman - sed -i -e 's:^noconfig=0:noconfig=1:g' -e 's:^edit=1:edit=0:g' pacman/defaultacl - sed -i -e '/desc/d' -e '/longdesc/d' pacman/module.info - sed -i -e 's:^name=Custom:name=Pacman:g' pacman/module.info - echo 'category=system' >> pacman/module.info - echo 'desc=Pacman' >> pacman/module.info - sed -i -e 's:^index_title=.*:index_title=Pacman:g' pacman/lang/* - - # copy stuff to right dirs - cd "$srcdir"/$pkgname-$pkgver - cp -rp * "$pkgdir"/opt/webmin - cd "$srcdir"/webmin-config - cp -rfp * "$pkgdir"/opt/webmin - - # define parameters for setup.sh - config_dir="$pkgdir"/etc/webmin - var_dir="$pkgdir"/var/log/webmin - perl=/usr/bin/perl - autoos=1 - port=10000 - login=root - crypt="XXX" - ssl=1 - atboot=0 - nostart=1 - nochown=1 - autothird=1 - nouninstall=1 - noperlpath=1 - atbootyn=n - tempdir="$pkgdir"/tmp - export config_dir var_dir perl autoos port tempdir login crypt ssl nochown autothird nouninstall nostart noperlpath atbootyn - - # Fix setup.sh - sed -i -e 's:read atbootyn::g' -e 's:exit 13::g' "$pkgdir"/opt/webmin/setup.sh - "$pkgdir"/opt/webmin/setup.sh - - # Fixup the config files to use their real locations - sed -i 's:^pidfile=.*$:pidfile=/var/run/webmin.pid:' "$pkgdir"/etc/webmin/miniserv.conf - find "$pkgdir"/etc/webmin -type f -exec sed -i "s:$pkgdir::g" {} \; - - # make it only accessible by localhost - echo 'allow=127.0.0.1 192.168. 172.16. 10.' >> "$pkgdir"/etc/webmin/miniserv.conf - - # add don't fork so runit can manage it - echo 'nofork=1' >> "$pkgdir"/etc/webmin/miniserv.conf - - # change mysql start stop cmds - sed -i -e 's:start_cmd=/etc/rc.d/mysqld start:start_cmd=/usr/bin/sv start mysql:g' \ + # create basic directories + mkdir -p "$pkgdir"/{etc,opt,var/log} + + export archpkgdir="$pkgdir" + cd "$srcdir"/$pkgname-$pkgver + + # new version of iptables do not allow to run as non-root user + # so is_installed() check fails, so we avoid it in setup.sh + mv firewall/install_check{,.tmp}.pl + mv firewall6/install_check{,.tmp}.pl + "$srcdir"/$pkgname-$pkgver/setup.sh "$pkgdir"/opt/webmin + + # move the files back in place + mv "$pkgdir"/opt/webmin/firewall/install_check{.tmp,}.pl + mv "$pkgdir"/opt/webmin/firewall6/install_check{.tmp,}.pl + mv firewall/install_check{.tmp,}.pl + mv firewall6/install_check{.tmp,}.pl + + # fix the config files to use their real locations + find "$pkgdir"/etc/webmin -type f -exec sed -i -e "s:$pkgdir::g" {} \+ + + # install sources + install -D -m 644 "$srcdir"/webmin.service "$pkgdir"/usr/lib/systemd/system/webmin.service + install -D -m 644 "$srcdir"/webmin.pam "$pkgdir"/etc/pam.d/webmin + install -D -m 644 "$srcdir"/webmin.logrotate "$pkgdir"/etc/logrotate.d/webmin + install -D -m 644 "$srcdir"/webmin.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/webmin.conf + install -D -m 644 "$srcdir"/$pkgname-$pkgver/LICENCE "$pkgdir"/usr/share/licenses/webmin/LICENCE + + # delete directories not to be packaged + rm -r "$pkgdir"/{tmp,var} + + # LINHES - make it only accessible by localhost + echo 'allow=127.0.0.1 192.168. 172.16. 10.' >> "$pkgdir"/etc/webmin/miniserv.conf + + # LINHES - add don't fork so runit can manage it + echo 'nofork=1' >> "$pkgdir"/etc/webmin/miniserv.conf + + # LINHES - change mysql start stop cmds + sed -i -e 's:start_cmd=/etc/rc.d/mysqld start:start_cmd=/usr/bin/sv start mysql:g' \ -e 's:pass=foo:pass=mythtv:g' -e 's:login=root:login=mythtv:g' \ -e 's:stop_cmd=/etc/rc.d/mysqld stop:stop_cmd=/usr/bin/sv stop mysql:g' \ "$pkgdir"/etc/webmin/mysql/config +} - # install pacman menu - cd "$srcdir"/webmin-pacman/config - cp -rfp * "$pkgdir"/etc/webmin/pacman - - # install systemd files - install -D -m 644 $srcdir/webmin.service $pkgdir/usr/lib/systemd/system/webmin.service - # delete temp dir - rm -r "$pkgdir"/tmp - # change sticky bit - chmod 0644 $pkgdir/opt/webmin/man/config-generic-linux - # install license - install -m 644 -D "$srcdir"/$pkgname-$pkgver/LICENCE "$pkgdir"/usr/share/licenses/webmin/LICENCE -} -md5sums=('d5de2ef2b47de718c7f1addbf0bc2e5c' - 'b0b3e3fb231a12e60165b6b4d604dcfa' - 'bfebb75bb94029b48c46b7f1ba1aa811' - 'fc29ecb6a5cd8c278abe054e60381095') +sha256sums=('3a19228d92556c7722c6fe56c9d4b73d477a19845b0dae3f018fc7fc0306b29a' + '3c27a52679607c73cdaa00c0735bea04cf66cf92ca4af6a7ac906eaed537b910' + '21b24cbbf88593f9da727e8f36dea283c8765002a378b3d4e55e6332387c43c6' + 'd326da95233341ed0a6d51c6c28d9b47b5bbe8c1ae8e03e2578c24191dd14383' + 'a979e236681c6a06906937cf0f012e976347af5d6d7e7ae04a11acb01cc2689d' + '9babd7f1e7e24ba4aeb5587a3cb46aa1e92904226cad84a4cbee5f9aaa408802' + '075c8156471d0fb4825a51b6411636102d2cf61d4eb5c7c097330e53cd9323b0' + '4757a44a07a4bcb6f919274f35b8ab27a34936b5f8d6aee9cdbcbde49e73fb7d') |