diff options
author | André Fabian Silva Delgado <andre@pc-01.localdomain> | 2012-03-21 03:59:16 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <andre@pc-01.localdomain> | 2012-03-21 03:59:16 -0300 |
commit | 0212c0ce631bcbe6862388700bed7b9db07c1f34 (patch) | |
tree | cd4c3eea6a5435784facbc05756e26a951c29f7d /libre/filesystem | |
parent | 1ca6df9dae3ff18655f6281507f6f70eb81c8ae8 (diff) |
libre/filesystem
Diffstat (limited to 'libre/filesystem')
-rw-r--r-- | libre/filesystem/PKGBUILD | 53 | ||||
-rw-r--r-- | libre/filesystem/filesystem.install | 26 |
2 files changed, 41 insertions, 38 deletions
diff --git a/libre/filesystem/PKGBUILD b/libre/filesystem/PKGBUILD index 733d34aa3..e9282b5aa 100644 --- a/libre/filesystem/PKGBUILD +++ b/libre/filesystem/PKGBUILD @@ -1,9 +1,10 @@ -# $Id: PKGBUILD 147201 2012-01-24 06:36:12Z bisson $ +# $Id: PKGBUILD 150594 2012-02-18 18:25:33Z tomegun $ # Maintainer: Tom Gundersen <teg@jklm.no> # Maintainer (Parabola): fauno <fauno@kiwwwi.com.ar> +# Contributor (Parabola): André Silva <andre.paulista@adinet.com.uy> pkgname=filesystem -pkgver=2011.12 +pkgver=2012.2 pkgrel=2 pkgdesc='Base filesystem for Parabola' arch=('any') @@ -37,51 +38,53 @@ md5sums=('772fe869b921698cc3e6fde73c4ac85a' 'a8a962370cd0128465d514e6a1f74130') package() { - cd ${srcdir} + cd ${pkgdir} # # setup root filesystem # for d in bin boot dev etc home lib/modules media mnt sbin usr var opt srv/http sys run; do - install -d -m755 ${pkgdir}/${d} + install -d -m755 ${d} done - install -d -m555 ${pkgdir}/proc - install -d -m0750 ${pkgdir}/root - install -d -m1777 ${pkgdir}/tmp + install -d -m555 proc + install -d -m0750 root + install -d -m1777 tmp # vsftpd won't run with write perms on /srv/ftp - install -d -m555 -g ftp ${pkgdir}/srv/ftp + install -d -m555 -g ftp srv/ftp # setup /etc - install -d ${pkgdir}/etc/{ld.so.conf.d,skel,profile.d} + install -d etc/{ld.so.conf.d,skel,profile.d} for f in fstab group host.conf hosts issue ld.so.conf motd nsswitch.conf passwd resolv.conf securetty shells profile; do - install -m644 ${srcdir}/${f} ${pkgdir}/etc/ + install -m644 ${srcdir}/${f} etc/ done - ln -s /proc/self/mounts ${pkgdir}/etc/mtab + ln -s /proc/self/mounts etc/mtab for f in gshadow shadow crypttab; do - install -m600 ${srcdir}/${f} ${pkgdir}/etc/ + install -m600 ${srcdir}/${f} etc/ done - touch ${pkgdir}/etc/arch-release - install -D -m644 ${srcdir}/modprobe.d.usb-load-ehci-first ${pkgdir}/lib/modprobe.d/usb-load-ehci-first.conf + touch etc/arch-release + install -D -m644 ${srcdir}/modprobe.d.usb-load-ehci-first lib/modprobe.d/usb-load-ehci-first.conf # setup /var - for d in cache/man local opt log/old lib/misc empty; do - install -d -m755 ${pkgdir}/var/${d} + for d in cache/man local opt log/old lib/misc empty run; do + install -d -m755 var/${d} done - install -d -m1777 ${pkgdir}/var/{tmp,spool/mail} + install -d -m1777 var/{tmp,spool/mail,lock} # allow setgid games to write scores - install -d -m775 -g games ${pkgdir}/var/games - ln -s /var/spool/mail ${pkgdir}/var/mail - ln -s /run ${pkgdir}/var/run - ln -s /run/lock ${pkgdir}/var/lock + install -d -m775 -g games var/games + ln -s spool/mail var/mail + # not ready yet, needs possible change in pacman or other magic + # is fixed by initscripts on next boot +# ln -s ../run var/run +# ln -s ../run/lock var/lock # # setup /usr hierarchy # for d in bin include lib sbin share/misc src; do - install -d -m755 ${pkgdir}/usr/${d} + install -d -m755 usr/${d} done for d in $(seq 8); do - install -d -m755 ${pkgdir}/usr/share/man/man${d} + install -d -m755 usr/share/man/man${d} done @@ -89,7 +92,7 @@ package() { # setup /usr/local hierarchy # for d in bin etc games include lib man sbin share src; do - install -d -m755 ${pkgdir}/usr/local/${d} + install -d -m755 usr/local/${d} done - ln -s ../man ${pkgdir}/usr/local/share/man + ln -s ../man usr/local/share/man } diff --git a/libre/filesystem/filesystem.install b/libre/filesystem/filesystem.install index 0ecc27e65..38d21a85b 100644 --- a/libre/filesystem/filesystem.install +++ b/libre/filesystem/filesystem.install @@ -1,24 +1,24 @@ post_install() { [ -f var/log/lastlog ] || : >var/log/lastlog [ -f var/log/wtmp ] || : >var/log/wtmp - [ -f var/log/btmp ] || (: >var/log/btmp && bin/chmod 600 var/log/btmp) + [ -f var/log/btmp ] || (: >var/log/btmp && chmod 600 var/log/btmp) # workaround for bug #7194 # readded due to bug #9465 # please do not remove! - bin/chmod 1777 var/spool/mail tmp var/tmp var/lock + chmod 1777 var/spool/mail tmp var/tmp var/lock } # args: <group> [options] _addgroup() { - if ! bin/grep -q "^$1:" etc/group; then - usr/sbin/groupadd ${@} >/dev/null + if ! getent group "$1"; then + groupadd "$@" >/dev/null fi } # args: <group> [options] _adduser() { - if ! bin/grep -q "^$1:" etc/passwd; then - usr/sbin/useradd ${@} >/dev/null + if ! getent passwd "$1"; then + useradd "$@" >/dev/null fi } @@ -37,23 +37,23 @@ post_upgrade() { _addgroup games -g 50 _addgroup uucp -g 14 _addgroup http -g 33 - _adduser http -u 33 -d /srv/http -g http -s /bin/false http + _adduser http -u 33 -d /srv/http -g http -s /bin/false _addgroup scanner -g 96 _addgroup rfkill -g 24 # sync gshadow to group (fixes FS#19869 - if ! bin/grep -q '^rfkill:' etc/gshadow; then - usr/sbin/grpconv >/dev/null + if ! grep -q '^rfkill:' etc/gshadow; then + grpconv >/dev/null fi - if ! bin/grep -q '^include /etc/ld.so.conf.d/\*.conf$' etc/ld.so.conf; then - bin/echo 'include /etc/ld.so.conf.d/*.conf' >> etc/ld.so.conf + if ! grep -q '^include /etc/ld.so.conf.d/\*.conf$' etc/ld.so.conf; then + echo 'include /etc/ld.so.conf.d/*.conf' >> etc/ld.so.conf fi # set "Last password change" > 0; otherwise su $user wont work for user in bin daemon mail ftp http nobody; do - if LANG=C usr/bin/chage -l ${user} | bin/grep -q 'password must be changed'; then - usr/bin/chage -d 14871 ${user} + if LANG=C chage -l ${user} | grep -q 'password must be changed'; then + chage -d 14871 ${user} fi done } |