[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#652946: live-installer does not install /var/spool and breaks crontab



Package: live-installer
Version: 34
Followup-For: Bug #652946


Hi again.

Because tar process doesn't return ant error, apparently, I didn't try 
to extract it's error output in my previous tests. When I did, by adding 
someting like "2> /target/tar-errors.txt" in the "tar xv" line, the file 
showed this

	tar: can't remove old file ./var/lock: Is a directory

So the extraction is not completed and stops when extracting /var/lock 
**and** does not return an error to live-installer. Maybe the exit code 
of tar extraction process should be also be redirected to track future 
errors while extracting the filesystem.

After trying to get busybox tar to exclude var/lock, without success 
because tar in debian busybox does not handle exclude option, I've tried 
the lenny approach I've seen in live-installer.postinst history in git 
repo, and use live system installed tar to extract the filesystem 
excluding var/lock.

	chroot . tar c . --exclude=var/lock | \
	(chdir /target && tar xv 2> /target/tar-errors.txt) | \

This gave me another error later upon install about /var/run:

	tar: can't remove old file ./var/run: Is a directory

Then I added var/run to excludes, rebuilt udeb, rebuild live image and 
the install worked without missing dirs and files, even the excluded 
dirs were in /target/var. After boot no errors.

Patch attached.

Merry Christmas.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.1.0-1-686-pae (SMP w/1 CPU core)
Locale: LANG=pt_PT.UTF-8, LC_CTYPE=pt_PT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From a99ca344df7ac6f40e550bf5ab1e4b7172b07b23 Mon Sep 17 00:00:00 2001
From: Rui Miguel P. Bernardo <rui.bernardo.pt@gmail.com>
Date: Sat, 24 Dec 2011 14:24:52 +0000
Subject: [PATCH] use live system tar to use exclude

---
 debian/live-installer.postinst |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/debian/live-installer.postinst b/debian/live-installer.postinst
index 800038b..1779082 100644
--- a/debian/live-installer.postinst
+++ b/debian/live-installer.postinst
@@ -44,7 +44,8 @@ install_live_system () {
 		OLD_IFS=$IFS
 		mkdir -p /target
 		exec 4>&0
-		tar c . | \
+		# we need to use live system tar to use exclude
+		chroot . tar c . --exclude=var/lock --exclude=var/run | \
 		(chdir /target && tar xv) | \
 		(
 			while read line; do
-- 
1.7.2.5


Reply to: