summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVance M. Allen <vma_gentoo@vmacs.us>2019-10-27 17:20:16 -0600
committerVance M. Allen <vma_gentoo@vmacs.us>2020-08-01 14:59:55 -0600
commit571651ca6e23afff5bd94054cb5b27b2d72c3775 (patch)
tree130ee712525d2d1f600e26e28e3de185b41f79f6
parentAdd support for phpMyAdmin-4.8.4 (diff)
downloadvmacs-571651ca6e23afff5bd94054cb5b27b2d72c3775.tar.gz
vmacs-571651ca6e23afff5bd94054cb5b27b2d72c3775.tar.bz2
vmacs-571651ca6e23afff5bd94054cb5b27b2d72c3775.zip
Update Webmin, Media-Wiki to latest versions. Remove MySQL. Add support for vixie-cron.
Signed-off-by: Vance M. Allen <vma_gentoo@vmacs.us>
-rw-r--r--app-admin/webmin/Manifest6
-rw-r--r--app-admin/webmin/webmin-1.930.ebuild (renamed from app-admin/webmin/webmin-1.881.ebuild)0
-rw-r--r--dev-db/mysql/Manifest6
-rw-r--r--dev-db/mysql/files/my.cnf-8.03
-rw-r--r--dev-db/mysql/files/my.cnf.distro-client21
-rw-r--r--dev-db/mysql/files/my.cnf.distro-server28
-rw-r--r--dev-db/mysql/mysql-8.0.11.ebuild847
-rw-r--r--dev-db/phpmyadmin/Manifest3
-rw-r--r--dev-db/phpmyadmin/files/postinstall-en-3.1.txt36
-rw-r--r--dev-db/phpmyadmin/phpmyadmin-4.8.4.ebuild61
-rw-r--r--sys-process/vixie-cron/Manifest2
-rw-r--r--sys-process/vixie-cron/files/crontab15
-rw-r--r--sys-process/vixie-cron/files/crontab-3.0.1-r414
-rw-r--r--sys-process/vixie-cron/files/crontab.5.diff35
-rw-r--r--sys-process/vixie-cron/files/pamd.compatible7
-rw-r--r--sys-process/vixie-cron/files/vixie-cron-4.1-basename.diff20
-rw-r--r--sys-process/vixie-cron/files/vixie-cron-4.1-commandline.patch13
-rw-r--r--sys-process/vixie-cron/files/vixie-cron-4.1-cron.deny4
-rw-r--r--sys-process/vixie-cron/files/vixie-cron-4.1-crontabrace.patch29
-rw-r--r--sys-process/vixie-cron/files/vixie-cron-4.1-hardlink.patch11
-rw-r--r--sys-process/vixie-cron/files/vixie-cron-4.1-pam.patch67
-rw-r--r--sys-process/vixie-cron/files/vixie-cron-4.1-selinux-2.patch225
-rw-r--r--sys-process/vixie-cron/files/vixie-cron-4.1-setuid_check.patch29
-rw-r--r--sys-process/vixie-cron/files/vixie-cron.rc712
-rw-r--r--sys-process/vixie-cron/files/vixie-cron.service11
-rw-r--r--sys-process/vixie-cron/metadata.xml5
-rw-r--r--sys-process/vixie-cron/vixie-cron-4.1-r15.ebuild126
-rw-r--r--www-apps/mediawiki/Manifest4
-rw-r--r--www-apps/mediawiki/mediawiki-1.33.1.ebuild (renamed from www-apps/mediawiki/mediawiki-1.30.0.ebuild)0
29 files changed, 630 insertions, 1010 deletions
diff --git a/app-admin/webmin/Manifest b/app-admin/webmin/Manifest
index 0e78aa8..c3a733b 100644
--- a/app-admin/webmin/Manifest
+++ b/app-admin/webmin/Manifest
@@ -1,6 +1,6 @@
AUX gentoo-setup 13727 BLAKE2B dca9dadd5775006f5bfbeee870723db8806a2236c984e2b4cec70031101f97fc5d4e1e1fd9219f27cdaa31ee860d247f71a01180b392154c16ca6554b1f73483 SHA512 fa6fde84eb9a16fea5d019fd920aed2a2f5dd51e5f32fa407fd1c424a0627eaafab7cd3b572a57e4f97e06ce5b6b5a7373ac377776a474a8512e077130eadc6e
AUX init.d.webmin 2167 BLAKE2B b90957ca4273ccc6deb35837704523361c3ed8b61034cb067919dffeabd7a8e6153ab2deceffc7745b209ffe8c6b52ad8fd391aa76591a9870c5f8f60223fb64 SHA512 deedded42854f4b29b28f24afec5171c4ee0f3301c4a0f4f9442f1c39b2aac39490315049641ed0b60182bdeb88d3f8d34672a707f95ecfa755d03d7f4dff49b
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
-EBUILD webmin-1.881.ebuild 10394 BLAKE2B a7ebd0d6711d6039ce53d87ca058cff0a05929db64e3465a2368336d0f8b5fc7a5b14a5998cf3179146bce1f2ad5e2a83a467d1a930b1206ad33a0c6a5b29c07 SHA512 83c2b148b128158c7c0eba6b6888c063fed4316e9ca5afad4e0c14f52778582da41711970f3fb748fcf25a00d7a448c85289f80e1cd33f14e71a1209735b8410
+DIST webmin-1.930-minimal.tar.gz 2876574 BLAKE2B c8d47e7ef63f8c7ebcb8d6232dc137c6febb7964f414ac39ebb038ef5b2ae003712b2949d04e2d5833d60b0e9ed8832cc0c97918b54f3040eb90d78456da77b9 SHA512 4960339bd6ff2dff093e27b893f9de4b3cb4f2f8fa503a5fa020b2130abb30f60a36fa4cf3529b3255ae9dbabbcb6ac65b74781948f8196e902945d86e79ee9e
+DIST webmin-1.930.tar.gz 30932910 BLAKE2B 0ef13922a1da8446e3393a5fc4fe1cdd14da21110e2fedb2aba7b0bf32d25c0b20b731ee47cc9c3f2be884e97bb14b64f6366000967652b001e55a0ceab2dee1 SHA512 10f3a14b318329dd1a04786e17abc27ba6896a9efaa657ff37c36afa439d65b71805a839e0ea1c95785e77d97d4a4c0e79019fb09681feb7aed06fd5c22b3323
+EBUILD webmin-1.930.ebuild 10394 BLAKE2B a7ebd0d6711d6039ce53d87ca058cff0a05929db64e3465a2368336d0f8b5fc7a5b14a5998cf3179146bce1f2ad5e2a83a467d1a930b1206ad33a0c6a5b29c07 SHA512 83c2b148b128158c7c0eba6b6888c063fed4316e9ca5afad4e0c14f52778582da41711970f3fb748fcf25a00d7a448c85289f80e1cd33f14e71a1209735b8410
diff --git a/app-admin/webmin/webmin-1.881.ebuild b/app-admin/webmin/webmin-1.930.ebuild
index 6d02e04..6d02e04 100644
--- a/app-admin/webmin/webmin-1.881.ebuild
+++ b/app-admin/webmin/webmin-1.930.ebuild
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
deleted file mode 100644
index 0b7a0bc..0000000
--- a/dev-db/mysql/Manifest
+++ /dev/null
@@ -1,6 +0,0 @@
-AUX my.cnf-8.0 138 BLAKE2B 71862b4b77334ab74002237453d2c7f6b51cd1ae57dba3b00b19e216d3f10034796de9aa618efb11482cef78b7c7e50393b5f665810d03321b5ca770ac8a6144 SHA512 1d7250689005c948f4a849959baf33f5f0fda099f230611651919ed053fb563daa19d996b7ca6714e224174172fb504f4d7d08e9d449a7e1203e32cf3fdec782
-AUX my.cnf.distro-client 631 BLAKE2B 9ba4edf4398410ef40bf7312a485edd70a807a9da37c69bb6f6bee2c58a722fef1b9f37d28f09f41912722451cc0e9913218d15be472a853a942119f019bf486 SHA512 f40539a56afe79b7c0dff14de46690fd67e8350755b27fbb490d914001c01836cdf9f851aa461bd8b60943ef2ca084b70e48d995f5c18bcc241309f3473c610c
-AUX my.cnf.distro-server 994 BLAKE2B 41dceff58edf748f9f60ac3c0d1682d2fc2f026fc1fd14b4c2dea398814beda3c09aabea04dd3a9e145464524c629e7e69dc257d1245e0a46dd8584b7f685172 SHA512 cf172edc23d3dda49c21af6b8adef8aa13694d8ceecddf1d612d4ae34d00ba53c51ae4ae7ca4d11083eeacb5d862f59a855a9d80e9e448ab8bbf17f42aac2650
-DIST mysql-boost-8.0.11.tar.gz 77647598 BLAKE2B f4f4bc357ebd8b20440b203f2143e085d993985cea7dc478c2ebfdf0015fdcf5536b4656acba5afc58feec4bbd91d9aa9f9cc0b490e2eada82ed58e376ce94ec SHA512 845db694c5669bf23e03b8d8169ed1194f6c8eec0957976791f533dedc8e7c6618bf75d88224f86dbc679a05f22d49019792bc7a0cbe1f1efea55f9a0a67df91
-DIST mysql-extras-20180529-0042Z.tar.bz2 321715 BLAKE2B c40e7c8de7d24f1ab6208968f3e22aae9e7782f02edef1391d37583ba4a99e67646eba2b9fdcf2a77e3e5a3a86c36632edfebb42b12ab242662cf6913313168d SHA512 a136d9f9567a3bbd396c1e33d1d7b6565be16b5b0a514835299a09b009e9d908328066701bb1c6c19af74225b1d166e3f57af81b277b6d8fad9e63c009523586
-EBUILD mysql-8.0.11.ebuild 27110 BLAKE2B 9b92bc23bfd1bfcc7a06eddc69244a826868abf8b13faafd8afdde3b1ccd736540da5f78ce6e6b4fed21c61cf8cd9967b839ce7694a78fee1faaacae1b9039b6 SHA512 78ada596f333e8528fcf8299eea6a5e82cfd3f7b4b2b2c79b9065c85dc1c445674ba7f3db3908538b30317b62cde27e43296cf3a0f646bd7b8f8637bde18fbd1
diff --git a/dev-db/mysql/files/my.cnf-8.0 b/dev-db/mysql/files/my.cnf-8.0
deleted file mode 100644
index 571ebf0..0000000
--- a/dev-db/mysql/files/my.cnf-8.0
+++ /dev/null
@@ -1,3 +0,0 @@
-# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
-
-!includedir @GENTOO_PORTAGE_EPREFIX@/etc/mysql/mysql.d
diff --git a/dev-db/mysql/files/my.cnf.distro-client b/dev-db/mysql/files/my.cnf.distro-client
deleted file mode 100644
index 8bf1836..0000000
--- a/dev-db/mysql/files/my.cnf.distro-client
+++ /dev/null
@@ -1,21 +0,0 @@
-# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-client.cnf: The global mysql configuration file.
-
-# The following options will be passed to all MySQL clients
-[client]
-socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
-character-sets-dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
-default-character-set=utf8
-
-[mysql]
-# uncomment the next directive if you are not familiar with SQL
-#safe-updates
-
-[mysqldump]
-quick
-max_allowed_packet = 16M
-
-[myisamchk]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
-
-[myisampack]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
diff --git a/dev-db/mysql/files/my.cnf.distro-server b/dev-db/mysql/files/my.cnf.distro-server
deleted file mode 100644
index d4ed30c..0000000
--- a/dev-db/mysql/files/my.cnf.distro-server
+++ /dev/null
@@ -1,28 +0,0 @@
-# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-server.cnf: The global mysql configuration file.
-
-# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
-[mysqld]
-character-set-server = utf8
-user = mysql
-port = 3306
-socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
-pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysql.pid
-log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
-basedir = @GENTOO_PORTAGE_EPREFIX@/usr
-datadir = @DATADIR@
-skip-external-locking
-lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
-#Set this to your desired error message language
-lc_messages = en_US
-
-# security:
-# using "localhost" in connects uses sockets by default
-# skip-networking
-bind-address = 127.0.0.1
-
-log-bin
-server-id = 1
-
-# point the following paths to different dedicated disks
-tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
-#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
diff --git a/dev-db/mysql/mysql-8.0.11.ebuild b/dev-db/mysql/mysql-8.0.11.ebuild
deleted file mode 100644
index 97014de..0000000
--- a/dev-db/mysql/mysql-8.0.11.ebuild
+++ /dev/null
@@ -1,847 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180529-0042Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs \
- user cmake-utils multilib-minimal
-
-SRC_URI="http://cdn.mysql.com/Downloads/MySQL-8.0/${PN}-boost-${PV}.tar.gz
- https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${PV}.tar.gz
- http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${PV}.tar.gz"
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
- SRC_URI="${SRC_URI}
- mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
- +server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
- MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
- MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.patch
- "${MY_PATCH_DIR}"/20003_all_fix-5.7-library.patch
- "${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.7.patch
- "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
- "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.7.6.patch
- "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
- "${MY_PATCH_DIR}"/20017_all_mysql-openssl-cmake-detection.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.21-without-clientlibs-tools.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-# MULTILIB_USEDEP only set for libraries used by the client library
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- net-misc/curl
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- !yassl? (
- client-libs? (
- !libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
- libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
- )
- !client-libs? (
- !libressl? ( >=dev-libs/openssl-1.0.0:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- )
- client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
- !client-libs? ( >=sys-libs/zlib-1.2.3:0= )
- sys-libs/ncurses:0=
- >=sys-devel/clang-3.4.0
- server? (
- >=app-arch/lz4-0_p131:=
- >=dev-libs/boost-1.65.0:=
- numa? ( sys-process/numactl )
- )
-"
-DEPEND="virtual/yacc
- static? ( sys-libs/ncurses[static-libs] )
- || ( >=sys-devel/gcc-4.8.0 >=sys-devel/gcc-apple-4.0 )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- abi_x86_32? ( !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] )
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
- !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- ${COMMON_DEPEND}
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
- !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
- # non x86{,_64} arches
- if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 8 ]] ; then
- eerror "${PN} needs to be built with gcc-4.8 or later."
- eerror "Please use gcc-config to switch to gcc-4.8 or later version."
- die
- fi
- fi
- if has test ${FEATURES} && \
- use server && ! has userpriv ${FEATURES} ; then
- eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- # This should come after all of the die statements
- enewgroup mysql 60 || die "problem adding 'mysql' group"
- enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
- # Here we need to see if the implementation switched client libraries
- # We check if this is a new instance of the package and a client library already exists
- local SHOW_ABI_MESSAGE libpath
- if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
- libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
- elog "Due to ABI changes when switching between different client libraries,"
- elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
- elog "Please run: revdep-rebuild --library ${libpath}"
- ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
- fi
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
- if use server ; then
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
- fi
-
- # Note about configuration change
- einfo
- elog "This version of mysql reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/${PN}.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
- elog "You may have as many files as needed and they are read alphabetically."
- elog "Be sure the options have the appropitate section headers, i.e. [mysqld]."
- einfo
-}
-
-src_unpack() {
- unpack ${A}
- # Grab the patches
- [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
- mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
- if use jemalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
- if use tcmalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
- # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
- if [[ -d "${S}/support-files/SELinux" ]] ; then
- echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
- fi
-
- if use libressl ; then
- sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
- "${S}/cmake/ssl.cmake" || die
- fi
-
- cmake-utils_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- if use client-libs ; then
- multilib-minimal_src_configure
- else
- multilib_src_configure
- fi
-}
-
-multilib_src_configure() {
- debug-print-function ${FUNCNAME} "$@"
-
- if ! multilib_is_native_abi && ! use client-libs ; then
- return
- fi
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
- -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
- -DSYSCONFDIR="${EPREFIX}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mysql
- -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
- -DINSTALL_SCRIPTDIR=share/mysql/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- ### TODO: make this system but issues with UTF-8 prevent it
- -DWITH_EDITLINE=bundled
- -DWITH_ZLIB=system
- -DWITH_LIBWRAP=0
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DWITH_RAPID=OFF
- -DWITH_LIBEVENT=NO
- -DWITH_CURL=system
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use yassl ; then
- mycmakeargs+=( -DWITH_SSL=system )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
- if ! use client-libs ; then
- mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
- fi
-
- # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
- # systemtap only works on native ABI bug 530132
- if multilib_is_native_abi; then
- mycmakeargs+=(
- -DENABLE_DTRACE=$(usex systemtap)
- )
- else
- mycmakeargs+=(
- -DWITHOUT_TOOLS=1
- -DWITH_READLINE=1
- -DENABLE_DTRACE=0
- )
- fi
-
- if multilib_is_native_abi && use server ; then
-
- mycmakeargs+=(
- -DWITH_BOOST="${S}/boost"
- -DWITH_LZ4=system
- -DWITH_NUMA=$(usex numa ON OFF)
- )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
-
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_DEBUG=$(usex debug)
- -DWITH_EMBEDDED_SERVER=OFF
- -DENABLED_PROFILING=$(usex profiling)
- )
-
- if use static; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_EXAMPLE_STORAGE_ENGINE=0
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_PARTITION_STORAGE_ENGINE=1
- -DWITH_INNODB_MEMCACHED=0
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DWITH_EMBEDDED_SERVER=OFF
- -DEXTRA_CHARSETS=none
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- if use client-libs ; then
- multilib-minimal_src_compile
- else
- multilib_src_compile
- fi
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- local MULTILIB_WRAPPED_HEADERS
- local MULTILIB_CHOST_TOOLS
- if use client-libs ; then
- # headers with ABI specific data
- MULTILIB_WRAPPED_HEADERS=(
- /usr/include/mysql/server/my_config.h
- /usr/include/mysql/server/mysql_version.h )
-
- # wrap the config scripts
- MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
- multilib-minimal_src_install
- else
- multilib_src_install
- multilib_src_install_all
- fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
- cmake-utils_src_install
-
- # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
- find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED}/usr/data" ]] ; then
- rm -Rf "${ED}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
- cp "${FILESDIR}/my.cnf-8.0" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
- cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
- eprefixify "${TMPDIR}/50-distro-client.cnf"
- doins "${TMPDIR}/50-distro-client.cnf"
-
- if use server ; then
- mycnf_src="my.cnf.distro-server"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR}/${mycnf_src}" \
- > "${TMPDIR}/my.cnf.ok" || die
- if use prefix ; then
- sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='perl server static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MySQL 5.7 for now and are believed to be
- # false positives:
- #
- local t
-
- for t in auth_sec.keyring_udf federated.federated_plugin ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT}"/usr/bin/my_print_defaults
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
- }
- local old_MY_DATADIR="${MY_DATADIR}"
- local old_HOME="${HOME}"
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- export HOME=${EPREFIX}/root
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
- if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
- die "Minimal builds do NOT include the MySQL server"
- fi
-
- if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
- local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
- MY_DATADIR_s="${MY_DATADIR_s%%/}"
- local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
- old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
- if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
- ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
- else
- elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
- mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
- || die "Moving MY_DATADIR failed"
- fi
- else
- ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Attempting to use ${MY_DATADIR_s}"
- else
- eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
- die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
- fi
- fi
- fi
-
- local pwd1="a"
- local pwd2="b"
- local maxtry=15
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
- local tmp_mysqld_password_source=
-
- for tmp_mysqld_password_source in mysql client; do
- einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
- if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
- if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
- ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
- MYSQL_ROOT_PASSWORD=
- continue
- fi
-
- einfo "Found password in '${tmp_mysqld_password_source}' section!"
- break
- fi
- done
-
- # Sometimes --show is required to display passwords in some implementations of my_print_defaults
- if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
- fi
-
- unset tmp_mysqld_password_source
- fi
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see http://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # http://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- # --initialize-insecure will not set root password
- # --initialize would set a random one in the log which we don't need as we set it ourselves
- local cmd=( "${EROOT}usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- $(use prefix || echo --user=mysql) \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile}
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/phpmyadmin/Manifest b/dev-db/phpmyadmin/Manifest
deleted file mode 100644
index f1a103f..0000000
--- a/dev-db/phpmyadmin/Manifest
+++ /dev/null
@@ -1,3 +0,0 @@
-AUX postinstall-en-3.1.txt 1160 BLAKE2B 0aa21601490830f93a784c1a3c09b90986d606d0086b128b37d6598c946e9ebe43f575f12ca5ee571db8520841a2c08624b567b721567d26ee02e1e3c4c9124e SHA512 7b50ab9f9e3a828bd9bff600550ea97712c28804467ab5900a52710d4adb0581fe33155a965dd3956fcd36cc153b1a18a1f001d88ac52d70c8288faf695f01ec
-DIST phpMyAdmin-4.8.4-all-languages.tar.xz 6012216 BLAKE2B 3e6503a7f2d76c6c9e7d8064ef2eb3ea21ee5ef040c0439e24afe9388f8f47aef4fbd8cbe27ae809f45f2c789a289f529a3eda1cf91ef80681d1f76147d753ee SHA512 4f7018416fb925b28d5e061ebba4d99c45497f0e33c6a4bfa32aaa74197a429d61469d8084fd5ea6b23a34444c81905e072b5508f9a87c75e18e0ac596ff2121
-EBUILD phpmyadmin-4.8.4.ebuild 1564 BLAKE2B 5ac1abd3d55453b52b0eb5c9a6c32427e15ee221f7641222c999396b7efeb1dc3c0e6af8949661106d3e49d0a78c1532cfad1b6bfb2743c08d7f8a54e9bfff11 SHA512 247d39125762dd7117b05d4655364784e717a5ff536ef730327e3e83f6fb5ae14eabbf42839c5f568b3ef5e9caa474fb1e8e5b2c21243de651b6d0d750aba50e
diff --git a/dev-db/phpmyadmin/files/postinstall-en-3.1.txt b/dev-db/phpmyadmin/files/postinstall-en-3.1.txt
deleted file mode 100644
index 4e72581..0000000
--- a/dev-db/phpmyadmin/files/postinstall-en-3.1.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-If this is a new installation:
-
-1. Configure ${PN}:
-
-a) Create config.inc.php. You can use the web-based installer
- (this requires the 'setup' USE flag to be enabled):
-
- mkdir ${MY_INSTALLDIR}/config
- chown ${VHOST_SERVER_UID}:${VHOST_SERVER_UID} ${MY_INSTALLDIR}/config
-
- then go to http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/setup/
-
- once you've saved the configuration:
-
- cp ${MY_INSTALLDIR}/config/config.inc.php ${MY_INSTALLDIR}/config.inc.php
- rm -rf ${MY_INSTALLDIR}/config
-
-b) Alternatively, use an existing configuration:
-
- cp <path to existing config.inc.php file> ${MY_INSTALLDIR}/
-
-c) Alternatively, use the sample config file:
-
- cp ${MY_INSTALLDIR}/config.sample.inc.php ${MY_INSTALLDIR}/config.inc.php
-
-2. Be sure that the libraries/ directory is not visible. You can use the
- provided .htaccess file.
-
-=================================================================
-
-If you are upgrading from an earlier version:
-
-1. If you are using ${PN}'s features for master/foreign tables, be sure to read
- http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/Documentation.html#col_com
-
- You will need to perform the ALTER TABLE step yourself.
diff --git a/dev-db/phpmyadmin/phpmyadmin-4.8.4.ebuild b/dev-db/phpmyadmin/phpmyadmin-4.8.4.ebuild
deleted file mode 100644
index 646226a..0000000
--- a/dev-db/phpmyadmin/phpmyadmin-4.8.4.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils webapp
-
-MY_PV=${PV/_/-}
-MY_PN="phpMyAdmin"
-MY_P="${MY_PN}-${MY_PV}-all-languages"
-
-DESCRIPTION="Web-based administration for MySQL database in PHP"
-HOMEPAGE="https://www.phpmyadmin.net/"
-SRC_URI="https://files.phpmyadmin.net/${MY_PN}/${MY_PV}/${MY_P}.tar.xz"
-
-LICENSE="GPL-2"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="setup"
-
-RDEPEND="
- dev-lang/php[ctype,filter,json,session,unicode]
- || (
- dev-lang/php[mysqli]
- dev-lang/php[mysql]
- )
- virtual/httpd-php:*
-"
-
-need_httpd_cgi
-
-S="${WORKDIR}"/${MY_P}
-
-pkg_setup() {
- webapp_pkg_setup
-}
-
-src_install() {
- webapp_src_preinst
-
- dodoc README RELEASE-DATE-${MY_PV} ChangeLog || die
- rm -f LICENSE README* RELEASE-DATE-${MY_PV}
-
- if ! use setup; then
- rm -rf setup || die "Cannot remove setup utility"
- elog "The phpMyAdmin setup utility has been removed."
- elog "It is a regular target of various exploits. If you need it, set USE=setup."
- else
- elog "You should consider disabling the setup USE flag"
- elog "to exclude the setup utility if you don't use it."
- elog "It regularly is the target of various exploits."
- fi
-
- insinto "${MY_HTDOCSDIR#${EPREFIX}}"
- doins -r .
-
- webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php
- webapp_serverowned "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php
-
- webapp_postinst_txt en "${FILESDIR}"/postinstall-en-3.1.txt
- webapp_src_install
-}
diff --git a/sys-process/vixie-cron/Manifest b/sys-process/vixie-cron/Manifest
new file mode 100644
index 0000000..9e580f4
--- /dev/null
+++ b/sys-process/vixie-cron/Manifest
@@ -0,0 +1,2 @@
+DIST vixie-cron-4.1-gentoo-r4.patch.bz2 4204 BLAKE2B 1e276ade20e61ae17e45c10145532e3f32dfa74e32b6cbecde22863de82afb280e97d3b380626451524cfc7fc0663934657509b228a51b3b5ad42e26e5cceb3d SHA512 eec8f89a97927a3557bd1350ed7e9baa0ec133e2c49f8f0fbf51adf62c377451dc48867ca6affcc7576833a5b6b749613c9b99641b1b658853f91d8071c3411b
+DIST vixie-cron-4.1.tar.bz2 54246 BLAKE2B 920bf5d95b24cd41677f4a748da02231ed75713ff280acafdf476ad0a71e73068bbad9070fc57d3b0cb39a9539da24182aa2dbc9eb9dfe241adaf9a46f9c5db2 SHA512 1db9a246243dbd4934438ce70bf022215ccffed4b899a77b076d5a7679a7b98a23ef67344e329fc7a836df90685581e10b1c95709db40601c33d2052ce561e04
diff --git a/sys-process/vixie-cron/files/crontab b/sys-process/vixie-cron/files/crontab
new file mode 100644
index 0000000..15622cb
--- /dev/null
+++ b/sys-process/vixie-cron/files/crontab
@@ -0,0 +1,15 @@
+# for vixie cron
+#
+
+# Global variables
+SHELL=/bin/bash
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+MAILTO=root
+HOME=/
+
+# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
+*/15 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons
+0 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
+0 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily
+15 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
+30 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
diff --git a/sys-process/vixie-cron/files/crontab-3.0.1-r4 b/sys-process/vixie-cron/files/crontab-3.0.1-r4
new file mode 100644
index 0000000..d1720d4
--- /dev/null
+++ b/sys-process/vixie-cron/files/crontab-3.0.1-r4
@@ -0,0 +1,14 @@
+# for vixie cron
+
+# Global variables
+SHELL=/bin/bash
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+MAILTO=root
+HOME=/
+
+# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
+59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
+9 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily
+19 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
+29 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
+*/10 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons
diff --git a/sys-process/vixie-cron/files/crontab.5.diff b/sys-process/vixie-cron/files/crontab.5.diff
new file mode 100644
index 0000000..f50db3d
--- /dev/null
+++ b/sys-process/vixie-cron/files/crontab.5.diff
@@ -0,0 +1,35 @@
+--- crontab.5.orig 2004-02-19 20:40:04.954132624 +0000
++++ crontab.5 2004-02-19 20:45:27.033169168 +0000
+@@ -153,6 +153,32 @@
+ ``30 4 1,15 * 5''
+ would cause a command to be run at 4:30 am on the 1st and 15th of each
+ month, plus every Friday.
++.PP
++Instead of the first five fields, one of eight special strings may
++appear:
++.IP
++.ta 1.5i
++string meaning
++.br
++------ -------
++.br
++@reboot Run once, at startup.
++.br
++@yearly Run once a year, "0 0 1 1 *".
++.br
++@annually (same as @yearly)
++.br
++@monthly Run once a month, "0 0 1 * *".
++.br
++@weekly Run once a week, "0 0 * * 0".
++.br
++@daily Run once a day, "0 0 * * *".
++.br
++@midnight (same as @daily)
++.br
++@hourly Run once an hour, "0 * * * *".
++.br
++.fi
+ .SH EXAMPLE CRON FILE
+ .nf
+
diff --git a/sys-process/vixie-cron/files/pamd.compatible b/sys-process/vixie-cron/files/pamd.compatible
new file mode 100644
index 0000000..62eb029
--- /dev/null
+++ b/sys-process/vixie-cron/files/pamd.compatible
@@ -0,0 +1,7 @@
+#%PAM-1.0
+
+account required pam_unix.so
+
+auth required pam_unix.so
+
+session optional pam_limits.so
diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-basename.diff b/sys-process/vixie-cron/files/vixie-cron-4.1-basename.diff
new file mode 100644
index 0000000..c7930dd
--- /dev/null
+++ b/sys-process/vixie-cron/files/vixie-cron-4.1-basename.diff
@@ -0,0 +1,20 @@
+diff --exclude='*~' -urN vixie-cron-4.1.orig/cron.c vixie-cron-4.1/cron.c
+--- vixie-cron-4.1.orig/cron.c 2005-02-23 02:05:30.730975808 -0500
++++ vixie-cron-4.1/cron.c 2005-02-23 02:07:13.233393072 -0500
+@@ -25,6 +25,7 @@
+
+ #define MAIN_PROGRAM
+
++#include <libgen.h>
+ #include "cron.h"
+
+ enum timejump { negative, small, medium, large };
+@@ -61,7 +62,7 @@
+ cron_db database;
+ int fd;
+
+- ProgramName = argv[0];
++ ProgramName = basename(argv[0]);
+
+ setlocale(LC_ALL, "");
+
diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-commandline.patch b/sys-process/vixie-cron/files/vixie-cron-4.1-commandline.patch
new file mode 100644
index 0000000..d204ad8
--- /dev/null
+++ b/sys-process/vixie-cron/files/vixie-cron-4.1-commandline.patch
@@ -0,0 +1,13 @@
+--- entry.c.orig 2004-08-27 20:09:34.000000000 +0200
++++ entry.c 2004-12-01 22:16:10.992268200 +0100
+@@ -336,7 +336,9 @@
+
+ /* If the first character of the command is '-' it is a cron option.
+ */
+- while ((ch = get_char(file)) == '-') {
++ ch = get_char(file);
++ Skip_Blanks(ch, file)
++ while (ch == '-') {
+ switch (ch = get_char(file)) {
+ case 'q':
+ e->flags |= DONT_LOG;
diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-cron.deny b/sys-process/vixie-cron/files/vixie-cron-4.1-cron.deny
new file mode 100644
index 0000000..f703d58
--- /dev/null
+++ b/sys-process/vixie-cron/files/vixie-cron-4.1-cron.deny
@@ -0,0 +1,4 @@
+# If for any reason you have users in the 'cron' group who should not
+# be allowed to run crontab, add them to this file (one username per
+# line)
+
diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-crontabrace.patch b/sys-process/vixie-cron/files/vixie-cron-4.1-crontabrace.patch
new file mode 100644
index 0000000..5109554
--- /dev/null
+++ b/sys-process/vixie-cron/files/vixie-cron-4.1-crontabrace.patch
@@ -0,0 +1,29 @@
+--- vixie-cron-4.1/crontab.c
++++ vixie-cron-4.1/crontab.c
+@@ -314,8 +314,6 @@
+ perror("fstat");
+ goto fatal;
+ }
+- utimebuf.actime = statbuf.st_atime;
+- utimebuf.modtime = statbuf.st_mtime;
+
+ /* Turn off signals. */
+ (void)signal(SIGHUP, SIG_IGN);
+@@ -374,6 +372,17 @@
+ perror(Filename);
+ exit(ERROR_EXIT);
+ }
++ if (swap_uids() < OK) {
++ perror("swapping uids");
++ exit(ERROR_EXIT);
++ }
++ utimebuf.actime = statbuf.st_atime;
++ utimebuf.modtime = statbuf.st_mtime;
++ utime(Filename, &utimebuf);
++ if (swap_uids_back() < OK) {
++ perror("swapping uids back");
++ exit(ERROR_EXIT);
++ }
+ utime(Filename, &utimebuf);
+ again:
+ rewind(NewCrontab);
diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-hardlink.patch b/sys-process/vixie-cron/files/vixie-cron-4.1-hardlink.patch
new file mode 100644
index 0000000..cabdef0
--- /dev/null
+++ b/sys-process/vixie-cron/files/vixie-cron-4.1-hardlink.patch
@@ -0,0 +1,11 @@
+--- database.c.orig 2007-04-08 21:06:16.913019387 +0200
++++ database.c 2007-04-08 21:06:29.489736093 +0200
+@@ -251,7 +251,7 @@
+ log_it(fname, getpid(), "WRONG FILE OWNER", tabname);
+ goto next_crontab;
+ }
+- if (statbuf->st_nlink != 1) {
++ if (statbuf->st_nlink != 1 && pw != NULL) {
+ log_it(fname, getpid(), "BAD LINK COUNT", tabname);
+ goto next_crontab;
+ }
diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-pam.patch b/sys-process/vixie-cron/files/vixie-cron-4.1-pam.patch
new file mode 100644
index 0000000..64bf671
--- /dev/null
+++ b/sys-process/vixie-cron/files/vixie-cron-4.1-pam.patch
@@ -0,0 +1,67 @@
+--- vixie-cron-3.0.1.orig/Makefile Thu May 30 19:47:00 2002
++++ vixie-cron-3.0.1/Makefile Thu May 30 20:54:46 2002
+@@ -55,7 +55,7 @@
+ INCLUDE = -I.
+ #INCLUDE =
+ #<<need getopt()>>
+-LIBS =
++LIBS = -lpam
+ #<<optimize or debug?>>
+ OPTIM = $(RPM_OPT_FLAGS)
+ #OPTIM = -g
+--- vixie-cron-3.0.1.orig/do_command.c Thu May 30 19:47:00 2002
++++ vixie-cron-3.0.1/do_command.c Thu May 30 20:55:50 2002
+@@ -25,6 +25,18 @@
+
+ #include "cron.h"
+
++#include <security/pam_appl.h>
++static pam_handle_t *pamh = NULL;
++static const struct pam_conv conv = {
++ NULL
++};
++#define PAM_FAIL_CHECK if (retcode != PAM_SUCCESS) { \
++ fprintf(stderr,"\n%s\n",pam_strerror(pamh, retcode)); \
++ syslog(LOG_ERR,"%s",pam_strerror(pamh, retcode)); \
++ pam_end(pamh, retcode); exit(1); \
++ }
++
++
+ static void child_process(entry *, user *);
+ static int safe_p(const char *, const char *);
+
+@@ -65,6 +77,7 @@
+ int stdin_pipe[2], stdout_pipe[2];
+ char *input_data, *usernm, *mailto;
+ int children = 0;
++ int retcode = 0;
+
+ Debug(DPROC, ("[%ld] child_process('%s')\n", (long)getpid(), e->cmd))
+
+@@ -134,6 +147,16 @@
+ *p = '\0';
+ }
+
++
++ retcode = pam_start("cron", usernm, &conv, &pamh);
++ PAM_FAIL_CHECK;
++ retcode = pam_acct_mgmt(pamh, PAM_SILENT);
++ PAM_FAIL_CHECK;
++ retcode = pam_open_session(pamh, PAM_SILENT);
++ PAM_FAIL_CHECK;
++ retcode = pam_setcred(pamh, PAM_ESTABLISH_CRED | PAM_SILENT);
++ PAM_FAIL_CHECK;
++
+ /* fork again, this time so we can exec the user's command.
+ */
+ switch (vfork()) {
+@@ -507,6 +530,9 @@
+ Debug(DPROC, (", dumped core"))
+ Debug(DPROC, ("\n"))
+ }
++ pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT);
++ retcode = pam_close_session(pamh, PAM_SILENT);
++ pam_end(pamh, retcode);
+ }
+
+ static int
diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-selinux-2.patch b/sys-process/vixie-cron/files/vixie-cron-4.1-selinux-2.patch
new file mode 100644
index 0000000..2341d09
--- /dev/null
+++ b/sys-process/vixie-cron/files/vixie-cron-4.1-selinux-2.patch
@@ -0,0 +1,225 @@
+diff -ur vixie-cron-4.1/Makefile vixie-cron-4.1-selinux/Makefile
+--- vixie-cron-4.1/Makefile 2004-08-28 02:09:33.000000000 +0800
++++ vixie-cron-4.1-selinux/Makefile 2017-04-26 22:16:53.321394815 +0800
+@@ -68,7 +68,8 @@
+ #<<want to use a nonstandard CC?>>
+ CC = gcc -Wall -Wno-unused -Wno-comment
+ #<<manifest defines>>
+-DEFS =
++DEFS = -s -DWITH_SELINUX
++LIBS += -lselinux
+ #(SGI IRIX systems need this)
+ #DEFS = -D_BSD_SIGNALS -Dconst=
+ #<<the name of the BSD-like install program>>
+diff -ur vixie-cron-4.1/database.c vixie-cron-4.1-selinux/database.c
+--- vixie-cron-4.1/database.c 2004-08-28 02:09:34.000000000 +0800
++++ vixie-cron-4.1-selinux/database.c 2017-04-27 01:31:34.757942605 +0800
+@@ -28,6 +28,15 @@
+
+ #include "cron.h"
+
++#ifdef WITH_SELINUX
++#include <selinux/selinux.h>
++#include <selinux/context.h>
++#include <selinux/get_context_list.h>
++#define SYSUSERNAME "system_u"
++#else
++#define SYSUSERNAME "*system*"
++#endif
++
+ #define TMAX(a,b) ((a)>(b)?(a):(b))
+
+ static void process_crontab(const char *, const char *,
+@@ -183,7 +192,7 @@
+ if (fname == NULL) {
+ /* must be set to something for logging purposes.
+ */
+- fname = "*system*";
++ fname = SYSUSERNAME;
+ } else if ((pw = getpwnam(uname)) == NULL) {
+ /* file doesn't have a user in passwd file.
+ */
+@@ -245,6 +254,117 @@
+ free_user(u);
+ log_it(fname, getpid(), "RELOAD", tabname);
+ }
++#ifdef WITH_SELINUX
++ if (is_selinux_enabled()) {
++ security_context_t file_context=NULL;
++ security_context_t user_context=NULL;
++ context_t current_context = NULL;
++ char *current_context_str = NULL;
++ struct av_decision avd;
++ int retval=0;
++ char *seuser=NULL;
++ char *level=NULL;
++ int sys_user = 0;
++
++ sys_user = strcmp(SYSUSERNAME, fname);
++
++ if (fgetfilecon(crontab_fd, &file_context) < OK) {
++ log_it(fname, getpid(), "getfilecon FAILED", tabname);
++ goto next_crontab;
++ }
++
++ if (sys_user != 0) {
++ if (getseuserbyname(fname, &seuser, &level) < 0) {
++ log_it(fname, getpid(), "NO SEUSER", tabname);
++ goto next_crontab;
++ }
++ } else {
++ if (getcon(&current_context_str) < 0) {
++ log_it(fname, getpid(), "getcon FAILED", tabname);
++ goto next_crontab;
++ }
++
++ current_context = context_new(current_context_str);
++ if (current_context == 0) {
++ log_it(fname, getpid(), "context new FAILED", tabname);
++ freecon(current_context_str);
++ goto next_crontab;
++ }
++
++ seuser = context_user_get(current_context);
++ level = context_range_get(current_context);
++ }
++
++ if (get_default_context_with_level(seuser, level, NULL, &user_context) < 0) {
++ log_it(fname, getpid(), "NO CONTEXT", tabname);
++ freecon(file_context);
++ if (sys_user != 0) {
++ free(seuser);
++ free(level);
++ }
++ freecon(current_context_str);
++ context_free(current_context);
++ goto next_crontab;
++ }
++
++ /*
++ * Since crontab files are not directly executed,
++ * crond must ensure that the crontab file has
++ * a context that is appropriate for the context of
++ * the user cron job. It performs an entrypoint
++ * permission check for this purpose.
++ */
++ security_class_t file_class;
++ access_vector_t entrypoint_bit;
++ file_class = string_to_security_class("file");
++ if (file_class == 0) {
++ log_it(fname, getpid(), "file CLASS NOT DEFINED", tabname);
++ freecon(current_context_str);
++ context_free(current_context);
++ freecon(user_context);
++ freecon(file_context);
++ if (sys_user != 0) {
++ free(seuser);
++ free(level);
++ }
++ goto next_crontab;
++ }
++
++ entrypoint_bit = string_to_av_perm(file_class, "entrypoint");
++ if (entrypoint_bit == 0) {
++ log_it(fname, getpid(), "file:entrypoint AV NOT DEFINED", tabname);
++ freecon(current_context_str);
++ context_free(current_context);
++ freecon(user_context);
++ freecon(file_context);
++ if (sys_user != 0) {
++ free(seuser);
++ free(level);
++ }
++ goto next_crontab;
++ }
++
++ retval = security_compute_av_raw(user_context,
++ file_context,
++ file_class,
++ entrypoint_bit,
++ &avd);
++
++ freecon(user_context);
++ freecon(file_context);
++ if (sys_user != 0) {
++ free(seuser);
++ free(level);
++ }
++ context_free(current_context);
++ freecon(current_context_str);
++
++ if (retval || ((entrypoint_bit & avd.allowed) != entrypoint_bit)) {
++ log_it(fname, getpid(), "ENTRYPOINT FAILED", tabname);
++ goto next_crontab;
++ }
++ }
++#endif
+ u = load_user(crontab_fd, pw, fname);
+ if (u != NULL) {
+ u->mtime = statbuf->st_mtime;
+diff -ur vixie-cron-4.1/do_command.c vixie-cron-4.1-selinux/do_command.c
+--- vixie-cron-4.1/do_command.c 2004-08-28 02:09:34.000000000 +0800
++++ vixie-cron-4.1-selinux/do_command.c 2017-04-27 01:30:49.045144698 +0800
+@@ -25,6 +25,12 @@
+
+ #include "cron.h"
+
++#ifdef WITH_SELINUX
++#include <selinux/selinux.h>
++#include <selinux/context.h>
++#include <selinux/get_context_list.h>
++#endif
++
+ static void child_process(entry *, user *);
+ static int safe_p(const char *, const char *);
+
+@@ -265,6 +271,49 @@
+ _exit(OK_EXIT);
+ }
+ # endif /*DEBUGGING*/
++#ifdef WITH_SELINUX
++ if (is_selinux_enabled()) {
++ char *seuser = NULL;
++ char *level = NULL;
++ char *current_context_str = NULL;
++ security_context_t scontext;
++ context_t current_context = NULL;
++
++ if (strcmp("system_u", u->name) != 0) {
++ if (getseuserbyname(u->name, &seuser, &level) < 0) {
++ fprintf(stderr, "getseuserbyname: Could not determine seuser for user %s\n", u->name);
++ _exit(ERROR_EXIT);
++ }
++ } else {
++ if (getcon(&current_context_str) < 0) {
++ fprintf(stderr, "getcon FAILED\n");
++ _exit(ERROR_EXIT);
++ }
++
++ current_context = context_new(current_context_str);
++ if (current_context == NULL) {
++ fprintf(stderr, "failed to create new context: %s\n", current_context_str);
++ freecon(current_context_str);
++ _exit(ERROR_EXIT);
++ }
++
++ seuser = context_user_get(current_context);
++ }
++
++ if (get_default_context_with_level(seuser, level, NULL, &scontext) < 0) {
++ fprintf(stderr, "get_default_context_with_level: could not get security context for user %s, seuser %s\n", u->name, seuser);
++ _exit(ERROR_EXIT);
++ }
++
++ if (setexeccon(scontext) < 0) {
++ fprintf(stderr, "setexeccon: Could not set exec context to %s for user %s\n", scontext, u->name);
++ _exit(ERROR_EXIT);
++ }
++ free(seuser);
++ free(level);
++ freecon(scontext);
++ }
++#endif
+ execle(shell, shell, "-c", e->cmd, (char *)0, e->envp);
+ fprintf(stderr, "execl: couldn't exec `%s'\n", shell);
+ perror("execl");
diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-setuid_check.patch b/sys-process/vixie-cron/files/vixie-cron-4.1-setuid_check.patch
new file mode 100644
index 0000000..42fd8e1
--- /dev/null
+++ b/sys-process/vixie-cron/files/vixie-cron-4.1-setuid_check.patch
@@ -0,0 +1,29 @@
+--- vixie-cron-4.1/do_command.c 2006-05-25 16:44:26.000000000 +0400
++++ vixie-cron-4.1.lk/do_command.c 2006-05-25 16:42:25.000000000 +0400
+@@ -240,12 +240,23 @@
+ }
+ }
+ #else
+- setgid(e->pwd->pw_gid);
++
+ initgroups(usernm, e->pwd->pw_gid);
+ #if (defined(BSD)) && (BSD >= 199103)
+ setlogin(usernm);
+ #endif /* BSD */
+- setuid(e->pwd->pw_uid); /* we aren't root after this... */
++ // setuid(e->pwd->pw_uid); /* we aren't root after this... */
++
++ if ( setgid(e->pwd->pw_gid) == -1 ) {
++ fprintf(stderr,"can't set gid for %s\n", e->pwd->pw_name);
++ _exit(1);
++ }
++
++ if ( setuid(e->pwd->pw_uid) == -1 ) {
++ fprintf(stderr,"can't set uid for %s\n", e->pwd->pw_name);
++ _exit(1);
++ }
++
+
+ #endif /* LOGIN_CAP */
+ chdir(env_get("HOME", e->envp));
+
diff --git a/sys-process/vixie-cron/files/vixie-cron.rc7 b/sys-process/vixie-cron/files/vixie-cron.rc7
new file mode 100644
index 0000000..0bb47f4
--- /dev/null
+++ b/sys-process/vixie-cron/files/vixie-cron.rc7
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/sbin/cron
+pidfile=/var/run/cron.pid
+
+depend() {
+ use clock logger
+ need localmount
+ provide cron
+}
diff --git a/sys-process/vixie-cron/files/vixie-cron.service b/sys-process/vixie-cron/files/vixie-cron.service
new file mode 100644
index 0000000..66c3862
--- /dev/null
+++ b/sys-process/vixie-cron/files/vixie-cron.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Vixie Cron Daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/cron
+ExecStop=/bin/kill -TERM $MAINPID
+IgnoreSIGPIPE=false
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-process/vixie-cron/metadata.xml b/sys-process/vixie-cron/metadata.xml
new file mode 100644
index 0000000..7a38bb9
--- /dev/null
+++ b/sys-process/vixie-cron/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/sys-process/vixie-cron/vixie-cron-4.1-r15.ebuild b/sys-process/vixie-cron/vixie-cron-4.1-r15.ebuild
new file mode 100644
index 0000000..5b0ba4e
--- /dev/null
+++ b/sys-process/vixie-cron/vixie-cron-4.1-r15.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+inherit cron toolchain-funcs pam eutils flag-o-matic user systemd
+
+# no useful homepage, bug #65898
+HOMEPAGE="ftp://ftp.isc.org/isc/cron/"
+DESCRIPTION="Paul Vixie's cron daemon, a fully featured crond implementation"
+
+SELINUX_PATCH="${P}-selinux-2.patch"
+GENTOO_PATCH_REV="r4"
+
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ mirror://gentoo/${P}-gentoo-${GENTOO_PATCH_REV}.patch.bz2"
+
+LICENSE="ISC BSD-2 BSD"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="selinux pam debug"
+
+DEPEND="selinux? ( sys-libs/libselinux )
+ pam? ( virtual/pam )"
+
+RDEPEND="selinux? ( sys-libs/libselinux )
+ pam? ( virtual/pam )"
+
+#vixie-cron supports /etc/crontab
+CRON_SYSTEM_CRONTAB="yes"
+
+pkg_setup() {
+ enewgroup crontab
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${WORKDIR}"/${P}-gentoo-${GENTOO_PATCH_REV}.patch
+ epatch "${FILESDIR}"/crontab.5.diff
+ epatch "${FILESDIR}"/${P}-commandline.patch
+ epatch "${FILESDIR}"/${P}-basename.diff
+ epatch "${FILESDIR}"/${P}-setuid_check.patch
+ epatch "${FILESDIR}"/${P}-hardlink.patch
+ epatch "${FILESDIR}"/${P}-crontabrace.patch
+ use pam && epatch "${FILESDIR}"/${P}-pam.patch
+ use selinux && epatch "${FILESDIR}"/${SELINUX_PATCH}
+}
+
+src_compile() {
+ use debug && append-flags -DDEBUGGING
+
+ sed -i -e "s:gcc \(-Wall.*\):$(tc-getCC) \1 ${CFLAGS}:" \
+ -e "s:^\(LDFLAGS[ \t]\+=\).*:\1 ${LDFLAGS}:" Makefile \
+ || die "sed Makefile failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ docrondir -m 1730 -o root -g crontab
+ docron
+ docrontab -m 2755 -o root -g crontab
+
+ # /etc stuff
+ insinto /etc
+ newins "${FILESDIR}"/crontab-3.0.1-r4 crontab
+ newins "${FILESDIR}"/${P}-cron.deny cron.deny
+
+ keepdir /etc/cron.d
+ newpamd "${FILESDIR}"/pamd.compatible cron
+ newinitd "${FILESDIR}"/vixie-cron.rc7 vixie-cron
+
+ # doc stuff
+ doman crontab.1 crontab.5 cron.8
+ dodoc "${FILESDIR}"/crontab
+ dodoc CHANGES CONVERSION FEATURES MAIL README THANKS
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_preinst() {
+ has_version "<${CATEGORY}/${PN}-4.1-r10"
+ fix_spool_dir_perms=$?
+}
+
+pkg_postinst() {
+ if [[ -f ${ROOT}/etc/init.d/vcron ]]
+ then
+ ewarn "Please run:"
+ ewarn "rc-update del vcron"
+ ewarn "rc-update add vixie-cron default"
+ fi
+
+ # bug 71326
+ if [[ -u ${ROOT}/etc/pam.d/cron ]] ; then
+ echo
+ ewarn "Warning: previous ebuilds didn't reset permissions prior"
+ ewarn "to installing crontab, resulting in /etc/pam.d/cron being"
+ ewarn "installed with the SUID and executable bits set."
+ ewarn
+ ewarn "Run the following as root to set the proper permissions:"
+ ewarn " chmod 0644 /etc/pam.d/cron"
+ echo
+ fi
+
+ # bug 164466
+ if [[ $fix_spool_dir_perms = 0 ]] ; then
+ echo
+ ewarn "Previous ebuilds didn't correctly set permissions on"
+ ewarn "the crontabs spool directory. Proper permissions are"
+ ewarn "now being set on ${ROOT}var/spool/cron/crontabs/"
+ ewarn "Look at this directory if you have a specific configuration"
+ ewarn "that needs special ownerships or permissions."
+ echo
+ chmod 1730 "${ROOT}/var/spool/cron/crontabs" || die "chmod failed"
+ chgrp -R crontab "${ROOT}/var/spool/cron/crontabs" || die "chgrp failed"
+ cd "${ROOT}/var/spool/cron/crontabs/"
+ for cronfile in * ; do
+ [[ ! -f $cronfile ]] || chown "$cronfile:crontab" "$cronfile" \
+ || ewarn "chown failed on $cronfile, you probably have an orphan file."
+ done
+ fi
+
+ cron_pkg_postinst
+}
diff --git a/www-apps/mediawiki/Manifest b/www-apps/mediawiki/Manifest
index 98d0394..ff751f0 100644
--- a/www-apps/mediawiki/Manifest
+++ b/www-apps/mediawiki/Manifest
@@ -1,5 +1,5 @@
AUX postinstall-1.18-en.txt 2611 BLAKE2B c4d110d0d7c3fc270b0dc7f134cf7de8f2ca4595692ac146c2e4cd1c3647e7399d44249059496960ae94490c5b188c986dab64d4b90901bd7fc44203493532a0 SHA512 2b6a0e00160c15466bf70189499816d18a5ea06f040ed79f2361842be93a584ea19033170dc59c1d78c590da85223a61b8d04730084e60bc7906648f2532578b
AUX postupgrade-1.16-en.txt 1514 BLAKE2B f2a7284a49638a2e1ca694a84b490f4a3348cab1afe1b022f617fc7df74c958be29e36e3c777514765b7a01758f11cfb653092e2190a5e7dc572884f5942196c SHA512 58d11cdf8daaa2ee62ca64dfeddad3ef2d10feac5b93b51f96e5802dd2915c3d969b8e99d059e79a9b62386ae70a7690db3c4e4d248501e839769bc7f24d2dd5
-DIST mediawiki-1.30.0.tar.gz 42680041 BLAKE2B 639e692acce6560b4be1c114b33c673b9ddaec3280a53ddf055a68c8aff2238051821a887d1e5d46af6784be16e1c69547ab09a249be52c7ada829e85e2d0566 SHA512 ec4aeb08c18af0e52aaf99124d43cd357328221934d593d87f38da804a2f4a5b172a114659f87f6de58c2140ee05ae14ec6a270574f655e7780a950a51178643
-EBUILD mediawiki-1.30.0.ebuild 2364 BLAKE2B 5026e3364ae048e973a6f11d898ae52831e541f3b682420bc41c4936504ec778826a1f5be34546bc2c9aa97a84c4a39a32fa571a5b73db1a2618679fdfe6bbdc SHA512 0adfcc39cfcb96f80e33d3d428e3d2cd243a36caf51a4505aed59456fde85c677b38252a383eff32d0d5946b19cd7a57516e0691961aaeab2fdcce701f204056
+DIST mediawiki-1.33.1.tar.gz 37863816 BLAKE2B 2f4ce62c3b46738d31af9fcfde61a9521a0bb838c035ef539f4263e61b7fe5db59597a3142a6f942fabaad1bb97c7058a21df654588e6a60023fa5fad5e4d88d SHA512 0cf786872714546fb13843bc5f8b851bfcc665f7459a0326a3fb77efb0d1976b618d4e2206d3fb0852a60b7fa375e98aa0b5600b03209ce9eabd9e3dc5db7d1a
+EBUILD mediawiki-1.33.1.ebuild 2364 BLAKE2B 5026e3364ae048e973a6f11d898ae52831e541f3b682420bc41c4936504ec778826a1f5be34546bc2c9aa97a84c4a39a32fa571a5b73db1a2618679fdfe6bbdc SHA512 0adfcc39cfcb96f80e33d3d428e3d2cd243a36caf51a4505aed59456fde85c677b38252a383eff32d0d5946b19cd7a57516e0691961aaeab2fdcce701f204056
MISC metadata.xml 246 BLAKE2B 6bdcea4d16a06756a1ab24fb076af6d88134c134f9239e658b7e5facb8cf6ed2f30d98938fd92bc8a3690e54273fd7f72420ccab04e7a6f7319e257a9f9ed618 SHA512 1181711d3b020b2ca7beae0a539a9b7f1abe70962cd8561900e5f06e14c9c871c61ca6088fb674de19ef3b844a1b3c29cf0f84f638b2d0cb7c030f60cd1d42ed
diff --git a/www-apps/mediawiki/mediawiki-1.30.0.ebuild b/www-apps/mediawiki/mediawiki-1.33.1.ebuild
index ce9c6e2..ce9c6e2 100644
--- a/www-apps/mediawiki/mediawiki-1.30.0.ebuild
+++ b/www-apps/mediawiki/mediawiki-1.33.1.ebuild