[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

openrc: Updated patches making openrc work properly on Debian GNU/Hurd



Whatever you have decided about Linux only, this is relevant
information. Debian is about versatility in the Unix/Posix way, not any
proprietary locked-in thing. If you continue this track Debian will no
longer be a "Universal operating system". And users will choose to go
for a FREE SOFTWARE solution (not a locked-in one)!

Package: openrc
Version: 0.12.4+20131230-7
Severity: important
Tags: patch
Usertags: hurd

Hi, the recent patches 0100-GNU-Hurd_PATH_MAX_and_defined.patch and
0110-GNU-Hurd_add-missing-files.patch enables a successful build of
openrc for GNU/Hurd. However, to make it work properly 0110-* has to be
modified, and #721917 to be applied! Attached is an updated patch of 
0110-GNU-Hurd_add-missing-files.patch.

Of course some minor things, like mount parameters still has to be
modified, but the basic functionality is there :)

Thanks!

Description: Adds missing files for GNU Hurd
Author: Thomas Goirand <zigo@debian.org>, Svante Signell <svante.signell@gmail.com>
Forwarded: no
Last-Update: 2014-01-06

Index: openrc-0.12.4+20131230/etc/rc.conf.GNU
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ openrc-0.12.4+20131230/etc/rc.conf.GNU	2014-01-24 12:03:48.669658957 +0100
@@ -0,0 +1,15 @@
+##############################################################################
+# GNU/Hurd SPECIFIC OPTIONS
+
+# This is the subsystem type. Valid options on GNU/Hurd:
+# ""        - nothing special
+# "subhurd" - Hurd subhurds (to be checked)
+# If this is commented out, automatic detection will be used.
+#
+# This should be set to the value representing the environment this file is
+# PRESENTLY in, not the virtualization the environment is capable of.
+#rc_sys=""
+# This is the number of tty's used in most of the rc-scripts (like
+# consolefont, numlock, etc ...)
+#rc_tty_number=6?
+
Index: openrc-0.12.4+20131230/sh/init.sh.GNU.in
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ openrc-0.12.4+20131230/sh/init.sh.GNU.in	2014-01-25 18:48:04.227762627 +0100
@@ -0,0 +1,43 @@
+#!@SHELL@
+# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
+# Copyright (c) 2014 Svante Signell <svante.signell@gmail.com>
+# Released under the 2-clause BSD license.
+# This basically mounts $svcdir as a ramdisk, but preserving its content
+# which allows us to run depscan.sh
+# FIXME: Modify for GNU/Hurd
+
+mount_svcdir()
+{
+# RC_LIBEXECDIR=/lib/rc
+# RC_SVCDIR=/lib/rc/init.d
+einfo "Executing /lib/rc/sh/init.sh"
+if ! fstabinfo --mount "$RC_SVCDIR"; then
+  if ! mountinfo -q "$RC_SVCDIR"; then
+    echo "$RC_SVCDIR not mounted"
+    ro=0
+    rc=`fsysopts / | grep -q readonly`
+    if [ $? = 0 ]; then
+      ro=1
+      echo "$RC_SVCDIR not writable"
+      fsysopts / --writable
+      echo "Creating $RC_SVCDIR"
+      mkdir -p $RC_SVCDIR
+      echo "Mounting $RC_SVCDIR on tmpfs"
+
+      rc=`mount -t tmpfs -o mode=0755,no-suid,size=10% tmpfs "$RC_SVCDIR"`
+      if [ $? != 0 ]; then
+        echo "Unable to mount tmpfs on $RC_SVCDIR."
+        echo "Can't continue."
+        exit 1
+      fi
+      if [ ro = 1 ]; then
+        fsysopts / --readonly
+      fi
+    fi
+  fi
+fi
+}
+
+. "$RC_LIBEXECDIR"/sh/functions.sh
+[ -r "/etc/rc.conf" ] && . "/etc/rc.conf"
+. "$RC_LIBEXECDIR"/sh/init-common-post.sh
Index: openrc-0.12.4+20131230/conf.d/network.GNU.in
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ openrc-0.12.4+20131230/conf.d/network.GNU.in	2014-01-24 08:32:52.000000000 +0100
@@ -0,0 +1,4 @@
+
+# You can assign a default route
+#defaultroute="gw 192.168.0.1"
+#defaultroute6="gw 2001:a:b:c"
Index: openrc-0.12.4+20131230/mk/os-GNU.mk
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ openrc-0.12.4+20131230/mk/os-GNU.mk	2014-01-24 08:32:52.000000000 +0100
@@ -0,0 +1,8 @@
+# Copyright (c) 2008 Roy Marples <roy@marples.name>
+# Released under the 2-clause BSD license.
+
+SFX=		.GNU.in
+PKG_PREFIX?=	/usr
+
+CPPFLAGS+=	-D_BSD_SOURCE -D_XOPEN_SOURCE=700
+LIBDL=		-Wl,-Bdynamic -ldl
Index: openrc-0.12.4+20131230/conf.d/staticroute.GNU.in
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ openrc-0.12.4+20131230/conf.d/staticroute.GNU.in	2014-01-24 08:32:52.000000000 +0100
@@ -0,0 +1,7 @@
+# Separate multiple routes using ; or new lines.
+# /etc/route.conf(5) takes precedence over this configuration.
+
+# Example static routes. See route(8) for syntax.
+# FIXME: "net ..." not supported
+#staticroute="net 192.168.0.0 -netmask 255.255.255.0 --address 10.73.1.1
+#net 192.168.1.0 -netmask 255.255.255.0 --address 10.73.1.1"
Index: openrc-0.12.4+20131230/init.d/sysctl.GNU.in
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ openrc-0.12.4+20131230/init.d/sysctl.GNU.in	2014-01-24 08:32:52.000000000 +0100
@@ -0,0 +1,32 @@
+#!@PREFIX@/sbin/runscript
+# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
+# Released under the 2-clause BSD license.
+#FIXME: Modify for GNU/Hurd
+
+depend()
+{
+	before bootmisc logger
+	keyword -prefix
+}
+
+start()
+{
+	[ -e /etc/sysctl.conf ] || return 0
+	local retval=0 var= comments= conf=
+	ebegin "Configuring kernel parameters"
+	eindent
+	for conf in @SYSCONFDIR@/sysctl.conf @SYSCONFDIR@/sysctl.d/*.conf; do
+		if [ -r "$conf" ]; then
+			vebegin "applying $conf"
+			while read var comments; do
+				case "$var" in
+				""|"#"*) continue;;
+				esac
+				sysctl -w "$var" >/dev/null || retval=1
+			done < "$conf"
+			veend $retval
+		fi
+	done
+	eoutdent
+	eend $retval "Some errors were encountered"
+}

Reply to: