From a88f46f60144321454de3d3d7f310f89b4d6ec24 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Sat, 6 Jan 2018 02:36:12 -0500 Subject: Add filesystem-nosystemd --- pcr/filesystem-nosystemd/PKGBUILD | 167 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 pcr/filesystem-nosystemd/PKGBUILD (limited to 'pcr/filesystem-nosystemd/PKGBUILD') diff --git a/pcr/filesystem-nosystemd/PKGBUILD b/pcr/filesystem-nosystemd/PKGBUILD new file mode 100644 index 000000000..a9b83fbe0 --- /dev/null +++ b/pcr/filesystem-nosystemd/PKGBUILD @@ -0,0 +1,167 @@ +# $Id$ +# Maintainer (Arch): Sébastien Luttringer +# Contributor (Arch): Tom Gundersen +# Maintainer: Omar Vega Ramos +# Contributor: Nicolás Reynolds + +pkgname=filesystem-nosystemd +pkgver=2017.10 +pkgrel=2.parabola2 +pkgdesc='Base Parabola GNU/Linux-libre files' +arch=('i686' 'x86_64' 'armv7h') +license=('GPL') +url='https://www.parabola.nu' +groups=('base-openrc') +install='filesystem.install' +makedepends=('asciidoc') +depends=('iana-etc') +provides=("filesystem=$pkgver") +replaces=(filesystem-parabola) +conflicts=(filesystem-parabola filesystem) +backup=('etc/fstab' 'etc/crypttab' 'etc/group' 'etc/hosts' 'etc/ld.so.conf' 'etc/passwd' + 'etc/shadow' 'etc/gshadow' 'etc/resolv.conf' 'etc/motd' 'etc/nsswitch.conf' + 'etc/shells' 'etc/host.conf' 'etc/securetty' 'etc/profile' 'etc/issue') +source=('group' 'issue' 'nsswitch.conf' 'securetty' 'host.conf' 'ld.so.conf' + 'passwd' 'shadow' 'fstab' 'crypttab' 'hosts' 'motd' 'os-release' 'resolv.conf' + 'shells' 'gshadow' 'profile' 'parabola.7.txt' 'locale.sh') +sha256sums=('faed5839ed5e6797d7fc67f7fc0b003554d32250f3ae2d3241603c70cdc646b0' + '3ad448c78cab733759ae3365620504b1444e854effd066f1c7174652f046ebe1' + 'e9fd66742e96d16f4a244a3037522467c12e301f8e1337cda61eb67b78198534' + 'f7b38167196943d8fb9d2e75358c7262d5fe1082b257c4c8caffe3b6de429cb5' + 'f21f35e7d3083aeee19beb48478130d119b2572922a4889df98326d551540eda' + '00d5d103837480d26cd350753382c3211df6bc304ee59ffaab130fad108f6a86' + 'a55259d43b287c35ee94c736f79eea68c72318e67e5f7b8c0a6dfbcf0d4fee13' + '34b820ca01b9ad7e4792e92122b39e891e647c016b7ecccb220d6f4e72eee5c7' + '86dff00854a7f2280bb799484ccc39ad449a171448926880742ae64f41666a43' + '05c90d4208ae9a59156fa6449b00d92cd3dc1aba8ae746bd78e813a74e309ede' + '13d1f59c1d0860bf43da996e2b9a6ab2744791614241ed9a1376b7e7e30de3a8' + 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' + 'b4b5823ea612d18b8aaa59e3c662fb756001f1ce2fcc936a4d741b11002ed19d' + '74d2be3dd69600bcf0da751a1804a386bf4ad143b76d79c336acaa5c600e7991' + '6cff886fe9e23096d5f67b7857a747ebaf10431be5a2afc40236de5ad13a654f' + '33d4bec57c59f378e79ed8f3e4387e65fdd5cfd3d551d7cb015f7cf5cfad72f5' + '93d7d21f7e5a644ba533847beff35167efc4624571c9b68bea6cf2b6a13ab5ff' + '887e2fe6128172ab737d45b6703728ceef80d066ef64ee16eb9db22bef676734' + '331805ff85b80ae2444be58740f1cf41be56fb6e254e930677f1e36e8f95bee1') + + +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 +} + +package() { + cd "$pkgdir" + + # + # setup root filesystem + # + for d in boot dev etc home mnt usr var opt srv/http run; do + install -d -m755 $d + done + install -d -m555 proc + install -d -m555 sys + install -d -m0750 root + install -d -m1777 tmp + # vsftpd won't run with write perms on /srv/ftp + install -d -m555 -g ftp srv/ftp + + # setup /etc and /usr/share/factory/etc + install -d etc/{ld.so.conf.d,skel,profile.d} usr/share/factory/etc + 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/ + install -m644 "$srcdir"/$f usr/share/factory/etc/ + done + ln -s ../proc/self/mounts etc/mtab + for f in gshadow shadow crypttab; do + install -m600 "$srcdir"/$f etc/ + install -m600 "$srcdir"/$f usr/share/factory/etc/ + done + touch etc/parabola-release + ln -sv parabola-release etc/arch-release + install -m755 "$srcdir"/locale.sh etc/profile.d/locale.sh + install -Dm644 "$srcdir"/os-release "$pkgdir"/usr/lib/os-release + ln -s ../usr/lib/os-release etc/os-release + + # setup /var + for d in cache local opt log/old lib/misc empty; do + install -d -m755 var/$d + done + install -d -m1777 var/{tmp,spool/mail} + + # allow setgid games to write scores + install -d -m775 -g games var/games + ln -s spool/mail var/mail + ln -s ../run var/run + ln -s ../run/lock var/lock + + # + # setup /usr hierarchy + # + for d in bin include lib share/misc src; do + install -d -m755 usr/$d + done + for d in $(seq 8); do + install -d -m755 usr/share/man/man$d + done + + # + # add lib symlinks + # + ln -s usr/lib "$pkgdir"/lib + [[ $CARCH = 'x86_64' ]] && ( + ln -s usr/lib "$pkgdir"/lib64 + ln -s lib "$pkgdir"/usr/lib64 + ) + + # + # add bin symlinks + # + ln -s usr/bin "$pkgdir"/bin + ln -s usr/bin "$pkgdir"/sbin + ln -s bin "$pkgdir"/usr/sbin + + # + # install parabola(7) manpage + # + install -D -m644 "$srcdir"/parabola.7 usr/share/man/man7/parabola.7 + + # + # setup /usr/local hierarchy + # + for d in bin etc games include lib man sbin share src; do + install -d -m755 usr/local/$d + done + ln -s ../man usr/local/share/man + + # remove conflict with systemd + rm usr/share/factory/etc/nsswitch.conf +} -- cgit v1.2.3