Re: Debian installer and CD BoF: my views for jessie

2014-08-24 Thread Hideki Yamane
bian.org/debian-devel/2014/08/msg00130.html
> 2. https://lists.debian.org/debian-devel/2014/08/msg00466.html
> 3. https://lists.debian.org/debian-accessibility/2014/08/msg00080.html
>[ Needed ]
> 
>  * Desktop choice: to avoid having to select/think about having to
>select a non-default desktop at boot time (which really isn't the
>place!) it was mentioned a while ago we could present a list of
>available+installable desktops after “Desktop environment” has been
>selected. This might also mitigate the concerns people might have
>about the default desktop. On the other hand, that means an extra
>    prompt. And possibly more i18n/l10n material. But it seems to me that
>such a compromise might appease things a lot while not being an extra
>burden on the long run. I didn't work on that yet though; and while I
>initially thought it would be nice to have at the same time as we
>switch back to Gnome, I think both things can be done individually.
>[ Wanted ]
> 
> Mraw,
> KiBi.


-- 
Hideki Yamane 


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20140824212301.c2157a83df4cdb1064853...@iijmio-mail.jp



Bug#925048: debootstrap: --keyring= Release signed by unknown key (key id EF0F382A1A7B6500)

2019-03-20 Thread Hideki Yamane
control: tags -1 +unreproducible +moreinfo

On Tue, 19 Mar 2019 21:08:42 +0530 "Veek.M"  wrote:
>* What led up to the situation?
> dpkg-deb -R debian-archive-keyring_2017.5_all.deb /tmp/
> ls *.gpg|xargs -I{} debootstrap --download-only --force-check-gpg 
> --keyring={} --variant minbase --arch amd64 --make-tarball=debian_amd64 
> stable /root/dbs_debian_amd64 https://debian.ethz.ch/debian
> 
>* What exactly did you do (or not do) that was effective (or
>  ineffective)?
> E: Release signed by unknown key (key id EF0F382A1A7B6500)
> but
> debootstrap --download-only --force-check-gpg  --variant minbase --arch amd64 
> --make-tarball=debian_amd64 stable /root/dbs_debian_amd64 
> https://debian.ethz.ch/debian
> works
> 
> There's a problem with using --keyring=whatever.gpg

 I cannot reproduce it

$ sudo debootstrap --version
debootstrap 1.0.89
$ sudo debootstrap --download-only --force-check-gpg --variant minbase --arch 
amd64 --make-tarball=debian_amd64 
--keyring=/usr/share/keyrings/debian-archive-keyring.gpg stable stretch
I: Retrieving InRelease 
I: Retrieving Release 
I: Checking Release signature
I: Valid Release signature (key id 067E3C456BAE240ACEE88F6FEF0F382A1A7B6500)
I: Retrieving Packages 
^CE: Interrupt caught ... exiting

 It seems that your procedure of specifying gpg key is bit strange.

> dpkg-deb -R debian-archive-keyring_2017.5_all.deb /tmp/
> ls *.gpg|xargs -I{} debootstrap --download-only --force-check-gpg 
> --keyring={} --variant minbase --arch amd64 --make-tarball=debian_amd64 
> stable /root/dbs_debian_amd64 https://debian.ethz.ch/debian



-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#926214: debootstrap: clean up /var/cache/apt/archives/*

2019-04-02 Thread Hideki Yamane
package: debootstrap
severity: minor

 debootstrap-ed image contains some .deb files that would not be
 used anymore, so removing them at finish is better since we can
 shrink it.

