From 500a06b8a90b23d7045d0556fe442085db05a9e0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 16 Feb 2004 14:09:55 +0000 Subject: [PATCH] * Added sysvinit (mostly because it provides a decent `halt' command). svn path=/nixpkgs/trunk/; revision=787 --- pkgs/os-specific/linux/sysvinit/builder.sh | 20 +++++ pkgs/os-specific/linux/sysvinit/default.nix | 13 +++ pkgs/os-specific/linux/sysvinit/patch | 93 +++++++++++++++++++++ pkgs/system/all-packages-generic.nix | 5 ++ 4 files changed, 131 insertions(+) create mode 100755 pkgs/os-specific/linux/sysvinit/builder.sh create mode 100644 pkgs/os-specific/linux/sysvinit/default.nix create mode 100644 pkgs/os-specific/linux/sysvinit/patch diff --git a/pkgs/os-specific/linux/sysvinit/builder.sh b/pkgs/os-specific/linux/sysvinit/builder.sh new file mode 100755 index 000000000000..b67f28b6a992 --- /dev/null +++ b/pkgs/os-specific/linux/sysvinit/builder.sh @@ -0,0 +1,20 @@ +#! /bin/sh -e + +buildinputs="$patch" +. $stdenv/setup + +tar xvfz $src +cd sysvinit-* +patch -p1 < $srcPatch +cd src +make +mkdir $out +mkdir $out/bin +mkdir $out/sbin +mkdir $out/include +mkdir $out/share +mkdir $out/share/man +mkdir $out/share/man/man1 +mkdir $out/share/man/man5 +mkdir $out/share/man/man8 +make ROOT=$out install diff --git a/pkgs/os-specific/linux/sysvinit/default.nix b/pkgs/os-specific/linux/sysvinit/default.nix new file mode 100644 index 000000000000..da197f6422b1 --- /dev/null +++ b/pkgs/os-specific/linux/sysvinit/default.nix @@ -0,0 +1,13 @@ +{stdenv, fetchurl, patch}: + +derivation { + name = "sysvinit-2.85"; + system = stdenv.system; + builder = ./builder.sh; + src = fetchurl { + url = ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-2.85.tar.gz; + md5 = "8a2d8f1ed5a2909da04132fefa44905e"; + }; + srcPatch = ./patch; + inherit stdenv patch; +} diff --git a/pkgs/os-specific/linux/sysvinit/patch b/pkgs/os-specific/linux/sysvinit/patch new file mode 100644 index 000000000000..20fa26206639 --- /dev/null +++ b/pkgs/os-specific/linux/sysvinit/patch @@ -0,0 +1,93 @@ +Only in sysvinit-2.85/src: dowall.o +Only in sysvinit-2.85/src: halt +Only in sysvinit-2.85/src: halt.o +Only in sysvinit-2.85/src: hddown.o +Only in sysvinit-2.85/src: ifdown.o +Only in sysvinit-2.85/src: init +Only in sysvinit-2.85/src: init.o +Only in sysvinit-2.85/src: init_utmp.o +Only in sysvinit-2.85/src: killall5 +Only in sysvinit-2.85/src: last +Only in sysvinit-2.85/src: last.o +diff -rc sysvinit-2.85-orig/src/Makefile sysvinit-2.85/src/Makefile +*** sysvinit-2.85-orig/src/Makefile 2001-11-06 12:58:16.000000000 +0100 +--- sysvinit-2.85/src/Makefile 2004-02-16 14:49:01.000000000 +0100 +*************** +*** 24,36 **** + BIN_OWNER = root + BIN_GROUP = root + BIN_COMBO = $(BIN_OWNER).$(BIN_GROUP) +! INSTALL = install -o $(BIN_OWNER) -g $(BIN_GROUP) +! MANDIR = /usr/share/man + + # Additional libs for Gnu Libc +! ifneq ($(wildcard /usr/lib/libcrypt.a),) + LCRYPT = -lcrypt +! endif + + all: $(PROGS) + +--- 24,36 ---- + BIN_OWNER = root + BIN_GROUP = root + BIN_COMBO = $(BIN_OWNER).$(BIN_GROUP) +! INSTALL = install # -o $(BIN_OWNER) -g $(BIN_GROUP) +! MANDIR = /share/man + + # Additional libs for Gnu Libc +! #ifneq ($(wildcard /usr/lib/libcrypt.a),) + LCRYPT = -lcrypt +! #endif + + all: $(PROGS) + +*************** +*** 89,104 **** + runlevel shutdown $(ROOT)/sbin + # These are not installed by default + ifeq ($(DEBIAN),) +! $(INSTALL) -m 555 utmpdump wall $(ROOT)/usr/bin + endif + # $(INSTALL) -m 755 etc/initscript.sample $(ROOT)/etc +! $(INSTALL) -m 755 mesg last $(ROOT)/usr/bin +! cd $(ROOT)/sbin; ln -sf halt reboot; chown $(BIN_COMBO) reboot +! cd $(ROOT)/sbin; ln -sf halt poweroff; chown $(BIN_COMBO) poweroff +! cd $(ROOT)/sbin; ln -sf init telinit; chown $(BIN_COMBO) telinit +! cd $(ROOT)/bin; ln -sf ../sbin/killall5 pidof; chown $(BIN_COMBO) pidof +! cd $(ROOT)/usr/bin; ln -sf last lastb; chown $(BIN_COMBO) lastb +! $(INSTALL) -m 644 initreq.h $(ROOT)/usr/include + $(INSTALL) -m 644 ../man/*.8 $(ROOT)$(MANDIR)/man8 + $(INSTALL) -m 644 ../man/*.5 $(ROOT)$(MANDIR)/man5 + ifeq ($(DEBIAN),) +--- 89,104 ---- + runlevel shutdown $(ROOT)/sbin + # These are not installed by default + ifeq ($(DEBIAN),) +! $(INSTALL) -m 555 utmpdump wall $(ROOT)/bin + endif + # $(INSTALL) -m 755 etc/initscript.sample $(ROOT)/etc +! $(INSTALL) -m 755 mesg last $(ROOT)/bin +! cd $(ROOT)/sbin; ln -sf halt reboot #; chown $(BIN_COMBO) reboot +! cd $(ROOT)/sbin; ln -sf halt poweroff #; chown $(BIN_COMBO) poweroff +! cd $(ROOT)/sbin; ln -sf init telinit #; chown $(BIN_COMBO) telinit +! cd $(ROOT)/bin; ln -sf ../sbin/killall5 pidof #; chown $(BIN_COMBO) pidof +! cd $(ROOT)/bin; ln -sf last lastb #; chown $(BIN_COMBO) lastb +! $(INSTALL) -m 644 initreq.h $(ROOT)/include + $(INSTALL) -m 644 ../man/*.8 $(ROOT)$(MANDIR)/man8 + $(INSTALL) -m 644 ../man/*.5 $(ROOT)$(MANDIR)/man5 + ifeq ($(DEBIAN),) +Only in sysvinit-2.85/src: Makefile~ +Only in sysvinit-2.85/src: mesg +Only in sysvinit-2.85/src: mesg.o +Only in sysvinit-2.85/src: runlevel +Only in sysvinit-2.85/src: runlevel.o +Only in sysvinit-2.85/src: shutdown +Only in sysvinit-2.85/src: shutdown.o +Only in sysvinit-2.85/src: sulogin +Only in sysvinit-2.85/src: sulogin.o +Only in sysvinit-2.85/src: utmpdump +Only in sysvinit-2.85/src: utmpdump.o +Only in sysvinit-2.85/src: utmp.o +Only in sysvinit-2.85/src: wall +Only in sysvinit-2.85/src: wall.o +Only in sysvinit-2.85/src: x diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index e8d72135dc77..9974c958f9ee 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -564,6 +564,11 @@ patch = gnupatch; }; + sysvinit = (import ../os-specific/linux/sysvinit) { + inherit fetchurl stdenv; + patch = gnupatch; + }; + ### DATA