Bug#571136: Fwd: Re: Bug#571136: please remove useless devices from devices.tar.gz

2016-01-14 Thread Alberto Di Fazio
excuse me for asking about something off subject: does someone have an old 
DEC-alpha computer - better a server - (possibly with two CPUs but not 
necessarily) to give away or to sell? if yes, please tell me. All the best from 
Rome, Alberto.
 Dr. Alberto Di Fazio
senior scientist, 
National Institute for Astrophysics/Astronomical Observatory of Rome
member of the CNR/IGBP Italian National Commission on Global Change
Italian Focal Point of the IGBP/AIMES  Core Project (ex-GAIM)(Analysis, 
Integration, and Modelling of the Earth System)
president Global Dynamics Institute
permanently accredited to the COP under the UNFCCC as observer scientist
 

 
  Da: Steven Chamberlain 
 A: Marco d'Itri ; Cyril Brulebois ; 
debian-po...@lists.debian.org; debian-...@lists.debian.org; 
debian-h...@lists.debian.org; 571...@bugs.debian.org 
 Inviato: Domenica 10 Gennaio 2016 19:48
 Oggetto: Re: Fwd: Re: Bug#571136: please remove useless devices from 
devices.tar.gz
   
Hi,

Marco d'Itri wrote:
> On Jan 10, Cyril Brulebois  wrote:
> > We have a bug report with a patch by Marco against debootstrap (see
> > attachment), which changes how devices are generated; I can't really
> > tell how much this might affect all of you (especially with debootstrap
> It is not supposed to, since both hurd and kfreebsd already used 
> a different method to manage /dev.

Yes, the code Marco changed cannot be reached when HOST_OS is kfreebsd*,
freebsd* or hurd*.  kfreebsd devfs provides all the device nodes without
manually creating any or using devices.tar.gz;  even for more exotic use
cases like BSD jails.  hurd appears to have something equivalent.

Thanks for letting us know.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org

   


Bug#571136: Fwd: Re: Bug#571136: please remove useless devices from devices.tar.gz

2016-01-10 Thread Steven Chamberlain
Hi,

Marco d'Itri wrote:
> On Jan 10, Cyril Brulebois  wrote:
> > We have a bug report with a patch by Marco against debootstrap (see
> > attachment), which changes how devices are generated; I can't really
> > tell how much this might affect all of you (especially with debootstrap
> It is not supposed to, since both hurd and kfreebsd already used 
> a different method to manage /dev.

Yes, the code Marco changed cannot be reached when HOST_OS is kfreebsd*,
freebsd* or hurd*.  kfreebsd devfs provides all the device nodes without
manually creating any or using devices.tar.gz;  even for more exotic use
cases like BSD jails.  hurd appears to have something equivalent.

Thanks for letting us know.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


signature.asc
Description: Digital signature


Bug#571136: Fwd: Re: Bug#571136: please remove useless devices from devices.tar.gz

2016-01-09 Thread Marco d'Itri
On Jan 10, Cyril Brulebois  wrote:

> We have a bug report with a patch by Marco against debootstrap (see
> attachment), which changes how devices are generated; I can't really
> tell how much this might affect all of you (especially with debootstrap
It is not supposed to, since both hurd and kfreebsd already used 
a different method to manage /dev.

-- 
ciao,
Marco


signature.asc
Description: PGP signature


Bug#571136: Fwd: Re: Bug#571136: please remove useless devices from devices.tar.gz

2016-01-09 Thread Cyril Brulebois
Hi ports people,

I'm not exactly sure what happened with debian-ports@ (I think there
were some planned changes but I don't remember the outcome), so I'm
explicitly sending this to bsd/hurd lists since I suspect the linux
ports are less likely to be affected by this.

We have a bug report with a patch by Marco against debootstrap (see
attachment), which changes how devices are generated; I can't really
tell how much this might affect all of you (especially with debootstrap
being arch:all, and not intended to only be used from a Debian system),
so I thought I'd send a heads-up first. You may want to look at other
mails (esp. from Marco) in the bug log for more background:
  https://bugs.debian.org/571136

Please keep the bug report and Marco in copy of your replies.

Mraw,
KiBi.
--- Begin Message ---
On Jan 08, Marco d'Itri  wrote:

> If there are some doubts that devices.tar.gz could still be needed in 
> the future then I would start with a smaller patch which keeps all the 
> old code around.
Here it is.
If somebody will report valid uses for devices.tar.gz then the old code 
can be enabled again easily.

-- 
ciao,
Marco
diff --git a/debian/changelog b/debian/changelog
index 8a938a3..59cf216 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+debootstrap (1.0.75+nmu1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Stop creating useless device nodes. (Closes: #571136)
+
+ -- Marco d'Itri   Sat, 09 Jan 2016 04:43:00 +0100
+
 debootstrap (1.0.75) unstable; urgency=medium
 
   * Stop cleaning KEEP_DEBOOTSTRAP_DIR twice, as spotted by Chris Lamb
diff --git a/functions b/functions
index 8bef5e6..cd7f1ef 100644
--- a/functions
+++ b/functions
@@ -1060,19 +1060,34 @@ setup_devices () {
 	hurd*)
 		setup_devices_hurd ;;
 	*)
-		if [ -e "$DEVICES_TARGZ" ]; then
+		if true; then
+			setup_devices_simple
+		elif [ -e "$DEVICES_TARGZ" ]; then
 			zcat "$DEVICES_TARGZ" | (cd "$TARGET"; tar -xf -)
 		else
-			if [ -e /dev/.devfsd ] ; then
-in_target mount -t devfs devfs /dev
-			else
-error 1 NODEVTGZ "no %s. cannot create devices" "$DEVICES_TARGZ"
-			fi
+			error 1 NODEVTGZ "no %s. cannot create devices" "$DEVICES_TARGZ"
 		fi
 		;;
 	esac
 }
 
+setup_devices_simple () {
+	# The list of devices that can be created in a container comes from
+	# src/core/cgroup.c in the systemd source tree.
+	mknod $TARGET/dev/null		c 1 3
+	mknod $TARGET/dev/zero		c 1 5
+	mknod $TARGET/dev/full		c 1 7
+	mknod $TARGET/dev/random	c 1 8
+	mknod $TARGET/dev/urandom	c 1 9
+	mknod $TARGET/dev/tty		c 5 0
+	mkdir $TARGET/dev/pts/ $TARGET/dev/shm/
+	ln -s pts/ptmx $TARGET/dev/ptmx
+	ln -s /proc/self/fd   $TARGET/dev/fd
+	ln -s /proc/self/fd/0 $TARGET/dev/stdin
+	ln -s /proc/self/fd/1 $TARGET/dev/stdout
+	ln -s /proc/self/fd/2 $TARGET/dev/stderr
+}
+
 setup_devices_hurd () {
 	# Use the setup-translators of the hurd package, and firmlink
 	# $TARGET/{dev,servers} to the system ones.


signature.asc
Description: PGP signature
--- End Message ---


signature.asc
Description: Digital signature