$ sudo debootstrap --cache-dir=/home/henrich/tmp/cache sid sid
(...)
$ sudo du -sh sid
282Msid
$ sudo rm -r sid/var/cache/apt/archives/*
$ sudo du -sh sid
236Msid


 Any comments?

-- 
Hideki Yamane 



Bug#926216: debootstrap: Add dpkgopt

2019-04-02 Thread Hideki Yamane
package: debootstrap
severity: wishlist

 mmdebstrap has aptopt and dpkgopt option to manage apt and dpkg via
 passing some options to it, put conf file to /etc/apt/apt.conf.d/99mmdebstrap
 and /etc/dpkg/dpkg.cfg.d/99mmdebstrap. I think it's worth to add such
 option to debootstrap, especially dpkgopt to reduce image size via
 "--dpkgopt='path-exclude=/usr/share/man/*' \
  --dpkgopt='path-exclude=/usr/share/locale/*' \
  --dpkgopt='path-exclude=/usr/share/doc/*' \" for minimize it.

-- 
Hideki Yamane 



Bug#926214: debootstrap: clean up /var/cache/apt/archives/*

2019-04-02 Thread Hideki Yamane
On Tue, 2 Apr 2019 16:44:14 +0900 Hideki Yamane  wrote:
> $ sudo rm -r sid/var/cache/apt/archives/*

 and also /var/lib/apt/lists



-- 
Hideki Yamane 



Bug#710709: debootstrap: consider creating (dangling) /etc/mtab symlink

2019-04-30 Thread Hideki Yamane
control: tags -1 +patch

revised patch

>From 55c21c166959a93b961c572d5f366d35d054ce24 Mon Sep 17 00:00:00 2001
From: Hideki Yamane 
Date: Wed, 1 May 2019 04:24:43 +0900
Subject: [PATCH] create symlink from /proc/self/mounts to /etc/mtab

With old kernel version, there is /proc/mounts instead of
/proc/self/mounts, so check whether /proc/self exists
---
 functions | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/functions b/functions
index 24f0357..46ebceb 100644
--- a/functions
+++ b/functions
@@ -1176,6 +1176,13 @@ setup_proc () {
in_target mount -t sysfs sysfs /sys || true
umount_on_exit /sys
fi
+   if [ ! -f "$TARGET/etc/mtab" ]; then
+   if [ -L "$TARGET/proc/self" ]; then
+   cd "$TARGET/etc" && ln -s ../proc/self/mounts 
mtab
+   elif [ -f "$TARGET/proc/mounts" ]; then
+   cd "$TARGET/etc" && ln -s ../proc/mounts mtab
+   fi
+   fi
on_exit clear_mtab
;;
esac
-- 
2.20.1



Re: Asking for access to team

2019-07-22 Thread Hideki Yamane
Hi,

On Mon, 22 Jul 2019 14:27:41 -0300
"eamanu15 ."  wrote:
> I just saw the Hideki Yamane presentation in debconf,
> and I am interest on help on debootstrap and in
> other package's team

 Thanks! :)
 
 Note: my slide on that presentation
 
https://docs.google.com/presentation/d/1_pGrOX8QpDeSnTqoPPn8NYZ_-zEs3egdQMc-R17lZRs/edit#slide=id.p
 


> Could you give me access to the team, please?

 Before that, I suggest you just make a fork repository under your
 account and do "git clone" and look into it. Then check BTS and find
 some bugs you can tackle.

 
 Welcome to debootstrap world :)

-- 
Hideki Yamane 



Bug#951367: debootstrap: Raspbian bootstrap: Failed getting release file

2020-02-16 Thread Hideki Yamane
On Sun, 16 Feb 2020 15:31:56 +0100
Michael Büsch  wrote:
> $ sudo debootstrap --arch=armhf --foreign --verbose 
> --keyring=raspbian-archive-keyring-20120528.2/raspbian.public.key.gpg buster 
> /tmp/debootstrap-test/ 
> http://mirror1.hs-esslingen.de/pub/Mirrors/archive.raspbian.org/raspbian/

 Please try without --verbose, I guess its option is something wrong with.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#935334: debootstrap: man page says that --include will add package to download and extract list, but an experiment shows opposite

2020-02-23 Thread Hideki Yamane
control: tags -1 +moreinfo

Hi,

> So, it follows from manual page that --include=alpha will add a package to 
> set of packages,
> which are extracted at extract stage. But experiment shows that this is not 
> true.

 Please describe your expectation and the results since it's not
 clear for me.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#921815: debootstrap umount "host" /proc when running in a Docker container

2020-02-23 Thread Hideki Yamane
control: tags -1 +moreinfo

Hi,

On Sat, 09 Feb 2019 05:01:32 +0100 "Kristian Klausen"  
wrote:
> Package: debootstrap
> Version: 1.0.110~bpo9+1

> When running debootstrap inside a Docker container, debootstrap umount both 
> /proc and $TARGET/proc.

 How do I check it?

 - run docker
 - get debootstrap 1.0.110 and install it
 - debootstrap sid sid
 - /proc is there inside docker as below

> root@b49ab8b7f3eb:~# ls /proc/
> 1  crypto   iomemkpageflagspartitions   sysrq-trigger
> 19486  devices  ioports  loadavg   pressure sysvipc
> acpi   diskstatsirq  locks sched_debug  thread-self
> asound dma  kallsyms meminfo   schedstattimer_list
> buddyinfo  driver   kcoremisc  self tty
> busexecdomains  key-usersmodules   slabinfo uptime
> cgroupsfb   keys mountssoftirqs version
> cmdlinefilesystems  kmsg mtrr  stat vmallocinfo
> consoles   fs   kpagecgroup  net   swapsvmstat
> cpuinfointerrupts   kpagecount   pagetypeinfo  sys  zoneinfo



-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#926214: debootstrap: clean up /var/cache/apt/archives/*

2020-02-25 Thread Hideki Yamane
control: severity -1 wishlist
control: tags -1 +patch

Hi,
 
 Here's a patch.


diff --git a/debootstrap b/debootstrap
index 8fbf954..397bc09 100755
--- a/debootstrap
+++ b/debootstrap
@@ -33,6 +33,7 @@ ARCH=""
 HOST_ARCH=""
 HOST_OS=""
 KEEP_DEBOOTSTRAP_DIR=""
+KEEP_APT_CACHE=""
 USE_DEBIANINSTALLER_INTERACTION=""
 SECOND_STAGE_ONLY=""
 CHROOTDIR=""
@@ -227,6 +228,10 @@ if [ $# != 0 ] ; then
KEEP_DEBOOTSTRAP_DIR=true
shift
;;
+  --keep-apt-cache)
+   KEEP_APT_CACHE=true
+   shift
+   ;;
--arch|--arch=?*)
if [ "$1" = "--arch" ] && [ -n "$2" ] ; then
ARCH="$2"
@@ -840,6 +845,10 @@ if am_doing_phase second_stage; then
fi
 fi
 
+if [ ! "$KEEP_APT_CACHE" = true ]; then
+   rm -rf "$TARGET/var/cache/apt/archives" "$TARGET/var/lib/apt/lists"
+fi
+
 if am_doing_phase kill_target; then
if [ "$KEEP_DEBOOTSTRAP_DIR" != true ]; then
 info KILLTARGET "Deleting target directory"



Bug#879755: tries to install apt-transport-https even if doesn't exist

2020-02-29 Thread Hideki Yamane
Hi,

 Just simply checking codename patch for debootstrap is here, comments
 are welcome.

 https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/41/diffs


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#830794: --exclude does not apply to required packages, contrary to manpage

2020-03-07 Thread Hideki Yamane
control: fixed -1 1.0.105

I'm not sure why, but it seems to work properly now ;)

> $ sudo debootstrap --variant=minbase --cache-dir=/home/henrich/tmp/cache 
> --exclude=bash buster ~/tmp/buster   
> I: Target architecture can be executed
>   
>   
> I: Retrieving InRelease
> (snip)
> $ sudo chroot ~/tmp/buster 
> chroot: failed to run command '/bin/bash': No such file or directory
> $ sudo chroot ~/tmp/buster /bin/dash
> #

-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: debootstrap 1.0.93+nmu5

2018-03-30 Thread Hideki Yamane
On Wed, 28 Mar 2018 18:07:28 +0200
Cyril Brulebois  wrote:
> I don't really get why you serial-NMU debootstrap instead of just pushing to
> the repository and adding yourself as an uploader?

 I was not aware that I can push it to repo.
 Now I've added myself to uploaders and pushed it, thanks.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: debootstrap 1.0.93+nmu5

2018-03-30 Thread Hideki Yamane
On Fri, 30 Mar 2018 14:24:27 +0200
Raphael Hertzog  wrote:
> debootstrap can be run on a non-Debian system and should not assume that
> apt-config is available. I would suggest to protect this code with
> a check of the existence of apt-config.

 You're right. Then, how about this?

if (which apt-config > /dev/null); then
 
fi




-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Accepted debootstrap 1.0.94 (source all) into unstable

2018-03-30 Thread Hideki Yamane
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Format: 1.8
Date: Fri, 30 Mar 2018 21:41:52 +0900
Source: debootstrap
Binary: debootstrap debootstrap-udeb
Architecture: source all
Version: 1.0.94
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team 
Changed-By: Hideki Yamane 
Description:
 debootstrap - Bootstrap a basic Debian system
 debootstrap-udeb - Bootstrap the Debian system (udeb)
Closes: 894415
Changes:
 debootstrap (1.0.94) unstable; urgency=medium
 .
   * debian/control
 - Add myself to Uploaders
   * scripts/sid
 - Regression fix with #798562 change, work on non-package environment.
   Thanks to Nicolas Boichat  for the report
   (Closes: #894415)
Checksums-Sha1:
 8fe6e1e3dd6a8cdfbe5936b64862e68700e2660e 1991 debootstrap_1.0.94.dsc
 8a12ab62e811c1480af54f62c10e1ce7188c9dbd 68549 debootstrap_1.0.94.tar.gz
 e42576ce046b7bb2ada7e562ea8d7de988480806 19244 debootstrap-udeb_1.0.94_all.udeb
 da8bcf09498f4daba5cba52f1c03f0906062ede7 66332 debootstrap_1.0.94_all.deb
 b478a282a55c8a9d2c4daf8b3df2a3dabf9c6eb3 5764 
debootstrap_1.0.94_amd64.buildinfo
Checksums-Sha256:
 4e54b5c5565e653b5b8f52330416a9e440a2abafe62d16719f102ca1ea2e5ad5 1991 
debootstrap_1.0.94.dsc
 1120762ac938bde56953becaf58036fc7d2917b4562223078c2b5d768ed401af 68549 
debootstrap_1.0.94.tar.gz
 4029d49774a33617c279ef27227203cb41bca6e24bcd467ef03c67476e836c7e 19244 
debootstrap-udeb_1.0.94_all.udeb
 d2cf34156893be5be182791c9d0b920ae102109bb903016eb8aa736acc363243 66332 
debootstrap_1.0.94_all.deb
 faaa106483309b8eb206a0dcd8780e56c8f2fbeca063a73526fd06979ef05a2f 5764 
debootstrap_1.0.94_amd64.buildinfo
Files:
 8a4625273ffd55815f5dfb774ce933fd 1991 admin optional debootstrap_1.0.94.dsc
 a79ab31aace45dc1f54644bcadb4ec2f 68549 admin optional debootstrap_1.0.94.tar.gz
 9e6b314d983630f45aa6fdba23b9abc5 19244 debian-installer optional 
debootstrap-udeb_1.0.94_all.udeb
 825682b2214499fd22aa969e0a21977e 66332 admin optional 
debootstrap_1.0.94_all.deb
 57e6be6bf1b8495f67345a300885196c 5764 admin optional 
debootstrap_1.0.94_amd64.buildinfo

-BEGIN PGP SIGNATURE-

iQJHBAEBCgAxFiEEWOEiL5aWyIWjzRBMXTKNCCqqsUAFAlq+NBoTHGhlbnJpY2hA
ZGViaWFuLm9yZwAKCRBdMo0IKqqxQCnXEACaIV/bo2fmYIoWcUYnNrFRyjR40TEc
Wc5ZamKggOadLB83iKZGZHcgxvHIE7bYjX4Ny/yLccQnBD9V7Z4BP5aWFR2+/zBm
eezE/nyghxVsrU5rfuLN+kf6NLX4Tri1zWjdJNBFyBinxLVEN9hIbGg5mB9ZPzCt
evtH0zcWE9rCU157NFlLM4QLr8MBQlDqKZhEvN+05ih19JmSkg3sPIcnEK3CzCBR
TgkEJfB7wZdJw3pa8l6coOOyLyEa3AeaNG2Xl13HCDcgGpMTr1XaaJv0D9fZVZ1r
PRVGN+BnNHasZFJMEmCT7Bg9vBN6p4Ff8A5EUCckRkg4x0ZiBLlHBW6Oq5GCfUCj
uuMsHCqZu9a6RRmpQZhgHh3nFl/ySBmrqEepgyCblAGUw+zBCiWkIcDkovu+3wFC
yg4VQB16TGD9Ko6qrTNYM7MeRTs2Gy8n2q/MXZkZ89DjA5SMtFE0wRJzQATUpj7x
J7ZV8Mpr2V4Tjd2sR126TApvzGl9hHiXLNvBoaECUR6ZpJ+iHmjGLlOaqga0e5PI
KJZbeSa0otl+K1Z/zhW5tH4sy1raZHYyazzRhWc7zDER/JDibOV0d6GNqZPWWlZu
EPoLXxFhAcc8kVHt3h4gZ9VyIQlO6E1FCg/FDnFogUIAbuCw9OgVOMPFPm3WV3Sw
OfHIRT6TwYMq9A==
=1j8j
-END PGP SIGNATURE-



Re: debootstrap 1.0.93+nmu5

2018-03-30 Thread Hideki Yamane
On Fri, 30 Mar 2018 15:19:52 +0200
Cyril Brulebois  wrote:
> Great, thanks. Please push the tags for the previous uploads too?

 Now pushed :)


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Accepted debootstrap 1.0.95 (source all) into unstable

2018-03-30 Thread Hideki Yamane
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Format: 1.8
Date: Sat, 31 Mar 2018 13:28:26 +0900
Source: debootstrap
Binary: debootstrap debootstrap-udeb
Architecture: source all
Version: 1.0.95
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team 
Changed-By: Hideki Yamane 
Description:
 debootstrap - Bootstrap a basic Debian system
 debootstrap-udeb - Bootstrap the Debian system (udeb)
Closes: 894415
Changes:
 debootstrap (1.0.95) unstable; urgency=medium
 .
   * Really fix #894415 (Closes: #894415)
Checksums-Sha1:
 78fed48ac2bbaf94411e0261fe997cb9d362781e 1991 debootstrap_1.0.95.dsc
 17ff717cf673d601e1368c451b2c2985b243708a 68631 debootstrap_1.0.95.tar.gz
 bfcb480bfb445305206670811d691910003814e4 19240 debootstrap-udeb_1.0.95_all.udeb
 600075a9011129d1a476ca0ffcf33ca6c92260ca 66398 debootstrap_1.0.95_all.deb
 93b8e60c0d365f06fcfd32172a7cbf0119ad809b 5764 
debootstrap_1.0.95_amd64.buildinfo
Checksums-Sha256:
 4d2b821e8872cec75dfd4bb664b4442e7178fb7e7898300943a084f30ff40743 1991 
debootstrap_1.0.95.dsc
 3e83df38f091af0bb40b55e759177e481677a982fd7d484ccc903f46970fedf6 68631 
debootstrap_1.0.95.tar.gz
 87cd4cf4dbaf31dc7703364e8f14fe0cb387a50f7d906272f092e9ff401f530b 19240 
debootstrap-udeb_1.0.95_all.udeb
 7c1d8300280f08dcc10c6cded79eee61b539ba857ab3847bf210361d44adf185 66398 
debootstrap_1.0.95_all.deb
 4eca0c4cac87b6e760f3a6ae5393f36bcda65033e40741774a5538b90c3fd1bc 5764 
debootstrap_1.0.95_amd64.buildinfo
Files:
 539b87ff48853e92837e930b98384f10 1991 admin optional debootstrap_1.0.95.dsc
 35456e3bb6847b7878a13ae755c75145 68631 admin optional debootstrap_1.0.95.tar.gz
 66f35202ec2f75ef2d289a3bf5e81c89 19240 debian-installer optional 
debootstrap-udeb_1.0.95_all.udeb
 f0f1aa14385e3e9fadc70bad154239b9 66398 admin optional 
debootstrap_1.0.95_all.deb
 858b7f2616af306c0cbbf69f3a0ce5a0 5764 admin optional 
debootstrap_1.0.95_amd64.buildinfo

-BEGIN PGP SIGNATURE-

iQJHBAEBCgAxFiEEWOEiL5aWyIWjzRBMXTKNCCqqsUAFAlq/ErATHGhlbnJpY2hA
ZGViaWFuLm9yZwAKCRBdMo0IKqqxQM10D/wLIG6E8e1lt9GVIKIzBW2fxIVC+T8f
17AM1MIUwOgkbOX+0B0OhDZpBIsZIEdcsrg5ctsdPQi1oEgeObKb3Y8w4O8MxaHS
8VhEo/rSoi2n0OIDsH9OGLtf7KJ6FxEGWGv/M+avca/eUKeL6aN8MIFdDMB0mc2l
HUsHGNmhzW67OPLXkOiqIzpjCdnYxD4fw6h34rSCs6oekIUV1oh3vt4rvAaCV35q
7FKliGCbk8EFjPRl860YaBNgfmyVBDXRBKbqCjssCD/buBfT847ZQN3ACecWrpXT
QPZvXlYHjRKxwEhEUEu2Wrb+w9wCYT24mauP9xNkPJ73dJyVsgOETsmg635FnW48
9kjHhIfUps4VCN0awRmJF3QxD1n82AapIBvNe/df3jgZvtEcgRJWONg7Vf4ckxRs
oBjZfW4im1y5mwhXLihwIrhOjAEZqqVTLwAeeyvfxLM6APCLNAO5zyGAI1UeMUkE
DZEbHoIlLY5ckEg+Op6y3axVPVeI6zt8jvEmQCe017FszrqpaG7ZZSftlb1/CqIa
jvXe5SHqui3MVAdQig+PG31pgnSzeT0awh1NEtS1SotNi5+WM6wxv+A/C7QEO5QA
/qApN10E/iJ8VXrbRt6DOMeCcs5S7NRnDYvJg7xQ2it/ykutiknpAByeraMWvohz
3o2RppW9MEkssw==
=xyVy
-END PGP SIGNATURE-



Fw: Re: debootstrap: APTCACHE for debootstrap

2018-04-01 Thread Hideki Yamane
Hi list,

 Please look at attached patch to improve debootstrap speed via
 using pre-downloaded .deb files. If you have any comments, please
 send it to Bug #844118

Begin forwarded message:

Hi,

On Sat, 12 Nov 2016 22:26:02 +0530
Ritesh Raj Sarraf  wrote:
> It'd be nice if we could have debootstrap accept a new switch,
> --cachedir. This will help a lot, especially in cases where people are
> making chroots in a Debian box. Because, in most common cases, the
> running Debian instanace may have some .debs available in its cache
> folder.

 I've tried to add --cachedir, not tested much, but it works.
 Could you check attached patch, please?

 
Test result without cache (normal)
real3m39.558s
user1m28.939s
sys 0m10.473s

With cache
real1m49.924s
user1m29.232s
sys 0m8.732s


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp
>From e8250df72852f1a3af35ad356925ee3df6af458e Mon Sep 17 00:00:00 2001
From: Hideki Yamane 
Date: Sun, 1 Apr 2018 19:43:31 +0900
Subject: [PATCH] Add cachedir feature

Save deb files under cachedir, it reduce fetch time and improve installation
time. Closes #551838 and #844118
---
 debootstrap   | 20 
 debootstrap.8 |  3 +++
 functions | 16 +---
 3 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/debootstrap b/debootstrap
index 9b547ad..14b031c 100755
--- a/debootstrap
+++ b/debootstrap
@@ -45,6 +45,7 @@ VERBOSE=""
 CERTIFICATE=""
 CHECKCERTIF=""
 PRIVATEKEY=""
+CACHE_DIR=""
 
 DEF_MIRROR="http://deb.debian.org/debian";
 DEF_HTTPS_MIRROR="https://deb.debian.org/debian";
@@ -109,6 +110,8 @@ usage()
  of a missing keyring), aborting otherwise
   --no-resolve-deps  don't try to resolve dependencies automatically
 
+  --cachedir=DIR Use DIR as package cache directory
+
   --unpack-tarball=T acquire .debs from a tarball instead of http
   --make-tarball=T   download .debs and create a tarball (tgz format)
   --second-stage-target=DIR
@@ -238,6 +241,23 @@ if [ $# != 0 ] ; then
 			error 1 BADEXTRACTOR "%s: unknown extractor" "$EXTRACTOR_OVERRIDE"
 		fi
 		;;
+	--cachedir|--cachedir=?*)
+		if [ "$1" = "--cachedir" ] && [ -n "$2" ] ; then
+			CACHE_DIR="$2"
+			shift 2
+		elif [ "$1" != "${1#--cachedir=}" ]; then
+			CACHE_DIR="${1#--cachedir=}"
+			shift
+		else
+			error 1 NEEDARG "option requires an argument %s" "$1"
+		fi
+		if [ ! -d "$CACHE_DIR" ] ; then
+			error 1 NOCACHEDIR "%s: No such directory" "$CACHE_DIR"
+		fi
+		if [ ! -z ${CACHE_DIR##/*} ]; then
+			error 1 NOTABSOLUTEPATH "cachedir should be specified as absolute path"
+		fi
+		;;
 	--unpack-tarball|--unpack-tarball=?*)
 		if [ "$1" = "--unpack-tarball" -a -n "$2" ] ; then
 			UNPACK_TARBALL="$2"
diff --git a/debootstrap.8 b/debootstrap.8
index e802003..fe65d85 100644
--- a/debootstrap.8
+++ b/debootstrap.8
@@ -136,6 +136,9 @@ a foreign chroot) (requires \-\-second\-stage)
 Don't delete the /debootstrap directory in the target after completing the
 installation.
 .IP
+.IP "\fB\-\-cachedir=DIR\fP"
+Cache .deb files under directory. It should be absolute path.
+.IP
 .IP "\fB\-\-unpack\-tarball=FILE\fP"
 Acquire .debs from tarball FILE instead of downloading via http.
 .IP
diff --git a/functions b/functions
index b780488..309399b 100644
--- a/functions
+++ b/functions
@@ -337,7 +337,9 @@ get () {
 		*)   from="$1"; dest="$2" ;;
 		esac
 
-		if [ "${dest#/}" = "$dest" ]; then
+		if [ ! -z "$CACHE_DIR" ]; then
+			dest="${dest%%*/}"
+		elif [ "${dest#/}" = "$dest" ]; then
 			dest="./$dest"
 		fi
 		local dest2="$dest"
