Removed /media/* from filesystem package

This commit is contained in:
Mike Staszel 2010-07-28 14:27:38 -05:00
parent e8ce202548
commit 1086da6a96
10 changed files with 202 additions and 86 deletions

View file

@ -1,8 +1,8 @@
# Maintainer: Mike Staszel <mikestaszel@plugapps.com>
pkgname=filesystem
pkgver=2010.02
pkgrel=4
pkgver=2010.07
pkgrel=1
pkgdesc="Base filesystem"
arch=('arm')
license=('GPL')
@ -41,7 +41,6 @@ build()
cd $pkgdir
mkdir -p bin boot dev etc home lib mnt proc root sbin tmp usr var opt srv sys
chmod 555 proc
mkdir -p media/{usb0,usb1,mmc0}
mkdir -p usr/{bin,include,lib,sbin,share/misc,src}
mkdir -p usr/share/man/man{1,2,3,4,5,6,7,8}

View file

@ -1,10 +1,10 @@
# Maintainer: Mike Staszel <mikestaszel@plugboxlinux.org>
pkgname=initscripts
pkgver=2010.06
pkgver=2010.07
pkgrel=1
pkgdesc="System initialization/bootup scripts"
arch=(arm)
arch=('arm')
url="http://www.plugboxlinux.org"
license=('GPL')
groups=('base')
@ -31,19 +31,19 @@ source=(adjtime.cron
rc.sysinit)
md5sums=('c03a4a5be5e2579b59e0dcd6a21d310b'
'd68d3c1a9abe773439fa5fa0000ab6c9'
'3f63494a13668789e99606aad059e8a4'
'5bd94c5ea67521b6b3e94b45ddec808a'
'3fb0b6e945065ba1d283f136d17d612e'
'ae343387b55279b8aa872c54b2ac0e50'
'96fdb70f95844d95a9941ee319601e8d'
'fe1a494a0b6f269ce1bcafae85a60a7b'
'c0316960589a345bb50acc3840a3d236'
'b61c592e400ab0cd0bb85eec5b82719f'
'f4743ece29da4980c34f1c7a27d033db'
'bd236a57bc00aa4727b98c5ae401c457'
'669ce6d766dd9deb86686219f3763fe4'
'8c94c7faaa17f0f4971cff19da047e44'
'e3eb057da4d46477d1e03925c1c12c03'
'2c4ef098e6ee45cb86272cb3cb28bb47'
'6440aad816f6a490418ca0e732e283c7')
'd7d0d3a2b01f9cb6512b2b0a67bcf971'
'230b25d02b0c2f99b9d1053ebcb9694f'
'47e3f38b25f8482d4ccb5939b30bdca1')
build() {
cd ${srcdir}/

View file

@ -2,27 +2,35 @@
# initscripts functions
#
# width:
STAT_COL=80
if [ ! -t 1 ]; then
USECOLOR=""
# stty will fail when stdin isn't a terminal
elif [ -t 0 ]; then
STAT_COL="$(/bin/stty size)"
# stty gives "rows cols"; strip the rows number, we just want columns
STAT_COL="${STAT_COL##* }"
else
# is /usr/share/terminfo already mounted, and TERM recognized?
/bin/tput cols &>/dev/null
if [ $? -eq 0 ]; then
STAT_COL=$(/bin/tput cols)
fi
fi
if [ "0$STAT_COL" -eq 0 ]; then
# if output was 0 (serial console), set default width to 80
STAT_COL=80
USECOLOR=""
fi
# we use 13 characters for our own stuff
STAT_COL=$(($STAT_COL - 13))
# disable colors on broken terminals
TERM_COLORS="$(/bin/tput colors 2>/dev/null)"
if [ $? = 3 ]; then
TERM_COLORS=8
@ -40,8 +48,10 @@ else
fi
unset TERM_COLORS
# clear the TZ envvar, so daemons always respect /etc/localtime
unset TZ
# colors:
if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then
C_MAIN="\033[1;37;40m" # main text
C_OTHER="\033[1;34;40m" # prefix & brackets
@ -68,9 +78,13 @@ else
DEL_TEXT=""
fi
# prefixes:
PREFIX_REG="::"
PREFIX_HL=" >"
# functions:
deltext() {
printf "${DEL_TEXT}"
}
@ -132,6 +146,10 @@ status() {
fi
}
# usage : in_array( $needle, $haystack )
# return : 0 - found
# 1 - not found
# Copied from makepkg
in_array() {
local needle=$1; shift
[ -z "$1" ] && return 1 # Not Found
@ -146,6 +164,8 @@ in_array() {
return 1 # Not Found
}
# daemons:
add_daemon() {
[ -d /var/run/daemons ] || /bin/mkdir -p /var/run/daemons
/bin/touch /var/run/daemons/$1
@ -181,6 +201,7 @@ stop_daemon() {
/etc/rc.d/$1 stop
}
# Status functions
status_started() {
deltext
echo -ne "$C_OTHER[${C_STRT}STARTED$C_OTHER]$C_CLEAR "
@ -200,6 +221,40 @@ ck_status() {
fi
}
###############################
# Custom hooks in initscripts #
###############################
# Hooks can be used to include custom code in various places in the rc.* scripts
#
# Define a hook function in a functions.d file using:
# function_name() {
# ...
# }
# add_hook hook_name function_name
# It is allowed to register several hook functions for the same hook
# Is is also allowed to register the same hook function for several hooks
#
# Currently, the following hooks exist:
# sysinit_start: at the beginning of rc.sysinit
# multi_start: at the beginning of rc.multi
# single_start: at the beginning of rc.single
# shutdown_start: at the beginning of rc.shutdown
# sysinit_end: at the end of rc.sysinit
# multi_end: at the end of rc.multi
# single_end: at the end of rc.single
# sysinit_udevlaunched: after udev has been launched in rc.sysinit
# single_udevlaunched: after udev has been launched in rc.single
# sysinit_udevsettled: after uevents have settled in rc.sysinit
# single_udevsettled: after uevents have settled in rc.single
# sysinit_premount: before local filesystems are mounted, but after root is mounted read-write in rc.sysinit
# shutdown_prekillall: before all processes are being killed in rc.shutdown
# single_prekillall: before all processes are being killed in rc.single
# shutdown_postkillall: after all processes have been killed in rc.shutdown
# single_postkillall: after all processes have been killed in rc.single
# shutdown_poweroff: directly before powering off in rc.shutdown
#
# Make sure to never override the add_hook and run_hook functions via functions.d
declare -A hook_funcs
add_hook() {
@ -216,6 +271,33 @@ run_hook() {
done
}
# Function for setting console font if required
set_consolefont() {
if [ -n "$CONSOLEFONT" ]; then
stat_busy "Loading Console Font: $CONSOLEFONT"
#CONSOLEMAP in UTF-8 shouldn't be used
if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then
CONSOLEMAP=""
fi
for i in /dev/tty[0-9]*; do
if [ -n "$CONSOLEMAP" ]; then
/usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C ${i} >/dev/null 2>&1
else
/usr/bin/setfont $CONSOLEFONT -C ${i} >/dev/null 2>&1
fi
done
if [ $? -ne 0 ]; then
stat_fail
else
if [ -n "$CONSOLEMAP" ]; then
echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\033(K"; fi' >>/etc/profile.d/locale.sh
fi
stat_done
fi
fi
}
# Source additional functions at the end to allow overrides
for f in /etc/rc.d/functions.d/*; do
if [ -e $f ]; then
. $f

View file

@ -233,6 +233,11 @@ case "$1" in
# exit
#fi
if [ "${NETWORK_PERSIST}" = "yes" -o "${NETWORK_PERSIST}" = "YES" ]; then
status "Skipping Network Shutdown" true
exit 0
fi
stat_busy "Stopping Network"
rm_daemon network
error=0

View file

@ -58,6 +58,10 @@ INTERFACES=(eth0)
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
# Setting this to "yes" will skip network shutdown.
# This is required if your root device is on NFS.
NETWORK_PERSIST="no"
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)

View file

@ -12,7 +12,7 @@ run_hook shutdown_start
/bin/stty onlcr
echo " "
printhl "Shutting down..."
printhl "Initiating Shutdown..."
echo " "
# avoid NIS hanging syslog-ng on shutdown by unsetting the domainname
@ -99,13 +99,25 @@ stat_busy "Deactivating Swap"
stat_done
stat_busy "Unmounting Filesystems"
/bin/umount -a -r -t noramfs,notmpfs,nosysfs,noproc -O no_netdev
/bin/umount -a -r -t noramfs,notmpfs,nosysfs,noproc,nodevtmpfs -O no_netdev
stat_done
# Kill non-root encrypted partition mappings
if [ -f /etc/crypttab -a -n "$(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$)" ]; then
stat_busy "Deactivating encrypted volumes:"
CS=/sbin/cryptsetup.static
# Arch cryptsetup packages traditionally contained the binaries
# /usr/sbin/cryptsetup
# /sbin/cryptsetup.static
# By default, initscripts used the /sbin/cryptsetup.static.
# Newer packages will only have /sbin/cryptsetup and no static binary
# This ensures maximal compatibility with the old and new layout
if [ -x /sbin/cryptsetup ]; then
CS=/sbin/cryptsetup
elif [ -x /usr/sbin/cryptsetup ]; then
CS=/usr/sbin/cryptsetup
else
CS=/sbin/cryptsetup.static
fi
do_uncrypt() {
if [ $# -ge 3 ]; then
if [ -b /dev/mapper/$1 ] ;then

View file

@ -8,7 +8,8 @@
run_hook single_start
if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
if [ "$PREVLEVEL" != "N" ]; then
# Find daemons NOT in the DAEMONS array. Shut these down first
if [ -d /var/run/daemons ]; then
for daemon in $(/bin/ls -1t /var/run/daemons); do
@ -25,13 +26,10 @@ if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then
fi
let i=i-1
done
fi
if [ "$PREVLEVEL" != "N" ]; then
run_hook single_prekillall
# Terminate all processes
stat_busy "Sending SIGTERM To Processes"
run_hook single_prekillall
/sbin/killall5 -15 &> /dev/null
/bin/sleep 5
stat_done
@ -53,7 +51,7 @@ if [ "$PREVLEVEL" != "N" ]; then
if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
stat_busy "Triggering UDev uevents"
/sbin/udevadm control --property=STARTUP=1
/sbin/udevadm trigger
/sbin/udevadm trigger --action=add
stat_done
fi
@ -87,4 +85,4 @@ if [ "$RUNLEVEL" = "1" ]; then
fi
# End of file
# vim: set ts=2 noet:

View file

@ -15,9 +15,19 @@ printsep
run_hook sysinit_start
# mount /proc, /sys and our RAM /dev
/bin/mount -n -t tmpfs udev /dev -o mode=0755,size=10M,nosuid
/bin/mount -n -t proc none /proc
/bin/mount -n -t sysfs none /sys
if ! /bin/mountpoint -q /proc; then
/bin/mount -n -t proc none /proc
fi
if ! /bin/mountpoint -q /sys; then
/bin/mount -n -t sysfs none /sys
fi
if ! /bin/mountpoint -q /dev; then
if grep -q devtmpfs /proc/filesystems 2>/dev/null; then
/bin/mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid
else
/bin/mount -n -t tmpfs udev /dev -o mode=0755,size=10M,nosuid
fi
fi
# Copy static device nodes to /dev
/bin/cp -a /lib/udev/devices/* /dev/
@ -44,13 +54,21 @@ fi
if [ -n "$HWCLOCK_PARAMS" ]; then
# enable rtc access
/sbin/modprobe rtc-cmos >/dev/null 2>&1
RTC_MAJOR=$(/bin/grep -w rtc /proc/devices 2>/dev/null)
RTC_MAJOR="${RTC_MAJOR%% *}"
if [ -n "$RTC_MAJOR" ]; then
/bin/mknod /dev/rtc0 c $RTC_MAJOR 0
/bin/ln -s /dev/rtc0 /dev/rtc
fi
/sbin/modprobe -q rtc-cmos
# some custom kernels use rtc/genrtc, try to load those too
/sbin/modprobe -q rtc
/sbin/modprobe -q genrtc
# If devtmpfs is used, the required RTC device already exists now
# Otherwise, create whatever device is available
if [ ! -c /dev/rtc -a ! -c /dev/rtc0 ]; then
if [ -f /sys/class/rtc/rtc0/dev ]; then
IFS=: read -r major minor < /sys/class/rtc/rtc0/dev
/bin/mknod /dev/rtc0 c $major $minor
elif [ -f /sys/class/misc/rtc/dev ]; then
IFS=: read -r major minor < /sys/class/misc/rtc/dev
/bin/mknod /dev/rtc c $major $minor
fi
fi
# Do a clock set here for a few reasons:
# 1. Make creation time on udev nodes sane (FS#8665)
@ -77,7 +95,7 @@ run_hook sysinit_udevlaunched
if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then
stat_busy "Triggering UDev uevents"
/sbin/udevadm control --property=STARTUP=1
/sbin/udevadm trigger
/sbin/udevadm trigger --action=add
stat_done
fi
@ -139,7 +157,19 @@ if [ -f /etc/crypttab -a -n "$(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$)"
/sbin/modprobe -q dm-mod 2>/dev/null
stat_busy "Unlocking encrypted volumes:"
csfailed=0
CS=/sbin/cryptsetup.static
# Arch cryptsetup packages traditionally contained the binaries
# /usr/sbin/cryptsetup
# /sbin/cryptsetup.static
# By default, initscripts used the /sbin/cryptsetup.static.
# Newer packages will only have /sbin/cryptsetup and no static binary
# This ensures maximal compatibility with the old and new layout
if [ -x /sbin/cryptsetup ]; then
CS=/sbin/cryptsetup
elif [ -x /usr/sbin/cryptsetup ]; then
CS=/usr/sbin/cryptsetup
else
CS=/sbin/cryptsetup.static
fi
do_crypt() {
if [ $# -ge 3 ]; then
cname="$1"
@ -225,12 +255,15 @@ fsck_reboot() {
if [ -x /sbin/fsck ]; then
stat_busy "Checking Filesystems"
FSCK_OUT=/dev/stdout
FSCK_ERR=/dev/null
/sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK >$FSCK_OUT 2>$FSCK_ERR
FSCK_ERR=/dev/stdout
FSCK_FD=
run_hook sysinit_prefsck
/sbin/fsck -A -T -C$FSCK_FD -a -t "$NETFS,noopts=_netdev" $FORCEFSCK >$FSCK_OUT 2>$FSCK_ERR
fsckret=$?
if [ ${fsckret} -gt 1 ]; then
stat_fail
fi
run_hook sysinit_postfsck
if [ $((${fsckret}&2)) -eq 2 ]; then
echo
echo "********************** REBOOT REQUIRED *********************"
@ -262,12 +295,10 @@ fi
stat_busy "Mounting Local Filesystems"
/bin/mount -n -o remount,rw /
: >| /etc/mtab
# make sure / gets written to /etc/mtab
/bin/mount -o remount,rw /
# Write /proc, /sys and /dev to /etc/mtab
if [ -e /proc/mounts ]; then
/bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab
if [ -x /bin/findmnt -a -e /proc/self/mountinfo ]; then
/bin/findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab
else
cat /proc/mounts >| /etc/mtab
fi
run_hook sysinit_premount
# now mount all the local filesystems
@ -368,41 +399,19 @@ else
[ -n "$KEYMAP" ] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q $KEYMAP
fi
if [ -n "$CONSOLEFONT" ]; then
stat_busy "Loading Console Font: $CONSOLEFONT"
#CONSOLEMAP in UTF-8 shouldn't be used
if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then
CONSOLEMAP=""
fi
for i in /dev/tty[0-9]*; do
if [ -n "$CONSOLEMAP" ]; then
/usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C ${i} >/dev/null 2>&1
else
/usr/bin/setfont $CONSOLEFONT -C ${i} >/dev/null 2>&1
fi
done
if [ $? -ne 0 ]; then
stat_fail
else
for i in /dev/tty[0-9]*; do
printf "\033(K" > ${i}
done
# the $CONSOLE check helps us avoid this when running scripts from cron
echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\033(K"; fi' >>/etc/profile.d/locale.sh
stat_done
fi
fi
# Set console font if required
set_consolefont
# Adding persistent network/cdrom generated rules
if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
stat_busy "Adding persistent cdrom udev rules"
/bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
stat_busy "Adding persistent cdrom udev rules"
/bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
stat_done
fi
if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
stat_busy "Adding persistent network udev rules"
/bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
stat_done
stat_busy "Adding persistent network udev rules"
/bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
stat_done
fi
/bin/dmesg >| /var/log/dmesg.log

37
core/zlib/PKGBUILD Normal file → Executable file
View file

@ -2,26 +2,33 @@
pkgname=zlib
pkgver=1.2.5
pkgrel=1
pkgdesc="A compression/decompression Library"
arch=(arm)
license=('custom:zlib')
pkgrel=2
pkgdesc='Compression library implementing the deflate compression method found in gzip and PKZIP'
arch=('i686' 'x86_64' 'arm')
license=('custom')
url="http://www.zlib.net/"
groups=('base')
depends=('glibc')
#source=("ftp://ftp.archlinux.org/other/zlib/zlib-${pkgver}.tar.gz")
#md5sums=('e63390cc6cbd0722f70729307d4dd01d')
source=("http://zlib.net/zlib-${pkgver}.tar.gz")
md5sums=('c735eab2d659a96e5a594c9e8541ad63')
options=('!makeflags')
source=("http://zlib.net/zlib-${pkgver}.tar.gz"
'zlib-1.2.5-lfs-decls.patch')
md5sums=('c735eab2d659a96e5a594c9e8541ad63'
'4cb279ea3beab621f3526bf7b7ab99e5')
build() {
cd ${srcdir}/zlib-$pkgver
./configure --prefix=/usr --shared
make || return 1
make install prefix=${pkgdir}/usr || return 1
chmod 644 ${pkgdir}/usr/lib/libz.a
# see http://bugs.archlinux.org/task/19280
patch -p1 -i ${srcdir}/zlib-1.2.5-lfs-decls.patch || return 1
grep -A 24 '^ Copyright' zlib.h > license.txt
install -Dm644 license.txt ${pkgdir}/usr/share/licenses/zlib/license.txt
./configure --prefix=/usr --shared
make || return 1
grep -A 24 '^ Copyright' zlib.h > LICENSE
}
package() {
cd ${srcdir}/zlib-$pkgver
make install DESTDIR=${pkgdir} || return 1
install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/zlib/LICENSE
}

View file

@ -18,7 +18,7 @@
# ==== Variables to set ====
PLUGSCRIPTDIR=/media/Plugbox/builder/plugapps/scripts/plugscripts
INSTALLEDPKGS="base kernel26-withlinux file openssh openssl heimdal"
RELEASEVER=1.1-rc1
RELEASEVER=1.1
MAKETARGZ=1
MAKEUBIIMG=1
# ==== The Process ====