Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FL-427: update bond template

FL-66: update tap and bridge templates
  • Loading branch information...
commit bff6a661e337c8ee813ebf8f4b94f6de914471bc 1 parent 51d7cc9
@angryvincent angryvincent authored
View
4 profiles/package.mask/funtoo-staging
@@ -1,6 +1,10 @@
# Keep the most recent masks in a reverse chrono order
# newest on top
+# OLeg Vinichenko (15 Mar 2013)
+# FL-427, FL-66, new openrc, masked for testing
+=sys-apps/openrc-0.10.2-r8
+
# Daniel Molik ( 6 Feb 2013 )
# FL-382, bison-2.7 for testing
=sys-devel/bison-2.7
View
9 sys-apps/openrc/Manifest
@@ -1,4 +1,5 @@
-DIST corenetwork-1.3.1-r1.tar.gz 13514 RMD160 1cadcf477526505caa38988aaa1f23fde0125b16 SHA1 4720fc0b01f673627331d984b48e6f64c74120f8 SHA256 8a6512b9533d02e2b84b0e553069eb026968123993a1c913a1a73d4857c5ab77
-DIST corenetwork-1.3.3.tar.gz 13564 RMD160 9980c24526ef2f24eb82b19a8381f2930354b683 SHA1 73d4f65d9beae98ab036f7fd6145e0ae8433838e SHA256 c50bea3760c4bc403f0f826676ac172276d980e807772d7c9d61efdca09b8ccf
-DIST openrc-funtoo-openrc-0.10.2-r4.tar.gz 214794 RMD160 7377ac088829b5e914b02be22880dd04d100b7ee SHA1 6993d1e349643f30e3a040df871fa703e0f4c45c SHA256 f134da20ea689b4fff938a47177528ee40bb56c96d40deeffd5c6fdf86da898d
-DIST openrc-funtoo-openrc-0.10.2-r7.tar.gz 214846 RMD160 a31221ad8dffee7d79f37f98d1fd70630354e239 SHA1 e88803652d0add93bf82e727acc87aeb517fbcbb SHA256 71c1663eb0f2cd0593d634123ee47f2bc1fcfeca2bfbbd694ed2a5f2e4fc2970
+DIST corenetwork-1.3.1-r1.tar.gz 13514 SHA256 8a6512b9533d02e2b84b0e553069eb026968123993a1c913a1a73d4857c5ab77
+DIST corenetwork-1.3.3.tar.gz 13564 SHA256 c50bea3760c4bc403f0f826676ac172276d980e807772d7c9d61efdca09b8ccf
+DIST corenetwork-1.3.4.tar.gz 13644 SHA256 6fc04a34238ec6164f1fb834a4b2a51e1b56a665ed4575c778a796a18f97de0e SHA512 43678d488d6ccc85bd06c54299b4a86458e904cd218cfdb470ec5def9d150d97b83b24a34c4240edb0f605f8f344579964d23b8f1791dfdcb26f7151d3a21ddd WHIRLPOOL c7b9d2db25bf1535523fe942078a586747dfdc4bd827c482ace6d14847a83d4e617b062a52a28e06e1a52ae3f1905288fc6722056f5fd245c64fff05278212f2
+DIST openrc-funtoo-openrc-0.10.2-r4.tar.gz 214794 SHA256 f134da20ea689b4fff938a47177528ee40bb56c96d40deeffd5c6fdf86da898d
+DIST openrc-funtoo-openrc-0.10.2-r7.tar.gz 214846 SHA256 71c1663eb0f2cd0593d634123ee47f2bc1fcfeca2bfbbd694ed2a5f2e4fc2970
View
242 sys-apps/openrc/openrc-0.10.2-r8.ebuild
@@ -0,0 +1,242 @@
+# 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 >virtual/udev-0 )
+ 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.2-r7"
+
+NETV="1.3.4"
+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}/lib64/rc/net/ ${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 -rf "$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 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() {
+ 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
+
+ chmod +x ${ROOT}/etc/netif.d
+
+ # OTHER STUFF
+ # ===========
+
+ # update the dependency tree bug #224171
+ [[ "${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."
+ 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.