diff --git a/app-misc/sablink-version/Manifest b/app-misc/sablink-version/Manifest new file mode 100644 index 0000000..741b279 --- /dev/null +++ b/app-misc/sablink-version/Manifest @@ -0,0 +1,11 @@ +AUX 00-sabayon-anti-fork-bomb.conf 690 SHA256 80f397f12a746a73d48d90c010d6176c9e0661fbe118c770f97c165810caeee5 SHA512 da4c0ce2efacb3a420a73fc6ac533d17fef8e338bf6d3e784e52e49f1098504e985d4a24a96b4f67c1ceda45942c592423de3f5699cefd4aa148c23f5414acd3 WHIRLPOOL dc283b03fdd9acf8bb27c2904a40f94ebc5c45f81bd4f46c825fa5e999975d5663c25bf1d8226bb4b9e0c31791295dd75e0ef2ed3ed343defaf21557aba71d19 +AUX entropy_sablink.nas-central.org 1244 SHA256 469f2c886f40c168dbf1df9df74ab1c5df5987696544d3ee797d9238dca6be98 SHA512 78f505dcbdaad61849bd9c775d94213e7496c539dd428bac23f749efe8507a7984ce3fa553d7bfcdd3d8a36d25b3df31afad80b59d520ceb6f43beb8eea8f3de WHIRLPOOL b33da19420b0f7baabfc663f33988d129662a60d047275fad3c11ce23c8cb6c01b8ca7a406f09c16042060da6f18876fa7d9abe60f847665e6b7905e08317bff +AUX equo-update-check 116 SHA256 873651076a33b6ef4e215c2fb3f2a855244a0d8be5bef2fe868f40f1ff13e15f SHA512 e54f2a4d8e4707f10770c646eee73c3449a1c5551fc2b9a191920c061099caac9e957d7f3debca13715aa1733e3819f3df740533c133b28f477de4da61777110 WHIRLPOOL ec70590796356e9a3c795cf1157c4fe21c0f9d098f14c392e09f0fa5fb3c8a84df7dab05c956c29ac123505276238ddeff053200759c94610a52bfd451b43c73 +AUX equo-update.cron 82 SHA256 8dda4ffa3553445539d121ff5c90106ae41481ca0710ffb13fb63a7877d55a38 SHA512 f77131d851f4b74c498ab6c4f5a1229f598c2c49092bee47c3517ee9446ad96e90f4632d452ec74511a62e739a10bcdcaf44ca88defe4b1faa910637a721da60 WHIRLPOOL 2073ac3b8fdc1e8a50ab9f46b3a73c999ff306d9a10caa1f3994f3e843ee73015e73ee96d8b364db119b9a2c76191b79263f9cd954db0a98850722df363b6d27 +AUX greeting.sh 1829 SHA256 a8d6da8f7c29ccfe57472a3d317110bb0e4e4fa7b9954b34988a47943a28a81e SHA512 55cfcb88b55edefd16e59afd478e8278c43ee29724ba7af6e79711e006174498da22d2d2a7c1d536d4886c8744a6fd9af2a3679b0c9b18109404c6f5f8fdf422 WHIRLPOOL e790db9f88cf5e3611f35d4162e2c5476f46634be24fb15679a8d068f4d365d70f1ec85231a5cd06f2b7cb98f25a6fd2f1d9e497493c13ab113c3b4d031fb724 +AUX repositories.conf.0 2666 SHA256 cc99b0af6f1c5acc5094ff889ceaa19381f03bfba4e59975bb5ea46f3ca38515 SHA512 66a7144042ceda2fc7fd79a3e3af433d8bec7a770ac3a52364d7023d148c7ad1c5887b6965abf3f82fd74e460cd33861b7bb4387df50c3f44666280bf759782a WHIRLPOOL 9aa0ebc1988149c82ef35ca62be849e23536e56b565fefad07cb7f38b641f8addf81735437cd74fdce652d4f514aab7c6206c1da66369299a8bc3f520e2b084a +AUX repositories.conf.1 2666 SHA256 1eab53ae6a97215255a64f225463df0b00564ddddace8d9939ba78e6d4d51ba2 SHA512 edd1e780ed1383498d52f4c96f855d98da7364ac5c491d41b8baea1f032e930ac49b21276afcd30483d4697f0b5230040e91e9832ae8db75a86e69bb49a383fc WHIRLPOOL c194d52460e0d1cf0473a9e6dedcefe6496af3c1f6870d2990c6201b03565db1366c025e17c4254f1b051cbde897a5d59b60f6c381b3494a877d61da3b172aad +EBUILD sablink-version-0-r3.ebuild 1818 SHA256 9937ff5b48a0316fc1c3a23515eb89eb78073ad64a72ad124f769ff780bff181 SHA512 5172cbfd367db1c4e97180467456f5cd4d6f9ecfedcb3c1876f2cdea28918578485c7a0278dfe832d4682dc0220dafc067610ed7a2f2f0218c4c7ac7530cd010 WHIRLPOOL 9e7e1c449ba4b301146356e0c87d29e4c9067b07fd056409dee7196dc66ee9b3df4aa280e78b0f692be16434a772b3a590348b911955569f5b3bd317e4f90530 +EBUILD sablink-version-14.12.ebuild 2915 SHA256 27e46698ee1ddd1f9bc082e2ab5980957425488329031d0e7ac34e01b3da1b45 SHA512 192e0be0f50cb9cbe3998556b15869cc295f85d800cabb33bb23155680c3a964a47d523c341033b43576024ee8a261843679ac38a8e829e57533a5194c14701a WHIRLPOOL 9bd5db4aa5ac7bd41e7be1af966dcede74234097a658b23bc75d0553b52d2f812b14a528e444a673cf67a485ce3da4951ca0ebe2703197321e822b3896aa6d4d +MISC metadata.xml 201 SHA256 56d6a20c3db8ae4e27afa0c395811020111e1093b58e2a6b4da6f4f3f0605d7e SHA512 a93eecbe1e2d614d3d8ebd418c7bb690221b889790f392c8a3d11f5d726955c53f9c8300c38b734bf0e0ceecb07bf901cbc25b9381d4417fd9b87ab3830279c3 WHIRLPOOL e68445633cbba9adfd423588892a44020aec6c1b2fe479c2c4d58a0dc3b48a011f0dcd681ccc01c204f85c7a33f7171760c12d3a0b5899d66bc97c44c91836ab +MISC sablink-version.skel 2375 SHA256 90d16d6082ab00917f069cc046632c91f36f7e9e8377e0ca5e61a8de7f2856e5 SHA512 57ec6c7b141c617e7865d82887a8e921c4f61607a53a24c99afcec32692557a419642e56936e36513cb2414b651f0f84af71a4c91e927b240e03818e1b08e416 WHIRLPOOL c8e432fffc99205116b49087a535d8077f072815253a1892d609d6e1f6323ee146d87e6ad1fe2a483ff128dff2f9fc5dbe4b987e89380e2ae09bd9269831fd5c diff --git a/app-misc/sablink-version/files/00-sabayon-anti-fork-bomb.conf b/app-misc/sablink-version/files/00-sabayon-anti-fork-bomb.conf new file mode 100644 index 0000000..4dcf561 --- /dev/null +++ b/app-misc/sablink-version/files/00-sabayon-anti-fork-bomb.conf @@ -0,0 +1,20 @@ +# 00-sabayon-anti-fork-bomb.conf +# +# This file estabilishes Sabayon Linux default process +# limits to defend the system against malicious or faulty +# code that could potentially make the system unusable by +# spawning an excessive amount of processes. +# +# The root account is not affected by process number +# limitations. This way a root console can always kill any +# offending process, but an offending root process could +# still block the system. +# +# Each line describes a limit for a user in the form: +# +# + +* soft nproc 1300 +* hard nproc 1800 +root - nproc infinity + diff --git a/app-misc/sablink-version/files/entropy_sablink.nas-central.org b/app-misc/sablink-version/files/entropy_sablink.nas-central.org new file mode 100644 index 0000000..e79aae1 --- /dev/null +++ b/app-misc/sablink-version/files/entropy_sablink.nas-central.org @@ -0,0 +1,25 @@ +# +# syntax for repositories (content in square brackets not mandatory): +# +# repository: where the available packages and its database are stored +#| repository = repository_id|repository description| <2>|[,][#compression_method] +# +# example (content in square brackets not mandatory): +#| repository = sabayonlinux.org|Sabayon Linux Official Repository|http://pkg.sabayon.org|http://pkg.sabayon.org[,sabayon.org][#bz2] +# +# Supported protocols are: file, http, https, ftp, ftps, rsync +# Remove the initial "|" char, do not uncomment blindly, +# these are JUST EXAMPLES !! + +# Sabayon Linux Official Repository +# Base source URLs, do not remove +repository = sablink.nas-central.org|SabLink Linux Official Repository|http://sablink.disconnected-by-peer.at|http://pkgs.sablink.nas-central.org + +# Sabayon Packages Continent-based Load Balancer +#repository = sabayonlinux.org||http://dl.sabayon.org/entropy| + +# id-REPO, Indonesian FOSS Repository, 100Mbit/sec +#repository = sabayonlinux.org||http://bali.idrepo.or.id/sabayon/entropy| +#repository = sabayonlinux.org||http://madura.idrepo.or.id/sabayon/entropy| +#repository = sabayonlinux.org||http://sumbawa.idrepo.or.id/sabayon/entropy| + diff --git a/app-misc/sablink-version/files/equo-update-check b/app-misc/sablink-version/files/equo-update-check new file mode 100644 index 0000000..191b7ad --- /dev/null +++ b/app-misc/sablink-version/files/equo-update-check @@ -0,0 +1,3 @@ +#!/bin/sh +[ ! -e /tmp/.equoupdatecheck ] && echo "not checked for" > /tmp/.equoupdatecheck +cat /tmp/.equoupdatecheck \ No newline at end of file diff --git a/app-misc/sablink-version/files/equo-update.cron b/app-misc/sablink-version/files/equo-update.cron new file mode 100644 index 0000000..5ddb0af --- /dev/null +++ b/app-misc/sablink-version/files/equo-update.cron @@ -0,0 +1,3 @@ +#!/bin/bash + +LC_ALL=en_US.UTF-8 equo query updates --quiet > /tmp/.equoupdatecheck \ No newline at end of file diff --git a/app-misc/sablink-version/files/greeting.sh b/app-misc/sablink-version/files/greeting.sh new file mode 100755 index 0000000..e44f90f --- /dev/null +++ b/app-misc/sablink-version/files/greeting.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# asciiart genrator +# http://www.network-science.de/ascii/ Font big for SabLink + +#clear + +COLOUR_LOGO="31" +COLOUR_INFO1="32" +COLOUR_INFO2="31" +COLOUR_INFO3="37" + +echo '' +echo 'Hello, welcome to [1;'${COLOUR_INFO1}';40m'$(uname -n)', running' +echo '[0;'${COLOUR_LOGO}';40m _____ _ _ _ _ ' +echo '[0;'${COLOUR_LOGO}';40m / ____| | | | | (_) | | ' +echo '[0;'${COLOUR_LOGO}';40m| (___ __ _| |__ | | _ _ __ | | __' +echo '[0;'${COLOUR_LOGO}';40m \___ \ / _` | ´_ \| | | | ´_ \| |/ /' +echo '[0;'${COLOUR_LOGO}';40m ____) | (_| | |_) | |____| | | | | < ' +echo '[0;'${COLOUR_LOGO}';40m|_____/ \__,_|_.__/|______|_|_| |_|_|\_\' +echo '' + + +echo '[1;'${COLOUR_INFO2}';40m'$(uname -s)' '$(uname -m)' '$(uname -r)' (compiled [0;'${COLOUR_INFO3}';40m'$(uname -v)')' +echo '' +echo 'Processor : [0;'${COLOUR_INFO1}';40m'$(cat /proc/cpuinfo | grep -i 'Processor' | cut -c 13-50 )'' +echo 'BogoMIPS : [0;'${COLOUR_INFO1}';40m'$(cat /proc/cpuinfo | grep -i 'BogoMIPS' | cut -c 12-50 | tr -d ' ')'' +echo 'RAM : [0;'${COLOUR_INFO1}';40m'$(free -m | grep -i 'Mem:' | cut -c 13-20)'[0;'${COLOUR_INFO3}';40mMB' +echo 'Swap : [0;'${COLOUR_INFO1}';40m'$(free -m | grep -i 'Swap:' | cut -c 15-20)'[0;'${COLOUR_INFO3}';40mMB' +echo 'Uptime : [0;'${COLOUR_INFO3}';40m'$(uptime | cut -c 2-60)'' +echo 'Logged on as : [0;'${COLOUR_INFO1}';40m'$(whoami)' on [0;'${COLOUR_INFO1}';40m'$(tty)'[0;'${COLOUR_INFO3}';40m since [0;'${COLOUR_INFO1}';40m'$(date)'' +echo 'Users logged in : [0;'${COLOUR_INFO1}';40m'$(who -q | more +1)'' +echo '' +echo 'Package updates : [0;'${COLOUR_INFO1}';40m'$(equo-update-check)' available updates' +echo '' diff --git a/app-misc/sablink-version/files/repositories.conf.0 b/app-misc/sablink-version/files/repositories.conf.0 new file mode 100644 index 0000000..cd41b5b --- /dev/null +++ b/app-misc/sablink-version/files/repositories.conf.0 @@ -0,0 +1,90 @@ +# Project Entropy 1.0 repositories configuration file + +# syntax for differential-update +# differential-update: This setting controls the way Entropy client updates +# its repositories. If you're on a slow/unstable network +# it is recommended to disable "differential-update" +# in favour of a simple and more reliabile HTTP/FTP +# connection. In fact, differential repository updates +# are known to cause issues on some networks. +# Valid parameters: disable, enable, true, false, disabled, enabled +# Default is: enabled +# differential-update = enabled + +# syntax for developer-repo +# +# developer-repo: Enable this setting to fetch an extended repository database containing +# the whole metadata set (including package ChangeLogs and contents). +# Disabled by default. +# Valid parameters: disable, enable, true, false, disabled, enabled +# developer-repo = disable + +# +# syntax for product: +# +# product: Sabayon Linux product type (eg. standard, professional, mini) +# product = product string (no spaces!) +# +# example: +# product = standard +# or: +# product = professional +# +# Product default setting +product = standard + +# +# syntax for branch: +# +# branch: in Sabayon Linux each release has its branch that is the version name (eg. 3.4, 3.5) +# branch = actual branch string (no spaces!) +# +# example: +# branch = 4 +# or: +# branch = 5 +# +# Branch default setting +branch = 0 + +# +# syntax for official-repository-id: +# +# official-repository-id: Repository identifier for the official main distribution repository +# official-repository-id = +# +official-repository-id = sablink.nas-central.org + +# +# syntax for download-speed-limit: +# +# download-speed-limit: If you need a way to limit download speed, this is the option you were looking for +# download-speed-limit = +# +# example: +# download-speed-limit = 30 +# +# download-speed-limit = + +# +# syntax for downloadtimeout: +# +# download-timeout: If you are on a slow network, you may want to raise the +# download timeout value (by default, it's set to 10 secs) +# download-timeout = +# +# example: +# download-timeout = 20 +# +# download-timeout = 20 + +# +# syntax for security-url: +# +# security-url: Entropy compatible Security Advisories (GLSAs) package URL +# security-url = +# +# example: +# securityurl|http://community.sabayon.org/security/security-advisories.tar.bz2 +# +# security-url = diff --git a/app-misc/sablink-version/files/repositories.conf.1 b/app-misc/sablink-version/files/repositories.conf.1 new file mode 100644 index 0000000..0311c0e --- /dev/null +++ b/app-misc/sablink-version/files/repositories.conf.1 @@ -0,0 +1,90 @@ +# Project Entropy 1.0 repositories configuration file + +# syntax for differential-update +# differential-update: This setting controls the way Entropy client updates +# its repositories. If you're on a slow/unstable network +# it is recommended to disable "differential-update" +# in favour of a simple and more reliabile HTTP/FTP +# connection. In fact, differential repository updates +# are known to cause issues on some networks. +# Valid parameters: disable, enable, true, false, disabled, enabled +# Default is: enabled +# differential-update = enabled + +# syntax for developer-repo +# +# developer-repo: Enable this setting to fetch an extended repository database containing +# the whole metadata set (including package ChangeLogs and contents). +# Disabled by default. +# Valid parameters: disable, enable, true, false, disabled, enabled +# developer-repo = disable + +# +# syntax for product: +# +# product: Sabayon Linux product type (eg. standard, professional, mini) +# product = product string (no spaces!) +# +# example: +# product = standard +# or: +# product = professional +# +# Product default setting +product = standard + +# +# syntax for branch: +# +# branch: in Sabayon Linux each release has its branch that is the version name (eg. 3.4, 3.5) +# branch = actual branch string (no spaces!) +# +# example: +# branch = 4 +# or: +# branch = 5 +# +# Branch default setting +branch = 1 + +# +# syntax for official-repository-id: +# +# official-repository-id: Repository identifier for the official main distribution repository +# official-repository-id = +# +official-repository-id = sablink.nas-central.org + +# +# syntax for download-speed-limit: +# +# download-speed-limit: If you need a way to limit download speed, this is the option you were looking for +# download-speed-limit = +# +# example: +# download-speed-limit = 30 +# +# download-speed-limit = + +# +# syntax for downloadtimeout: +# +# download-timeout: If you are on a slow network, you may want to raise the +# download timeout value (by default, it's set to 10 secs) +# download-timeout = +# +# example: +# download-timeout = 20 +# +# download-timeout = 20 + +# +# syntax for security-url: +# +# security-url: Entropy compatible Security Advisories (GLSAs) package URL +# security-url = +# +# example: +# securityurl|http://community.sabayon.org/security/security-advisories.tar.bz2 +# +# security-url = diff --git a/app-misc/sablink-version/metadata.xml b/app-misc/sablink-version/metadata.xml new file mode 100644 index 0000000..1b54da9 --- /dev/null +++ b/app-misc/sablink-version/metadata.xml @@ -0,0 +1,5 @@ + + + +mario.fetka@gmail.com + diff --git a/app-misc/sablink-version/sablink-version-0-r3.ebuild b/app-misc/sablink-version/sablink-version-0-r3.ebuild new file mode 100644 index 0000000..c9e56b7 --- /dev/null +++ b/app-misc/sablink-version/sablink-version-0-r3.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 + +DESCRIPTION="SabLink System Release files package" +HOMEPAGE="http://sablink.disconnected-by-peer.at/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" + +IUSE="" +DEPEND="" +# Listing default packages for the current release +RDEPEND="app-admin/eselect-python + dev-lang/python:2.7 + sys-devel/base-gcc:4.7 + sys-devel/gcc-config + app-admin/update-motd + virtual/cron + app-admin/equo" + +SABLINK_VER="${PV}" +SABLINK_HEADER="SabLink Linux" +SABLINK_RELEASE="sablink-release" + +src_unpack() { + if use x86; then + echo "${SABLINK_HEADER} x86 ${SABLINK_VER}" > "${SABLINK_RELEASE}" + elif use arm; then + echo "${SABLINK_HEADER} ${CHOST/-*/} ${SABLINK_VER}" > "${SABLINK_RELEASE}" + else + echo "${SABLINK_HEADER} amd64 ${SABLINK_VER}" > "${SABLINK_RELEASE}" + fi +} + +src_install() { + # install relesae file + insinto /etc + doins "${SABLINK_RELEASE}" + dosym /etc/"${SABLINK_RELEASE}" /etc/system-release + + # install equo update cron + exeinto /etc/cron.daily + doexe "${FILESDIR}/equo-update.cron" + + # Bug 3459 - reduce the risk of fork bombs + insinto /etc/security/limits.d + newins "${FILESDIR}/00-sabayon-anti-fork-bomb.conf" 00-sablink-anti-fork-bomb.conf + + # install sablink greeting + exeinto /etc/update-motd.d + newexe "${FILESDIR}/greeting.sh" 20-greeting + + # install the check for updates script + newbin "${FILESDIR}/equo-update-check" equo-update-check + + # install repository files + insinto /etc/entropy + newins "${FILESDIR}/repositories.conf.0" repositories.conf + insinto /etc/entropy/repositories.conf.d + doins "${FILESDIR}/entropy_sablink.nas-central.org" +} + +pkg_postinst() { + # Setup Python 2.7 + eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 --ignore 3.3 --ignore 3.4 +} diff --git a/app-misc/sablink-version/sablink-version-14.12.ebuild b/app-misc/sablink-version/sablink-version-14.12.ebuild new file mode 100644 index 0000000..dbb8a3d --- /dev/null +++ b/app-misc/sablink-version/sablink-version-14.12.ebuild @@ -0,0 +1,104 @@ +# Copyright 2004-2013 Sabayon +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit multilib + +DESCRIPTION="Sablink system release virtual package" +HOMEPAGE="http://sablink.disconnected-by-peer.at" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" + +IUSE="" +DEPEND="" +GCC_VER="4.8" +PYTHON_VER="2.7" +# Listing default packages for the current release +RDEPEND="!app-admin/eselect-init + ! "${T}/sablink-release" + + # Anaconda expects a "release" somewhere in the string + # and no trailing \n + echo -n "Sablink ${ARCH} release ${PV}" > "${T}/system-release" + mkdir -p "${S}" || die +} + +src_install () { + insinto /etc + doins "${T}"/sablink-release + doins "${T}"/system-release + + # Bug 3459 - reduce the risk of fork bombs + insinto /etc/security/limits.d + doins "${FILESDIR}/00-sabayon-anti-fork-bomb.conf" + + # install equo update cron + exeinto /etc/cron.daily + doexe "${FILESDIR}/equo-update.cron" + + # install sablink greeting + exeinto /etc/update-motd.d + newexe "${FILESDIR}/greeting.sh" 20-greeting + + # install the check for updates script + newbin "${FILESDIR}/equo-update-check" equo-update-check + + # install repository files + insinto /etc/entropy + newins "${FILESDIR}/repositories.conf.1" repositories.conf + insinto /etc/entropy/repositories.conf.d + doins "${FILESDIR}/entropy_sablink.nas-central.org" +} + +pkg_postinst() { + # Setup Python ${PYTHON_VER} + eselect python set python${PYTHON_VER} + # No need to set the GCC profile here, since it's done in base-gcc + + # Improve systemd support + if [[ ! -L /etc/mtab ]] && [[ -e /proc/self/mounts ]]; then + rm -f /etc/mtab + einfo "Migrating /etc/mtab to a /proc/self/mounts symlink" + ln -sf /proc/self/mounts /etc/mtab + fi + + # force kdm back to the default runlevel if added to boot + # this is in preparation for the logind migration + local xdm_conf="${ROOT}/etc/conf.d/xdm" + local xdm_boot_runlevel="${ROOT}/etc/runlevels/boot/xdm" + local xdm_default_runlevel="${ROOT}/etc/runlevels/default/xdm" + if [ -e "${xdm_conf}" ] && [ -e "${xdm_boot_runlevel}" ]; then + DISPLAYMANAGER="" + . "${xdm_conf}" + if [ "${DISPLAYMANAGER}" = "kdm" ]; then + elog "Moving xdm (kdm) from boot runlevel to default" + elog "or logind will not work as expected" + mv -f "${xdm_boot_runlevel}" "${xdm_default_runlevel}" + fi + fi + + # remove old hal udev rules.d file, if found. sys-apps/hal is long gone. + rm -f "${ROOT}/lib/udev/rules.d/90-hal.rules" + + # make sure that systemd is correctly linked to /sbin/init + # Drop this in 2015, keep in sync with systemd-sysv-utils + ln -sf ../usr/lib/systemd/systemd "${ROOT}/sbin/init" || true +} diff --git a/app-misc/sablink-version/sablink-version.skel b/app-misc/sablink-version/sablink-version.skel new file mode 100644 index 0000000..0baf35c --- /dev/null +++ b/app-misc/sablink-version/sablink-version.skel @@ -0,0 +1,85 @@ +# Copyright 2004-2013 Sabayon +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit multilib + +DESCRIPTION="Sabayon system release virtual package" +HOMEPAGE="http://www.sabayon.org" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" + +IUSE="" +DEPEND="" +GCC_VER="4.8" +PYTHON_VER="2.7" +# Listing default packages for the current release +RDEPEND="!app-admin/eselect-init + ! "${T}/sabayon-release" + + # Anaconda expects a "release" somewhere in the string + # and no trailing \n + echo -n "Sabayon ${ARCH} release ${PV}" > "${T}/system-release" + mkdir -p "${S}" || die +} + +src_install () { + insinto /etc + doins "${T}"/sabayon-release + doins "${T}"/system-release + + # Bug 3459 - reduce the risk of fork bombs + insinto /etc/security/limits.d + doins "${FILESDIR}/00-sabayon-anti-fork-bomb.conf" +} + +pkg_postinst() { + # Setup Python ${PYTHON_VER} + eselect python set python${PYTHON_VER} + # No need to set the GCC profile here, since it's done in base-gcc + + # Improve systemd support + if [[ ! -L /etc/mtab ]] && [[ -e /proc/self/mounts ]]; then + rm -f /etc/mtab + einfo "Migrating /etc/mtab to a /proc/self/mounts symlink" + ln -sf /proc/self/mounts /etc/mtab + fi + + # force kdm back to the default runlevel if added to boot + # this is in preparation for the logind migration + local xdm_conf="${ROOT}/etc/conf.d/xdm" + local xdm_boot_runlevel="${ROOT}/etc/runlevels/boot/xdm" + local xdm_default_runlevel="${ROOT}/etc/runlevels/default/xdm" + if [ -e "${xdm_conf}" ] && [ -e "${xdm_boot_runlevel}" ]; then + DISPLAYMANAGER="" + . "${xdm_conf}" + if [ "${DISPLAYMANAGER}" = "kdm" ]; then + elog "Moving xdm (kdm) from boot runlevel to default" + elog "or logind will not work as expected" + mv -f "${xdm_boot_runlevel}" "${xdm_default_runlevel}" + fi + fi + + # remove old hal udev rules.d file, if found. sys-apps/hal is long gone. + rm -f "${ROOT}/lib/udev/rules.d/90-hal.rules" + + # make sure that systemd is correctly linked to /sbin/init + # Drop this in 2015, keep in sync with systemd-sysv-utils + ln -sf ../usr/lib/systemd/systemd "${ROOT}/sbin/init" || true +}