add new package

This commit is contained in:
Mario Fetka 2012-11-04 15:53:30 +01:00
parent 80472d628e
commit 56502ae6c8
5 changed files with 115 additions and 0 deletions

View File

@ -0,0 +1,3 @@
AUX 00-sabayon-anti-fork-bomb.conf 690 RMD160 e80876cf07f06c2c67451d277aceba437d91f5db SHA1 53c0b2436859f19f2601677194c9a857b4ca20d3 SHA256 80f397f12a746a73d48d90c010d6176c9e0661fbe118c770f97c165810caeee5
EBUILD sabayon-version-10-r1.ebuild 1084 RMD160 d836b06271082e5e24ff5096287bac21c0368eb6 SHA1 99e16cabd00b224391362886e7aa2155f45c01c3 SHA256 003e1d57819bac0cc2f533c73e741b9022363140f8d22a652390eb8815cdbc8c
EBUILD sabayon-version-9.ebuild 956 RMD160 513afa4db4d4aa082c62d8881f978a312ef18689 SHA1 08b7fc0bd4757ff05a3d037d61cf5f13ca53c8d1 SHA256 f084042d48c9e18cd9c48a3dbd25ad72a4b158fe762f4087c5dfa6c8ce782684

View File

@ -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:
#
# <domain> <type> <item> <value>
* soft nproc 1300
* hard nproc 1800
root - nproc infinity

View File

@ -0,0 +1,5 @@
#!/usr/bin/python
from entropy.client.interfaces import Client
cl = Client()
print(len(cl.calculate_updates()[0]))

View File

@ -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'$(sablink-equo-check)' available updates'
echo ''

View File

@ -0,0 +1,52 @@
# Copyright 2004-2011 Sabayon Linux
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=3
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=""
# Listing default packages for the current release
RDEPEND="app-admin/eselect-python
dev-lang/python:2.7
sys-devel/base-gcc:4.6
sys-devel/gcc-config"
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 () {
insinto /etc
doins "${SABLINK_RELEASE}"
dosym /etc/"${SABLINK_RELEASE}" /etc/system-release
# Bug 3459 - reduce the risk of fork bombs
insinto /etc/security/limits.d
doins "${FILESDIR}/00-sabayon-anti-fork-bomb.conf"
exeinto /etc/update-motd.d
newexe "${FILESDIR}/greeting.sh" 20-greeting
newbin "${FILESDIR}/check.py" sablink-equo-check
}
pkg_postinst() {
# Setup Python 2.7
eselect python update --ignore 3.0 --ignore 3.1 --ignore 3.2 --ignore 3.3 --ignore 3.4
}