Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2014-02-05 Thread Samuel Thibault
Hello,

Could you also apply the attached patch?  Otherwise, umountfs would
deconfigure the hurd console.  We will work on fixing this properly
in the hurd package, but since the consequences are really grave (no
console), we'd rather fix this already.

Samuel
diff --git a/debian/src/initscripts/etc/init.d/umountfs 
b/debian/src/initscripts/etc/init.d/umountfs
index ae27d0e..7ec3750 100755
--- a/debian/src/initscripts/etc/init.d/umountfs
+++ b/debian/src/initscripts/etc/init.d/umountfs
@@ -25,7 +25,7 @@ do_stop () {
do
echo $PROTECTED_MOUNTS | grep -qs ^$DEV $MTPT   continue
case $MTPT in
- 
/|/proc|/dev|/.dev|/dev/pts|/dev/shm|/dev/.static/dev|/proc/*|/sys|/sys/*|/run|/run/*)
+ 
/|/proc|/dev|/.dev|/dev/pts|/dev/shm|/dev/.static/dev|/proc/*|/sys|/sys/*|/run|/run/*|/dev/vcs)
continue
;;
esac


Bug#721917: [Pkg-sysvinit-devel] Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2014-02-05 Thread Petter Reinholdtsen
[Samuel Thibault]
 Hello,
 
 Could you also apply the attached patch?  Otherwise, umountfs would
 deconfigure the hurd console.  We will work on fixing this properly
 in the hurd package, but since the consequences are really grave (no
 console), we'd rather fix this already.

I've commited it to git.  Will become part of the next upload, which
is not yet scheduled.

-- 
Happy hacking
Petter Reinholdtsen


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



Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2014-01-30 Thread Petter Reinholdtsen
[Samuel Thibault]
 Hello,
 
 The patches have been applied in git, I tested them and it works nicely.
 There's just one additional thing to fix, see attached patch, which adds
 a getty on the Mach console.

Thank you.  I applied it, but believe more is needed to ensure that
the change take effect on upgrades.  Can you have a look and check if
I am right?

-- 
Happy hacking
Petter Reinholdtsen


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



Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2014-01-30 Thread Samuel Thibault
Petter Reinholdtsen, le Thu 30 Jan 2014 09:13:54 +0100, a écrit :
 [Samuel Thibault]
  The patches have been applied in git, I tested them and it works nicely.
  There's just one additional thing to fix, see attached patch, which adds
  a getty on the Mach console.
 
 Thank you.  I applied it, but believe more is needed to ensure that
 the change take effect on upgrades.  Can you have a look and check if
 I am right?

The upgrade would have to add the line, indeed.

Samuel


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



Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2014-01-29 Thread Samuel Thibault
Hello,

The patches have been applied in git, I tested them and it works nicely.
There's just one additional thing to fix, see attached patch, which adds
a getty on the Mach console.

Samuel
diff --git a/debian/share/inittab.gnu b/debian/share/inittab.gnu
index 04eabd6..6433992 100644
--- a/debian/share/inittab.gnu
+++ b/debian/share/inittab.gnu
@@ -57,6 +57,7 @@ po::powerokwait:/etc/init.d/powerfail stop
 4:23:respawn:/sbin/getty 38400 tty4
 5:23:respawn:/sbin/getty 38400 tty5
 6:23:respawn:/sbin/getty 38400 tty6
+c:23:respawn:/sbin/getty 38400 console
 
 # Example how to put a getty on a serial line (for a terminal)
 #


Bug#721917: [Pkg-sysvinit-devel] Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2014-01-13 Thread Petter Reinholdtsen

[Justus Winter 2013-09-18]
 Please find attached a patch introducing a proper break line for all
 the Hurd versions that do not have the features needed for this patch
 series.

This seem to complete the change request, increasing the chance that
upgrades will work.  Any objections from the sysvinit maintainers to
apply it?

-- 
Happy hacking
Petter Reinholdtsen


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



Bug#721917: [Pkg-sysvinit-devel] Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2014-01-13 Thread Justus Winter
Quoting Petter Reinholdtsen (2014-01-13 10:36:02)
 [Justus Winter 2013-09-18]
  Please find attached a patch introducing a proper break line for all
  the Hurd versions that do not have the features needed for this patch
  series.
 
 This seem to complete the change request, increasing the chance that
 upgrades will work.  Any objections from the sysvinit maintainers to
 apply it?

No, there is still one patch missing. I have updated the patch series
and I'm currently testing the package. I'll send an updated patch
series shortly.

Thanks,
Justus


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



Bug#721917: [Pkg-sysvinit-devel] Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2014-01-13 Thread Justus Winter
Here is an updated patch series, including the final patch that
includes a runsystem.sysv that can be used instead of the current
runsystem.gnu to use sysvinit to boot Debian/Hurd systems.

Thanks,
Justus
From 3957b17c8ffb9da8679e600b4b3142377051c172 Mon Sep 17 00:00:00 2001
From: Justus Winter 4win...@informatik.uni-hamburg.de
Date: Mon, 8 Jul 2013 11:41:33 +0200
Subject: [PATCH 1/8] initscripts: hurd has a proper tmpfs now, remove
 workaround

---
 debian/changelog   | 3 +++
 debian/src/initscripts/lib/init/mount-functions.sh | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index ddb344c..67bb5db 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,9 @@ sysvinit (2.88dsf-46) UNRELEASED; urgency=medium
 - Update invoke-rc.d and service to trim .sh from service names when
   calling systemctl.  (Closes: #726483)
 
+  [ Justus Winter ]
+  * mount-functions.sh: Hurd has a tmpfs translator now, remove workaround.
+
  -- James McCoy james...@debian.org  Thu, 02 Jan 2014 20:48:18 -0500
 
 sysvinit (2.88dsf-45) unstable; urgency=medium
diff --git a/debian/src/initscripts/lib/init/mount-functions.sh b/debian/src/initscripts/lib/init/mount-functions.sh
index 9fd369b..5126780 100644
--- a/debian/src/initscripts/lib/init/mount-functions.sh
+++ b/debian/src/initscripts/lib/init/mount-functions.sh
@@ -190,7 +190,6 @@ domount () {
 	elif [ $PRIFSTYPE = tmpfs ]; then
 		# always accept tmpfs, to mount /run before /proc
 		case $KERNEL in
-			GNU)	FSTYPE=none ;; # for now
 			*)	FSTYPE=$PRIFSTYPE ;;
 		esac
 	elif grep -E -qs $PRIFSTYPE\$ /proc/filesystems; then
-- 
1.8.5.2

From d61800b0a879b84ec7086d6839003542ea82a851 Mon Sep 17 00:00:00 2001
From: Justus Winter 4win...@informatik.uni-hamburg.de
Date: Mon, 8 Jul 2013 12:40:09 +0200
Subject: [PATCH 2/8] initscripts: add -ocompatible to procfs mounts on Hurd

---
 debian/changelog   | 1 +
 debian/src/initscripts/lib/init/mount-functions.sh | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 67bb5db..2e686e5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ sysvinit (2.88dsf-46) UNRELEASED; urgency=medium
 
   [ Justus Winter ]
   * mount-functions.sh: Hurd has a tmpfs translator now, remove workaround.
+  * mount-functions.sh: Add -ocompatible to procfs mounts on Hurd.
 
  -- James McCoy james...@debian.org  Thu, 02 Jan 2014 20:48:18 -0500
 
diff --git a/debian/src/initscripts/lib/init/mount-functions.sh b/debian/src/initscripts/lib/init/mount-functions.sh
index 5126780..8bb3031 100644
--- a/debian/src/initscripts/lib/init/mount-functions.sh
+++ b/debian/src/initscripts/lib/init/mount-functions.sh
@@ -176,7 +176,8 @@ domount () {
 
 	if [ $PRIFSTYPE = proc ]; then
 		case $KERNEL in
-			Linux|GNU) FSTYPE=proc ;;
+			Linux) FSTYPE=proc ;;
+			GNU)   FSTYPE=proc; FS_OPTS=-ocompatible ;;
 			*FreeBSD)  FSTYPE=linprocfs ;;
 			*) FSTYPE=procfs ;;
 		esac
-- 
1.8.5.2

From 3f50e4c5b0e5700ff917f183e975287d2d27ff0e Mon Sep 17 00:00:00 2001
From: Justus Winter 4win...@informatik.uni-hamburg.de
Date: Mon, 8 Jul 2013 12:48:42 +0200
Subject: [PATCH 3/8] initscripts: use pidof -s /sbin/init for robustness

pidof -s returns the first matching process. Since readdir(2) on
procfs returns the processes in ascending order, this returns the
first process. This is more robust if there is more than one
/sbin/init process.

Currently on Hurd there are two /sbin/init processes. Clearly this
needs some investigation. But as far as I can tell this could also
happen if INITDEBUG is defined as /sbin/init then forks a child that
can be ptrace(2)d on a vanilla Linux kernel.
---
 debian/changelog  | 1 +
 debian/src/initscripts/etc/init.d/mountall.sh | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 2e686e5..0b73e79 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ sysvinit (2.88dsf-46) UNRELEASED; urgency=medium
   [ Justus Winter ]
   * mount-functions.sh: Hurd has a tmpfs translator now, remove workaround.
   * mount-functions.sh: Add -ocompatible to procfs mounts on Hurd.
+  * mountall.sh: Use pidof -s /sbin/init for robustness.
 
  -- James McCoy james...@debian.org  Thu, 02 Jan 2014 20:48:18 -0500
 
diff --git a/debian/src/initscripts/etc/init.d/mountall.sh b/debian/src/initscripts/etc/init.d/mountall.sh
index 5f913cd..392eeec 100755
--- a/debian/src/initscripts/etc/init.d/mountall.sh
+++ b/debian/src/initscripts/etc/init.d/mountall.sh
@@ -55,7 +55,7 @@ do_start() {
 		mknod -m 600 $INITCTL p
 
 		# Reopen control channel.
-		PID=$(pidof /sbin/init || echo 1)
+		PID=$(pidof -s /sbin/init || echo 1)
 		[ -n $PID ]  kill -s USR1 $PID
 	fi
 
-- 
1.8.5.2

From 52644e408c25cd56d3187287200ecf97cacef868 Mon Sep 17 00:00:00 2001
From: Justus Winter 

Bug#721917: [Pkg-sysvinit-devel] Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2013-09-18 Thread Justus Winter
Quoting Justus Winter (2013-09-08 13:49:55)
 Quoting Petter Reinholdtsen (2013-09-08 08:20:52)
  [Justus Winter]
   Dear maintainer :)
  
  Hi. :)
  
   This is a patch series fixing sysvinit issues on Debian/Hurd *without*
   actually switching to sysvinit as init system on Debian/Hurd as this
   requires a rebuilt hurd package with recently implemented
   functionality.
  
  Hi.  Should these patches also include changes to the package
  relantionship (depend/conflict/break), to ensure hurd machines upgrade
  required packages together?  Some of the changes (like the tmpfs
  translation) seem to indicate that some newer package need to be
  installed when the change is done.

Please find attached a patch introducing a proper break line for all
the Hurd versions that do not have the features needed for this patch
series.

Cheers,
JustusFrom 6e22128cfcfd5432505005ecfe0476d677e7a3bb Mon Sep 17 00:00:00 2001
From: Justus Winter 4win...@informatik.uni-hamburg.de
Date: Wed, 18 Sep 2013 13:17:23 +0200
Subject: [PATCH 7/7] initscripts: Break hurd  20120408~

This is the Hurd package that included the most recent feature needed
for the Hurd-related changes above (a fixed tmpfs).
---
 debian/changelog |3 +++
 debian/control   |4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index ac37127..84f1b13 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,9 @@ sysvinit (2.88dsf-44) UNRELEASED; urgency=low
   * killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXSYMLINKS.
 Fixes build on Hurd.
   * sysvinit.postinst: Fix file name of gettys in /etc/inittab on Hurd.
+  * Break hurd  20120408~, this is the Hurd package that included
+the most recent feature needed for the Hurd-related changes above
+(a fixed tmpfs).
 
  -- Justus Winter 4win...@informatik.uni-hamburg.de  Thu, 05 Sep 2013 15:10:39 +0200
 
diff --git a/debian/control b/debian/control
index 7dd998d..4c8b627 100644
--- a/debian/control
+++ b/debian/control
@@ -118,7 +118,9 @@ Breaks:
 # being a symlink #668616 and #668650
  initramfs-tools ( 0.104),
 # Needed for transition to dependency-based boot for wheezy
- bootchart ( 0.10~svn407-4)
+ bootchart ( 0.10~svn407-4),
+# This hurd package brought us tmpfs
+ hurd ( 20120408~)
 Description: scripts for initializing and shutting down the system
  The scripts in this package initialize a standard Debian
  system at boot time and shut it down at halt or reboot time.
-- 
1.7.10.4



Bug#721917: [Pkg-sysvinit-devel] Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2013-09-08 Thread Petter Reinholdtsen

[Justus Winter]
 Dear maintainer :)

Hi. :)

 This is a patch series fixing sysvinit issues on Debian/Hurd *without*
 actually switching to sysvinit as init system on Debian/Hurd as this
 requires a rebuilt hurd package with recently implemented
 functionality.

Hi.  Should these patches also include changes to the package
relantionship (depend/conflict/break), to ensure hurd machines upgrade
required packages together?  Some of the changes (like the tmpfs
translation) seem to indicate that some newer package need to be
installed when the change is done.

-- 
Happy hacking
Petter Reinholdtsen


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



Bug#721917: [Pkg-sysvinit-devel] Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2013-09-08 Thread Justus Winter
Quoting Petter Reinholdtsen (2013-09-08 08:20:52)
 [Justus Winter]
  Dear maintainer :)
 
 Hi. :)
 
  This is a patch series fixing sysvinit issues on Debian/Hurd *without*
  actually switching to sysvinit as init system on Debian/Hurd as this
  requires a rebuilt hurd package with recently implemented
  functionality.
 
 Hi.  Should these patches also include changes to the package
 relantionship (depend/conflict/break), to ensure hurd machines upgrade
 required packages together?  Some of the changes (like the tmpfs
 translation) seem to indicate that some newer package need to be
 installed when the change is done.

Yes, but currently sysvinit is not used on Debian/Hurd and as I said,
the part that would actually allow one to use sysvinit on Debian/Hurd
has been deliberatly left out of this patch series as it depends on
some functionality that has been implemented recently by me but has
not yet been fully merged and is thus not yet available.

If this is merged and a new hurd package has been pushed to unstable,
I will send the remaining patch including the proper dependency
information to allow one to switch to sysvinit.

Cheers,
Justus


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



Bug#721917: Patches fixing sysvinit issues on Debian/Hurd

2013-09-05 Thread Justus Winter
Package: sysvinit
Version: 2.88dsf-43
Severity: wishlist
Tags: patch
Usertags: hurd

Dear maintainer :)

This is a patch series fixing sysvinit issues on Debian/Hurd *without*
actually switching to sysvinit as init system on Debian/Hurd as this
requires a rebuilt hurd package with recently implemented
functionality.

Thanks,
Justus
From 66a3c62db00e01ff894c7d63bf9182e1a4f2700c Mon Sep 17 00:00:00 2001
From: Justus Winter 4win...@informatik.uni-hamburg.de
Date: Mon, 8 Jul 2013 11:41:33 +0200
Subject: [PATCH 1/6] initscripts: hurd has a proper tmpfs now, remove
 workaround

---
 debian/changelog   |7 +++
 debian/src/initscripts/lib/init/mount-functions.sh |1 -
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index bbd42d0..573add9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+sysvinit (2.88dsf-44) UNRELEASED; urgency=low
+
+  [ Justus Winter ]
+  * mount-functions.sh: Hurd has a tmpfs translator now, remove workaround.
+
+ -- Justus Winter 4win...@informatik.uni-hamburg.de  Thu, 05 Sep 2013 15:10:39 +0200
+
 sysvinit (2.88dsf-43) unstable; urgency=low
 
   [ Roger Leigh ]
diff --git a/debian/src/initscripts/lib/init/mount-functions.sh b/debian/src/initscripts/lib/init/mount-functions.sh
index 9fd369b..5126780 100644
--- a/debian/src/initscripts/lib/init/mount-functions.sh
+++ b/debian/src/initscripts/lib/init/mount-functions.sh
@@ -190,7 +190,6 @@ domount () {
 	elif [ $PRIFSTYPE = tmpfs ]; then
 		# always accept tmpfs, to mount /run before /proc
 		case $KERNEL in
-			GNU)	FSTYPE=none ;; # for now
 			*)	FSTYPE=$PRIFSTYPE ;;
 		esac
 	elif grep -E -qs $PRIFSTYPE\$ /proc/filesystems; then
-- 
1.7.10.4

From b9b81e6c1f2fa67ccb90b5341728b2da02d476d6 Mon Sep 17 00:00:00 2001
From: Justus Winter 4win...@informatik.uni-hamburg.de
Date: Mon, 8 Jul 2013 12:40:09 +0200
Subject: [PATCH 2/6] initscripts: add -ocompatible to procfs mounts on Hurd

---
 debian/changelog   |1 +
 debian/src/initscripts/lib/init/mount-functions.sh |3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 573add9..29257ab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ sysvinit (2.88dsf-44) UNRELEASED; urgency=low
 
   [ Justus Winter ]
   * mount-functions.sh: Hurd has a tmpfs translator now, remove workaround.
+  * mount-functions.sh: Add -ocompatible to procfs mounts on Hurd.
 
  -- Justus Winter 4win...@informatik.uni-hamburg.de  Thu, 05 Sep 2013 15:10:39 +0200
 
diff --git a/debian/src/initscripts/lib/init/mount-functions.sh b/debian/src/initscripts/lib/init/mount-functions.sh
index 5126780..8bb3031 100644
--- a/debian/src/initscripts/lib/init/mount-functions.sh
+++ b/debian/src/initscripts/lib/init/mount-functions.sh
@@ -176,7 +176,8 @@ domount () {
 
 	if [ $PRIFSTYPE = proc ]; then
 		case $KERNEL in
-			Linux|GNU) FSTYPE=proc ;;
+			Linux) FSTYPE=proc ;;
+			GNU)   FSTYPE=proc; FS_OPTS=-ocompatible ;;
 			*FreeBSD)  FSTYPE=linprocfs ;;
 			*) FSTYPE=procfs ;;
 		esac
-- 
1.7.10.4

From b177429374e6c460d734124ddfeb45e6d39655ff Mon Sep 17 00:00:00 2001
From: Justus Winter 4win...@informatik.uni-hamburg.de
Date: Mon, 8 Jul 2013 12:48:42 +0200
Subject: [PATCH 3/6] initscripts: use pidof -s /sbin/init for robustness

pidof -s returns the first matching process. Since readdir(2) on
procfs returns the processes in ascending order, this returns the
first process. This is more robust if there is more than one
/sbin/init process.

Currently on Hurd there are two /sbin/init processes. Clearly this
needs some investigation. But as far as I can tell this could also
happen if INITDEBUG is defined as /sbin/init then forks a child that
can be ptrace(2)d on a vanilla Linux kernel.
---
 debian/changelog  |1 +
 debian/src/initscripts/etc/init.d/mountall.sh |2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 29257ab..49afbed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ sysvinit (2.88dsf-44) UNRELEASED; urgency=low
   [ Justus Winter ]
   * mount-functions.sh: Hurd has a tmpfs translator now, remove workaround.
   * mount-functions.sh: Add -ocompatible to procfs mounts on Hurd.
+  * mountall.sh: Use pidof -s /sbin/init for robustness.
 
  -- Justus Winter 4win...@informatik.uni-hamburg.de  Thu, 05 Sep 2013 15:10:39 +0200
 
diff --git a/debian/src/initscripts/etc/init.d/mountall.sh b/debian/src/initscripts/etc/init.d/mountall.sh
index 5f913cd..392eeec 100755
--- a/debian/src/initscripts/etc/init.d/mountall.sh
+++ b/debian/src/initscripts/etc/init.d/mountall.sh
@@ -55,7 +55,7 @@ do_start() {
 		mknod -m 600 $INITCTL p
 
 		# Reopen control channel.
-		PID=$(pidof /sbin/init || echo 1)
+		PID=$(pidof -s /sbin/init || echo 1)
 		[ -n $PID ]  kill -s USR1 $PID
 	fi
 
-- 
1.7.10.4

From