@@ -347,7 +349,9 @@ get () {
 
 		while [ "$iters" -lt 10 ]; do
 			info RETRIEVING "Retrieving %s %s" "$displayname" "$versionname"
-			if ! just_get "$from" "$dest2"; then continue 2; fi
+			if [ ! -e "$dest2" ]; then
+if ! just_get "$from" "$dest2"; then continue 2; fi
+			fi
 			if [ "$checksum" != "" ]; then
 info VALIDATING "Validating %s %s" "$displayname" "$versionname"
 if verify_checksum "$dest2" "$checksum" "$siz"; then
@@ -717,10 +721,16 @@ download_debs () {
 			else
 progress_next "$(($dloaddebs + $size))"
 local debdest="$($DLDEST deb "$p" "$ver" "$arc" "$m" "$fil")"
-if get "$m/$fil" "$TARGET/$debdest" "$checksum" "$siz

Re: debootstrap 1.0.93+nmu5

2018-04-03 Thread Hideki Yamane
On Tue, 3 Apr 2018 11:20:43 +0200
Raphael Hertzog  wrote:
> In most postinst snippets, it is used like this:
> 
>   if which apt-config >/dev/null 2>&1; then
> 
> I don't see the need for a sub-shell.

 I've tried which command on NetBSD, it failed. So just check "test -e"
 for /usr/bin/apt-config as below.


diff --git a/debootstrap b/debootstrap
index 083473d..dfdff4b 100755
--- a/debootstrap
+++ b/debootstrap
@@ -51,15 +51,16 @@ DEF_HTTPS_MIRROR="https://deb.debian.org/debian";
 
 # do auto proxy discovery
 AUTOPROXY=""
-eval $(apt-config shell AUTOPROXY Acquire::http::ProxyAutoDetect)
-if [ -z "$http_proxy" ] && [ -x "$AUTOPROXY" ]; then
-http_proxy="$($AUTOPROXY)"
-if [ -n "$http_proxy" ]; then
-echo "Using auto-detected proxy: $http_proxy"
-export http_proxy
+if [ -e /usr/bin/apt-config ]; then
+eval $(apt-config shell AUTOPROXY Acquire::http::ProxyAutoDetect)
+if [ -z "$http_proxy" ] && [ -x "$AUTOPROXY" ]; then
+http_proxy="$($AUTOPROXY)"
+if [ -n "$http_proxy" ]; then
+echo "Using auto-detected proxy: $http_proxy"
+export http_proxy
+fi
 fi
 fi
-



Re: debootstrap 1.0.93+nmu5

2018-04-03 Thread Hideki Yamane
On Tue, 3 Apr 2018 11:53:45 +0200
Raphael Hertzog  wrote:
> > +if [ -e /usr/bin/apt-config ]; then
> 
> In case like this, you usually use "-x" to ensure it's also executable.

 Thanks :)

-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#563647: debootstrap: manpage neglects complete path for

2018-04-03 Thread Hideki Yamane
 --unpack-tarball
Message-Id: <20180403194408.2fe90c84d510e7c600c25...@iijmio-mail.jp>
In-Reply-To: <20180321173607.98899f6a4719754b42d41...@iijmio-mail.jp>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hi list,

 Could you review below messages in deboostrap manpage, please?

On Wed, 21 Mar 2018 17:36:07 +0900 Hideki Yamane  wrote:
>  Here's a proposed patch for it.
> 
> diff --git a/debootstrap b/debootstrap
> index 083473d..1d5d5c6 100755
> --- a/debootstrap
> +++ b/debootstrap
> @@ -550,7 +550,7 @@ fi
>  
>  if [ "$UNPACK_TARBALL" ]; then
>   if [ "${UNPACK_TARBALL#/}" = "$UNPACK_TARBALL" ]; then
> - error 1 TARPATH "Tarball must be given a complete path"
> + error 1 TARPATH "Tarball must be given an absolute path"
>   fi
>   if [ "${UNPACK_TARBALL%.tar}" != "$UNPACK_TARBALL" ]; then
>   (cd "$TARGET" && tar -xf "$UNPACK_TARBALL")
> diff --git a/debootstrap.8 b/debootstrap.8
> index e802003..699f1fd 100644
> --- a/debootstrap.8
> +++ b/debootstrap.8
> @@ -137,11 +137,12 @@ Don't delete the /debootstrap directory in the target 
> after completing the
>  installation.
>  .IP
>  .IP "\fB\-\-unpack\-tarball=FILE\fP"
> -Acquire .debs from tarball FILE instead of downloading via http.
> +Acquire .debs from gzipped tarball FILE (specified with absolute path)
> +instead of downloading via http.
>  .IP
>  .IP "\fB\-\-make\-tarball=FILE\fP"
> -Instead of bootstrapping, make a tarball (written to FILE) of the downloaded
> -packages.
> +Instead of bootstrapping, make a gzipped tarball (written to FILE) of the
> +downloaded packages.
>  The resulting tarball may be passed to a later
>  .BR \-\-unpack\-tarball .
>  .IP
> 
> 



-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#563647: debootstrap: manpage neglects complete path for

2018-04-03 Thread Hideki Yamane
Hi,

On Tue, 3 Apr 2018 12:30:34 +0100
Justin B Rye  wrote:
> >  Could you review below messages in deboostrap manpage, please?
> 
> Looks good to me.

 Thanks!


> If I was doing a pedantic review of every bit of debootstrap's
> documentation and output I'd suggest replacing "http(s)" with
> "HTTP(S)" throughout, but there's no point doing that just here.

 I can find only one "via http" word, as below. Is it okay?

diff --git a/debootstrap.8 b/debootstrap.8
index e802003..87e2ae1 100644
--- a/debootstrap.8
+++ b/debootstrap.8
@@ -137,7 +137,7 @@ Don't delete the /debootstrap directory in the target after 
completing the
 installation.
 .IP
 .IP "\fB\-\-unpack\-tarball=FILE\fP"
-Acquire .debs from tarball FILE instead of downloading via http.
+Acquire .debs from tarball FILE instead of downloading via HTTP(S).
 .IP
 .IP "\fB\-\-make\-tarball=FILE\fP"
 Instead of bootstrapping, make a tarball (written to FILE) of the downloaded


 


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#563647: debootstrap: manpage neglects complete path for

2018-04-03 Thread Hideki Yamane
On Tue, 3 Apr 2018 13:14:15 +0100
Justin B Rye  wrote:
> Yes, this is an improvement if it might use HTTPS, though not if it
> will always use HTTP.

 debootstrap work depends on mirror and it use both HTTP and HTTPS
 by default.


> But you missed the equivalent text in the debootstrap usage message:

 Okay, I just looked at debootstrap.8 file. Fixed :)


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: debootstrap 1.0.93+nmu5

2018-04-05 Thread Hideki Yamane
On Thu, 05 Apr 2018 12:58:09 +0200
Ben Hutchings  wrote:
> The portable way to look for a command, without running it or
> hardcoding the directory, is 'command -v'.

 Thanks, it looks better.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#866401: Please print proper error message when download fails

2018-04-05 Thread Hideki Yamane
On Thu, 22 Mar 2018 09:59:21 +0100
Raphael Hertzog  wrote:
> busybox's wget does not fail with this option but it also does not change
> its behaviour. And we already have the verbose option to enable verbose
> logging so this is really not necessary.

 Yes, but we don't always use busybox's one, and verbose logging is
 too much. non-verbose is better than quiet and verbose, IMHO.


> I think that your whole interpretation of this bug report is flawed. The bug
> reporter complains of this error message:
> 
> E: Couldn't download dists/jessie/main/binary-armhf/Packages
> 
> And fixing it to include the full URL is not hard:

 Awesome, thanks for the patch!


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#826709: Doesn't mention --foreign in help output

2018-04-05 Thread Hideki Yamane
control: tags -1 +pending

On Fri, 6 Apr 2018 01:28:07 +0200
Adam Borowski  wrote:
> Thus, I'm attaching three patches:
> 1. run in_target /bin/true before anything else in the second stage
> 2. check arch-test if installed
> 3. Recommend: arch-test

 Looks good, many thanks! :)


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Call for revirew: APTCACHE for debootstrap

2018-04-05 Thread Hideki Yamane
Hi,

 Please look at attached patch to improve debootstrap speed via
 using pre-downloaded .deb files. If you have any comments, please
 send it to Bug #844118
 

>From e8250df72852f1a3af35ad356925ee3df6af458e Mon Sep 17 00:00:00 2001
From: Hideki Yamane 
Date: Sun, 1 Apr 2018 19:43:31 +0900
Subject: [PATCH] Add cachedir feature

Save deb files under cachedir, it reduce fetch time and improve installation
time. Closes #551838 and #844118
---
 debootstrap   | 20 
 debootstrap.8 |  3 +++
 functions | 16 +---
 3 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/debootstrap b/debootstrap
index 9b547ad..14b031c 100755
--- a/debootstrap
+++ b/debootstrap
@@ -45,6 +45,7 @@ VERBOSE=""
 CERTIFICATE=""
 CHECKCERTIF=""
 PRIVATEKEY=""
+CACHE_DIR=""
 
 DEF_MIRROR="http://deb.debian.org/debian";;
 DEF_HTTPS_MIRROR="https://deb.debian.org/debian";;
@@ -109,6 +110,8 @@ usage()
  of a missing keyring), aborting otherwise
   --no-resolve-deps  don't try to resolve dependencies automatically
 
+  --cachedir=DIR Use DIR as package cache directory
+
   --unpack-tarball=T acquire .debs from a tarball instead of http
   --make-tarball=T   download .debs and create a tarball (tgz format)
   --second-stage-target=DIR
@@ -238,6 +241,23 @@ if [ $# != 0 ] ; then
error 1 BADEXTRACTOR "%s: unknown extractor" 
"$EXTRACTOR_OVERRIDE"
fi
;;
+   --cachedir|--cachedir=?*)
+   if [ "$1" = "--cachedir" ] && [ -n "$2" ] ; then
+   CACHE_DIR="$2"
+   shift 2
+   elif [ "$1" != "${1#--cachedir=}" ]; then
+   CACHE_DIR="${1#--cachedir=}"
+   shift
+   else
+   error 1 NEEDARG "option requires an argument %s" "$1"
+   fi
+   if [ ! -d "$CACHE_DIR" ] ; then
+   error 1 NOCACHEDIR "%s: No such directory" "$CACHE_DIR"
+   fi
+   if [ ! -z ${CACHE_DIR##/*} ]; then
+   error 1 NOTABSOLUTEPATH "cachedir should be specified 
as absolute path"
+   fi
+   ;;
--unpack-tarball|--unpack-tarball=?*)
if [ "$1" = "--unpack-tarball" -a -n "$2" ] ; then
UNPACK_TARBALL="$2"
diff --git a/debootstrap.8 b/debootstrap.8
index e802003..fe65d85 100644
--- a/debootstrap.8
+++ b/debootstrap.8
@@ -136,6 +136,9 @@ a foreign chroot) (requires \-\-second\-stage)
 Don't delete the /debootstrap directory in the target after completing the
 installation.
 .IP
+.IP "\fB\-\-cachedir=DIR\fP"
+Cache .deb files under directory. It should be absolute path.
+.IP
 .IP "\fB\-\-unpack\-tarball=FILE\fP"
 Acquire .debs from tarball FILE instead of downloading via http.
 .IP
diff --git a/functions b/functions
index b780488..309399b 100644
--- a/functions
+++ b/functions
@@ -337,7 +337,9 @@ get () {
*)   from="$1"; dest="$2" ;;
esac
 
