Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FL-129: fix perms on /etc/netif.d

  • Loading branch information...
commit b81395ad35600e4e0d62afe9ed2fe45edc2c5d8c 1 parent fd6915b
Daniel Robbins danielrobbins authored
11 sys-apps/openrc/Manifest
View
@@ -1,9 +1,2 @@
-DIST corenetwork-1.2.tar.gz 12839 SHA256 9f4e1f52f42e345a9931270704b61ddb62efe00c169a84b04495516457e04284
-DIST corenetwork-1.3-r1.tar.gz 13391 SHA256 d53f572c8d9c10994f6e149d1937a76e4ffe3ce35b3928cc01cd21912c9cdf93
-DIST corenetwork-1.3-r2.tar.gz 13405 SHA256 5ed666055eb9a3371abd135b8cb7780c2ff61233950d82af411c2b6030b71749 SHA512 a4adab27b375ef0539752ed93a435c65b6e97af32dafd33f45713ede378c16a6460d17d48c1faf1dd3bb3b64e89320b67bf378e14fa7c987c0239e2f5e57057f WHIRLPOOL 74b13be415c10fddfc35e050ce328508f2dcd2d0faa35b3d6c4b7c56b3521e6555b17fa57ad2e0c449cdf187b9f1a28fdf3359d414b8330ff23523dd6a2c3c39
-DIST corenetwork-1.3.1-r1.tar.gz 13514 SHA256 8a6512b9533d02e2b84b0e553069eb026968123993a1c913a1a73d4857c5ab77 SHA512 0114eb3346dd0f6396fcba743e43ea94e735584fd8141ebf01c6a63ca1cf07f74a747e1a3ca421088c124ff2223cf445e8eb37643a9c9179b61f14f1001b3c98 WHIRLPOOL f0b0cd2988830731996fb8abf14eea1baf485d7f0497f0082ebbdd31566c9ee575f8d4e005fd7dc86ab9156c47042e1e67de3c90f93cf3f6e647aa6c3da52d35
-DIST corenetwork-1.3.1.tar.gz 13477 SHA256 4b67d3c762351f12d97ac683625a4e4f1470100ece5f065b24159938c6d9bde5 SHA512 3e24c11748ef3c977bfaab89ad9a3dd9e13df12e7884a646e2a7547d886ff778eee2b5da0356871907636ee72ac6d06f784a49ef412742fda59294fe308146be WHIRLPOOL d881cda7c6ca97d3445ca00ceb077cbb4d89788b5c758a90549e6efd0acc13cd6d5d452b8e861ff15a848155b846b863fe019fea86f3576ef45b0039403c8485
-DIST corenetwork-1.3.tar.gz 13321 SHA256 e77e67d1e143ab977b6a46aa12a0005f177393be4d3fbe825d1a8f05697fb38a
-DIST openrc-funtoo-openrc-0.10.2-r4.tar.gz 214794 SHA256 f134da20ea689b4fff938a47177528ee40bb56c96d40deeffd5c6fdf86da898d SHA512 ff299e99e3ddca625948967a718be929cdf43ce068f8c3b52f8ba5cc3c86a55e8689ea1acb759c8e6ff24fc2e459dfbc865f7b45baaf849fb4f1bb0123b5dccc WHIRLPOOL 5821707a7c4c39a5c10f1d32079abbae1813dd2ee2d92c02aa984e539cc74bc4edb7c5b6e53d75185d2e765cf938b1870f0808b4a6bcab12247592324d874621
-DIST openrc-funtoo-openrc-0.10.tar.gz 214391 SHA256 2aa36866f9e176988619be08a6d78770d30c406f4b1ea55dc912d7ee453b2cf3 SHA512 896b7207748bd7bdfbdc45cad15a914dbfe6a9cb77154cefea725ab44dc63e63ec00a383c5ad9559f0267954f19fb15bb68dadd6c7bfd85545edfd1abcb104e8 WHIRLPOOL 486b8e8a9e39e2dc2ef05062b68b1e226e483572ee87111087ee4a886e2062c01c6b606933c5d04115e8d30c0e8674125d675555736cbdbc662bbfb3d9aaa413
-DIST openrc-funtoo-openrc-0.8.3.tar.gz 203837 SHA256 a410ecff9971ec9d89c8dbfd50fa299da17bde63912e1e9392be53daf22d448c SHA512 c01d80010a4fee8965886e46c72ddb546f2bc18bcb8b95074bb3893802820d1d9a39a85dc9f128d6faf77b473c3cab119055522d07b7c1d037a6c26a89d1ba6f WHIRLPOOL 6ce229b13d69b3c6010e5825c91a80d384db13667d8d1d316be5731f2b6a46843b68141d6b33fd2c3c6420a279e5b611de329efbddb91abb496aac736502e447
+DIST corenetwork-1.3.1-r1.tar.gz 13514 RMD160 1cadcf477526505caa38988aaa1f23fde0125b16 SHA1 4720fc0b01f673627331d984b48e6f64c74120f8 SHA256 8a6512b9533d02e2b84b0e553069eb026968123993a1c913a1a73d4857c5ab77
+DIST openrc-funtoo-openrc-0.10.2-r4.tar.gz 214794 RMD160 7377ac088829b5e914b02be22880dd04d100b7ee SHA1 6993d1e349643f30e3a040df871fa703e0f4c45c SHA256 f134da20ea689b4fff938a47177528ee40bb56c96d40deeffd5c6fdf86da898d
10 sys-apps/openrc/openrc-0.10.2-r4.ebuild → sys-apps/openrc/openrc-0.10.2-r6.ebuild
View
@@ -28,7 +28,7 @@ GITHUB_REPO="${PN}"
GITHUB_USER="funtoo"
GITHUB_TAG="funtoo-openrc-0.10.2-r4"
-NETV="1.3.1"
+NETV="1.3.1-r1"
GITHUB_REPO_CN="corenetwork"
GITHUB_TAG_CN="$NETV"
@@ -159,9 +159,9 @@ src_install() {
doexe init.d/{netif.tmpl,netif.lo} || die
cp -a netif.d ${D}/etc || die
chown -R root:root ${D}/etc/netif.d || die
- chmod -R 0644 ${D}/etc/netif.d || die
+ chmod 0755 ${D}/etc/netif.d || die
+ chmod -R 0644 ${D}/etc/netif.d/* || die
ln -s /etc/init.d/netif.lo ${D}/usr/share/openrc/runlevels/sysinit/netif.lo || die
-
}
add_init() {
@@ -220,11 +220,13 @@ pkg_postinst() {
done
done
+ chmod +x ${ROOT}/etc/netif.d
+
# OTHER STUFF
# ===========
# update the dependency tree bug #224171
- [[ "${ROOT}" = "/" ]] && "${ROOT}/libexec"/rc/bin/rc-depend -u
+ [[ "${ROOT}" = "/" ]] && "${ROOT}/$(get_libdir)"/rc/bin/rc-depend -u
elog "You should now update all files in /etc, using etc-update"
elog "or equivalent before rebooting."
240 sys-apps/openrc/openrc-0.10.2.ebuild
View
@@ -1,240 +0,0 @@
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit eutils flag-o-matic multilib pam toolchain-funcs
-
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
-HOMEPAGE="http://roy.marples.name/openrc"
-PROVIDE="virtual/baselayout"
-RESTRICT="mirror"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="~*"
-IUSE="debug elibc_glibc ncurses pam selinux static-libs unicode kernel_linux kernel_FreeBSD"
-
-RDEPEND="kernel_linux? ( >=sys-apps/sysvinit-2.86-r11 )
- kernel_FreeBSD? ( virtual/init sys-process/fuser-bsd )
- ncurses? ( sys-libs/ncurses )
- pam? ( virtual/pam )
- >=sys-apps/baselayout-2.2
- >=sys-fs/udev-135
- sys-apps/iproute2"
-
-DEPEND="ncurses? ( sys-libs/ncurses ) pam? ( virtual/pam ) virtual/os-headers"
-
-GITHUB_REPO="${PN}"
-GITHUB_USER="funtoo"
-GITHUB_TAG="funtoo-openrc-0.10"
-
-NETV="1.3-r2"
-GITHUB_REPO_CN="corenetwork"
-GITHUB_TAG_CN="$NETV"
-
-SRC_URI="
- https://www.github.com/${GITHUB_USER}/${GITHUB_REPO}/tarball/${GITHUB_TAG} -> ${PN}-${GITHUB_TAG}.tar.gz
- https://www.github.com/${GITHUB_USER}/${GITHUB_REPO_CN}/tarball/${GITHUB_TAG_CN} -> corenetwork-${NETV}.tar.gz
- "
-
-make_args() {
- unset LIBDIR #266688
-
- MAKE_ARGS="${MAKE_ARGS} LIBNAME=$(get_libdir) LIBEXECDIR=/$(get_libdir)/rc"
-
- local brand="Unknown"
- if use kernel_linux ; then
- MAKE_ARGS="${MAKE_ARGS} OS=Linux"
- brand="Linux"
- elif use kernel_FreeBSD ; then
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
- brand="FreeBSD"
- fi
- if use selinux; then
- MAKE_ARGS="${MAKE_ARGS} MKSELINUX=yes"
- fi
- export BRANDING="Funtoo ${brand}"
- if ! use static-libs; then
- MAKE_ARGS="${MAKE_ARGS} MKSTATICLIBS=no"
- fi
-}
-
-pkg_setup() {
- export DEBUG=$(usev debug)
- export MKPAM=$(usev pam)
- export MKTERMCAP=$(usev ncurses)
-}
-
-src_unpack() {
- unpack $A
- # rename github directories to the names we're expecting:
- local old=${WORKDIR}/${GITHUB_USER}-${PN}-*
- mv $old "${WORKDIR}/${P}" || die "move fail 1"
- old="${WORKDIR}/${GITHUB_USER}-corenetwork-*"
- mv $old "${WORKDIR}/corenetwork-${NETV}" || die "move fail 2"
-}
-
-src_prepare() {
- sed -i 's:0444:0644:' mk/sys.mk || die
- sed -i "/^DIR/s:/openrc:/${PF}:" doc/Makefile || die #241342
-
- if [[ ${PV} == "9999" ]] ; then
- local ver="git-${EGIT_VERSION:0:6}"
- sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
- fi
-}
-src_compile() {
- make_args
-
- tc-export CC AR RANLIB
- emake ${MAKE_ARGS}
-}
-
-# set_config <file> <option name> <yes value> <no value> test
-# a value of "#" will just comment out the option
-set_config() {
- local file="${D}/$1" var=$2 val com
- eval "${@:5}" && val=$3 || val=$4
- [[ ${val} == "#" ]] && com="#" && val='\2'
- sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}"
-}
-
-set_config_yes_no() {
- set_config "$1" "$2" YES NO "${@:3}"
-}
-
-src_install() {
- make_args
- emake ${MAKE_ARGS} DESTDIR="${D}" install
-
- # move the shared libs back to /usr so ldscript can install
- # more of a minimal set of files
- # disabled for now due to #270646
- #mv "${D}"/$(get_libdir)/lib{einfo,rc}* "${D}"/usr/$(get_libdir)/ || die
- #gen_usr_ldscript -a einfo rc
- gen_usr_ldscript libeinfo.so
- gen_usr_ldscript librc.so
-
- if ! use kernel_linux; then
- keepdir /$(get_libdir)/rc/init.d
- fi
- keepdir /$(get_libdir)/rc/tmp
-
- # Backup our default runlevels
- dodir /usr/share/"${PN}"
- cp -PR "${D}"/etc/runlevels "${D}"/usr/share/${PN} || die
- rm -rf "${D}"/etc/runlevels
-
- # Setup unicode defaults for silly unicode users
- set_config_yes_no /etc/rc.conf unicode use unicode
-
- # Cater to the norm
- set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')'
-
- # On HPPA, do not run consolefont by default (bug #222889)
- if use hppa; then
- rm -f "${D}"/usr/share/openrc/runlevels/boot/consolefont
- fi
-
- # Support for logfile rotation
- insinto /etc/logrotate.d
- newins "${FILESDIR}"/openrc.logrotate openrc
-
- # install the gentoo pam.d file
- newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
-
- # Remove upstream networking parts:
-
- for pat in ${D}/etc/init.d/{net.lo,network,staticroute} \
- ${D}/usr/share/openrc/runlevels/boot/{net.lo,network,staticroute} \
- ${D}/etc/conf.d/{net,network,staticroute}; do
- rm -f "$pat" || die "Couldn't remove upstream $pat from source."
- done
-
- # Install funtoo networking parts:
-
- cd ${WORKDIR}/corenetwork-${NETV} || die
- dodoc docs/index.rst || die
- exeinto /etc/init.d || die
- doexe init.d/{netif.tmpl,netif.lo} || die
- cp -a netif.d ${D}/etc || die
- chown -R root:root ${D}/etc/netif.d || die
- chmod -R 0644 ${D}/etc/netif.d || die
- ln -s /etc/init.d/netif.lo ${D}/usr/share/openrc/runlevels/sysinit/netif.lo || die
-
-}
-
-add_init() {
- local runl=$1
- shift
- if [ ! -e ${ROOT}/etc/runlevels/${runl} ]
- then
- install -d -m0755 ${ROOT}/etc/runlevels/${runl}
- fi
- for initd in $*
- do
- [[ -e ${ROOT}/etc/runlevels/${runl}/${initd} ]] && continue
- elog "Auto-adding '${initd}' service to your ${runl} runlevel"
- ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/${runl}/${initd}
- done
-}
-
-pkg_postinst() {
- local runl
- install -d -m0755 ${ROOT}/etc/runlevels
- local runldir="${ROOT}usr/share/openrc/runlevels"
-
- # Remove old baselayout links
- rm -f "${ROOT}"/etc/runlevels/boot/{check{fs,root},rmnologin}
- rm -f "${ROOT}"/etc/init.d/{depscan,runscript}.sh
- rm -f "${ROOT}"/etc/runlevels/boot/netif.lo
-
- # CREATE RUNLEVEL DIRECTORIES
- # ===========================
-
- # To ensure proper system operation, this portion of the script ensures that
- # all of OpenRC's default initscripts in all runlevels are properly
- # installed.
-
- for runl in $( cd "$runldir"; echo * )
- do
- einfo "Processing $runl..."
- einfo "Ensuring runlevel $runl has all required scripts..."
- add_init $runl $( cd "$runldir/$runl"; echo * )
- done
-
- # Rather than try to migrate everyone using complex scripts, simply print
- # names of initscripts that are in the user's runlevels but not provided by
- # OpenRC. This loop can be upgraded to look for particular scripts that
- # might have come from baselayout.
-
- for runl in $( cd ${ROOT}/etc/runlevels; echo * )
- do
- [ ! -d ${runldir}/${runl} ] && continue
- for init in $( cd "$runldir/$runl"; echo * )
- do
- if [ -e ${ROOT}/etc/runlevels/${runl}/${init} ] && [ ! -e ${runldir}/${runl}/${init} ]
- then
- echo "Initscript ${init} exists in runlevel ${runl} but not in OpenRC."
- fi
- done
- done
-
- # OTHER STUFF
- # ===========
-
- # update the dependency tree bug #224171
- [[ "${ROOT}" = "/" ]] && "${ROOT}/libexec"/rc/bin/rc-depend -u
-
- elog "You should now update all files in /etc, using etc-update"
- elog "or equivalent before rebooting."
- elog
-
- if path_exists -o "${ROOT}"/etc/conf.d/local.{start,stop} ; then
- ewarn "/etc/conf.d/local.{start,stop} are deprecated. Please convert"
- ewarn "your files to /etc/conf.d/local and delete the files."
- fi
-
- ewarn "Make sure that correct symlink exist"
- ewarn "Re-establish it by ln -s /etc/init.d/netif.tmpl /etc/init.d/netif.ethX"
-}
192 sys-apps/openrc/openrc-0.8.3-r3.ebuild
View
@@ -1,192 +0,0 @@
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="2"
-
-inherit eutils flag-o-matic multilib toolchain-funcs
-
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
-HOMEPAGE="http://roy.marples.name/openrc"
-PROVIDE="virtual/baselayout"
-RESTRICT="nomirror"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="x86 amd64 sparc"
-IUSE="debug ncurses pam unicode kernel_linux kernel_FreeBSD"
-
-RDEPEND="kernel_linux? ( >=sys-apps/sysvinit-2.86-r11 )
- kernel_FreeBSD? ( virtual/init sys-process/fuser-bsd )
- ncurses? ( sys-libs/ncurses )
- pam? ( virtual/pam )
- >=sys-apps/baselayout-2.1
- >=sys-fs/udev-135
- sys-apps/iproute2"
-
-DEPEND="ncurses? ( sys-libs/ncurses ) pam? ( virtual/pam ) virtual/os-headers"
-
-GITHUB_REPO="${PN}"
-GITHUB_USER="funtoo"
-GITHUB_TAG="funtoo-openrc-0.8.3"
-
-NETV="1.2"
-GITHUB_REPO_CN="corenetwork"
-GITHUB_TAG_CN="$NETV"
-
-SRC_URI="
- http://www.funtoo.org/distfiles/${PN}-${GITHUB_TAG}.tar.gz
- http://www.funtoo.org/distfiles/corenetwork-${GITHUB_TAG_CN}.tar.gz
- "
-
-pkg_setup() {
- LIBDIR="lib"
- [ "${SYMLINK_LIB}" = "yes" ] && LIBDIR=$(get_abi_LIBDIR "${DEFAULT_ABI}")
-
- MAKE_ARGS="${MAKE_ARGS} LIBNAME=${LIBDIR}"
-
- local brand="Unknown"
- if use kernel_linux ; then
- MAKE_ARGS="${MAKE_ARGS} OS=Linux"
- brand="Linux"
- elif use kernel_FreeBSD ; then
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
- brand="FreeBSD"
- fi
- export BRANDING="Funtoo ${brand}"
-
- export DEBUG=$(usev debug)
- export MKPAM=$(usev pam)
- export MKTERMCAP=$(usev ncurses)
-}
-
-pre_src_prepare() {
- # rename github directories to the names we're expecting:
- local old=${WORKDIR}/${GITHUB_USER}-${PN}-*
- mv $old "${WORKDIR}/${P}" || die "move fail 1"
- old="${WORKDIR}/${GITHUB_USER}-corenetwork-*"
- mv $old "${WORKDIR}/corenetwork-${NETV}" || die "move fail 2"
-}
-
-src_compile() {
- cd $S
- # catch people running `ebuild` w/out setup
- if [[ -z ${MAKE_ARGS} ]] ; then
- die "Your MAKE_ARGS is empty ... are you running 'ebuild' but forgot to execute 'setup' ?"
- fi
-
- #sed -i "/^VERSION[[:space:]]*=/s:=.*:=${PV}:" Makefile
-
- tc-export CC AR RANLIB
- echo emake ${MAKE_ARGS}
- emake ${MAKE_ARGS} || die "emake ${MAKE_ARGS} failed"
-}
-
-src_install() {
- emake ${MAKE_ARGS} DESTDIR="${D}" install || die "make install failed"
- gen_usr_ldscript libeinfo.so
- gen_usr_ldscript librc.so
-
- dodir /etc/runlevels/default
-
- keepdir /"${LIBDIR}"/rc/init.d
- keepdir /"${LIBDIR}"/rc/tmp
-
- # Backup our default runlevels
- dodir /usr/share/"${PN}"
- mv "${D}/etc/runlevels" "${D}/usr/share/${PN}"
-
- # Setup unicode defaults for silly unicode users
- use unicode && sed -i -e '/^.*unicode=/s:^.*"NO":unicode="YES":' "${D}"/etc/rc.conf
-
- # Cater to the norm
- (use x86 || use amd64) && sed -i -e '/^.*windowkeys=/s:^.*"NO":windowkeys="YES":' "${D}"/etc/conf.d/keymaps
-
- # Remove upstream networking parts:
-
- for pat in ${D}/etc/init.d/{net.lo,network,staticroute} \
- ${D}/usr/share/openrc/runlevels/boot/{net.lo,network,staticroute} \
- ${D}/etc/conf.d/{net,network,staticroute}; do
- rm -f "$pat" || die "Couldn't remove upstream $pat from source."
- done
-
- # Install funtoo networking parts:
-
- cd ${WORKDIR}/corenetwork-${NETV} || die
- dodoc docs/index.rst || die
- exeinto /etc/init.d || die
- doexe init.d/{netif.tmpl,netif.lo} || die
- cp -a netif.d ${D}/etc || die
- chown -R root:root ${D}/etc/netif.d || die
- chmod -R 0644 ${D}/etc/netif.d || die
- ln -s /etc/init.d/netif.lo ${D}/usr/share/openrc/runlevels/sysinit/netif.lo || die
-}
-
-add_init() {
- local runl=$1
- shift
- if [ ! -e ${ROOT}/etc/runlevels/${runl} ]
- then
- install -d -m0755 ${ROOT}/etc/runlevels/${runl}
- fi
- for initd in $*
- do
- [[ -e ${ROOT}/etc/runlevels/${runl}/${initd} ]] && continue
- elog "Auto-adding '${initd}' service to your ${runl} runlevel"
- ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/${runl}/${initd}
- done
-}
-
-pkg_postinst() {
- local runl
- install -d -m0755 ${ROOT}/etc/runlevels
- local runldir="${ROOT}usr/share/openrc/runlevels"
-
- # Remove old baselayout links
- rm -f "${ROOT}"/etc/runlevels/boot/{check{fs,root},rmnologin}
- rm -f "${ROOT}"/etc/runlevels/boot/netif.lo
-
- # CREATE RUNLEVEL DIRECTORIES
- # ===========================
-
- # To ensure proper system operation, this portion of the script ensures that
- # all of OpenRC's default initscripts in all runlevels are properly
- # installed.
-
- for runl in $( cd "$runldir"; echo * )
- do
- einfo "Processing $runl..."
- einfo "Ensuring runlevel $runl has all required scripts..."
- add_init $runl $( cd "$runldir/$runl"; echo * )
- done
-
- # Rather than try to migrate everyone using complex scripts, simply print
- # names of initscripts that are in the user's runlevels but not provided by
- # OpenRC. This loop can be upgraded to look for particular scripts that
- # might have come from baselayout.
-
- for runl in $( cd ${ROOT}/etc/runlevels; echo * )
- do
- [ ! -d ${runldir}/${runl} ] && continue
- for init in $( cd "$runldir/$runl"; echo * )
- do
- if [ -e ${ROOT}/etc/runlevels/${runl}/${init} ] && [ ! -e ${runldir}/${runl}/${init} ]
- then
- echo "Initscript ${init} exists in runlevel ${runl} but not in OpenRC."
- fi
- done
- done
-
- # OTHER STUFF
- # ===========
-
- # update the dependency tree bug #224171
- [[ "${ROOT}" = "/" ]] && "${ROOT}/libexec"/rc/bin/rc-depend -u
-
- elog "You should now update all files in /etc, using etc-update"
- elog "or equivalent before rebooting."
- elog
-
- if path_exists -o "${ROOT}"/etc/conf.d/local.{start,stop} ; then
- ewarn "/etc/conf.d/local.{start,stop} are deprecated. Please convert"
- ewarn "your files to /etc/conf.d/local and delete the files."
- fi
-}
197 sys-apps/openrc/openrc-0.8.3-r4.ebuild
View
@@ -1,197 +0,0 @@
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="2"
-
-inherit eutils flag-o-matic multilib toolchain-funcs
-
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
-HOMEPAGE="http://roy.marples.name/openrc"
-PROVIDE="virtual/baselayout"
-RESTRICT="nomirror"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="*"
-IUSE="debug ncurses pam unicode kernel_linux kernel_FreeBSD"
-
-RDEPEND="kernel_linux? ( >=sys-apps/sysvinit-2.86-r11 )
- kernel_FreeBSD? ( virtual/init sys-process/fuser-bsd )
- ncurses? ( sys-libs/ncurses )
- pam? ( virtual/pam )
- >=sys-apps/baselayout-2.1
- >=sys-fs/udev-135
- sys-apps/iproute2"
-
-DEPEND="ncurses? ( sys-libs/ncurses ) pam? ( virtual/pam ) virtual/os-headers"
-
-GITHUB_REPO="${PN}"
-GITHUB_USER="funtoo"
-GITHUB_TAG="funtoo-openrc-0.8.3"
-
-NETV="1.2"
-GITHUB_REPO_CN="corenetwork"
-GITHUB_TAG_CN="$NETV"
-
-SRC_URI="
- https://www.github.com/${GITHUB_USER}/${GITHUB_REPO}/tarball/${GITHUB_TAG} -> ${PN}-${GITHUB_TAG}.tar.gz
- http://www.funtoo.org/distfiles/${PN}-${GITHUB_TAG}.tar.gz
- http://www.funtoo.org/distfiles/corenetwork-${GITHUB_TAG_CN}.tar.gz
- "
-
-pkg_setup() {
- LIBDIR="lib"
- [ "${SYMLINK_LIB}" = "yes" ] && LIBDIR=$(get_abi_LIBDIR "${DEFAULT_ABI}")
-
- MAKE_ARGS="${MAKE_ARGS} LIBNAME=${LIBDIR}"
-
- local brand="Unknown"
- if use kernel_linux ; then
- MAKE_ARGS="${MAKE_ARGS} OS=Linux"
- brand="Linux"
- elif use kernel_FreeBSD ; then
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
- brand="FreeBSD"
- fi
- export BRANDING="Funtoo ${brand}"
-
- export DEBUG=$(usev debug)
- export MKPAM=$(usev pam)
- export MKTERMCAP=$(usev ncurses)
-}
-
-pre_src_prepare() {
- # rename github directories to the names we're expecting:
- local old=${WORKDIR}/${GITHUB_USER}-${PN}-*
- mv $old "${WORKDIR}/${P}" || die "move fail 1"
- old="${WORKDIR}/${GITHUB_USER}-corenetwork-*"
- mv $old "${WORKDIR}/corenetwork-${NETV}" || die "move fail 2"
-}
-
-src_compile() {
- cd $S
- # catch people running `ebuild` w/out setup
- if [[ -z ${MAKE_ARGS} ]] ; then
- die "Your MAKE_ARGS is empty ... are you running 'ebuild' but forgot to execute 'setup' ?"
- fi
-
- #sed -i "/^VERSION[[:space:]]*=/s:=.*:=${PV}:" Makefile
-
- tc-export CC AR RANLIB
- echo emake ${MAKE_ARGS}
- emake ${MAKE_ARGS} || die "emake ${MAKE_ARGS} failed"
-}
-
-src_install() {
- emake ${MAKE_ARGS} DESTDIR="${D}" install || die "make install failed"
- gen_usr_ldscript libeinfo.so
- gen_usr_ldscript librc.so
-
- dodir /etc/runlevels/default
-
- keepdir /"${LIBDIR}"/rc/init.d
- keepdir /"${LIBDIR}"/rc/tmp
-
- # Backup our default runlevels
- dodir /usr/share/"${PN}"
- mv "${D}/etc/runlevels" "${D}/usr/share/${PN}"
-
- # Setup unicode defaults for silly unicode users
- use unicode && sed -i -e '/^.*unicode=/s:^.*"NO":unicode="YES":' "${D}"/etc/rc.conf
-
- # Cater to the norm
- (use x86 || use amd64) && sed -i -e '/^.*windowkeys=/s:^.*"NO":windowkeys="YES":' "${D}"/etc/conf.d/keymaps
-
- # Remove upstream networking parts:
-
- for pat in ${D}/etc/init.d/{net.lo,network,staticroute} \
- ${D}/usr/share/openrc/runlevels/boot/{net.lo,network,staticroute} \
- ${D}/etc/conf.d/{net,network,staticroute}; do
- rm -f "$pat" || die "Couldn't remove upstream $pat from source."
- done
-
- # Install funtoo networking parts:
-
- cd ${WORKDIR}/corenetwork-${NETV} || die
- dodoc docs/index.rst || die
- exeinto /etc/init.d || die
- doexe init.d/{netif.tmpl,netif.lo} || die
- cp -a netif.d ${D}/etc || die
- chown -R root:root ${D}/etc/netif.d || die
- chmod -R 0644 ${D}/etc/netif.d || die
- ln -s /etc/init.d/netif.lo ${D}/usr/share/openrc/runlevels/sysinit/netif.lo || die
-
- # Install gentoo pam.d file:
-
- newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
-}
-
-add_init() {
- local runl=$1
- shift
- if [ ! -e ${ROOT}/etc/runlevels/${runl} ]
- then
- install -d -m0755 ${ROOT}/etc/runlevels/${runl}
- fi
- for initd in $*
- do
- [[ -e ${ROOT}/etc/runlevels/${runl}/${initd} ]] && continue
- elog "Auto-adding '${initd}' service to your ${runl} runlevel"
- ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/${runl}/${initd}
- done
-}
-
-pkg_postinst() {
- local runl
- install -d -m0755 ${ROOT}/etc/runlevels
- local runldir="${ROOT}usr/share/openrc/runlevels"
-
- # Remove old baselayout links
- rm -f "${ROOT}"/etc/runlevels/boot/{check{fs,root},rmnologin}
- rm -f "${ROOT}"/etc/runlevels/boot/netif.lo
-
- # CREATE RUNLEVEL DIRECTORIES
- # ===========================
-
- # To ensure proper system operation, this portion of the script ensures that
- # all of OpenRC's default initscripts in all runlevels are properly
- # installed.
-
- for runl in $( cd "$runldir"; echo * )
- do
- einfo "Processing $runl..."
- einfo "Ensuring runlevel $runl has all required scripts..."
- add_init $runl $( cd "$runldir/$runl"; echo * )
- done
-
- # Rather than try to migrate everyone using complex scripts, simply print
- # names of initscripts that are in the user's runlevels but not provided by
- # OpenRC. This loop can be upgraded to look for particular scripts that
- # might have come from baselayout.
-
- for runl in $( cd ${ROOT}/etc/runlevels; echo * )
- do
- [ ! -d ${runldir}/${runl} ] && continue
- for init in $( cd "$runldir/$runl"; echo * )
- do
- if [ -e ${ROOT}/etc/runlevels/${runl}/${init} ] && [ ! -e ${runldir}/${runl}/${init} ]
- then
- echo "Initscript ${init} exists in runlevel ${runl} but not in OpenRC."
- fi
- done
- done
-
- # OTHER STUFF
- # ===========
-
- # update the dependency tree bug #224171
- [[ "${ROOT}" = "/" ]] && "${ROOT}/libexec"/rc/bin/rc-depend -u
-
- elog "You should now update all files in /etc, using etc-update"
- elog "or equivalent before rebooting."
- elog
-
- if path_exists -o "${ROOT}"/etc/conf.d/local.{start,stop} ; then
- ewarn "/etc/conf.d/local.{start,stop} are deprecated. Please convert"
- ewarn "your files to /etc/conf.d/local and delete the files."
- fi
-}
199 sys-apps/openrc/openrc-0.8.3-r5.ebuild
View
@@ -1,199 +0,0 @@
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="2"
-
-inherit eutils flag-o-matic multilib toolchain-funcs
-
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
-HOMEPAGE="http://roy.marples.name/openrc"
-PROVIDE="virtual/baselayout"
-RESTRICT="nomirror"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="x86 amd64 sparc"
-IUSE="debug ncurses pam unicode kernel_linux kernel_FreeBSD"
-
-RDEPEND="kernel_linux? ( >=sys-apps/sysvinit-2.86-r11 )
- kernel_FreeBSD? ( virtual/init sys-process/fuser-bsd )
- ncurses? ( sys-libs/ncurses )
- pam? ( virtual/pam )
- >=sys-apps/baselayout-2.1
- >=sys-fs/udev-135
- sys-apps/iproute2"
-
-DEPEND="ncurses? ( sys-libs/ncurses ) pam? ( virtual/pam ) virtual/os-headers"
-
-GITHUB_REPO="${PN}"
-GITHUB_USER="funtoo"
-GITHUB_TAG="funtoo-openrc-0.8.3"
-
-NETV="1.3"
-GITHUB_REPO_CN="corenetwork"
-GITHUB_TAG_CN="$NETV"
-
-SRC_URI="
- https://www.github.com/${GITHUB_USER}/${GITHUB_REPO}/tarball/${GITHUB_TAG} -> ${PN}-${GITHUB_TAG}.tar.gz
- https://www.github.com/${GITHUB_USER}/${GITHUB_REPO_CN}/tarball/${GITHUB_TAG_CN} -> corenetwork-${NETV}.tar.gz
- "
-
-pkg_setup() {
- LIBDIR="lib"
- [ "${SYMLINK_LIB}" = "yes" ] && LIBDIR=$(get_abi_LIBDIR "${DEFAULT_ABI}")
-
- MAKE_ARGS="${MAKE_ARGS} LIBNAME=${LIBDIR}"
-
- local brand="Unknown"
- if use kernel_linux ; then
- MAKE_ARGS="${MAKE_ARGS} OS=Linux"
- brand="Linux"
- elif use kernel_FreeBSD ; then
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
- brand="FreeBSD"
- fi
- export BRANDING="Funtoo ${brand}"
-
- export DEBUG=$(usev debug)
- export MKPAM=$(usev pam)
- export MKTERMCAP=$(usev ncurses)
-}
-
-pre_src_prepare() {
- # rename github directories to the names we're expecting:
- local old=${WORKDIR}/${GITHUB_USER}-${PN}-*
- mv $old "${WORKDIR}/${P}" || die "move fail 1"
- old="${WORKDIR}/${GITHUB_USER}-corenetwork-*"
- mv $old "${WORKDIR}/corenetwork-${NETV}" || die "move fail 2"
-}
-
-src_compile() {
- cd $S
- # catch people running `ebuild` w/out setup
- if [[ -z ${MAKE_ARGS} ]] ; then
- die "Your MAKE_ARGS is empty ... are you running 'ebuild' but forgot to execute 'setup' ?"
- fi
-
- #sed -i "/^VERSION[[:space:]]*=/s:=.*:=${PV}:" Makefile
-
- tc-export CC AR RANLIB
- echo emake ${MAKE_ARGS}
- emake ${MAKE_ARGS} || die "emake ${MAKE_ARGS} failed"
-}
-
-src_install() {
- emake ${MAKE_ARGS} DESTDIR="${D}" install || die "make install failed"
- gen_usr_ldscript libeinfo.so
- gen_usr_ldscript librc.so
-
- dodir /etc/runlevels/default
-
- keepdir /"${LIBDIR}"/rc/init.d
- keepdir /"${LIBDIR}"/rc/tmp
-
- # Backup our default runlevels
- dodir /usr/share/"${PN}"
- mv "${D}/etc/runlevels" "${D}/usr/share/${PN}"
-
- # Setup unicode defaults for silly unicode users
- use unicode && sed -i -e '/^.*unicode=/s:^.*"NO":unicode="YES":' "${D}"/etc/rc.conf
-
- # Cater to the norm
- (use x86 || use amd64) && sed -i -e '/^.*windowkeys=/s:^.*"NO":windowkeys="YES":' "${D}"/etc/conf.d/keymaps
-
- # Remove upstream networking parts:
-
- for pat in ${D}/etc/init.d/{net.lo,network,staticroute} \
- ${D}/usr/share/openrc/runlevels/boot/{net.lo,network,staticroute} \
- ${D}/etc/conf.d/{net,network,staticroute}; do
- rm -f "$pat" || die "Couldn't remove upstream $pat from source."
- done
-
- # Install funtoo networking parts:
-
- cd ${WORKDIR}/corenetwork-${NETV} || die
- dodoc docs/index.rst || die
- exeinto /etc/init.d || die
- doexe init.d/{netif.tmpl,netif.lo} || die
- cp -a netif.d ${D}/etc || die
- chown -R root:root ${D}/etc/netif.d || die
- chmod -R 0644 ${D}/etc/netif.d || die
- ln -s /etc/init.d/netif.lo ${D}/usr/share/openrc/runlevels/sysinit/netif.lo || die
-
- # Install gentoo pam.d file:
-
- newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
-}
-
-add_init() {
- local runl=$1
- shift
- if [ ! -e ${ROOT}/etc/runlevels/${runl} ]
- then
- install -d -m0755 ${ROOT}/etc/runlevels/${runl}
- fi
- for initd in $*
- do
- [[ -e ${ROOT}/etc/runlevels/${runl}/${initd} ]] && continue
- elog "Auto-adding '${initd}' service to your ${runl} runlevel"
- ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/${runl}/${initd}
- done
-}
-
-pkg_postinst() {
- local runl
- install -d -m0755 ${ROOT}/etc/runlevels
- local runldir="${ROOT}usr/share/openrc/runlevels"
-
- # Remove old baselayout links
- rm -f "${ROOT}"/etc/runlevels/boot/{check{fs,root},rmnologin}
- rm -f "${ROOT}"/etc/runlevels/boot/netif.lo
-
- # CREATE RUNLEVEL DIRECTORIES
- # ===========================
-
- # To ensure proper system operation, this portion of the script ensures that
- # all of OpenRC's default initscripts in all runlevels are properly
- # installed.
-
- for runl in $( cd "$runldir"; echo * )
- do
- einfo "Processing $runl..."
- einfo "Ensuring runlevel $runl has all required scripts..."
- add_init $runl $( cd "$runldir/$runl"; echo * )
- done
-
- # Rather than try to migrate everyone using complex scripts, simply print
- # names of initscripts that are in the user's runlevels but not provided by
- # OpenRC. This loop can be upgraded to look for particular scripts that
- # might have come from baselayout.
-
- for runl in $( cd ${ROOT}/etc/runlevels; echo * )
- do
- [ ! -d ${runldir}/${runl} ] && continue
- for init in $( cd "$runldir/$runl"; echo * )
- do
- if [ -e ${ROOT}/etc/runlevels/${runl}/${init} ] && [ ! -e ${runldir}/${runl}/${init} ]
- then
- echo "Initscript ${init} exists in runlevel ${runl} but not in OpenRC."
- fi
- done
- done
-
- # OTHER STUFF
- # ===========
-
- # update the dependency tree bug #224171
- [[ "${ROOT}" = "/" ]] && "${ROOT}/libexec"/rc/bin/rc-depend -u
-
- elog "You should now update all files in /etc, using etc-update"
- elog "or equivalent before rebooting."
- elog
-
- if path_exists -o "${ROOT}"/etc/conf.d/local.{start,stop} ; then
- ewarn "/etc/conf.d/local.{start,stop} are deprecated. Please convert"
- ewarn "your files to /etc/conf.d/local and delete the files."
- fi
-
- ewarn "Make sure that correct symlink exist"
- ewarn "Re-establish it by ln -s /etc/init.d/netif.tmpl /etc/init.d/netif.ethX"
-}
199 sys-apps/openrc/openrc-0.8.3-r6.ebuild
View
@@ -1,199 +0,0 @@
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="2"
-
-inherit eutils flag-o-matic multilib toolchain-funcs
-
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
-HOMEPAGE="http://roy.marples.name/openrc"
-PROVIDE="virtual/baselayout"
-RESTRICT="mirror"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="~*"
-IUSE="debug ncurses pam unicode kernel_linux kernel_FreeBSD"
-
-RDEPEND="kernel_linux? ( >=sys-apps/sysvinit-2.86-r11 )
- kernel_FreeBSD? ( virtual/init sys-process/fuser-bsd )
- ncurses? ( sys-libs/ncurses )
- pam? ( virtual/pam )
- >=sys-apps/baselayout-2.1
- >=sys-fs/udev-135
- sys-apps/iproute2"
-
-DEPEND="ncurses? ( sys-libs/ncurses ) pam? ( virtual/pam ) virtual/os-headers"
-
-GITHUB_REPO="${PN}"
-GITHUB_USER="funtoo"
-GITHUB_TAG="funtoo-openrc-0.8.3"
-
-NETV="1.3-r1"
-GITHUB_REPO_CN="corenetwork"
-GITHUB_TAG_CN="$NETV"
-
-SRC_URI="
- https://www.github.com/${GITHUB_USER}/${GITHUB_REPO}/tarball/${GITHUB_TAG} -> ${PN}-${GITHUB_TAG}.tar.gz
- https://www.github.com/${GITHUB_USER}/${GITHUB_REPO_CN}/tarball/${GITHUB_TAG_CN} -> corenetwork-${NETV}.tar.gz
- "
-
-pkg_setup() {
- LIBDIR="lib"
- [ "${SYMLINK_LIB}" = "yes" ] && LIBDIR=$(get_abi_LIBDIR "${DEFAULT_ABI}")
-
- MAKE_ARGS="${MAKE_ARGS} LIBNAME=${LIBDIR}"
-
- local brand="Unknown"
- if use kernel_linux ; then
- MAKE_ARGS="${MAKE_ARGS} OS=Linux"
- brand="Linux"
- elif use kernel_FreeBSD ; then
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
- brand="FreeBSD"
- fi
- export BRANDING="Funtoo ${brand}"
-
- export DEBUG=$(usev debug)
- export MKPAM=$(usev pam)
- export MKTERMCAP=$(usev ncurses)
-}
-
-pre_src_prepare() {
- # rename github directories to the names we're expecting:
- local old=${WORKDIR}/${GITHUB_USER}-${PN}-*
- mv $old "${WORKDIR}/${P}" || die "move fail 1"
- old="${WORKDIR}/${GITHUB_USER}-corenetwork-*"
- mv $old "${WORKDIR}/corenetwork-${NETV}" || die "move fail 2"
-}
-
-src_compile() {
- cd $S
- # catch people running `ebuild` w/out setup
- if [[ -z ${MAKE_ARGS} ]] ; then
- die "Your MAKE_ARGS is empty ... are you running 'ebuild' but forgot to execute 'setup' ?"
- fi
-
- #sed -i "/^VERSION[[:space:]]*=/s:=.*:=${PV}:" Makefile
-
- tc-export CC AR RANLIB
- echo emake ${MAKE_ARGS}
- emake ${MAKE_ARGS} || die "emake ${MAKE_ARGS} failed"
-}
-
-src_install() {
- emake ${MAKE_ARGS} DESTDIR="${D}" install || die "make install failed"
- gen_usr_ldscript libeinfo.so
- gen_usr_ldscript librc.so
-
- dodir /etc/runlevels/default
-
- keepdir /"${LIBDIR}"/rc/init.d
- keepdir /"${LIBDIR}"/rc/tmp
-
- # Backup our default runlevels
- dodir /usr/share/"${PN}"
- mv "${D}/etc/runlevels" "${D}/usr/share/${PN}"
-
- # Setup unicode defaults for silly unicode users
- use unicode && sed -i -e '/^.*unicode=/s:^.*"NO":unicode="YES":' "${D}"/etc/rc.conf
-
- # Cater to the norm
- (use x86 || use amd64) && sed -i -e '/^.*windowkeys=/s:^.*"NO":windowkeys="YES":' "${D}"/etc/conf.d/keymaps
-
- # Remove upstream networking parts:
-
- for pat in ${D}/etc/init.d/{net.lo,network,staticroute} \
- ${D}/usr/share/openrc/runlevels/boot/{net.lo,network,staticroute} \
- ${D}/etc/conf.d/{net,network,staticroute}; do
- rm -f "$pat" || die "Couldn't remove upstream $pat from source."
- done
-
- # Install funtoo networking parts:
-
- cd ${WORKDIR}/corenetwork-${NETV} || die
- dodoc docs/index.rst || die
- exeinto /etc/init.d || die
- doexe init.d/{netif.tmpl,netif.lo} || die
- cp -a netif.d ${D}/etc || die
- chown -R root:root ${D}/etc/netif.d || die
- chmod -R 0644 ${D}/etc/netif.d || die
- ln -s /etc/init.d/netif.lo ${D}/usr/share/openrc/runlevels/sysinit/netif.lo || die
-
- # Install gentoo pam.d file:
-
- newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
-}
-
-add_init() {
- local runl=$1
- shift
- if [ ! -e ${ROOT}/etc/runlevels/${runl} ]
- then
- install -d -m0755 ${ROOT}/etc/runlevels/${runl}
- fi
- for initd in $*
- do
- [[ -e ${ROOT}/etc/runlevels/${runl}/${initd} ]] && continue
- elog "Auto-adding '${initd}' service to your ${runl} runlevel"
- ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/${runl}/${initd}
- done
-}
-
-pkg_postinst() {
- local runl
- install -d -m0755 ${ROOT}/etc/runlevels
- local runldir="${ROOT}usr/share/openrc/runlevels"
-
- # Remove old baselayout links
- rm -f "${ROOT}"/etc/runlevels/boot/{check{fs,root},rmnologin}
- rm -f "${ROOT}"/etc/runlevels/boot/netif.lo
-
- # CREATE RUNLEVEL DIRECTORIES
- # ===========================
-
- # To ensure proper system operation, this portion of the script ensures that
- # all of OpenRC's default initscripts in all runlevels are properly
- # installed.
-
- for runl in $( cd "$runldir"; echo * )
- do
- einfo "Processing $runl..."
- einfo "Ensuring runlevel $runl has all required scripts..."
- add_init $runl $( cd "$runldir/$runl"; echo * )
- done
-
- # Rather than try to migrate everyone using complex scripts, simply print
- # names of initscripts that are in the user's runlevels but not provided by
- # OpenRC. This loop can be upgraded to look for particular scripts that
- # might have come from baselayout.
-
- for runl in $( cd ${ROOT}/etc/runlevels; echo * )
- do
- [ ! -d ${runldir}/${runl} ] && continue
- for init in $( cd "$runldir/$runl"; echo * )
- do
- if [ -e ${ROOT}/etc/runlevels/${runl}/${init} ] && [ ! -e ${runldir}/${runl}/${init} ]
- then
- echo "Initscript ${init} exists in runlevel ${runl} but not in OpenRC."
- fi
- done
- done
-
- # OTHER STUFF
- # ===========
-
- # update the dependency tree bug #224171
- [[ "${ROOT}" = "/" ]] && "${ROOT}/libexec"/rc/bin/rc-depend -u
-
- elog "You should now update all files in /etc, using etc-update"
- elog "or equivalent before rebooting."
- elog
-
- if path_exists -o "${ROOT}"/etc/conf.d/local.{start,stop} ; then
- ewarn "/etc/conf.d/local.{start,stop} are deprecated. Please convert"
- ewarn "your files to /etc/conf.d/local and delete the files."
- fi
-
- ewarn "Make sure that correct symlink exist"
- ewarn "Re-establish it by ln -s /etc/init.d/netif.tmpl /etc/init.d/netif.ethX"
-}
199 sys-apps/openrc/openrc-0.8.3-r7.ebuild
View
@@ -1,199 +0,0 @@
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="2"
-
-inherit eutils flag-o-matic multilib toolchain-funcs
-
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
-HOMEPAGE="http://roy.marples.name/openrc"
-PROVIDE="virtual/baselayout"
-RESTRICT="mirror"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="*"
-IUSE="debug ncurses pam unicode kernel_linux kernel_FreeBSD"
-
-RDEPEND="kernel_linux? ( >=sys-apps/sysvinit-2.86-r11 )
- kernel_FreeBSD? ( virtual/init sys-process/fuser-bsd )
- ncurses? ( sys-libs/ncurses )
- pam? ( virtual/pam )
- >=sys-apps/baselayout-2.1
- >=sys-fs/udev-135
- sys-apps/iproute2"
-
-DEPEND="ncurses? ( sys-libs/ncurses ) pam? ( virtual/pam ) virtual/os-headers"
-
-GITHUB_REPO="${PN}"
-GITHUB_USER="funtoo"
-GITHUB_TAG="funtoo-openrc-0.8.3"
-
-NETV="1.3-r2"
-GITHUB_REPO_CN="corenetwork"
-GITHUB_TAG_CN="$NETV"
-
-SRC_URI="
- https://www.github.com/${GITHUB_USER}/${GITHUB_REPO}/tarball/${GITHUB_TAG} -> ${PN}-${GITHUB_TAG}.tar.gz
- https://www.github.com/${GITHUB_USER}/${GITHUB_REPO_CN}/tarball/${GITHUB_TAG_CN} -> corenetwork-${NETV}.tar.gz
- "
-
-pkg_setup() {
- LIBDIR="lib"
- [ "${SYMLINK_LIB}" = "yes" ] && LIBDIR=$(get_abi_LIBDIR "${DEFAULT_ABI}")
-
- MAKE_ARGS="${MAKE_ARGS} LIBNAME=${LIBDIR}"
-
- local brand="Unknown"
- if use kernel_linux ; then
- MAKE_ARGS="${MAKE_ARGS} OS=Linux"
- brand="Linux"
- elif use kernel_FreeBSD ; then
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
- brand="FreeBSD"
- fi
- export BRANDING="Funtoo ${brand}"
-
- export DEBUG=$(usev debug)
- export MKPAM=$(usev pam)
- export MKTERMCAP=$(usev ncurses)
-}
-
-pre_src_prepare() {
- # rename github directories to the names we're expecting:
- local old=${WORKDIR}/${GITHUB_USER}-${PN}-*
- mv $old "${WORKDIR}/${P}" || die "move fail 1"
- old="${WORKDIR}/${GITHUB_USER}-corenetwork-*"
- mv $old "${WORKDIR}/corenetwork-${NETV}" || die "move fail 2"
-}
-
-src_compile() {
- cd $S
- # catch people running `ebuild` w/out setup
- if [[ -z ${MAKE_ARGS} ]] ; then
- die "Your MAKE_ARGS is empty ... are you running 'ebuild' but forgot to execute 'setup' ?"
- fi
-
- #sed -i "/^VERSION[[:space:]]*=/s:=.*:=${PV}:" Makefile
-
- tc-export CC AR RANLIB
- echo emake ${MAKE_ARGS}
- emake ${MAKE_ARGS} || die "emake ${MAKE_ARGS} failed"
-}
-
-src_install() {
- emake ${MAKE_ARGS} DESTDIR="${D}" install || die "make install failed"
- gen_usr_ldscript libeinfo.so
- gen_usr_ldscript librc.so
-
- dodir /etc/runlevels/default
-
- keepdir /"${LIBDIR}"/rc/init.d
- keepdir /"${LIBDIR}"/rc/tmp
-
- # Backup our default runlevels
- dodir /usr/share/"${PN}"
- mv "${D}/etc/runlevels" "${D}/usr/share/${PN}"
-
- # Setup unicode defaults for silly unicode users
- use unicode && sed -i -e '/^.*unicode=/s:^.*"NO":unicode="YES":' "${D}"/etc/rc.conf
-
- # Cater to the norm
- (use x86 || use amd64) && sed -i -e '/^.*windowkeys=/s:^.*"NO":windowkeys="YES":' "${D}"/etc/conf.d/keymaps
-
- # Remove upstream networking parts:
-
- for pat in ${D}/etc/init.d/{net.lo,network,staticroute} \
- ${D}/usr/share/openrc/runlevels/boot/{net.lo,network,staticroute} \
- ${D}/etc/conf.d/{net,network,staticroute}; do
- rm -f "$pat" || die "Couldn't remove upstream $pat from source."
- done
-
- # Install funtoo networking parts:
-
- cd ${WORKDIR}/corenetwork-${NETV} || die
- dodoc docs/index.rst || die
- exeinto /etc/init.d || die
- doexe init.d/{netif.tmpl,netif.lo} || die
- cp -a netif.d ${D}/etc || die
- chown -R root:root ${D}/etc/netif.d || die
- chmod -R 0644 ${D}/etc/netif.d || die
- ln -s /etc/init.d/netif.lo ${D}/usr/share/openrc/runlevels/sysinit/netif.lo || die
-
- # Install gentoo pam.d file:
-
- newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
-}
-
-add_init() {
- local runl=$1
- shift
- if [ ! -e ${ROOT}/etc/runlevels/${runl} ]
- then
- install -d -m0755 ${ROOT}/etc/runlevels/${runl}
- fi
- for initd in $*
- do
- [[ -e ${ROOT}/etc/runlevels/${runl}/${initd} ]] && continue
- elog "Auto-adding '${initd}' service to your ${runl} runlevel"
- ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/${runl}/${initd}
- done
-}
-
-pkg_postinst() {
- local runl
- install -d -m0755 ${ROOT}/etc/runlevels
- local runldir="${ROOT}usr/share/openrc/runlevels"
-
- # Remove old baselayout links
- rm -f "${ROOT}"/etc/runlevels/boot/{check{fs,root},rmnologin}
- rm -f "${ROOT}"/etc/runlevels/boot/netif.lo
-
- # CREATE RUNLEVEL DIRECTORIES
- # ===========================
-
- # To ensure proper system operation, this portion of the script ensures that
- # all of OpenRC's default initscripts in all runlevels are properly
- # installed.
-
- for runl in $( cd "$runldir"; echo * )
- do
- einfo "Processing $runl..."
- einfo "Ensuring runlevel $runl has all required scripts..."
- add_init $runl $( cd "$runldir/$runl"; echo * )
- done
-
- # Rather than try to migrate everyone using complex scripts, simply print
- # names of initscripts that are in the user's runlevels but not provided by
- # OpenRC. This loop can be upgraded to look for particular scripts that
- # might have come from baselayout.
-
- for runl in $( cd ${ROOT}/etc/runlevels; echo * )
- do
- [ ! -d ${runldir}/${runl} ] && continue
- for init in $( cd "$runldir/$runl"; echo * )
- do
- if [ -e ${ROOT}/etc/runlevels/${runl}/${init} ] && [ ! -e ${runldir}/${runl}/${init} ]
- then
- echo "Initscript ${init} exists in runlevel ${runl} but not in OpenRC."
- fi
- done
- done
-
- # OTHER STUFF
- # ===========
-
- # update the dependency tree bug #224171
- [[ "${ROOT}" = "/" ]] && "${ROOT}/libexec"/rc/bin/rc-depend -u
-
- elog "You should now update all files in /etc, using etc-update"
- elog "or equivalent before rebooting."
- elog
-
- if path_exists -o "${ROOT}"/etc/conf.d/local.{start,stop} ; then
- ewarn "/etc/conf.d/local.{start,stop} are deprecated. Please convert"
- ewarn "your files to /etc/conf.d/local and delete the files."
- fi
-
- ewarn "Make sure that correct symlink exist"
- ewarn "Re-establish it by ln -s /etc/init.d/netif.tmpl /etc/init.d/netif.ethX"
-}
199 sys-apps/openrc/openrc-0.8.3-r8.ebuild
View
@@ -1,199 +0,0 @@
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="2"
-
-inherit eutils flag-o-matic multilib toolchain-funcs
-
-DESCRIPTION="OpenRC manages the services, startup and shutdown of a host"
-HOMEPAGE="http://roy.marples.name/openrc"
-PROVIDE="virtual/baselayout"
-RESTRICT="mirror"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="*"
-IUSE="debug ncurses pam unicode kernel_linux kernel_FreeBSD"
-
-RDEPEND="kernel_linux? ( >=sys-apps/sysvinit-2.86-r11 )
- kernel_FreeBSD? ( virtual/init sys-process/fuser-bsd )
- ncurses? ( sys-libs/ncurses )
- pam? ( virtual/pam )
- >=sys-apps/baselayout-2.1
- >=sys-fs/udev-135
- sys-apps/iproute2"
-
-DEPEND="ncurses? ( sys-libs/ncurses ) pam? ( virtual/pam ) virtual/os-headers"
-
-GITHUB_REPO="${PN}"
-GITHUB_USER="funtoo"
-GITHUB_TAG="funtoo-openrc-0.8.3"
-
-NETV="1.3-r2"
-GITHUB_REPO_CN="corenetwork"
-GITHUB_TAG_CN="$NETV"
-
-SRC_URI="
- https://www.github.com/${GITHUB_USER}/${GITHUB_REPO}/tarball/${GITHUB_TAG} -> ${PN}-${GITHUB_TAG}.tar.gz
- https://www.github.com/${GITHUB_USER}/${GITHUB_REPO_CN}/tarball/${GITHUB_TAG_CN} -> corenetwork-${NETV}.tar.gz
- "
-
-pkg_setup() {
- LIBDIR="lib"
- [ "${SYMLINK_LIB}" = "yes" ] && LIBDIR=$(get_abi_LIBDIR "${DEFAULT_ABI}")
-
- MAKE_ARGS="${MAKE_ARGS} LIBNAME=${LIBDIR}"
-
- local brand="Unknown"
- if use kernel_linux ; then
- MAKE_ARGS="${MAKE_ARGS} OS=Linux"
- brand="Linux"
- elif use kernel_FreeBSD ; then
- MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD"
- brand="FreeBSD"
- fi
- export BRANDING="Funtoo ${brand}"
-
- export DEBUG=$(usev debug)
- export MKPAM=$(usev pam)
- export MKTERMCAP=$(usev ncurses)
-}
-
-src_prepare() {
- # rename github directories to the names we're expecting:
- local old=${WORKDIR}/${GITHUB_USER}-${PN}-*
- mv $old "${WORKDIR}/${P}" || die "move fail 1"
- old="${WORKDIR}/${GITHUB_USER}-corenetwork-*"
- mv $old "${WORKDIR}/corenetwork-${NETV}" || die "move fail 2"
-}
-
-src_compile() {
- cd $S
- # catch people running `ebuild` w/out setup
- if [[ -z ${MAKE_ARGS} ]] ; then
- die "Your MAKE_ARGS is empty ... are you running 'ebuild' but forgot to execute 'setup' ?"
- fi
-
- #sed -i "/^VERSION[[:space:]]*=/s:=.*:=${PV}:" Makefile
-
- tc-export CC AR RANLIB
- echo emake ${MAKE_ARGS}
- emake ${MAKE_ARGS} || die "emake ${MAKE_ARGS} failed"
-}
-
-src_install() {
- emake ${MAKE_ARGS} DESTDIR="${D}" install || die "make install failed"
- gen_usr_ldscript libeinfo.so
- gen_usr_ldscript librc.so
-
- dodir /etc/runlevels/default
-
- keepdir /"${LIBDIR}"/rc/init.d
- keepdir /"${LIBDIR}"/rc/tmp
-
- # Backup our default runlevels
- dodir /usr/share/"${PN}"
- mv "${D}/etc/runlevels" "${D}/usr/share/${PN}"
-
- # Setup unicode defaults for silly unicode users
- use unicode && sed -i -e '/^.*unicode=/s:^.*"NO":unicode="YES":' "${D}"/etc/rc.conf
-
- # Cater to the norm
- (use x86 || use amd64) && sed -i -e '/^.*windowkeys=/s:^.*"NO":windowkeys="YES":' "${D}"/etc/conf.d/keymaps
-
- # Remove upstream networking parts:
-
- for pat in ${D}/etc/init.d/{net.lo,network,staticroute} \
- ${D}/usr/share/openrc/runlevels/boot/{net.lo,network,staticroute} \
- ${D}/etc/conf.d/{net,network,staticroute}; do
- rm -f "$pat" || die "Couldn't remove upstream $pat from source."
- done
-
- # Install funtoo networking parts:
-
- cd ${WORKDIR}/corenetwork-${NETV} || die
- dodoc docs/index.rst || die
- exeinto /etc/init.d || die
- doexe init.d/{netif.tmpl,netif.lo} || die
- cp -a netif.d ${D}/etc || die
- chown -R root:root ${D}/etc/netif.d || die
- chmod -R 0644 ${D}/etc/netif.d || die
- ln -s /etc/init.d/netif.lo ${D}/usr/share/openrc/runlevels/sysinit/netif.lo || die
-
- # Install gentoo pam.d file:
-
- newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon
-}
-
-add_init() {
- local runl=$1
- shift
- if [ ! -e ${ROOT}/etc/runlevels/${runl} ]
- then
- install -d -m0755 ${ROOT}/etc/runlevels/${runl}
- fi
- for initd in $*
- do
- [[ -e ${ROOT}/etc/runlevels/${runl}/${initd} ]] && continue
- elog "Auto-adding '${initd}' service to your ${runl} runlevel"
- ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/${runl}/${initd}
- done
-}
-
-pkg_postinst() {
- local runl
- install -d -m0755 ${ROOT}/etc/runlevels
- local runldir="${ROOT}usr/share/openrc/runlevels"
-
- # Remove old baselayout links
- rm -f "${ROOT}"/etc/runlevels/boot/{check{fs,root},rmnologin}
- rm -f "${ROOT}"/etc/runlevels/boot/netif.lo
-
- # CREATE RUNLEVEL DIRECTORIES
- # ===========================
-
- # To ensure proper system operation, this portion of the script ensures that
- # all of OpenRC's default initscripts in all runlevels are properly
- # installed.
-
- for runl in $( cd "$runldir"; echo * )
- do
- einfo "Processing $runl..."
- einfo "Ensuring runlevel $runl has all required scripts..."
- add_init $runl $( cd "$runldir/$runl"; echo * )
- done
-
- # Rather than try to migrate everyone using complex scripts, simply print
- # names of initscripts that are in the user's runlevels but not provided by
- # OpenRC. This loop can be upgraded to look for particular scripts that
- # might have come from baselayout.
-
- for runl in $( cd ${ROOT}/etc/runlevels; echo * )
- do
- [ ! -d ${runldir}/${runl} ] && continue
- for init in $( cd "$runldir/$runl"; echo * )
- do
- if [ -e ${ROOT}/etc/runlevels/${runl}/${init} ] && [ ! -e ${runldir}/${runl}/${init} ]
- then
- echo "Initscript ${init} exists in runlevel ${runl} but not in OpenRC."
- fi
- done
- done
-
- # OTHER STUFF
- # ===========
-
- # update the dependency tree bug #224171
- [[ "${ROOT}" = "/" ]] && "${ROOT}/libexec"/rc/bin/rc-depend -u
-
- elog "You should now update all files in /etc, using etc-update"
- elog "or equivalent before rebooting."
- elog
-
- if path_exists -o "${ROOT}"/etc/conf.d/local.{start,stop} ; then
- ewarn "/etc/conf.d/local.{start,stop} are deprecated. Please convert"
- ewarn "your files to /etc/conf.d/local and delete the files."
- fi
-
- ewarn "Make sure that correct symlink exist"
- ewarn "Re-establish it by ln -s /etc/init.d/netif.tmpl /etc/init.d/netif.ethX"
-}
Please sign in to comment.
Something went wrong with that request. Please try again.