Created attachment 382662 [details] /var/log/portage/elog/summary.log for dev-db/mysql upgrade After upgrading my system, I found my /var/run directory had disappeared, crashing my php-fpm processes, and leaving most services showing as "crashed" and unable to start (even though running). During the course of upgrading dev-db/mysql, emerge apparently decided that /var/run was an orphaned, and thus removed (See attachment for portage summary.log). This would likely have been adverted with a fix to Bug 484442, but I can't tell enough to decide exactly what the cause was.
I had the same problem tonight with the upgrade from MySQL 5.1 to 5.5: * Messages for package dev-db/mysql-5.1.70: * * Directory symlink(s) may need protection: * * /var/run * * Searching all installed packages for files installed via above symlink(s)... * * The above directory symlink(s) are all safe to remove. Removing them now... * * Messages for package dev-db/mysql-5.5.39: * MySQL MY_DATADIR is /var/lib/mysql * MySQL datadir found in /var/lib/mysql * A new one will not be created. * You might want to run: * "emerge --config =dev-db/mysql-5.5.39" * if this is a new install. * If you are upgrading major versions, you should run the * mysql_upgrade tool.
(In reply to Adam Randall from comment #1) > I had the same problem tonight with the upgrade from MySQL 5.1 to 5.5: > > * Messages for package dev-db/mysql-5.1.70: > > * > * Directory symlink(s) may need protection: > * > * /var/run > * > * Searching all installed packages for files installed via above > symlink(s)... > * > * The above directory symlink(s) are all safe to remove. Removing them > now... > * This is a message saying the OLD mysql 5.1 had a keepdir installed into /var/run/mysqld. We removed this with 5.5 and portage removed the symlink. This is not a bug for the mysql team. We cleaned up the keepdir reference.
Portage team: This bit infra today, breaking one of the gentoo.org boxes (openrc suddenly thought nothing was running, as lots of running programs couldn't find their pre-existing pidfiles). /var/run and /var/lock SHOULD be whitelisted by Portage, and NEVER removed. Perhaps NO symlinks in /var should ever be removed, but I'll start wiht just /var/run and /var/lock. Portage 2.2.8-r1 (hardened/linux/amd64, gcc-4.7.3, glibc-2.19-r1, 3.15.5-hardened-r2-infra29 x86_64) ===== >>> Messages generated by process 11030 on 2015-02-18 15:11:08 UTC for package www-servers/apache-2.2.27-r4: LOG: postrm Directory symlink(s) may need protection: /var/run Searching all installed packages for files installed via above symlink(s)... The above directory symlink(s) are all safe to remove. Removing them now... =====
How about if we add /var/run to the UNINSTALL_IGNORE setting in profiles/base/make.defaults?
Fixed in cvs: --- make.defaults +++ make.defaults @@ -132,8 +132,9 @@ # 1) do not uninstall kernel modules and therefore allow replacing them, # 2) allow replacing unowned compiled Python modules (python-r1 migration), # 3) allow replacing unowned dropin.cache files (twisted-r1 migration). +# 4) protect /var/{run,lock} symlinks for bug 519620 COLLISION_IGNORE="/lib/modules/* *.py[co] *\$py.class */dropin.cache" -UNINSTALL_IGNORE="/lib/modules/*" +UNINSTALL_IGNORE="/lib/modules/* /var/run /var/lock" # Andreas K. Hüttel <dilfridge@gentoo.org> (23 Aug 2013) # Make emerge messages default to English as per Council decision