-   if [ "${dest#/}" = "$dest" ]; then
+   if [ ! -z "$CACHE_DIR" ]; then
+   dest="${dest%%*/}"
+   elif [ "${dest#/}" = "$dest" ]; then
dest="./$dest"
fi
local dest2="$dest"
@@ -347,7 +349,9 @@ get () {
 
while [ "$iters" -lt 10 ]; do
info RETRIEVING "Retrieving %s %s" "$displayname" 
"$versionname"
-   if ! just_get "$from" "$dest2"; then continue 2; fi
+   if [ ! -e "$dest2" ]; then
+   if ! just_get "$from" "$dest2"; then continue 
2; fi
+   fi
if [ "$checksum" != "" ]; then
info VALIDATING "Validating %s %s" 
"$displayname" "$versionname"
if verify_checksum "$dest2" "$checksum" "$siz"; 
then
@@ -717,10 +721,16 @@ download_debs () {
else
progress_next "$(($dloaddebs + $size))"
local debdest="$($DLDEST deb "$p" "$ver" "$arc" 
"$m" "$fil")"
-   if get "$m/$fil&q

Bug#551838: debootstrap --unpack-tarball downloads Packages file.

2018-04-05 Thread Hideki Yamane
control: retitle -1 Do not download packages with --unpack-tarball option


Hi,

On Sat, 12 Feb 2011 00:28:51 +0100 Bertram Felgenhauer 
 wrote:
> Package: debootstrap
> Version: 1.0.27
> 
> When running debootstrap --unpack-tarball using a tarball created
> with the --make-tarball, the Packages file is downloaded again,
> despite being included in the tarball.

 It seems that a different topic with original report.
 Original report can be solved with the patch at Bug#844118
 I would change title of this bug report.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#895096: debootstrap: -unpack-tarball option doesn't recognize tar.gz file

2018-04-06 Thread Hideki Yamane
package: debootstrap
severity: minor
tags: patch

Hi,

 --unpack-tarball option doesn't recognize tar.gz

> $ sudo debootstrap --unpack-tarball=/home/henrich/tmp/debootstrap.tar.gz sid 
> sid
> E: Unknown tarball: must be either .tar or .tgz


 And here's a proposed patch.
 
diff --git a/debootstrap b/debootstrap
index f67326c..1934f59 100755
--- a/debootstrap
+++ b/debootstrap
@@ -122,7 +122,7 @@ usage()
   --no-resolve-deps  don't try to resolve dependencies automatically
 
   --unpack-tarball=T acquire .debs from a tarball instead of http
-  --make-tarball=T   download .debs and create a tarball (tgz format)
+  --make-tarball=T   download .debs and create a tarball
   --second-stage-target=DIR
  Run second stage in a subdirectory instead of root
(can be used to create a foreign chroot)
@@ -577,10 +577,12 @@ if [ "$UNPACK_TARBALL" ]; then
fi
if [ "${UNPACK_TARBALL%.tar}" != "$UNPACK_TARBALL" ]; then
(cd "$TARGET" && tar -xf "$UNPACK_TARBALL")
+   elif [ "${UNPACK_TARBALL%.tar.[g|x]z}" != "$UNPACK_TARBALL" ]; then
+   (cd "$TARGET" && tar -xf "$UNPACK_TARBALL")
elif [ "${UNPACK_TARBALL%.tgz}" != "$UNPACK_TARBALL" ]; then
(cd "$TARGET" && zcat "$UNPACK_TARBALL" | tar -xf -)
else
-   error 1 NOTTAR "Unknown tarball: must be either .tar or .tgz"
+   error 1 NOTTAR "Unknown tarball: must be .tar.[gz,xz], .tar or 
.tgz"
fi
 fi



Bug#700633: Debootstrap is very slow. Please use eatmydata to fix this.

2018-04-08 Thread Hideki Yamane
Hi,

On Sat, 16 Feb 2013 16:54:52 -0700 Bob Proulx  wrote:
> I have also been suffering with the much slower dpkg on Sid.  Today I
> performed a test of a default debootstrap chroot and had this
> benchmark data.  I am using a local full mirror so that network
> performance is not significant in the measurement.  This is using the
> stock Sid version of everything up to date as of today operating on an
> ext3 filesystem.
> 
>   # time debootstrap wheezy testinstall 
> http://localmirror/ftp.us.debian.org/debian
>   ...
>   real2m58.577s
>   user0m49.639s
>   sys 0m8.749s
> 
> And then using the patched debootstrap script Phillip Susi suggested I
> get this result:
> 
>   # time debootstrap wheezy testinstall 
> http://localmirror/ftp.us.debian.org/debian
>   ...
>   real1m17.680s
>   user0m49.879s
>   sys 0m7.988s
> 
> Wall clock time is more than 2x faster for me when avoiding the
> unnecessary fsync() calls.  Ideally I would like to see dpkg handle
> this issue.  But since that doesn't seem to be happening it would be
> nice if the rest of the ecosystem could work around it.
> 
> Here is the same test again on an ext4 filesystem on the same system
> and the stock scripts.
> 
>   # time debootstrap wheezy testinstall 
> http://localmirror/ftp.us.debian.org/debian
>   ...
>   real2m55.402s
>   user0m52.107s
>   sys 0m7.888s
> 
> And again with the eatmydata patched script:
> 
>   # time debootstrap wheezy testinstall 
> http://localmirror/ftp.us.debian.org/debian
>   ...
>   real1m4.819s
>   user0m48.455s
>   sys 0m6.752s
> 
> That is 2.7x faster on ext4.

 I've tested it but could not get good result as yours.

 - Use SSD and USB2.0 connected HDD
 - both ext4 formatted
 - debootstrap is patched with https://bugs.debian.org/844118


Without eatmydata on SSD
---
real2m10.057s
user1m47.776s
sys 0m8.060s

With eatmydata on SSD
---
real2m8.640s
user1m47.546s   
sys 0m8.049s  

Without eatmydata on HDD
---
real2m25.136s
user1m47.758s
sys 0m8.603s

With eatmydata on HDD
---
real2m26.790s
user1m48.699s
sys 0m8.470s


 So I doubt using eatmydata.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#891393: debootstrap: Should warn about distributions that need vsyscall enabled

2018-04-09 Thread Hideki Yamane
Hi,

On Mon, 26 Feb 2018 23:19:43 +0900 Hideki Yamane  wrote:
> > debootstrap could perhaps warn about the need to enable vsyscalls for
> > old amd64 distributions.  (Annoyingly, there's no easy way to detect
> > whether they are currently enabled.)
> 
>  Just showing some errors about it is fine, IMO.

 And here's a proposed patch. Could you check it, please?


diff --git a/scripts/debian-common b/scripts/debian-common
index 4ab1fe8..830a99e 100644
--- a/scripts/debian-common
+++ b/scripts/debian-common
@@ -59,6 +59,17 @@ first_stage_install () {
 }
 
 second_stage_install () {
+   case "$CODENAME" in
+   
etch|etch-m68k|jessie|jessie-kfreebsd|lenny|squeeze|wheezy|hoary|breezy|dapper|edgy|feisty|gusty|hardy|interpid|jaunty|karmic)
+   if [ "$ARCH" = amd64 ] && [ "$HOST_ARCH" = amd64 ] && \
+   [ $(uname -r | awk 
'BEGIN{FS="."}{printf("%d%03d", $1, $2)}') -gt 4009 ]; then
+   warning VIRTUALSYSCALL "You're trying to create 
an old amd64 release on newer one, and it may cause segfault due to 
incompatibility.\n   If you'd face such case, you should add 'vsyscall=emulate' 
to your kernel parametar.\n   For detail, see 
/usr/share/doc/linux-image-amd64/NEWS.Debian.gz"
+   fi
+   ;;
+   *)
+   ;;
+   esac
+
in_target /bin/true
 
setup_dynamic_devices



Bug#895412: debootstrap: Cannot find dpkg on NetBSD (or other OSes using pkgsrc)

2018-04-11 Thread Hideki Yamane
package: debootstrap
severity: minor

Hi,

 On NetBSD, we can install dpkg via pkgsrc but it's under /usr/pkg/bin

netbsd# ./debootstrap: /usr/bin/dpkg: not found
netbsd# which dpkg
/usr/pkg/bin/dpkg

 And now dpkg is specified with absolute path as below.
 
> if in_path dpkg && \
>  dpkg --print-architecture >/dev/null 2>&1; then
> HOST_ARCH=$(/usr/bin/dpkg --print-architecture)
> elif in_path udpkg && \  
>  udpkg --print-architecture >/dev/null 2>&1; then
> HOST_ARCH=$(/usr/bin/udpkg --print-architecture)


 Is there any reason to do so? Just use dpkg is something wrong?


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#895412: debootstrap: Cannot find dpkg on NetBSD (or other OSes using pkgsrc)

2018-04-11 Thread Hideki Yamane
On Wed, 11 Apr 2018 18:37:38 +0900 Hideki Yamane  wrote:
>  Is there any reason to do so? Just use dpkg is something wrong?

 Here's a first proposal patch.


diff --git a/debootstrap b/debootstrap
index 891af2d..23f1ef6 100755
--- a/debootstrap
+++ b/debootstrap
@@ -472,10 +472,10 @@ fi
 
 if in_path dpkg && \
  dpkg --print-architecture >/dev/null 2>&1; then
-   HOST_ARCH=$(/usr/bin/dpkg --print-architecture)
+   HOST_ARCH=$(dpkg --print-architecture)
 elif in_path udpkg && \
  udpkg --print-architecture >/dev/null 2>&1; then
-   HOST_ARCH=$(/usr/bin/udpkg --print-architecture)
+   HOST_ARCH=$(udpkg --print-architecture)
 elif [ -e "$DEBOOTSTRAP_DIR/arch" ]; then
HOST_ARCH=$(cat "$DEBOOTSTRAP_DIR/arch")
 fi
@@ -495,6 +495,9 @@ if [ -z "$HOST_OS" ]; then
FreeBSD*)
HOST_OS=freebsd
;;
+   NetBSD)
+   HOST_OS=netbsd
+   ;;
esac
 fi
diff --git a/functions b/functions
index 005b007..e588e83 100644
--- a/functions
+++ b/functions
@@ -1127,6 +1127,9 @@ setup_proc () {
settrans -a "$TARGET/servers" /hurd/firmlink /servers
settrans -a "$TARGET/proc" /hurd/firmlink /proc
;;
+   netbsd*)
+   # Just a stub
+   ;;
*)
umount_on_exit /dev/pts
umount_on_exit /dev/shm
@@ -1170,6 +1173,8 @@ setup_devices () {
;;
hurd*)
;;
+   netbsd*)
+   ;;
*)
setup_devices_simple
;;
@@ -1190,6 +1195,9 @@ setup_dynamic_devices () {
hurd*)
# Use the setup-translators of the hurd package
in_target /usr/lib/hurd/setup-translators -k ;;
+   netbsd*)
+   # Just a stub
+   ;;
esac
 }
 
@@ -1517,7 +1525,7 @@ check_sane_mount () {
mkdir -p "$1"
 
case "$HOST_OS" in
-   *freebsd*|hurd*)
+   *freebsd*|hurd*|netbsd*)
;;
*)
if ! doing_variant fakechroot &&  ! grep -q 
container=lxc-libvirt /proc/1/environ; then



Bug#895466: debootstrap 1.0.96 fails due to missing apt-config

2018-04-12 Thread Hideki Yamane
Hi,

 Thanks for the fix, I was really moron.


On Thu, 12 Apr 2018 09:58:04 +0200
Raphael Hertzog  wrote:
> I pushed a proper fix to git.

 Well, other part of fixes,

> Drop default value for --cache-dir parameter
> 
> It is not at all appropriate for debootstrap to start putting files
> in APT's cache of .deb files (it could possibly use it in a read-only
> way, but writing to it is not desirable). Furthermore the code was not
> working as expected, the default value was only put in place if the
> --cache-dir option was passed and it would require an explicit value
> anyway.

 It's not so wrong to put files under /var/cache/apt/archives, IMO.
 Users can get benefit without any notices with --cache-dir option.
 And I want to know the situation this doesn't work, so could you
 give me more explanation, please?


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: debootstrap and using /var/cache/apt/archives as --cache-dir

2018-04-16 Thread Hideki Yamane
On Thu, 12 Apr 2018 10:41:57 +0200
Raphael Hertzog  wrote:
> 1/ You will put files there but what happens if "apt-get clean" is run in
> a cron job while you are running debootstrap ?
> 
> 2/ APT stores files there with a naming policy of its own (for instance
> it adds the epoch to the version) and you are not respecting that policy
> and you can run into trouble due to this. APT is able to clean up files
> it puts there, but it might not be able to clean up files put there by
> others in particular when their name is not consistent with what it uses.
> 
> 3/ debootstrap ought to be usable on any machine to bootstrap any
> distribution, what happens if /var/cache/apt/archives contains ubuntu
> packages (same name, same version, recompiled for ubuntu) and you want to
> bootstrap debian and not ubuntu ? You will remove the pre-existing file
> and put there a Debian package, breaking APT's cache.
> 
> For all those reasons, I'm really sure that it is not a good idea
> to enable that directory as default --cache-dir.

 Thanks, 1 is rare, but 2 and 3 sound reasonable.
 Then, can we make any directories for cache option by default?
 

-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#871835: Call for help: review patches for debootstrap

2018-04-16 Thread Hideki Yamane
Hi,

On Wed, 11 Apr 2018 13:06:22 +0200
Clément Hermann  wrote:
> I had a look today. It looks good to me, at first glance I had concerns
> (like using hash keys in boolean context without the exists function),
> but everytime I checked further, it looked fine in context. That for the
> perl part.
> 
> Other than that, if I may give my opinion, the commit messages make the
> patches pretty self explanatory, and the portability concerns are
> adressed (you still need grep -E but busybox can provide it, if your
> grep doesn't implement it). The changes make perfect sense and the
> performance boost is impresssive.
> 
> Barring any concern from someone more knowledgeable, I would definitely
> apply this :)

 Thanks for your check! :)
 And yes, performance improvement is so attractive for us.

 First review seems to be good status. And of course, more people
 are also welcome.

 
-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: debootstrap and using /var/cache/apt/archives as --cache-dir

2018-04-17 Thread Hideki Yamane
Hi,

On Tue, 17 Apr 2018 09:57:13 +0200
Raphael Hertzog  wrote:
> You could create /var/cache/debootstrap for this purpose but I'm not
> convinced that this is needed because if someone really cares about the
> performance of debootstrap runs, it will likely already have optimized
> the download of .deb files by using a package proxy or a local mirror.
> 
> And you already made it easier to reuse proxy settings from APT.
> 
> And again debootstrap is made to work with multiple Debian derivatives
> so a single cache directory does not make a sensible default... my point
> 3 still holds even if it's /var/cache/debootstrap. In theory you want a
> cache directory per "vendor" (debian, ubuntu, kali, etc.).
> 
> All in all I believe that it's not worth the effort.

 Okay, mixture of derivatives is dangerous. I'd forget to set it as default.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#741964: debootstrap: --variant=fakechroot and --foreign

2018-04-17 Thread Hideki Yamane
control: tags -1 +pending

On Wed, 17 Feb 2016 15:44:53 + jhcha54008  wrote:
> Here is an updated patch for debootstrap 1.0.78+nmu1.

 Adjust it for current git.


diff --git a/scripts/debian-common b/scripts/debian-common
index 4ab1fe8..9b313fc 100644
--- a/scripts/debian-common
+++ b/scripts/debian-common
@@ -56,6 +56,10 @@ first_stage_install () {
fi
 
setup_devices
+
+   if doing_variant fakechroot; then
+   setup_proc_fakechroot
+   fi
 }
 
 second_stage_install () {
@@ -89,9 +93,7 @@ Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
baseprog="$(($baseprog + ${1:-1}))"
}
 
-   if doing_variant fakechroot; then
-   setup_proc_fakechroot
-   else
+   if doing_variant ! fakechroot; then
setup_proc
in_target /sbin/ldconfig
fi



Bug#840372: debootstrap: second-stage fails within systemd-nspawn: proc already mounted

2018-04-17 Thread Hideki Yamane
control: tags -1 +confirm
control: tags -1 +patch

On Tue, 11 Oct 2016 03:50:51 +0200 linus.luess...@c0d3.blue wrote:
> $ sudo systemd-nspawn --bind /usr/bin/qemu-x86_64-static -D "./.amd64/" 
> /bin/bash -c "mkdir /tmp/proc; mount --move /proc /tmp/proc; 
> /debootstrap/debootstrap --second-stage"
> 
> 
> So it looks like systemd-nspawn already took care of mounting /proc and
> debootstrap fails when trying to do the same? Maybe debootstrap could
> just skip mounting /proc if this mount is already present?

 Here's a proposed patch.


