diff options
author | Brian Evans <grknight@gentoo.org> | 2016-09-14 09:37:33 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2016-09-14 09:37:33 -0400 |
commit | 19488c726460a55eb7b134687ac71fe6e9db77db (patch) | |
tree | 93fe982c43b72d5996064ff04921c6739a25269e /dev-db/mysql-init-scripts | |
parent | dev-lang/php: Stable for PPC64 (bug #591710). (diff) | |
download | gentoo-19488c726460a55eb7b134687ac71fe6e9db77db.tar.gz gentoo-19488c726460a55eb7b134687ac71fe6e9db77db.tar.bz2 gentoo-19488c726460a55eb7b134687ac71fe6e9db77db.zip |
dev-db/mysql-init-scripts: Drop old versions
These use mysqld_safe in the mysqld.service which is unnecessary
and vulernable to attacks wrt CVE-2016-6662
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-db/mysql-init-scripts')
4 files changed, 0 insertions, 178 deletions
diff --git a/dev-db/mysql-init-scripts/files/mysqld.service b/dev-db/mysql-init-scripts/files/mysqld.service deleted file mode 100644 index de9ea2f1ec31..000000000000 --- a/dev-db/mysql-init-scripts/files/mysqld.service +++ /dev/null @@ -1,26 +0,0 @@ -[Unit] -Description=MySQL database server -After=syslog.target -After=network.target - -[Service] -Type=simple -User=mysql -Group=mysql - -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# https://bugzilla.redhat.com/show_bug.cgi?id=547485 -ExecStart=/usr/bin/mysqld_safe --basedir=/usr -ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# We rely on systemd, not mysqld_safe, to restart mysqld if it dies -Restart=always - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/dev-db/mysql-init-scripts/files/mysqld_at.service b/dev-db/mysql-init-scripts/files/mysqld_at.service deleted file mode 100644 index f46cf9e3ebf0..000000000000 --- a/dev-db/mysql-init-scripts/files/mysqld_at.service +++ /dev/null @@ -1,26 +0,0 @@ -[Unit] -Description=MySQL database server -ConditionPathExists=/etc/mysql/my%I.cnf -After=network.target - -[Service] -Type=simple -User=mysql -Group=mysql - -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# https://bugzilla.redhat.com/show_bug.cgi?id=547485 -ExecStart=/usr/bin/mysqld_safe --defaults-file=/etc/mysql/my%I.cnf --basedir=/usr -ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# We rely on systemd, not mysqld_safe, to restart mysqld if it dies -Restart=always - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.0-r1.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.0-r1.ebuild deleted file mode 100644 index d624ff9b6f2d..000000000000 --- a/dev-db/mysql-init-scripts/mysql-init-scripts-2.0-r1.ebuild +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit systemd - -DESCRIPTION="Gentoo MySQL init scripts" -HOMEPAGE="https://www.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd" -IUSE="" - -DEPEND="" -# This _will_ break with MySQL 5.0, 4.x, 3.x -# It also NEEDS openrc for the save_options/get_options builtins. -RDEPEND="!<dev-db/mysql-5.1" -# Need to set S due to PMS saying we need it existing, but no SRC_URI -S=${WORKDIR} - -src_install() { - newconfd "${FILESDIR}/conf.d-${PV}" "mysql" - newinitd "${FILESDIR}/init.d-${PV}" "mysql" - - # systemd unit installation - exeinto /usr/libexec - doexe "${FILESDIR}"/mysqld-wait-ready - systemd_dounit "${FILESDIR}/mysqld.service" - systemd_newunit "${FILESDIR}/mysqld_at.service" "mysqld@.service" - systemd_dotmpfilesd "${FILESDIR}/mysql.conf" - - insinto /etc/logrotate.d - newins "${FILESDIR}/logrotate.mysql" "mysql" -} - -pkg_postinst() { - grep -sq mysql_slot "${ROOT}"/etc/conf.d/mysql - old_conf_present=$? - grep -sq get_slot_config "${ROOT}"/etc/init.d/mysql - old_init_present=$? - - egrep -sq 'MY_CNF|MY_ARGS|(STARTUP|STOP)_TIMEOUT' "${ROOT}"/etc/conf.d/mysql - new_conf_present=$? - egrep -sq 'MY_ARGS|STOP_TIMEOUT' "${ROOT}"/etc/init.d/mysql - new_init_present=$? - - einfo "Please note that if you are using multiple internal 'slots' in the" - einfo "old conf.d file, you should use multiple init files now." - echo old $old_conf_present $old_init_present - echo new $new_conf_present $new_init_present - - # new scripts present - if [ $new_conf_present -eq 0 -a $new_init_present -eq 0 -a \ - $old_conf_present -eq 1 -a $old_init_present -eq 1 ]; then - : - elif [ $old_conf_present -eq 0 -a $old_init_present -eq 0 -a \ - $new_conf_present -eq 1 -a $new_init_present -eq 1 ]; then - ewarn "Old /etc/init.d/mysql and /etc/conf.d/mysql still present!" - ewarn "Update both of those files to the new versions!" - else - eerror "DANGER, mixed update of /etc/init.d/mysql and /etc/conf.d/mysql" - eerror "detected! You must update BOTH to the new versions" - fi -} diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild deleted file mode 100644 index 591720c68757..000000000000 --- a/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit systemd s6 - -DESCRIPTION="Gentoo MySQL init scripts." -HOMEPAGE="https://www.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" -IUSE="" - -DEPEND="" -# This _will_ break with MySQL 5.0, 4.x, 3.x -# It also NEEDS openrc for the save_options/get_options builtins. -# The s6 support was added after openrc 0.16.2 -RDEPEND=" - !<dev-db/mysql-5.1 - !<sys-apps/openrc-0.16.2 - " -# Need to set S due to PMS saying we need it existing, but no SRC_URI -S=${WORKDIR} - -src_install() { - newconfd "${FILESDIR}/conf.d-2.0" "mysql" - - # s6 init scripts - if use amd64 || use x86 ; then - newconfd "${FILESDIR}/conf.d-2.0" "mysql-s6" - newinitd "${FILESDIR}/init.d-s6" "mysql-s6" - s6_install_service mysql "${FILESDIR}/run-s6" - s6_install_service mysql/log "${FILESDIR}/log-s6" - fi - - newinitd "${FILESDIR}/init.d-2.0" "mysql" - - # systemd unit installation - exeinto /usr/libexec - doexe "${FILESDIR}"/mysqld-wait-ready - systemd_dounit "${FILESDIR}/mysqld.service" - systemd_newunit "${FILESDIR}/mysqld_at.service" "mysqld@.service" - systemd_dotmpfilesd "${FILESDIR}/mysql.conf" - - insinto /etc/logrotate.d - newins "${FILESDIR}/logrotate.mysql" "mysql" -} - -pkg_postinst() { - if use amd64 || use x86 ; then - elog "To use the mysql-s6 script, you need to install the optional sys-apps/s6 package." - elog "If you wish to use s6 logging support, comment out the log-error setting in your my.cnf" - fi -} |