Bug#338405: another patch

2006-12-31 Thread Russell Coker
On Sunday 31 December 2006 23:47, maximilian attems <[EMAIL PROTECTED]> 
wrote:
> as you agree that the busybox utitilites are not functional ident,
> i queue that patch for postetch. there should be enough time to poke
> new busybox upstream to merge such patches.

OK, post-etch will do.

I'll write the busybox patches if no-one else does, I've hacked busybox 
before.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#338405: another patch

2006-12-31 Thread maximilian attems
On Sun, 31 Dec 2006, Russell Coker wrote:

> On Sunday 31 December 2006 20:33, maximilian attems <[EMAIL PROTECTED]> 
> wrote:

> Such things of course will be less likely to be found if there is no easy 
> option of creating an initramfs that uses it.  The last patch that I sent 
> will give no different result unless you set ONLY_BUSYBOX=y, so I can't 
> imagine it causing any problems for anyone.
> 
> The sleep bug is reported as below:
> 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=341403
> 
> Having this code in mkinitramfs makes it more likely that the busybox bugs 
> will get fixed.

ok!
as you agree that the busybox utitilites are not functional ident,
i queue that patch for postetch. there should be enough time to poke
new busybox upstream to merge such patches.

happy new year.
-- 
maks


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#338405: another patch

2006-12-31 Thread Russell Coker
On Sunday 31 December 2006 20:33, maximilian attems <[EMAIL PROTECTED]> 
wrote:
> well the patch description is different to the patch itself.
> kinit is not used in initramfs-tools and is not removed in
> the patch below, what you remove are dash and minips from klibc-utils.

Sorry for the mis-description, I presume that the intent is clear though.

> no this patch has the same fundamental problems than the one
> that was merged for 0.85d.

It is different in that it's a second option, so it is possible to have 
busybox without replacing all the non-busybox parts.

> * ugly: once busybox has a busybox --list, there would be no need
>   to invoke tail, tr, sed and grep.

Good point, I filed a but report against busybox about that.

> * wrong: the busybox counterparts to the klibc-utils are not functinality
>   equivalent. as written in the changelog documenting the revert for
>   example sleep doesn't take subsecond args. quite sure that there is
>   other breakage too as experienced by the sheer number of boot failures of
>   0.85d.

Such things of course will be less likely to be found if there is no easy 
option of creating an initramfs that uses it.  The last patch that I sent 
will give no different result unless you set ONLY_BUSYBOX=y, so I can't 
imagine it causing any problems for anyone.

The sleep bug is reported as below:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=341403

Having this code in mkinitramfs makes it more likely that the busybox bugs 
will get fixed.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#338405: another patch

2006-12-31 Thread maximilian attems
tags 338405 wontfix
stop

On Sun, 31 Dec 2006, Russell Coker wrote:

> The attached patch creates a new config option ONLY_BUSYBOX which can be set 
> if you want to use busybox instead of kinit.  It saves over 200K of 
> compressed size on my system.
> 
> I believe that this should be included, it doesn't stop kinit being used, 
> merely provides another option.

well the patch description is different to the patch itself.
kinit is not used in initramfs-tools and is not removed in
the patch below, what you remove are dash and minips from klibc-utils.

> --- /usr/sbin/mkinitramfs 2006-12-20 02:22:05.0 +1100
> +++ mkinitramfs   2006-12-31 13:08:52.0 +1100
> @@ -229,7 +229,15 @@
>   rm -f ${DESTDIR}/bin/sh
>   rm -f ${DESTDIR}/bin/busybox
>   copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
> - ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
> + if [ "x${ONLY_BUSYBOX}" = "xn" -o "x${ONLY_BUSYBOX}" = "x" ]; then
> + ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
> + else
> + rm ${DESTDIR}/bin/busybox ${DESTDIR}/bin/sh.shared 
> ${DESTDIR}/bin/minips
> + cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox
> + for n in `busybox | tail -19 | tr , n | sed -e "s/ 
> \|\t//"|grep .|grep -v busybox` ; do
> + ln -f ${DESTDIR}/bin/busybox ${DESTDIR}/bin/$n
> + done
> + fi
>  fi
>  
>  # Modutils

