diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-09-19 08:46:45 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-09-19 08:46:45 +0000 |
commit | b6bc645aaf03466c279eaca517835443c1efb611 (patch) | |
tree | 414b5cf41cf0e141174c58dde9ef635d660cd08f /dev-db | |
parent | Version bump. Removed old (diff) | |
download | historical-b6bc645aaf03466c279eaca517835443c1efb611.tar.gz historical-b6bc645aaf03466c279eaca517835443c1efb611.tar.bz2 historical-b6bc645aaf03466c279eaca517835443c1efb611.zip |
Kill the pointless & unsafe automatic database creation wrt bug #483526.
Package-Manager: portage-2.2.6/cvs/Linux x86_64
Manifest-Sign-Key: 0xEFB4464E!
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/mysql-init-scripts/ChangeLog | 10 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/Manifest | 29 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/files/mysqld-prepare-db-dir | 83 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/files/mysqld.service | 1 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/files/mysqld_at.service | 1 | ||||
-rw-r--r-- | dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r5.ebuild (renamed from dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r4.ebuild) | 4 |
6 files changed, 31 insertions, 97 deletions
diff --git a/dev-db/mysql-init-scripts/ChangeLog b/dev-db/mysql-init-scripts/ChangeLog index 3600061de8df..9f4784850d09 100644 --- a/dev-db/mysql-init-scripts/ChangeLog +++ b/dev-db/mysql-init-scripts/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-db/mysql-init-scripts # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/ChangeLog,v 1.28 2013/09/03 18:49:48 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/ChangeLog,v 1.29 2013/09/19 08:46:40 mgorny Exp $ + +*mysql-init-scripts-2.0_pre1-r5 (19 Sep 2013) + + 19 Sep 2013; Michał Górny <mgorny@gentoo.org> + +mysql-init-scripts-2.0_pre1-r5.ebuild, -files/mysqld-prepare-db-dir, + -mysql-init-scripts-2.0_pre1-r4.ebuild, files/mysqld.service, + files/mysqld_at.service: + Kill the pointless & unsafe automatic database creation wrt bug #483526. *mysql-init-scripts-2.0_pre1-r4 (03 Sep 2013) diff --git a/dev-db/mysql-init-scripts/Manifest b/dev-db/mysql-init-scripts/Manifest index 225ade939403..deae839e6002 100644 --- a/dev-db/mysql-init-scripts/Manifest +++ b/dev-db/mysql-init-scripts/Manifest @@ -8,22 +8,33 @@ AUX mysql-5.1.67-init.d 3289 SHA256 a08df7aa811607f45a40ee1a4aa56eff569568f9bc69 AUX mysql.conf 37 SHA256 08daa863ddd50aff0b608621ed26936919211e286440951dca5866141291004d SHA512 7b4940666d21f09fda47e2b24bd252c83af4372f34f1b3410c59d8f439fb7c0166d5a1b8d857bf67f2263f15d95a0fa0b67f225152a18c180b67d28f4ceb5f00 WHIRLPOOL e2765bf32478fa6d3362760845188bc25b5e2a280cac66dc453b593445d8eaa0af4c92704ed20b4561377771b354605477d8cb5420937d1e9f970e0b4b106d85 AUX mysql.conf.d 3273 SHA256 ee049781a3885305ce9999371198ff54f97fee4d2ad0814ba3aa3a03abc2724c SHA512 b2d83b2b5a3966d580bc19b6da9dd8f124a2dde29f34258699b759cc7bf863411a44f4f3930d7102458e5020ca4bfb91b99bfa7c4de5318e6cad9e9663e84dae WHIRLPOOL 61d305da26bca89ec92a1ee0bd51e968844df324e9794ffce284e125979af25a7455a52d8ca3a96946ace02db07d00936cc3f3a5520aec957a20e9928be9d8d8 AUX mysql.rc6 10661 SHA256 039e54883fc42d3b9ddfdfca46bb906420a7d47156f5b1392292f4aa3f712149 SHA512 6a6349c5f3877a4ba81e2979f1eaad561cfea43029c46a2398624ffeca0c190aa7814813569605edca8ce70286b4af7854db27412975e446c357e09ce2cc6a66 WHIRLPOOL 5e80c8b36a97274ec1964218f27f15194269e1073fd9979ffb7b7512e54b8a1884970189f9f391b4871140ac5e84a4e89c7e78a3635ee2f8df78320b62a2aa9e -AUX mysqld-prepare-db-dir 2552 SHA256 b68ee335d150dd7adff1cf389c5b9544614c76c5185aebc4a1793ba21d3f59a0 SHA512 fcfff2f4bb88f48603c36141fd7a755f012b5c8f6053d928bd3e4d47623a7160de064c08893b3b9fba3b052fb08e1e255cc441a2c1665dee57b373beb9d4b0ae WHIRLPOOL ab2f14184c76eea0def32beb70540ca5d2a1bab32236171afea9a42210a46041c82b0fd784626a8226c91b440e2a078aedfca14683fc310415f943d1d9aad50c AUX mysqld-wait-ready 1758 SHA256 98d845897c4098e4a3ca62cd3bad26a6fc2565a33737f1d1c91f9c98006c7157 SHA512 ad4a850d045149df156c8236ae114e94887626e3ca803dea9bcc3909349043b51357a71ac17d694e0217f7856e076a0736267fc1ea3dedbef8a319fc9014c01b WHIRLPOOL fb748c13658d276c061a44ffd488eeb2cf002df20ee94b5aa600175fa776e099211f89343d1322bbf03ddaebbafb30208e615ad78eb1fbedb26f77232662907b -AUX mysqld.service 1411 SHA256 9d141935df0dbefd75a84c57a1550141bea27e3afdca8ef9f26b8c12f3575599 SHA512 9c9cf800705ea9fc52cfa3873aad4721ae455b3a3ce8ef08ca71a5af6a6cb886f9f222356a20348ef1d83c63ea128ececdd2b583ccb456a624ff26221b2714ed WHIRLPOOL 81ebd52e4c4f82c06464b278257d2f9587c2528c5e5ec2519970317c346fef0b6b6c9fbab3b28f639cad55f036559465268567de3c020b93d793cfc86157f6ed -AUX mysqld_at.service 1467 SHA256 9eac5a53c064231ffa822536766d72eaacffdb008fea98394fa4f8977d24e05f SHA512 7ee508db86fd896ae6a9652138013fafdb20fd11ccf33a38eafc3e14726782d263f18275c15b48a16bbb8b1bdac6f507318f2660b1ee646e934550f40c11a9e0 WHIRLPOOL 51948819a05e1b8d3b188daec93a6b91a9a793204a85f23a3ef7f120d3048025b32bad837e1aa63e11282b0da7a361625a3023b52c6f9cca8b3cd91ee45f0555 +AUX mysqld.service 1360 SHA256 e2e2bed54e091a5f0211a8055a1c3896d9ead4c80893020ed8571ee19e46ef2f SHA512 8c4d1f22664b8df54a70cd025003d7c2537ad2cdffce0ac474e7d020218b577ed24a73cb35b1db876ac6f11e09ca57d2899d581c310d8a2c4ae91add34d4ae36 WHIRLPOOL 9121ce13633fe807c1c39524ee00dc064e0f396672464acced2ea803827023da0d6c3010d3b1bccd80254331be4e1762ea5d950c5dd2a02132dc2975e0b52e0e +AUX mysqld_at.service 1416 SHA256 ea8dafdd2eec5b6baa6efe52948030040ba6f24466e58bc55700822fe9f97951 SHA512 632c7db59736828990772fe6603234d6d30087894d9e83794f2c5b9ae5d6bf419fc5cda52c5a7f45ca88308f0a725edcff497a5be55494f542531aea220ddec5 WHIRLPOOL 02ed74991a4f2d94734ede231a6d28904788cadf90124a18b241d58fc2e72a571d2aeed7fc32639c895ca33e7608be862e61b0e480ac18e89ef091905dbbd4a9 AUX mysqlmanager.conf.d 1009 SHA256 35353f585cc9d3f97bbcfe77224d183e0fedcf4134377b8bff4c278462577cc7 SHA512 8900849a20ad8fc61e480bdc668397a108950cae69a138811d0fd0b82aca071b77e3af863df20e9c7d478c9842bb5e8407fc8313a31154cfa866f122c10a2d31 WHIRLPOOL 90abd9d197e0dc90110a6056a9c21720fe2ec80356400c8ed4c43bb477317e4de7796479663d87a0b5bb1c9522a8233ae3b9c1ad72cdd850f5fada36237712d1 AUX mysqlmanager.rc6 6632 SHA256 0d37cb3199a2752604a105d54340a61b9ee062e6c1d977a863628b694d93e96d SHA512 edaebc6a75157ced72556a64acb81e0761c0005fb4b6ca43778939577303e76cc7117ad3847eabaa28ed670e50f84366ae9773d3f7c88320f7690581f009f415 WHIRLPOOL b9840e0e2f0e8b1205dfbf066e6f89cd1cc053cbb8396bbfef955843a49e8ab36f08b6f5dc254eeebe5f5c5fa0a882a67d64aa9927f49716d201026229b4e4f0 EBUILD mysql-init-scripts-1.2.ebuild 766 SHA256 c052738cd94042676a6c082cfa2544acf3663c020e7705c5712a3c1254cbf762 SHA512 c34778c8528aa15b0534f87e71242df3f5e00536a8f864465b30f4ab946f50e6e574c14c6429883e55471fddedd92e98daa32e899062aa8a682338290e4f25e4 WHIRLPOOL cf15c8c9c639cc2d02e60b67dd0506a82c9d2813a0e239c7164c432ef1c02255722ae424f979dadd2b77826d1d5d39388f34101b4502c6a70096c82d8833fcea EBUILD mysql-init-scripts-2.0_pre1-r2.ebuild 1954 SHA256 fa597649d9c25f47bfc2564aaba40c42f108d0fd1758fb6c7106e8d19d3f5ceb SHA512 005d3f035500ad2f74da1806d954ebf44cfb2df651bc87ebe2101500844927ac859df8241f895cbf28ce95b1fa5fd692831048ec22f672ee70fb2e156dbcb280 WHIRLPOOL 754626c5db38fb08a8ec3a96e321e17ecb3ebf66cb6b772716518ad42dbd78c7baacff3d6eba5d49331273dfa9914cdddab6f887eb6969aa6541b99733bbf884 EBUILD mysql-init-scripts-2.0_pre1-r3.ebuild 1955 SHA256 b23a896f25485065c9452b328d70e817e14155992d72e8bed648a81177682bdf SHA512 c0b00e7cb86eae1e886025220fef3d37f3d8ad338fc26aa90efd2c2b04ceab3174179d09c5abf69d56a1a2879e5c42757c7d6e7f8dd912438831a961fd05b551 WHIRLPOOL dab4f65b8d67f0ac46cd643886292ec2b38cf811a51bf50cd0027d614ff89a8bb074883f8e02fa01f9fb0f865b0f10d9dfdf4a3567f066773fd30b984be3d7e2 -EBUILD mysql-init-scripts-2.0_pre1-r4.ebuild 2238 SHA256 58a9ae4159e695967cbfdfcb307f02ee17ba4774d1d9f5bd3f057ec3cc8c3b21 SHA512 32ff2a2825644422a5b6ca70ebb6d307b75104d8349c29cc4c35f581953ae8c4236576eb44819e44ec4c92edcddb5d5e1ff3282ed5de6dbf5946758319180e74 WHIRLPOOL 54c49162b036c94db31f1a4ecee3910f7e5233e39de8bbaa9f36ce65834389b699ce1fb0196f8d528e7fe404e71eac82f755dc17225f80829c3844214d2a52c4 -MISC ChangeLog 4844 SHA256 53dc10a480fb4396b8879763e084038daef191ab7a8f206a4bcee1f7795fc4f8 SHA512 aa5b115fc062fc6f77574658f9a74a37ec6c5ba52bad4c7a2f7533aa2dce8dc86510a77f95a93db3da0bb206d5923c0adf34bbcbe943f2cf1407e990c0777740 WHIRLPOOL 25f12443a4fb0cc345963626de51b90e5d31e29676fb1a5d33437c0501dc9935919962168ed3ba1f74b8af193188716976ed3e23996b235357daead086309b82 +EBUILD mysql-init-scripts-2.0_pre1-r5.ebuild 2215 SHA256 aadbe39e29b297494623262933d43d0862e2493fcd16a858d2daf09fbb665b50 SHA512 639f3042fb37d1930fc5031cbb3e6e72420e0fd441eb26bea19c17a92fa02633bde45c1ffb943a3c7ba5c78af6eb243918d2ce45aed8eefc525301e28b1401ba WHIRLPOOL b5109848f2b13c83ba5afe1d3c05055e874ec22c9d85e1bcef0e8dd1d482b1615a40147d9a0d41e5cdb4017b57efe7a1c6c41877abae52f840041d17fb4a3a8b +MISC ChangeLog 5181 SHA256 0e0e73f0a4fb5e652b5bfe709db4afd943ec76776ff7c5ab3b1b2a43b46af185 SHA512 c94878713fc1b580c24d94b4b608478bfeea34866be69ea58c3cf9e32bd107bdcfac5db85f631ee3f30fc8e2c79d2e98f0c4cc90e97eeb8c61b18f3f2529ca90 WHIRLPOOL 3afdb5ef38ac2d056227c7fdd6413a7698722876a90a8dc1c646deed6479bef53f639a89ee105256dab27dd964e7e2b02db1abb9f1def056fe5a48c07666d449 MISC metadata.xml 159 SHA256 5cfd5aa0e8104c0326b5f4c9205a6449a94e0f6f6abfd2626f1e7a8fe77b98b7 SHA512 f06513333c3d0b329da5d8ea142c0dbd58d9c40c559d92ae4b0ac7e5fae848f56a832867c79f6931148de7d97302b690ce676f911d477e85ebab7798ce198d92 WHIRLPOOL b99390a39596639a5903a470d8a00dcfdc001c2cd70631526b1586b9a32893c00692fcb19cb2764979f128318dd01782be4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cXLyv0dr1LdwJ +=vsdb -----END PGP SIGNATURE----- diff --git a/dev-db/mysql-init-scripts/files/mysqld-prepare-db-dir b/dev-db/mysql-init-scripts/files/mysqld-prepare-db-dir deleted file mode 100644 index 80df2206680b..000000000000 --- a/dev-db/mysql-init-scripts/files/mysqld-prepare-db-dir +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh - -# This script creates the mysql data directory during first service start. -# In subsequent starts, it does nothing much. - -# extract value of a MySQL option from config files -# Usage: get_mysql_option SECTION VARNAME DEFAULT -# result is returned in $result -# We use my_print_defaults which prints all options from multiple files, -# with the more specific ones later; hence take the last match. -get_mysql_option(){ - result=`/usr/bin/my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1` - if [ -z "$result" ]; then - # not found, use default - result="$3" - fi -} - -# Defaults here had better match what mysqld_safe will default to -get_mysql_option mysqld datadir "/var/lib/mysql" -datadir="$result" -get_mysql_option mysqld_safe log-error "/var/log/mysql/mysql.log" -errlogfile="$result" - -# Absorb configuration settings from the specified systemd service file, -# or the default "mysqld" service if not specified -SERVICE_NAME="$1" -if [ x"$SERVICE_NAME" = x ] -then - SERVICE_NAME=mysqld.service -fi - -myuser=`systemctl show -p User "${SERVICE_NAME}" | - sed 's/^User=//'` -if [ x"$myuser" = x ] -then - myuser=mysql -fi - -mygroup=`systemctl show -p Group "${SERVICE_NAME}" | - sed 's/^Group=//'` -if [ x"$mygroup" = x ] -then - mygroup=mysql -fi - -# Set up the errlogfile with appropriate permissions -touch "$errlogfile" -chown "$myuser:$mygroup" "$errlogfile" -chmod 0640 "$errlogfile" -[ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile" - -# Make the data directory -if [ ! -d "$datadir/mysql" ] ; then - # First, make sure $datadir is there with correct permissions - # (note: if it's not, and we're not root, this'll fail ...) - if [ ! -e "$datadir" -a ! -h "$datadir" ] - then - mkdir -p "$datadir" || exit 1 - fi - chown "$myuser:$mygroup" "$datadir" - chmod 0755 "$datadir" - [ -x /sbin/restorecon ] && /sbin/restorecon "$datadir" - - # Now create the database - echo "Initializing MySQL database" - /usr/share/mysql/scripts/mysql_install_db \ - --datadir="$datadir" --user="$myuser" --basedir="/usr" - ret=$? - if [ $ret -ne 0 ] ; then - echo "Initialization of MySQL database failed." >&2 - echo "Perhaps /etc/mysql/my.cnf is misconfigured." >&2 - # Clean up any partially-created database files - if [ ! -e "$datadir/mysql/user.frm" ] ; then - rm -rf "$datadir"/* - fi - exit $ret - fi - # In case we're running as root, make sure files are owned properly - chown -R "$myuser:$mygroup" "$datadir" -fi - -exit 0 diff --git a/dev-db/mysql-init-scripts/files/mysqld.service b/dev-db/mysql-init-scripts/files/mysqld.service index 3193ce2f0864..8cce47ace709 100644 --- a/dev-db/mysql-init-scripts/files/mysqld.service +++ b/dev-db/mysql-init-scripts/files/mysqld.service @@ -27,7 +27,6 @@ Type=simple User=mysql Group=mysql -ExecStartPre=/usr/libexec/mysqld-prepare-db-dir %n # Note: we set --basedir to prevent probes that might trigger SELinux alarms, # per bug #547485 ExecStart=/usr/bin/mysqld_safe --basedir=/usr diff --git a/dev-db/mysql-init-scripts/files/mysqld_at.service b/dev-db/mysql-init-scripts/files/mysqld_at.service index afcec18ba8cb..1ba2a8f8a2d0 100644 --- a/dev-db/mysql-init-scripts/files/mysqld_at.service +++ b/dev-db/mysql-init-scripts/files/mysqld_at.service @@ -27,7 +27,6 @@ Type=simple User=mysql Group=mysql -ExecStartPre=/usr/libexec/mysqld-prepare-db-dir %n # Note: we set --basedir to prevent probes that might trigger SELinux alarms, # per bug #547485 ExecStart=/usr/bin/mysqld_safe --defaults-file=/etc/mysql/my%I.cnf --basedir=/usr diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r4.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r5.ebuild index 560e8da31129..80260edce212 100644 --- a/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r4.ebuild +++ b/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r4.ebuild,v 1.1 2013/09/03 18:49:48 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1-r5.ebuild,v 1.1 2013/09/19 08:46:40 mgorny Exp $ inherit systemd @@ -24,7 +24,7 @@ src_install() { # systemd unit installation exeinto /usr/libexec - doexe "${FILESDIR}"/{mysqld-prepare-db-dir,mysqld-wait-ready} + doexe "${FILESDIR}"/mysqld-wait-ready systemd_dounit "${FILESDIR}/mysqld.service" systemd_newunit "${FILESDIR}/mysqld_at.service" "mysqld@.service" systemd_dotmpfilesd "${FILESDIR}/mysql.conf" |