From: William Hubbs Date: Mon, 10 May 2010 17:13:05 +0000 (+0000) Subject: removed old version X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=68a7656486ac255aed689b442d5fee9edaeda04f;p=gentoo.git removed old version Package-Manager: portage-2.2_rc67/cvs/Linux i686 --- diff --git a/sys-apps/sysvinit/ChangeLog b/sys-apps/sysvinit/ChangeLog index 0d5c0af1d33e..99a783a55fdb 100644 --- a/sys-apps/sysvinit/ChangeLog +++ b/sys-apps/sysvinit/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for sys-apps/sysvinit # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/ChangeLog,v 1.79 2010/04/11 16:54:43 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/ChangeLog,v 1.80 2010/05/10 17:13:05 williamh Exp $ + + 10 May 2010; William Hubbs -files/2.86-gentoo.patch, + -sysvinit-2.86-r10.ebuild, -files/inittab-2.86-r12, + -files/sysvinit-2.86-execl.patch, -files/2.86-selinux.patch, + -files/2.86-selinux-1.patch, -files/sysvinit-2.86-POSIX-1003.1e.patch, + -files/sysvinit-2.86-build.patch, -files/sysvinit-2.86-docs.patch, + -files/sysvinit-2.86-off-by-one.patch, + -files/sysvinit-2.86-shutdown-single.patch, + -files/sysvinit-2.86-shutdown-usage.patch, + -files/sysvinit-2.86-utmp-64bit.patch, + -files/sysvinit-2.86-utmp-smp.patch, -files/change_console.8, + -files/change_console.c, -files/inittab: + removed old version 11 Apr 2010; Raúl Porcel sysvinit-2.87-r3.ebuild: s390 stable wrt #301473 diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest index 4d2b28921ab0..89823dddffd3 100644 --- a/sys-apps/sysvinit/Manifest +++ b/sys-apps/sysvinit/Manifest @@ -1,27 +1,8 @@ -AUX 2.86-gentoo.patch 641 RMD160 9e3f9ace9e58c3352f536649491a8a5b3f89e512 SHA1 d5bd112a171285768f5618e530cab5d22f7b6f55 SHA256 6edd083b1b09b75f76b75fc299e2ddab7344a0df8f212e3cd86f27c44caa8c01 -AUX 2.86-selinux-1.patch 2628 RMD160 e17994e12ea022c5f7d8a80345fb2d3265f7044d SHA1 0057c3fec271ab8e56210e1182c5c1b5b037836a SHA256 a70ba499bdc3598fc18d0911ff32757356db353ebdd5d9f6a69aaf1ed277254f -AUX 2.86-selinux.patch 6525 RMD160 b50310333e3c7da300daadddee6135471b0a07ee SHA1 72bf861751567f47b66154102b4bbbee2e18b414 SHA256 ccf4aecf38732569bc41feaa0dcb4abc21009f8d7a21a3bc402132f5ef7f88f8 -AUX change_console.8 657 RMD160 03a46941d92dd280d92252f83f58273353c0b7bb SHA1 243fa45d631a167314b49dfc8c5a14607e44999f SHA256 918dba79243a84a3c6dfd967e44c0d7375d49cfbe0452806a981c534b6022990 -AUX change_console.c 929 RMD160 168c97e47c6dae4f378b4ae13040156fad2a75db SHA1 5fb2a3ca5faaf15ee8c9f97a169771f15fd4500c SHA256 1e61b16274dee6f27ae69db13aff9230195feb6719f650dad027520503ea69b4 -AUX inittab 1645 RMD160 d0e2122734b8a9574519012a9a970aefd8cb2de1 SHA1 d6e3071cf30e30238c30f18179107df61e620829 SHA256 5471f187bbfc56ad2d5b4d9a49edb5c77e627f3290a591d49f783a10cdd48e66 -AUX inittab-2.86-r12 1893 RMD160 daea3482f3754c1311a24bf4e3864ba980596a6f SHA1 a6f9a4bfd0184c4a77ade518c81b169b3f21a53f SHA256 621ae4514773b72a535db4b7cd17d72c6a82564fae8e975d21b582e1e3279c9c AUX inittab-2.87 1890 RMD160 ee4dcba9b3c3541905950f1cd5deb74163aab784 SHA1 03af334e70d50511b2de5d25278d3f1673d2e8ee SHA256 fff7016910c9e2aa29e2c4ed76f371723196e3122a4f9f744274f4993ea1a733 AUX reboot.sh 304 RMD160 bbc92c46217361abfa9ca6842e206e818959886b SHA1 2515f89492a9d225abfdd9f99fb674a8dbb66629 SHA256 967fa572014ac6dd69f5e7e24d5250abad9c20c644563b927b295778608cafef AUX shutdown.sh 385 RMD160 5038d76195793b9996429f216fe9d4cd597b7725 SHA1 074471c08e01bfaa32bff4e6745795cf35794bef SHA256 2cc84a5194a949f16a82c6215459f4bf6d8156e50d8d9130d310f085bb208d4c -AUX sysvinit-2.86-POSIX-1003.1e.patch 1358 RMD160 a4e22a9c6c13373c0196aeb7c274e05bc0ea552f SHA1 878078b0b3c7a5090d19588085d91ba6bf749d8d SHA256 73729ddfae95826bf6f3e7f1bf0da53c8647d24126fb7a307020f5a5fa8bff04 -AUX sysvinit-2.86-build.patch 589 RMD160 4f0ec7d237d32d191709aba3517b907fa6910550 SHA1 8f624216b7c10d98fda62544d8c8a84a91366d7d SHA256 0fc2a6f370ec81d27bbd8dd2da556b78ab39e5b0655aa236e3d519e62a0a82c9 -AUX sysvinit-2.86-docs.patch 1899 RMD160 ecc45e46d708ed3c7613e42b465f1924f91efbb8 SHA1 2cba6285beaa4c8581fe7834e640e678fc35d498 SHA256 9f79cfe861bfa146dea2c2de4849d23c82f7835b5d38a09049e9f7c1226c8808 -AUX sysvinit-2.86-execl.patch 323 RMD160 bda0a5d6acbdf32ce826295a36dd00009fe62175 SHA1 c8873f49eaf6e4566817b5773c2b93c18383f2c7 SHA256 5821fa23b8e3e14af3ce9239bfb49eadc780e58c34ca120e1d32ee3a2a1cc30b -AUX sysvinit-2.86-off-by-one.patch 310 RMD160 20d7f98ed21f4cc1c3c40d51a06f9b1a46ae3243 SHA1 191e6d43328d5edd5c68deb22e5258545700fffd SHA256 bcd48e4e9daf7abc3a824bd20ca14a922a330b15ea9ff2767ee8d20baa9b81a4 -AUX sysvinit-2.86-shutdown-single.patch 1446 RMD160 261ad2aa89b3fb5fb94d20cb5b34e9b4f1a0fa14 SHA1 50ad6630baa2c12f0e6864e8205ea10287665ea2 SHA256 f85c80fd709502681d051118a3f04089afc7367614f6ea59e32aceda7257932a -AUX sysvinit-2.86-shutdown-usage.patch 235 RMD160 644bc21c6d24ff53b34a337ce483854fe1667846 SHA1 91da19a22fe9cf093876ccc00f2e54a5995178fd SHA256 aff08a0a7c8c2188f98f71b55360bb1166b71c257b94a6e9d1a21e794b3204c7 -AUX sysvinit-2.86-utmp-64bit.patch 1112 RMD160 9ba2959e6375bee10e00ba9be9cd22d5e0103007 SHA1 da51462ad1ba256e02c435261b60f767b81440e0 SHA256 2126f4c0e1512b133da8d629691b5dc52c730e188b5790cb4e3c681e3912e03e -AUX sysvinit-2.86-utmp-smp.patch 1546 RMD160 96907658206fb6594ad7cf379cb6d716df0f779f SHA1 4aab3e3afe85933ec8e2ecae1b9fc6e8018cb18a SHA256 4d1e59b1d039f56bf717999da681f02584a6f259cc9018f11f4eb58d0db66ac0 -DIST sysvinit-2.86-kexec.patch 4139 RMD160 5f8e9ccd3a39701cf47a1a541c78a4be971d46fc SHA1 5dc952d6b1585c926a67f11eeee835e56aeea5b0 SHA256 936245ef3060939bec3099efc006009336b3672422c1de41983b277ab5ddac47 -DIST sysvinit-2.86.tar.gz 99009 RMD160 46587ab51390b5c8cd3179a3690f86efdbe9b4b9 SHA1 3e78df609a2ff0fea6304cb662a7f10298d03667 SHA256 035f98fae17d9cff002993c564ccc83dc4ed136127172caeff872b6abdb679d8 DIST sysvinit-2.87-patches-2.tar.bz2 7129 RMD160 8b4cd971100b3cfdd81f27d836f1e45daac71fdf SHA1 cea5e3b5006165c15665457d33e6ea84e0ef7eb3 SHA256 724208540773ffa5d632285244bb61ea47fa347e6c0354c4faf31f407cfbe995 DIST sysvinit_2.87dsf.orig.tar.gz 106102 RMD160 69d4bc75ee55a23f650f7bfc7beb5b0433f4df35 SHA1 1939658db6fbb178ea20d4eb6300e668a6636ae3 SHA256 41b7c77942ec22916b36394d623de40c5cc5b058a6994af5ddeec08b284c4765 -EBUILD sysvinit-2.86-r10.ebuild 2988 RMD160 195322b20d7cc3a1e6013611339de5b8ab5d051b SHA1 70d73bf765c3343fe8801c2d32a7ec73674fde43 SHA256 1f59adbcace2e2562322bcdc624d9417dcf1302b4af31727a9e82f0f0a943246 EBUILD sysvinit-2.87-r3.ebuild 2729 RMD160 0a496b1915f2dd4d6bb952e2fc9f8727b1034945 SHA1 fe0eac47289dd45385fba3c5df60cef9167bebd7 SHA256 0d24f5177bc5bc4add0dd817070258e3c0af0f46312a3d7156718c3eca3c00eb -MISC ChangeLog 11473 RMD160 f21596b4bffd83a0561d6dad91cad0bbe347ea09 SHA1 81b9d4c0fcf4e9191be5e20231b96b1812088c5d SHA256 9dd7cff76096541409d659c644abab3c62151e6e0a9621aa97b4a04133ccd3cf +MISC ChangeLog 12113 RMD160 1cb3494e5b78f6b9beb0977be49b5571aae5f392 SHA1 3b91d649e18c09486419d3f071babd8f09cf0391 SHA256 aca1b77af3dfc3e114b0b6ece3f504526c19fa95899568f33e9dabcf69d7c389 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 diff --git a/sys-apps/sysvinit/files/2.86-gentoo.patch b/sys-apps/sysvinit/files/2.86-gentoo.patch deleted file mode 100644 index c3322a8e2e00..000000000000 --- a/sys-apps/sysvinit/files/2.86-gentoo.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- src/Makefile.orig 2004-12-21 22:08:42.607088800 -0500 -+++ src/Makefile 2004-12-21 22:12:56.409504968 -0500 -@@ -10,5 +10,3 @@ - --CC = gcc --CFLAGS = -Wall -O2 -fomit-frame-pointer -D_GNU_SOURCE --LDFLAGS = -s -+CFLAGS += -Wall -D_GNU_SOURCE - STATIC = -@@ -33,2 +31,9 @@ - -+ifeq ($(DISTRO),Gentoo) -+SBIN += sulogin bootlogd -+USRBIN += utmpdump wall -+MAN1 += wall.1 -+MAN8 += sulogin.8 bootlogd.8 -+endif -+ - ifeq ($(DISTRO),Debian) -@@ -112,2 +117,5 @@ - install: -+ $(INSTALL) -d $(ROOT)/bin $(ROOT)/sbin $(ROOT)/usr/bin \ -+ $(ROOT)/usr/include $(ROOT)/$(MANDIR)/man1 $(ROOT)/$(MANDIR)/man5 \ -+ $(ROOT)/$(MANDIR)/man8 - for i in $(BIN); do \ diff --git a/sys-apps/sysvinit/files/2.86-selinux-1.patch b/sys-apps/sysvinit/files/2.86-selinux-1.patch deleted file mode 100644 index c1b5115bfc6c..000000000000 --- a/sys-apps/sysvinit/files/2.86-selinux-1.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- sysvinit-2.85/src/init.c.selinux 2005-10-14 14:16:24.000000000 -0400 -+++ sysvinit-2.85/src/init.c 2005-10-14 14:16:24.000000000 -0400 -@@ -48,6 +48,8 @@ - #include - #include - #include -+#include -+ - - #ifdef __i386__ - # if (__GLIBC__ >= 2) -@@ -2513,6 +2515,7 @@ - char *p; - int f; - int isinit; -+ int enforce = 0; - - /* Get my own name */ - if ((p = strrchr(argv[0], '/')) != NULL) -@@ -2576,6 +2579,20 @@ - maxproclen += strlen(argv[f]) + 1; - } - -+ if (getenv("SELINUX_INIT") == NULL) { -+ putenv("SELINUX_INIT=YES"); -+ if (selinux_init_load_policy(&enforce) == 0 ) { -+ execv(myname, argv); -+ } else { -+ if (enforce > 0) { -+ /* SELinux in enforcing mode but load_policy failed */ -+ /* At this point, we probably can't open /dev/console, so log() won't work */ -+ initlog(L_VB,"Unable to load SELinux Policy. Machine is in enforcing mode. Halting now."); -+ exit(1); -+ } -+ } -+ } -+ - /* Start booting. */ - argv0 = argv[0]; - argv[1] = NULL; ---- sysvinit-2.85/src/Makefile.selinux 2005-10-14 14:16:24.000000000 -0400 -+++ sysvinit-2.85/src/Makefile 2005-10-14 14:16:24.000000000 -0400 -@@ -32,7 +32,7 @@ - all: $(BIN) $(SBIN) $(USRBIN) - - init: init.o init_utmp.o -- $(CC) $(LDFLAGS) $(STATIC) -o $@ init.o init_utmp.o -+ $(CC) $(LDFLAGS) $(STATIC) -o $@ init.o init_utmp.o -lsepol -lselinux - - halt: halt.o ifdown.o hddown.o utmp.o reboot.h - $(CC) $(LDFLAGS) -o $@ halt.o ifdown.o hddown.o utmp.o -@@ -50,7 +50,7 @@ - $(CC) $(LDFLAGS) -o $@ runlevel.o - - sulogin: sulogin.o -- $(CC) $(LDFLAGS) $(STATIC) -o $@ sulogin.o $(LCRYPT) -+ $(CC) $(LDFLAGS) $(STATIC) -o $@ sulogin.o $(LCRYPT) -lselinux - - wall: dowall.o wall.o - $(CC) $(LDFLAGS) -o $@ dowall.o wall.o ---- sysvinit-2.85/src/sulogin.c.selinux 2005-10-14 14:16:24.000000000 -0400 -+++ sysvinit-2.85/src/sulogin.c 2005-10-14 14:18:42.000000000 -0400 -@@ -28,6 +28,8 @@ - # include - #endif - -+#include -+#include - - #define CHECK_DES 1 - #define CHECK_MD5 1 -@@ -332,6 +335,19 @@ - signal(SIGINT, SIG_DFL); - signal(SIGTSTP, SIG_DFL); - signal(SIGQUIT, SIG_DFL); -+ if (is_selinux_enabled > 0) { -+ security_context_t scon=NULL; -+ char *seuser=NULL; -+ char *level=NULL; -+ if (getseuserbyname("root", &seuser, &level) == 0) -+ if (get_default_context_with_level(seuser, level, 0, &scon) > 0) { -+ if (setexeccon(scon) != 0) -+ fprintf(stderr, "setexeccon failed\n"); -+ freecon(scon); -+ } -+ free(seuser); -+ free(level); -+ } - execl(sushell, shell, NULL); - perror(sushell); - diff --git a/sys-apps/sysvinit/files/2.86-selinux.patch b/sys-apps/sysvinit/files/2.86-selinux.patch deleted file mode 100644 index 3110bc52befb..000000000000 --- a/sys-apps/sysvinit/files/2.86-selinux.patch +++ /dev/null @@ -1,239 +0,0 @@ -diff -urN sysvinit-2.86.orig/src/Makefile sysvinit-2.86/src/Makefile ---- sysvinit-2.86.orig/src/Makefile 2004-06-09 08:47:45.000000000 -0400 -+++ sysvinit-2.86/src/Makefile 2005-01-03 20:25:59.922659928 -0500 -@@ -12,6 +12,8 @@ - CFLAGS = -Wall -O2 -fomit-frame-pointer -D_GNU_SOURCE - LDFLAGS = -s - STATIC = -+CFLAGS += -DWITH_SELINUX -+LDFLAGS += -lselinux -lsepol - - # For some known distributions we do not build all programs, otherwise we do. - BIN = -diff -urN sysvinit-2.86.orig/src/init.c sysvinit-2.86/src/init.c ---- sysvinit-2.86.orig/src/init.c 2004-07-30 08:16:20.000000000 -0400 -+++ sysvinit-2.86/src/init.c 2005-01-03 20:46:39.485217776 -0500 -@@ -42,6 +42,11 @@ - #include - #include - #include -+#include -+#include -+#include -+#include -+ - - #ifdef __i386__ - # if (__GLIBC__ >= 2) -@@ -104,6 +109,7 @@ - int dfl_level = 0; /* Default runlevel */ - sig_atomic_t got_cont = 0; /* Set if we received the SIGCONT signal */ - sig_atomic_t got_signals; /* Set if we received a signal. */ -+int enforcing = -1; /* SELinux enforcing mode */ - int emerg_shell = 0; /* Start emergency shell? */ - int wrote_wtmp_reboot = 1; /* Set when we wrote the reboot record */ - int wrote_utmp_reboot = 1; /* Set when we wrote the reboot record */ -@@ -192,6 +198,142 @@ - char *extra_env[NR_EXTRA_ENV]; - - -+/* Mount point for selinuxfs. */ -+#define SELINUXMNT "/selinux/" -+ -+static int load_policy(int *enforce) -+{ -+ int fd=-1,ret=-1; -+ int rc=0, orig_enforce; -+ struct stat sb; -+ void *map; -+ char policy_file[PATH_MAX]; -+ int policy_version=0; -+ FILE *cfg; -+ char buf[4096]; -+ int seconfig = -2; -+ -+ selinux_getenforcemode(&seconfig); -+ -+ mount("none", "/proc", "proc", 0, 0); -+ cfg = fopen("/proc/cmdline","r"); -+ if (cfg) { -+ char *tmp; -+ if (fgets(buf,4096,cfg) && (tmp = strstr(buf,"enforcing="))) { -+ if (tmp == buf || isspace(*(tmp-1))) { -+ enforcing=atoi(tmp+10); -+ } -+ } -+ fclose(cfg); -+ } -+#define MNT_DETACH 2 -+ umount2("/proc",MNT_DETACH); -+ -+ if (enforcing >=0) -+ *enforce = enforcing; -+ else if (seconfig == 1) -+ *enforce = 1; -+ -+ if (mount("none", SELINUXMNT, "selinuxfs", 0, 0) < 0) { -+ if (errno == ENODEV) { -+ initlog(L_VB, "SELinux not supported by kernel: %s\n",SELINUXMNT,strerror(errno)); -+ *enforce = 0; -+ } else { -+ initlog(L_VB, "Failed to mount %s: %s\n",SELINUXMNT,strerror(errno)); -+ } -+ return ret; -+ } -+ -+ set_selinuxmnt(SELINUXMNT); /* set manually since we mounted it */ -+ -+ policy_version=security_policyvers(); -+ if (policy_version < 0) { -+ initlog(L_VB, "Can't get policy version: %s\n", strerror(errno)); -+ goto UMOUNT; -+ } -+ -+ orig_enforce = rc = security_getenforce(); -+ if (rc < 0) { -+ initlog(L_VB, "Can't get SELinux enforcement flag: %s\n", strerror(errno)); -+ goto UMOUNT; -+ } -+ if (enforcing >= 0) { -+ *enforce = enforcing; -+ } else if (seconfig == -1) { -+ *enforce = 0; -+ rc = security_disable(); -+ if (rc == 0) umount(SELINUXMNT); -+ if (rc < 0) { -+ rc = security_setenforce(0); -+ if (rc < 0) { -+ initlog(L_VB, "Can't disable SELinux: %s\n", strerror(errno)); -+ goto UMOUNT; -+ } -+ } -+ ret = 0; -+ goto UMOUNT; -+ } else if (seconfig >= 0) { -+ *enforce = seconfig; -+ if (orig_enforce != *enforce) { -+ rc = security_setenforce(seconfig); -+ if (rc < 0) { -+ initlog(L_VB, "Can't set SELinux enforcement flag: %s\n", strerror(errno)); -+ goto UMOUNT; -+ } -+ } -+ } -+ -+ snprintf(policy_file,sizeof(policy_file),"%s.%d",selinux_binary_policy_path(),policy_version); -+ fd = open(policy_file, O_RDONLY); -+ if (fd < 0) { -+ /* Check previous version to see if old policy is available -+ */ -+ snprintf(policy_file,sizeof(policy_file),"%s.%d",selinux_binary_policy_path(),policy_version-1); -+ fd = open(policy_file, O_RDONLY); -+ if (fd < 0) { -+ initlog(L_VB, "Can't open '%s.%d': %s\n", -+ selinux_binary_policy_path(),policy_version,strerror(errno)); -+ goto UMOUNT; -+ } -+ } -+ -+ if (fstat(fd, &sb) < 0) { -+ initlog(L_VB, "Can't stat '%s': %s\n", -+ policy_file, strerror(errno)); -+ goto UMOUNT; -+ } -+ -+ map = mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); -+ if (map == MAP_FAILED) { -+ initlog(L_VB, "Can't map '%s': %s\n", -+ policy_file, strerror(errno)); -+ goto UMOUNT; -+ } -+ -+ -+ /* Set booleans based on a booleans configuration file. */ -+ ret = sepol_genbools(map, sb.st_size, selinux_booleans_path()); -+ if (ret < 0) { -+ if (errno != ENOENT && errno != EINVAL) { -+ initlog(L_VB,"Error while setting booleans: %s\n", -+ strerror(errno)); -+ goto UMOUNT; -+ } -+ } -+ initlog(L_VB, "Loading security policy\n"); -+ ret=security_load_policy(map, sb.st_size); -+ if (ret < 0) { -+ initlog(L_VB, "security_load_policy failed\n"); -+ } -+ -+UMOUNT: -+ /*umount(SELINUXMNT); */ -+ if ( fd >= 0) { -+ close(fd); -+ } -+ return(ret); -+} -+ - /* - * Sleep a number of seconds. - * -@@ -2599,6 +2741,7 @@ - char *p; - int f; - int isinit; -+ int enforce = 0; - - /* Get my own name */ - if ((p = strrchr(argv[0], '/')) != NULL) -@@ -2662,6 +2805,20 @@ - maxproclen += strlen(argv[f]) + 1; - } - -+ if (getenv("SELINUX_INIT") == NULL) { -+ putenv("SELINUX_INIT=YES"); -+ if (load_policy(&enforce) == 0 ) { -+ execv(myname, argv); -+ } else { -+ if (enforce > 0) { -+ /* SELinux in enforcing mode but load_policy failed */ -+ /* At this point, we probably can't open /dev/console, so log() won't work */ -+ fprintf(stderr,"Enforcing mode requested but no policy loaded. Halting now.\n"); -+ exit(1); -+ } -+ } -+ } -+ - /* Start booting. */ - argv0 = argv[0]; - argv[1] = NULL; -diff -urN sysvinit-2.86.orig/src/sulogin.c sysvinit-2.86/src/sulogin.c ---- sysvinit-2.86.orig/src/sulogin.c 2004-07-30 07:40:28.000000000 -0400 -+++ sysvinit-2.86/src/sulogin.c 2005-01-03 20:30:48.746751992 -0500 -@@ -27,7 +27,10 @@ - #if defined(__GLIBC__) - # include - #endif -- -+#ifdef WITH_SELINUX -+#include -+#include -+#endif - #define CHECK_DES 1 - #define CHECK_MD5 1 - -@@ -335,6 +338,16 @@ - signal(SIGINT, SIG_DFL); - signal(SIGTSTP, SIG_DFL); - signal(SIGQUIT, SIG_DFL); -+#ifdef WITH_SELINUX -+ if (is_selinux_enabled > 0) { -+ security_context_t* contextlist=NULL; -+ if (get_ordered_context_list("root", 0, &contextlist) > 0) { -+ if (setexeccon(contextlist[0]) != 0) -+ fprintf(stderr, "setexeccon faile\n"); -+ freeconary(contextlist); -+ } -+ } -+#endif - execl(sushell, shell, NULL); - perror(sushell); - diff --git a/sys-apps/sysvinit/files/change_console.8 b/sys-apps/sysvinit/files/change_console.8 deleted file mode 100644 index c1ea01c9b332..000000000000 --- a/sys-apps/sysvinit/files/change_console.8 +++ /dev/null @@ -1,33 +0,0 @@ -.TH CHANGE_CONSOLE 8 "23 September 2003" "" "Linux User's Manual" - -.SH NAME -change_console -- change console used by init - -.SH SYNOPSIS -.B change_console -.RB [ \-f ] -.RB [ \-r ] -.RB [device] - -.SH DESCRIPTION -.B change_console -changes the console used by -.IR init (8) -to spawn commands. -.SH OPTIONS -.IP \fB\-f\fn -Remain in the foreground after sending the command to init -.PP -.IP \fB\-r\fn -Reset the console file used by init to its compiled-in default -(usually /dev/console). - -.IP \fBdevice\fn -The device file to use as the console. If none is specified, -the result of running ttyname on stdin is used. - -.SH SEE ALSO -.IR init (8) - -.SH AUTHOR -Red Hat, Inc. diff --git a/sys-apps/sysvinit/files/change_console.c b/sys-apps/sysvinit/files/change_console.c deleted file mode 100644 index 4f4fbe31767c..000000000000 --- a/sys-apps/sysvinit/files/change_console.c +++ /dev/null @@ -1,49 +0,0 @@ -#include "initreq.h" -#include -#include -#include -#include -#include -#include -#include - -void signal_handler(int sig) { - exit(0); -} - -int main(int argc, char **argv) { - int foreground = 0, reset = 0, fd, x = 1; - char *device = NULL; - struct init_request req; - - while (x < argc) { - if (!strcmp(argv[x], "-f")) { - foreground = 1; - } else if (!strcmp(argv[x], "-r")) { - reset = 1; - } else { - device = argv[x]; - } - x++; - } - if (!device) - device = ttyname(0); - - memset(&req, 0, sizeof(req)); - req.magic = INIT_MAGIC; - req.cmd = INIT_CMD_CHANGECONS; - if (!reset) - snprintf(req.i.bsd.reserved, 127, device); - else - req.i.bsd.reserved[0] = '\0'; - signal(SIGALRM, signal_handler); - alarm(3); - if ((fd = open(INIT_FIFO, O_WRONLY)) >= 0) { - write(fd, &req, sizeof(req)) == sizeof(req); - close(fd); - } - alarm(0); - if (foreground) - pause(); - return 0; -} diff --git a/sys-apps/sysvinit/files/inittab b/sys-apps/sysvinit/files/inittab deleted file mode 100644 index b06abfc9ee97..000000000000 --- a/sys-apps/sysvinit/files/inittab +++ /dev/null @@ -1,51 +0,0 @@ -# -# /etc/inittab: This file describes how the INIT process should set up -# the system in a certain run-level. -# -# Author: Miquel van Smoorenburg, -# Modified by: Patrick J. Volkerding, -# Modified by: Daniel Robbins, -# Modified by: Martin Schlemmer, -# -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/files/inittab,v 1.5 2005/12/22 02:03:23 vapier Exp $ - -# Default runlevel. -id:3:initdefault: - -# System initialization, mount local filesystems, etc. -si::sysinit:/sbin/rc sysinit - -# Further system initialization, brings up the boot runlevel. -rc::bootwait:/sbin/rc boot - -l0:0:wait:/sbin/rc shutdown -l1:S1:wait:/sbin/rc single -l2:2:wait:/sbin/rc nonetwork -l3:3:wait:/sbin/rc default -l4:4:wait:/sbin/rc default -l5:5:wait:/sbin/rc default -l6:6:wait:/sbin/rc reboot -#z6:6:respawn:/sbin/sulogin - -# TERMINALS -c1:12345:respawn:/sbin/agetty 38400 tty1 linux -c2:2345:respawn:/sbin/agetty 38400 tty2 linux -c3:2345:respawn:/sbin/agetty 38400 tty3 linux -c4:2345:respawn:/sbin/agetty 38400 tty4 linux -c5:2345:respawn:/sbin/agetty 38400 tty5 linux -c6:2345:respawn:/sbin/agetty 38400 tty6 linux - -# SERIAL CONSOLES -#s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100 -#s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100 - -# What to do at the "Three Finger Salute". -ca:12345:ctrlaltdel:/sbin/shutdown -r now - -# Used by /etc/init.d/xdm to control DM startup. -# Read the comments in /etc/init.d/xdm for more -# info. Do NOT remove, as this will start nothing -# extra at boot if /etc/init.d/xdm is not added -# to the "default" runlevel. -x:a:once:/etc/X11/startDM.sh - diff --git a/sys-apps/sysvinit/files/inittab-2.86-r12 b/sys-apps/sysvinit/files/inittab-2.86-r12 deleted file mode 100644 index f8a0eb3fa300..000000000000 --- a/sys-apps/sysvinit/files/inittab-2.86-r12 +++ /dev/null @@ -1,59 +0,0 @@ -# -# /etc/inittab: This file describes how the INIT process should set up -# the system in a certain run-level. -# -# Author: Miquel van Smoorenburg, -# Modified by: Patrick J. Volkerding, -# Modified by: Daniel Robbins, -# Modified by: Martin Schlemmer, -# Modified by: Mike Frysinger, -# Modified by: Robin H. Johnson, -# -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/files/inittab-2.86-r12,v 1.3 2009/11/11 21:51:28 vapier Exp $ - -# Default runlevel. -id:3:initdefault: - -# System initialization, mount local filesystems, etc. -si::sysinit:/sbin/rc sysinit - -# Further system initialization, brings up the boot runlevel. -rc::bootwait:/sbin/rc boot - -l0:0:wait:/sbin/rc shutdown -l0s:0:wait:/sbin/halt -dhip -l1:1:wait:/sbin/rc single -l2:2:wait:/sbin/rc nonetwork -l3:3:wait:/sbin/rc default -l4:4:wait:/sbin/rc default -l5:5:wait:/sbin/rc default -l6:6:wait:/sbin/rc reboot -l6r:6:wait:/sbin/reboot -dk -#z6:6:respawn:/sbin/sulogin - -# new-style single-user -su0:S:wait:/sbin/rc single -su1:S:wait:/sbin/sulogin - -# TERMINALS -c1:12345:respawn:/sbin/agetty 38400 tty1 linux -c2:2345:respawn:/sbin/agetty 38400 tty2 linux -c3:2345:respawn:/sbin/agetty 38400 tty3 linux -c4:2345:respawn:/sbin/agetty 38400 tty4 linux -c5:2345:respawn:/sbin/agetty 38400 tty5 linux -c6:2345:respawn:/sbin/agetty 38400 tty6 linux - -# SERIAL CONSOLES -#s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100 -#s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100 - -# What to do at the "Three Finger Salute". -ca:12345:ctrlaltdel:/sbin/shutdown -r now - -# Used by /etc/init.d/xdm to control DM startup. -# Read the comments in /etc/init.d/xdm for more -# info. Do NOT remove, as this will start nothing -# extra at boot if /etc/init.d/xdm is not added -# to the "default" runlevel. -x:a:once:/etc/X11/startDM.sh - diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-POSIX-1003.1e.patch b/sys-apps/sysvinit/files/sysvinit-2.86-POSIX-1003.1e.patch deleted file mode 100644 index b5668cf9b44c..000000000000 --- a/sys-apps/sysvinit/files/sysvinit-2.86-POSIX-1003.1e.patch +++ /dev/null @@ -1,67 +0,0 @@ -add support for POSIX capabilites - -http://original.killa.net/infosec/caps/ -http://bugs.gentoo.org/5818 - ---- sysvinit/src/init.c -+++ sysvinit/src/init.c -@@ -21,6 +21,15 @@ - */ - - #include -+ -+#ifdef __linux__ -+#include -+#include -+#include -+#define capget(header, data) syscall(__NR_capget, header, data) -+#define capset(header, data) syscall(__NR_capset, header, data) -+#endif -+ - #include - #include - #include -@@ -2348,6 +2357,11 @@ int init_main() - pid_t rc; - int f, st; - -+#ifdef __linux__ -+ cap_user_header_t head; -+ cap_user_data_t data; -+#endif -+ - if (!reload) { - - #if INITDEBUG -@@ -2438,6 +2452,31 @@ int init_main() - SETSIG(sa, SIGCHLD, chld_handler, SA_RESTART); - } - -+#ifdef __linux__ -+ /* -+ * This seems like the right place to do this, just before -+ * we read /etc/inittab... -+ */ -+ -+ head = malloc(sizeof(head)); -+ if ((data = malloc(sizeof(data))) == NULL) -+ free(head); -+ -+ if (head && data) { -+ head->pid = 0; -+ head->version = _LINUX_CAPABILITY_VERSION; -+ -+ if (capget(head, data) == 0) { -+ /* Max out the inheritable capability set. */ -+ data->inheritable = data->effective; -+ capset(head, data); -+ } -+ -+ free(head); -+ free(data); -+ } -+#endif -+ - /* - * Start normal boot procedure. - */ diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-build.patch b/sys-apps/sysvinit/files/sysvinit-2.86-build.patch deleted file mode 100644 index 0f3e1f0b5e45..000000000000 --- a/sys-apps/sysvinit/files/sysvinit-2.86-build.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- sysvinit/src/Makefile -+++ sysvinit/src/Makefile -@@ -10,5 +10,3 @@ - --CC = gcc --CFLAGS = -Wall -O2 -fomit-frame-pointer -D_GNU_SOURCE --LDFLAGS = -s -+CFLAGS += -Wall -D_GNU_SOURCE - STATIC = -@@ -48,9 +48,7 @@ - MANDIR = /usr/share/man - - # Additional libs for GNU libc. --ifneq ($(wildcard /usr/lib/libcrypt.a),) - LCRYPT = -lcrypt --endif - - all: $(BIN) $(SBIN) $(USRBIN) - -@@ -112,2 +117,5 @@ - install: -+ $(INSTALL) -d $(ROOT)/bin $(ROOT)/sbin $(ROOT)/usr/bin \ -+ $(ROOT)/usr/include $(ROOT)/$(MANDIR)/man1 $(ROOT)/$(MANDIR)/man5 \ -+ $(ROOT)/$(MANDIR)/man8 - for i in $(BIN); do \ diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-docs.patch b/sys-apps/sysvinit/files/sysvinit-2.86-docs.patch deleted file mode 100644 index 1ee20d9c7a9d..000000000000 --- a/sys-apps/sysvinit/files/sysvinit-2.86-docs.patch +++ /dev/null @@ -1,73 +0,0 @@ -Sync both the content and style of `shutdown -h` and `man shutdown`. - -http://bugs.gentoo.org/91724 - ---- man/shutdown.8 -+++ man/shutdown.8 -@@ -11,7 +11,7 @@ - .B /sbin/shutdown -+.RB [ \-akrhPHfFnc ] - .RB [ \-t - .IR sec ] --.RB [ \-arkhncfFHP ] - .I time --.RI [ warning-message ] -+.RI [ "warning message" ] - .\"}}} -@@ -41,7 +41,2 @@ - .\"}}} --.\"{{{ -t sec --.IP "\fB\-t\fP \fIsec\fP" --Tell \fBinit\fP(8) to wait \fIsec\fP seconds between sending processes the --warning and the kill signal, before changing to another runlevel. --.\"}}} - .\"{{{ -k -@@ -58,7 +53,2 @@ - .\"}}} --.\"{{{ -H --.IP \fB\-H\fP --Halt action is to halt or drop into boot monitor on systems that --support it. --.\"}}} - .\"{{{ -P -@@ -67,7 +57,6 @@ - .\"}}} --.\"{{{ -n --.IP \fB\-n\fP --[DEPRECATED] Don't call \fBinit\fP(8) to do the shutdown but do it ourself. --The use of this option is discouraged, and its results are not always what --you'd expect. -+.\"{{{ -H -+.IP \fB\-H\fP -+Halt action is to halt or drop into boot monitor on systems that -+support it. - .\"}}} -@@ -81,2 +70,8 @@ - .\"}}} -+.\"{{{ -n -+.IP \fB\-n\fP -+[DEPRECATED] Don't call \fBinit\fP(8) to do the shutdown but do it ourself. -+The use of this option is discouraged, and its results are not always what -+you'd expect. -+.\"}}} - .\"{{{ -c -@@ -87,2 +82,7 @@ - .\"}}} -+.\"{{{ -t sec -+.IP "\fB\-t\fP \fIsec\fP" -+Tell \fBinit\fP(8) to wait \fIsec\fP seconds between sending processes the -+warning and the kill signal, before changing to another runlevel. -+.\"}}} - .\"{{{ time -@@ -92,3 +92,3 @@ - .\"{{{ warning-message --.IP \fIwarning-message\fP -+.IP "\fIwarning message\fP" - Message to send to all users. ---- src/shutdown.c -+++ src/shutdown.c -@@ -104,3 +104,3 @@ - fprintf(stderr, -- "Usage:\t shutdown [-akrhHPfnc] [-t secs] time [warning message]\n" -+ "Usage:\t shutdown [-akrhPHfFnc] [-t sec] time [warning message]\n" - "\t\t -a: use /etc/shutdown.allow\n" diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-execl.patch b/sys-apps/sysvinit/files/sysvinit-2.86-execl.patch deleted file mode 100644 index 051472519be0..000000000000 --- a/sys-apps/sysvinit/files/sysvinit-2.86-execl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- sysvinit/src/init.c -+++ sysvinit/src/init.c -@@ -1893,7 +1893,7 @@ void re_exec(void) - * The existing init process execs a new init binary. - */ - env = init_buildenv(0); -- execl(myname, myname, "--init", NULL, env); -+ execle(myname, myname, "--init", NULL, env); - - /* - * We shouldn't be here, something failed. diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-off-by-one.patch b/sys-apps/sysvinit/files/sysvinit-2.86-off-by-one.patch deleted file mode 100644 index 8447e280cbf4..000000000000 --- a/sys-apps/sysvinit/files/sysvinit-2.86-off-by-one.patch +++ /dev/null @@ -1,16 +0,0 @@ -Fix bug where proc names are truncated - -http://bugzilla.openvz.org/60 -http://bugs.gentoo.org/110420 - ---- src/init.c -+++ src/init.c -@@ -466,7 +466,7 @@ - - if (maxproclen > 2) { - memset(argv0, 0, maxproclen); -- strncpy(argv0, buf, maxproclen - 2); -+ strncpy(argv0, buf, maxproclen - 1); - } - - return len; diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch b/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch deleted file mode 100644 index 07f434ef4167..000000000000 --- a/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-single.patch +++ /dev/null @@ -1,38 +0,0 @@ -This patch makes shutdown use the Single User runlevel by default so -the gettys are shutdown too. - -Roy Marples - -diff -ur sysvinit-2.86.orig/man/shutdown.8 sysvinit-2.86/man/shutdown.8 ---- sysvinit-2.86.orig/man/shutdown.8 2006-12-21 10:16:37.000000000 +0000 -+++ sysvinit-2.86/man/shutdown.8 2006-12-21 10:19:51.000000000 +0000 -@@ -27,7 +27,7 @@ - \fBshutdown\fP does its job by signalling the \fBinit\fP process, - asking it to change the runlevel. - Runlevel \fB0\fP is used to halt the system, runlevel \fB6\fP is used --to reboot the system, and runlevel \fB1\fP is used to put to system into -+to reboot the system, and runlevel \fBS\fP is used to put to system into - a state where administrative tasks can be performed; this is the default - if neither the \fI-h\fP or \fI-r\fP flag is given to \fBshutdown\fP. - To see which actions are taken on halt or reboot see the appropriate -diff -ur sysvinit-2.86.orig/src/shutdown.c sysvinit-2.86/src/shutdown.c ---- sysvinit-2.86.orig/src/shutdown.c 2006-12-21 10:16:37.000000000 +0000 -+++ sysvinit-2.86/src/shutdown.c 2006-12-21 10:21:03.000000000 +0000 -@@ -463,7 +463,7 @@ - usage(); - exit(1); - } -- strcpy(down_level, "1"); -+ strcpy(down_level, "S"); - halttype = NULL; - - /* Process the options. */ -@@ -636,6 +636,8 @@ - strcpy(newstate, "for reboot"); - break; - case '1': -+ case 'S': -+ case 's': - strcpy(newstate, "to maintenance mode"); - break; - default: diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-usage.patch b/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-usage.patch deleted file mode 100644 index e69abc205fd8..000000000000 --- a/sys-apps/sysvinit/files/sysvinit-2.86-shutdown-usage.patch +++ /dev/null @@ -1,10 +0,0 @@ -Allow non-root users to at least see the help output. - -http://bugs.gentoo.org/91724 - ---- src/shutdown.c -+++ src/shutdown.c -@@ -462,2 +462,3 @@ - fprintf(stderr, "shutdown: you must be root to do that!\n"); -+ usage(); - exit(1); diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-utmp-64bit.patch b/sys-apps/sysvinit/files/sysvinit-2.86-utmp-64bit.patch deleted file mode 100644 index 26d1161b7936..000000000000 --- a/sys-apps/sysvinit/files/sysvinit-2.86-utmp-64bit.patch +++ /dev/null @@ -1,43 +0,0 @@ -On 64bit arches which have 32bit multilib support, the utmp struct is -the same ... thus we cannot assume that utmp.ut_tv is of type time_t - ---- sysvinit/src/utmp.c -+++ sysvinit/src/utmp.c -@@ -47,6 +47,7 @@ void write_wtmp - int fd; - struct utmp utmp; - struct utsname uname_buf; -+ struct timeval tv; - - /* - * Try to open the wtmp file. Note that we even try -@@ -76,7 +77,9 @@ void write_wtmp - */ - memset(&utmp, 0, sizeof(utmp)); - #if defined(__GLIBC__) -- gettimeofday(&utmp.ut_tv, NULL); -+ gettimeofday(&tv, NULL); -+ utmp.ut_tv.tv_sec = tv.tv_sec; -+ utmp.ut_tv.tv_usec = tv.tv_usec; - #else - time(&utmp.ut_time); - #endif -@@ -113,6 +116,7 @@ static void write_utmp - struct utmp utmp; - struct utmp tmp; - struct utmp *utmptr; -+ struct timeval tv; - - /* - * Can't do much if UTMP_FILE is not present. -@@ -144,7 +148,9 @@ static void write_utmp - utmp.ut_pid = pid; - strncpy(utmp.ut_id, id, sizeof(utmp.ut_id)); - #if defined(__GLIBC__) -- gettimeofday(&utmp.ut_tv, NULL); -+ gettimeofday(&tv, NULL); -+ utmp.ut_tv.tv_sec = tv.tv_sec; -+ utmp.ut_tv.tv_usec = tv.tv_usec; - #else - time(&utmp.ut_time); - #endif diff --git a/sys-apps/sysvinit/files/sysvinit-2.86-utmp-smp.patch b/sys-apps/sysvinit/files/sysvinit-2.86-utmp-smp.patch deleted file mode 100644 index eb04da9a7b14..000000000000 --- a/sys-apps/sysvinit/files/sysvinit-2.86-utmp-smp.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- src/init.c.ORIG 2004-07-30 07:16:20.000000000 -0500 -+++ src/init.c 2007-06-15 14:07:39.774320481 -0500 -@@ -949,6 +949,25 @@ - sigprocmask(SIG_SETMASK, &omask, NULL); - - /* -+ * Update utmp/wtmp file prior to starting -+ * any child. This MUST be done right here in -+ * the child process in order to prevent a race -+ * condition that occurs when the child -+ * process' time slice executes before the -+ * parent (can and does happen in a uniprocessor -+ * environment). If the child is a getty and -+ * the race condition happens, then init's utmp -+ * update will happen AFTER the getty runs -+ * and expects utmp to be updated already! -+ * -+ * Do NOT log if process field starts with '+' -+ * FIXME: that's for compatibility with *very* -+ * old getties - probably it can be taken out. -+ */ -+ if (ch->action == RESPAWN && ch->process[0] != '+') -+ write_utmp_wtmp("", ch->id, getpid(), INIT_PROCESS, ""); -+ -+ /* - * In sysinit, boot, bootwait or single user mode: - * for any wait-type subprocess we _force_ the console - * to be its controlling tty. -@@ -1088,15 +1107,7 @@ - case ONDEMAND: - case RESPAWN: - ch->flags |= RUNNING; -- if (spawn(ch, &(ch->pid)) < 0) break; -- /* -- * Do NOT log if process field starts with '+' -- * FIXME: that's for compatibility with *very* -- * old getties - probably it can be taken out. -- */ -- if (ch->process[0] != '+') -- write_utmp_wtmp("", ch->id, ch->pid, -- INIT_PROCESS, ""); -+ (void)spawn(ch, &(ch->pid)); - break; - } - } diff --git a/sys-apps/sysvinit/sysvinit-2.86-r10.ebuild b/sys-apps/sysvinit/sysvinit-2.86-r10.ebuild deleted file mode 100644 index 3361f660c428..000000000000 --- a/sys-apps/sysvinit/sysvinit-2.86-r10.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/sysvinit-2.86-r10.ebuild,v 1.8 2008/01/10 09:01:21 vapier Exp $ - -inherit eutils toolchain-funcs flag-o-matic - -DESCRIPTION="/sbin/init - parent of all processes" -HOMEPAGE="http://freshmeat.net/projects/sysvinit/" -SRC_URI="ftp://ftp.cistron.nl/pub/people/miquels/software/${P}.tar.gz - ftp://sunsite.unc.edu/pub/Linux/system/daemons/init/${P}.tar.gz - http://www.gc-linux.org/down/isobel/kexec/sysvinit/sysvinit-2.86-kexec.patch" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" -IUSE="selinux ibm static kernel_FreeBSD" - -RDEPEND="selinux? ( >=sys-libs/libselinux-1.28 )" -DEPEND="${RDEPEND} - virtual/os-headers" - -src_unpack() { - unpack ${P}.tar.gz - cd "${S}" - cp "${FILESDIR}"/change_console.{c,8} src/ || die - epatch "${FILESDIR}"/${P}-docs.patch - epatch "${FILESDIR}"/${P}-shutdown-usage.patch - epatch "${FILESDIR}"/${P}-off-by-one.patch - epatch "${DISTDIR}"/${P}-kexec.patch - epatch "${FILESDIR}"/${P}-execl.patch - epatch "${FILESDIR}"/${P}-utmp-64bit.patch - epatch "${FILESDIR}"/${P}-shutdown-single.patch - epatch "${FILESDIR}"/${P}-utmp-smp.patch - epatch "${FILESDIR}"/${P}-build.patch - use selinux && epatch "${FILESDIR}"/${PV}-selinux-1.patch - - # Mung inittab for specific architectures - cd "${WORKDIR}" - cp "${FILESDIR}"/inittab . || die "cp inittab" - local insert="" - use ppc && insert='#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' - use arm && insert='#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' - use hppa && insert='b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' - use s390 && insert='s0:12345:respawn:/sbin/agetty 38400 console' - if use ibm ; then - insert="${insert}#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0"$'\n' - insert="${insert}#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0" - fi - (use arm || use mips || use sh || use sparc) && sed -i '/ttyS0/s:#::' inittab - if use kernel_FreeBSD ; then - sed -i \ - -e 's/linux/cons25/g' \ - -e 's/ttyS0/cuaa0/g' \ - -e 's/ttyS1/cuaa1/g' \ - inittab #121786 - fi - [[ -n ${insert} ]] && echo "# Architecture specific features"$'\n'"${insert}" >> inittab -} - -src_compile() { - use static && append-ldflags -static - emake -C src \ - CC="$(tc-getCC)" \ - all change_console \ - || die -} - -src_install() { - emake -C src \ - install \ - ROOT="${D}" \ - || die "make install" - dodoc README doc/* - - into / - dosbin src/change_console || die - doman src/change_console.8 - - insinto /etc - doins "${WORKDIR}"/inittab || die "inittab" - - doinitd "${FILESDIR}"/{reboot,shutdown}.sh || die -} - -pkg_postinst() { - # Reload init to fix unmounting problems of / on next reboot. - # This is really needed, as without the new version of init cause init - # not to quit properly on reboot, and causes a fsck of / on next reboot. - if [[ ${ROOT} == / ]] ; then - # Do not return an error if this fails - /sbin/telinit U &>/dev/null - fi -}