forked from mirrors/nixpkgs
Merge remote-tracking branch 'origin/master' into systemd
This commit is contained in:
commit
3a51aec945
|
@ -1,7 +1,7 @@
|
||||||
From 0085f49cd0ba889e3db9102f328f6044ae3a2c18 Mon Sep 17 00:00:00 2001
|
From 0085f49cd0ba889e3db9102f328f6044ae3a2c18 Mon Sep 17 00:00:00 2001
|
||||||
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
||||||
Date: Tue, 8 Jan 2013 15:44:33 +0100
|
Date: Tue, 8 Jan 2013 15:44:33 +0100
|
||||||
Subject: [PATCH 1/5] Make "systemctl daemon-reexec" do the right thing on
|
Subject: [PATCH 1/6] Make "systemctl daemon-reexec" do the right thing on
|
||||||
NixOS
|
NixOS
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
From 2b0a9106d3aabb365af0cc34b595a1e697120f37 Mon Sep 17 00:00:00 2001
|
From 2b0a9106d3aabb365af0cc34b595a1e697120f37 Mon Sep 17 00:00:00 2001
|
||||||
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
||||||
Date: Tue, 8 Jan 2013 15:45:01 +0100
|
Date: Tue, 8 Jan 2013 15:45:01 +0100
|
||||||
Subject: [PATCH 2/5] Ignore duplicate paths in "systemctl start"
|
Subject: [PATCH 2/6] Ignore duplicate paths in "systemctl start"
|
||||||
|
|
||||||
---
|
---
|
||||||
src/systemctl/systemctl.c | 7 +++++--
|
src/systemctl/systemctl.c | 7 +++++--
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
From a013beb84f135cebf1c8c9363d5676c1c0a6be7a Mon Sep 17 00:00:00 2001
|
From a013beb84f135cebf1c8c9363d5676c1c0a6be7a Mon Sep 17 00:00:00 2001
|
||||||
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
||||||
Date: Tue, 8 Jan 2013 15:46:30 +0100
|
Date: Tue, 8 Jan 2013 15:46:30 +0100
|
||||||
Subject: [PATCH 3/5] Start device units for uninitialised encrypted devices
|
Subject: [PATCH 3/6] Start device units for uninitialised encrypted devices
|
||||||
|
|
||||||
This is necessary because the NixOS service that initialises the
|
This is necessary because the NixOS service that initialises the
|
||||||
filesystem depends on the appearance of the device unit. Also, this
|
filesystem depends on the appearance of the device unit. Also, this
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
From b40d8783f94666035baae567882c0d4be82cda01 Mon Sep 17 00:00:00 2001
|
From b40d8783f94666035baae567882c0d4be82cda01 Mon Sep 17 00:00:00 2001
|
||||||
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
||||||
Date: Tue, 8 Jan 2013 15:48:19 +0100
|
Date: Tue, 8 Jan 2013 15:48:19 +0100
|
||||||
Subject: [PATCH 4/5] Set switch-to-configuration hints for some units
|
Subject: [PATCH 4/6] Set switch-to-configuration hints for some units
|
||||||
MIME-Version: 1.0
|
MIME-Version: 1.0
|
||||||
Content-Type: text/plain; charset=UTF-8
|
Content-Type: text/plain; charset=UTF-8
|
||||||
Content-Transfer-Encoding: 8bit
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
From c5c8ac3a0420fb42ba2f629368fd5bd6ea1e753b Mon Sep 17 00:00:00 2001
|
From c5c8ac3a0420fb42ba2f629368fd5bd6ea1e753b Mon Sep 17 00:00:00 2001
|
||||||
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
||||||
Date: Tue, 8 Jan 2013 15:56:03 +0100
|
Date: Tue, 8 Jan 2013 15:56:03 +0100
|
||||||
Subject: [PATCH 5/5] sysinit.target: Drop the dependency on local-fs.target
|
Subject: [PATCH 5/6] sysinit.target: Drop the dependency on local-fs.target
|
||||||
and swap.target
|
and swap.target
|
||||||
|
|
||||||
Having all services with DefaultDependencies=yes depend on
|
Having all services with DefaultDependencies=yes depend on
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
From d3caa154098e215145679f38fa92a8bd482107be Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
||||||
|
Date: Tue, 8 Jan 2013 18:36:28 +0100
|
||||||
|
Subject: [PATCH 6/6] Don't call "plymouth quit"
|
||||||
|
|
||||||
|
NixOS doesn't use Plymouth (yet).
|
||||||
|
---
|
||||||
|
units/emergency.service.in | 1 -
|
||||||
|
units/rescue.service.m4.in | 1 -
|
||||||
|
2 files changed, 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/units/emergency.service.in b/units/emergency.service.in
|
||||||
|
index 442f0e0..6b7eafd 100644
|
||||||
|
--- a/units/emergency.service.in
|
||||||
|
+++ b/units/emergency.service.in
|
||||||
|
@@ -15,7 +15,6 @@ Before=shutdown.target
|
||||||
|
[Service]
|
||||||
|
Environment=HOME=/root
|
||||||
|
WorkingDirectory=/root
|
||||||
|
-ExecStartPre=-/bin/plymouth quit
|
||||||
|
ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
|
||||||
|
ExecStart=-/sbin/sulogin
|
||||||
|
ExecStopPost=@SYSTEMCTL@ --fail --no-block default
|
||||||
|
diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
|
||||||
|
index 269797a..2c640f4 100644
|
||||||
|
--- a/units/rescue.service.m4.in
|
||||||
|
+++ b/units/rescue.service.m4.in
|
||||||
|
@@ -16,7 +16,6 @@ Before=shutdown.target
|
||||||
|
[Service]
|
||||||
|
Environment=HOME=/root
|
||||||
|
WorkingDirectory=/root
|
||||||
|
-ExecStartPre=-/bin/plymouth quit
|
||||||
|
ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
|
||||||
|
ExecStart=-/sbin/sulogin
|
||||||
|
ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
|
||||||
|
--
|
||||||
|
1.8.0.1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ stdenv, fetchurl, pkgconfig, intltool, gperf, libcap, dbus, kmod
|
{ stdenv, fetchurl, pkgconfig, intltool, gperf, libcap, dbus, kmod
|
||||||
, xz, pam, acl, cryptsetup, libuuid, m4, utillinux
|
, xz, pam, acl, cryptsetup, libuuid, m4, utillinux
|
||||||
, glib, kbd, libxslt, coreutils, libgcrypt
|
, glib, kbd, libxslt, coreutils, libgcrypt, sysvtools
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert stdenv.gcc.libc or null != null;
|
assert stdenv.gcc.libc or null != null;
|
||||||
|
@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
|
||||||
./0003-Start-device-units-for-uninitialised-encrypted-devic.patch
|
./0003-Start-device-units-for-uninitialised-encrypted-devic.patch
|
||||||
./0004-Set-switch-to-configuration-hints-for-some-units.patch
|
./0004-Set-switch-to-configuration-hints-for-some-units.patch
|
||||||
./0005-sysinit.target-Drop-the-dependency-on-local-fs.targe.patch
|
./0005-sysinit.target-Drop-the-dependency-on-local-fs.targe.patch
|
||||||
|
./0006-Don-t-call-plymouth-quit.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
|
@ -42,14 +43,17 @@ stdenv.mkDerivation rec {
|
||||||
preConfigure =
|
preConfigure =
|
||||||
''
|
''
|
||||||
# FIXME: patch this in systemd properly (and send upstream).
|
# FIXME: patch this in systemd properly (and send upstream).
|
||||||
for i in src/remount-fs/remount-fs.c src/core/mount.c src/core/swap.c src/fsck/fsck.c; do
|
# FIXME: use sulogin from util-linux once updated.
|
||||||
|
for i in src/remount-fs/remount-fs.c src/core/mount.c src/core/swap.c src/fsck/fsck.c units/emergency.service.in units/rescue.service.m4.in; do
|
||||||
test -e $i
|
test -e $i
|
||||||
substituteInPlace $i \
|
substituteInPlace $i \
|
||||||
--replace /bin/mount ${utillinux}/bin/mount \
|
--replace /bin/mount ${utillinux}/bin/mount \
|
||||||
--replace /bin/umount ${utillinux}/bin/umount \
|
--replace /bin/umount ${utillinux}/bin/umount \
|
||||||
--replace /sbin/swapon ${utillinux}/sbin/swapon \
|
--replace /sbin/swapon ${utillinux}/sbin/swapon \
|
||||||
--replace /sbin/swapoff ${utillinux}/sbin/swapoff \
|
--replace /sbin/swapoff ${utillinux}/sbin/swapoff \
|
||||||
--replace /sbin/fsck ${utillinux}/sbin/fsck
|
--replace /sbin/fsck ${utillinux}/sbin/fsck \
|
||||||
|
--replace /bin/echo ${coreutils}/bin/echo \
|
||||||
|
--replace /sbin/sulogin ${sysvtools}/sbin/sulogin
|
||||||
done
|
done
|
||||||
|
|
||||||
substituteInPlace src/journal/catalog.c \
|
substituteInPlace src/journal/catalog.c \
|
||||||
|
|
|
@ -4,12 +4,12 @@ let version = "2.88dsf"; in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = (if withoutInitTools then "sysvtools" else "sysvinit") + "-" + version;
|
name = (if withoutInitTools then "sysvtools" else "sysvinit") + "-" + version;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://savannah/sysvinit/sysvinit-${version}.tar.bz2";
|
url = "mirror://savannah/sysvinit/sysvinit-${version}.tar.bz2";
|
||||||
sha256 = "068mvzaz808a673zigyaqb63xc8bndh2klk16zi5c83rw70wifv0";
|
sha256 = "068mvzaz808a673zigyaqb63xc8bndh2klk16zi5c83rw70wifv0";
|
||||||
};
|
};
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
# Patch some minimal hard references, so halt/shutdown work
|
# Patch some minimal hard references, so halt/shutdown work
|
||||||
sed -i -e "s,/sbin/,$out/sbin/," src/halt.c src/init.c src/paths.h
|
sed -i -e "s,/sbin/,$out/sbin/," src/halt.c src/init.c src/paths.h
|
||||||
|
@ -27,16 +27,17 @@ stdenv.mkDerivation {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = stdenv.lib.optionalString withoutInitTools
|
postInstall = stdenv.lib.optionalString withoutInitTools
|
||||||
''
|
''
|
||||||
mv $out/sbin/killall5 $out/bin
|
mv $out/sbin/killall5 $out/bin
|
||||||
ln -sf killall5 $out/bin/pidof
|
ln -sf killall5 $out/bin/pidof
|
||||||
rm -rf $out/sbin
|
shopt -s extglob
|
||||||
|
rm -rf $out/sbin/!(sulogin)
|
||||||
rm -rf $out/include
|
rm -rf $out/include
|
||||||
rm -rf $out/share/man/man5
|
rm -rf $out/share/man/man5
|
||||||
rm $(for i in $out/share/man/man8/*; do echo $i; done | grep -v 'pidof\|killall5')
|
rm $(for i in $out/share/man/man8/*; do echo $i; done | grep -v 'pidof\|killall5')
|
||||||
rm $out/bin/{mountpoint,wall} $out/share/man/man1/{mountpoint.1,wall.1}
|
rm $out/bin/{mountpoint,wall} $out/share/man/man1/{mountpoint.1,wall.1}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://www.nongnu.org/sysvinit/;
|
homepage = http://www.nongnu.org/sysvinit/;
|
||||||
description = "Utilities related to booting and shutdown";
|
description = "Utilities related to booting and shutdown";
|
||||||
|
|
Loading…
Reference in a new issue