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

2018-06-05 Thread Cyril Brulebois
Hi,

Hideki Yamane  (2018-06-05):
>  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.

There are many things one might want to put inside a /etc/fstab
depending on the system being set up, and the current behaviour (not
listing anything) looks sane enough to me; systemd does the job mounting
many filesystems nowadays, so I'm not sure we need to add anything there.

/etc/hosts already gets contents through netbase's postinst, but only if
it's not present already. Let's not duplicate its postinst?


Cheers,
-- 
Cyril Brulebois (k...@debian.org)
D-I release manager -- Release team member -- Freelance Consultant


signature.asc
Description: PGP signature


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

2018-06-05 Thread Samuel Thibault
Hideki Yamane, le mar. 05 juin 2018 16:29:26 +0900, a ecrit:
>  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.

Ok, then it'd be good to pick up what is already in crosshurd into
debootstrap.

Samuel



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 



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

2018-06-05 Thread Samuel Thibault
Hideki Yamane, le mar. 05 juin 2018 11:42:30 +0900, a ecrit:
> 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)?

No. I mean only what I wrote: debootstrap is currently only used for
chroots etc. where e.g. fstab doesn't even make sense.  The debian
installer then for instance has scripts to populate fstab & hosts
according to what it knows about the content that should be put.

Crosshurd (again, should be called crossdebian, it's not hurd-specific
at all), however, does know how to populate fstab & hosts with sample
files according to the system, and thus I think it answers the need
expressed here.

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.

>  If so, how about if we can apply it for only linux?

There is no reason to do it only for Linux.

Samuel



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?

2010-08-23 Thread Samuel Thibault
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.

Samuel


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100823131845.gh5...@const.bordeaux.inria.fr




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2010-08-23 Thread Colin Watson
Package: debootstrap
Version: 1.0.23
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch maverick

In https://bugs.launchpad.net/ubuntu/+source/debootstrap/+bug/110144,
Evan Klitzke (CCed) suggested that debootstrap could be improved to
create a few more skeleton system configuration files by default.  I
didn't agree with all his points (see the Ubuntu bug for details), but
it does seem that creating skeleton /etc/hosts and /etc/fstab would be
beneficial - I've verified that this won't break netcfg or
partman-target respectively.

The essence of Evan's patch was (I've removed a bit about
/etc/network/interfaces since I feel that's better handled elsewhere,
and apologies that this is actually against the current Ubuntu script
but I'm sure the intent will be clear):

Index: scripts/gutsy
===
--- scripts/gutsy   (revision 64498)
+++ scripts/gutsy   (working copy)
@@ -53,10 +53,45 @@
 
 setup_etc
 if [ ! -e "$TARGET/etc/fstab" ]; then
-echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+echo '# /etc/fstab: static file system information.' > 
$TARGET/etc/fstab
+echo '#' >> $TARGET/etc/fstab
+echo '# file systemmount point   typeoptions  
dump pass' >> $TARGET/etc/fstab
+echo 'proc /proc procdefaults 
00' >> $TARGET/etc/fstab
+echo 'sys  /sys  sysfs   defaults 
00' >> $TARGET/etc/fstab
+echo '' >> $TARGET/etc/fstab
+echo '# Here are some example entries; uncomment these lines and add 
the correct' >> $TARGET/etc/fstab
+echo '# device name. Note that the recommended way to mount partitions 
is now by UUID' >> $TARGET/etc/fstab
+echo '# rather than device name; see 
https://wiki.ubuntu.com/LibAtaForAtaDisks for' >> $TARGET/etc/fstab
+echo '# details. You can find out the UUIDs of your partitions by 
running blkid.' >> $TARGET/etc/fstab
+echo '' >> $TARGET/etc/fstab
+echo '#/dev/fd0 /mnt/floppy   autonoauto,rw,sync,user,exec 
00' >> $TARGET/etc/fstab
+echo '#/dev/cdrom   /mnt/cdromiso9660 noauto,ro,user,exec  
00' >> $TARGET/etc/fstab
+echo '#' >> $TARGET/etc/fstab
+echo '#/dev/XXX none  swapsw   
00' >> $TARGET/etc/fstab
+echo '#' >> $TARGET/etc/fstab
+echo '#/dev/XXX / ext3defaults 
01' >> $TARGET/etc/fstab
+echo '#/dev/XXX /boot ext3ro,nosuid,nodev  
02' >> $TARGET/etc/fstab
+echo '#UUID=XXX /home ext3rw,nosuid,nodev  
02' >> $TARGET/etc/fstab
+echo '#UUID=XXX /tmp  ext3rw,nosuid,nodev  
02' >> $TARGET/etc/fstab
+echo '#UUID=XXX /var  ext3rw,nosuid,nodev  
02' >> $TARGET/etc/fstab
+echo '#UUID=XXX /usr  ext3rw,nodev 
02' >> $TARGET/etc/fstab
+echo '#UUID=XXX /home ext3rw,nosuid,nodev  
02' >> $TARGET/etc/fstab
 chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
 fi
 
+if [ ! -e "$TARGET/etc/hosts" ]; then
+echo '127.0.0.1   localhost' > "$TARGET/etc/hosts"
+echo '' >> "$TARGET/etc/hosts"
+echo '# The following lines are desirable for IPv6 capable hosts' >> 
"$TARGET/etc/hosts"
+echo '::1 ip6-localhost ip6-loopback' >> "$TARGET/etc/hosts"
+echo 'fe00::0 ip6-localnet' >> "$TARGET/etc/hosts"
+echo 'ff00::0 ip6-mcastprefix' >> "$TARGET/etc/hosts"
+echo 'ff02::1 ip6-allnodes' >> "$TARGET/etc/hosts"
+echo 'ff02::2 ip6-allrouters' >> "$TARGET/etc/hosts"
+echo 'ff02::3 ip6-allhosts' >> "$TARGET/etc/hosts"
+chown 0:0 "$TARGET/etc/hosts"; chmod 644 "$TARGET/etc/hosts"
+fi
+
 if doing_variant fakechroot; then
 setup_devices_fakechroot
 else

I think the proposed /etc/hosts is probably fine, modulo verification
that it's bitwise-identical with netcfg's default.  Regarding
/etc/fstab, I think we should be a bit less verbose than that and more
generic rather than referring to the Ubuntu wiki, and we should make
sure everything is synced up with partman-target.  I'm also not sure
about removing "UNCONFIGURED FSTAB FOR BASE SYSTEM" - I remember that
that used to be a token that some software checked for, and, while that
doesn't seem to be the case in d-i any more, I'd be cautious about
removing it all the same.

Does anyone have any thoughts on this?

Thanks,

-- 
Colin Watson   [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Tro