Initial commit
authorroot <root@holly.liquid.me.uk>
Sat, 30 Jul 2022 23:55:58 +0000 (00:55 +0100)
committerroot <root@holly.liquid.me.uk>
Sat, 30 Jul 2022 23:55:58 +0000 (00:55 +0100)
62 files changed:
acct-group/monero/Manifest [new file with mode: 0644]
acct-group/monero/metadata.xml [new file with mode: 0644]
acct-group/monero/monero-0.ebuild [new file with mode: 0644]
acct-user/monero/Manifest [new file with mode: 0644]
acct-user/monero/metadata.xml [new file with mode: 0644]
acct-user/monero/monero-0.ebuild [new file with mode: 0644]
app-admin/webmin/Manifest [new file with mode: 0644]
app-admin/webmin/files/gentoo-setup [new file with mode: 0644]
app-admin/webmin/files/gentoo-setup-1.974 [new file with mode: 0644]
app-admin/webmin/files/init.d.webmin [new file with mode: 0644]
app-admin/webmin/files/webmin.service [new file with mode: 0644]
app-admin/webmin/webmin-1.881.ebuild [new file with mode: 0644]
app-admin/webmin/webmin-1.974.ebuild [new file with mode: 0644]
app-admin/webmin/webmin-1.974.ebuild.old [new file with mode: 0644]
dev-libs/boost/Manifest [new file with mode: 0644]
dev-libs/boost/boost-1.76.0-r1.ebuild [new file with mode: 0644]
dev-libs/boost/files/boost-1.71.0-build-auto_index-tool.patch [new file with mode: 0644]
dev-libs/boost/files/boost-1.71.0-context-x32.patch [new file with mode: 0644]
dev-libs/boost/files/boost-1.71.0-disable_icu_rpath.patch [new file with mode: 0644]
dev-libs/boost/files/boost-1.73-boost-mpi-python-PEP-328.patch [new file with mode: 0644]
dev-libs/boost/files/boost-1.73-property-tree-include.patch [new file with mode: 0644]
dev-libs/boost/files/boost-1.74-CVE-2012-2677.patch [new file with mode: 0644]
dev-libs/boost/files/boost-1.76-boost-numpy.patch [new file with mode: 0644]
dev-libs/boost/files/boost-1.76-sparc-define.patch [new file with mode: 0644]
dev-libs/randomx/Manifest [new file with mode: 0644]
dev-libs/randomx/randomx-1.1.8.ebuild [new file with mode: 0644]
dev-libs/supercop/Manifest [new file with mode: 0644]
dev-libs/supercop/supercop-0_p20200827.ebuild [new file with mode: 0644]
dev-perl/Data-Entropy/Data-Entropy-0.007.0.ebuild [new file with mode: 0644]
dev-perl/Data-Entropy/Manifest [new file with mode: 0644]
dev-python/networkx/Manifest [new file with mode: 0644]
dev-python/networkx/networkx-2.5.ebuild [new file with mode: 0644]
dev-python/networkx/networkx-2.6.2-r1.ebuild [new file with mode: 0644]
mail-filter/libmilter/Manifest [new file with mode: 0644]
mail-filter/libmilter/libmilter-1.0.2_p1-r1.ebuild [new file with mode: 0644]
mail-mta/sendmail/Manifest [new file with mode: 0644]
mail-mta/sendmail/sendmail-8.16.1.ebuild [new file with mode: 0644]
metadata/layout.conf [new file with mode: 0644]
net-p2p/monero/Manifest [new file with mode: 0644]
net-p2p/monero/files/monero-0.17.1.7-linkjobs.patch [new file with mode: 0644]
net-p2p/monero/files/monero-0.17.1.7-unbundle-dependencies.patch [new file with mode: 0644]
net-p2p/monero/files/monero-0.17.2.0-boost-176.patch [new file with mode: 0644]
net-p2p/monero/files/monero-0.17.3.0-unbundle-dependencies.patch [new file with mode: 0644]
net-p2p/monero/files/monerod.conf [new file with mode: 0644]
net-p2p/monero/files/monerod.confd [new file with mode: 0644]
net-p2p/monero/files/monerod.initd [new file with mode: 0644]
net-p2p/monero/files/monerod.service [new file with mode: 0644]
net-p2p/monero/metadata.xml [new file with mode: 0644]
net-p2p/monero/monero-0.17.2.0.ebuild [new file with mode: 0644]
net-p2p/monero/monero-0.17.2.3.ebuild [new file with mode: 0644]
net-p2p/monero/monero-0.17.3.0.ebuild [new file with mode: 0644]
net-p2p/monero/monero-9999.ebuild [new file with mode: 0644]
profiles/repo_name [new file with mode: 0644]
www-misc/zoneminder/Manifest [new file with mode: 0644]
www-misc/zoneminder/files/10_zoneminder.conf [new file with mode: 0644]
www-misc/zoneminder/files/README.gentoo [new file with mode: 0644]
www-misc/zoneminder/files/conf.d [new file with mode: 0644]
www-misc/zoneminder/files/init.d [new file with mode: 0644]
www-misc/zoneminder/files/zoneminder.service [new file with mode: 0644]
www-misc/zoneminder/metadata.xml [new file with mode: 0644]
www-misc/zoneminder/zoneminder-1.36.20.ebuild [new file with mode: 0644]
www-misc/zoneminder/zoneminder-1.36.21.ebuild [new file with mode: 0644]