no this patch has the same fundamental problems than the one
that was merged for 0.85d.
* ugly: once busybox has a busybox --list, there would be no need
  to invoke tail, tr, sed and grep.
* wrong: the busybox counterparts to the klibc-utils are not functinality
  equivalent. as written in the changelog documenting the revert for
  example sleep doesn't take subsecond args. quite sure that there is
  other breakage too as experienced by the sheer number of boot failures of
  0.85d.

-- 
maks


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#338405: another patch

2006-12-30 Thread Russell Coker
The attached patch creates a new config option ONLY_BUSYBOX which can be set 
if you want to use busybox instead of kinit.  It saves over 200K of 
compressed size on my system.

I believe that this should be included, it doesn't stop kinit being used, 
merely provides another option.
--- /usr/sbin/mkinitramfs	2006-12-20 02:22:05.0 +1100
+++ mkinitramfs	2006-12-31 13:08:52.0 +1100
@@ -229,7 +229,15 @@
 	rm -f ${DESTDIR}/bin/sh
 	rm -f ${DESTDIR}/bin/busybox
 	copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
-	ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+	if [ "x${ONLY_BUSYBOX}" = "xn" -o "x${ONLY_BUSYBOX}" = "x" ]; then
+		ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+	else
+		rm ${DESTDIR}/bin/busybox ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/minips
+		cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox
+		for n in `busybox | tail -19 | tr , n | sed -e "s/ \|\t//"|grep .|grep -v busybox` ; do
+			ln -f ${DESTDIR}/bin/busybox ${DESTDIR}/bin/$n
+		done
+	fi
 fi
 
 # Modutils


Bug#338405: another patch for busybox support

2006-12-02 Thread maximilian attems
On Sat, 02 Dec 2006, Russell Coker wrote:

> The following will significantly reduce the size of an initramfs when busybox 
> is used while also enabling all busybox commands (handy if you have an option 
> to run a shell from the initramfs for recovery).  In spite of what maks 
> thinks, the busybox option is still there, so it should be made to work well.

due to partial upgrade path and thus the need of support of lvm2 and mdadm
inside of mkinitramfs itself, busybox is kept. klibc shipps dash, which
is a fine sh. the missing parts in klibc-utils are sed, awk or grep that
is used by aboves hooks.

a really stripped down initramfs does not need busybox nor glibc,
as udev and module-init-tools compiles against klibc.
 
> --- mkinitramfs.orig2006-12-02 15:42:16.0 +1100
> +++ mkinitramfs 2006-12-02 17:25:38.0 +1100
> @@ -228,7 +228,12 @@
>  else
> rm -f ${DESTDIR}/bin/sh
> copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
> -   ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
> +   rm ${DESTDIR}/bin/busybox
> +   cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox
> +   for n in `busybox | tail -19 | tr , \\n | sed -e "s/ \|\t//"|grep .` 
> ; 
> do
> +   ln -f /bin/busybox ${DESTDIR}/bin/$n
> +   done
> +   ln -f /bin/busybox ${DESTDIR}/bin/sh
>  fi
> 
>  # Modutils

ok thanks,
not yet tested but scheduled for 0.85d
bon weekend.

-- 
maks


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#338405: another patch for busybox support

2006-12-01 Thread Russell Coker
The following will significantly reduce the size of an initramfs when busybox 
is used while also enabling all busybox commands (handy if you have an option 
to run a shell from the initramfs for recovery).  In spite of what maks 
thinks, the busybox option is still there, so it should be made to work well.

--- mkinitramfs.orig2006-12-02 15:42:16.0 +1100
+++ mkinitramfs 2006-12-02 17:25:38.0 +1100
@@ -228,7 +228,12 @@
 else
rm -f ${DESTDIR}/bin/sh
copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
-   ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+   rm ${DESTDIR}/bin/busybox
+   cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox
+   for n in `busybox | tail -19 | tr , \\n | sed -e "s/ \|\t//"|grep .` ; 
do
+   ln -f /bin/busybox ${DESTDIR}/bin/$n
+   done
+   ln -f /bin/busybox ${DESTDIR}/bin/sh
 fi

 # Modutils



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]