diff --git a/functions b/functions
index 005b007..10938fe 100644
--- a/functions
+++ b/functions
@@ -1133,12 +1133,15 @@ setup_proc () {
umount_on_exit /proc
umount_on_exit /proc/bus/usb
umount "$TARGET/proc" 2>/dev/null || true
-   in_target mount -t proc proc /proc
-   if [ -d "$TARGET/sys" ] && \
-  grep -q '[[:space:]]sysfs' /proc/filesystems 2>/dev/null; 
then
-   umount_on_exit /sys
-   umount "$TARGET/sys" 2>/dev/null || true
-   in_target mount -t sysfs sysfs /sys
+   # if systemd-nspawn is used at second-stage, it already treats 
/proc and so on
+   if [ ! -n "$(ls -A /proc)" ]; then
+   in_target mount -t proc proc /proc
+   if [ -d "$TARGET/sys" ] && \
+  grep -q '[[:space:]]sysfs' /proc/filesystems 
2>/dev/null; then
+   umount_on_exit /sys
+   umount "$TARGET/sys" 2>/dev/null || true
+   in_target mount -t sysfs sysfs /sys
+   fi
fi
on_exit clear_mtab
;;



Bug#731802: [PATCH] Fix second-stage failure within systemd-nspawn and it also bring another fix on lxc

2018-04-17 Thread Hideki Yamane
Here's a patch for both bugs, just check under /proc.


>From df9ee36d23141a08834c7f4c778e4b01424bbab6 Mon Sep 17 00:00:00 2001
From: Hideki Yamane 
Date: Tue, 17 Apr 2018 23:46:16 +0900
Subject: [PATCH] Fix second-stage failure within systemd-nspawn (Closes:
 #840372)

And it also bring another fix on lxc (Closes: #731802)
---
 functions | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/functions b/functions
index 005b007..eb70d72 100644
--- a/functions
+++ b/functions
@@ -1133,12 +1133,16 @@ setup_proc () {
umount_on_exit /proc
umount_on_exit /proc/bus/usb
umount "$TARGET/proc" 2>/dev/null || true
-   in_target mount -t proc proc /proc
-   if [ -d "$TARGET/sys" ] && \
-  grep -q '[[:space:]]sysfs' /proc/filesystems 2>/dev/null; 
then
-   umount_on_exit /sys
-   umount "$TARGET/sys" 2>/dev/null || true
-   in_target mount -t sysfs sysfs /sys
+   # if systemd-nspawn is used at second-stage, it already treats 
/proc and so on
+   # and also fix failure on lxc environment
+   if [ ! -n "$(ls -A /proc)" ]; then
+   in_target mount -t proc proc /proc
+   if [ -d "$TARGET/sys" ] && \
+  grep -q '[[:space:]]sysfs' /proc/filesystems 
2>/dev/null; then
+   umount_on_exit /sys
+   umount "$TARGET/sys" 2>/dev/null || true
+   in_target mount -t sysfs sysfs /sys
+   fi
fi
on_exit clear_mtab
;;
-- 
2.17.0



Bug#896071: debootstrap fails to retrive Release file over https

2018-04-21 Thread Hideki Yamane
control: tags -1 +confirmed
control: tags -1 +patch

On Thu, 19 Apr 2018 09:56:30 +0200
Alf Gaida  wrote:
> there was a change in behaviour with the latest upload:

 Thanks for the report, and here's a proposal fix.
 "$@" is extracted as '' and wget tries to fetch it and fails, 
 then returns 1.


diff --git a/functions b/functions
index 1e41862..bad37dc 100644
--- a/functions
+++ b/functions
@@ -80,10 +80,10 @@ wgetprogress () {
[ ! "$VERBOSE" ] && NVSWITCH="-nv"
local ret=0
if [ "$USE_DEBIANINSTALLER_INTERACTION" ] && [ "$PROGRESS_NEXT" ]; then
-   wget "$@" 2>&1 >/dev/null | "$PKGDETAILS" "WGET%" 
"$PROGRESS_NOW" "$PROGRESS_NEXT" "$PROGRESS_END" >&3
+   wget $@ 2>&1 >/dev/null | "$PKGDETAILS" "WGET%" "$PROGRESS_NOW" 
"$PROGRESS_NEXT" "$PROGRESS_END" >&3
ret=$?
else
-   wget $NVSWITCH "$@"
+   wget $NVSWITCH $@
ret=$?
fi
return $ret



Bug#741964: debootstrap: --variant=fakechroot and --foreign

2018-04-23 Thread Hideki Yamane
On Thu, 19 Apr 2018 09:58:41 +0200
Raphael Hertzog  wrote:
> This is not doing what you want. You probably want:
> if ! doing_variant fakechroot; then

 !

 I'll fix it. Thanks for your review.

-- 
Hideki Yamane 



Bug#896071: debootstrap fails to retrive Release file over https

2018-04-23 Thread Hideki Yamane
Hi,

On Sun, 22 Apr 2018 09:40:54 +1000
David Margerison  wrote:
> >  "$@" is extracted as '' and wget tries to fetch it and fails,
> >  then returns 1.
> 
> Regarding the proposed fix, in general using $@ without quotes is fragile.

 Most of the case, quotes is better. But in this case, "$@" is extracted like
>> wget '' '' '' https://deb.debian.org/debian/dist/unstable/InRelease
 Then, it outputs
>>http://: Invalid host name.
>>http://: Invalid host name.
>>http://: Invalid host name.
 and returns 1.


-- 
Hideki Yamane 



Bug#840372: debootstrap: second-stage fails within systemd-nspawn: proc already mounted

2018-04-23 Thread Hideki Yamane
On Thu, 19 Apr 2018 10:06:49 +0200
Raphael Hertzog  wrote:
> Your patch will try to umount /proc even if it has not been mounted by
> debootstrap. That's wrong. If you detect that /proc was handled outside of
> debootstrap, then you should also not umount it.

+   if [ ! -n "$(ls -A /proc)" ]; then
+   in_target mount -t proc proc /proc

 is when there's no file under /proc, then try to mount /proc - not try
 to umount it.


> And the handling of /sys should be entirely separate from /proc. Even if
> /proc was already mounted, you want debootstrap to ensure that /sys is
> mounted too.

 Okay, it should be that.


diff --git a/functions b/functions
index 1e41862..cb2c1d9 100644
--- a/functions
+++ b/functions
@@ -1137,10 +1137,12 @@ setup_proc () {
# and also fix failure on lxc environment
if [ ! -n "$(ls -A /proc)" ]; then
in_target mount -t proc proc /proc
-   if [ -d "$TARGET/sys" ] && \
-  grep -q '[[:space:]]sysfs' /proc/filesystems 
2>/dev/null; then
-   umount_on_exit /sys
-   umount "$TARGET/sys" 2>/dev/null || true
+   fi
+   if [ -d "$TARGET/sys" ] && \
+  grep -q '[[:space:]]sysfs' /proc/filesystems 2>/dev/null; 
then
+   umount_on_exit /sys
+   umount "$TARGET/sys" 2>/dev/null || true
+   if [ ! -n "$(ls -A /sys)" ]; then
in_target mount -t sysfs sysfs /sys
fi
fi



Bug#896071: debootstrap fails to retrive Release file over https

2018-04-23 Thread Hideki Yamane
On Tue, 24 Apr 2018 00:52:10 +1000
David Margerison  wrote:
> needs to be changed to something like this
>wgetprogress $a $b $c "$url"

 Unfortunately, changed to it like above but caused same error.

diff --git a/functions b/functions
index 1e41862..d54b07f 100644
--- a/functions
+++ b/functions
@@ -398,7 +398,7 @@ just_get () {
fi
elif [ "${from#https://}"; != "$from" ] ; then
# http/ftp mirror
-   if wgetprogress "$CHECKCERTIF" "$CERTIFICATE" "$PRIVATEKEY" -O 
"$dest" "$from"; then
+   if wgetprogress $CHECKCERTIF $CERTIFICATE $PRIVATEKEY -O 
"$dest" "$from"; then
        return 0
else
rm -f "$dest"


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#896071: debootstrap fails to retrive Release file over https

2018-04-24 Thread Hideki Yamane
Hi,

 I'll revert below your commit since this regression fix also solve it.

> commit c1c20ed48e83fe9d4f3512c524f7734d4e1469ac
> Author: Raphaël Hertzog 
> Date:   Thu Apr 12 12:18:29 2018 +0200
> 
> Do not use HTTPS for Kali bootstrap script


 Please let me know if you don't want it.


On Sat, 21 Apr 2018 20:32:59 +0900
Hideki Yamane  wrote:
> > there was a change in behaviour with the latest upload:
> 
>  Thanks for the report, and here's a proposal fix.
>  "$@" is extracted as '' and wget tries to fetch it and fails, 
>  then returns 1.
> 
> 
> diff --git a/functions b/functions
> index 1e41862..bad37dc 100644
> --- a/functions
> +++ b/functions
> @@ -80,10 +80,10 @@ wgetprogress () {
> [ ! "$VERBOSE" ] && NVSWITCH="-nv"
> local ret=0
> if [ "$USE_DEBIANINSTALLER_INTERACTION" ] && [ "$PROGRESS_NEXT" ]; 
> then
> -   wget "$@" 2>&1 >/dev/null | "$PKGDETAILS" "WGET%" 
> "$PROGRESS_NOW" "$PROGRESS_NEXT" "$PROGRESS_END" >&3
> +   wget $@ 2>&1 >/dev/null | "$PKGDETAILS" "WGET%" 
> "$PROGRESS_NOW" "$PROGRESS_NEXT" "$PROGRESS_END" >&3
> ret=$?
> else
> -   wget $NVSWITCH "$@"
> +   wget $NVSWITCH $@
> ret=$?
> fi
> return $ret


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#896071: debootstrap fails to retrive Release file over https

2018-04-24 Thread Hideki Yamane
On Tue, 24 Apr 2018 14:07:30 +0200
Raphael Hertzog  wrote:
> Honestly, I'd prefer not to diverge from Debian and use plain http as well
> so that we limit the risk of regression related to https support.
> 
> In particular since our main http.kali.org host redirects to many other
> mirrors whose certificates are not under our control. We are not monitoring
> that all the certificates are valid.

 I understand it, then remain unchanged.

-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#840372: debootstrap: second-stage fails within systemd-nspawn: proc already mounted

2018-04-24 Thread Hideki Yamane
On Mon, 23 Apr 2018 15:59:31 +0200
Raphael Hertzog  wrote:
> I'm saying this because the following lines are left untouched and are
> called in all cases:
> umount_on_exit /proc
> umount_on_exit /proc/bus/usb
> 
> (They are in the context of your unified diff)
> 
> They should only be called if debootstrap is mounting /proc by itself.

 Okay, I want to treat it as separate issue (this code is not touched
 until now), deal with it after next upload.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#898738: debootstrap fails when specifying components

2018-05-15 Thread Hideki Yamane
Hi,

 Sorry, and thank you for digging it.

On Tue, 15 May 2018 21:44:38 +0200
Cyril Brulebois  wrote:
> I think I've found the issue. At least partly reverting the commit
> makes retrieving/validating indices work again, possibly because
> un-local-izing names was a bad idea? (I took all hunks from the commit
> that touched the download_release_indices function. Not everything is
> needed I guess.)
> 
> See attached patch, against the offending commit. It doesn't apply to
> master as-is because of the by-hash addition.

 Simply initialize "ext" prevents this failure, could you check attached
 patch, please?


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp
>From 768183053bcd02f050fcd2d50c08024ff48a786f Mon Sep 17 00:00:00 2001
From: Hideki Yamane 
Date: Wed, 16 May 2018 08:55:23 +0900
Subject: [PATCH] Fix download failure when specifying multiple components
 (Closes: #898738)

> # debootstrap --components=main,contrib,non-free unstable unstable http://deb.debian.org/debian
(snip)
> I: Retrieving Packages
> I: Validating Packages
> W: Retrying failed download of
> http://deb.debian.org/debian/dists/unstable/contrib/binary-amd64/Packages
> I: Retrieving Packages
> I: Validating Packages
> W: Retrying failed download of
> http://deb.debian.org/debian/dists/unstable/contrib/binary-amd64/Packages
(snip)

Fix above by initializing "ext" for each component
---
 functions | 1 +
 1 file changed, 1 insertion(+)

diff --git a/functions b/functions
index fa7c060..74d25b3 100644
--- a/functions
+++ b/functions
@@ -681,6 +681,7 @@ download_release_indices () {
 		bz2i="$(get_release_checksum "$reldest" "$subpath.bz2")"
 		gzi="$(get_release_checksum "$reldest" "$subpath.gz")"
 		normi="$(get_release_checksum "$reldest" "$subpath")"
+		ext=""
 		if [ "$acquirebyhash" != "" ]; then
 			ext="$ext byhash"
 		fi
-- 
2.17.0



debootstrap: [idea] force review before commit to master

2018-05-16 Thread Hideki Yamane
Hi,

 While I had fixed some bug reports and added some bugs ;) in debootstrap,
 I want to reduce regressions by using Merge Request feature of GitLab. 

 - Go "Repository Settings" page
   → set master branch as "Allowed to push" to "no one"
 - Then, all pushes are not allowed directly, it is treated as Merge
   Request and needs review by someone (anyway, probably you can do
   self review)

 Any comments? If there's no objection, I'll set it to debootstrap repo.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#898738: debootstrap fails when specifying components

2018-05-16 Thread Hideki Yamane
On Wed, 16 May 2018 13:34:44 +0200
Luca Falavigna  wrote:
> >  Simply initialize "ext" prevents this failure, could you check attached
> >  patch, please?
> 
> I applied to 1.0.98 package in unstable, and it fixes the problem for me.

 Good :)  Then, let's add test for it as attached.

>From fe8dc595667af73c50324e975c7f1186a45e51e1 Mon Sep 17 00:00:00 2001
From: Hideki Yamane 
Date: Wed, 16 May 2018 09:19:29 +0900
Subject: [PATCH 2/2] Set multiple components for test

---
 debian/tests/debian-testing | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/tests/debian-testing b/debian/tests/debian-testing
index 65ee196..1209498 100755
--- a/debian/tests/debian-testing
+++ b/debian/tests/debian-testing
@@ -234,9 +234,11 @@ else {
 my $distro_info = DebianDistroInfo->new;
 my $testing = $distro_info->testing;
 
+# Should specify multiple components for checking (see Bug#898738)
 if (!verbose_run(['debootstrap',
 '--include=debootstrap,debian-archive-keyring,gnupg,hello',
 '--variant=minbase',
+'--components=main,contrib,non-free',
 $testing, 'chroot.d', $mirror], '>&2')) {
 BAIL_OUT("debootstrap failed: $?");
 }
-- 
2.17.0



Re: debootstrap/1.0.98 breaks debomatic/0.23-1 autopkgtest in testing

2018-05-17 Thread Hideki Yamane
On Wed, 16 May 2018 13:53:11 +0200
Paul Gevers  wrote:
> > This is due to #898738.
> 
> Thanks for picking this up, but why then didn't it fail with debootstrap
> 1.0.97¹ as the bug suggests that version had the same issue.

 Hmm, it seems that runs fine again with debootstrap 1.0.99
 https://ci.debian.net/data/packages/unstable/amd64/d/debomatic/311372.log


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#896071: debootstrap fails to retrive Release file over https

2018-05-18 Thread Hideki Yamane
On Mon, 14 May 2018 00:48:53 +0200
Philipp Kern  wrote:
> any new about incorporating Raphael's suggestion? There's still a grave
> bug opened against debootstrap right now (on a version that is in testing).

 Sorry for late reply, revert previous fix and modified functions as
 Raphael suggested, and it works on my box. Please check it.


diff --git a/functions b/functions
index dc55faf..350f463 100644
--- a/functions
+++ b/functions
@@ -79,6 +79,18 @@ progress_next () {
 wgetprogress () {
[ ! "$VERBOSE" ] && NVSWITCH="-nv"
local ret=0
+
+   set -- -O "$dest" "$from" "$@"
+   if [ -n "$PRIVATEKEY" ]; then
+   set -- "$PRIVATEKEY" "$@"
+   fi
+   if [ -n "$CERTIFICATE" ]; then
+   set -- "$CERTIFICATE" "$@"
+   fi
+   if [ -n "$CHECKCERTIF" ]; then
+   set -- "$CHECKCERTIF" "$@"
+   fi
+
if [ "$USE_DEBIANINSTALLER_INTERACTION" ] && [ "$PROGRESS_NEXT" ]; then
wget "$@" 2>&1 >/dev/null | "$PKGDETAILS" "WGET%" 
"$PROGRESS_NOW" "$PROGRESS_NEXT" "$PROGRESS_END" >&3
ret=$?
@@ -401,20 +413,14 @@ just_get () {
# args: from dest
local from="$1"
local dest="$2"
+
mkdir -p "${dest%/*}"
+
if [ "${from#null:}" != "$from" ]; then
error 1 NOTPREDL "%s was not pre-downloaded" "${from#null:}"
-   elif [ "${from#http://}"; != "$from" ] || [ "${from#ftp://}"; != "$from" 
]; then
-   # http/ftp mirror
-   if wgetprogress -O "$dest" "$from"; then
-   return 0
-   else
-   rm -f "$dest"
-   return 1
-   fi
-   elif [ "${from#https://}"; != "$from" ] ; then
-   # http/ftp mirror
-   if wgetprogress "$CHECKCERTIF" "$CERTIFICATE" "$PRIVATEKEY" -O 
"$dest" "$from"; then
+   elif [ "${from#http://}"; != "$from" ] || [ "${from#ftp://}"; != "$from" 
] || [ "${from#https://}"; != "$from" ]; then
+   # HTTP(S) mirror (FTP mirror is deprecated but not removed)
+   if wgetprogress ; then
return 0
else
rm -f "$dest"



Bug#839046: [PATCH] Enable merged-/usr by default again now that dpkg-shlibdeps is fixed (Closes: #839046)

2018-05-18 Thread Hideki Yamane
On Thu, 17 May 2018 11:37:32 +0200
Laurent Bigonville  wrote:
> +  * Enable merged-/usr by default again now that dpkg-shlibdeps is fixed

 Is it applied to from buster to sid?
 It maybe break the enviroment until stretch release.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#896071: debootstrap fails to retrive Release file over https

2018-05-19 Thread Hideki Yamane
On Sat, 19 May 2018 20:18:17 +0200
Philipp Kern  wrote:
> You local'ed from and dest and now don't pass it anymore to
> wgetprogress. How does this work?

 It is passed to wget via $@


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: debootstrap: [idea] force review before commit to master

2018-05-19 Thread Hideki Yamane
On Fri, 18 May 2018 21:15:35 +0200
Philipp Kern  wrote:
> I suppose the test harness is autopkgtest? Is there prior art on how to
> set that up on Salsa? (Picking the backend and making sure that it
> works, for instance.)

 Usually I just put debian/.gitlab-ci.yml as below, build package and
 kick autopkgtest automatically.
-
image: debian:sid

variables:
# adjust to your source package
  PKG: screenfetch

stages:
   - build
   - autopkgtest

package_build:
  stage: build
  script:
- echo "deb-src http://deb.debian.org/debian sid main" >> 
/etc/apt/sources.list && apt update -qq && apt build-dep ./ -y -qq
- apt install -y -qq dpkg-dev && dpkg-buildpackage -us -uc -b && mkdir 
build; cd ../; ls -al && mv ./${PKG}_*.deb ./${PKG}_*.changes ${PKG}/build/
  artifacts:
paths:
  - build/*.deb
  - build/*.changes

#piuparts:
#  stage: piuparts
#  script:
#- apt update -qq && apt install -y -qq piuparts
#- piuparts --mirror=http://deb.debian.org/debian --logfile=../piuparts.log 
--fail-on-broken-symlinks build/*.changes
#  dependencies:
#- package_build

autopkgtest:
  stage: autopkgtest
  script:
- apt update -qq && apt install -y -qq autopkgtest
- autopkgtest build/*.changes -- null
  dependencies:
- package_build



Bug#896071: debootstrap fails to retrive Release file over https

2018-05-20 Thread Hideki Yamane
On Sun, 20 May 2018 10:14:13 +0200
Philipp Kern  wrote:
> So the way it works with your patch is that local variables are
> inherited by called functions (but not the caller). So from and dest
> from just_get() are visible in wgetprogress() and hence the construction
> of $@ works. I'd rather have $dest and $from be explicit parameters to
> wgetprogress. Given that you reset $@ anyway I don't see how that'd hurt.

 Hmm, but if I don't put $dest and $from to $@ and other parameters are
 empty, then it would be extracted as '' and wget will fail.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#742672: allow debootstrap to take a bare codename as the script parameter

2018-05-26 Thread Hideki Yamane
control: tags -1 +pending

Hi,

 I've created Merge Request as 
 https://salsa.debian.org/installer-team/debootstrap/merge_requests/2

 Please someone review it.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#839046: [PATCH] Enable merged-/usr by default again now that dpkg-shlibdeps is fixed (Closes: #839046)

2018-05-26 Thread Hideki Yamane
On Tue, 22 May 2018 16:21:01 +0200
Raphael Hertzog  wrote:
> I don't understand your question. The required fixes are in the version of
> dpkg that is in stretch.

 I mean, if we try to create new stretch chroot with merged-usr,
 it becomes to be NOT equal to stretch environment since its /lib*,
 /bin and /sbin are merged to /usr. We should not apply it for pre-buster,
 IMHO.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#839046: [PATCH] Enable merged-/usr by default again now that dpkg-shlibdeps is fixed (Closes: #839046)

2018-05-27 Thread Hideki Yamane
On Sun, 27 May 2018 21:08:42 +0200
Raphael Hertzog  wrote:
> If anything your argument would mean that we should have different default
> for the --merged-usr flag for different release. This might indeed be
> important if we want to make sure that recent debootstrap do not introduce
> unexpected problems when building chroot for very old releases.

 Yes, I mean that.

-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: debootstrap: [idea] force review before commit to master

2018-05-27 Thread Hideki Yamane
On Mon, 21 May 2018 00:29:55 +0100
Simon McVittie  wrote:
> However, it seems plausible that Docker wouldn't allow the fake schroot
> or the fake pbuilder to run either - I don't think Docker containers are
> allowed to exercise CAP_SYS_ADMIN, which is needed when playing with
> mount points. It might be necessary to skip that part. Unfortunately
> systemd-detect-virt --container doesn't seem to detect Docker as anything
> more specific than "container-other", so the test script might have to
> resort to looking for mentions of docker in /proc/self/mountinfo,
> or pessimistically assume that "container-other" has all possible
> container limitations.

 Then, how about checking /proc/1/mountinfo with " /docker" and "cgroup"
 like this?


diff --git a/debian/tests/debian-testing b/debian/tests/debian-testing
index 9b39896..52d4584 100755
--- a/debian/tests/debian-testing
+++ b/debian/tests/debian-testing
@@ -32,6 +32,16 @@ sub capture {
 return $output;
 }
 
+my $check_non_docker_env;
+if (run([qw(grep "\ \/docker.*cgroup" /proc/1/mountinfo)], '&>', '/dev/null')) 
{
+diag("it seems docker environment");
+$check_non_docker_env = 0;
+}
+else {
+diag("okay, it's not docker environment");
+$check_non_docker_env = 1;
+}
+
 my @maybe_unshare_mount_ns;
 
 if (verbose_run(['unshare', '-m', 'true'])) {
@@ -255,8 +265,10 @@ if (!verbose_run(['debootstrap',
 BAIL_OUT("debootstrap failed: $?");
 }
 
-check_chroot(chroot => 'chroot.d', can_mknod_ptmx => $can_mknod_ptmx,
-kernel => $kernel, container => $container);
+if ($check_non_docker_env) {
+check_chroot(chroot => 'chroot.d', can_mknod_ptmx => $can_mknod_ptmx,
+kernel => $kernel, container => $container);
+}
 
 if ($^O ne 'linux') {
 diag("Cannot use systemd-nspawn on non-Linux");



Bug#888709: debootstrap: Silently fails if the target directory exists and is not empty.

2018-06-03 Thread Hideki Yamane
control: fixed -1 1.0.97

Hi,

 This behavior was fixed in 1.0.97 as
>  * Forbid the usage of non-empty directories with --print-debs and
>--make-tarball

 Now we can see message as below.

$ debootstrap  --print-debs  stretch ~/tmp/stretch
E: Target directory '/home/henrich/tmp/stretch' is not empty and it
would be wiped

-- 
Hideki Yamane



Bug#783589: debootstrap --exclude=dash doesn't

2018-06-03 Thread Hideki Yamane
control: tags -1 +pending

Now we can execute --exclude=dash (however, of course it fails ;)

$ DEBOOTSTRAP_DIR=./ sudo ./debootstrap
--cache-dir=/home/henrich/tmp/cache --exclude=dash stretch
~/tmp/stretch
I: Target architecture can be executed
(snip)
W: Failure trying to run: chroot "/home/henrich/tmp/stretch" dpkg
--force-depends --install
/var/cache/apt/archives/base-passwd_3.5.43_amd64.deb
W: See /home/henrich/tmp/stretch/debootstrap/debootstrap.log for details

In debootstrap.log,
> dpkg: warning: 'sh' not found in PATH or not executable
> dpkg: error: 1 expected program not found in PATH or not executable
> Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin


-- 
Hideki Yamane



Bug#557322: manpage: mention that dependency resolution can readd excluded packages

2018-06-03 Thread Hideki Yamane
control: tags -1 +pending

Hi,

 Now --exlucde works properly and it is not added again (and maybe
break dependency).


-- 
Hideki Yamane



Bug#668903: The installer marks everything manually installed.

2018-06-03 Thread Hideki Yamane
control: reassign -1 debian-installer

Hi,

> This ultimately results in a lot of junk accumulated on the system from
> the start... you have to pluck packages out manually and check all of
> the 350 or so packages installed by the installer to see if they're
> actually required or not.

 debootstrap pulls several packages but not for the packages from tasks,
 so I want to reassign back to debian-installer.


-- 
Hideki Yamane



Bug#877855: debootstrap does not carry --components across --foreign/--second-stage

2018-06-03 Thread Hideki Yamane
Hi,

On Wed, 21 Mar 2018 18:58:27 +0900 Hideki Yamane  wrote:
>  Since in debootstrap, $TARGET/etc/apt/sources.list is deleted at
>  starting for second stage.

 And also it was removed in debootstrap script.

> . "$SCRIPT"
> 
> if [ "$SECOND_STAGE_ONLY" = "true" ]; then
> MIRRORS=null:
> else
> MIRRORS="$DEF_MIRROR"
> if [ "$USER_MIRROR" != "" ]; then
> MIRRORS="$USER_MIRROR"
>     MIRRORS="${MIRRORS%/}"
> fi
> fi
> 
> export MIRRORS

 


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: debootstrap does not carry --components across --foreign/--second-stage

2018-06-03 Thread Hideki Yamane
Hi,

 I've created patch for this bug report. Could you check it, please?
 See https://salsa.debian.org/installer-team/debootstrap/merge_requests/7

 And please someone on debian-boot list apply this MergeRequest.  


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: Processed: Bug #551838 in debootstrap marked as pending

2018-06-04 Thread Hideki Yamane
Hi,

 I've prepared MergeRequest as
 https://salsa.debian.org/installer-team/debootstrap/merge_requests/8

> Make --unpack-tarball works properly (it means, just extract tarball and 
> configure it without any downloads)
> 
> 
> --unpack-tarball just exec "first_stage" and "second_stage" phase, ignore 
> "finddebs" and "dldebs"
> Some options overwrites phases info each other, so make them exclusive
> Save some package info to file to include to tarball made with --make-tarball

 Please review and merge it, thanks.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#594052: debootstrap: create example /etc/hosts and /etc/fstab?

2018-06-04 Thread Hideki Yamane
Hi,

On Mon, 23 Aug 2010 15:18:45 +0200 Samuel Thibault  wrote:
> Colin Watson, le Mon 23 Aug 2010 12:45:12 +0100, a écrit :
> > Does anyone have any thoughts on this?
> 
> Mmm, aren't you actually looking for crosshurd? (which should really be
> called crossdebian nowadays). AIUI, using debootstrap is just meant for
> chroots & such.

 You mean, adding /etc/fstab sample is harm for hurd (or kfreebsd)?
 If so, how about if we can apply it for only linux?


-- 
Hideki Yamane 



Bug#594052: debootstrap: create example /etc/hosts and /etc/fstab?

2018-06-05 Thread Hideki Yamane
Hi,

 Thank you for your explanation.

 debootstrap is used to create just not simple chroot but for containers,
 like lxc, systemd-nspawn, etc., so adding sample /etc/fstab and hosts is
 better for them, IMO.


On Tue, 5 Jun 2018 08:58:21 +0200
Samuel Thibault  wrote:
> We could also see at merging deboostrap and crosshurd, since they
> are two tools which do almost the same thing, and see crosshurd's
> README.Debian suggesting so.

 Okay, I'll check it.
 BTW, is there any known blocker to merge them?

-- 
Hideki Yamane 



Re: Re: debootstrap/1.0.102 appears to break debuerreotype autopkgtest

2018-06-14 Thread Hideki Yamane
Hi,

> The patch for #839046 also disabled --merged-usr for stretch as stretch
> was added to the blacklist in first_stage_install().
> 
> debootstrap should default to non-merged-usr for stretch, but it should
> be possible to enable merged-usr via the command-line parameter to avoid
> the regression in debuerreotype.

 Stretch is blacklisted (in scripts/debian-common) and I've tested on my
 box, it is non-merged-usr environment. Is it stretch?

 We can use "--no-merged-usr" and "--merged-usr" options explicitly.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: debootstrap/1.0.102 appears to break debuerreotype autopkgtest

2018-06-14 Thread Hideki Yamane
Hi,

On Thu, 14 Jun 2018 10:15:51 -0700
Tianon Gravi  wrote:
> > Instead of stretch simply defaulting to non-merged-usr, it's now
> > _blacklisted_ from merged-usr, even if I explicitly specify
> > "--merged-usr", right?  Is that the intended implementation here?

 Yes, since releases until stretch was already shipped without merged-usr,
 so it should be. But loose restriction for test purpose is okay, IMO.

 Question with 'EXTRACT_DEB_TAR_OPTIONS="$EXTRACT_DEB_TAR_OPTIONS -k"'
 It was introduced https://bugs.debian.org/838388 , so it should not be
 applied to all releases. However, I'm not sure which "older" release
 for it, especially whether it equals to merged-usr.

-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#731859: Happens to me on stretch

2018-06-15 Thread Hideki Yamane
Hi,

On Sun, 27 May 2018 21:19:20 +1000 Russell Stuart  
wrote:
> The attached script ("bug-731859-demo.sh") does a nested debootstrap
> run.  The outer run sets up a chroot for the  Debian suite passed on
> the command line (eg, "stretch"), then runs a nested debootstrap --
> variant=fakechroot in that environment.  For me both these fail:
> 
> ./bug-731859-demo.sh stretch
> ./bug-731859-demo.sh buster

 Thank you for providing script :)

 I've tested it and got failure. However, I could fix it a bit by adding
 "sudo mount -t proc none "${suite}.chroot/proc"" after debootstraping.
 Because debootstrap failure is caused by "systemd-machine-id-setup" in
 systemd.postinst, and can improve it with /proc mount.

 Russell, could you test it, please?


> They fail in different ways, but the root cause appears to be the same:
>  the ldconfig isn't working.  Note that both leave ldd.REAL and
> ldconfig.REAL lying around in the nested run.

 I'm not sure how to run nested chroot with success, it means
 "chroot "/tmp/${suite}" /bin/sh" line would still fail, though.


-- 
Hideki Yamane 



Re: debootstrap/1.0.102 appears to break debuerreotype autopkgtest

2018-06-15 Thread Hideki Yamane
Hi,

On Fri, 15 Jun 2018 07:57:21 +0900
Hideki Yamane  wrote:
> > > Instead of stretch simply defaulting to non-merged-usr, it's now
> > > _blacklisted_ from merged-usr, even if I explicitly specify
> > > "--merged-usr", right?  Is that the intended implementation here?
> 
>  Yes, since releases until stretch was already shipped without merged-usr,
>  so it should be. But loose restriction for test purpose is okay, IMO.

 Anyway, I've created a patch for it. Please review it
 https://salsa.debian.org/installer-team/debootstrap/merge_requests/12


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#899155: systemd-setup-machine-id leaving mount behind?

2018-06-15 Thread Hideki Yamane
Hi,

On Wed, 13 Jun 2018 15:16:00 +0200 Michael Biebl  wrote:
> Control: reassign -1 debootstrap
> Control: found -1 1.0.98
> 
> I'm going to reassign this bug report to debootstrap given it was
> introduced by the changes in 1.0.98, specifically [1]

 Now I've fixed it as
 https://salsa.debian.org/installer-team/debootstrap/merge_requests/11

 Could someone review (& merge) it, please?


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#731859: Happens to me on stretch

2018-06-18 Thread Hideki Yamane
Hi,

On Mon, 18 Jun 2018 12:15:51 +1000
Russell Stuart  wrote:
> I didn't get that failure, but a postinst expecting /proc to be mounted
> doesn't sound unreasonable.

 Hmm.

> > I'm not sure how to run nested chroot with success, it means
> > "chroot "/tmp/${suite}" /bin/sh" line would still fail, though.
> 
> The nested chroot was just a way of getting a repeatable test
> environment in a few lines of shell script.  It worked for me, but
> apparently not for you.  So I've attached a new version which provides
> numerous environments.  They all fail for me in exactly the same way
> the simple one did; hopefully you will find at least of them more
> illuminating than my previous effort.  Sadly it's an order of magnitude
> larger.
> 
> Here are ways you can run it:
> 
>   ./bug-731859-demo-v2.sh stretch chroot
>   ./bug-731859-demo-v2.sh stretch nspawn
>   ./bug-731859-demo-v2.sh stretch kvm
>   ./bug-731859-demo-v2.sh buster chroot
>   ./bug-731859-demo-v2.sh buster nspawn
>   ./bug-731859-demo-v2.sh buster kvm
> 
> The "chroot" environment is as before, but with dev, dev/pts, proc and
> sys mounted in the chroot when the demonstration runs.  The "nspawn" is
> a systemd-nspawn running in a directory identical to the chroot.  "kvm"
> is a qemu-system-x86_64 VM using an identical directory as it's root
> file system.  It will drop you in a shell when it starts.  Run the
> demonstration by running /bug.sh.  Press Control-A followed by  x to
> exit.
> 
> When running these tests either unset the http_proxy environment
> variable or set it to something that will work inside all environments.

 I've run it and got failure as below (my question is can we run nested
 chroot without failure?)

> ./bug-731859-demo-v2.sh stretch chroot
+ chroot /tmp/stretch /bin/sh
chroot: failed to run command '/bin/sh': No such file or directory

> ./bug-731859-demo-v2.sh stretch nspawn
I: Base system installed successfully.
+ chroot /home/x/stretch /bin/sh
chroot: failed to run command '/bin/sh': No such file or directory
+ ls -l /home/x/stretch/sbin/ldconfig /home/x/stretch/sbin/ldconfig.REAL
-rwxr-xr-x 1 x x 67 Jun 18 16:47 /home/x/stretch/sbin/ldconfig
-rwxr-xr-x 1 x x 881912 Jan 14 19:39 /home/x/stretch/sbin/ldconfig.REAL
Container stretch.nspawn exited successfully.


> ./bug-731859-demo-v2.sh stretch kvm
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... [3.245515] Btrfs loaded, 
crc32c=crc32c-generic
Scanning for Btrfs filesystems
[3.324262] print_req_error: I/O error, dev fd0, sector 0
[3.327074] floppy: error 10 while reading block 0
[3.411652] random: fast init done
done.
[3.445007] cryptd: max_cpu_qlen set to 1000
Warning: fsck not present, so skipping root file system
[3.492000] EXT4-fs (sda): mounting ext2 file system using the ext4 subsystem
[3.495787] EXT4-fs (sda): mounted filesystem without journal. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
/bin/sh: 0: can't access tty; job control turned off



> ./bug-731859-demo-v2.sh buster chroot
I: Base system installed successfully.
+ chroot /home/x/buster /bin/sh
chroot: failed to run command '/bin/sh': No such file or directory
+ ls -l /home/x/buster/sbin/ldconfig /home/x/buster/sbin/ldconfig.REAL
-rwxr-xr-x 1 x x 67 Jun 18 10:07 /home/x/buster/sbin/ldconfig
-rwxr-xr-x 1 x x 901088 Mar 29 19:47 /home/x/buster/sbin/ldconfig.REAL
+ exit
+ umount buster.chroot/sys
+ umount buster.chroot/proc
+ umount buster.chroot/dev/pts
+ umount buster.chroot/dev



> ./bug-731859-demo-v2.sh buster nspawn
I: Base system installed successfully.
+ chroot /home/x/buster /bin/sh
chroot: failed to run command '/bin/sh': No such file or directory
+ ls -l /home/x/buster/sbin/ldconfig /home/x/buster/sbin/ldconfig.REAL
-rwxr-xr-x 1 x x 67 Jun 18 17:03 /home/x/buster/sbin/ldconfig
-rwxr-xr-x 1 x x 901088 Mar 30 04:47 /home/x/buster/sbin/ldconfig.REAL
Container buster.nspawn exited successfully.


> ./bug-731859-demo-v2.sh buster kvm
Begin: Running /scripts/init-premount ... done. 


Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... [3.308450] Btrfs loaded, 
crc32c=crc32c-generic
Scanning for Btrfs filesystems  
[3.384200] print_req_error: I/O error, dev fd0, sector 0
[3.386911] floppy: error 10 while reading block 0
[3.471441] random: fast init done  
done.   
[3.504605] cryptd: max_cpu_qlen set to 1000
Warning: fsck not present, so skipping root file system 
[3.548903] EXT4-fs (sda): mounting ext2 file system using the ext4 subsystem
[3.553363] EXT4-fs (sda): mounted filesystem without journal. Opts: (null)  
 
don

Bug#901826: fakechroot doesn't work on sid

2018-06-18 Thread Hideki Yamane
Package: fakechroot
Version: 2.19-3
Severity: important

Dear Maintainer,

fakechroot works on Stretch but not on Sid.

>henrich@stretch1:~$ fakechroot --version
>fakechroot version 2.19

>henrich@stretch1:~$ fakechroot chroot stretch true
>henrich@stretch1:~$ echo $?
>0


>henrich@sid1:~$ fakechroot --version
>fakechroot version 2.19

>henrich@sid1:~$ fakechroot chroot sid /bin/true
>/usr/sbin/chroot: failed to run command '/bin/true': No such file or directory

Any suggestion?



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

Kernel: Linux 4.16.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8), 
LANGUAGE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages fakechroot depends on:
ii  libfakechroot  2.19-3

fakechroot recommends no packages.

fakechroot suggests no packages.

-- no debconf information



Bug#731859: Happens to me on stretch

2018-06-18 Thread Hideki Yamane
Hi,

On Mon, 18 Jun 2018 20:22:28 +0900 Hideki Yamane  wrote:
> > Here are ways you can run it:
> > 
> >   ./bug-731859-demo-v2.sh stretch chroot

 With provided script, it runs debootstrap under chroot, however,
 debootstraped environment under chroot causes problem with symlink.

$ sudo chroot stretch.chroot true
$ sudo chroot stretch.chroot/home/x/stretch/ true
chroot: failed to run command 'true': No such file or directory
$ ls -al stretch.chroot/home/x/stretch/lib64/
total 8
drwxr-xr-x  2 henrich henrich 4096  6月 19 02:36 .
drwxr-xr-x 19 henrich henrich 4096  6月 19 02:38 ..
lrwxrwxrwx  1 henrich henrich   47  1月 14 10:39 ld-linux-x86-64.so.2 -> 
/home/x/stretch/lib/x86_64-linux-gnu/ld-2.24.so

 I don't know why, but ld-linux-x86-64.so.2 point not point to
 /lib/x86_64-linux-gnu/ld-2.24.so, this scripts always returns error.



-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: debootstrap/1.0.102 appears to break debuerreotype autopkgtest

2018-06-18 Thread Hideki Yamane
Hi,

On Tue, 19 Jun 2018 08:09:17 +0200
Ansgar Burchardt  wrote:
> The `-k` option doesn't work for older releases (some packages do
> replace files there).  It should always be used for newer releases (>=
> stretch) to have less differences between --merged-usr and
> --no-merged-usr.

 >= stretch ? If it's >= buster (not include stretch), it's
 easy to apply changes.


> (As it should always be applied it shouldn't be set in
> `setup_merged_usr` as that is misleading.)

 Okay, thanks.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Re: debootstrap/1.0.102 appears to break debuerreotype autopkgtest

2018-06-19 Thread Hideki Yamane
On Tue, 19 Jun 2018 09:23:18 +0200
Ansgar Burchardt  wrote:
> I'm not sure why >= stretch should be more complicated?  Something like
> [1] (untested) should work?
> 
>   [1] 
> <https://salsa.debian.org/ansgar/debootstrap/commits/allow-merged-usr-for-stretch-again>

 Aha, it means just clicking merge button is easy for me ;)


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#774331: debootstrap: fakechroot variant fails with fakechroot not found

2018-06-19 Thread Hideki Yamane
control: tags -1 +unreprodocible

Hi,

 Running "$ fakechroot fakeroot /usr/sbin/debootstrap --variant=fakechroot 
jessie jessie"
 on Jessie works fine, on Stretch and newer fakechroot causes segfault
 but it is not debootstrap's fault.


Vagrant Cascadian  wrote:
> And in debootstrap.log:
> 
>   Setting up systemd (215-8) ...
>   Initializing machine ID from random generator.
>   chfn: PAM: System error
>   adduser: `/usr/bin/chfn -f systemd Time Synchronization
>   systemd-timesync' returned error code 1. Exiting.
>   dpkg: error processing package systemd (--configure):
>subprocess installed post-installation script returned error exit
>status 1
>Setting up dmsetup (2:1.02.90-2) ...
>dpkg: systemd-sysv: dependency problems, but configuring anyway as you
>requested:
> systemd-sysv depends on systemd (= 215-8); however:
>   Package systemd is not configured yet.
>systemd-sysv depends on systemd; however:
>  Package systemd is not configured yet.

 It seems that is fakechroot issue, too.  
 See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745082


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#901717: debootstrap: Version 1.0.102 breaks use of file mirrors

2018-06-23 Thread Hideki Yamane
Hi,

On Sat, 23 Jun 2018 11:14:58 +0100
Christopher Obbard  wrote:
> $ cat test/debootstrap/debootstrap.log
> ...
> /debootstrap/debootstrap: 1428: /debootstrap/debootstrap: cannot open
> //var/lib/apt/lists/http:__deb.debian.org_debian_dists_buster_main_binary-armhf_Packages:
> No such file

 Oh, that is not expected, installation was failed...
 Here's a proposed patch.

diff --git a/debootstrap b/debootstrap
index 023a54f..c61636f 100755
--- a/debootstrap
+++ b/debootstrap
@@ -422,6 +422,7 @@ fi
 if [ "$SECOND_STAGE_ONLY" = "true" ]; then
SUITE=$(cat "$DEBOOTSTRAP_DIR/suite")
ARCH=$(cat "$DEBOOTSTRAP_DIR/arch")
+   USER_MIRROR=$(cat "$DEBOOTSTRAP_DIR/mirror")
if [ -e "$DEBOOTSTRAP_DIR/variant" ]; then
VARIANT=$(cat "$DEBOOTSTRAP_DIR/variant")
SUPPORTED_VARIANTS="$VARIANT"
@@ -725,6 +726,7 @@ if am_doing_phase first_stage; then
cp "$DEBOOTSTRAP_DIR"/scripts/*-common  "$TARGET/debootstrap/"
echo "$ARCH">"$TARGET/debootstrap/arch"
echo "$SUITE"   >"$TARGET/debootstrap/suite"
+   echo "$USER_MIRROR" >"$TARGET/debootstrap/mirror"
[ "" = "$VARIANT" ] ||
echo "$VARIANT" >"$TARGET/debootstrap/variant"
echo "$required">"$TARGET/debootstrap/required"


> >> we should write the file mirror URI to sources.list
> >
> >  And that assumption needs to be discussed.
> >
> >  If we would create chroot with debootstrap specified with file:///
> >  mirror and bring it to another environment, sources.list should
> >  point local file mirror or not?
> 
> You are right, thinking about it mirror URI should not added to sources.list.
> I do like the original method debootstrap 1.0.101 uses of caching the
> list of packages when using a file mirror under debootstrap.invalid.
> All of the packages are cached in the first-stage anyway.
> 
> After the install is complete, we should clear /etc/apt/sources.list
> of debootstrap.invalid.
> The user should update /etc/apt/sources.list himself anyway.

 I prefer to use http(s)://deb.debian.org/debian as default mirror
 setting for it, since it's okay for most users and works.



Bug#902350: systemd-container: /proc/1/environ doesn't contain

2018-06-25 Thread Hideki Yamane
 "container=systemd-nspawn" info
Message-Id: <20180625231751.08904561b88a44c993b3f...@iijmio-mail.jp>
In-Reply-To: <20180625214341.1adc6be263157d3184907...@iijmio-mail.jp>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Mon, 25 Jun 2018 21:43:41 +0900 Hideki Yamane  wrote:
>  I've got a suggestion to use $container to detect systemd-nspawn,
>  it can be used before/after 239-1. debootstrap should be changed
>  to use it, so reassign to debootstrap.

 I've created MergeRequest as
 https://salsa.debian.org/installer-team/debootstrap/merge_requests/13

 Please review it.


-- 
Hideki Yamane 



Bug#902350: systemd-container: /proc/1/environ doesn't contain

2018-06-28 Thread Hideki Yamane
Hi,

On Mon, 25 Jun 2018 16:55:40 +0200 Cyril Brulebois  wrote:
> Please anchor the grep pattern to avoid accidental matches against
> variables whose name ends with container (e.g. foo_container), and
> values which start with lxc-libvirt (e.g. lxc-libvirt-something-else);
> adding ^ on the left and $ on the right would do that.

 Thanks, indeed. And Ben suggested just use $container and it's
 better.


> It seems there are quite a number of other places with such issues.

 I'll look into it, later.


-- 
Hideki Yamane 



Bug#893713: debootstrap-udeb: containts too many scripts files (most of them are symlink but...)

2018-07-11 Thread Hideki Yamane
On Fri, 23 Mar 2018 21:40:08 +0900 Hideki Yamane  wrote:
> > What's the problem here?
> 
>  It's not a problem, but we can improve it, IMO (so severity is low).

 Proposed Merge Request
 https://salsa.debian.org/installer-team/debootstrap/merge_requests/15


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#871835: speed up for debootstrap

2018-07-26 Thread Hideki Yamane
Hi,

 As prepared MR in 
https://salsa.debian.org/installer-team/debootstrap/merge_requests/19
 I'll put it into 1.0.108, _after DebConf_ since I don't have GPG key on
 my laptop (I have the new one but it's not in keyring now).

 If some one want to push 1.0.107 into repository, it's nice.


-- 
Hideki Yamane 



Bug#871835: speed up for debootstrap

2018-07-28 Thread Hideki Yamane
On Fri, 27 Jul 2018 11:25:40 +0200
Cyril Brulebois  wrote:
> For some reason it seems I didn't follow up to this bug report but I'm
> pretty sure I did reply on debian-boot@ in some way: we need automated
> tests before and after those patches. And we need to make sure they
> yield the exact same results. Please don't merge the whole stack of
> patches without such checks.

 I heard about Thomas has set his test system and works well.
 It'd be better to share its info, then.


-- 
Hideki Yamane 



Bug#904804: debootstrap: Unable to deboostrap a sid environment on stretch

2018-07-28 Thread Hideki Yamane
control: reassign -1 util-linux

Hi,

On Sat, 28 Jul 2018 15:47:39 +0800
Nicolas Braud-Santoni  wrote:
> I just realised it's currently impossible to debootstrap a sid (build)
> environment on Debian stretch, creating difficulties for attendees of the
> DebConf packaging workshop, presumably because of util-linux being
> uninstallable.

 I confirmed it with current debootstrap on sid, but it's not
 debootstrap's fault but it's in repo.

>>  login (1:4.5-1.1) breaks util-linux (<< 2.32-0.2~) and is installed.

> shadow (1:4.5-1.1) unstable; urgency=medium
> 
>   * Non-maintainer upload (greetings from DebCamp/DebConf Taiwan).
>   * Stop shipping su and break old util-linux version. (See #833256)
> - Breaks on old version to force lockstep upgrade, which should
>   really be a depends-new-version (and can be switched around
>   together with util-linux once the transition is finished).
>   Using Breaks/Depends the 'wrong' way around is to make apt
>   unpack things in the 'right' order (avoiding any gaps where
>   /bin/su is not available during the upgrade phase).
> 
>  -- Andreas Henriksson   Fri, 27 Jul 2018 10:07:37 +0200

 However, util-linux is (2.32-0.1). I'm not sure which side should care
 about it, but once reassign to util-linux.
  
 
-- 
Hideki Yamane 



Bug#728344: debootstrap does not report errors

2018-07-29 Thread Hideki Yamane
On Wed, 30 Oct 2013 23:30:56 +0100 Michal Suchanek  wrote:
> This is quite likely broken but debootstrap should report the error and not 
> just silently terminate.

 Here's a proposed Merge Request
 https://salsa.debian.org/installer-team/debootstrap/merge_requests/20


-- 
Hideki Yamane 



Q: What's the relationship between Secure Boot and debootstrap?

2018-07-31 Thread Hideki Yamane
Hi,

 During "Report from the Debian EFI team about the support of Secure 
 Boot on Debian" session, you said that maybe we should touch debootstrap,
 but I'm not sure what should we do for it.

 Could you explain your thought for it, please?


-- 
Hideki Yamane 



Re: Q: What's the relationship between Secure Boot and debootstrap?

2018-07-31 Thread Hideki Yamane
On Tue, 31 Jul 2018 17:11:14 +0100
Steve McIntyre  wrote:
> That kind of thing, yes. Should have been clearer. Debootstrap itself
> doesn't install a kernel or bootloader, which were the packages I was
> thinking about.

 Then, we don't need to modify debootstrap package for SB at all, right?
 If so, please update your slide before upload.

-- 
Hideki Yamane 



Re: Towards Debian Buster Alpha 4

2018-07-31 Thread Hideki Yamane
Hi,

On Tue, 31 Jul 2018 02:06:40 +0200
Cyril Brulebois  wrote:
> If you have changes pending in master branches that need uploading, or
> specific packages that need to reach testing, please mention which, and
> why.

 I failed to upload debootstrap 1.0.107 but will do it after DebConf.
 And will upload 1.0.108 with some fixes (not apply speedup patches).


-- 
Hideki Yamane 



Re: Q: What's the relationship between Secure Boot and debootstrap?

2018-08-01 Thread Hideki Yamane
On Wed, 1 Aug 2018 14:47:58 +0100
Steve McIntyre  wrote:
> Yup, just updated in git now...

 Thanks! :)

-- 
Hideki Yamane 



Bug#905165: debootstrap - fails in docker environment

2018-08-01 Thread Hideki Yamane
On Wed, 1 Aug 2018 07:55:07 +0200
Bastian Blank  wrote:
> Package: debootstrap
> Version: 1.0.106
> Severity: grave
> 
> debootstrap fails in docker environment completely by:

 Could you try 1.0.107 in git repo, please?
 I was in trouble with uploading it, but it would be better one.

 And if it still happens, please describe reproduce step for it.

-- 
Hideki Yamane 



Re: Q: What's the relationship between Secure Boot and debootstrap?

2018-08-02 Thread Hideki Yamane
On Thu, 2 Aug 2018 15:31:38 +0800
Helen Koike  wrote:
> Yes, that was my fault, sorry about that, I meant we needed to check and
> update the tools that generate images.

 No problem.

 BTW, is there any planned schedule to complete to enable SB in Debian?
 I heard about there's a much progress for it but not sure when it will
 come to Debian.

-- 
Hideki Yamane 



Bug#891009: debootstrap: wrongly falls back to https://deb.debian.org when try to create Ubuntu chroot

2018-08-03 Thread Hideki Yamane
On Wed, 21 Feb 2018 22:31:02 +0900 Hideki Yamane  wrote:
> And, https assures only secure *connection*, not integrity of *contents*
> as GPG does, so this behavior is not good, IMO. 

 As I said above, what https ensures and gpg does is different, and "if
 there's no reliable keyring then fallback to https connection" behavior
 is not good. I suggest to remove this feature from debootstrap, do you
 have any idea for it? If so, please let me know it and why.


-- 
Hideki Yamane 



Bug#893713: debootstrap-udeb: containts too many scripts files (most of them are symlink but...)

2018-08-24 Thread Hideki Yamane
On Tue, 21 Aug 2018 12:37:00 +0200
Raphael Hertzog  wrote:
> While cleaning up the list of scripts to keep, you decided to drop the
> scripts for all derivatives making it impossible to use the udeb built
> for Debian on any derivative (Kali bug report here:
> https://bugs.kali.org/view.php?id=4921)

 It was not correct assumptions that derivatives use it own udeb
 packages, my apologies.


> So you saved a few kilobytes and made the life harder for others.
> IMO it was the wrong decision.

 It was my mistake, of course, but I DON'T WANT TO MAKE SOMEONE'S LIFE
 ANY HARDER, IT IS NOT INTENDED. People who made wrong decision should
 be blamed as fool? If so, please revert debootstrap before I started 
 to commit to it.


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Bug#893713: debootstrap-udeb: containts too many scripts files (most of them are symlink but...)

2018-09-09 Thread Hideki Yamane
On Sat, 25 Aug 2018 09:11:45 +0200
Raphael Hertzog  wrote:
> you should really add some automated test
> to catch the regressions.

 Well, limited to this time, how did I catch its regression with test?


-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



Are you still interested in debootstrap?

2018-09-09 Thread Hideki Yamane
Hi Junichi,

 I asked you about this via twitter several times but I got no answer,
 you are nominated as debootstrap uploaders but never done it. Do you
 want to stay there or not?

-- 
Regards,

 Hideki Yamane henrich @ debian.org/iijmio-mail.jp



  1   2   3   >