From: root Date: Thu, 8 Feb 2024 14:09:50 +0000 (+0000) Subject: new file: webmin-2.105.ebuild X-Git-Url: https://git.liquid.me.uk/?a=commitdiff_plain;h=715eb9d89118ce18ea6aa15dd1fed7656284d66b;p=local new file: webmin-2.105.ebuild --- diff --git a/app-admin/webmin/Manifest b/app-admin/webmin/Manifest index 48228c7..7acad51 100644 --- a/app-admin/webmin/Manifest +++ b/app-admin/webmin/Manifest @@ -6,6 +6,9 @@ DIST webmin-1.881-minimal.tar.gz 2827351 BLAKE2B b8ea9964147c09c91413fbdad3b6a0e DIST webmin-1.881.tar.gz 28903876 BLAKE2B beaab3282ccbbe7716fe35e62ee93e64b636f420fa9235398954904b5e14888cdc4b0acd5126184dcdab59274d3e5b71a7997df3e73e18c55849b7197f024971 SHA512 eab1acb53aca5e947bb9fac1c08a32e9eeca2903bc19595fbc8e19895bda8f4c3432550c2a87cf8c2b577b223b97566b046b7c339bd8754266544f5777560cc7 DIST webmin-1.974-minimal.tar.gz 3628248 BLAKE2B 60268150a9d25233dde59be280d4917bc62e4d3dfd94bb8705b823596a22a5fa7438c5d0f373a791f98a1f885cce160136a991e654d551b369c3426b03e77ed3 SHA512 175b507bf5c3a656ff999313b08ff4ace4cb19a4ff7987f2569e9dcd2ce5aa41a2e6db4505c7c7d78754cab0d7747374ac82d25f1b77ff1617df740df451e3e4 DIST webmin-1.974.tar.gz 45412074 BLAKE2B d62469797d009d47f0e327f00457abc54b515ea88ff41c2049a320eeee6ff516bbbafba80ae038ae592260704d1bfa4a72f9eb2da8d9ea18ce5f071f85419b86 SHA512 612a88337a6915a6e2249a44c6279c310ddf71745b7a8ea799e111d170f874e12c1f3a1c08112f333560b107b1bb44153455e967499d4eba29c626630747801f -EBUILD webmin-1.881.ebuild 10425 BLAKE2B 81bf2acb05996ff6b601c5145bf2c1e1a55c0162c462e6fc70822ff400c8c63d1c5ec2305e231c20390ef327b4580b968f3329bd0b0b2594fc905c430b5f3e89 SHA512 a91a9acd44a690ae619a71823b8509868166d6bbb2cab7b75aee60e6391bfbdb6e2434f605ed0c9590053342b1a96227f55c387fcb350e3f50d986200d99c658 -EBUILD webmin-1.974.ebuild 10425 BLAKE2B 81bf2acb05996ff6b601c5145bf2c1e1a55c0162c462e6fc70822ff400c8c63d1c5ec2305e231c20390ef327b4580b968f3329bd0b0b2594fc905c430b5f3e89 SHA512 a91a9acd44a690ae619a71823b8509868166d6bbb2cab7b75aee60e6391bfbdb6e2434f605ed0c9590053342b1a96227f55c387fcb350e3f50d986200d99c658 +DIST webmin-2.105-minimal.tar.gz 4642671 BLAKE2B d85129110865e7521f0743fd5151525fb0dd8b17be2bb20299c1a50c2f4e78e14bcf229aada4abf61b5132d4eabe3b7862e0da7b9c1d6b119b8e33efca233d6f SHA512 48b674526ce0b71d112dcf4868ae7f1c7cb1c1dec6d4fc68161b8d6a06333dc4d5a700b84760d2a6e2406fc6b8c6bf07bc9705a2109ff54634220f020e3bf3b3 +DIST webmin-2.105.tar.gz 46439259 BLAKE2B d86c70459755992a1745b7091e9dfc5bee4b0886d337004e23a66ed444f978948c6c6a72ccfa2d4212d5cd32f1eabfa52c9076c8ba14f5c847ee9b40c314cfa1 SHA512 c2813641452051fe37b5178e201195ba343091670443602dae2ad3d77902f8f79b0924689b260278035ecbea0d41e7c945dd67f903f0c4740c3a04bf853dd9c0 +EBUILD webmin-1.881.ebuild 10425 BLAKE2B f6a8497efc06cd2b1faece936fe511b869b74f8cf1e5c1f556920f8e8c6afb9a77466857ef97f5070aadcb997cef8dd2df97c531b39bd00e2532fc6a668007ce SHA512 89f950914d73cf9b907d4a5811453ae01ef249393f523e34cd65d332e3aa4ec388e82f3419fda707a85398f55fc437917d2e49364a427d17fcf9cec71711f51f +EBUILD webmin-1.974.ebuild 10425 BLAKE2B f6a8497efc06cd2b1faece936fe511b869b74f8cf1e5c1f556920f8e8c6afb9a77466857ef97f5070aadcb997cef8dd2df97c531b39bd00e2532fc6a668007ce SHA512 89f950914d73cf9b907d4a5811453ae01ef249393f523e34cd65d332e3aa4ec388e82f3419fda707a85398f55fc437917d2e49364a427d17fcf9cec71711f51f +EBUILD webmin-2.105.ebuild 10423 BLAKE2B 2c91b129a03fcaef62688a5497c3a7e01b944281c60f762ef7e8d53c4d559080f8ac3038a58507c740a2a50c226d6fde74f8471e33e2531eba80a2ff0e8bb973 SHA512 1e0bfbed3b2b485b663119a646b1adee29c332ed4b368fd2e20bc4ff7a71ac97de73b5137efba1543dea22628f2064073e29bfa1653969f7528fbdba182da52e MISC webmin-1.974.ebuild.old 2512 BLAKE2B 59ce4619734f1fe0194c4978b29b279e4bd320f0712b97ae81615f6b6298c6036cc0659627e179d178ae9cdab12ae76d9e6f05c543fb768838aae86e44309ba7 SHA512 845c1aaa0e3249560e33705d3c0be546fbd17dace5c88b2ebd2df9c0b5de760f398fb144c76081a67617c1c6861ff2cbc9740af5ade10bd0d641f62f3c59364e diff --git a/app-admin/webmin/webmin-1.881.ebuild b/app-admin/webmin/webmin-1.881.ebuild index 28d8074..cff1212 100644 --- a/app-admin/webmin/webmin-1.881.ebuild +++ b/app-admin/webmin/webmin-1.881.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 inherit pam ssl-cert systemd DESCRIPTION="A web-based Unix systems administration interface" diff --git a/app-admin/webmin/webmin-1.974.ebuild b/app-admin/webmin/webmin-1.974.ebuild index 28d8074..cff1212 100644 --- a/app-admin/webmin/webmin-1.974.ebuild +++ b/app-admin/webmin/webmin-1.974.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 inherit pam ssl-cert systemd DESCRIPTION="A web-based Unix systems administration interface" diff --git a/app-admin/webmin/webmin-2.105.ebuild b/app-admin/webmin/webmin-2.105.ebuild new file mode 100644 index 0000000..0f671d4 --- /dev/null +++ b/app-admin/webmin/webmin-2.105.ebuild @@ -0,0 +1,314 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit pam ssl-cert systemd + +DESCRIPTION="A web-based Unix systems administration interface" +HOMEPAGE="http://www.webmin.com/" +SRC_URI="minimal? ( mirror://sourceforge/webadmin/${P}-minimal.tar.gz ) + !minimal? ( mirror://sourceforge/webadmin/${P}.tar.gz )" + +LICENSE="BSD GPL-2" +SLOT="0" + +KEYWORDS="amd64 x86" + +# NOTE: The ssl flag auto added by ssl-cert eclass is not used actually +# because openssl is forced by dev-perl/Net-SSLeay +IUSE="minimal +ssl mysql postgres ldap" +REQUIRED_USE="minimal? ( !mysql !postgres !ldap )" + +# All the required perl modules can be found easily using (in Webmin's root src dir): +# find . -name cpan_modules.pl -exec grep "::" {} \; +# NOTE: If Webmin doesn't find the required perl modules, it offers(runtime) the user +# to install them using the in-built cpan module, and this will mess up perl on the system +# That's why some modules are forced without a use flag +# NOTE: pam, ssl and dnssec-tools deps are forced for security and Gentoo compliance installation reasons +DEPEND="virtual/perl-MIME-Base64 + virtual/perl-Socket + virtual/perl-Sys-Syslog + virtual/perl-Time-HiRes + virtual/perl-Time-Local + dev-perl/Authen-Libwrap + dev-perl/IO-Tty + dev-perl/MD5 + dev-perl/Net-SSLeay + dev-perl/Authen-PAM + dev-perl/Sys-Hostname-Long + >=net-dns/dnssec-tools-1.13 + !minimal? ( + mysql? ( dev-perl/DBD-mysql ) + postgres? ( dev-perl/DBD-Pg ) + ldap? ( dev-perl/perl-ldap ) + dev-perl/XML-Generator + dev-perl/XML-Parser + ) +" +RDEPEND="${DEPEND}" + +src_prepare() { + default + + local perl="$( which perl )" + + # Remove the unnecessary and incompatible files + rm -rf acl/Authen-SolarisRBAC-0.1* + if ! use minimal ; then + rm -rf {format,{bsd,hpux,sgi}exports,zones,rbac} + rm -f mount/{free,net,open}bsd-mounts* + rm -f mount/macos-mounts* + fi + + # For security reasons remove the SSL certificate that comes with Webmin + # We will create our own later + rm -f miniserv.pem + + # Remove the Webmin setup scripts to avoid Webmin in runtime to mess up config + # We will use our own later + rm -f setup.{sh,pl} + + # Set the installation type/mode to Gentoo + echo "gentoo" > install-type + + # Fix the permissions of the install files + chmod -R og-w "${S}" + + # Since we should not modify any files after install + # we set the perl path in all cgi and pl files here using Webmin's routines + # The pl file is Prefix safe and works only on provided input, no other filesystem files + ebegin "Fixing perl path in source files" + (find "${S}" -name '*.cgi' -print ; find "${S}" -name '*.pl' -print) | $perl "${S}"/perlpath.pl $perl - + eend $? +} + +src_install() { + # Create config dir and keep + diropts -m0755 + dodir /etc/webmin + keepdir /etc/webmin + + # Create install dir + # Third party modules installed through Webmin go here too, so keep + dodir /usr/libexec/webmin + keepdir /usr/libexec/webmin + + # Copy our own setup script to installation folder + insinto /usr/libexec/webmin + newins "${FILESDIR}"/gentoo-setup gentoo-setup.sh + fperms 0744 /usr/libexec/webmin/gentoo-setup.sh + + # This is here if we ever want in future ebuilds to add some specific + # config values in the /etc/webmin/miniserv.conf + # The format of this file should be the same as the one of miniserv.conf: + # var=value + # + # Uncomment it if you use such file. Before that check if upstream + # has this file in root dir too. + #newins "${FILESDIR}/miniserv-conf" miniserv-conf + + # Create the log dir and keep + diropts -m0700 + dodir /var/log/webmin + keepdir /var/log/webmin + + # Create the init.d file and put the neccessary variables there + newinitd "${FILESDIR}"/init.d.webmin webmin + sed -i \ + -e "s:%exe%:${EROOT}usr/libexec/webmin/miniserv.pl:" \ + -e "s:%pid%:${EROOT}var/run/webmin.pid:" \ + -e "s:%conf%:${EROOT}etc/webmin/miniserv.conf:" \ + -e "s:%config%:${EROOT}etc/webmin/config:" \ + -e "s:%perllib%:${EROOT}usr/libexec/webmin:" \ + "${ED}etc/init.d/webmin" \ + || die "Failed to patch the webmin init file" + + # Create the systemd service file and put the neccessary variables there + systemd_newunit "${FILESDIR}"/webmin.service webmin.service + sed -i \ + -e "s:%exe%:${EROOT}usr/libexec/webmin/miniserv.pl:" \ + -e "s:%pid%:${EROOT}var/run/webmin.pid:" \ + -e "s:%conf%:${EROOT}etc/webmin/miniserv.conf:" \ + -e "s:%config%:${EROOT}etc/webmin/config:" \ + -e "s:%perllib%:${EROOT}usr/libexec/webmin:" \ + "${ED}$(_systemd_get_systemunitdir)/webmin.service" \ + || die "Failed to patch the webmin systemd service file" + + # Setup pam + pamd_mimic system-auth webmin auth account session + + # Copy files to installation folder + ebegin "Copying install files to destination" + cp -pPR "${S}"/* "${ED}usr/libexec/webmin" + eend $? +} + +pkg_preinst() { + # First stop service if running so Webmin to not messup our config + ebegin "Stopping any running Webmin instance prior merging" + if systemd_is_booted ; then + systemctl stop webmin.service 2>/dev/null + else + rc-service --ifexists -- webmin --ifstarted stop + fi + eend $? +} + +pkg_postinst() { + # Run webmin_config first - non interactively + export INTERACTIVE="no" + webmin_config + # Every next time webmin_config should be interactive + INTERACTIVE="yes" + + ewarn + ewarn "Bare in mind that not all Webmin modules are Gentoo tweaked and may have some issues." + ewarn "Always be careful when using modules that modify init entries, do update of webmin, install CPAN modules etc." + ewarn "To avoid problems, please before using any module, look at its configuration options first." + ewarn "(Usually there is a link at top in the right pane of Webmin for configuring the module.)" + ewarn + if systemd_is_booted ; then + elog "- To make Webmin start at boot time, run: 'systemctl enable webmin.service'" + else + elog "- To make Webmin start at boot time, run: 'rc-update add webmin default'" + fi + elog "- The default URL to connect to Webmin is: https://localhost:10000" + elog "- The default user that can login is: root" + elog "- To reconfigure Webmin in case of problems run 'emerge --config app-admin/webmin'" +} + +pkg_prerm() { + # First stop service if running - we do not want Webmin to mess up config + ebegin "Stopping any running Webmin instance prior unmerging" + if systemd_is_booted ; then + systemctl stop webmin.service 2>/dev/null + else + rc-service --ifexists -- webmin --ifstarted stop + fi + eend $? +} + +pkg_postrm() { + # If removing webmin completely, remind the user for the Webmin's own cron jobs. + if [[ ! ${REPLACED_BY_VERSION} ]]; then + ewarn + ewarn "You have uninstalled Webmin, so have in mind that all cron jobs scheduled" + ewarn "by Webmin for its own modules, are left active and they will fail when Webmin is missing." + ewarn "To fix this just disable them if you intend to use Webmin again," + ewarn "OR delete them if not." + ewarn + fi +} + +pkg_config(){ + webmin_config +} + +webmin_config(){ + # First stop service if running + ebegin "Stopping any running Webmin instance" + if systemd_is_booted ; then + systemctl stop webmin.service 2>/dev/null + else + rc-service --ifexists -- webmin --ifstarted stop + fi + eend $? + + # Next set the default reset variable to 'none' + # reset/_reset can be: + # 'none' - does not reset anything, just upgrades if a conf is present + # OR installs new conf if a conf is missing + # 'soft' - deletes only $config_dir/config file and thus resetting most + # conf values to their defaults. Keeps the specific Webmin cron jobs + # 'hard' - deletes all files in $config_dir (keeping the .keep_* Gentoo file) + # and thus resetting all Webmin. Deletes the specific Webmin cron jobs too. + local _reset="none" + + # If in interactive mode ask user what should we do + if [[ "${INTERACTIVE}" = "yes" ]]; then + einfo + einfo "Please enter the number of the action you would like to perform?" + einfo + einfo "1. Update configuration" + einfo " (keeps old config options and adds the new ones)" + einfo "2. Soft reset configuration" + einfo " (keeps some old config options, the other options are set to default)" + ewarn " All Webmin users will be reset" + einfo "3. Hard reset configuration" + einfo " (all options including module options are set to default)" + ewarn " You will lose all Webmin configuration options you have done till now" + einfo "4. Exit this configuration utility (default)" + while [ "$correct" != "true" ] ; do + read answer + if [[ "$answer" = "1" ]] ; then + _reset="none" + correct="true" + elif [[ "$answer" = "2" ]] ; then + _reset="soft" + correct="true" + elif [[ "$answer" = "3" ]] ; then + _reset="hard" + correct="true" + elif [ "$answer" = "4" -o "$answer" = "" ] ; then + die "User aborted configuration." + else + echo "Answer not recognized. Enter a number from 1 to 4" + fi + done + + if [[ "$_reset" = "hard" ]]; then + while [ "$sure" != "true" ] ; do + ewarn "You will lose all Webmin configuration options you have done till now." + ewarn "Are you sure you want to do this? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + sure="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "User aborted configuration." + else + echo "Answer not recognized. Enter 'y' or 'n'" + fi + done + fi + fi + + export reset=$_reset + + # Create ssl certificate for Webmin if there is not one in the proper place + if [[ ! -e "${EROOT}etc/ssl/webmin/server.pem" ]]; then + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Webmin Server}" + SSL_COMMONNAME="${SSL_COMMONNAME:-*}" + install_cert "${EROOT}/etc/ssl/webmin/server" + fi + + # Ensure all paths passed to the setup script use EROOT + export wadir="${EROOT}usr/libexec/webmin" + export config_dir="${EROOT}etc/webmin" + export var_dir="${EROOT}var/log/webmin" + export tempdir="${T}" + export pidfile="${EROOT}var/run/webmin.pid" + export perl="$( which perl )" + export os_type='gentoo-linux' + export os_version='*' + export real_os_type='Gentoo Linux' + export real_os_version='Any version' + # Forcing 'ssl', 'no_ssl2', 'no_ssl3', 'ssl_redirect', 'no_sslcompression', + # 'ssl_honorcipherorder', 'no_tls1' and 'no_tls1_1' for tightening security + export ssl=1 + export no_ssl2=1 + export no_ssl3=1 + export ssl_redirect=1 + export ssl_honorcipherorder=1 + export no_sslcompression=1 + export no_tls1=1 + export no_tls1_1=1 + export keyfile="${EROOT}etc/ssl/webmin/server.pem" + export port=10000 + + export atboot=0 + + einfo "Executing Webmin's configure script" + $wadir/gentoo-setup.sh + + einfo "Configuration of Webmin done" +}