From 7f8fb7d122193c6943d2f82eb6d7fe78a3dcab35 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Mon, 14 Jul 2014 03:38:44 -0300 Subject: filesystem-2014.07-1: updating version * move /etc/os-release to /usr/lib/os-release * sync group with gshadow (FS#40953 => https://bugs.archlinux.org/task/40953) * add input group * add lint check to avoid a whole class of bugs --- libre/filesystem/PKGBUILD | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'libre/filesystem/PKGBUILD') diff --git a/libre/filesystem/PKGBUILD b/libre/filesystem/PKGBUILD index 7c5383411..74e507fce 100644 --- a/libre/filesystem/PKGBUILD +++ b/libre/filesystem/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 215050 2014-06-11 23:14:55Z dreisner $ +# $Id: PKGBUILD 216487 2014-07-04 13:14:12Z dreisner $ # Maintainer (Arch): Tom Gundersen # Maintainer: Nicolás Reynolds # Maintainer: André Silva pkgname=filesystem -pkgver=2014.06 -pkgrel=2 +pkgver=2014.07 +pkgrel=1 pkgdesc='Base filesystem (Parabola rebranded)' arch=('i686' 'x86_64' 'mips64el') license=('GPL') @@ -21,7 +21,7 @@ source=('group' 'issue' 'nsswitch.conf' 'securetty' 'host.conf' 'ld.so.conf' 'passwd' 'shadow' 'fstab' 'crypttab' 'hosts' 'motd' 'os-release' 'resolv.conf' 'shells' 'gshadow' 'profile' 'modprobe.d.usb-load-ehci-first' 'parabola.7.txt' 'locale.sh') -md5sums=('89adbc553847ba96b3437234dc224f9d' +md5sums=('d46cb1adf8175888cc827a3dad8857d2' '6be47d893fd49b2e4a8c0e811b350861' '9e4533df61f0c82d6b2e2371f7376282' '4c4540eeb748bf1f71d631b8c1dcf0b3' @@ -36,14 +36,42 @@ md5sums=('89adbc553847ba96b3437234dc224f9d' '0e145e18fea8fd190b30d45764f5707c' '6f48288b6fcaf0065fcb7b0e525413e0' '22518e922891f9359f971f4f5b4e793c' - 'f45389e116ab0b9e9968287617d27c7d' + '09bce9236c3729d31aaa528bcf5d198e' '0b6f835598c7640184e476057b3c7722' 'a8a962370cd0128465d514e6a1f74130' 'd5732ffdb3488e1383d4ea199343e767' '4fab2b798deff348e04f05152111aae0') +lint() { + # ensure that passwd is sync'd to shadow and group is sync'd to gshadow. + local r=0 + + local passwd shadow group gshadow + + for f in passwd shadow group gshadow; do + mapfile -t "$f" < <(cut -d: -f1 "$f" | sort) + done + + # we can cheat and do simple string comparison only because we can make some + # assumptions about the data in these files + if [[ ${passwd[*]} != "${shadow[*]}" ]]; then + error 'passwd is not in sync with shadow!' + r=1 + fi + + if [[ ${group[*]} != "${gshadow[*]}" ]]; then + error 'group is not in sync with gshadow!' + r=1 + fi + + return $r +} + build() { cd ${srcdir} + + lint + a2x -d manpage -f manpage parabola.7.txt } @@ -65,7 +93,7 @@ package() { # setup /etc 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 os-release passwd resolv.conf securetty shells profile; do + 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} etc/ done ln -s /proc/self/mounts etc/mtab @@ -76,6 +104,7 @@ package() { ln -sv parabola-release etc/arch-release install -D -m644 ${srcdir}/modprobe.d.usb-load-ehci-first usr/lib/modprobe.d/usb-load-ehci-first.conf install -m755 ${srcdir}/locale.sh etc/profile.d/locale.sh + install -Dm644 "$srcdir"/os-release "$pkgdir"/usr/lib/os-release # setup /var for d in cache/man local opt log/old lib/misc empty; do -- cgit v1.2.3-54-g00ecf