diff --git a/acct-group/monero/Manifest b/acct-group/monero/Manifest
new file mode 100644 (file)
index 0000000..aa1c269
--- /dev/null
@@ -0,0 +1,2 @@
+EBUILD monero-0.ebuild 180 BLAKE2B 4275585a0d24f242a5192cd76b4d2005b28c9ad837ddc3111f97231a497993d4003f6326f0650d5ffed4f0fb093d46b4982e71c4d6a80638a94825c93aeff0e1 SHA512 1882c41e0e4efcf8cfd3f30573eac90e46e503c10ca33beacb2733055b388e0163c44853b3e6d2d8046935632176976c1fe49ab7b247db42411fea225b473bd1
+MISC metadata.xml 250 BLAKE2B 5674fb0bb7a4c1cc86968afb79a07af52df8c0c6330ec1cf677f234ee3f904b83e6730d6ec161207b648fba9ac624a70297a0b8c01cf90f9f3dda471cbbfaf80 SHA512 d5d8c8a67e1564de542b662edab5c020ae361653e10d5961a17f000576a293161c25fa3c9968739c2d773edeb95c2097733aab0dfca2786e19a9a7eb88208fd5
diff --git a/acct-group/monero/metadata.xml b/acct-group/monero/metadata.xml
new file mode 100644 (file)
index 0000000..82808a0
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>telans@posteo.de</email>
+    <name>James Beddek</name>
+  </maintainer>
+</pkgmetadata>
diff --git a/acct-group/monero/monero-0.ebuild b/acct-group/monero/monero-0.ebuild
new file mode 100644 (file)
index 0000000..a05b241
--- /dev/null
@@ -0,0 +1,10 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-group
+
+KEYWORDS="amd64 ~arm ~arm64 ~x86"
+
+ACCT_GROUP_ID=-1
diff --git a/acct-user/monero/Manifest b/acct-user/monero/Manifest
new file mode 100644 (file)
index 0000000..edb13b1
--- /dev/null
@@ -0,0 +1,2 @@
+EBUILD monero-0.ebuild 226 BLAKE2B 96b612801095b29374d83c3ef70bd26eb62ed971ece49c66f95931da1fe05467c189f73a14968bec8ea8de8429665c91492ea030322469d67ab4b9642cd7be12 SHA512 d5c781632169319c8e890da89ee435a10d6ddf4b3253516c3f2a75ff2ee68259f7d50e3226d4078c039f0a1b30d40154e0f343928d6c4bf0cd4433ec9de1e128
+MISC metadata.xml 250 BLAKE2B 5674fb0bb7a4c1cc86968afb79a07af52df8c0c6330ec1cf677f234ee3f904b83e6730d6ec161207b648fba9ac624a70297a0b8c01cf90f9f3dda471cbbfaf80 SHA512 d5d8c8a67e1564de542b662edab5c020ae361653e10d5961a17f000576a293161c25fa3c9968739c2d773edeb95c2097733aab0dfca2786e19a9a7eb88208fd5
diff --git a/acct-user/monero/metadata.xml b/acct-user/monero/metadata.xml
new file mode 100644 (file)
index 0000000..82808a0
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>telans@posteo.de</email>
+    <name>James Beddek</name>
+  </maintainer>
+</pkgmetadata>
diff --git a/acct-user/monero/monero-0.ebuild b/acct-user/monero/monero-0.ebuild
new file mode 100644 (file)
index 0000000..bad298b
--- /dev/null
@@ -0,0 +1,13 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-user
+
+KEYWORDS="amd64 ~arm ~arm64 ~x86"
+
+ACCT_USER_ID=-1
+ACCT_USER_GROUPS=( monero )
+
+acct-user_add_deps
diff --git a/app-admin/webmin/Manifest b/app-admin/webmin/Manifest
new file mode 100644 (file)
index 0000000..48228c7
--- /dev/null
@@ -0,0 +1,11 @@
+AUX gentoo-setup 13727 BLAKE2B dca9dadd5775006f5bfbeee870723db8806a2236c984e2b4cec70031101f97fc5d4e1e1fd9219f27cdaa31ee860d247f71a01180b392154c16ca6554b1f73483 SHA512 fa6fde84eb9a16fea5d019fd920aed2a2f5dd51e5f32fa407fd1c424a0627eaafab7cd3b572a57e4f97e06ce5b6b5a7373ac377776a474a8512e077130eadc6e
+AUX gentoo-setup-1.974 13727 BLAKE2B dca9dadd5775006f5bfbeee870723db8806a2236c984e2b4cec70031101f97fc5d4e1e1fd9219f27cdaa31ee860d247f71a01180b392154c16ca6554b1f73483 SHA512 fa6fde84eb9a16fea5d019fd920aed2a2f5dd51e5f32fa407fd1c424a0627eaafab7cd3b572a57e4f97e06ce5b6b5a7373ac377776a474a8512e077130eadc6e
+AUX init.d.webmin 2287 BLAKE2B 87deae2864a57dbaad5ce437454a908671b9232d72023a81c8fa291c74a527cffb94c22a10f38abf119d0aba0d1d8012d197b44170e26a2c3af335e5feae8726 SHA512 a6df7e99f21099d306740d032ef0d339864c107aea87cffb7a7180776810c516cdc9892e8409c593066aa6bc9366e752c62094aef0f1b36ca21ede1b9f9fe5a4
+AUX webmin.service 416 BLAKE2B aef00b0f948286c54736613e37f114e6ffd90453cc6eadc3afffe7fa114df4e6a8b91e4f02da6fdfaa3eb2f57254e5e6785b201d0461f28839742cc13d883816 SHA512 7cf86342db3d34cbe39b62fa768660ba7dd160d9c0d113ef6a3a176187fa0c72531bed38e3203cf627ab05c1ac4d9a8b9e829d1baa9739d63dfa74f09c445f1e
+DIST webmin-1.881-minimal.tar.gz 2827351 BLAKE2B b8ea9964147c09c91413fbdad3b6a0e5161497296bb33b614161e370ac1292ac9cdf752483835fb279aa70ba41eb09f2774d08caa58861049e467346ad0b64ff SHA512 5b855c5562a6eb6a8fd836e3bd1dcc30696b7f63776d0f8b5ee69f5e219c749210436315fe5fd8f811f4f19e02fe4d7d3cff451a831b085101081b97b8ce794d
+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
+MISC webmin-1.974.ebuild.old 2512 BLAKE2B 59ce4619734f1fe0194c4978b29b279e4bd320f0712b97ae81615f6b6298c6036cc0659627e179d178ae9cdab12ae76d9e6f05c543fb768838aae86e44309ba7 SHA512 845c1aaa0e3249560e33705d3c0be546fbd17dace5c88b2ebd2df9c0b5de760f398fb144c76081a67617c1c6861ff2cbc9740af5ade10bd0d641f62f3c59364e
diff --git a/app-admin/webmin/files/gentoo-setup b/app-admin/webmin/files/gentoo-setup
new file mode 100644 (file)
index 0000000..680dfbb
--- /dev/null
@@ -0,0 +1,438 @@
+#!/bin/sh
+# gentoo-setup.sh
+#
+# Version 1.2
+#
+# A modified original Webmin setup.sh script to comply with Gentoo specifics
+#
+# Modification done by: PhobosK <phobosk@kbfx.net>
+#
+# This script runs after the webmin archive is installed, and in the pkg_config() phase.
+# It does setup the various config files of Webmin depending on if it is
+# a new install, an upgrade or a reset.
+
+LANG=
+export LANG
+
+if [ -z ${wadir} ]; then
+       echo "You can't run this script outside of the 'emerge --config app-admin/webmin' command."
+       exit 1
+fi
+
+# All things we do is from the Webmin install dir - $wadir
+cd $wadir
+
+
+# Are we hard resetting everything?
+# If yes, we do:
+# 1. Run the specific Webmin $wadir/run-uninstalls.pl
+#       It runs all uninstall.pl files in every module's folder.
+#       They delete all the set specific Webmin cron jobs.
+#       If bumping you should go through these files using the command:
+#       find . -name uninstall.pl -exec cat {} \; -print
+# 2. Delete the whole /etc/webmin content, keeping only the gentoo .keep_* files
+if [ "$reset" = "hard" ]; then
+       echo "Running Webmin's specific uninstall procedures.. (Please ignore any possible errors)"
+       (WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir LANG= "$wadir/run-uninstalls.pl")
+       echo "..done"
+       echo ""
+
+       echo "Deleting the content of user's config folder: $config_dir .."
+       find $config_dir ! -name '.keep_*' -delete 2>/dev/null
+       echo "..done"
+       echo ""
+fi
+
+
+# Are we soft resetting?
+# If yes we do:
+# - Delete the $config_dir/config file so we get new config values
+if [ "$reset" = "soft" ]; then
+       echo "Deleting the user's $config_dir/config file.."
+       if [ -f "$config_dir/config" ]; then
+               rm -f "$config_dir/config"
+       fi
+       echo "..done"
+       echo ""
+fi
+
+
+# Get all available modules of this version
+allmods=`echo */module.info | sed -e 's/\/module.info//g'`
+
+# Get current Webmin version
+ver=`cat "$wadir/version"`
+
+if [ -r "$config_dir/config" ]; then
+       upgrading=1
+fi
+
+
+# Check if upgrading from an old version
+if [ "$upgrading" = 1 ]; then
+       echo "Updating existant Webmin's config files.."
+
+       # Get current var path
+       if [ -r "$config_dir/var-path" ]; then
+               _var_dir=`cat $config_dir/var-path`
+               if [ -n ${_var_dir} ]; then
+                       var_dir=${_var_dir}
+               fi
+       fi
+
+       # Get current perl path
+       if [ -r "$config_dir/perl-path" ]; then
+               _perl=`cat $config_dir/perl-path`
+               if [ -n ${_perl} ]; then
+                       perl=${_perl}
+               fi
+       fi
+
+       # Get old os name and version
+       os_type=`grep "^os_type=" $config_dir/config | sed -e 's/os_type=//g'`
+       os_version=`grep "^os_version=" $config_dir/config | sed -e 's/os_version=//g'`
+       real_os_type=`grep "^real_os_type=" $config_dir/config | sed -e 's/real_os_type=//g'`
+       real_os_version=`grep "^real_os_version=" $config_dir/config | sed -e 's/real_os_version=//g'`
+
+       # Get port, ssl, no_ssl2, no_ssl3, ssl_redirect, no_sslcompression, ssl_honorcipherorder, no_tls1, no_tls1_1 and keyfile
+       port=`grep "^port=" $config_dir/miniserv.conf | sed -e 's/port=//g'`
+       ssl=`grep "^ssl=" $config_dir/miniserv.conf | sed -e 's/ssl=//g'`
+       no_ssl2=`grep "^no_ssl2=" $config_dir/miniserv.conf | sed -e 's/no_ssl2=//g'`
+       no_ssl3=`grep "^no_ssl3=" $config_dir/miniserv.conf | sed -e 's/no_ssl3=//g'`
+       ssl_redirect=`grep "^ssl_redirect=" $config_dir/miniserv.conf | sed -e 's/ssl_redirect=//g'`
+       ssl_honorcipherorder=`grep "^ssl_honorcipherorder=" $config_dir/miniserv.conf | sed -e 's/ssl_honorcipherorder=//g'`
+       no_sslcompression=`grep "^no_sslcompression=" $config_dir/miniserv.conf | sed -e 's/no_sslcompression=//g'`
+       no_tls1=`grep "^no_tls1=" $config_dir/miniserv.conf | sed -e 's/no_tls1=//g'`
+       no_tls1_1=`grep "^no_tls1_1=" $config_dir/miniserv.conf | sed -e 's/no_tls1_1=//g'`
+       keyfile=`grep "^keyfile=" $config_dir/miniserv.conf | sed -e 's/keyfile=//g'`
+
+       # Update ACLs
+       $perl "$wadir/newmods.pl" $config_dir $allmods
+
+       # Update miniserv.conf with new root directory, mime types file and server info
+       grep -v "^root=" $config_dir/miniserv.conf | grep -v "^mimetypes=" | grep -v "^server=" >$tempdir/$$.miniserv.conf
+       mv $tempdir/$$.miniserv.conf $config_dir/miniserv.conf
+       echo "root=$wadir" >> $config_dir/miniserv.conf
+       echo "mimetypes=$wadir/mime.types" >> $config_dir/miniserv.conf
+       echo "server=MiniServ/$ver" >> $config_dir/miniserv.conf
+       grep logout= $config_dir/miniserv.conf >/dev/null
+       if [ $? != "0" ]; then
+               echo "logout=$config_dir/logout-flag" >> $config_dir/miniserv.conf
+       fi
+
+       # Remove old cache of module infos
+       rm -f $config_dir/module.infos.cache
+       echo "..done"
+       echo ""
+else
+       # Create webserver's new config files
+       echo "Creating Webmin's new config files.."
+
+       echo $perl > $config_dir/perl-path
+       echo $var_dir > $config_dir/var-path
+
+       # Create a totally new conf file
+       cfile=$config_dir/miniserv.conf
+       echo "port=$port" > $cfile
+       echo "root=$wadir" >> $cfile
+       echo "mimetypes=$wadir/mime.types" >> $cfile
+       echo "addtype_cgi=internal/cgi" >> $cfile
+       echo "realm=Webmin Server" >> $cfile
+       echo "logfile=$var_dir/miniserv.log" >> $cfile
+       echo "errorlog=$var_dir/miniserv.error" >> $cfile
+       echo "pidfile=$pidfile" >> $cfile
+       echo "logtime=168" >> $cfile
+       echo "ppath=$ppath" >> $cfile
+       echo "ssl=$ssl" >> $cfile
+       echo "no_ssl2=$no_ssl2" >> $cfile
+       echo "no_ssl3=$no_ssl3" >> $cfile
+       echo "ssl_redirect=$ssl_redirect" >> $cfile
+       echo "ssl_honorcipherorder=$ssl_honorcipherorder" >> $cfile
+       echo "no_sslcompression=$no_sslcompression" >> $cfile
+       echo "no_tls1=$no_tls1" >> $cfile
+       echo "no_tls1_1=$no_tls1_1" >> $cfile
+       echo "keyfile=$keyfile" >> $cfile
+       echo "env_WEBMIN_CONFIG=$config_dir" >> $cfile
+       echo "env_WEBMIN_VAR=$var_dir" >> $cfile
+       echo "atboot=$atboot" >> $cfile
+       echo "logout=$config_dir/logout-flag" >> $cfile
+       echo "listen=10000" >> $cfile
+       echo "denyfile=\\.pl\$" >> $cfile
+       echo "log=1" >> $cfile
+       echo "blockhost_failures=5" >> $cfile
+       echo "blockhost_time=60" >> $cfile
+       echo "syslog=1" >> $cfile
+       echo "session=1" >> $cfile
+       echo "premodules=WebminCore" >> $cfile
+       echo "server=MiniServ/$ver" >> $cfile
+
+       # Append package-specific info to config file.
+       # miniserv-conf can be created by upstream or by us in src_install phase (see there).
+       if [ -f "$wadir/miniserv-conf" ]; then
+               cat "$wadir/miniserv-conf" >>$cfile
+       fi
+
+       # Create the default user allowed to login - root only
+       login="root"
+
+       if [ -r /etc/shadow ]; then
+               #crypt=`grep "^root:" /etc/shadow | cut -f 2 -d :`
+               crypt=x
+       else
+               crypt=`grep "^root:" /etc/passwd | cut -f 2 -d :`
+       fi
+
+       ufile=$config_dir/miniserv.users
+       echo "$login:$crypt:0" > $ufile
+       chmod 600 $ufile
+
+
+       echo "userfile=$ufile" >> $cfile
+       chmod 600 $cfile
+       echo "..done"
+       echo ""
+
+       echo "Creating access control file.."
+       afile=$config_dir/webmin.acl
+       echo "$login: $allmods" > $afile
+       chmod 600 $afile
+       echo "..done"
+       echo ""
+fi
+
+
+# Create start, stop, restart and reload Gentoo compliant Webmin scripts
+# We use sys-apps/openrc functions which is already pulled by sys-apps/baselayout
+# or systemctl if we run under systemd
+echo "Creating start and stop scripts.."
+rm -f $config_dir/{start,stop,restart,reload}
+
+# The start script in /etc/webmin (Gentoo compliant)
+cat <<END >>"$config_dir/start"
+#!/bin/sh
+
+if [ ! -f "${pidfile}" ]; then
+       if [[ -d /run/systemd/system ]] ; then
+               systemctl start webmin.service
+       else
+               rc-service --ifexists -- webmin start
+       fi
+fi
+END
+
+# The stop script in /etc/webmin (Gentoo compliant)
+cat <<END >>"$config_dir/stop"
+#!/bin/sh
+
+if [[ -d /run/systemd/system ]] ; then
+       systemctl stop webmin.service
+else
+       rc-service --ifexists -- webmin --ifstarted stop
+fi
+END
+
+# The restart script in /etc/webmin (Gentoo compliant)
+cat <<END >>"$config_dir/restart"
+#!/bin/sh
+
+if [[ -d /run/systemd/system ]] ; then
+       systemctl try-restart webmin.service
+else
+       rc-service --ifexists -- webmin --ifstarted restart
+fi
+END
+
+# The reload script in /etc/webmin (Gentoo compliant)
+cat <<END >>"$config_dir/reload"
+#!/bin/sh
+
+if [[ -d /run/systemd/system ]] ; then
+       systemctl reload-or-try-restart webmin.service
+else
+       rc-service --ifexists -- webmin --ifstarted reload
+fi
+END
+
+chmod 755 $config_dir/{start,stop,restart,reload}
+echo "..done"
+echo ""
+
+
+if [ "$upgrading" = 1 ]; then
+       echo "Updating other config files.."
+else
+       echo "Copying other config files.."
+fi
+
+# This just copies and merges the Webmin's release config files, with user's in the /etc/webmin folder
+newmods=`$perl "$wadir/copyconfig.pl" "$os_type/$real_os_type" "$os_version/$real_os_version" "$wadir" $config_dir "" $allmods`
+if [ "$upgrading" != 1 ]; then
+       # Store the OS and version
+       echo "os_type=$os_type" >> $config_dir/config
+       echo "os_version=$os_version" >> $config_dir/config
+       echo "real_os_type=$real_os_type" >> $config_dir/config
+       echo "real_os_version=$real_os_version" >> $config_dir/config
+
+       # Turn on logging by default
+       echo "log=1" >> $config_dir/config
+
+       # Disallow unknown referers by default
+       echo "referers_none=1" >>$config_dir/config
+else
+       # one-off hack to set log variable in config from miniserv.conf
+       grep log= $config_dir/config >/dev/null
+       if [ "$?" = "1" ]; then
+               grep log= $config_dir/miniserv.conf >> $config_dir/config
+               grep logtime= $config_dir/miniserv.conf >> $config_dir/config
+               grep logclear= $config_dir/miniserv.conf >> $config_dir/config
+       fi
+
+       # Disallow unknown referers if not set
+       grep referers_none= $config_dir/config >/dev/null
+       if [ "$?" != "0" ]; then
+               echo "referers_none=1" >>$config_dir/config
+       fi
+fi
+echo $ver > $config_dir/version
+echo "..done"
+echo ""
+
+# Set passwd_ fields in miniserv.conf from global config
+for field in passwd_file passwd_uindex passwd_pindex passwd_cindex passwd_mindex; do
+       grep $field= $config_dir/miniserv.conf >/dev/null
+       if [ "$?" != "0" ]; then
+               grep $field= $config_dir/config >> $config_dir/miniserv.conf
+       fi
+done
+grep passwd_mode= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo passwd_mode=0 >> $config_dir/miniserv.conf
+fi
+
+grep ssl_honorcipherorder= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo ssl_honorcipherorder=1 >> $config_dir/miniserv.conf
+fi
+
+# Disable SSL compression to defeat BEAST attack
+grep no_sslcompression= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo no_sslcompression=1 >> $config_dir/miniserv.conf
+fi
+
+# Tighten SSL security
+grep no_ssl2= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo no_ssl2=1 >> $config_dir/miniserv.conf
+fi
+
+grep no_ssl3= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo no_ssl3=1 >> $config_dir/miniserv.conf
+fi
+
+grep no_tls1= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+    echo no_tls1=1 >> $config_dir/miniserv.conf
+fi
+
+grep no_tls1_1= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+    echo no_tls1_1=1 >> $config_dir/miniserv.conf
+fi
+
+# Make Perl crypt MD5 the default
+grep md5pass= $config_dir/config >/dev/null
+if [ "$?" != "0" ]; then
+       echo md5pass=1 >> $config_dir/config
+fi
+
+# Set a special theme if none was set before
+if [ "$theme" = "" ]; then
+       theme=`cat "$wadir/defaulttheme" 2>/dev/null`
+fi
+oldthemeline=`grep "^theme=" $config_dir/config`
+oldtheme=`echo $oldthemeline | sed -e 's/theme=//g'`
+if [ "$theme" != "" ] && [ "$oldthemeline" = "" ] && [ -d "$wadir/$theme" ]; then
+       themelist=$theme
+fi
+
+# Set a special overlay if none was set before
+if [ "$overlay" = "" ]; then
+       overlay=`cat "$wadir/defaultoverlay" 2>/dev/null`
+fi
+if [ "$overlay" != "" ] && [ "$theme" != "" ] && [ -d "$wadir/$overlay" ]; then
+       themelist="$themelist $overlay"
+fi
+
+# Apply the theme and maybe overlay
+if [ "$themelist" != "" ]; then
+       echo "theme=$themelist" >> $config_dir/config
+       echo "preroot=$themelist" >> $config_dir/miniserv.conf
+fi
+
+# If the old blue-theme is still in use, change it (new in 1.730)
+oldtheme=`grep "^theme=" $config_dir/config | sed -e 's/theme=//g'`
+if [ "$oldtheme" = "blue-theme" ]; then
+   sed -i -e 's/theme=blue-theme/theme=gray-theme/g' $config_dir/config
+   sed -i -e 's/preroot=blue-theme/preroot=gray-theme/g' $config_dir/miniserv.conf
+fi
+
+# Set the product field in the global config
+grep product= $config_dir/config >/dev/null
+if [ "$?" != "0" ]; then
+       echo product=webmin >> $config_dir/config
+fi
+
+# If password delays are not specifically disabled, enable them
+grep passdelay= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo passdelay=1 >> $config_dir/miniserv.conf
+fi
+
+
+echo "Changing ownership and permissions.."
+# Make all config dirs non-world-readable
+for m in $newmods; do
+       chown -R root:root $config_dir/$m
+       chmod -R og-rw $config_dir/$m
+done
+
+# Make miniserv config files non-world-readable
+for f in miniserv.conf miniserv.users; do
+       chown -R root:root $config_dir/$f
+       chmod -R og-rw $config_dir/$f
+done
+chmod +r $config_dir/version
+
+# Fix up bad permissions from some older installs
+for m in ldap-client ldap-server ldap-useradmin mailboxes mysql postgresql servers virtual-server; do
+       if [ -d "$config_dir/$m" ]; then
+               chown root:root $config_dir/$m
+               chmod og-rw $config_dir/$m
+               chmod og-rw $config_dir/$m/config 2>/dev/null
+       fi
+done
+echo "..done"
+echo ""
+
+
+# This executes all postinstall.pl for every module
+# If you do bump, you should look at the specific changes they do with this command in root folder:
+# find . -name postinstall.pl -exec cat {} \; -print
+# Generally they are safe to run 'cause they change only user's config in /etc/webmin
+# or setup some cron jobs
+if [ "$nopostinstall" = "" ]; then
+       echo "Running postinstall scripts.. (Please ignore any possible errors)"
+       (cd "$wadir" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/run-postinstalls.pl")
+       echo "..done"
+       echo ""
+fi
+
+# Enable background collection
+if [ "$upgrading" != 1 -a -r $config_dir/system-status/enable-collection.pl ]; then
+       echo "Enabling background status collection.. (Please ignore any possible errors)"
+       $config_dir/system-status/enable-collection.pl 5
+       echo "..done"
+       echo ""
+fi
diff --git a/app-admin/webmin/files/gentoo-setup-1.974 b/app-admin/webmin/files/gentoo-setup-1.974
new file mode 100644 (file)
index 0000000..680dfbb
--- /dev/null
@@ -0,0 +1,438 @@
+#!/bin/sh
+# gentoo-setup.sh
+#
+# Version 1.2
+#
+# A modified original Webmin setup.sh script to comply with Gentoo specifics
+#
+# Modification done by: PhobosK <phobosk@kbfx.net>
+#
+# This script runs after the webmin archive is installed, and in the pkg_config() phase.
+# It does setup the various config files of Webmin depending on if it is
+# a new install, an upgrade or a reset.
+
+LANG=
+export LANG
+
+if [ -z ${wadir} ]; then
+       echo "You can't run this script outside of the 'emerge --config app-admin/webmin' command."
+       exit 1
+fi
+
+# All things we do is from the Webmin install dir - $wadir
+cd $wadir
+
+
+# Are we hard resetting everything?
+# If yes, we do:
+# 1. Run the specific Webmin $wadir/run-uninstalls.pl
+#       It runs all uninstall.pl files in every module's folder.
+#       They delete all the set specific Webmin cron jobs.
+#       If bumping you should go through these files using the command:
+#       find . -name uninstall.pl -exec cat {} \; -print
+# 2. Delete the whole /etc/webmin content, keeping only the gentoo .keep_* files
+if [ "$reset" = "hard" ]; then
+       echo "Running Webmin's specific uninstall procedures.. (Please ignore any possible errors)"
+       (WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir LANG= "$wadir/run-uninstalls.pl")
+       echo "..done"
+       echo ""
+
+       echo "Deleting the content of user's config folder: $config_dir .."
+       find $config_dir ! -name '.keep_*' -delete 2>/dev/null
+       echo "..done"
+       echo ""
+fi
+
+
+# Are we soft resetting?
+# If yes we do:
+# - Delete the $config_dir/config file so we get new config values
+if [ "$reset" = "soft" ]; then
+       echo "Deleting the user's $config_dir/config file.."
+       if [ -f "$config_dir/config" ]; then
+               rm -f "$config_dir/config"
+       fi
+       echo "..done"
+       echo ""
+fi
+
+
+# Get all available modules of this version
+allmods=`echo */module.info | sed -e 's/\/module.info//g'`
+
+# Get current Webmin version
+ver=`cat "$wadir/version"`
+
+if [ -r "$config_dir/config" ]; then
+       upgrading=1
+fi
+
+
+# Check if upgrading from an old version
+if [ "$upgrading" = 1 ]; then
+       echo "Updating existant Webmin's config files.."
+
+       # Get current var path
+       if [ -r "$config_dir/var-path" ]; then
+               _var_dir=`cat $config_dir/var-path`
+               if [ -n ${_var_dir} ]; then
+                       var_dir=${_var_dir}
+               fi
+       fi
+
+       # Get current perl path
+       if [ -r "$config_dir/perl-path" ]; then
+               _perl=`cat $config_dir/perl-path`
+               if [ -n ${_perl} ]; then
+                       perl=${_perl}
+               fi
+       fi
+
+       # Get old os name and version
+       os_type=`grep "^os_type=" $config_dir/config | sed -e 's/os_type=//g'`
+       os_version=`grep "^os_version=" $config_dir/config | sed -e 's/os_version=//g'`
+       real_os_type=`grep "^real_os_type=" $config_dir/config | sed -e 's/real_os_type=//g'`
+       real_os_version=`grep "^real_os_version=" $config_dir/config | sed -e 's/real_os_version=//g'`
+
+       # Get port, ssl, no_ssl2, no_ssl3, ssl_redirect, no_sslcompression, ssl_honorcipherorder, no_tls1, no_tls1_1 and keyfile
+       port=`grep "^port=" $config_dir/miniserv.conf | sed -e 's/port=//g'`
+       ssl=`grep "^ssl=" $config_dir/miniserv.conf | sed -e 's/ssl=//g'`
+       no_ssl2=`grep "^no_ssl2=" $config_dir/miniserv.conf | sed -e 's/no_ssl2=//g'`
+       no_ssl3=`grep "^no_ssl3=" $config_dir/miniserv.conf | sed -e 's/no_ssl3=//g'`
+       ssl_redirect=`grep "^ssl_redirect=" $config_dir/miniserv.conf | sed -e 's/ssl_redirect=//g'`
+       ssl_honorcipherorder=`grep "^ssl_honorcipherorder=" $config_dir/miniserv.conf | sed -e 's/ssl_honorcipherorder=//g'`
+       no_sslcompression=`grep "^no_sslcompression=" $config_dir/miniserv.conf | sed -e 's/no_sslcompression=//g'`
+       no_tls1=`grep "^no_tls1=" $config_dir/miniserv.conf | sed -e 's/no_tls1=//g'`
+       no_tls1_1=`grep "^no_tls1_1=" $config_dir/miniserv.conf | sed -e 's/no_tls1_1=//g'`
+       keyfile=`grep "^keyfile=" $config_dir/miniserv.conf | sed -e 's/keyfile=//g'`
+
+       # Update ACLs
+       $perl "$wadir/newmods.pl" $config_dir $allmods
+
+       # Update miniserv.conf with new root directory, mime types file and server info
+       grep -v "^root=" $config_dir/miniserv.conf | grep -v "^mimetypes=" | grep -v "^server=" >$tempdir/$$.miniserv.conf
+       mv $tempdir/$$.miniserv.conf $config_dir/miniserv.conf
+       echo "root=$wadir" >> $config_dir/miniserv.conf
+       echo "mimetypes=$wadir/mime.types" >> $config_dir/miniserv.conf
+       echo "server=MiniServ/$ver" >> $config_dir/miniserv.conf
+       grep logout= $config_dir/miniserv.conf >/dev/null
+       if [ $? != "0" ]; then
+               echo "logout=$config_dir/logout-flag" >> $config_dir/miniserv.conf
+       fi
+
+       # Remove old cache of module infos
+       rm -f $config_dir/module.infos.cache
+       echo "..done"
+       echo ""
+else
+       # Create webserver's new config files
+       echo "Creating Webmin's new config files.."
+
+       echo $perl > $config_dir/perl-path
+       echo $var_dir > $config_dir/var-path
+
+       # Create a totally new conf file
+       cfile=$config_dir/miniserv.conf
+       echo "port=$port" > $cfile
+       echo "root=$wadir" >> $cfile
+       echo "mimetypes=$wadir/mime.types" >> $cfile
+       echo "addtype_cgi=internal/cgi" >> $cfile
+       echo "realm=Webmin Server" >> $cfile
+       echo "logfile=$var_dir/miniserv.log" >> $cfile
+       echo "errorlog=$var_dir/miniserv.error" >> $cfile
+       echo "pidfile=$pidfile" >> $cfile
+       echo "logtime=168" >> $cfile
+       echo "ppath=$ppath" >> $cfile
+       echo "ssl=$ssl" >> $cfile
+       echo "no_ssl2=$no_ssl2" >> $cfile
+       echo "no_ssl3=$no_ssl3" >> $cfile
+       echo "ssl_redirect=$ssl_redirect" >> $cfile
+       echo "ssl_honorcipherorder=$ssl_honorcipherorder" >> $cfile
+       echo "no_sslcompression=$no_sslcompression" >> $cfile
+       echo "no_tls1=$no_tls1" >> $cfile
+       echo "no_tls1_1=$no_tls1_1" >> $cfile
+       echo "keyfile=$keyfile" >> $cfile
+       echo "env_WEBMIN_CONFIG=$config_dir" >> $cfile
+       echo "env_WEBMIN_VAR=$var_dir" >> $cfile
+       echo "atboot=$atboot" >> $cfile
+       echo "logout=$config_dir/logout-flag" >> $cfile
+       echo "listen=10000" >> $cfile
+       echo "denyfile=\\.pl\$" >> $cfile
+       echo "log=1" >> $cfile
+       echo "blockhost_failures=5" >> $cfile
+       echo "blockhost_time=60" >> $cfile
+       echo "syslog=1" >> $cfile
+       echo "session=1" >> $cfile
+       echo "premodules=WebminCore" >> $cfile
+       echo "server=MiniServ/$ver" >> $cfile
+
+       # Append package-specific info to config file.
+       # miniserv-conf can be created by upstream or by us in src_install phase (see there).
+       if [ -f "$wadir/miniserv-conf" ]; then
+               cat "$wadir/miniserv-conf" >>$cfile
+       fi
+
+       # Create the default user allowed to login - root only
+       login="root"
+
+       if [ -r /etc/shadow ]; then
+               #crypt=`grep "^root:" /etc/shadow | cut -f 2 -d :`
+               crypt=x
+       else
+               crypt=`grep "^root:" /etc/passwd | cut -f 2 -d :`
+       fi
+
+       ufile=$config_dir/miniserv.users
+       echo "$login:$crypt:0" > $ufile
+       chmod 600 $ufile
+
+
+       echo "userfile=$ufile" >> $cfile
+       chmod 600 $cfile
+       echo "..done"
+       echo ""
+
+       echo "Creating access control file.."
+       afile=$config_dir/webmin.acl
+       echo "$login: $allmods" > $afile
+       chmod 600 $afile
+       echo "..done"
+       echo ""
+fi
+
+
+# Create start, stop, restart and reload Gentoo compliant Webmin scripts
+# We use sys-apps/openrc functions which is already pulled by sys-apps/baselayout
+# or systemctl if we run under systemd
+echo "Creating start and stop scripts.."
+rm -f $config_dir/{start,stop,restart,reload}
+
+# The start script in /etc/webmin (Gentoo compliant)
+cat <<END >>"$config_dir/start"
+#!/bin/sh
+
+if [ ! -f "${pidfile}" ]; then
+       if [[ -d /run/systemd/system ]] ; then
+               systemctl start webmin.service
+       else
+               rc-service --ifexists -- webmin start
+       fi
+fi
+END
+
+# The stop script in /etc/webmin (Gentoo compliant)
+cat <<END >>"$config_dir/stop"
+#!/bin/sh
+
+if [[ -d /run/systemd/system ]] ; then
+       systemctl stop webmin.service
+else
+       rc-service --ifexists -- webmin --ifstarted stop
+fi
+END
+
+# The restart script in /etc/webmin (Gentoo compliant)
+cat <<END >>"$config_dir/restart"
+#!/bin/sh
+
+if [[ -d /run/systemd/system ]] ; then
+       systemctl try-restart webmin.service
+else
+       rc-service --ifexists -- webmin --ifstarted restart
+fi
+END
+
+# The reload script in /etc/webmin (Gentoo compliant)
+cat <<END >>"$config_dir/reload"
+#!/bin/sh
+
+if [[ -d /run/systemd/system ]] ; then
+       systemctl reload-or-try-restart webmin.service
+else
+       rc-service --ifexists -- webmin --ifstarted reload
+fi
+END
+
+chmod 755 $config_dir/{start,stop,restart,reload}
+echo "..done"
+echo ""
+
+
+if [ "$upgrading" = 1 ]; then
+       echo "Updating other config files.."
+else
+       echo "Copying other config files.."
+fi
+
+# This just copies and merges the Webmin's release config files, with user's in the /etc/webmin folder
+newmods=`$perl "$wadir/copyconfig.pl" "$os_type/$real_os_type" "$os_version/$real_os_version" "$wadir" $config_dir "" $allmods`
+if [ "$upgrading" != 1 ]; then
+       # Store the OS and version
+       echo "os_type=$os_type" >> $config_dir/config
+       echo "os_version=$os_version" >> $config_dir/config
+       echo "real_os_type=$real_os_type" >> $config_dir/config
+       echo "real_os_version=$real_os_version" >> $config_dir/config
+
+       # Turn on logging by default
+       echo "log=1" >> $config_dir/config
+
+       # Disallow unknown referers by default
+       echo "referers_none=1" >>$config_dir/config
+else
+       # one-off hack to set log variable in config from miniserv.conf
+       grep log= $config_dir/config >/dev/null
+       if [ "$?" = "1" ]; then
+               grep log= $config_dir/miniserv.conf >> $config_dir/config
+               grep logtime= $config_dir/miniserv.conf >> $config_dir/config
+               grep logclear= $config_dir/miniserv.conf >> $config_dir/config
+       fi
+
+       # Disallow unknown referers if not set
+       grep referers_none= $config_dir/config >/dev/null
+       if [ "$?" != "0" ]; then
+               echo "referers_none=1" >>$config_dir/config
+       fi
+fi
+echo $ver > $config_dir/version
+echo "..done"
+echo ""
+
+# Set passwd_ fields in miniserv.conf from global config
+for field in passwd_file passwd_uindex passwd_pindex passwd_cindex passwd_mindex; do
+       grep $field= $config_dir/miniserv.conf >/dev/null
+       if [ "$?" != "0" ]; then
+               grep $field= $config_dir/config >> $config_dir/miniserv.conf
+       fi
+done
+grep passwd_mode= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo passwd_mode=0 >> $config_dir/miniserv.conf
+fi
+
+grep ssl_honorcipherorder= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo ssl_honorcipherorder=1 >> $config_dir/miniserv.conf
+fi
+
+# Disable SSL compression to defeat BEAST attack
+grep no_sslcompression= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo no_sslcompression=1 >> $config_dir/miniserv.conf
+fi
+
+# Tighten SSL security
+grep no_ssl2= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo no_ssl2=1 >> $config_dir/miniserv.conf
+fi
+
+grep no_ssl3= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo no_ssl3=1 >> $config_dir/miniserv.conf
+fi
+
+grep no_tls1= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+    echo no_tls1=1 >> $config_dir/miniserv.conf
+fi
+
+grep no_tls1_1= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+    echo no_tls1_1=1 >> $config_dir/miniserv.conf
+fi
+
+# Make Perl crypt MD5 the default
+grep md5pass= $config_dir/config >/dev/null
+if [ "$?" != "0" ]; then
+       echo md5pass=1 >> $config_dir/config
+fi
+
+# Set a special theme if none was set before
+if [ "$theme" = "" ]; then
+       theme=`cat "$wadir/defaulttheme" 2>/dev/null`
+fi
+oldthemeline=`grep "^theme=" $config_dir/config`
+oldtheme=`echo $oldthemeline | sed -e 's/theme=//g'`
+if [ "$theme" != "" ] && [ "$oldthemeline" = "" ] && [ -d "$wadir/$theme" ]; then
+       themelist=$theme
+fi
+
+# Set a special overlay if none was set before
+if [ "$overlay" = "" ]; then
+       overlay=`cat "$wadir/defaultoverlay" 2>/dev/null`
+fi
+if [ "$overlay" != "" ] && [ "$theme" != "" ] && [ -d "$wadir/$overlay" ]; then
+       themelist="$themelist $overlay"
+fi
+
+# Apply the theme and maybe overlay
+if [ "$themelist" != "" ]; then
+       echo "theme=$themelist" >> $config_dir/config
+       echo "preroot=$themelist" >> $config_dir/miniserv.conf
+fi
+
+# If the old blue-theme is still in use, change it (new in 1.730)
+oldtheme=`grep "^theme=" $config_dir/config | sed -e 's/theme=//g'`
+if [ "$oldtheme" = "blue-theme" ]; then
+   sed -i -e 's/theme=blue-theme/theme=gray-theme/g' $config_dir/config
+   sed -i -e 's/preroot=blue-theme/preroot=gray-theme/g' $config_dir/miniserv.conf
+fi
+
+# Set the product field in the global config
+grep product= $config_dir/config >/dev/null
+if [ "$?" != "0" ]; then
+       echo product=webmin >> $config_dir/config
+fi
+
+# If password delays are not specifically disabled, enable them
+grep passdelay= $config_dir/miniserv.conf >/dev/null
+if [ "$?" != "0" ]; then
+       echo passdelay=1 >> $config_dir/miniserv.conf
+fi
+
+
+echo "Changing ownership and permissions.."
+# Make all config dirs non-world-readable
+for m in $newmods; do
+       chown -R root:root $config_dir/$m
+       chmod -R og-rw $config_dir/$m
+done
+
+# Make miniserv config files non-world-readable
+for f in miniserv.conf miniserv.users; do
+       chown -R root:root $config_dir/$f
+       chmod -R og-rw $config_dir/$f
+done
+chmod +r $config_dir/version
+
+# Fix up bad permissions from some older installs
+for m in ldap-client ldap-server ldap-useradmin mailboxes mysql postgresql servers virtual-server; do
+       if [ -d "$config_dir/$m" ]; then
+               chown root:root $config_dir/$m
+               chmod og-rw $config_dir/$m
+               chmod og-rw $config_dir/$m/config 2>/dev/null
+       fi
+done
+echo "..done"
+echo ""
+
+
+# This executes all postinstall.pl for every module
+# If you do bump, you should look at the specific changes they do with this command in root folder:
+# find . -name postinstall.pl -exec cat {} \; -print
+# Generally they are safe to run 'cause they change only user's config in /etc/webmin
+# or setup some cron jobs
+if [ "$nopostinstall" = "" ]; then
+       echo "Running postinstall scripts.. (Please ignore any possible errors)"
+       (cd "$wadir" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/run-postinstalls.pl")
+       echo "..done"
+       echo ""
+fi
+
+# Enable background collection
+if [ "$upgrading" != 1 -a -r $config_dir/system-status/enable-collection.pl ]; then
+       echo "Enabling background status collection.. (Please ignore any possible errors)"
+       $config_dir/system-status/enable-collection.pl 5
+       echo "..done"
+       echo ""
+fi
diff --git a/app-admin/webmin/files/init.d.webmin b/app-admin/webmin/files/init.d.webmin
new file mode 100644 (file)
index 0000000..f32a01d
--- /dev/null
@@ -0,0 +1,88 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+
+# We do not give a choice to user for configuring these 'cause it will mess up
+# Webmin's configuration
+WEBMIN_EXE="%exe%"
+WEBMIN_PID="%pid%"
+WEBMIN_CONF="%conf%"
+WEBMIN_CONFIG="%config%"
+MYPORT="`grep port /etc/webmin/miniserv.conf | cut -c6-`"
+extra_started_commands="reload"
+
+depend() {
+       use net logger
+}
+
+checkconfig() {
+       # Check if Webmin setup has been done
+       if [ ! -f ${WEBMIN_CONFIG} ]; then
+               eerror "Error in Webmin's configuration. The ${WEBMIN_CONFIG} is not present."
+               eerror "Please run 'emerge --config app-admin/webmin' to fix this."
+               return 1
+       fi
+
+       # Check if ssl cert is present
+       local key ssl
+       key=`grep "^keyfile=" ${WEBMIN_CONF} | sed -e 's/keyfile=//g'`
+       ssl=`grep "^ssl=" ${WEBMIN_CONF} | sed -e 's/ssl=//g'`
+
+       if [ ! -f "${key}" ] ; then
+               if [ "${ssl}" = "0" ]; then
+                       ewarn "Your SSL certificate is not present."
+                       ewarn "Please either fix the path in the 'keyfile=' option of your ${WEBMIN_CONF}"
+                       ewarn "OR run 'emerge --config app-admin/webmin'"
+               else
+                       eerror "Error in Webmin's configuration. No SSL certificate is present."
+                       eerror "Please either fix the path in the 'keyfile=' option of your ${WEBMIN_CONF}"
+                       eerror "OR change the 'ssl=' option of your ${WEBMIN_CONF} to 'ssl=0'"
+                       eerror "OR run 'emerge --config app-admin/webmin'"
+                       return 1
+               fi
+       fi
+
+       return 0
+}
+
+reload() {
+       if [ ! -f "${WEBMIN_PID}" ]; then
+               eerror "Webmin is not running"
+               return 1
+       fi
+
+       checkconfig || return 1
+
+       ebegin "Reloading Webmin's configuration files"
+       start-stop-daemon --signal USR1 --pidfile "$WEBMIN_PID"
+       eend $?
+}
+
+start() {
+       checkconfig || return 1
+       ebegin "Starting Webmin"
+
+       start-stop-daemon --start --background --interpreted \
+               --env LANG= \
+               --env PERLLIB="%perllib%" \
+               --exec "$WEBMIN_EXE" \
+               --pidfile "$WEBMIN_PID" \
+               -- "$WEBMIN_CONF"
+       eend $?
+       # Leave time to spawn, so no stop is received while spawning
+       sleep 3
+       einfo "Webin is reachable under"
+       einfo "https://127.0.0.1:$MYPORT"
+}
+
+stop() {
+       ebegin "Stopping Webmin"
+       start-stop-daemon --stop  --interpreted --quiet \
+               --exec "$WEBMIN_EXE" \
+               --pidfile "$WEBMIN_PID"
+       eend $?
+       # Leave time to stop because of the scripts that use this
+       sleep 3
+}
+
diff --git a/app-admin/webmin/files/webmin.service b/app-admin/webmin/files/webmin.service
new file mode 100644 (file)
index 0000000..5bec85b
--- /dev/null
@@ -0,0 +1,18 @@
+[Unit]
+Description=Webmin Administration Tool
+After=network.target remote-fs.target nss-lookup.target
+ConditionFileNotEmpty=%config%
+ConditionFileNotEmpty=%conf%
+
+[Service]
+RemainAfterExit=yes
+KillMode=mixed
+# Webmin is exiting with 1 on SIGTERM
+SuccessExitStatus=1
+ExecStart=%exe% %conf%
+PIDFile=%pid%
+Environment="PERLLIB=%perllib%" LANG= 
+ExecReload=/bin/kill -USR1 $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-admin/webmin/webmin-1.881.ebuild b/app-admin/webmin/webmin-1.881.ebuild
new file mode 100644 (file)
index 0000000..28d8074
--- /dev/null
@@ -0,0 +1,314 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+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"
+}
diff --git a/app-admin/webmin/webmin-1.974.ebuild b/app-admin/webmin/webmin-1.974.ebuild
new file mode 100644 (file)
index 0000000..28d8074
--- /dev/null
@@ -0,0 +1,314 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+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"
+}
diff --git a/app-admin/webmin/webmin-1.974.ebuild.old b/app-admin/webmin/webmin-1.974.ebuild.old
new file mode 100644 (file)
index 0000000..eeb9d84
--- /dev/null
@@ -0,0 +1,82 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit pam 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"
+
+IUSE="minimal 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 $?
+}
+
diff --git a/dev-libs/boost/Manifest b/dev-libs/boost/Manifest
new file mode 100644 (file)
index 0000000..be2cec0
--- /dev/null
@@ -0,0 +1,10 @@
+AUX boost-1.71.0-build-auto_index-tool.patch 265 BLAKE2B 05e52ca716522db7bb11b481576a08138be826f7383a689a6c0725d491a244dc8697fc39fac1a79e4639ba51b3a3eb7ee2f2e11a20883de0ecd3dd3c2fc2c9cd SHA512 28952e7cd791678be0963beb0a29e3e40b54a8c3618c66a8b8d21ab63c414771cfa1e9961f08c0b3818bd4c311c122e777109e15002a71230b0c3c9dbc4d6075
+AUX boost-1.71.0-context-x32.patch 1116 BLAKE2B 16b6ddbdc47d72d5afd39e61441f9f094dff8db46bd7fa4e04e5a8b132c8894c51db506d20356c352022f42d5b9a9923f23c5db2b0f9fa1c64ceeb4e50e16be1 SHA512 cf76691d4adbc4b43f468c587fea23c43e1b337ba7eebff2c856b0403bf32b78826f483faca25a4459c1d47eabbd5b67c65863a4d44407990178022433f718bf
+AUX boost-1.71.0-disable_icu_rpath.patch 1077 BLAKE2B c4549b7a706cd934392bdafb44ee89987534d5cca48060b955a4b998f0ac6c8a96b5c0d6f5d46476a0225ba6e66fabc095ec12c0f0c43a60c7147ef922e8a2ae SHA512 7095d94def1ee04f009f0c2e84d0450705211793f6d18ac4a3e0fb673a36127282f31172a7f571ed89f4128b6ffbc38d850e6105a5ad5224d42749557db41ee0
+AUX boost-1.73-boost-mpi-python-PEP-328.patch 396 BLAKE2B 5f08ce2eab46f2d108166afef086382dc9cd9a5305435cf437fa3ae505736979664357aa23cc51b2a74bee6aae46d94a671056037578562846e900fd2c7e65e8 SHA512 fa55d1da17bd110db2c9a16dce4da267a62ef10c13a6dc3aa6afd3b33e9a18499266b4411d292533b1c691e3bf0309fa1aab8ec19e7775a7835d89275183e6f2
+AUX boost-1.73-property-tree-include.patch 1832 BLAKE2B 7488cf768209bde32af608f366ad0d9a392bb36e6b9e4c7ac13a262eedea668fb58667f41cd089c91f43fee4a6a68e442c2e627ffa2341c44274b4f4f7f644db SHA512 a18fa18388b74371aa3d3826621df90e8c8f6d2c6b9cf25bc9f7761e98817cc9252ccd43fa5a374136f257e9a0c1f927eb9912d0715bb1de94b3e92af957d84a
+AUX boost-1.74-CVE-2012-2677.patch 4965 BLAKE2B 74cef075cd0aa4d4425e75d437a59c19e20325cc33c9c8fb206bdcf87efbafa6d28c6ebcd8b70f88f12e32b68b492ac6b985ccef703c61439661a194983b9ad9 SHA512 c8e6758840b58358b676226ef9f498b9e72cbeedee83cd6c8ea0608a6bc1466bedeba5b7a92d1a608c3a2788cb3c0444203e70995e3b3123198bf68081b477b9
+AUX boost-1.76-boost-numpy.patch 910 BLAKE2B 6f0b8fdf908e7be43556ba61301d0465f0b8464120d342b6ddbd053eecc432bf2c4a60e84eced622bd3fe0da468c5941fa2d5b9592490c453193ef3eaf239a8a SHA512 245cb97c493e85eae3567a720eebac7eb53d1691d22015edc27f7a56e379c9f59f5a89c49889149ec203c28ede2ed1b9853c742e604fa4b60f7a83f8b2698fba
+AUX boost-1.76-sparc-define.patch 1026 BLAKE2B ad88b1c5231c0cbbd6bfb1f01d050ff20fbee145a656a439b2920f23f116693e6a999dce9db6bb0cac94ad2f98580f0669198d026b28c05fe7a82b5887fbadff SHA512 62d63bc3db7352daf6ad47a25bbeef2bed3405e4e43650d4c34ad8535a96ae13f875837b727082c8a5b7671c35a67a20978baf44d59f15a57053308a31827373
+DIST boost_1_76_0.tar.bz2 110073117 BLAKE2B 45445e6a9725cb99131e0b831b2fac0840d083692c13887b41adeac5cb8b3732026db3641d6be20591a676b78a87fcf363eb9b1508f87ed26039bba6a1ced533 SHA512 5d68bed98c57e03b4cb2420d9b856e5f0669561a6142a4b0c9c8a58dc5b6b28e16ccbb16ac559c3a3198c45769a246bf996b96cb7b6a019dd15f05c2270e9429
+EBUILD boost-1.76.0-r1.ebuild 10967 BLAKE2B 3ef87a872fad7945d82e1392013ea4bb2ab7526d816034df3e5b9e2f44412cdc4ebc5a6e7376631876b3f876ecc9593651d5407cabf703720e953b7ae05e883b SHA512 0fe6a80c702416eb1be54199e2c479478d57813f2114e1b5f90f6377081b872e25aff166872c7a009be328072dc97e89118d605d8318843e056fc19505c56a0c
diff --git a/dev-libs/boost/boost-1.76.0-r1.ebuild b/dev-libs/boost/boost-1.76.0-r1.ebuild
new file mode 100644 (file)
index 0000000..83a1e70
--- /dev/null
@@ -0,0 +1,352 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit flag-o-matic multiprocessing python-r1 toolchain-funcs multilib-minimal
+
+MY_PV="$(ver_rs 1- _)"
+MAJOR_V="$(ver_cut 1-2)"
+
+DESCRIPTION="Boost Libraries for C++"
+HOMEPAGE="https://www.boost.org/"
+SRC_URI="https://boostorg.jfrog.io/artifactory/main/release/${PV}/source/boost_${MY_PV}.tar.bz2"
+S="${WORKDIR}/${PN}_${MY_PV}"
+
+LICENSE="Boost-1.0"
+SLOT="0/${PV}" # ${PV} instead ${MAJOR_V} due to bug 486122
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="bzip2 context debug doc icu lzma +nls mpi numpy python static-libs +threads tools zlib zstd"
+REQUIRED_USE="
+       mpi? ( threads )
+       python? ( ${PYTHON_REQUIRED_USE} )"
+# the tests will never fail because these are not intended as sanity
+# tests at all. They are more a way for upstream to check their own code
+# on new compilers. Since they would either be completely unreliable
+# (failing for no good reason) or completely useless (never failing)
+# there is no point in having them in the ebuild to begin with.
+RESTRICT="test"
+
+RDEPEND="
+       !app-admin/eselect-boost
+       !dev-libs/boost-numpy
+       !<dev-libs/leatherman-1.12.0-r1
+       bzip2? ( app-arch/bzip2:=[${MULTILIB_USEDEP}] )
+       icu? ( >=dev-libs/icu-3.6:=[${MULTILIB_USEDEP}] )
+       !icu? ( virtual/libiconv[${MULTILIB_USEDEP}] )
+       lzma? ( app-arch/xz-utils:=[${MULTILIB_USEDEP}] )
+       mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP},cxx,threads] )
+       python? (
+               ${PYTHON_DEPS}
+               numpy? ( dev-python/numpy[${PYTHON_USEDEP}] )
+       )
+       zlib? ( sys-libs/zlib:=[${MULTILIB_USEDEP}] )
+       zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-util/boost-build-${MAJOR_V}-r2"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.71.0-disable_icu_rpath.patch
+       "${FILESDIR}"/${PN}-1.71.0-context-x32.patch
+       "${FILESDIR}"/${PN}-1.71.0-build-auto_index-tool.patch
+       # Boost.MPI's __init__.py doesn't work on Py3
+       "${FILESDIR}"/${PN}-1.73-boost-mpi-python-PEP-328.patch
+       "${FILESDIR}"/${PN}-1.74-CVE-2012-2677.patch
+       "${FILESDIR}"/${PN}-1.76-boost-numpy.patch
+       "${FILESDIR}"/${PN}-1.76-sparc-define.patch
+)
+
+python_bindings_needed() {
+       multilib_is_native_abi && use python
+}
+
+tools_needed() {
+       multilib_is_native_abi && use tools
+}
+
+create_user-config.jam() {
+       local user_config_jam="${BUILD_DIR}"/user-config.jam
+       if [[ -s ${user_config_jam} ]]; then
+               einfo "${user_config_jam} already exists, skipping configuration"
+               return
+       else
+               einfo "Creating configuration in ${user_config_jam}"
+       fi
+
+       local compiler compiler_version compiler_executable="$(tc-getCXX)"
+       if [[ ${CHOST} == *-darwin* ]]; then
+               compiler="darwin"
+               compiler_version="$(gcc-fullversion)"
+       else
+               compiler="gcc"
+               compiler_version="$(gcc-version)"
+       fi
+
+       if use mpi; then
+               local mpi_configuration="using mpi ;"
+       fi
+
+       cat > "${user_config_jam}" <<- __EOF__ || die
+               using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+               ${mpi_configuration}
+       __EOF__
+
+       if python_bindings_needed; then
+               append_to_user_config() {
+                       local py_config
+                       if tc-is-cross-compiler; then
+                               py_config="using python : ${EPYTHON#python} : : ${ESYSROOT}/usr/include/${EPYTHON} : ${ESYSROOT}/usr/$(get_libdir) ;"
+                       else
+                               py_config="using python : ${EPYTHON#python} : ${PYTHON} : $(python_get_includedir) ;"
+                       fi
+                       echo "${py_config}" >> "${user_config_jam}" || die
+               }
+               python_foreach_impl append_to_user_config
+       fi
+
+       if python_bindings_needed && use numpy; then
+               einfo "Enabling support for NumPy extensions in Boost.Python"
+       else
+               einfo "Disabling support for NumPy extensions in Boost.Python"
+
+               # Boost.Build does not allow for disabling of numpy
+               # extensions, thereby leading to automagic numpy
+               # https://github.com/boostorg/python/issues/111#issuecomment-280447482
+               sed \
+                       -e 's/\[ unless \[ python\.numpy \] : <build>no \]/<build>no/g' \
+                       -i "${BUILD_DIR}"/libs/python/build/Jamfile || die
+       fi
+}
+
+pkg_setup() {
+       # Bail out on unsupported build configuration, bug #456792
+       if [[ -f "${EROOT}"/etc/site-config.jam ]]; then
+               if ! grep -q 'gentoo\(debug\|release\)' "${EROOT}"/etc/site-config.jam; then
+                       eerror "You are using custom ${EROOT}/etc/site-config.jam without defined gentoorelease/gentoodebug targets."
+                       eerror "Boost can not be built in such configuration."
+                       eerror "Please, either remove this file or add targets from ${EROOT}/usr/share/boost-build/site-config.jam to it."
+                       die "Unsupported target in ${EROOT}/etc/site-config.jam"
+               fi
+       fi
+}
+
+src_prepare() {
+       default
+       multilib_copy_sources
+}
+
+ejam() {
+       create_user-config.jam
+
+       local b2_opts=( "--user-config=${BUILD_DIR}/user-config.jam" )
+       if python_bindings_needed; then
+               append_to_b2_opts() {
+                       b2_opts+=( python="${EPYTHON#python}" )
+               }
+               python_foreach_impl append_to_b2_opts
+       else
+               b2_opts+=( --without-python )
+       fi
+       b2_opts+=( "$@" )
+
+       echo b2 "${b2_opts[@]}" >&2
+       b2 "${b2_opts[@]}"
+}
+
+src_configure() {
+       # Workaround for too many parallel processes requested, bug #506064
+       [[ "$(makeopts_jobs)" -gt 64 ]] && MAKEOPTS="${MAKEOPTS} -j64"
+
+       OPTIONS=(
+               $(usex debug gentoodebug gentoorelease)
+               "-j$(makeopts_jobs)"
+               -q
+               -d+2
+               pch=off
+               $(usex icu "-sICU_PATH=${ESYSROOT}/usr" '--disable-icu boost.locale.icu=off')
+               $(usex mpi '' '--without-mpi')
+               $(usex nls '' '--without-locale')
+               $(usex context '' '--without-context --without-coroutine --without-fiber')
+               $(usex threads '' '--without-thread')
+               --without-stacktrace
+               --boost-build="${BROOT}"/usr/share/boost-build/src
+               --layout=system
+               # building with threading=single is currently not possible
+               # https://svn.boost.org/trac/boost/ticket/7105
+               threading=multi
+               link=$(usex static-libs shared,static shared)
+               # this seems to be the only way to disable compression algorithms
+               # https://www.boost.org/doc/libs/1_70_0/libs/iostreams/doc/installation.html#boost-build
+               -sNO_BZIP2=$(usex bzip2 0 1)
+               -sNO_LZMA=$(usex lzma 0 1)
+               -sNO_ZLIB=$(usex zlib 0 1)
+               -sNO_ZSTD=$(usex zstd 0 1)
+       )
+
+       if [[ ${CHOST} == *-darwin* ]]; then
+               # We need to add the prefix, and in two cases this exceeds, so prepare
+               # for the largest possible space allocation.
+               append-ldflags -Wl,-headerpad_max_install_names
+       fi
+
+       # Use C++14 globally as of 1.62
+       append-cxxflags -std=c++14
+}
+
+multilib_src_compile() {
+       ejam \
+               --prefix="${EPREFIX}"/usr \
+               "${OPTIONS[@]}" || die
+
+       if tools_needed; then
+               pushd tools >/dev/null || die
+               ejam \
+                       --prefix="${EPREFIX}"/usr \
+                       "${OPTIONS[@]}" \
+                       || die "Building of Boost tools failed"
+               popd >/dev/null || die
+       fi
+}
+
+multilib_src_install() {
+       ejam \
+               --prefix="${ED}"/usr \
+               --includedir="${ED}"/usr/include \
+               --libdir="${ED}"/usr/$(get_libdir) \
+               "${OPTIONS[@]}" install || die "Installation of Boost libraries failed"
+
+       pushd "${ED}"/usr/$(get_libdir) >/dev/null || die
+
+       local ext=$(get_libname)
+       if use threads; then
+               local f
+               for f in *${ext}; do
+                       dosym ${f} /usr/$(get_libdir)/${f/${ext}/-mt${ext}}
+               done
+       fi
+
+       popd >/dev/null || die
+
+       if tools_needed; then
+               dobin dist/bin/*
+
+               insinto /usr/share
+               doins -r dist/share/boostbook
+       fi
+
+       # boost's build system truely sucks for not having a destdir.  Because for
+       # this reason we are forced to build with a prefix that includes the
+       # DESTROOT, dynamic libraries on Darwin end messed up, referencing the
+       # DESTROOT instread of the actual EPREFIX.  There is no way out of here
+       # but to do it the dirty way of manually setting the right install_names.
+       if [[ ${CHOST} == *-darwin* ]]; then
+               einfo "Working around completely broken build-system(tm)"
+               local d
+               for d in "${ED}"/usr/lib/*.dylib; do
+                       if [[ -f ${d} ]]; then
+                               # fix the "soname"
+                               ebegin "  correcting install_name of ${d#${ED}}"
+                               install_name_tool -id "/${d#${D}}" "${d}"
+                               eend $?
+                               # fix references to other libs
+                               refs=$(otool -XL "${d}" | \
+                                       sed -e '1d' -e 's/^\t//' | \
+                                       grep "^libboost_" | \
+                                       cut -f1 -d' ')
+                               local r
+                               for r in ${refs}; do
+                                       ebegin "    correcting reference to ${r}"
+                                       install_name_tool -change \
+                                               "${r}" \
+                                               "${EPREFIX}/usr/lib/${r}" \
+                                               "${d}"
+                                       eend $?
+                               done
+                       fi
+               done
+       fi
+}
+
+multilib_src_install_all() {
+       if ! use numpy; then
+               rm -r "${ED}"/usr/include/boost/python/numpy* || die
+       fi
+
+       if use python; then
+               if use mpi; then
+                       move_mpi_py_into_sitedir() {
+                               python_moduleinto boost
+                               python_domodule "${S}"/libs/mpi/build/__init__.py
+
+                               python_domodule "${ED}"/usr/$(get_libdir)/boost-${EPYTHON}/mpi.so
+                               rm -r "${ED}"/usr/$(get_libdir)/boost-${EPYTHON} || die
+
+                               python_optimize
+                       }
+                       python_foreach_impl move_mpi_py_into_sitedir
+               else
+                       rm -r "${ED}"/usr/include/boost/mpi/python* || die
+               fi
+       else
+               rm -r "${ED}"/usr/include/boost/{python*,mpi/python*,parameter/aux_/python,parameter/python*} || die
+       fi
+
+       if ! use nls; then
+               rm -r "${ED}"/usr/include/boost/locale || die
+       fi
+
+       if ! use context; then
+               rm -r "${ED}"/usr/include/boost/context || die
+               rm -r "${ED}"/usr/include/boost/coroutine{,2} || die
+               rm "${ED}"/usr/include/boost/asio/spawn.hpp || die
+       fi
+
+       if use doc; then
+               # find extraneous files that shouldn't be installed
+               # as part of the documentation and remove them.
+               find libs/*/* \( -iname 'test' -o -iname 'src' \) -exec rm -rf '{}' + || die
+               find doc \( -name 'Jamfile.v2' -o -name 'build' -o -name '*.manifest' \) -exec rm -rf '{}' + || die
+               find tools \( -name 'Jamfile.v2' -o -name 'src' -o -name '*.cpp' -o -name '*.hpp' \) -exec rm -rf '{}' + || die
+
+               docinto html
+               dodoc *.{htm,html,png,css}
+               dodoc -r doc libs more tools
+
+               # To avoid broken links
+               dodoc LICENSE_1_0.txt
+
+               dosym ../../../../include/boost /usr/share/doc/${PF}/html/boost
+       fi
+}
+
+pkg_preinst() {
+       # Yay for having symlinks that are nigh-impossible to remove without
+       # resorting to dirty hacks like these. Removes lingering symlinks
+       # from the slotted versions.
+       local symlink
+       for symlink in "${EROOT}"/usr/include/boost "${EROOT}"/usr/share/boostbook; do
+               if [[ -L ${symlink} ]]; then
+                       rm -f "${symlink}" || die
+               fi
+       done
+
+       # some ancient installs still have boost cruft lying around
+       # for unknown reasons, causing havoc for reverse dependencies
+       # Bug: 607734
+       rm -rf "${EROOT}"/usr/include/boost-1_[3-5]? || die
+}
+
+pkg_postinst() {
+       elog "Boost.Regex is *extremely* ABI sensitive. If you get errors such as"
+       elog
+       elog "  undefined reference to \`boost::re_detail_$(ver_cut 1)0$(ver_cut 2)00::cpp_regex_traits_implementation"
+       elog "    <char>::transform_primary[abi:cxx11](char const*, char const*) const'"
+       elog
+       elog "Then you need to recompile Boost and all its reverse dependencies"
+       elog "using the same toolchain. In general, *every* change of the C++ toolchain"
+       elog "requires a complete rebuild of the Boost-dependent ecosystem."
+       elog
+       elog "See for instance https://bugs.gentoo.org/638138"
+}
diff --git a/dev-libs/boost/files/boost-1.71.0-build-auto_index-tool.patch b/dev-libs/boost/files/boost-1.71.0-build-auto_index-tool.patch
new file mode 100644 (file)
index 0000000..ca793b9
--- /dev/null
@@ -0,0 +1,13 @@
+Build auto_index tool with USE="tools"
+See also: https://bugs.gentoo.org/529066
+
+--- a/tools/Jamfile.v2
++++ b/tools/Jamfile.v2
+@@ -18,6 +18,7 @@
+     ;
+ TOOLS =
++    auto_index/build//auto_index
+     bcp//bcp
+     inspect/build//inspect
+     quickbook//quickbook
diff --git a/dev-libs/boost/files/boost-1.71.0-context-x32.patch b/dev-libs/boost/files/boost-1.71.0-context-x32.patch
new file mode 100644 (file)
index 0000000..9ee3d54
--- /dev/null
@@ -0,0 +1,38 @@
+--- a/libs/context/src/asm/jump_i386_sysv_elf_gas.S
++++ b/libs/context/src/asm/jump_i386_sysv_elf_gas.S
+@@ -24,6 +24,10 @@
+  *                                                                                      *
+  ****************************************************************************************/
++#ifdef __x86_64__
++#include "jump_x86_64_sysv_elf_gas.S"
++#else
++
+ .file "jump_i386_sysv_elf_gas.S"
+ .text
+ .globl jump_fcontext
+@@ -81,3 +85,5 @@
+ /* Mark that we don't need executable stack.  */
+ .section .note.GNU-stack,"",%progbits
++
++#endif
+--- a/libs/context/src/asm/make_i386_sysv_elf_gas.S
++++ b/libs/context/src/asm/make_i386_sysv_elf_gas.S
+@@ -24,6 +24,10 @@
+  *                                                                                      *
+  ****************************************************************************************/
++#ifdef __x86_64__
++#include "make_x86_64_sysv_elf_gas.S"
++#else
++
+ .file "make_i386_sysv_elf_gas.S"
+ .text
+ .globl make_fcontext
+@@ -105,3 +109,5 @@
+ /* Mark that we don't need executable stack.  */
+ .section .note.GNU-stack,"",%progbits
++
++#endif
diff --git a/dev-libs/boost/files/boost-1.71.0-disable_icu_rpath.patch b/dev-libs/boost/files/boost-1.71.0-disable_icu_rpath.patch
new file mode 100644 (file)
index 0000000..32faf8d
--- /dev/null
@@ -0,0 +1,29 @@
+--- a/libs/locale/build/Jamfile.v2
++++ b/libs/locale/build/Jamfile.v2
+@@ -65,8 +65,8 @@
+ if $(ICU_LINK)
+ {
+-    ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <runtime-link>shared ;
+-    ICU64_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin64 <runtime-link>shared ;
++    ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <runtime-link>shared ;
++    ICU64_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <runtime-link>shared ;
+ }
+ else
+ {
+@@ -124,7 +124,6 @@
+       <library>icuuc/<link>shared/<runtime-link>shared 
+       <library>icudt/<link>shared/<runtime-link>shared 
+       <library>icuin/<link>shared/<runtime-link>shared
+-      <dll-path>$(ICU_PATH)/bin
+         <runtime-link>shared ;
+@@ -183,7 +182,6 @@
+       <library>icuuc_64/<link>shared/<runtime-link>shared 
+       <library>icudt_64/<link>shared/<runtime-link>shared 
+       <library>icuin_64/<link>shared/<runtime-link>shared
+-      <dll-path>$(ICU_PATH)/bin64
+         <runtime-link>shared ;
+  
+     
diff --git a/dev-libs/boost/files/boost-1.73-boost-mpi-python-PEP-328.patch b/dev-libs/boost/files/boost-1.73-boost-mpi-python-PEP-328.patch
new file mode 100644 (file)
index 0000000..444db2b
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/libs/mpi/build/__init__.py
++++ b/libs/mpi/build/__init__.py
+@@ -1,10 +1,12 @@
++from __future__ import absolute_import
++
+ import sys
+ if sys.platform == 'linux2':
+     import DLFCN as dl
+     flags = sys.getdlopenflags()
+     sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
+-    import mpi
++    from . import mpi
+     sys.setdlopenflags(flags)
+ else:
+-    import mpi
++    from . import mpi
diff --git a/dev-libs/boost/files/boost-1.73-property-tree-include.patch b/dev-libs/boost/files/boost-1.73-property-tree-include.patch
new file mode 100644 (file)
index 0000000..5393882
--- /dev/null
@@ -0,0 +1,45 @@
+From d1c8825a45a0717e1ad79583d3283b0e5e32831e Mon Sep 17 00:00:00 2001
+From: Andrey Semashev <Lastique@users.noreply.github.com>
+Date: Tue, 28 Apr 2020 22:03:04 +0300
+Subject: [PATCH] Fix usage of deprecated Boost.Bind features
+
+This fixes deprecation warnings generated by boost/bind.hpp.
+
+Also, use a more actual include path for ref.hpp.
+---
+ boost/property_tree/json_parser/detail/parser.hpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/boost/property_tree/json_parser/detail/parser.hpp b/boost/property_tree/json_parser/detail/parser.hpp
+index 5554990fb..6cf636394 100644
+--- a/boost/property_tree/json_parser/detail/parser.hpp
++++ b/boost/property_tree/json_parser/detail/parser.hpp
+@@ -3,8 +3,8 @@
+ #include <boost/property_tree/json_parser/error.hpp>
+-#include <boost/ref.hpp>
+-#include <boost/bind.hpp>
++#include <boost/core/ref.hpp>
++#include <boost/bind/bind.hpp>
+ #include <boost/format.hpp>
+ #include <iterator>
+@@ -214,7 +214,7 @@ namespace boost { namespace property_tree {
+         void process_codepoint(Sentinel end, EncodingErrorFn error_fn) {
+             encoding.transcode_codepoint(cur, end,
+                 boost::bind(&Callbacks::on_code_unit,
+-                            boost::ref(callbacks), _1),
++                            boost::ref(callbacks), boost::placeholders::_1),
+                 error_fn);
+         }
+@@ -517,7 +517,7 @@ namespace boost { namespace property_tree {
+         void feed(unsigned codepoint) {
+             encoding.feed_codepoint(codepoint,
+                                     boost::bind(&Callbacks::on_code_unit,
+-                                                boost::ref(callbacks), _1));
++                                                boost::ref(callbacks), boost::placeholders::_1));
+         }
+         Callbacks& callbacks;
diff --git a/dev-libs/boost/files/boost-1.74-CVE-2012-2677.patch b/dev-libs/boost/files/boost-1.74-CVE-2012-2677.patch
new file mode 100644 (file)
index 0000000..ff947f7
--- /dev/null
@@ -0,0 +1,125 @@
+https://src.fedoraproject.org/rpms/boost/raw/master/f/boost-1.58.0-pool.patch
+https://bugzilla.redhat.com/show_bug.cgi?id=828856
+https://bugs.gentoo.org/620468
+https://svn.boost.org/trac10/ticket/6701
+
+Index: boost/pool/pool.hpp
+===================================================================
+--- a/boost/pool/pool.hpp      (revision 78317)
++++ b/boost/pool/pool.hpp      (revision 78326)
+@@ -27,4 +27,6 @@
+ #include <boost/pool/poolfwd.hpp>
++// std::numeric_limits
++#include <boost/limits.hpp>
+ // boost::integer::static_lcm
+ #include <boost/integer/common_factor_ct.hpp>
+@@ -358,4 +360,11 @@
+     }
++    size_type max_chunks() const
++    { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
++      size_type partition_size = alloc_size();
++      size_type POD_size = integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
++      return (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
++    }
++
+     static void * & nextof(void * const ptr)
+     { //! \returns Pointer dereferenced.
+@@ -377,5 +388,7 @@
+       //!   the first time that object needs to allocate system memory.
+       //!   The default is 32. This parameter may not be 0.
+-      //! \param nmax_size is the maximum number of chunks to allocate in one block.
++      //! \param nmax_size is the maximum number of chunks to allocate in one block.                  
++      set_next_size(nnext_size);
++      set_max_size(nmax_size);
+     }
+@@ -400,7 +413,7 @@
+     }
+     void set_next_size(const size_type nnext_size)
+-    { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0.
+-      //! \returns nnext_size.
+-      next_size = start_size = nnext_size;
++    { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0.     
++      BOOST_USING_STD_MIN();
++      next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks());
+     }
+     size_type get_max_size() const
+@@ -410,5 +423,6 @@
+     void set_max_size(const size_type nmax_size)
+     { //! Set max_size.
+-      max_size = nmax_size;
++      BOOST_USING_STD_MIN();
++      max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks());
+     }
+     size_type get_requested_size() const
+@@ -713,7 +727,7 @@
+   BOOST_USING_STD_MIN();
+   if(!max_size)
+-    next_size <<= 1;
++    set_next_size(next_size << 1);
+   else if( next_size*partition_size/requested_size < max_size)
+-    next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++    set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+   //  initialize it,
+@@ -753,7 +767,7 @@
+   BOOST_USING_STD_MIN();
+   if(!max_size)
+-    next_size <<= 1;
++    set_next_size(next_size << 1);
+   else if( next_size*partition_size/requested_size < max_size)
+-    next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++    set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+   //  initialize it,
+@@ -797,4 +811,6 @@
+   //! \returns Address of chunk n if allocated ok.
+   //! \returns 0 if not enough memory for n chunks.
++  if (n > max_chunks())
++    return 0;
+   const size_type partition_size = alloc_size();
+@@ -845,7 +861,7 @@
+   BOOST_USING_STD_MIN();
+   if(!max_size)
+-    next_size <<= 1;
++    set_next_size(next_size << 1);
+   else if( next_size*partition_size/requested_size < max_size)
+-    next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++    set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+   //  insert it into the list,
+Index: libs/pool/test/test_bug_6701.cpp
+===================================================================
+--- a/libs/pool/test/test_bug_6701.cpp (revision 78326)
++++ b/libs/pool/test/test_bug_6701.cpp (revision 78326)
+@@ -0,0 +1,27 @@
++/* Copyright (C) 2012 Ã‰tienne Dupuis
++* 
++* Use, modification and distribution is subject to the 
++* Boost Software License, Version 1.0. (See accompanying
++* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
++*/
++
++// Test of bug #6701 (https://svn.boost.org/trac/boost/ticket/6701)
++
++#include <boost/pool/object_pool.hpp>
++#include <boost/limits.hpp>
++
++int main()
++{
++  boost::pool<> p(1024, std::numeric_limits<size_t>::max() / 768);
++
++  void *x = p.malloc();
++  BOOST_ASSERT(!x);
++  
++  BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_next_size());
++  BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_max_size());
++
++  void *y = p.ordered_malloc(std::numeric_limits<size_t>::max() / 768);
++  BOOST_ASSERT(!y);
++
++  return 0;
++}
diff --git a/dev-libs/boost/files/boost-1.76-boost-numpy.patch b/dev-libs/boost/files/boost-1.76-boost-numpy.patch
new file mode 100644 (file)
index 0000000..d9af132
--- /dev/null
@@ -0,0 +1,23 @@
+From 0796305c863804a2b31610507c531da5c0408422 Mon Sep 17 00:00:00 2001
+From: Peter Dimov <pdimov@gmail.com>
+Date: Mon, 24 May 2021 22:14:55 +0300
+Subject: [PATCH] Use the /python//numpy target instead of [ numpy.include ]
+ (fixes #361)
+
+---
+ libs/python/build/Jamfile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/python/build/Jamfile b/libs/python/build/Jamfile
+index dbc9fb203..03b69a25d 100644
+--- a/libs/python/build/Jamfile
++++ b/libs/python/build/Jamfile
+@@ -117,7 +117,7 @@ lib boost_numpy
+         <define>BOOST_NUMPY_SOURCE
+         [ cond [ python.numpy ] : <library>/python//python_for_extensions ]
+         [ unless [ python.numpy ] : <build>no ]
+-        <include>$(numpy-include)
++        <library>/python//numpy
+         <library>boost_python
+         <python-debugging>on:<define>BOOST_DEBUG_PYTHON
+         -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
diff --git a/dev-libs/boost/files/boost-1.76-sparc-define.patch b/dev-libs/boost/files/boost-1.76-sparc-define.patch
new file mode 100644 (file)
index 0000000..b3909ee
--- /dev/null
@@ -0,0 +1,21 @@
+https://github.com/boostorg/predef/commit/1be0e4a2d8db15a405f64a6f65507b87c1be7e1a.patch
+
+From 1be0e4a2d8db15a405f64a6f65507b87c1be7e1a Mon Sep 17 00:00:00 2001
+From: tkoecker <tkoecker@gmx.net>
+Date: Fri, 21 May 2021 16:31:11 +0200
+Subject: [PATCH] added missing brackets (#118)
+--- a/boost/predef/architecture/sparc.h
++++ b/boost/predef/architecture/sparc.h
+@@ -34,10 +34,10 @@ Distributed under the Boost Software License, Version 1.0.
+ #if defined(__sparc__) || defined(__sparc)
+ #   undef BOOST_ARCH_SPARC
+-#   if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv9) || defined(__sparc_v9__)
++#   if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv9) || defined(__sparc_v9__))
+ #       define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(9,0,0)
+ #   endif
+-#   if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv8) || defined(__sparc_v8__)
++#   if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv8) || defined(__sparc_v8__))
+ #       define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(8,0,0)
+ #   endif
+ #   if !defined(BOOST_ARCH_SPARC)
diff --git a/dev-libs/randomx/Manifest b/dev-libs/randomx/Manifest
new file mode 100644 (file)
index 0000000..f58119e
--- /dev/null
@@ -0,0 +1,2 @@
+DIST randomx-1.1.8.tar.gz 163477 BLAKE2B 482f38a7e9f7b03ec5bd40ff923a1a1e575ed0c30431dcbecfe1072cdb10ccc93b61cf9d2177f4549e284125e17386e0314cb39734b22dc150193bd5d28bb813 SHA512 f41f13ba7b979a969e9d60e6c44cf289802e7459d6d817a64377428c3e833ea2f71a8a1e6559682ecc0ec2a33f958bb5b727d7faa28cb6ff69a524d713969bce
+EBUILD randomx-1.1.8.ebuild 503 BLAKE2B 2d909d0463d33f657d25e1b1b13aa7d4a3c16319f10fd7526ae20134bc90df37bfd6a8718e3631034468ab1c0fd3a0a0980f0f64cf2af3567c7f8420455f20f2 SHA512 d299cdba9c28a3e09d58b17f57334ce13b310e4ef95719b36f49758c58f9fe14f14203456f5eccfee5e0fe7c6351b684e0dfbd53ad8104e0a20cc1b9bc32b4c6
diff --git a/dev-libs/randomx/randomx-1.1.8.ebuild b/dev-libs/randomx/randomx-1.1.8.ebuild
new file mode 100644 (file)
index 0000000..ed8925f
--- /dev/null
@@ -0,0 +1,21 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="Proof of work algorithm based on random code execution"
+HOMEPAGE="https://github.com/tevador/RandomX"
+SRC_URI="https://github.com/tevador/RandomX/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~x86"
+
+S="${WORKDIR}"/RandomX-${PV}
+
+src_configure() {
+       append-ldflags -Wl,-z,noexecstack
+       cmake_src_configure
+}
diff --git a/dev-libs/supercop/Manifest b/dev-libs/supercop/Manifest
new file mode 100644 (file)
index 0000000..e84e0ab
--- /dev/null
@@ -0,0 +1,2 @@
+DIST supercop-633500ad8c8759995049ccd022107d1fa8a1bbc9.tar.gz 346604 BLAKE2B 10e48076acb2e5de5acb2efee61b2fac40fdfec3bc4037a94199d56ee2446466126e1b9dade56ee69598f4bd3c64b45d86d0810f24f461f6e09fb84c87e1ef93 SHA512 06cca8d1def31aa11bf5aa42d861c4a027786f7cc494fa3ab53a2bc4bd9d1f55b2389020ba5fd1816ed277b6e4320ad8edbb3117dcf4981fc7fba655c4bbe648
+EBUILD supercop-0_p20200827.ebuild 620 BLAKE2B 216a660b2e79757f9745d5142c1043ca6423409931f9f21f909aab75ac7becf260c338a08dae5202645e649b902e5323d6d38d3459e8e89b0a497ddd14a07918 SHA512 4109eca90ca239f271357309a0fa0d16cfe3b77174f3a88b9ec4f4a6a963e93579eddb40265951cae212d288601dfb14d783fccc90b2f70efea9b96c30686e64
diff --git a/dev-libs/supercop/supercop-0_p20200827.ebuild b/dev-libs/supercop/supercop-0_p20200827.ebuild
new file mode 100644 (file)
index 0000000..297941f
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake flag-o-matic
+
+MY_REV="633500ad8c8759995049ccd022107d1fa8a1bbc9"
+
+DESCRIPTION="Fast cryyptographic operations for Monero wallets"
+HOMEPAGE="https://github.com/monero-project/supercop"
+SRC_URI="https://github.com/monero-project/supercop/archive/${MY_REV}.tar.gz -> ${PN}-${MY_REV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm64 ~x86"
+
+DEPEND="dev-lang/nasm"
+
+S="${WORKDIR}"/${PN}-${MY_REV}
+
+src_configure() {
+       append-flags -fPIC
+       append-ldflags -Wl,-z,noexecstack
+       cmake_src_configure
+}
diff --git a/dev-perl/Data-Entropy/Data-Entropy-0.007.0.ebuild b/dev-perl/Data-Entropy/Data-Entropy-0.007.0.ebuild
new file mode 100644 (file)
index 0000000..474267b
--- /dev/null
@@ -0,0 +1,27 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=ZEFRAM
+DIST_VERSION=0.007
+
+inherit perl-module
+
+DESCRIPTION="Data::Entropy - entropy (randomness) management"
+
+SLOT="0"
+KEYWORDS="amd64 ~hppa sparc x86"
+
+RDEPEND="
+       dev-perl/Crypt-Eksblowfish
+       dev-perl/Crypt-Rijndael
+       "
+BDEPEND="${RDEPEND}
+       virtual/perl-ExtUtils-MakeMaker
+       test? (
+               virtual/perl-File-Spec
+               >=virtual/perl-Test-Simple-1.302.15
+               dev-perl/Test2-Suite
+       )
+"
diff --git a/dev-perl/Data-Entropy/Manifest b/dev-perl/Data-Entropy/Manifest
new file mode 100644 (file)
index 0000000..3f7b7ed
--- /dev/null
@@ -0,0 +1,2 @@
+DIST Data-Entropy-0.007.tar.gz 43667 BLAKE2B 1ea01b75582b8191df4bc7d8e353cf2593a05f1ada14e58d07e57bd66c9e680c23b8b3e9fbb3f3206d79b2f52e483325d9b27c2f9820afcdfba94a68f95e1758 SHA512 f845fabcac67ab16d44f8bbefa0fc09df171efd6cd9ae2f2ee7e189cbb707cf074705763a022941cbfdda5ab4e03b85eacdb7942a504644a40970c42b5a7e0b9
+EBUILD Data-Entropy-0.007.0.ebuild 498 BLAKE2B e9259f74a462ce50b9f980b823073f1bce3d693a5d0fcbd031c7ad4bde1b10667266f73e2d9fab07bb825a0b3542a9a9be5876cbae18e525c3541e688aa9396e SHA512 31f1c2efb70156e78d95fb923dfee8a043147a96bdcc965ded49a645dfe486dece1651e190d96ac93b29fa79ce7501d8e7f7b21eb0e52e19022384f2b5204957
diff --git a/dev-python/networkx/Manifest b/dev-python/networkx/Manifest
new file mode 100644 (file)
index 0000000..21a9c7d
--- /dev/null
@@ -0,0 +1,4 @@
+DIST networkx-2.5.tar.gz 1542085 BLAKE2B a4d1d1f65a09f8e7cd830a9e670cf540c19b800dffb90aa1cc6ebda8b6116b6181969382f90339254746a3f277d786020506a3c8f10c90ff48999d3b2c3c433e SHA512 ab51198072d20bdba7c9ceb6856631a20a7e9527a7cadb41271a999f57bf60da5488269c6e4e1f3f4f33420ec6493af665386842c216ea1cfadd1792ccb6444e
+DIST networkx-2.6.2.tar.gz 1842077 BLAKE2B 8493e2d6a64d140b012ea443e9b1dc2409f8208dc1678c1d21cfd19bbdc07df6e9051aefe994d5fa6460db48320d563bb3051150782545ab5f671b7aafda4d0a SHA512 7006dcd209cce79f0f6cac4884797775422bd90fd3e8abb2eee70e6e00c9a25a785dd5856fc1657019a2b5c13a6fa5f705ea2e650c15a1f9d7d93580bc299219
+EBUILD networkx-2.5.ebuild 1330 BLAKE2B fdd9c830b9c946c415fb3054305d6e57f7901cb0792553592563f6324858c62383f85f210eb521062da27c76b2025ac8f399ce8609fb7275e0570abb9c52e715 SHA512 2c26a12b501d5a9cf2815f76b7769a45c60460095e85c4d5043f55b5663337374dfa4aef24bdde10034a46d684888f56b998e8a5534ee99909d70d4b81e148bf
+EBUILD networkx-2.6.2-r1.ebuild 1268 BLAKE2B 4091ec850f71f3a71357ba303d0b27454936be1351c656490525835ed7054e6e409035b5ab759c85e45b7c4c8c1bfbc0a6b59949e6ce582fb49de3e60d0601bc SHA512 24e11e0ed466d543c5f5acfd2c4654f58b721f54ef49fa93b9bab6ece5c1d2efcbba94085cd9eb2fb5886bd545eaf5767c67ab9a92335aae70e3b8186364d989
diff --git a/dev-python/networkx/networkx-2.5.ebuild b/dev-python/networkx/networkx-2.5.ebuild
new file mode 100644 (file)
index 0000000..4b84379
--- /dev/null
@@ -0,0 +1,50 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+inherit distutils-r1 virtualx
+
+DESCRIPTION="Python tools to manipulate graphs and complex networks"
+HOMEPAGE="https://networkx.github.io/ https://github.com/networkx/networkx"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="examples extras pandas scipy test xml yaml"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       >=dev-python/decorator-4.3.0[${PYTHON_USEDEP}]
+       >=dev-python/matplotlib-2.2.2[${PYTHON_USEDEP}]
+       extras? (
+               >=dev-python/pydot-1.2.4[${PYTHON_USEDEP}]
+               $(python_gen_cond_dep '
+                       >=dev-python/pygraphviz-1.5[${PYTHON_USEDEP}]
+                       >=sci-libs/gdal-1.10.0[python,${PYTHON_USEDEP}]
+               ' python3_{6,7,8})
+       )
+       pandas? (
+               >=dev-python/pandas-0.23.3[${PYTHON_USEDEP}]
+       )
+       scipy? ( >=dev-python/scipy-1.1.0[${PYTHON_USEDEP}] )
+       xml? ( >=dev-python/lxml-4.2.3[${PYTHON_USEDEP}] )
+       yaml? ( >=dev-python/pyyaml-3.13[${PYTHON_USEDEP}] )"
+BDEPEND="
+       test? (
+               >=dev-python/scipy-1.1.0[${PYTHON_USEDEP}]
+       )"
+
+distutils_enable_tests pytest
+
+src_test() {
+       virtx distutils-r1_src_test
+}
+
+python_install_all() {
+       use examples && dodoc -r examples
+
+       distutils-r1_python_install_all
+}
diff --git a/dev-python/networkx/networkx-2.6.2-r1.ebuild b/dev-python/networkx/networkx-2.6.2-r1.ebuild
new file mode 100644 (file)
index 0000000..8c98792
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+inherit distutils-r1 virtualx
+
+DESCRIPTION="Python tools to manipulate graphs and complex networks"
+HOMEPAGE="https://networkx.org/ https://github.com/networkx/networkx"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~riscv x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="examples extras pandas scipy xml yaml"
+
+RDEPEND="
+       >=dev-python/matplotlib-3.3[${PYTHON_USEDEP}]
+       >=dev-python/numpy-1.19[${PYTHON_USEDEP}]
+       extras? (
+               >=dev-python/pydot-1.4.1[${PYTHON_USEDEP}]
+               $(python_gen_cond_dep '
+                       >=dev-python/pygraphviz-1.7[${PYTHON_USEDEP}]
+                       >=sci-libs/gdal-1.10.0[python,${PYTHON_USEDEP}]
+               ' python3_{7..9})
+       )
+       xml? ( >=dev-python/lxml-4.5[${PYTHON_USEDEP}] )
+       yaml? ( >=dev-python/pyyaml-3.13[${PYTHON_USEDEP}] )
+    scipy? ( >=dev-python/scipy-1.6.2[${PYTHON_USEDEP}] )
+       pandas? ( >=dev-python/pandas-1.1[${PYTHON_USEDEP}] )"
+
+distutils_enable_tests pytest
+
+python_test() {
+       local deselect=()
+       virtx epytest -p no:django ${deselect[@]/#/--deselect }
+}
+
+python_install_all() {
+       use examples && dodoc -r examples
+
+       distutils-r1_python_install_all
+}
diff --git a/mail-filter/libmilter/Manifest b/mail-filter/libmilter/Manifest
new file mode 100644 (file)
index 0000000..19c58af
--- /dev/null
@@ -0,0 +1,2 @@
+DIST sendmail.8.16.1.tar.gz 2236402 BLAKE2B 80a9c2f1d04719099703e55f0a0c54fd638cf69b72839d358ae6863c95c9e0965d1b7fdd5b1807bec1ffdf87bca0c7c9ba91060962e6de5da5bf14422f6279ea SHA512 d7d4aac3c6d7505782abdb166204901b8b51cac000d610dfe40eda9eef7441a073af9e8e0b14c8719b07b445f55a1e2c28ac63d663d0daa7f1eafc5a101788b2
+EBUILD libmilter-1.0.2_p1-r1.ebuild 2138 BLAKE2B c229508fd86552f4824ab063826af45ad5cc282e9fef9ef7c498de531a54558f4c3312ae1ffebc8a7b96fa810acb7889e0dfedf1dcaeb078a13f71fac162c42c SHA512 e1cdc3be3fd6b85d1cb65eecf9a9d6e11da4416a3011a2fbae4d7fe0deb08250560699f6a2f92dd8452591a47c6f0754bb3a7d023647b0198fdb4efed81488f1
diff --git a/mail-filter/libmilter/libmilter-1.0.2_p1-r1.ebuild b/mail-filter/libmilter/libmilter-1.0.2_p1-r1.ebuild
new file mode 100644 (file)
index 0000000..4783e84
--- /dev/null
@@ -0,0 +1,75 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+# This library is part of sendmail, but it does not share the version number with it.
+# In order to find the right libmilter version number, check SMFI_VERSION definition
+# that can be found in ${S}/include/libmilter/mfapi.h (see also SM_LM_VRS_* defines).
+# For example, version 1.0.1 has a SMFI_VERSION of 0x01000001.
+SENDMAIL_VER=8.16.1
+
+DESCRIPTION="The Sendmail Filter API (Milter)"
+HOMEPAGE="http://www.sendmail.org/"
+SRC_URI="ftp://ftp.sendmail.org/pub/sendmail/sendmail.${SENDMAIL_VER}.tar.gz"
+S="${WORKDIR}/sendmail-${SENDMAIL_VER}"
+
+LICENSE="Sendmail"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="ipv6 poll"
+
+# build system patch copied from sendmail ebuild
+PATCHES=(
+       "${FILESDIR}/sendmail-8.16.1-build-system.patch"
+       "${FILESDIR}/${PN}-sharedlib.patch"
+)
+
+src_prepare() {
+       default
+
+       local CC="$(tc-getCC)"
+       local ENVDEF="-DNETUNIX -DNETINET -DHAS_GETHOSTBYNAME2=1"
+
+       use ipv6 && ENVDEF="${ENVDEF} -DNETINET6"
+       use poll && ENVDEF="${ENVDEF} -DSM_CONF_POLL=1"
+
+       if use elibc_musl; then
+               use ipv6 && ENVDEF="${ENVDEF} -DNEEDSGETIPNODE"
+
+               eapply "${FILESDIR}/${PN}-musl-stack-size.patch"
+               eapply "${FILESDIR}/${PN}-musl-disable-cdefs.patch"
+       fi
+
+       sed -e "s|@@CFLAGS@@|${CFLAGS}|" \
+               -e "s|@@LDFLAGS@@|${LDFLAGS}|" \
+               -e "s|@@CC@@|${CC}|" \
+               -e "s|@@ENVDEF@@|${ENVDEF}|" \
+               "${FILESDIR}/gentoo.config.m4" > "${S}/devtools/Site/site.config.m4" \
+               || die "failed to generate site.config.m4"
+}
+
+src_compile() {
+       pushd libmilter
+       emake -j1 MILTER_SOVER=${PV}
+       popd
+}
+
+src_install() {
+       local MY_LIBDIR=/usr/$(get_libdir)
+       dodir "${MY_LIBDIR}"
+       emake DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
+               SBINOWN=root SBINGRP=0 UBINOWN=root UBINGRP=0 \
+               LIBOWN=root LIBGRP=0 GBINOWN=root GBINGRP=0 \
+               MANOWN=root MANGRP=0 INCOWN=root INCGRP=0 \
+               MSPQOWN=root CFOWN=root CFGRP=0 \
+               MILTER_SOVER=${PV} \
+               install -C obj.*/libmilter
+
+       dodoc libmilter/README
+       dodoc libmilter/docs/*
+
+       find "${ED}" -name '*.a' -delete || die
+}
diff --git a/mail-mta/sendmail/Manifest b/mail-mta/sendmail/Manifest
new file mode 100644 (file)
index 0000000..5c76a60
--- /dev/null
@@ -0,0 +1,2 @@
+DIST sendmail.8.16.1.tar.gz 2236402 BLAKE2B 80a9c2f1d04719099703e55f0a0c54fd638cf69b72839d358ae6863c95c9e0965d1b7fdd5b1807bec1ffdf87bca0c7c9ba91060962e6de5da5bf14422f6279ea SHA512 d7d4aac3c6d7505782abdb166204901b8b51cac000d610dfe40eda9eef7441a073af9e8e0b14c8719b07b445f55a1e2c28ac63d663d0daa7f1eafc5a101788b2
+EBUILD sendmail-8.16.1.ebuild 6479 BLAKE2B 9879fdfb95aaaec13ab524c03e449435a71cd774758ec3cdc32592f4286b238b94689f110e1c524d7ca839f37f047554968dc0ab97a490c83536e556cb4cbec3 SHA512 2bb04dcd56571da76976b22a9c542d53664311ce7f5499620511d1c5d07a3c243a433b649594913628f001fecf96648e633aca5f1d4e82f889d8e473b97e9daa
diff --git a/mail-mta/sendmail/sendmail-8.16.1.ebuild b/mail-mta/sendmail/sendmail-8.16.1.ebuild
new file mode 100644 (file)
index 0000000..1501759
--- /dev/null
@@ -0,0 +1,209 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib systemd toolchain-funcs
+
+DESCRIPTION="Widely-used Mail Transport Agent (MTA)"
+HOMEPAGE="https://www.sendmail.org/"
+SRC_URI="ftp://ftp.sendmail.org/pub/${PN}/${PN}.${PV}.tar.gz"
+
+LICENSE="Sendmail GPL-2" # GPL-2 is here for initscript
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="ipv6 ldap mbox nis sasl sockets ssl tcpd"
+
+BDEPEND="sys-devel/m4"
+DEPEND="net-mail/mailbase
+       sasl? ( >=dev-libs/cyrus-sasl-2.1.10 )
+       tcpd? ( sys-apps/tcp-wrappers )
+       ssl? (
+               dev-libs/openssl:0=
+       )
+       ldap? ( net-nds/openldap )
+       >=sys-libs/db-3.2:=
+       !net-mail/vacation"
+RDEPEND="${DEPEND}
+       acct-group/smmsp
+       acct-user/smmsp
+       >=net-mail/mailbase-0.00
+       >=mail-filter/libmilter-1.0.2_p1-r1
+       !mail-mta/courier
+       !mail-mta/esmtp
+       !mail-mta/exim
+       !mail-mta/mini-qmail
+       !mail-mta/msmtp[mta]
+       !mail-mta/netqmail
+       !mail-mta/nullmailer
+       !mail-mta/postfix
+       !mail-mta/opensmtpd
+       !mail-mta/qmail-ldap
+       !>=mail-mta/ssmtp-2.64-r2[mta]"
+
+PDEPEND="!mbox? ( mail-filter/procmail )"
+
+src_prepare() {
+       eapply "${FILESDIR}"/"${PN}"-8.16.1-build-system.patch
+       eapply -p0 "${FILESDIR}"/sendmail-delivered_hdr.patch
+
+       local confCC="$(tc-getCC)"
+       local confCCOPTS="${CFLAGS}"
+       local confLDOPTS="${LDFLAGS}"
+       local confMAPDEF="-DMAP_REGEX"
+       local confENVDEF="-DMAXDAEMONS=64"
+       local conf_sendmail_LIBS=""
+
+       confENVDEF="${confLIBS} -DHAS_GETHOSTBYNAME2=1"
+
+       use sasl && confLIBS="${confLIBS} -lsasl2"  \
+               && confENVDEF="${confENVDEF} -DSASL=2" \
+               && confCCOPTS="${confCCOPTS} -I/usr/include/sasl" \
+               && conf_sendmail_LIBS="${conf_sendmail_LIBS} -lsasl2"
+
+       use tcpd && confENVDEF="${confENVDEF} -DTCPWRAPPERS" \
+               && confLIBS="${confLIBS} -lwrap"
+
+       # Bug #542370 - lets add support for modern crypto (PFS)
+       use ssl && confENVDEF="${confENVDEF} -DSTARTTLS -D_FFR_DEAL_WITH_ERROR_SSL" \
+               && confENVDEF="${confENVDEF} -D_FFR_TLS_1 -D_FFR_TLS_EC" \
+               && confLIBS="${confLIBS} -lssl -lcrypto" \
+               && conf_sendmail_LIBS="${conf_sendmail_LIBS} -lssl -lcrypto"
+
+       use ldap && confMAPDEF="${confMAPDEF} -DLDAPMAP" \
+               && confLIBS="${confLIBS} -lldap -llber"
+
+       use ipv6 && confENVDEF="${confENVDEF} -DNETINET6"
+
+       use nis && confENVDEF="${confENVDEF} -DNIS"
+
+       use sockets && confENVDEF="${confENVDEF} -DSOCKETMAP"
+
+       sed -e "s:@@confCCOPTS@@:${confCCOPTS}:" \
+               -e "s/@@confLDOPTS@@/${confLDOPTS}/" \
+               -e "s/@@confCC@@/${confCC}/" \
+               -e "s/@@confMAPDEF@@/${confMAPDEF}/" \
+               -e "s/@@confENVDEF@@/${confENVDEF}/" \
+               -e "s/@@confLIBS@@/${confLIBS}/" \
+               -e "s/@@conf_sendmail_LIBS@@/${conf_sendmail_LIBS}/" \
+               "${FILESDIR}"/site.config.m4 > devtools/Site/site.config.m4 || die "sed failed"
+
+       echo "APPENDDEF(\`confLIBDIRS', \`-L${EPREFIX}/usr/$(get_libdir)')" >> devtools/Site/site.config.m4 || die "echo failed"
+
+       eapply_user
+}
+
+src_compile() {
+       sh Build AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "compilation failed in main build script"
+}
+
+src_install() {
+       local MY_LIBDIR=/usr/$(get_libdir)
+       local MY_OBJDIR="obj.`uname -s`.`uname -r`.`uname -m`"
+
+       dodir /usr/bin ${MY_LIBDIR}
+       dodir /usr/share/man/man{1,5,8} /usr/sbin /usr/share/sendmail-cf
+       dodir /var/spool/{mqueue,clientmqueue} /etc/conf.d
+
+       keepdir /var/spool/{clientmqueue,mqueue}
+
+       for dir in libsmutil sendmail mailstats praliases smrsh makemap vacation editmap
+       do
+               make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
+                       SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
+                       MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
+                       LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
+                       MSPQOWN=root CFOWN=root CFGRP=root \
+                       install -C "${MY_OBJDIR}/${dir}" \
+                       || die "install 1 failed"
+       done
+
+       for dir in rmail mail.local
+       do
+               make DESTDIR="${D}" LIBDIR="${MY_LIBDIR}" MANROOT=/usr/share/man/man \
+                       SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
+                       MANOWN=root MANGRP=root INCOWN=root INCGRP=root \
+                       LIBOWN=root LIBGRP=root GBINOWN=root GBINGRP=root \
+                       MSPQOWN=root CFOWN=root CFGRP=root \
+                       force-install -C "${MY_OBJDIR}/${dir}" \
+                       || die "install 2 failed"
+       done
+
+       fowners root:smmsp /usr/sbin/sendmail
+       fperms 2555 /usr/sbin/sendmail
+       fowners smmsp:smmsp /var/spool/clientmqueue
+       fperms 770 /var/spool/clientmqueue
+       fperms 700 /var/spool/mqueue
+       dosym ../sbin/makemap /usr/bin/makemap
+       dodoc FAQ KNOWNBUGS README RELEASE_NOTES doc/op/op.ps
+
+       newdoc sendmail/README README.sendmail
+       newdoc sendmail/SECURITY SECURITY
+       newdoc sendmail/TUNING TUNING
+       newdoc smrsh/README README.smrsh
+
+       newdoc cf/README README.cf
+       newdoc cf/cf/README README.install-cf
+
+       cp -pPR cf/* "${ED}"/usr/share/sendmail-cf || die "copy failed"
+
+       docinto contrib
+       dodoc contrib/*
+
+       insinto /etc/mail
+
+       if use mbox; then
+               newins "${FILESDIR}"/sendmail.mc-r1 sendmail.mc
+       else
+               newins "${FILESDIR}"/sendmail-procmail.mc sendmail.mc
+       fi
+
+       # See discussion on bug #730890
+       m4 "${ED}"/usr/share/sendmail-cf/m4/cf.m4 \
+               <(grep -v "${EPREFIX}"/usr/share/sendmail-cf/m4/cf.m4 "${ED}"/etc/mail/sendmail.mc) \
+               > "${ED}"/etc/mail/sendmail.cf || die "cf.m4 failed"
+
+       echo "include(\`/usr/share/sendmail-cf/m4/cf.m4')dnl" \
+               > "${ED}"/etc/mail/submit.mc || die "echo failed"
+
+       cat "${ED}"/usr/share/sendmail-cf/cf/submit.mc >> "${ED}"/etc/mail/submit.mc || die "submit.mc cat failed"
+
+       echo "# local-host-names - include all aliases for your machine here" \
+               > "${D}"/etc/mail/local-host-names || die "local-host-names echo failed"
+
+       cat <<- EOF > "${ED}"/etc/mail/trusted-users
+               # trusted-users - users that can send mail as others without a warning
+               # apache, mailman, majordomo, uucp are good candidates
+       EOF
+
+       cat <<- EOF > "${ED}"/etc/mail/access
+               # Check the /usr/share/doc/sendmail/README.cf file for a description
+               # of the format of this file. (search for access_db in that file)
+               # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
+               # package.
+               #
+
+       EOF
+
+       cat <<- EOF > "${ED}"/etc/conf.d/sendmail
+               # Config file for /etc/init.d/sendmail
+               # add start-up options here
+               SENDMAIL_OPTS="-bd -q30m -L sm-mta" # default daemon mode
+               CLIENTMQUEUE_OPTS="-Ac -q30m -L sm-cm" # clientmqueue
+               KILL_OPTS="" # add -9/-15/your favorite evil SIG level here
+
+       EOF
+
+       if use sasl; then
+               dodir /etc/sasl2
+               cat <<- EOF > "${ED}"/etc/sasl2/Sendmail.conf
+               pwcheck_method: saslauthd
+               mech_list: PLAIN LOGIN
+
+               EOF
+       fi
+
+       doinitd "${FILESDIR}"/sendmail
+       systemd_dounit "${FILESDIR}"/sendmail.service
+       systemd_dounit "${FILESDIR}"/sm-client.service
+}
diff --git a/metadata/layout.conf b/metadata/layout.conf
new file mode 100644 (file)
index 0000000..d43e61c
--- /dev/null
@@ -0,0 +1 @@
+masters = gentoo
diff --git a/net-p2p/monero/Manifest b/net-p2p/monero/Manifest
new file mode 100644 (file)
index 0000000..bf19978
--- /dev/null
@@ -0,0 +1,16 @@
+AUX monero-0.17.1.7-linkjobs.patch 1541 BLAKE2B e8aff4f66664f47c03fee44fe3354828cadf48b70724b3a9c5a1b257dacb1f3a8f61de391074ec2251c926298e25949bd3022e38323aef5d1ee232c9c727ea69 SHA512 e2e1307510c63b9069c0c4b3770637346b909e4445dcdb8d2b2dc7a67758f1b9984cbbee3cab9feafc1df929a1d2cdddff34cf577cd45090114086fdbfdc7544
+AUX monero-0.17.1.7-unbundle-dependencies.patch 3705 BLAKE2B 115a7b27ac0ee32d57f8d4f77b6d5219edb7e7152f058c9cd7039176031883f5b12e19b65cbda0312a72248313ef4d44ac5069ae3357ac3af9aaf3f7b197cb26 SHA512 c3a36596edd70fabcb66e9503bb1d5f6481ad768466a1e9efa42c268e8a3b05b993a3310b209da91b87590a01ee344bd3835e60c339287771f330812d45a86b6
+AUX monero-0.17.2.0-boost-176.patch 778 BLAKE2B ba799a7a0d6c13765cf0825114a857095ef9390dea98069b0a26540680dc8bd54b3b9bbe3e5099e8260996e60960a97e4cc33ea32aaf611b80cf7c2ce22d98ad SHA512 c67ab4d4e7449d3690663647aa14411cce90ded9c9aa8bcd600ddbd3cd7633b3f5ec346c3c3c587951e9b1c380c99490764d70421ee0a9abb0fcc470e1f76c48
+AUX monero-0.17.3.0-unbundle-dependencies.patch 3809 BLAKE2B bc629c1061fad475ec26d040aef3615dab3a01bc4fc6c4f9e34834d61abce0e1cca4e61cd7a55884ced5c803c50035d7657d58a53803c0bd3bbd0ef0da10dd56 SHA512 cddd5e831ecea0ce1a0bb863431fa3853b8fd8235e1368c1b1db2751bf66d6850cdfd48f45a98d87a0b7192021297837f82c64386ef7a1393b711820c7de4714
+AUX monerod.conf 301 BLAKE2B 48e8545ac02afbb8edd32d1457afcd52c30380ba03e526c982eb91ce9fa0c5733fdbc9547fd7a01f525176122bc201f5e8f5bc88125bbaf6bf762c0f5df7a220 SHA512 ca7fa3003f8e87c66e3a1986555327e1ce767d694daa506a8889aea8fe8b646cfece54bee1a1d029c66e32aa7845501059c2810bb030c445f3dfa46c43704d41
+AUX monerod.confd 213 BLAKE2B 25a6f44d2d1bdbc21990e18e19239ce8b75a9d0228978c352e142e939b5db3f2c6ceed22f39ac7ad956e377fc9a062616d4d6677c7f0ba05d7683593867cb01b SHA512 68eb1575297a992023a14db60239ac0b031b2a10cfd207252aba16d709d721fd89451aba05635c3f5a5351109317f32ca3acc66c1203098a1f13e91007b33073
+AUX monerod.initd 527 BLAKE2B 7af13d433bb025b86c52fbabdcd24d8940baf889ae931b7492f5766357f861d92cc53e6bcbf276f0bcd46827ca48fa188dea2052bc0d1727ad5ab02259701167 SHA512 796c99f4ec060e289433d9ac6df6550aea75f37ab06eca7470014ff576e4686559c123f749be452af4c4ebd84236238cbba33259fba2d3a05d8f25517bde4e5a
+AUX monerod.service 329 BLAKE2B e4390612e1e37cb47164967cc086eb32b1dac61ceba621d376ae87220245284d83dd0895e786daf1652ff40c0161f713cd4f124ae7b2d57306208d5886c8aeb3 SHA512 38eb172bcd46c98a5aaa8f7c0d8bf011c183fd4d09f9d38c14679a4a0ee628d58c6dde6cce181745b053576e3b8907038d75ec3bcb3b0bb03e62c606573038b3
+DIST monero-0.17.2.0.tar.gz 10622184 BLAKE2B c439e447f524a08a7ee79420873b7cf393f5cd3269460944aac30a315ac7c273c12fd809d86d41445bfc7e8c2feb0538d4e9fc1dadeb55f7e09f2920778f07a7 SHA512 85b764f1fc25127e7ca4ada67b1d832a9604c4cf65b160d689650e7ca7bbc36b73d8b26c5409fabdaad7369684997447cd812d1c521fad19d24f5b35f4789a1e
+DIST monero-0.17.2.3.tar.gz 10640501 BLAKE2B 15c7b92e7d00788214953c09af96d578e79c65ba9263d2a9ea19cfb9cc65e77d15770b873a10b77aae9e908dce74162d3577ed241600ebd57098b860bfd8f114 SHA512 7f3363c2cb66fa90a47a4cbb03b367182afa63af21d40bf07ea57cd91e4805684ec4795c0390bc966626a3b7b3c0a47167036873f5d1ea4b487a3d02bf01aaa4
+DIST monero-0.17.3.0.tar.gz 10659302 BLAKE2B fe73172e490f119a3d3730e3c11afd386e54fa22e12ac69d6f5e420d5409ba8201289feb01041520b374768325ea82132108972f68ef59114f414451232daea6 SHA512 97a40f594aaa6f588a3ad982142a0ea4f4410d208dd5ff43b09c70baadd32f87e92eac97abd800f25298e8d0613ae85f68605f586ceccf9dc078fcb189d7511a
+EBUILD monero-0.17.2.0.ebuild 2957 BLAKE2B 3fa353b8dfc213ff02a5f124506b5a77cce6377699f6300b688b4beb05d510c4cedbfc62bb849066b1ad6187012c05d19afdf17f22b1049ac671cea6d7c397ba SHA512 fef4ea14e996f9014271adbd896e8eeaffb3824d24682a9cc7309f855d0cbb58b73234887e6169b4a96a6fea01ec7cdf5881c93fd9c72104e5ce508081324a1a
+EBUILD monero-0.17.2.3.ebuild 2957 BLAKE2B 3fa353b8dfc213ff02a5f124506b5a77cce6377699f6300b688b4beb05d510c4cedbfc62bb849066b1ad6187012c05d19afdf17f22b1049ac671cea6d7c397ba SHA512 fef4ea14e996f9014271adbd896e8eeaffb3824d24682a9cc7309f855d0cbb58b73234887e6169b4a96a6fea01ec7cdf5881c93fd9c72104e5ce508081324a1a
+EBUILD monero-0.17.3.0.ebuild 2879 BLAKE2B 553f1ff48b03bfbda99fe0d165b954e7dd1a028347eb4081499f42c5d0be8f9d46397040d6ed63b2c2d6c5346a69219499b91a8bf86727096cf7501b140fc958 SHA512 56a1ff0dfa45d617b47d160359701698f2bb0edc924dcc5e516631cb579e2482263dad4c2347551af6cca39271beacabf3cfb513674f0dadcf036251d201f1eb
+EBUILD monero-9999.ebuild 2910 BLAKE2B 5d5bf8340279b2be61eccc0ccd925c2b9563d9fa33e1dafa29711621c88e0020af26afa035817e01af0f1af4d247da345e7cb227ea37fdccaf8789d868235675 SHA512 aa0ec0f1be6a3337428da58bea5a475fbc9ba14fed27339e00ef2eeec2c2aacd25a6b51d054016e5a338cbc25449fef73350dbdd0e9fc4d908fd21cb564532d6
+MISC metadata.xml 1131 BLAKE2B ce2528cd7a73dd991d234aa4d58b5e4aab039cb51746c04af63f243c7d00c701b7cc5236df48c42f5d58c309624c36d11c532095ea6719f14dceb6542e4e7630 SHA512 a05eb919706ddae56a82a5ac71c6484e2bfd8d14f9d736e83b7099e4a7d1bf92b22ed96e9e4929ce67349971c60521ae3b5bcd1139725fbd5323d65e33283736
diff --git a/net-p2p/monero/files/monero-0.17.1.7-linkjobs.patch b/net-p2p/monero/files/monero-0.17.1.7-linkjobs.patch
new file mode 100644 (file)
index 0000000..d0f59a6
--- /dev/null
@@ -0,0 +1,44 @@
+From 12a78e5e745556c29e45b7716a8b038ecfbff800 Mon Sep 17 00:00:00 2001
+From: Matt Smith <matt@offtopica.uk>
+Date: Wed, 5 Aug 2020 18:39:44 +0100
+Subject: [PATCH] cmake: Use job pool feature to limit concurrent jobs
+
+Add two new options, MONERO_PARALLEL_COMPILE_JOBS and
+MONERO_PARALLEL_LINK_JOBS to try and prevent running out of memory when
+building everything.
+
+Requires >= cmake 3.0.0, and the use of the Ninja generator.
+
+Useful links:
+
+* https://cmake.org/cmake/help/latest/prop_gbl/JOB_POOLS.html
+* https://reviews.llvm.org/D6304
+---
+ CMakeLists.txt | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f63c07a35d..3729a6b659 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -55,6 +55,20 @@ else()
+       message(STATUS "ccache deselected")
+ endif()
++if (${CMAKE_VERSION} VERSION_GREATER "3.0.0" AND CMAKE_MAKE_PROGRAM MATCHES "ninja")
++  set(MONERO_PARALLEL_COMPILE_JOBS "" CACHE STRING "The maximum number of concurrent compilation jobs.")
++  if (MONERO_PARALLEL_COMPILE_JOBS)
++    set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${MONERO_PARALLEL_COMPILE_JOBS})
++    set(CMAKE_JOB_POOL_COMPILE compile_job_pool)
++  endif ()
++
++  set(MONERO_PARALLEL_LINK_JOBS "" CACHE STRING "The maximum number of concurrent link jobs.")
++  if (MONERO_PARALLEL_LINK_JOBS)
++    set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${MONERO_PARALLEL_LINK_JOBS})
++    set(CMAKE_JOB_POOL_LINK link_job_pool)
++  endif ()
++endif()
++
+ enable_language(C ASM)
+ function (die msg)
diff --git a/net-p2p/monero/files/monero-0.17.1.7-unbundle-dependencies.patch b/net-p2p/monero/files/monero-0.17.1.7-unbundle-dependencies.patch
new file mode 100644 (file)
index 0000000..ea7f804
--- /dev/null
@@ -0,0 +1,112 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 41f82e26c..3eb2b2e78 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -312,7 +312,7 @@ endif()
+ # elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
+ #   set(BSDI TRUE)
+-include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include)
++include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external )
+ if(APPLE)
+   include_directories(SYSTEM /usr/include/malloc)
+@@ -995,7 +995,6 @@ if(SODIUM_LIBRARY)
+   set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
+ endif()
+-include(external/supercop/functions.cmake) # place after setting flags and before src directory inclusion
+ add_subdirectory(contrib)
+ add_subdirectory(src)
+diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
+index a8916a7d0..05ab35c82 100644
+--- a/external/CMakeLists.txt
++++ b/external/CMakeLists.txt
+@@ -37,19 +37,7 @@
+ find_package(Miniupnpc REQUIRED)
+-message(STATUS "Using in-tree miniupnpc")
+-add_subdirectory(miniupnp/miniupnpc)
+-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
+-if(MSVC)
+-  set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
+-elseif(NOT MSVC)
+-  set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
+-endif()
+-if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+-      set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
+-endif()
+-
+-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
++set(UPNP_LIBRARIES "miniupnpc" PARENT_SCOPE)
+ find_package(Unbound)
+@@ -81,4 +69,3 @@ endif()
+ add_subdirectory(db_drivers)
+ add_subdirectory(easylogging++)
+ add_subdirectory(qrcodegen)
+-add_subdirectory(randomx EXCLUDE_FROM_ALL)
+diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt
+index 3b33fe90a..ba354a0e8 100644
+--- a/src/crypto/CMakeLists.txt
++++ b/src/crypto/CMakeLists.txt
+@@ -55,6 +55,7 @@ list(APPEND crypto_sources CryptonightR_template.S)
+ endif()
+ include_directories(${RANDOMX_INCLUDE})
++include_directories(SYSTEM /usr/include/monero)
+ set(crypto_headers)
+@@ -116,6 +117,3 @@ endif()
+ # cheat because cmake and ccache hate each other
+ set_property(SOURCE CryptonightR_template.S PROPERTY LANGUAGE C)
+-
+-# Must be done last, because it references libraries in this directory
+-add_subdirectory(wallet)
+diff --git a/src/crypto/wallet/crypto.h b/src/crypto/wallet/crypto.h
+index a4c5d5a07..5c6b96cd8 100644
+--- a/src/crypto/wallet/crypto.h
++++ b/src/crypto/wallet/crypto.h
+@@ -29,7 +29,6 @@
+ #pragma once
+ #include <cstddef>
+-#include "crypto/wallet/ops.h"
+ namespace crypto {
+   namespace wallet {
+diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt
+index ff2afba4b..26b0f4523 100644
+--- a/src/device/CMakeLists.txt
++++ b/src/device/CMakeLists.txt
+@@ -72,7 +72,7 @@ target_link_libraries(device
+     ${HIDAPI_LIBRARIES}
+     cncrypto
+     ringct_basic
+-    wallet-crypto
++    monero-crypto
+     ${OPENSSL_CRYPTO_LIBRARIES}
+     ${Boost_SERIALIZATION_LIBRARY}
+   PRIVATE
+diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
+index 65db2615c..3ace310f6 100644
+--- a/src/p2p/net_node.inl
++++ b/src/p2p/net_node.inl
+@@ -60,9 +60,9 @@
+ #include "cryptonote_core/cryptonote_core.h"
+ #include "net/parse.h"
+-#include <miniupnp/miniupnpc/miniupnpc.h>
+-#include <miniupnp/miniupnpc/upnpcommands.h>
+-#include <miniupnp/miniupnpc/upnperrors.h>
++#include <miniupnpc/miniupnpc.h>
++#include <miniupnpc/upnpcommands.h>
++#include <miniupnpc/upnperrors.h>
+ #undef MONERO_DEFAULT_LOG_CATEGORY
+ #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
diff --git a/net-p2p/monero/files/monero-0.17.2.0-boost-176.patch b/net-p2p/monero/files/monero-0.17.2.0-boost-176.patch
new file mode 100644 (file)
index 0000000..07a584a
--- /dev/null
@@ -0,0 +1,24 @@
+From c28d2f7c110c0a2161fa02d6c20df94a60a41965 Mon Sep 17 00:00:00 2001
+From: loqs <loqs@users.noreply.github.com>
+Date: Sun, 23 May 2021 20:29:17 +0100
+Subject: [PATCH] Fix boost 1.76.0 compatibility
+
+Add missing header boost/mpl/contains.hpp
+monero-project/monero/issues/7728
+---
+ contrib/epee/include/storages/portable_storage.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/contrib/epee/include/storages/portable_storage.h b/contrib/epee/include/storages/portable_storage.h
+index 1e68605abf5..801bb2c3465 100644
+--- a/contrib/epee/include/storages/portable_storage.h
++++ b/contrib/epee/include/storages/portable_storage.h
+@@ -40,6 +40,8 @@
+ #include "span.h"
+ #include "int-util.h"
++#include <boost/mpl/contains.hpp>
++
+ namespace epee
+ {
+   namespace serialization
diff --git a/net-p2p/monero/files/monero-0.17.3.0-unbundle-dependencies.patch b/net-p2p/monero/files/monero-0.17.3.0-unbundle-dependencies.patch
new file mode 100644 (file)
index 0000000..ec03bf5
--- /dev/null
@@ -0,0 +1,114 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 41f82e26c..3eb2b2e78 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -382,7 +382,7 @@
+ # elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
+ #   set(BSDI TRUE)
+-include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include)
++include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external )
+ if(APPLE)
+   include_directories(SYSTEM /usr/include/malloc)
+@@ -1082,7 +1082,6 @@
+   set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
+ endif()
+-include(external/supercop/functions.cmake) # place after setting flags and before src directory inclusion
+ add_subdirectory(contrib)
+ add_subdirectory(src)
+
+diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
+index a8916a7d0..05ab35c82 100644
+--- a/external/CMakeLists.txt
++++ b/external/CMakeLists.txt
+@@ -37,21 +37,7 @@
+ find_package(Miniupnpc REQUIRED)
+-message(STATUS "Using in-tree miniupnpc")
+-set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
+-add_subdirectory(miniupnp/miniupnpc)
+-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
+-set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON)
+-if(MSVC)
+-  set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
+-elseif(NOT MSVC)
+-  set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
+-endif()
+-if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+-      set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
+-endif()
+-
+-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
++set(UPNP_LIBRARIES "miniupnpc" PARENT_SCOPE)
+ find_package(Unbound)
+@@ -83,4 +69,3 @@
+ add_subdirectory(db_drivers)
+ add_subdirectory(easylogging++)
+ add_subdirectory(qrcodegen)
+-add_subdirectory(randomx EXCLUDE_FROM_ALL)
+diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt
+index 3b33fe90a..ba354a0e8 100644
+--- a/src/crypto/CMakeLists.txt
++++ b/src/crypto/CMakeLists.txt
+@@ -55,6 +55,7 @@ list(APPEND crypto_sources CryptonightR_template.S)
+ endif()
+ include_directories(${RANDOMX_INCLUDE})
++include_directories(SYSTEM /usr/include/monero)
+ set(crypto_headers)
+@@ -116,6 +117,3 @@ endif()
+ # cheat because cmake and ccache hate each other
+ set_property(SOURCE CryptonightR_template.S PROPERTY LANGUAGE C)
+-
+-# Must be done last, because it references libraries in this directory
+-add_subdirectory(wallet)
+diff --git a/src/crypto/wallet/crypto.h b/src/crypto/wallet/crypto.h
+index a4c5d5a07..5c6b96cd8 100644
+--- a/src/crypto/wallet/crypto.h
++++ b/src/crypto/wallet/crypto.h
+@@ -29,7 +29,6 @@
+ #pragma once
+ #include <cstddef>
+-#include "crypto/wallet/ops.h"
+ namespace crypto {
+   namespace wallet {
+diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt
+index ff2afba4b..26b0f4523 100644
+--- a/src/device/CMakeLists.txt
++++ b/src/device/CMakeLists.txt
+@@ -73,7 +73,7 @@
+     cncrypto
+     cryptonote_format_utils_basic
+     ringct_basic
+-    wallet-crypto
++    monero-crypto
+     ${OPENSSL_CRYPTO_LIBRARIES}
+     ${Boost_SERIALIZATION_LIBRARY}
+   PRIVATE
+diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
+index 65db2615c..3ace310f6 100644
+--- a/src/p2p/net_node.inl
++++ b/src/p2p/net_node.inl
+@@ -61,9 +61,9 @@
+ #include "cryptonote_core/cryptonote_core.h"
+ #include "net/parse.h"
+-#include <miniupnp/miniupnpc/miniupnpc.h>
+-#include <miniupnp/miniupnpc/upnpcommands.h>
+-#include <miniupnp/miniupnpc/upnperrors.h>
++#include <miniupnpc/miniupnpc.h>
++#include <miniupnpc/upnpcommands.h>
++#include <miniupnpc/upnperrors.h>
+ #undef MONERO_DEFAULT_LOG_CATEGORY
+ #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
diff --git a/net-p2p/monero/files/monerod.conf b/net-p2p/monero/files/monerod.conf
new file mode 100644 (file)
index 0000000..d019576
--- /dev/null
@@ -0,0 +1,8 @@
+# Configuration for monerod
+# Syntax: any command line option may be specified as 'clioptionname=value'.
+#         Boolean options such as 'no-igd' are specified as 'no-igd=1'.
+# See 'monerod --help' for all available options.
+
+data-dir=/var/lib/monero
+log-file=/var/log/monero/monero.log
+log-level=0
diff --git a/net-p2p/monero/files/monerod.confd b/net-p2p/monero/files/monerod.confd
new file mode 100644 (file)
index 0000000..94515dc
--- /dev/null
@@ -0,0 +1,6 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+monerod_args="--config-file /etc/monero/monerod.conf --non-interactive"
+monerod_user=monero
+monerod_group=monero
diff --git a/net-p2p/monero/files/monerod.initd b/net-p2p/monero/files/monerod.initd
new file mode 100644 (file)
index 0000000..c94e6ff
--- /dev/null
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile=/var/run/monerod.pid
+command=/usr/bin/monerod
+command_args="${monerod_args}"
+start_stop_daemon_args="-u ${monerod_user} -b -m -p ${pidfile}"
+
+name="Monero P2P Daemon"
+description="Connects to the Monero P2P network"
+
+depend() {
+    need localmount
+    need net
+}
+
+start_pre() {
+    checkpath --directory --owner ${monerod_user}:${monerod_group} --mode 0755 \
+             /var/lib/monero /var/log/monero
+}
diff --git a/net-p2p/monero/files/monerod.service b/net-p2p/monero/files/monerod.service
new file mode 100644 (file)
index 0000000..3275604
--- /dev/null
@@ -0,0 +1,17 @@
+[Unit]
+Description=Monero P2P Daemon
+After=network.target
+
+[Service]
+User=monero
+Group=monero
+StateDirectory=monero
+LogsDirectory=monero
+Type=simple
+ExecStart=/usr/bin/monerod --config-file /etc/monero/monerod.conf --non-interactive
+Restart=on-failure
+StandardOutput=null
+StandardError=null
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/monero/metadata.xml b/net-p2p/monero/metadata.xml
new file mode 100644 (file)
index 0000000..45b9047
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>telans@posteo.de</email>
+    <name>James Beddek</name>
+  </maintainer>
+  <maintainer type="person">
+    <email>cantcuckthis@danwin1210.de</email>
+    <name>Dex Conner</name>
+  </maintainer>
+  <longdescription lang="en">
+    Monero is a private, secure, untraceable, decentralised digital
+    currency. You are your bank, you control your funds, and nobody
+    can trace your transfers unless you allow them to do so.
+  </longdescription>
+  <use>
+    <flag name="daemon">
+      Build the Monero daemon used to connect to the P2P network.
+    </flag>
+    <flag name="tools">
+      Build tools used to manipulate the blockchain as it is stored on
+      disk.
+    </flag>
+    <flag name="wallet-cli">
+      Build the command line wallet, monero-wallet-cli.
+    </flag>
+    <flag name="wallet-rpc">
+      Build the RPC wallet, monero-wallet-rpc.
+    </flag>
+  </use>
+  <upstream>
+    <remote-id type="github">monero-project/monero</remote-id>
+  </upstream>
+</pkgmetadata>
diff --git a/net-p2p/monero/monero-0.17.2.0.ebuild b/net-p2p/monero/monero-0.17.2.0.ebuild
new file mode 100644 (file)
index 0000000..2dc4118
--- /dev/null
@@ -0,0 +1,117 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake systemd
+
+DESCRIPTION="The secure, private, untraceable cryptocurrency"
+HOMEPAGE="https://github.com/monero-project/monero"
+
+if [[ ${PV} == 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/monero-project/monero.git"
+       EGIT_SUBMODULES=()
+else
+       SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+LICENSE="BSD MIT"
+SLOT="0"
+IUSE="+daemon readline +tools +wallet-cli +wallet-rpc"
+REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )"
+RESTRICT="test"
+
+DEPEND="
+       acct-group/monero
+       acct-user/monero
+       dev-libs/boost:=[nls]
+       dev-libs/libsodium:=
+       dev-libs/openssl:=
+       dev-libs/randomx
+       dev-libs/rapidjson
+       dev-libs/supercop
+       net-dns/unbound:=[threads]
+       net-libs/czmq:=
+       net-libs/miniupnpc
+       readline? ( sys-libs/readline:0= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.17.1.7-unbundle-dependencies.patch"
+       "${FILESDIR}/${PN}-0.17.2.0-boost-176.patch"
+)
+
+src_configure() {
+       local mycmakeargs=(
+               # TODO: Update CMake to install built libraries (help wanted)
+               -DBUILD_SHARED_LIBS=OFF
+               -DMANUAL_SUBMODULES=ON
+               -DMONERO_PARALLEL_LINK_JOBS=1
+               -DUSE_DEVICE_TREZOR=OFF
+       )
+
+       cmake_src_configure
+}
+
+src_compile() {
+       local targets=()
+       use daemon && targets+=(daemon)
+       use tools && targets+=(blockchain_{ancestry,blackball,db,depth,export,import,prune,prune_known_spent_data,stats,usage})
+       use wallet-cli && targets+=(simplewallet)
+       use wallet-rpc && targets+=(wallet_rpc_server)
+       cmake_build ${targets[@]}
+}
+
+src_install() {
+       einstalldocs
+
+       # Install all binaries.
+       find "${BUILD_DIR}/bin/" -type f -executable -print0 |
+               while IFS= read -r -d '' line; do
+                       dobin "$line"
+               done
+
+       if use daemon; then
+               dodoc utils/conf/monerod.conf
+
+               # data-dir
+               keepdir /var/lib/monero
+               fowners monero:monero /var/lib/monero
+               fperms 0755 /var/lib/monero
+
+               # log-file dir
+               keepdir /var/log/monero
+               fowners monero:monero /var/log/monero
+               fperms 0755 /var/log/monero
+
+               # /etc/monero/monerod.conf
+               insinto /etc/monero
+               doins "${FILESDIR}/monerod.conf"
+
+               # OpenRC
+               newconfd "${FILESDIR}/monerod.confd" monerod
+               newinitd "${FILESDIR}/monerod.initd" monerod
+
+               # systemd
+               systemd_dounit "${FILESDIR}/monerod.service"
+       fi
+}
+
+pkg_postinst() {
+       if use daemon; then
+               elog "Start the Monero P2P daemon as a system service with"
+               elog "'rc-service monerod start'. Enable it at startup with"
+               elog "'rc-update add monerod default'."
+               elog
+               elog "Run monerod status as any user to get sync status and other stats."
+               elog
+               elog "The Monero blockchain can take up a lot of space (80 GiB) and is stored"
+               elog "in /var/lib/monero by default. You may want to enable pruning by adding"
+               elog "'prune-blockchain=1' to /etc/monero/monerod.conf to prune the blockchain"
+               elog "or move the data directory to another disk."
+       fi
+}
diff --git a/net-p2p/monero/monero-0.17.2.3.ebuild b/net-p2p/monero/monero-0.17.2.3.ebuild
new file mode 100644 (file)
index 0000000..2dc4118
--- /dev/null
@@ -0,0 +1,117 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake systemd
+
+DESCRIPTION="The secure, private, untraceable cryptocurrency"
+HOMEPAGE="https://github.com/monero-project/monero"
+
+if [[ ${PV} == 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/monero-project/monero.git"
+       EGIT_SUBMODULES=()
+else
+       SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+LICENSE="BSD MIT"
+SLOT="0"
+IUSE="+daemon readline +tools +wallet-cli +wallet-rpc"
+REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )"
+RESTRICT="test"
+
+DEPEND="
+       acct-group/monero
+       acct-user/monero
+       dev-libs/boost:=[nls]
+       dev-libs/libsodium:=
+       dev-libs/openssl:=
+       dev-libs/randomx
+       dev-libs/rapidjson
+       dev-libs/supercop
+       net-dns/unbound:=[threads]
+       net-libs/czmq:=
+       net-libs/miniupnpc
+       readline? ( sys-libs/readline:0= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.17.1.7-unbundle-dependencies.patch"
+       "${FILESDIR}/${PN}-0.17.2.0-boost-176.patch"
+)
+
+src_configure() {
+       local mycmakeargs=(
+               # TODO: Update CMake to install built libraries (help wanted)
+               -DBUILD_SHARED_LIBS=OFF
+               -DMANUAL_SUBMODULES=ON
+               -DMONERO_PARALLEL_LINK_JOBS=1
+               -DUSE_DEVICE_TREZOR=OFF
+       )
+
+       cmake_src_configure
+}
+
+src_compile() {
+       local targets=()
+       use daemon && targets+=(daemon)
+       use tools && targets+=(blockchain_{ancestry,blackball,db,depth,export,import,prune,prune_known_spent_data,stats,usage})
+       use wallet-cli && targets+=(simplewallet)
+       use wallet-rpc && targets+=(wallet_rpc_server)
+       cmake_build ${targets[@]}
+}
+
+src_install() {
+       einstalldocs
+
+       # Install all binaries.
+       find "${BUILD_DIR}/bin/" -type f -executable -print0 |
+               while IFS= read -r -d '' line; do
+                       dobin "$line"
+               done
+
+       if use daemon; then
+               dodoc utils/conf/monerod.conf
+
+               # data-dir
+               keepdir /var/lib/monero
+               fowners monero:monero /var/lib/monero
+               fperms 0755 /var/lib/monero
+
+               # log-file dir
+               keepdir /var/log/monero
+               fowners monero:monero /var/log/monero
+               fperms 0755 /var/log/monero
+
+               # /etc/monero/monerod.conf
+               insinto /etc/monero
+               doins "${FILESDIR}/monerod.conf"
+
+               # OpenRC
+               newconfd "${FILESDIR}/monerod.confd" monerod
+               newinitd "${FILESDIR}/monerod.initd" monerod
+
+               # systemd
+               systemd_dounit "${FILESDIR}/monerod.service"
+       fi
+}
+
+pkg_postinst() {
+       if use daemon; then
+               elog "Start the Monero P2P daemon as a system service with"
+               elog "'rc-service monerod start'. Enable it at startup with"
+               elog "'rc-update add monerod default'."
+               elog
+               elog "Run monerod status as any user to get sync status and other stats."
+               elog
+               elog "The Monero blockchain can take up a lot of space (80 GiB) and is stored"
+               elog "in /var/lib/monero by default. You may want to enable pruning by adding"
+               elog "'prune-blockchain=1' to /etc/monero/monerod.conf to prune the blockchain"
+               elog "or move the data directory to another disk."
+       fi
+}
diff --git a/net-p2p/monero/monero-0.17.3.0.ebuild b/net-p2p/monero/monero-0.17.3.0.ebuild
new file mode 100644 (file)
index 0000000..656c93e
--- /dev/null
@@ -0,0 +1,115 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake systemd
+
+DESCRIPTION="The secure, private, untraceable cryptocurrency"
+HOMEPAGE="https://github.com/monero-project/monero"
+
+if [[ ${PV} == 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/monero-project/monero.git"
+       EGIT_SUBMODULES=()
+else
+       SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+LICENSE="BSD MIT"
+SLOT="0"
+IUSE="+daemon readline +tools +wallet-cli +wallet-rpc"
+REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )"
+RESTRICT="test"
+
+DEPEND="
+       acct-group/monero
+       acct-user/monero
+       dev-libs/boost:=[nls]
+       dev-libs/libsodium:=
+       dev-libs/openssl:=
+       dev-libs/randomx
+       dev-libs/rapidjson
+       dev-libs/supercop
+       net-dns/unbound:=[threads]
+       net-libs/czmq:=
+       net-libs/miniupnpc
+       readline? ( sys-libs/readline:0= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.17.3.0-unbundle-dependencies.patch"
+)
+
+src_configure() {
+       local mycmakeargs=(
+               # TODO: Update CMake to install built libraries (help wanted)
+               -DBUILD_SHARED_LIBS=OFF
+               -DMANUAL_SUBMODULES=ON
+               -DUSE_DEVICE_TREZOR=OFF
+       )
+
+       cmake_src_configure
+}
+
+src_compile() {
+       local targets=()
+       use daemon && targets+=(daemon)
+       use tools && targets+=(blockchain_{ancestry,blackball,db,depth,export,import,prune,prune_known_spent_data,stats,usage})
+       use wallet-cli && targets+=(simplewallet)
+       use wallet-rpc && targets+=(wallet_rpc_server)
+       cmake_build ${targets[@]}
+}
+
+src_install() {
+       einstalldocs
+
+       # Install all binaries.
+       find "${BUILD_DIR}/bin/" -type f -executable -print0 |
+               while IFS= read -r -d '' line; do
+                       dobin "$line"
+               done
+
+       if use daemon; then
+               dodoc utils/conf/monerod.conf
+
+               # data-dir
+               keepdir /var/lib/monero
+               fowners monero:monero /var/lib/monero
+               fperms 0755 /var/lib/monero
+
+               # log-file dir
+               keepdir /var/log/monero
+               fowners monero:monero /var/log/monero
+               fperms 0755 /var/log/monero
+
+               # /etc/monero/monerod.conf
+               insinto /etc/monero
+               doins "${FILESDIR}/monerod.conf"
+
+               # OpenRC
+               newconfd "${FILESDIR}/monerod.confd" monerod
+               newinitd "${FILESDIR}/monerod.initd" monerod
+
+               # systemd
+               systemd_dounit "${FILESDIR}/monerod.service"
+       fi
+}
+
+pkg_postinst() {
+       if use daemon; then
+               elog "Start the Monero P2P daemon as a system service with"
+               elog "'rc-service monerod start'. Enable it at startup with"
+               elog "'rc-update add monerod default'."
+               elog
+               elog "Run monerod status as any user to get sync status and other stats."
+               elog
+               elog "The Monero blockchain can take up a lot of space (80 GiB) and is stored"
+               elog "in /var/lib/monero by default. You may want to enable pruning by adding"
+               elog "'prune-blockchain=1' to /etc/monero/monerod.conf to prune the blockchain"
+               elog "or move the data directory to another disk."
+       fi
+}
diff --git a/net-p2p/monero/monero-9999.ebuild b/net-p2p/monero/monero-9999.ebuild
new file mode 100644 (file)
index 0000000..b178a49
--- /dev/null
@@ -0,0 +1,114 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake systemd
+
+DESCRIPTION="The secure, private, untraceable cryptocurrency"
+HOMEPAGE="https://github.com/monero-project/monero"
+
+if [[ ${PV} == 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/monero-project/monero.git"
+       EGIT_SUBMODULES=()
+else
+       SRC_URI="https://github.com/monero-project/monero/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+LICENSE="BSD MIT"
+SLOT="0"
+IUSE="+daemon readline +tools +wallet-cli +wallet-rpc"
+REQUIRED_USE="|| ( daemon tools wallet-cli wallet-rpc )"
+RESTRICT="test"
+
+DEPEND="
+       acct-group/monero
+       acct-user/monero
+       dev-libs/boost:=[nls]
+       dev-libs/libsodium:=
+       dev-libs/openssl:=
+       dev-libs/randomx
+       dev-libs/rapidjson
+       dev-libs/supercop
+       net-dns/unbound:=[threads]
+       net-libs/czmq:=
+       net-libs/miniupnpc
+       readline? ( sys-libs/readline:0= )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${PN}-0.17.1.7-unbundle-dependencies.patch" )
+
+src_configure() {
+       local mycmakeargs=(
+               # TODO: Update CMake to install built libraries (help wanted)
+               -DBUILD_SHARED_LIBS=OFF
+               -DMANUAL_SUBMODULES=ON
+               -DMONERO_PARALLEL_LINK_JOBS=1
+               -DUSE_DEVICE_TREZOR=OFF
+       )
+
+       cmake_src_configure
+}
+
+src_compile() {
+       local targets=()
+       use daemon && targets+=(daemon)
+       use tools && targets+=(blockchain_{ancestry,blackball,db,depth,export,import,prune,prune_known_spent_data,stats,usage})
+       use wallet-cli && targets+=(simplewallet)
+       use wallet-rpc && targets+=(wallet_rpc_server)
+       cmake_build ${targets[@]}
+}
+
+src_install() {
+       einstalldocs
+
+       # Install all binaries.
+       find "${BUILD_DIR}/bin/" -type f -executable -print0 |
+               while IFS= read -r -d '' line; do
+                       dobin "$line"
+               done
+
+       if use daemon; then
+               dodoc utils/conf/monerod.conf
+
+               # data-dir
+               keepdir /var/lib/monero
+               fowners monero:monero /var/lib/monero
+               fperms 0755 /var/lib/monero
+
+               # log-file dir
+               keepdir /var/log/monero
+               fowners monero:monero /var/log/monero
+               fperms 0755 /var/log/monero
+
+               # /etc/monero/monerod.conf
+               insinto /etc/monero
+               doins "${FILESDIR}/monerod.conf"
+
+               # OpenRC
+               newconfd "${FILESDIR}/monerod.confd" monerod
+               newinitd "${FILESDIR}/monerod.initd" monerod
+
+               # systemd
+               systemd_dounit "${FILESDIR}/monerod.service"
+       fi
+}
+
+pkg_postinst() {
+       if use daemon; then
+               elog "Start the Monero P2P daemon as a system service with"
+               elog "'rc-service monerod start'. Enable it at startup with"
+               elog "'rc-update add monerod default'."
+               elog
+               elog "Run monerod status as any user to get sync status and other stats."
+               elog
+               elog "The Monero blockchain can take up a lot of space (80 GiB) and is stored"
+               elog "in /var/lib/monero by default. You may want to enable pruning by adding"
+               elog "'prune-blockchain=1' to /etc/monero/monerod.conf to prune the blockchain"
+               elog "or move the data directory to another disk."
+       fi
+}
diff --git a/profiles/repo_name b/profiles/repo_name
new file mode 100644 (file)
index 0000000..4083037
--- /dev/null
@@ -0,0 +1 @@
+local
diff --git a/www-misc/zoneminder/Manifest b/www-misc/zoneminder/Manifest
new file mode 100644 (file)
index 0000000..31fb109
--- /dev/null
@@ -0,0 +1,13 @@
+AUX 10_zoneminder.conf 864 BLAKE2B 1e99239e99d8fb6df8e177e4994e436d8878a556a208e9f83d03be10ba4beed4140fbd51c2cf39bc8442198f6fee59eea25884874bf621b77e6aad58d4ab2e23 SHA512 c95c4d72c1ee085d88dbda5d7f4eb3851b0692f5ebff8a65978e672b5bf2ae7ce1a1b9ce15d8857c0529bc2bf955ed52aec5ccd3f86084538610c7276a084c4e
+AUX README.gentoo 1103 BLAKE2B 264bf5cfff7c61a7ccac32260bad7aabf5e33e165560297e344f264df09d2f56a2cf9c317b6ae2d708c8a8dbc1202127cb8e587055bb0f43e1ac9af2a7202d1c SHA512 e6e4f8d1dad5f6d0f00f8f9d77086aa39f08f673d8d17babc59eb98eadff0f94a83fcea25321d64c941061ae80f7e563eb82ef28cf05bcb8d0a2d1fe4705ac7e
+AUX conf.d 138 BLAKE2B 41ccdedf00277d98a011ac56015c0e46b641df13bf1ad9828a0d62fc2459c43237918a7b4b59d2594de2f3ef01ee8cc89cf63aa79f56bdb368d837d0a9203819 SHA512 66a3447869a5c7ed613a90a81ae3b0464836a8d1804b195770dd4832e61e89f826998f58dba1ce42d7d411c543d485290e670b0bf929646ad99f48a996bc609a
+AUX init.d 415 BLAKE2B 1d72ddbabe6e39b771e18ca5605fdfebc975dd8998561c4a7fd59a40491448489d42ff58fa507143a4feb8b16c7ca1a926ee8ee62bac2a7687a3e624cef54772 SHA512 97ab5d9ddf450241513be6a778bcb346e449b3dab4d6b3d55be41dfe7bb48233a08a598f4306e2f9b35336ab14021b2a2b0e68ddef83bb121f720e11cfcd0bb5
+AUX zoneminder.service 212 BLAKE2B 4a7497025b8d315c5a77a6e1f0d80000c3eb363ced1f2285c6b594b871283eba941e267a4590fba5ea89fb3e1529dcec93a63d67025b569ba0411f9e42103680 SHA512 3824076594e18ee89ca28e622f87bf9bd51156d0ef9d71fe8d20d69b682ecf8c96fb779cbaf33f1709aec0ec9fd1b5448b8524c781510718549282e68c095a90
+DIST Crud-3.1.0.tar.gz 72993 BLAKE2B d11938a0a667f6747bbe3609e51ccc5665b8d243e1787a5779319c679f1f20301afd6b0a14c5489976b9f66f57b5f18ef3ae0ee5a24e1368702cb43a5d564dd5 SHA512 7ec84afaa336b1bd582b7f39724f77081bdb3008947c4124ad96e4bc7755a03fbe31e01666d4d1939ebe17b342db37bf3766a42d88fbed0e99706807ff5b9d01
+DIST ZM_RtspServer-1.36.20.tar.bz2 3810921 BLAKE2B 2d7301ddfe12fa3e9f3c69b0e9c947e019458041468e2dc7a15237e3a8ff1aa03fd8e4f9044491b941d9980cbe8ea4913f849385f70165e4b7bafc356538ee86 SHA512 f9828c8689b12dbb6ad881e4c5f2199a8f71b9ce40fba6239a3335d004285a3bce14a49460bf1ad5ed74cdd12682a6b471f249ae2297908587fcb5057be81f53
+DIST ZM_SubModules-1.36.21.tar.bz2 1484310 BLAKE2B 6ce984ef3b797f1567f82c56904c76755ecaff61d87f67d47c4b5e2610d8d87f96cfa9ec4319eea7d4fdda0240dc9d44cf658fcb383cd3d86e255f2def64981d SHA512 15a561348c55f9643889ebdd8258733ed40fdba09347bbe2da20fb2703e4d661765c72ea197b1d29896758f48cfa8b997b5afc2134715fcb6a5b27b824f4a54a
+DIST zoneminder-1.36.20.tar.gz 11351218 BLAKE2B b89f7908cd3f31db39a37b8cfc585368d5b5243250847635e888351e5ec48eab0bf1219078edb88ff040d3d478d5553d9c7dfa3705226af8d569d31df2a6007a SHA512 b869d6cdba362cd372898167143a8617a22639bd2c13dae21b605bbd528496269e4d67e10366ebadf5c010d858fe2fbbe7663d113134a4a826f894d720ce02a0
+DIST zoneminder-1.36.21.tar.gz 11352458 BLAKE2B 864f616abc6ce89a751b62eece927da423499e3a0c38693f5c12f2b4ed64c805c17b461254f8539f96a1177c159121b1d33e3fc7b374fb971bd0b86c09dd94a5 SHA512 294a3bea783cbdbe368751f2fa680b6edcc6d1cadf47450f4e0b64b568b565c615e28fec269f553a4942c5c8758cdccc8f95a092912ad3bbd36de2e056773d3a
+EBUILD zoneminder-1.36.20.ebuild 4398 BLAKE2B 3c9ed290740d5dce5686ad2a7eb26d8b6efe2583feabba1ada2929bc25de6a0af09737ec6f1b10d8d878accd00835acbdf18bcda083af4218a0af81fddb85aff SHA512 3f825dd6d8d5a6b712e36c2da4f4ebbf6bc5bff70bfb969c8006f97d8e2df9e63df71799152f6506299131509018ee9ccb9985c6a9cb860b5a9620baab750eca
+EBUILD zoneminder-1.36.21.ebuild 4142 BLAKE2B afbcf1ff825225fe2675991b2b57cec29aba766d7089aa8765850fc7042e211a3e5980b771e5ad1391721f71cae94b9b91fc3a3e48b745dd76fddcdcdf322317 SHA512 45ede5e4ac6d7cf75ce0a5cfc36c4d211c12fed0bc67d503c3a6035eb57c839f2a4265f3afbc9c966636955f510d6db169e6320087921d97c299f586da82792f
+MISC metadata.xml 435 BLAKE2B fbf306b96ac38b8f234f360500284d7036f5866c7f95d684488b9b94019998f02ed4f86bfe08f477bfd2f4cde75309b729570522fd52fa57fcf6da3c7e3e32bf SHA512 7aef30cab92e0b1607f5643fa91d96e0e14b38e4d234c2cfed6f44e9ea77473b0ecce492b5104bf98f81ad98cce63eb28c16234a307b885409ce8c82b303e7c7
diff --git a/www-misc/zoneminder/files/10_zoneminder.conf b/www-misc/zoneminder/files/10_zoneminder.conf
new file mode 100644 (file)
index 0000000..bc09eda
--- /dev/null
@@ -0,0 +1,37 @@
+ScriptAlias /zm/cgi-bin "/usr/libexec/zoneminder/cgi-bin/"
+
+<Directory "/usr/libexec/zoneminder/cgi-bin">
+  AllowOverride All
+  Options +ExecCGI
+  Require all granted
+</Directory>
+
+Alias /zm "%ZM_WEBDIR%"
+
+<Directory "%ZM_WEBDIR%">
+  Options -Indexes +MultiViews +FollowSymLinks
+  AllowOverride All
+  Require all granted
+</Directory>
+
+<Directory "%ZM_WEBDIR%/api">
+  RewriteEngine on
+   RewriteRule ^$ app/webroot/ [L]
+   RewriteRule (.*) app/webroot/$1 [L]
+   RewriteBase /zm/api
+</Directory>
+
+<Directory "%ZM_WEBDIR%/api/app">
+   RewriteEngine on
+   RewriteRule ^$ webroot/ [L]
+   RewriteRule (.*) webroot/$1 [L]
+   RewriteBase /zm/api
+</Directory>
+
+<Directory "%ZM_WEBDIR%/api/app/webroot">
+    RewriteEngine On
+    RewriteCond %{REQUEST_FILENAME} !-d
+    RewriteCond %{REQUEST_FILENAME} !-f
+    RewriteRule ^ index.php [L]
+    RewriteBase /zm/api
+</Directory>
diff --git a/www-misc/zoneminder/files/README.gentoo b/www-misc/zoneminder/files/README.gentoo
new file mode 100644 (file)
index 0000000..8713fda
--- /dev/null
@@ -0,0 +1,27 @@
+1. If this is a new installation, you will need to create a MySQL
+   database for zoneminder to use
+   (see https://wiki.gentoo.org/wiki/MySQL/Startup_Guide).
+   E.g., when logged into mysql as root,
+     mysql> CREATE DATABASE \`zm\`;
+     mysql> grant select,insert,alter,update,lock tables,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
+     mysql> flush privileges;
+   Once you completed that you should execute the following:
+     mysql -p < /usr/share/zoneminder/db/zm_create.sql
+
+2. Set your database settings in /etc/zm.conf, including above zmpass
+
+3. Configure apache to use zoneminder, see /usr/share/doc/zoneminder*/10_zoneminder.conf
+   for an example configuration snippet.
+
+4. Enable PHP in your webserver configuration,
+   enable short_open_tags in php.ini (likely on by default now)
+   set the time zone in php.ini,
+   and restart/reload the webserver.
+
+5. Start the zoneminder daemon:
+     /etc/init.d/zoneminder start
+
+6. Finally point your browser to http://your.webserver/zm
+
+If you are upgrading, you will need to run the zmupdate.pl script: 
+   /usr/bin/zmupdate.pl
diff --git a/www-misc/zoneminder/files/conf.d b/www-misc/zoneminder/files/conf.d
new file mode 100644 (file)
index 0000000..d2e0336
--- /dev/null
@@ -0,0 +1,6 @@
+ZM_SCRIPT=/usr/bin/zmpkg.pl
+
+# Commands for starting and stopping the server
+
+CMD_START="${ZM_SCRIPT} start"
+CMD_STOP="${ZM_SCRIPT} stop"
diff --git a/www-misc/zoneminder/files/init.d b/www-misc/zoneminder/files/init.d
new file mode 100644 (file)
index 0000000..6ee8a16
--- /dev/null
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+       need mysql
+       need apache2
+}
+
+start_pre() {
+       checkpath -d -m 0775 -o apache:apache /var/run/zm
+       checkpath -d -m 0775 -o apache:apache /var/tmp/zm
+}
+
+start() {
+       ebegin "Starting zoneminder"
+       ${CMD_START}
+       eend $?
+}
+
+stop() {
+       ebegin "Stopping zoneminder"
+       ${CMD_STOP}
+       eend $?
+}
diff --git a/www-misc/zoneminder/files/zoneminder.service b/www-misc/zoneminder/files/zoneminder.service
new file mode 100644 (file)
index 0000000..9ef5bc6
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Video Security and Survellance System
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/zmpkg.pl start
+ExecReload=/usr/bin/zmpkg.pl reload
+PIDFile=/run/zm/zm.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-misc/zoneminder/metadata.xml b/www-misc/zoneminder/metadata.xml
new file mode 100644 (file)
index 0000000..5d75d2f
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <use>
+               <flag name="curl">Enable using net-misc/curl for streaming from cameras</flag>
+               <flag name="gcrypt">...</flag>
+               <flag name="vlc">Enable using media-libs/vlc for streaming from cameras</flag>
+       </use>
+       <upstream>
+               <remote-id type="github">ZoneMinder/ZoneMinder</remote-id>
+       </upstream>
+</pkgmetadata>
diff --git a/www-misc/zoneminder/zoneminder-1.36.20.ebuild b/www-misc/zoneminder/zoneminder-1.36.20.ebuild
new file mode 100644 (file)
index 0000000..d00861c
--- /dev/null
@@ -0,0 +1,176 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake perl-functions readme.gentoo-r1 depend.apache flag-o-matic systemd
+
+MY_PN="ZoneMinder"
+
+MY_CRUD_VERSION="3.1.0"
+
+DESCRIPTION="Capture, analyse, record and monitor any cameras attached to your system"
+HOMEPAGE="http://www.zoneminder.com/"
+SRC_URI="
+       https://liquid.me.uk/ZM_RtspServer-${PV}.tar.bz2
+       https://github.com/${MY_PN}/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+       https://github.com/FriendsOfCake/crud/archive/v${MY_CRUD_VERSION}.tar.gz -> Crud-${MY_CRUD_VERSION}.tar.gz
+"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64"
+IUSE="curl encode ffmpeg gcrypt gnutls +mmap +ssl libressl vlc"
+SLOT="0"
+
+REQUIRED_USE="
+       || ( ssl gnutls )
+"
+
+DEPEND="
+app-eselect/eselect-php[apache2]
+dev-lang/perl:=
+dev-lang/php:*[apache2,cgi,curl,gd,inifile,pdo,mysql,mysqli,sockets]
+dev-libs/libpcre
+dev-perl/Archive-Zip
+dev-perl/Class-Std-Fast
+dev-perl/Crypt-Eksblowfish
+dev-perl/Data-Entropy
+dev-perl/Data-Float
+dev-perl/Data-Dump
+dev-perl/Date-Manip
+dev-perl/Data-UUID
+dev-perl/DBD-mysql
+dev-perl/DBI
+dev-perl/IO-Socket-Multicast
+dev-perl/SOAP-WSDL
+dev-perl/Sys-CPU
+dev-perl/Sys-MemInfo
+dev-perl/URI-Encode
+dev-perl/libwww-perl
+dev-perl/Number-Bytes-Human
+dev-perl/JSON-MaybeXS
+dev-php/pecl-apcu:*
+media-libs/libv4l
+sys-auth/polkit
+sys-libs/zlib
+ffmpeg? ( media-video/ffmpeg )
+encode? ( media-libs/libmp4v2 )
+virtual/httpd-php:*
+virtual/jpeg:0
+virtual/mysql
+virtual/perl-ExtUtils-MakeMaker
+virtual/perl-Getopt-Long
+virtual/perl-Sys-Syslog
+virtual/perl-Time-HiRes
+www-servers/apache
+curl? ( net-misc/curl )
+gcrypt? ( dev-libs/libgcrypt:0= )
+gnutls? ( net-libs/gnutls )
+mmap? ( dev-perl/Sys-Mmap )
+ssl? (
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:0= )
+)
+vlc? ( media-video/vlc[live] )
+"
+RDEPEND="${DEPEND}"
+
+need_apache
+
+PATCHES=(
+)
+
+MY_ZM_WEBDIR=/usr/share/zoneminder/www
+
+src_prepare() {
+       cmake_src_prepare
+       rmdir "${S}/web/api/app/Plugin/Crud" || die
+       mv "${WORKDIR}/crud-${MY_CRUD_VERSION}" "${S}/web/api/app/Plugin/Crud" || die
+       rm "${WORKDIR}/${P}/conf.d/README" || die
+       eapply_user
+}
+
+src_configure() {
+       append-cxxflags -D__STDC_CONSTANT_MACROS
+       perl_set_version
+       export TZ=UTC # bug 630470
+       MYCMAKEARGS=(
+               -DZM_PERL_SUBPREFIX=${VENDOR_LIB#/usr}
+               -DZM_TMPDIR=/var/tmp/zm
+               -DZM_SOCKDIR=/var/run/zm
+               -DZM_WEB_USER=apache
+               -DZM_WEB_GROUP=apache
+               -DZM_WEBDIR=${MY_ZM_WEBDIR}
+               -DZM_NO_MMAP="$(usex mmap OFF ON)"
+               -DZM_NO_X10=OFF
+               -DZM_NO_FFMPEG="$(usex ffmpeg OFF ON)"
+               -DZM_NO_CURL="$(usex curl OFF ON)"
+               -DZM_NO_LIBVLC="$(usex vlc OFF ON)"
+               -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)"
+               -DHAVE_GNUTLS="$(usex gnutls ON OFF)"
+               -DHAVE_GCRYPT="$(usex gcrypt ON OFF)"
+       )
+
+       cmake_src_configure
+
+}
+
+src_install() {
+       cmake_src_install
+
+       # the log directory
+       keepdir /var/log/zm
+       fowners apache:apache /var/log/zm
+
+       # the logrotate script
+       insinto /etc/logrotate.d
+       newins distros/ubuntu1604/zoneminder.logrotate zoneminder
+
+       # now we duplicate the work of zmlinkcontent.sh
+       keepdir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events /var/lib/zoneminder/api_tmp
+       fperms -R 0775 /var/lib/zoneminder
+       fowners -R apache:apache /var/lib/zoneminder
+       dosym /var/lib/zoneminder/images ${MY_ZM_WEBDIR}/images
+       dosym /var/lib/zoneminder/events ${MY_ZM_WEBDIR}/events
+       dosym /var/cache/zoneminder ${MY_ZM_WEBDIR}/cache
+       dosym /var/lib/zoneminder/api_tmp ${MY_ZM_WEBDIR}/api/app/tmp
+
+       # the cache directory
+       keepdir /var/cache/zoneminder
+       fowners apache:apache /var/cache/zoneminder
+
+       # bug 523058
+       keepdir ${MY_ZM_WEBDIR}/temp
+       fowners -R apache:apache ${MY_ZM_WEBDIR}/temp
+
+       # the configuration file
+       fperms 0640 /etc/zm.conf
+       fowners root:apache /etc/zm.conf
+
+       # init scripts etc
+       newinitd "${FILESDIR}"/init.d zoneminder
+       newconfd "${FILESDIR}"/conf.d zoneminder
+
+       # systemd unit file
+       systemd_dounit "${FILESDIR}"/zoneminder.service
+
+       cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf || die
+       sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" || die
+
+       dodoc README.md "${T}"/10_zoneminder.conf
+
+       perl_delete_packlist
+
+       readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+
+       local v
+       for v in ${REPLACING_VERSIONS}; do
+               if ! version_is_at_least ${PV} ${v}; then
+                       elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script."
+               fi
+       done
+}
diff --git a/www-misc/zoneminder/zoneminder-1.36.21.ebuild b/www-misc/zoneminder/zoneminder-1.36.21.ebuild
new file mode 100644 (file)
index 0000000..51f37be
--- /dev/null
@@ -0,0 +1,172 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake perl-functions readme.gentoo-r1 depend.apache flag-o-matic systemd
+
+MY_PN="ZoneMinder"
+
+
+DESCRIPTION="Capture, analyse, record and monitor any cameras attached to your system"
+HOMEPAGE="http://www.zoneminder.com/"
+SRC_URI="
+       https://liquid.me.uk/ZM_SubModules-${PV}.tar.bz2
+       https://github.com/${MY_PN}/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64"
+IUSE="curl encode ffmpeg gcrypt gnutls +mmap +ssl libressl vlc"
+SLOT="0"
+
+REQUIRED_USE="
+       || ( ssl gnutls )
+"
+
+DEPEND="
+app-eselect/eselect-php[apache2]
+dev-lang/perl:=
+dev-lang/php:*[apache2,cgi,curl,gd,inifile,pdo,mysql,mysqli,sockets]
+dev-libs/libpcre
+dev-perl/Archive-Zip
+dev-perl/Class-Std-Fast
+dev-perl/Crypt-Eksblowfish
+dev-perl/Data-Entropy
+dev-perl/Data-Float
+dev-perl/Data-Dump
+dev-perl/Date-Manip
+dev-perl/Data-UUID
+dev-perl/DBD-mysql
+dev-perl/DBI
+dev-perl/IO-Socket-Multicast
+dev-perl/SOAP-WSDL
+dev-perl/Sys-CPU
+dev-perl/Sys-MemInfo
+dev-perl/URI-Encode
+dev-perl/libwww-perl
+dev-perl/Number-Bytes-Human
+dev-perl/JSON-MaybeXS
+dev-php/pecl-apcu:*
+media-libs/libv4l
+sys-auth/polkit
+sys-libs/zlib
+ffmpeg? ( media-video/ffmpeg )
+encode? ( media-libs/libmp4v2 )
+virtual/httpd-php:*
+virtual/jpeg:0
+virtual/mysql
+virtual/perl-ExtUtils-MakeMaker
+virtual/perl-Getopt-Long
+virtual/perl-Sys-Syslog
+virtual/perl-Time-HiRes
+www-servers/apache
+curl? ( net-misc/curl )
+gcrypt? ( dev-libs/libgcrypt:0= )
+gnutls? ( net-libs/gnutls )
+mmap? ( dev-perl/Sys-Mmap )
+ssl? (
+       !libressl? ( dev-libs/openssl:0= )
+       libressl? ( dev-libs/libressl:0= )
+)
+vlc? ( media-video/vlc[live] )
+"
+RDEPEND="${DEPEND}"
+
+need_apache
+
+PATCHES=(
+)
+
+MY_ZM_WEBDIR=/usr/share/zoneminder/www
+
+src_prepare() {
+       cmake_src_prepare
+       rm "${WORKDIR}/${P}/conf.d/README" || die
+       eapply_user
+}
+
+src_configure() {
+       append-cxxflags -D__STDC_CONSTANT_MACROS
+       perl_set_version
+       export TZ=UTC # bug 630470
+       MYCMAKEARGS=(
+               -DZM_PERL_SUBPREFIX=${VENDOR_LIB#/usr}
+               -DZM_TMPDIR=/var/tmp/zm
+               -DZM_SOCKDIR=/var/run/zm
+               -DZM_WEB_USER=apache
+               -DZM_WEB_GROUP=apache
+               -DZM_WEBDIR=${MY_ZM_WEBDIR}
+               -DZM_NO_MMAP="$(usex mmap OFF ON)"
+               -DZM_NO_X10=OFF
+               -DZM_NO_FFMPEG="$(usex ffmpeg OFF ON)"
+               -DZM_NO_CURL="$(usex curl OFF ON)"
+               -DZM_NO_LIBVLC="$(usex vlc OFF ON)"
+               -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL="$(usex ssl OFF ON)"
+               -DHAVE_GNUTLS="$(usex gnutls ON OFF)"
+               -DHAVE_GCRYPT="$(usex gcrypt ON OFF)"
+       )
+
+       cmake_src_configure
+
+}
+
+src_install() {
+       cmake_src_install
+
+       # the log directory
+       keepdir /var/log/zm
+       fowners apache:apache /var/log/zm
+
+       # the logrotate script
+       insinto /etc/logrotate.d
+       newins distros/ubuntu1604/zoneminder.logrotate zoneminder
+
+       # now we duplicate the work of zmlinkcontent.sh
+       keepdir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events /var/lib/zoneminder/api_tmp
+       fperms -R 0775 /var/lib/zoneminder
+       fowners -R apache:apache /var/lib/zoneminder
+       dosym /var/lib/zoneminder/images ${MY_ZM_WEBDIR}/images
+       dosym /var/lib/zoneminder/events ${MY_ZM_WEBDIR}/events
+       dosym /var/cache/zoneminder ${MY_ZM_WEBDIR}/cache
+       dosym /var/lib/zoneminder/api_tmp ${MY_ZM_WEBDIR}/api/app/tmp
+
+       # the cache directory
+       keepdir /var/cache/zoneminder
+       fowners apache:apache /var/cache/zoneminder
+
+       # bug 523058
+       keepdir ${MY_ZM_WEBDIR}/temp
+       fowners -R apache:apache ${MY_ZM_WEBDIR}/temp
+
+       # the configuration file
+       fperms 0640 /etc/zm.conf
+       fowners root:apache /etc/zm.conf
+
+       # init scripts etc
+       newinitd "${FILESDIR}"/init.d zoneminder
+       newconfd "${FILESDIR}"/conf.d zoneminder
+
+       # systemd unit file
+       systemd_dounit "${FILESDIR}"/zoneminder.service
+
+       cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf || die
+       sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" || die
+
+       dodoc README.md "${T}"/10_zoneminder.conf
+
+       perl_delete_packlist
+
+       readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+       readme.gentoo_print_elog
+
+       local v
+       for v in ${REPLACING_VERSIONS}; do
+               if ! version_is_at_least ${PV} ${v}; then
+                       elog "You have upgraded zoneminder and may have to upgrade your database now using the 'zmupdate.pl' script."
+               fi
+       done
+}