Re: Fix several live-installer bugs

2012-08-02 Thread Rui Bernardo
On Wed, Aug 01, 2012 at 01:52:20PM +0200, Daniel Baumann wrote:
> to keep it short: as i told you several times already, i'll be looking
> into this in time, but not just now yet. this is because the debian-live
> team is busy with getting the foundations into shape first, and d-i
> related parts, on top of that, after that.
> 
> -- 
> Address:Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
> Email:  daniel.baum...@progress-technologies.net
> Internet:   http://people.progress-technologies.net/~daniel.baumann/

Fair enough for testing/wheezy. I've done my part by reporting the bugs 
and my findings about them, and proposing patches, in the hope it will 
help somehow.

At least, not testing/development related, what about uploading 
live-installer 31 to stable squeeze? That would close #655198 and squeeze 
live-build users could use squeeze live-installer without #655198 
(remove live-* packages after install).

Squeeze users never got #613360 (and #655198) fixed. It wouldn't require 
a new changelog entry, just the "missing" upload. 

Thank you all for your great work, debian-live team. Just trying to 
help. Not disturbing anymore with this issues.


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120802100900.ga8...@gmail.com



Re: Fix several live-installer bugs

2012-08-01 Thread Daniel Baumann
to keep it short: as i told you several times already, i'll be looking
into this in time, but not just now yet. this is because the debian-live
team is busy with getting the foundations into shape first, and d-i
related parts, on top of that, after that.

-- 
Address:Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:  daniel.baum...@progress-technologies.net
Internet:   http://people.progress-technologies.net/~daniel.baumann/


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/50191874.4030...@progress-technologies.net



Fix several live-installer bugs

2012-08-01 Thread Rui Bernardo
Dear live-installer and partman-target maintainers,

I'm sending this to the mailist instead of the respective bug reports to 
avoid spamming the BTS and because this addresses several issues in two 
packages. Sorry if I'm doing this wrong. Please correct me.

live-installer is, ATM, partially broken in both squeeze and and wheezy.

1. In both releases fstab is truncated by the presence of the empty 
fstab that newer live-build versions (> 3.0_a47) create and breaks the 
installed system (partitions are not found because fstab is empty) if 
the user selects a multi partition schema in partman - [1]. Even in "all 
in one partition" fstab is empty.

2. In squeeze only, besides the fstab problem, live-* packages are not 
being removed after the disk installation. That was fixed in version 31 
but somehow it never reached squeeze - [2] and [3].

3. In wheezy only, partman-target is silently breaking live-installer 
postinst by not completing the extracting to disk of several directories 
in /var/ after an error cause by the presence of a /var/run and 
/var/lock directories in the disk created by partman-target [4] and 
probably [5].

I consider all of this issues important, if not RC, because of debian 
policy, and should be corrected as soon as possible in both releases.


partman-target wheezy only
--

Partman-target is still creating /var/run and /var/lock (#652946 [4] 
and, probably, #673328 [5]). I've commented out the relevant section. I 
leave to the maintainers what to do: remove completly the section [6] or 
just comment the breaking code as I did. For now the section is 
commented in the following patch:

---8<--
diff --git a/finish.d/mount_partitions b/finish.d/mount_partitions
index 9c8499e..cc690ab 100755
--- a/finish.d/mount_partitions
+++ b/finish.d/mount_partitions
@@ -62,8 +62,9 @@ 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/var/lock
+   #mkdir -p /target/var/run
+   :
;;
esac
continue 2
---8<--


live-installer
--

live-installer 31 is not in squeeze [3]. It would fix #655198 [2] in 
squeeze.

live-build now leaves an empty fstab (#681261 [1]). This breaks both 
squeeze and wheezy live-installer.

How I've fixed live-installer in both releases: I've created a squeeze 
branch (checkout) from the not uploaded version 31 and made a commit to 
preserve the fstab created by partman and restore it after the image is 
extracted to disk.

---8<--
diff --git a/debian/live-installer.postinst b/debian/live-installer.postinst
index 7f76dbf..f16be62 100755
--- a/debian/live-installer.postinst
+++ b/debian/live-installer.postinst
@@ -27,6 +27,9 @@ install_live_system () {
. $script
done
 
+   # preserve fstab created by partman-target, see #681261
+   [ -e /target/etc/fstab ] && mv /target/etc/fstab 
/target/etc/fstab.partman
+
for place in $PLACES; do
[ ! -e $place ] && continue
@@ -76,6 +80,9 @@ install_live_system () {
exit 1
fi
 
+   # restore fstab created by partman-target, see #681261
+   mv /target/etc/fstab.partman /target/etc/fstab
+
# if we're dumping it, we need to set the boot mode
if [ "$mode" = live ]; then
# which initramfs hook to use
---8<--

Then I've also merged that branch to a wheezy branch (checkout) from 
HEAD so it's included in wheezy.

Finally, I've released and build the package of the 31-1 version in 
squeeze branch to fix both #655198 [2] and #681261 [1] in squeeze. Then, 
I've released another package for wheezy (from wheezy branch) to fix 
only #681261 [1] in wheezy.


fstab.d problem
---

I don't think that #681261 [1] can be easely fixed in partman-target as 
suggested [7]. I've searched the word fstab in partman-target code [8] 
and it seems to be hardcoded in several places, although something like 
a finish.d/99mv_fstab_to_fstab.d that would mv the file and touch the 
default one (because an empty fstab is needed, if not fstab.d is just 
ignored). But this new 99mv_fstab_to_fstab.d would have to deal with the 
fact that squeeze doesn't support fstab.d. And the new partman-target 
would need to be uploaded to squeeze also.

Besides this, even if partman-target was changed right now for wheezy, 
it would introduce a new unexpected empty fstab for everybody (no