Bug#652946: partman-target should not create /var/run
Hi, Raphael Hertzog (06/12/2012): > I agree. Here's the corresponding patch. It would be nice if someone > could commit it so that it gets included in the next d-i release. > > It's needed to have a proper live image for wheezy. thanks everyone involved, but rc1 doesn't look like an appropriate target to change /var/* creation; especially since (AFAICT) that only affects the live installer. Please get a fix/workaround added there, and push your partman-target patch into a 'jessie' branch for later inclusion. Mraw, KiBi. signature.asc Description: Digital signature
Bug#652946: partman-target should not create /var/run
On Thu, 12 Jul 2012, Michael Tokarev wrote: > This whole hack is not needed anymore, and /run will > be created in a usual way during install process. > > So this whole trick should be removed. I agree. Here's the corresponding patch. It would be nice if someone could commit it so that it gets included in the next d-i release. It's needed to have a proper live image for wheezy. Cheers, -- Raphaël Hertzog ◈ Debian Developer Get the Debian Administrator's Handbook: → http://debian-handbook.info/get/ >From a91bb071ba7b011045aa83d17c6018c311485f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Hertzog?= Date: Thu, 6 Dec 2012 16:51:15 +0100 Subject: [PATCH] Do not create /var/run and /var/lock directories in /target Nowadays those are supposed to be symlinks and their existence hurts more than helps. In particular, it breaks live-installer which uses tar to extract the content of the live system over /target. At least busybox's tar fails to extract a symlink over a pre-existing directory. Thanks to Rui Bernardo and Michael Tokarev for the investigations. Closes: #652946 --- debian/changelog |9 + finish.d/mount_partitions |8 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index ec24040..bcb7ef1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +partman-target (81) UNRELEASED; urgency=low + + * Do not create /var/run and /var/lock directories in /target. Nowadays +those are supposed to be symlinks and their existence hurts more than +helps. Closes: #652946 +Thanks to Rui Bernardo and Michael Tokarev for the investigations. + + -- Raphaël Hertzog Thu, 06 Dec 2012 16:45:54 +0100 + partman-target (80) unstable; urgency=low [ Updated translations ] diff --git a/finish.d/mount_partitions b/finish.d/mount_partitions index 9c8499e..8dcbb8a 100755 --- a/finish.d/mount_partitions +++ b/finish.d/mount_partitions @@ -58,14 +58,6 @@ for f in $fstab; do # needed to unmount the partition; currently this is unused unmount_cmd=$($m "$f") if [ "$?" = 0 ]; then - case $2 in - /) -# Create these before /var is mounted, -# so that they can be mounted as tmpfses -mkdir -p /target/var/lock -mkdir -p /target/var/run -;; - esac continue 2 fi done -- 1.7.10.4
Bug#652946: partman-target should not create /var/run
On 11.07.2012 22:34, Rui Bernardo wrote: > Attached is an eventual patch that could fix the issue. I think partman should not create /var/run & /var/lock at all at this point. Note the comment right before the mkdir: # Create these before /var is mounted, # so that they can be mounted as tmpfses - mkdir -p /target/var/lock - mkdir -p /target/var/run + mkdir -p /target/run In previous life, there was a hack to mount /var/run & /var/lock as tmpfs, and it was done BEFORE /var is mounted! Ie, once real /var gets mounted, it hides run & lock dirs below itself. The code in initscripts tried to move /var/run and /var/lock elsewhere before mounting /var, and to move them back after mounting /var. Hence, /var/lock and /var/run should exist in root filesystem even if separate /var is being used, -- these directories wont be created later during install after we mount /target/var since it will hide the root filesystem. This whole hack is not needed anymore, and /run will be created in a usual way during install process. So this whole trick should be removed. Thanks, /mjt -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#652946: partman-target should not create /var/run
On Wed, Jul 11, 2012 at 07:34:10PM +0100, Rui Bernardo wrote: > Attached is an eventual patch that could fix the issue. Sorry, the previous patch didn't create /target/run/lock. Better create it to prevent other possible failures about missing /run/lock. New patch attached. >From 8e6298618e3583fa92fd106d42bcf7d24e673a42 Mon Sep 17 00:00:00 2001 From: "Rui M. P. Bernardo" Date: Thu, 12 Jul 2012 00:38:11 +0100 Subject: [PATCH] create /run instead of /var/run in target. Closes #652946. --- finish.d/mount_partitions |4 ++-- 1 ficheiro modificado, 2 adições(+), 2 eliminados(-) diff --git a/finish.d/mount_partitions b/finish.d/mount_partitions index 9c8499e..a0a716d 100755 --- a/finish.d/mount_partitions +++ b/finish.d/mount_partitions @@ -62,8 +62,8 @@ for f in $fstab; do /) # Create these before /var is mounted, # so that they can be mounted as tmpfses -mkdir -p /target/var/lock -mkdir -p /target/var/run +mkdir -p /target/run +mkdir -p /target/run/lock ;; esac continue 2 -- 1.7.10
Bug#652946: partman-target should not create /var/run
Attached is an eventual patch that could fix the issue. >From 93eec27e0bbedc9958ef6604f1d8062f6e1a9877 Mon Sep 17 00:00:00 2001 From: "Rui M. P. Bernardo" Date: Wed, 11 Jul 2012 18:38:29 +0100 Subject: [PATCH] create /run instead of /var/run in target. Closes #652946. --- finish.d/mount_partitions |3 +-- 1 ficheiro modificado, 1 adição(+), 2 eliminados(-) diff --git a/finish.d/mount_partitions b/finish.d/mount_partitions index 9c8499e..f0c4efe 100755 --- a/finish.d/mount_partitions +++ b/finish.d/mount_partitions @@ -62,8 +62,7 @@ for f in $fstab; do /) # Create these before /var is mounted, # so that they can be mounted as tmpfses -mkdir -p /target/var/lock -mkdir -p /target/var/run +mkdir -p /target/run ;; esac continue 2 -- 1.7.10