Bug#816892: debootstrap synchronize the whole filesystem

2017-01-29 Thread Philip Hands
Steve McIntyre  writes:

> Hi!
>
> On Sun, Mar 06, 2016 at 07:36:35PM +0900, Kusanagi Kouichi wrote:
>>Package: debootstrap
>>Version: 1.0.79
>>Severity: normal
>>Tags: patch
>>
>>Sync at the end of debootstrap sometimes takes for a while. It seems
>>enough to synchronize only a target filesystem.
>
>>diff -uNrp debootstrap-1.0.79.orig/debootstrap debootstrap-1.0.79/debootstrap
>>--- debootstrap-1.0.79.orig/debootstrap   2015-11-09 13:01:25.0 
>>+0900
>>+++ debootstrap-1.0.79/debootstrap2016-03-06 19:22:04.970728229 +0900
>>@@ -686,7 +686,7 @@ if am_doing_phase second_stage; then
>>  mv "$TARGET/debootstrap/debootstrap.log" 
>> "$TARGET/var/log/bootstrap.log"
>>  fi
>>  fi
>>- sync
>>+ sync -f "$TARGET"
>> 
>>  if [ "$KEEP_DEBOOTSTRAP_DIR" = true ]; then
>>  if [ -x "$TARGET/debootstrap/debootstrap" ]; then
>
> There's a small problem here - debootstrap is designed and expected to
> run in a lot of different environments, including limited ones like in
> debian-installer. -f is a very new option and I doubt it's safe to use
> by default...

Well, in the case of busybox as used in d-i, sync seems to ignore its
parameters.  The udeb busybox does so silently, whereas the normally
packaged version of busybox gives the more verbose:

  % busybox sync -f /tmp
  sync: ignoring all arguments

so, in that case it seems harmless ... but also useless ;-)

Is there really any significant amount of work being done by sync here
that is not going to involve to $TARGET? (or other partitions mounted
below target, which we probably also want to sync at this point).

Cheers, Phil.
-- 
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,GERMANY


signature.asc
Description: PGP signature


Bug#816892: debootstrap synchronize the whole filesystem

2017-01-29 Thread Steve McIntyre
Hi!

On Sun, Mar 06, 2016 at 07:36:35PM +0900, Kusanagi Kouichi wrote:
>Package: debootstrap
>Version: 1.0.79
>Severity: normal
>Tags: patch
>
>Sync at the end of debootstrap sometimes takes for a while. It seems
>enough to synchronize only a target filesystem.

>diff -uNrp debootstrap-1.0.79.orig/debootstrap debootstrap-1.0.79/debootstrap
>--- debootstrap-1.0.79.orig/debootstrap2015-11-09 13:01:25.0 
>+0900
>+++ debootstrap-1.0.79/debootstrap 2016-03-06 19:22:04.970728229 +0900
>@@ -686,7 +686,7 @@ if am_doing_phase second_stage; then
>   mv "$TARGET/debootstrap/debootstrap.log" 
> "$TARGET/var/log/bootstrap.log"
>   fi
>   fi
>-  sync
>+  sync -f "$TARGET"
> 
>   if [ "$KEEP_DEBOOTSTRAP_DIR" = true ]; then
>   if [ -x "$TARGET/debootstrap/debootstrap" ]; then

There's a small problem here - debootstrap is designed and expected to
run in a lot of different environments, including limited ones like in
debian-installer. -f is a very new option and I doubt it's safe to use
by default...

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"Every time you use Tcl, God kills a kitten." -- Malcolm Ray



Bug#816892: debootstrap synchronize the whole filesystem

2016-03-06 Thread Kusanagi Kouichi
Package: debootstrap
Version: 1.0.79
Severity: normal
Tags: patch

Sync at the end of debootstrap sometimes takes for a while. It seems
enough to synchronize only a target filesystem.


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.3 (SMP w/4 CPU cores)
Locale: LANG=ja_JP.eucJP, LC_CTYPE=ja_JP.eucJP (charmap=EUC-JP)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages debootstrap depends on:
ii  wget  1.17.1-1+b1

Versions of packages debootstrap recommends:
ii  debian-archive-keyring  2014.3
ii  gnupg   1.4.20-4

debootstrap suggests no packages.

-- no debconf information
diff -uNrp debootstrap-1.0.79.orig/debootstrap debootstrap-1.0.79/debootstrap
--- debootstrap-1.0.79.orig/debootstrap	2015-11-09 13:01:25.0 +0900
+++ debootstrap-1.0.79/debootstrap	2016-03-06 19:22:04.970728229 +0900
@@ -686,7 +686,7 @@ if am_doing_phase second_stage; then
 			mv "$TARGET/debootstrap/debootstrap.log" "$TARGET/var/log/bootstrap.log"
 		fi
 	fi
-	sync
+	sync -f "$TARGET"
 
 	if [ "$KEEP_DEBOOTSTRAP_DIR" = true ]; then
 		if [ -x "$TARGET/debootstrap/debootstrap" ]; then