diff options
16 files changed, 0 insertions, 1329 deletions
diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-aix.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-aix.patch deleted file mode 100644 index ebc162345a52..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-aix.patch +++ /dev/null @@ -1,110 +0,0 @@ -W00T, AIX does have /proc filesystem - even with slightly different layout. - ---- src/start-stop-daemon.c -+++ src/start-stop-daemon.c -@@ -56,6 +56,8 @@ - # define OSNetBSD - #elif defined(__APPLE__) - # define OSDarwin -+#elif defined(_AIX) -+# define OSaix - #else - # error Unknown architecture - cannot build start-stop-daemon - #endif -@@ -85,6 +87,10 @@ - #include <sys/pstat.h> - #endif - -+#if defined(OSaix) -+#include <sys/procfs.h> -+#endif -+ - #include <errno.h> - #include <stdio.h> - #include <stdlib.h> -@@ -178,7 +184,7 @@ - static void do_pidfile(const char *name); - static void do_stop(int signal_nr, int quietmode, - int *n_killed, int *n_notkilled, int retry_nr); --#if defined(OSLinux) || defined(OShpux) -+#if defined(OSLinux) || defined(OShpux) || defined(OSaix) - static int pid_is_exec(pid_t pid, const struct stat *esb); - #endif - -@@ -755,7 +761,7 @@ - static void - check(pid_t pid) - { --#if defined(OSLinux) || defined(OShpux) -+#if defined(OSLinux) || defined(OShpux) || defined(OSaix) - if (execname && !pid_is_exec(pid, &exec_stat)) - return; - #elif defined(OSHURD) || defined(OSFreeBSD) || defined(OSNetBSD) || defined(OSDarwin) -@@ -791,7 +797,7 @@ - /* WTA: this needs to be an autoconf check for /proc/pid existance. - */ - --#if defined(OSLinux) || defined (OSsunos) || defined(OSfreebsd) -+#if defined(OSLinux) || defined (OSsunos) || defined(OSfreebsd) || defined(OSaix) - static void - do_procinit(void) - { -@@ -1059,6 +1065,58 @@ - } - #endif /* OShpux */ - -+#if defined(OSaix) -+/* max possible pid (signed long) in theory: -+ * 32bit: 2147483647 (10 digits) -+ * 64bit: 9223372036854775807 (19 digits) -+ */ -+static int -+pid_is_exec(pid_t pid, const struct stat *esb) -+{ -+ struct stat sb; -+ char buf[40]; -+ -+ sprintf(buf, "/proc/%ld/object/a.out", pid); -+ if (stat(buf, &sb) != 0) -+ return 0; -+ return (sb.st_dev == esb->st_dev && sb.st_ino == esb->st_ino); -+} -+ -+ -+static int -+pid_is_user(pid_t pid, uid_t uid) -+{ -+ struct stat sb; -+ char buf[32]; -+ -+ sprintf(buf, "/proc/%ld", pid); -+ if (stat(buf, &sb) != 0) -+ return 0; -+ return (sb.st_uid == uid); -+} -+ -+ -+static int -+pid_is_cmd(pid_t pid, const char *name) -+{ -+ char buf[40]; -+ FILE *f; -+ struct psinfo psi; -+ int r; -+ -+ sprintf(buf, "/proc/%ld/psinfo", pid); -+ f = fopen(buf, "r"); -+ if (!f) -+ return 0; -+ r = fread(&psi, sizeof(psi), 1, f); -+ fclose(f); -+ if (r != 1) { -+ return 0; -+ } -+ return strcmp(name, psi.pr_fname) == 0; -+} -+#endif /* OSaix */ -+ - - static void - do_findprocs(void) diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-darwin-kvm.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-darwin-kvm.patch deleted file mode 100644 index 08668edff73e..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-darwin-kvm.patch +++ /dev/null @@ -1,22 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=360855 - -by JTRiley - ---- baselayout-1.12.5/src/start-stop-daemon.c -+++ baselayout-1.12.5/src/start-stop-daemon.c -@@ -73,10 +73,14 @@ - #include <sys/types.h> - - #include <err.h> --#include <kvm.h> - #include <limits.h> - #endif - -+#if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD) -+#include <kvm.h> -+#endif -+ -+ - #if defined(OShpux) - #include <sys/param.h> - #include <sys/pstat.h> diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-gnulib.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-gnulib.patch deleted file mode 100644 index dfb64c633206..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-gnulib.patch +++ /dev/null @@ -1,78 +0,0 @@ -Need to add libraries after object files, or solaris -linker might not see library's symbols to be needed -when added to LDFLAGS. - -Take strndup from gnulib too, this decl breaks on Linux (#361417). - -VERSION is defined in gnulib's config.h. - ---- src/Makefile.orig 2011-03-30 13:15:56 +0200 -+++ src/Makefile 2011-03-30 13:16:52 +0200 -@@ -30,10 +30,10 @@ - $(CC) $(CFLAGS) -c -o $@ $^ - - runscript: runscript.o rs-misc.o -- $(LD) $(LDFLAGS) -o $@ $^ $(LDFLAGS_RS) -+ $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS_RS) - - start-stop-daemon: start-stop-daemon.c -- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDFLAGS_SSD) -+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS_SSD) - - install: $(TARGET) - install -m 0755 -d $(DESTDIR)/bin ---- src/core/misc.c.orig 2011-03-31 17:46:46 +0200 -+++ src/core/misc.c 2011-03-31 17:47:03 +0200 -@@ -86,31 +86,6 @@ - return new_path; - } - --char *strndup(const char *str, size_t size) { -- char *new_str = NULL; -- size_t len; -- -- if (NULL == str) { -- DBG_MSG("Invalid argument passed!\n"); -- errno = EINVAL; -- return NULL; -- } -- -- /* Check lenght of str without breaching the size limit */ -- for (len = 0;(len < size) && ('\0' != str[len]);len++); -- -- new_str = malloc(len + 1); -- if (NULL == new_str) { -- DBG_MSG("Failed to allocate buffer!\n"); -- return NULL; -- } -- -- /* Make sure our string is NULL terminated */ -- new_str[len] = '\0'; -- -- return (char *)memcpy(new_str, str, len); --} -- - char *gbasename(const char *path) { - char *new_path = NULL; - ---- src/core/misc.h.orig 2011-03-31 17:46:43 +0200 -+++ src/core/misc.h 2011-03-31 18:06:58 +0200 -@@ -246,8 +246,6 @@ - * with the malloc() call. */ - char *strcatpaths(const char *pathname1, const char *pathname2); - --/* Compat functions for GNU extensions */ --char *strndup(const char *str, size_t size); - /* Same as basename(3), but do not modify path */ - char *gbasename(const char *path); - ---- src/start-stop-daemon.c.orig 2011-03-31 18:11:02 +0200 -+++ src/start-stop-daemon.c 2011-03-31 18:11:03 +0200 -@@ -31,6 +31,7 @@ - * - */ - -+#undef VERSION - #define VERSION "1.13.11+gentoo" - - #define NONRETURNPRINTFFORMAT(x, y) \ diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-bash.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-bash.patch deleted file mode 100644 index 095ce451c048..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-bash.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -ru baselayout-1.12.5.orig/sbin/env-update.sh baselayout-1.12.5/sbin/env-update.sh ---- baselayout-1.12.5.orig/sbin/env-update.sh 2010-08-17 12:56:00.968746729 +0200 -+++ baselayout-1.12.5/sbin/env-update.sh 2010-08-17 12:56:47.185326760 +0200 -@@ -1,4 +1,4 @@ --#!@GENTOO_PORTAGE_EPREFIX@/bin/bash -+#! /usr/bin/env bash - # Copyright 1999-2004 Gentoo Foundation - # Distributed under the terms of the GNU General Public License v2 - -diff -ru baselayout-1.12.5.orig/sbin/runscript.sh baselayout-1.12.5/sbin/runscript.sh ---- baselayout-1.12.5.orig/sbin/runscript.sh 2010-08-17 12:56:00.968746729 +0200 -+++ baselayout-1.12.5/sbin/runscript.sh 2010-08-17 12:56:58.362098849 +0200 -@@ -1,4 +1,4 @@ --#!@GENTOO_PORTAGE_EPREFIX@/bin/bash -+#! /usr/bin/env bash - # Copyright 1999-2006 Gentoo Foundation - # Distributed under the terms of the GNU General Public License v2 - diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-eprefix.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-eprefix.patch deleted file mode 100644 index 28d8039be1b7..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-eprefix.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -ru baselayout-1.12.5.orig/etc/profile baselayout-1.12.5/etc/profile ---- baselayout-1.12.5.orig/etc/profile 2009-11-27 15:27:58 +0100 -+++ baselayout-1.12.5/etc/profile 2009-11-27 15:34:14 +0100 -@@ -137,6 +137,21 @@ - done - fi - -+# -+# final finally set EPREFIX to our prefix if we don't have a local portage. this -+# was previously done by the startprefix script, but we want to be able to start -+# this environment by simply sourcing etc/profile with the correct shell. -+# -+if [[ -z "${EPREFIX}" ]]; then -+ if [[ ! -x "@GENTOO_PORTAGE_EPREFIX@"/usr/bin/emerge ]]; then -+ export EPREFIX="@GENTOO_PORTAGE_EPREFIX@" -+ fi -+elif [[ "${EPREFIX}" != "@GENTOO_PORTAGE_EPREFIX@" ]]; then -+ echo "WARNING: EPREFIX is set from environment to \"${EPREFIX}\"." -+ echo " You are entering the prefix \"@GENTOO_PORTAGE_EPREFIX@\"." -+ echo " Having EPREFIX set this way will probably render this environment unusable." -+fi -+ - unset _ro_root - unset _ro_deps - unset _ro_chained_path_vars diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-pkgconfig.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-pkgconfig.patch deleted file mode 100644 index b0d7e79e26e1..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-pkgconfig.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -ru baselayout-1.12.5.orig/etc/profile baselayout-1.12.5/etc/profile ---- baselayout-1.12.5.orig/etc/profile 2009-07-14 09:48:59 +0200 -+++ baselayout-1.12.5/etc/profile 2009-07-14 09:50:48 +0200 -@@ -30,8 +30,11 @@ - if [[ -n "${_ro_root}" ]]; then - _ro_chained_path_vars="PATH MANPATH" - -- [[ ${_ro_deps} == *RDEPEND* ]] && -+ if [[ ${_ro_deps} == *RDEPEND* ]]; then - _ro_chained_path_vars="${_ro_chained_path_vars} PKG_CONFIG_PATH" -+ else -+ unset PKG_CONFIG_PATH -+ fi - - for var in ${_ro_chained_path_vars}; do - eval "_ro_backupenv_paths_${var}=\${${var}}" diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-prompt.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-prompt.patch deleted file mode 100644 index eb7a4ab1ff58..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-prompt.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -ru baselayout-1.12.5.orig/etc/profile baselayout-1.12.5/etc/profile ---- baselayout-1.12.5.orig/etc/profile 2009-12-09 13:48:07 +0100 -+++ baselayout-1.12.5/etc/profile 2009-12-09 13:54:52 +0100 -@@ -110,9 +110,34 @@ - # it in the user's dot-files), but it shouldn't make any - # difference. - . "@GENTOO_PORTAGE_EPREFIX@"/etc/bash/bashrc -+ elif [ -n "${_ro_root}" ]; then -+ # We're in a prefix chain, but have no local bash. we rely on bash -+ # beeing there _somewhere_ in the chain, so we do not need to set -+ # PS1 explicitly. -+ if [ -z "${PS1}" ]; then -+ # try harder to find something in the parent prefix of the chain. -+ # dont bother to search multiple chain members up to the top. -+ if [ -f "${_ro_root}/etc/bash/bashrc" ]; then -+ . "${_ro_root}/etc/bash/bashrc" -+ fi -+ fi - else - PS1='\u@\h \w \$ ' - fi -+ -+ # Set the last dirpart of the current prefix somewhere -+ # in the prompt, so one immediately knows where he/she is. -+ if [ ${_ro_recursion_level} == 0 ]; then -+ # we're in the last prefix of the chain here. -+ _ro_name="@GENTOO_PORTAGE_EPREFIX@" -+ _ro_name="${_ro_name##*/}" -+ -+ # use color only if the prompt already contains color escapes -+ case "${PS1}" in -+ *'\[\033['*'m\]'*) PS1="\[\033[01;36m\][${_ro_name}]\[\033[00m\] ${PS1}" ;; -+ *) PS1="[${_ro_name}] ${PS1}" ;; -+ esac -+ fi - else - # Setup a bland default prompt. Since this prompt should be useable - # on color and non-color terminals, as well as shells that don't -@@ -120,6 +145,10 @@ - PS1="`whoami`@`uname -n | cut -f1 -d.` \$ " - fi - -+# when chaining prefixes, we want the prompt to be passed to the child too, -+# so we need to export it. -+export PS1 -+ - for sh in "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.d/*.sh ; do - if [ -r "$sh" ] ; then - . "$sh" -@@ -146,7 +175,7 @@ - if [[ ! -x "@GENTOO_PORTAGE_EPREFIX@"/usr/bin/emerge ]]; then - export EPREFIX="@GENTOO_PORTAGE_EPREFIX@" - fi --elif [[ "${EPREFIX}" != "@GENTOO_PORTAGE_EPREFIX@" ]]; then -+elif [[ "${EPREFIX}" != "@GENTOO_PORTAGE_EPREFIX@" && ${_ro_recursion_level} == 0 ]]; then - echo "WARNING: EPREFIX is set from environment to \"${EPREFIX}\"." - echo " You are entering the prefix \"@GENTOO_PORTAGE_EPREFIX@\"." - echo " Having EPREFIX set this way will probably render this environment unusable." diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-recursion.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-recursion.patch deleted file mode 100644 index 71883838e7bd..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-chaining-recursion.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -ru baselayout-1.12.5.orig/etc/profile baselayout-1.12.5/etc/profile ---- baselayout-1.12.5.orig/etc/profile 2009-07-20 09:10:30 +0200 -+++ baselayout-1.12.5/etc/profile 2009-07-20 09:49:01 +0200 -@@ -17,10 +17,29 @@ - _ro_root=$(. "/tools/mduft/eprefix/preserved"/etc/make.conf && echo $READONLY_EPREFIX) - _ro_deps=${_ro_root#*:} - _ro_root=${_ro_root%:*} -+ -+# -+# prevent dooming of _ro_* variables by recursing down the -+# profile chain, by backing the up, tagged by resursion depth. -+# -+ -+[[ -z "${_ro_recursion_level}" ]] && _ro_recursion_level=0 -+((++_ro_recursion_level)) -+ -+for _ro_backup_var in _ro_root _ro_deps; do -+ eval "_ro_b${_ro_recursion_level}_${_ro_backup_var}=\${${_ro_backup_var}}" -+done -+ - if [ -n "${_ro_root}" -a -f "${_ro_root}"/etc/profile ]; then - . "${_ro_root}"/etc/profile - fi - -+for _ro_backup_var in _ro_root _ro_deps; do -+ eval "${_ro_backup_var}=\${_ro_b${_ro_recursion_level}_${_ro_backup_var}}" -+done -+ -+((--_ro_recursion_level)) -+ - # - # With prefix-chaining we want another set of variables that - # should be retained for all prefixes. for example it is ok diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-pidof.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-pidof.patch deleted file mode 100644 index 0a592cc59494..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-pidof.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- baselayout-1.12.5/sbin/rc-daemon.sh 2007-10-18 19:15:34 +0400 -+++ baselayout-1.12.5/sbin/rc-daemon.sh 2007-10-18 19:20:32 +0400 -@@ -186,7 +186,7 @@ - args="${args} '"${arg}"'" - done - -- eval /bin/pidof -x ${args} -+ eval @GENTOO_PORTAGE_EPREFIX@/bin/pidof -x ${args} - } - - # bool is_daemon_running(char* cmd, char* pidfile) diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-sh.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-sh.patch deleted file mode 100644 index a1f45939f2a1..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-sh.patch +++ /dev/null @@ -1,226 +0,0 @@ -diff -ur sbin/rc-daemon.sh @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/sh/rc-daemon.sh ---- baselayout-1.12.5/sbin/rc-daemon.sh 2006-09-14 14:11:34 +0400 -+++ baselayout-1.12.5/sbin/rc-daemon.sh 2007-10-18 01:20:10 +0400 -@@ -226,7 +229,7 @@ - # We don't do anyting fancy - just pass the given options - # to start-stop-daemon and return the value - rc_start_daemon() { -- eval /sbin/start-stop-daemon "${args}" -+ eval @GENTOO_PORTAGE_EPREFIX@/sbin/start-stop-daemon "${args}" - local retval="$?" - - [[ ${retval} != "0" ]] && return "${retval}" -@@ -365,7 +368,7 @@ - - # We pass --oknodo and --test directly to start-stop-daemon and return - if ${nothing}; then -- eval /sbin/start-stop-daemon "${args}" -+ eval @GENTOO_PORTAGE_EPREFIX@/sbin/start-stop-daemon "${args}" - return "$?" - fi - -diff -ur sbin/rc-services.sh @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/sh/rc-services.sh ---- baselayout-1.12.5/sbin/rc-services.sh 2006-09-14 14:11:34 +0400 -+++ baselayout-1.12.5/sbin/rc-services.sh 2007-10-18 01:25:55 +0400 -@@ -8,9 +8,9 @@ - - if [[ ${RC_GOT_DEPTREE_INFO} != "yes" ]] ; then - # Only try and update if we are root -- if [[ ${EUID} == "0" ]] && ! /sbin/depscan.sh ; then -+ if [[ ${EUID} == "0" ]] && ! @GENTOO_PORTAGE_EPREFIX@/sbin/depscan.sh ; then - echo -- eerror "Error running '/sbin/depscan.sh'!" -+ eerror "Error running '@GENTOO_PORTAGE_EPREFIX@/sbin/depscan.sh'!" - eerror "Please correct any problems above." - exit 1 - fi -@@ -19,7 +19,7 @@ - if [[ ${RC_GOT_DEPTREE_INFO} != "yes" ]] ; then - echo - eerror "Dependency info is missing! Please run" -- eerror " # /sbin/depscan.sh" -+ eerror " # @GENTOO_PORTAGE_EPREFIX@/sbin/depscan.sh" - eerror "to fix this." - exit 1 - fi -@@ -134,7 +134,7 @@ - if ! get_dep_info "${myservice}" >/dev/null ; then - eerror "Could not get dependency info for ${myservice}!" > /dev/stderr - eerror "Please run:" > /dev/stderr -- eerror " # /sbin/depscan.sh" > /dev/stderr -+ eerror " # @GENTOO_PORTAGE_EPREFIX@/sbin/depscan.sh" > /dev/stderr - eerror "to try and fix this." > /dev/stderr - return 1 - fi -@@ -212,11 +212,11 @@ - - [[ -z $1 || -z $2 ]] && return 1 - -- [[ $2 != "${BOOTLEVEL}" && -e /etc/runlevels/"${BOOTLEVEL}"/.fake ]] && \ -- fake_services="$( < /etc/runlevels/"${BOOTLEVEL}"/.fake )" -+ [[ $2 != "${BOOTLEVEL}" && -e @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/"${BOOTLEVEL}"/.fake ]] && \ -+ fake_services="$( < @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/"${BOOTLEVEL}"/.fake )" - -- [[ -e /etc/runlevels/"$2"/.fake ]] && \ -- fake_services="${fake_services} $( < /etc/runlevels/"$2"/.fake )" -+ [[ -e @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/"$2"/.fake ]] && \ -+ fake_services="${fake_services} $( < @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/"$2"/.fake )" - - for x in ${fake_services} ; do - [[ $1 == "${x##*/}" ]] && return 0 -@@ -232,7 +232,7 @@ - in_runlevel() { - [[ -z $1 || -z $2 ]] && return 1 - -- [[ -L "/etc/runlevels/$2/$1" ]] && return 0 -+ [[ -L "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/$2/$1" ]] && return 0 - - return 1 - } -@@ -385,7 +385,7 @@ - local service="$1" - [[ -z ${service} ]] && return 1 - -- if [[ ! -e "/etc/init.d/${service}" ]] ; then -+ if [[ ! -e "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" ]] ; then - mark_service_stopped "${service}" - return 1 - fi -@@ -408,8 +408,8 @@ - # if we can not start the services in parallel - # then just start it and return the exit status - ( -- profiling name "/etc/init.d/${service} start" -- "/etc/init.d/${service}" start -+ profiling name "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service} start" -+ "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" start - ) - - service_started "${service}" || service_inactive "${service}" \ -@@ -423,8 +423,8 @@ - else - # if parallel startup is allowed, start it in background - ( -- profiling name "/etc/init.d/${service} start" -- "/etc/init.d/${service}" start -+ profiling name "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service} start" -+ "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" start - - service_started "${service}" || service_inactive "${service}" \ - || service_scheduled "${service}" -@@ -445,7 +445,7 @@ - local service="$1" - [[ -z ${service} ]] && return 1 - -- if [[ ! -e "/etc/init.d/${service}" ]] ; then -+ if [[ ! -e "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" ]] ; then - mark_service_stopped "${service}" - return 0 - fi -@@ -470,7 +470,7 @@ - ${STOP_CRITICAL} == "yes" ]] ; then - # if we can not start the services in parallel - # then just start it and return the exit status -- ( "/etc/init.d/${service}" stop ) -+ ( "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" stop ) - service_stopped "${service}" - retval=$? - end_service "${service}" "${retval}" -@@ -479,7 +479,7 @@ - else - # if parallel startup is allowed, start it in background - ( -- ( "/etc/init.d/${service}" stop ) -+ ( "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" stop ) - service_stopped "${service}" - retval=$? - end_service "${service}" "${retval}" -@@ -496,7 +496,7 @@ - mark_service_coldplugged() { - [[ -z $1 ]] && return 1 - -- ln -snf "/etc/init.d/$1" "${svcdir}/coldplugged/$1" -+ ln -snf "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/coldplugged/$1" - return 0 - } - -@@ -507,7 +507,7 @@ - mark_service_starting() { - [[ -z $1 ]] && return 1 - -- ln -sn "/etc/init.d/$1" "${svcdir}/starting/$1" 2>/dev/null || return 1 -+ ln -sn "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/starting/$1" 2>/dev/null || return 1 - - [[ -f "${svcdir}/started/$1" ]] && rm -f "${svcdir}/started/$1" - [[ -f "${svcdir}/inactive/$1" ]] \ -@@ -522,7 +522,7 @@ - mark_service_started() { - [[ -z $1 ]] && return 1 - -- ln -snf "/etc/init.d/$1" "${svcdir}/started/$1" -+ ln -snf "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/started/$1" - - rm -f "${svcdir}/starting/$1" "${svcdir}/inactive/$1" \ - "${svcdir}/wasinactive/$1" "${svcdir}/stopping/$1" \ -@@ -538,7 +538,7 @@ - mark_service_inactive() { - [[ -z $1 ]] && return 1 - -- ln -snf "/etc/init.d/$1" "${svcdir}/inactive/$1" -+ ln -snf "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/inactive/$1" - - rm -f "${svcdir}/started/$1" "${svcdir}/wasinactive/$1" \ - "${svcdir}/starting/$1" "${svcdir}/stopping/$1" -@@ -553,7 +553,7 @@ - mark_service_stopping() { - [[ -z $1 ]] && return 1 - -- ln -sn "/etc/init.d/$1" "${svcdir}/stopping/$1" 2>/dev/null || return 1 -+ ln -sn "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/stopping/$1" 2>/dev/null || return 1 - - rm -f "${svcdir}/started/$1" - [[ -f "${svcdir}/inactive/$1" ]] \ -@@ -690,7 +691,7 @@ - mark_service_failed() { - [[ -z $1 || ! -d "${svcdir}/failed" ]] && return 1 - -- ln -snf "/etc/init.d/$1" "${svcdir}/failed/$1" -+ ln -snf "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/failed/$1" - } - - # bool service_failed(service) -@@ -744,8 +745,8 @@ - return $? - ;; - yes) -- for x in $(dolisting "/etc/runlevels/${BOOTLEVEL}/net.*") \ -- $(dolisting "/etc/runlevels/${SOFTLEVEL}/net.*") ; do -+ for x in $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${BOOTLEVEL}/net.*") \ -+ $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${SOFTLEVEL}/net.*") ; do - local y="${x##*/}" - [[ ${y} == "$1" ]] && return 1 - service_started "${y}" || return 1 -@@ -785,8 +786,8 @@ - [[ -f "${svcdir}/softlevel" ]] && mylevel=$( < "${svcdir}/softlevel" ) - - for x in $( i$1 "$2" ) ; do -- [[ -e "/etc/runlevels/${BOOTLEVEL}/${x}" || \ -- -e "/etc/runlevels/${mylevel}/${x}" || \ -+ [[ -e "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${BOOTLEVEL}/${x}" || \ -+ -e "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${mylevel}/${x}" || \ - ${x} == "net" ]] \ - && valid="${valid} ${x}" - done -@@ -836,9 +837,9 @@ - net_services="${net_services} ${x##*/}" - done - else -- for x in $(dolisting "/etc/runlevels/${BOOTLEVEL}/net.*") \ -- $(dolisting "/etc/runlevels/${SOFTLEVEL}/net.*") \ -- $(dolisting "/etc/runlevels/coldplugged/net.*") ; do -+ for x in $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${BOOTLEVEL}/net.*") \ -+ $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${SOFTLEVEL}/net.*") \ -+ $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/coldplugged/net.*") ; do - net_services="${net_services} ${x##*/}" - done - fi diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-src.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-src.patch deleted file mode 100644 index a6ee5dbf3032..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix-src.patch +++ /dev/null @@ -1,102 +0,0 @@ ---- baselayout-1.12.5/src/runscript.c 2007-10-17 21:11:10 +0400 -+++ baselayout-1.12.5/src/runscript.c 2007-10-17 21:13:56 +0400 -@@ -22,16 +22,16 @@ - # define LIBDIR "lib" - #endif - --#define SBIN_RC "/sbin/rc" --#define PROFILE_ENV "/etc/profile.env" --#define RCSCRIPTS_LIB "/" LIBDIR "/rcscripts" -+#define SBIN_RC "@GENTOO_PORTAGE_EPREFIX@/sbin/rc" -+#define PROFILE_ENV "@GENTOO_PORTAGE_EPREFIX@/etc/profile.env" -+#define RCSCRIPTS_LIB "@GENTOO_PORTAGE_EPREFIX@/" LIBDIR "/rcscripts" - #define SYS_WHITELIST RCSCRIPTS_LIB "/conf.d/env_whitelist" --#define USR_WHITELIST "/etc/conf.d/env_whitelist" -+#define USR_WHITELIST "@GENTOO_PORTAGE_EPREFIX@/etc/conf.d/env_whitelist" - #define RCSCRIPT_HELP RCSCRIPTS_LIB "/sh/rc-help.sh" - #define SELINUX_LIB RCSCRIPTS_LIB "/runscript_selinux.so" - #define SOFTLEVEL "SOFTLEVEL" - --#define DEFAULT_PATH "PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin" -+#define DEFAULT_PATH "PATH=@GENTOO_PORTAGE_EPREFIX@/bin:@GENTOO_PORTAGE_EPREFIX@/sbin:@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/usr/sbin:@GENTOO_PORTAGE_EPREFIX@/usr/local/sbin" - - #define IS_SBIN_RC() (0 == strcmp(caller, SBIN_RC)) - -@@ -217,7 +217,7 @@ - int new = 1; - - /* Need to be /bin/bash, else BASH is invalid */ -- myargs[0] = "/bin/bash"; -+ myargs[0] = "@GENTOO_PORTAGE_EPREFIX@/bin/bash"; - while (argv[new] != 0) { - myargs[new] = argv[new]; - new++; -@@ -243,10 +243,10 @@ - setup_selinux(argc, argv); - - if (!IS_SBIN_RC()) { -- if (execve("/sbin/runscript.sh", myargs, myenv) < 0) -+ if (execve("@GENTOO_PORTAGE_EPREFIX@/sbin/runscript.sh", myargs, myenv) < 0) - exit(1); - } else { -- if (execve("/bin/bash", myargs, myenv) < 0) -+ if (execve("@GENTOO_PORTAGE_EPREFIX@/bin/bash", myargs, myenv) < 0) - exit(1); - } - -diff -ur ./sbin/depscan.sh /Users/dirk/src@GENTOO_PORTAGE_EPREFIX@/sbin/depscan.sh ---- baselayout-1.12.5/sbin/depscan.sh 2007-10-17 21:26:21 +0400 -+++ baselayout-1.12.5/sbin/depscan.sh 2007-10-17 18:58:23 +0400 -@@ -7,7 +7,7 @@ - fi - - argv0=${0##*/} --source /etc/init.d/functions.sh || { -+source @GENTOO_PORTAGE_EPREFIX@/etc/init.d/functions.sh || { - echo "${argv0}: Could not source /etc/init.d/functions.sh!" 1>&2 - exit 1 - } -@@ -89,7 +91,7 @@ - fi - - touch "${mtime_test}" -- for config in /etc/conf.d/* /etc/init.d/* /etc/rc.conf -+ for config in @GENTOO_PORTAGE_EPREFIX@/etc/conf.d/* @GENTOO_PORTAGE_EPREFIX@/etc/init.d/* @GENTOO_PORTAGE_EPREFIX@/etc/rc.conf - do - ! ${update} \ - && is_older_than "${mysvcdir}/depcache" "${config}" \ -@@ -104,7 +106,7 @@ - rm -f "${mtime_test}" - - if [[ ${clock_screw} == 1 ]] ; then -- ewarn "One of the files in /etc/{conf.d,init.d} or /etc/rc.conf" -+ ewarn "One of the files in @GENTOO_PORTAGE_EPREFIX@/etc/{conf.d,init.d} or @GENTOO_PORTAGE_EPREFIX@/etc/rc.conf" - ewarn "has a modification time in the future!" - fi - -@@ -125,17 +127,17 @@ - - export SVCDIR DEPTYPES ORDTYPES - --cd /etc/init.d -+cd @GENTOO_PORTAGE_EPREFIX@/etc/init.d - --/bin/gawk \ -- -f /lib/rcscripts/awk/functions.awk \ -- -f /lib/rcscripts/awk/cachedepends.awk || \ -+@GENTOO_PORTAGE_EPREFIX@/bin/gawk \ -+ -f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/functions.awk \ -+ -f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/cachedepends.awk || \ - retval=1 - --bash "${mysvcdir}/depcache" | \ --/bin/gawk \ -- -f /lib/rcscripts/awk/functions.awk \ -- -f /lib/rcscripts/awk/gendepends.awk || \ -+@GENTOO_PORTAGE_EPREFIX@/bin/bash "${mysvcdir}/depcache" | \ -+@GENTOO_PORTAGE_EPREFIX@/bin/gawk \ -+ -f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/functions.awk \ -+ -f @GENTOO_PORTAGE_EPREFIX@/lib/rcscripts/awk/gendepends.awk || \ - retval=1 - - touch "${mysvcdir}"/dep{cache,tree} diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix.patch deleted file mode 100644 index 3394a323a07a..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-prefix.patch +++ /dev/null @@ -1,409 +0,0 @@ ---- baselayout-1.12.5/etc/env.d/00basic -+++ baselayout-1.12.5/etc/env.d/00basic -@@ -1,10 +1,11 @@ --# /etc/env.d/00basic -+# @GENTOO_PORTAGE_EPREFIX@/etc/env.d/00basic - --PATH="/opt/bin" --ROOTPATH="/opt/bin" --LDPATH="/usr/local/lib" --MANPATH="/usr/local/share/man:/usr/share/man" --INFOPATH="/usr/share/info" -+# in prefix we have sbin variants in user path! -+PATH="@GENTOO_PORTAGE_EPREFIX@/opt/bin:@GENTOO_PORTAGE_EPREFIX@/usr/sbin:@GENTOO_PORTAGE_EPREFIX@/sbin" -+ROOTPATH="@GENTOO_PORTAGE_EPREFIX@/opt/bin" -+LDPATH="@GENTOO_PORTAGE_EPREFIX@/usr/local/lib" -+MANPATH="@GENTOO_PORTAGE_EPREFIX@/usr/share/man" -+INFOPATH="@GENTOO_PORTAGE_EPREFIX@/usr/share/info" - CVS_RSH="ssh" --PAGER="/usr/bin/less" -+PAGER="@GENTOO_PORTAGE_EPREFIX@/usr/bin/less" - LESSOPEN="|lesspipe.sh %s" ---- baselayout-1.12.5/sbin/env-update.sh -+++ baselayout-1.12.5/sbin/env-update.sh -@@ -1,10 +1,10 @@ --#!/bin/bash -+#!@GENTOO_PORTAGE_EPREFIX@/bin/bash - # Copyright 1999-2004 Gentoo Foundation - # Distributed under the terms of the GNU General Public License v2 - --source /sbin/functions.sh || exit 1 -+source "@GENTOO_PORTAGE_EPREFIX@"/sbin/functions.sh || exit 1 - --if [[ ${EUID} != "0" ]] ; then -+if [[ ${EPREFIX/\//} == "" ]] && [[ ${EUID} != "0" ]] ; then - eerror "$0: must be root." - exit 1 - fi -@@ -13,8 +13,8 @@ - echo "usage: env-update.sh - - note: -- This utility generates /etc/profile.env and /etc/csh.env -- from the contents of /etc/env.d/ -+ This utility generates @GENTOO_PORTAGE_EPREFIX@/etc/profile.env and @GENTOO_PORTAGE_EPREFIX@/etc/csh.env -+ from the contents of @GENTOO_PORTAGE_EPREFIX@/etc/env.d/ - " - exit 1 - } -@@ -30,9 +30,9 @@ - if [[ $# != "0" ]] ; then - usage - else -- /bin/gawk \ -- -f /lib/rcscripts/awk/functions.awk \ -- -f /lib/rcscripts/awk/genenviron.awk -+ "@GENTOO_PORTAGE_EPREFIX@"/bin/gawk \ -+ -f "@GENTOO_PORTAGE_EPREFIX@"/lib/rcscripts/awk/functions.awk \ -+ -f "@GENTOO_PORTAGE_EPREFIX@"/lib/rcscripts/awk/genenviron.awk - fi - - # vim:ts=4 ---- baselayout-1.12.5/sbin/functions.sh -+++ baselayout-1.12.5/sbin/functions.sh -@@ -4,11 +4,11 @@ - RC_GOT_FUNCTIONS="yes" - - # Override defaults with user settings ... --[[ -f /etc/conf.d/rc ]] && source /etc/conf.d/rc -+[[ -f @GENTOO_PORTAGE_EPREFIX@/etc/conf.d/rc ]] && source "@GENTOO_PORTAGE_EPREFIX@"/etc/conf.d/rc - - # Check /etc/conf.d/rc for a description of these ... --declare -r svclib="/lib/rcscripts" --declare -r svcdir="${svcdir:-/var/lib/init.d}" -+declare -r svclib="@GENTOO_PORTAGE_EPREFIX@/lib/rcscripts" -+declare -r svcdir="${svcdir:-@GENTOO_PORTAGE_EPREFIX@/var/lib/init.d}" - svcmount="${svcmount:-no}" - svcfstype="${svcfstype:-tmpfs}" - svcsize="${svcsize:-1024}" -@@ -83,7 +84,7 @@ - } - # This will override the splash() function... - if ! import_addon splash-functions.sh ; then -- [[ -f /sbin/splash-functions.sh ]] && source /sbin/splash-functions.sh -+ [[ -f @GENTOO_PORTAGE_EPREFIX@/sbin/splash-functions.sh ]] && source "@GENTOO_PORTAGE_EPREFIX@"/sbin/splash-functions.sh - fi - - # void profiling(...) -@@ -114,8 +115,8 @@ - local newbootlevel= - local newsoftlevel= - -- if [[ -r /proc/cmdline ]] ; then -- for copt in $(</proc/cmdline) ; do -+ if [[ -r @GENTOO_PORTAGE_EPREFIX@/proc/cmdline ]] ; then -+ for copt in $(<"@GENTOO_PORTAGE_EPREFIX@"/proc/cmdline) ; do - case "${copt%=*}" in - bootlevel) - newbootlevel="${copt##*=}" -@@ -153,8 +154,8 @@ - fi - - if [[ ${RC_USE_CONFIG_PROFILE} == "yes" && -n ${DEFAULTLEVEL} ]] && \ -- [[ -d "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" || \ -- -L "/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" ]] ; then -+ [[ -d "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" || \ -+ -L "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${BOOTLEVEL}.${DEFAULTLEVEL}" ]] ; then - export BOOTLEVEL="${BOOTLEVEL}.${DEFAULTLEVEL}" - fi - -@@ -176,8 +177,8 @@ - get_libdir() { - if [[ -n ${CONF_LIBDIR_OVERRIDE} ]] ; then - CONF_LIBDIR="${CONF_LIBDIR_OVERRIDE}" -- elif [[ -x /usr/bin/portageq ]] ; then -- CONF_LIBDIR="$(/usr/bin/portageq envvar CONF_LIBDIR)" -+ elif [[ -x @GENTOO_PORTAGE_EPREFIX@/usr/bin/portageq ]] ; then -+ CONF_LIBDIR="$("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/portageq envvar CONF_LIBDIR)" - fi - echo "${CONF_LIBDIR:=lib}" - } -@@ -190,14 +191,14 @@ - local pri= - local tag= - -- if [[ -x /usr/bin/logger ]] ; then -+ if [[ -x @GENTOO_PORTAGE_EPREFIX@/usr/bin/logger ]] ; then - pri="$1" - tag="$2" - - shift 2 - [[ -z "$*" ]] && return 0 - -- /usr/bin/logger -p "${pri}" -t "${tag}" -- "$*" -+ "@GENTOO_PORTAGE_EPREFIX@"/usr/bin/logger -p "${pri}" -t "${tag}" -- "$*" - fi - - return 0 -@@ -269,7 +270,7 @@ - fi - - local name="rc-scripts" -- [[ $0 != "/sbin/runscript.sh" ]] && name="${0##*/}" -+ [[ $0 != "@GENTOO_PORTAGE_EPREFIX@/sbin/runscript.sh" ]] && name="${0##*/}" - # Log warnings to system log - esyslog "daemon.warning" "${name}" "$*" - -@@ -290,7 +291,7 @@ - fi - - local name="rc-scripts" -- [[ $0 != "/sbin/runscript.sh" ]] && name="${0##*/}" -+ [[ $0 != "@GENTOO_PORTAGE_EPREFIX@/sbin/runscript.sh" ]] && name="${0##*/}" - # Log errors to system log - esyslog "daemon.err" "rc-scripts" "$*" - -@@ -488,9 +489,9 @@ - get_bootparam() { - local x copt params retval=1 - -- [[ ! -r /proc/cmdline ]] && return 1 -+ [[ ! -r @GENTOO_PORTAGE_EPREFIX@/proc/cmdline ]] && return 1 - -- for copt in $(< /proc/cmdline) ; do -+ for copt in $(< "@GENTOO_PORTAGE_EPREFIX@"/proc/cmdline) ; do - if [[ ${copt%=*} == "gentoo" ]] ; then - params=$(gawk -v PARAMS="${copt##*=}" ' - BEGIN { -@@ -583,8 +584,8 @@ - # get the version of baselayout that this system is running - # - get_base_ver() { -- [[ ! -r /etc/gentoo-release ]] && return 0 -- local ver="$(</etc/gentoo-release)" -+ [[ ! -r @GENTOO_PORTAGE_EPREFIX@/etc/gentoo-release ]] && return 0 -+ local ver="$(<"@GENTOO_PORTAGE_EPREFIX@"/etc/gentoo-release)" - echo "${ver##* }" - } - -@@ -602,8 +603,8 @@ - is_net_fs() { - local fstype - # /proc/mounts is always accurate but may not always be available -- if [[ -e /proc/mounts ]] ; then -- fstype="$( sed -n -e '/^rootfs/!s:.* '"$1"' \([^ ]*\).*:\1:p' /proc/mounts )" -+ if [[ -e @GENTOO_PORTAGE_EPREFIX@/proc/mounts ]] ; then -+ fstype="$( sed -n -e '/^rootfs/!s:.* '"$1"' \([^ ]*\).*:\1:p' "@GENTOO_PORTAGE_EPREFIX@"/proc/mounts )" - else - fstype="$( mount | sed -n -e 's:.* on '"$1"' type \([^ ]*\).*:\1:p' )" - fi -@@ -618,7 +619,7 @@ - # EXAMPLE: if is_union_fs / ; then ... - # - is_union_fs() { -- [[ ! -x /sbin/unionctl ]] && return 1 -+ [[ ! -x @GENTOO_PORTAGE_EPREFIX@/sbin/unionctl ]] && return 1 - unionctl "$1" --list &>/dev/null - } - -@@ -629,7 +630,7 @@ - # EXAMPLE: if is_uml_sys ; then ... - # - is_uml_sys() { -- grep -qs 'UML' /proc/cpuinfo -+ grep -qs 'UML' "@GENTOO_PORTAGE_EPREFIX@"/proc/cpuinfo - } - - # bool is_vserver_sys() -@@ -639,7 +640,7 @@ - # EXAMPLE: if is_vserver_sys ; then ... - # - is_vserver_sys() { -- grep -qs '^s_context:[[:space:]]*[1-9]' /proc/self/status -+ grep -qs '^s_context:[[:space:]]*[1-9]' "@GENTOO_PORTAGE_EPREFIX@"/proc/self/status - } - - # bool is_xenU_sys() -@@ -649,9 +650,9 @@ - # EXAMPLE: if is_xenU_sys ; then ... - # - is_xenU_sys() { -- [[ ! -d /proc/xen ]] && return 1 -- [[ ! -r /proc/xen/capabilities ]] && return 1 -- grep -q "control_d" /proc/xen/capabilities && return 1 -+ [[ ! -d "@GENTOO_PORTAGE_EPREFIX@"/proc/xen ]] && return 1 -+ [[ ! -r "@GENTOO_PORTAGE_EPREFIX@"/proc/xen/capabilities ]] && return 1 -+ grep -q "control_d" "@GENTOO_PORTAGE_EPREFIX@"/proc/xen/capabilities && return 1 - return 0 - } - -@@ -667,7 +668,7 @@ - gawk '$1 ~ "^#" { next } - $2 == "'$*'" { stab="-t "$3" -o "$4" "$1" "$2; } - END { print stab; } -- ' /etc/fstab -+ ' "@GENTOO_PORTAGE_EPREFIX@"/etc/fstab - } - - # char *reverse_list(list) -@@ -771,13 +772,13 @@ - # Setup a basic $PATH. Just add system default to existing. - # This should solve both /sbin and /usr/sbin not present when - # doing 'su -c foo', or for something like: PATH= rcscript start -- PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:${PATH}" -+ PATH="@GENTOO_PORTAGE_EPREFIX@/bin:@GENTOO_PORTAGE_EPREFIX@/sbin:@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/usr/sbin:@GENTOO_PORTAGE_EPREFIX@/usr/local/sbin:${PATH}" - - # Cache the CONSOLETYPE - this is important as backgrounded shells don't - # have a TTY. rc unsets it at the end of running so it shouldn't hang - # around - if [[ -z ${CONSOLETYPE} ]] ; then -- export CONSOLETYPE="$( /sbin/consoletype 2>/dev/null )" -+ export CONSOLETYPE="$( "@GENTOO_PORTAGE_EPREFIX@"/sbin/consoletype 2>/dev/null )" - fi - if [[ ${CONSOLETYPE} == "serial" ]] ; then - RC_NOCOLOR="yes" -@@ -797,7 +798,7 @@ - - # If we are not /sbin/rc then ensure that we cannot change level variables - if [[ -n ${BASH_SOURCE} \ -- && ${BASH_SOURCE[${#BASH_SOURCE[@]}-1]} != "/sbin/rc" ]] ; then -+ && ${BASH_SOURCE[${#BASH_SOURCE[@]}-1]} != "@GENTOO_PORTAGE_EPREFIX@/sbin/rc" ]] ; then - declare -r BOOTLEVEL DEFAULTLEVEL SOFTLEVEL - fi - else ---- baselayout-1.12.5/etc/profile -+++ baselayout-1.12.5/etc/profile -@@ -1,4 +1,4 @@ --# /etc/profile: login shell setup -+# @GENTOO_PORTAGE_EPREFIX@/etc/profile: login shell setup - # - # That this file is used by any Bourne-shell derivative to setup the - # environment for login shells. -@@ -6,8 +6,8 @@ - - # Load environment settings from profile.env, which is created by - # env-update from the files in /etc/env.d --if [ -e /etc/profile.env ] ; then -- . /etc/profile.env -+if [ -e "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.env ] ; then -+ . "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.env - fi - - # 077 would be more secure, but 022 is generally quite realistic -@@ -22,23 +22,23 @@ - # This way the evaluation can be short-circuited and calling whoami is - # avoided. - if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then -- PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}" -+ PATH="@GENTOO_PORTAGE_EPREFIX@/usr/sbin:@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/sbin:@GENTOO_PORTAGE_EPREFIX@/bin:${ROOTPATH}:/usr/sbin:/usr/bin:/sbin:/bin" - else -- PATH="/usr/local/bin:/usr/bin:/bin:${PATH}" -+ PATH="@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/bin:${PATH}:/usr/bin:/bin" - fi - export PATH - unset ROOTPATH - - # Extract the value of EDITOR --[ -z "$EDITOR" ] && EDITOR="`. /etc/rc.conf 2>/dev/null; echo $EDITOR`" --[ -z "$EDITOR" ] && EDITOR="/bin/nano" -+[ -z "$EDITOR" ] && EDITOR="`. @GENTOO_PORTAGE_EPREFIX@/etc/rc.conf 2>/dev/null; echo $EDITOR`" -+[ -z "$EDITOR" ] && EDITOR="@GENTOO_PORTAGE_EPREFIX@/bin/nano" - export EDITOR - - if [ -n "${BASH_VERSION}" ] ; then - # Newer bash ebuilds include /etc/bash/bashrc which will setup PS1 - # including color. We leave out color here because not all - # terminals support it. -- if [ -f /etc/bash/bashrc ] ; then -+ if [ -f "@GENTOO_PORTAGE_EPREFIX@"/etc/bash/bashrc ] ; then - # Bash login shells run only /etc/profile - # Bash non-login shells run only /etc/bash/bashrc - # Since we want to run /etc/bash/bashrc regardless, we source it -@@ -46,7 +46,7 @@ - # this *after* the user's .bash_profile runs (without putting - # it in the user's dot-files), but it shouldn't make any - # difference. -- . /etc/bash/bashrc -+ . "@GENTOO_PORTAGE_EPREFIX@"/etc/bash/bashrc - else - PS1='\u@\h \w \$ ' - fi -@@ -57,7 +57,7 @@ - PS1="`whoami`@`uname -n | cut -f1 -d.` \$ " - fi - --for sh in /etc/profile.d/*.sh ; do -+for sh in "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.d/*.sh ; do - if [ -r "$sh" ] ; then - . "$sh" - fi ---- baselayout-1.12.5/sbin/runscript.sh~ 2006-09-14 12:11:34 +0200 -+++ baselayout-1.12.5/sbin/runscript.sh 2007-10-06 13:28:40 +0200 -@@ -1,18 +1,18 @@ --#!/bin/bash -+#!@GENTOO_PORTAGE_EPREFIX@/bin/bash - # Copyright 1999-2006 Gentoo Foundation - # Distributed under the terms of the GNU General Public License v2 - - # Common functions --[[ ${RC_GOT_FUNCTIONS} != "yes" ]] && source /sbin/functions.sh -+[[ ${RC_GOT_FUNCTIONS} != "yes" ]] && source @GENTOO_PORTAGE_EPREFIX@/sbin/functions.sh - --# User must be root to run most script stuff (except status) --if [[ ${EUID} != "0" ]] && ! [[ $2 == "status" && $# -eq 2 ]] ; then -- eerror "$0: must be root to run init scripts" -- exit 1 --fi -+## User must be root to run most script stuff (except status) -+#if [[ ${EUID} != "0" ]] && ! [[ $2 == "status" && $# -eq 2 ]] ; then -+# eerror "$0: must be root to run init scripts" -+# exit 1 -+#fi - - myscript="$1" --if [[ -L $1 && ! -L "/etc/init.d/${1##*/}" ]] ; then -+if [[ -L $1 && ! -L "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${1##*/}" ]] ; then - SVCNAME="$(readlink "$1")" - else - SVCNAME="$1" -@@ -84,12 +84,12 @@ - # configuration, if the system administrator chose to put it - # there (if it exists). - if net_service "${SVCNAME}" ; then -- conf="$(add_suffix /etc/conf.d/net)" -+ conf="$(add_suffix @GENTOO_PORTAGE_EPREFIX@/etc/conf.d/net)" - [[ -e ${conf} ]] && source "${conf}" - fi --conf="$(add_suffix "/etc/conf.d/${SVCNAME}")" -+conf="$(add_suffix "@GENTOO_PORTAGE_EPREFIX@/etc/conf.d/${SVCNAME}")" - [[ -e ${conf} ]] && source "${conf}" --conf="$(add_suffix /etc/rc.conf)" -+conf="$(add_suffix @GENTOO_PORTAGE_EPREFIX@/etc/rc.conf)" - [[ -e ${conf} ]] && source "${conf}" - - mylevel="${SOFTLEVEL}" -@@ -146,7 +146,7 @@ - local service="$1" start="$2" - [[ ! -d "${svcdir}/scheduled/${service}" ]] \ - && mkdir -p "${svcdir}/scheduled/${service}" -- ln -snf "/etc/init.d/${service}" \ -+ ln -snf "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" \ - "${svcdir}/scheduled/${service}/${start}" - } - -@@ -334,9 +334,9 @@ - if [[ ${retval} == "0" && ${RC_NO_DEPS} != "yes" ]] ; then - local startupservices="$(ineed "${SVCNAME}") $(valid_iuse "${SVCNAME}")" - local netservices= -- for x in $(dolisting "/etc/runlevels/${BOOTLEVEL}/net.*") \ -- $(dolisting "/etc/runlevels/${mylevel}/net.*") \ -- $(dolisting "/var/lib/init.d/coldplugged/net.*") ; do -+ for x in $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${BOOTLEVEL}/net.*") \ -+ $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${mylevel}/net.*") \ -+ $(dolisting "@GENTOO_PORTAGE_EPREFIX@/var/lib/init.d/coldplugged/net.*") ; do - netservices="${netservices} ${x##*/}" - done - -@@ -631,9 +631,9 @@ - - # Simple way to try and detect if the service use svc_{start,stop} - # to restart if it have a custom restart() funtion. -- if [[ -n $(egrep '^[[:space:]]*restart[[:space:]]*()' "/etc/init.d/${SVCNAME}") ]] ; then -- if [[ -z $(egrep 'svc_stop' "/etc/init.d/${SVCNAME}") || \ -- -z $(egrep 'svc_start' "/etc/init.d/${SVCNAME}") ]] ; then -+ if [[ -n $(egrep '^[[:space:]]*restart[[:space:]]*()' "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${SVCNAME}") ]] ; then -+ if [[ -z $(egrep 'svc_stop' "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${SVCNAME}") || \ -+ -z $(egrep 'svc_start' "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${SVCNAME}") ]] ; then - echo - ewarn "Please use 'svc_stop; svc_start' and not 'stop; start' to" - ewarn "restart the service in its custom 'restart()' function." diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-solaris.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-solaris.patch deleted file mode 100644 index 20e45827acdd..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-solaris.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- src/start-stop-daemon.c -+++ src/start-stop-daemon.c -@@ -44,7 +44,7 @@ - # define OSLinux - #elif defined(__GNU__) - # define OSHURD --#elif defined(__sparc__) -+#elif defined (__SVR4) && defined (__sun) - # define OSsunos - #elif defined(OPENBSD) || defined(__OpenBSD__) - # define OSOpenBSD -@@ -94,6 +94,9 @@ - #if defined(OSaix) - #include <sys/procfs.h> - #endif -+#if defined(OSsunos) -+#include <procfs.h> -+#endif - - #include <errno.h> - #include <stdio.h> -@@ -188,7 +191,7 @@ - static void do_pidfile(const char *name); - static void do_stop(int signal_nr, int quietmode, - int *n_killed, int *n_notkilled, int retry_nr); --#if defined(OSLinux) || defined(OShpux) || defined(OSaix) -+#if defined(OSLinux) || defined(OShpux) || defined(OSaix) || defined(OSsunos) - static int pid_is_exec(pid_t pid, const struct stat *esb); - #endif - -@@ -765,7 +768,7 @@ - static void - check(pid_t pid) - { --#if defined(OSLinux) || defined(OShpux) || defined(OSaix) -+#if defined(OSLinux) || defined(OShpux) || defined(OSaix) || defined(OSsunos) - if (execname && !pid_is_exec(pid, &exec_stat)) - return; - #elif defined(OSHURD) || defined(OSFreeBSD) || defined(OSNetBSD) || defined(OSDarwin) -@@ -801,7 +804,7 @@ - /* WTA: this needs to be an autoconf check for /proc/pid existance. - */ - --#if defined(OSLinux) || defined (OSsunos) || defined(OSfreebsd) || defined(OSaix) -+#if defined(OSLinux) || defined (OSsunos) || defined(OSfreebsd) || defined(OSaix) || defined(OSsunos) - static void - do_procinit(void) - { -@@ -1069,7 +1072,7 @@ - } - #endif /* OShpux */ - --#if defined(OSaix) -+#if defined(OSaix) || defined(OSsunos) - /* max possible pid (signed long) in theory: - * 32bit: 2147483647 (10 digits) - * 64bit: 9223372036854775807 (19 digits) -@@ -1119,7 +1122,7 @@ - } - return strcmp(name, psi.pr_fname) == 0; - } --#endif /* OSaix */ -+#endif /* OSaix || OSsunos */ - - - static void diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-strsep.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-strsep.patch deleted file mode 100644 index 3e67a226c77c..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-strsep.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- src/core/misc.h -+++ src/core/misc.h -@@ -284,5 +284,9 @@ - void file_unmap(char *buf, size_t bufsize); - size_t buf_get_line(char *buf, size_t buflen, size_t cur); - -+#if defined (__SVR4) && defined (__sun) -+char* strsep(char** str, const char* delims); -+#endif -+ - #endif /* _MISC_H */ - ---- src/core/misc.c -+++ src/core/misc.c -@@ -647,3 +647,27 @@ - return count - cur; - } - -+#if defined (__SVR4) && defined (__sun) -+char* strsep(char** str, const char* delims) -+{ -+ char* token; -+ -+ if (*str == NULL) { -+ /* No more tokens */ -+ return NULL; -+ } -+ -+ token=*str; -+ while (**str != '\0') { -+ if (strchr(delims, **str) != NULL) { -+ **str = '\0'; -+ (*str)++; -+ return token; -+ } -+ (*str)++; -+ } -+ /* There is no other token */ -+ *str = NULL; -+ return token; -+} -+#endif diff --git a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-termios_h.patch b/sys-apps/baselayout-prefix/files/baselayout-1.12.5-termios_h.patch deleted file mode 100644 index 8c84bf6ce33a..000000000000 --- a/sys-apps/baselayout-prefix/files/baselayout-1.12.5-termios_h.patch +++ /dev/null @@ -1,30 +0,0 @@ -<termios.h> is standard as per SUSv2 already: -http://pubs.opengroup.org/onlinepubs/007908799/xsh/termios.h.html -AIX does not provide <sys/termios.h> at all, Linux, Solaris, HP-UX, -Darwin and Interix have both, redirecting one to the other. - ---- src/start-stop-daemon.c.orig 2011-03-28 13:55:36 +0200 -+++ src/start-stop-daemon.c 2011-03-28 14:50:47 +0200 -@@ -37,6 +37,9 @@ - #define NONRETURNING \ - __attribute__((noreturn)) - -+#define HAVE_TERMIOS_H -+#undef HAVE_SYS_TERMIOS_H -+ - #if defined(linux) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) - # define OSLinux - #elif defined(__GNU__) -@@ -97,7 +123,11 @@ - #include <grp.h> - #include <sys/ioctl.h> - #include <sys/types.h> --#include <sys/termios.h> -+#if defined(HAVE_TERMIOS_H) -+# include <termios.h> -+#elif defined(HAVE_SYS_TERMIOS_H) -+# include <sys/termios.h> -+#endif - #include <fcntl.h> - #include <limits.h> - #include <assert.h> diff --git a/sys-apps/baselayout-prefix/files/einfo-1.0.4-termcap-check.patch b/sys-apps/baselayout-prefix/files/einfo-1.0.4-termcap-check.patch deleted file mode 100644 index 61d779e47e20..000000000000 --- a/sys-apps/baselayout-prefix/files/einfo-1.0.4-termcap-check.patch +++ /dev/null @@ -1,83 +0,0 @@ -#diff -ru einfo-1.0.4/configure.ac einfo/configure.ac -#--- einfo-1.0.4/configure.ac 2013-10-27 17:39:07.000000000 +0100 -#+++ einfo/configure.ac 2013-10-29 18:01:51.975745907 +0100 -#@@ -22,7 +22,7 @@ -# ) -# ) -# fi -#-AC_DEFINE([HAVE_TERMCAP], test "x$HAVE_TERMCAP" != "x", -#+AC_DEFINE_UNQUOTED([HAVE_TERMCAP], `test "x$HAVE_TERMCAP" = "x"; echo $?`, -# [Define if termcap.h and library exist]) -# AC_SUBST([TERMCAP_LIBS], [$HAVE_TERMCAP]) -# -diff -ru einfo-1.0.4/configure einfo/configure ---- einfo-1.0.4/configure 2013-10-27 17:42:20.000000000 +0100 -+++ einfo/configure 2013-10-29 18:02:08.405707018 +0100 -@@ -11447,7 +11432,9 @@ - - fi - --$as_echo "#define HAVE_TERMCAP test \"x\$HAVE_TERMCAP\" != \"x\"" >>confdefs.h -+cat >>confdefs.h <<_ACEOF -+#define HAVE_TERMCAP `test "x$HAVE_TERMCAP" = "x"; echo $?` -+_ACEOF - - TERMCAP_LIBS=$HAVE_TERMCAP - -diff -ru einfo-1.0.4/src/libeinfo/libeinfo.c einfo/src/libeinfo/libeinfo.c ---- einfo-1.0.4/src/libeinfo/libeinfo.c 2013-10-27 17:37:25.000000000 +0100 -+++ einfo/src/libeinfo/libeinfo.c 2013-10-29 18:05:38.081876730 +0100 -@@ -50,7 +50,7 @@ - #include <string.h> - #include <strings.h> - #include <syslog.h> --#ifdef HAVE_TERMCAP -+#if HAVE_TERMCAP - # include <termcap.h> - #endif - #include <unistd.h> -@@ -155,7 +155,7 @@ - - /* Termcap buffers and pointers - * Static buffers suck hard, but some termcap implementations require them */ --#ifdef HAVE_TERMCAP -+#if HAVE_TERMCAP - static char termcapbuf[2048]; - static char tcapbuf[512]; - #else -@@ -287,7 +287,7 @@ - } - - /* Fake tgoto call - very crapy, but works for our needs */ --#ifndef HAVE_TERMCAP -+#if !HAVE_TERMCAP - static char * - tgoto(const char *cap, int col, int line) - { -@@ -363,7 +363,7 @@ - const char *bold; - char tmp[100]; - unsigned int i = 0; --#ifdef HAVE_TERMCAP -+#if HAVE_TERMCAP - char *bp; - #endif - -@@ -387,7 +387,7 @@ - if (strcmp(term, "cons25") == 0) - term_is_cons25 = true; - --#ifdef HAVE_TERMCAP -+#if HAVE_TERMCAP - /* Check termcap to see if we can do colour or not */ - if (tgetent(termcapbuf, term) == 1) { - bp = tcapbuf; -@@ -433,7 +433,7 @@ - _me = ME; - if (!_up) - _up = UP; --#ifdef HAVE_TERMCAP -+#if HAVE_TERMCAP - } - - if (!_af || !_ce || !_me || !_md || !_up) { |