# Based on Arch-ARM PKGBUILD
pkgname=filesystem
pkgver=2024.01.19
pkgrel=3
pkgdesc='Base files'
arch=('any')
license=('GPL-3.0-or-later')
depends=('iana-etc')
backup=('etc/crypttab' 'etc/fstab' 'etc/group' 'etc/gshadow' 'etc/host.conf'
'etc/hosts' 'etc/issue'
'etc/passwd' 'etc/profile' 'etc/resolv.conf' 'etc/securetty'
'etc/shadow' 'etc/shells' 'etc/subuid' 'etc/subgid')
source=('crypttab' 'env-generator' 'fstab' 'group' 'gshadow' 'host.conf' 'hosts'
'issue' 'locale.sh' 'os-release' 'profile'
'passwd' 'resolv.conf' 'securetty' 'shadow' 'shells' 'sysctl'
'tmpfiles' 'subuid' 'subgid' '50-armlfs.preset'
)
package() {
cd "$pkgdir"
# setup root filesystem
for d in boot dev etc home mnt usr var opt srv/http; do
install -d -m755 $d
done
install -d -m555 proc
install -d -m555 sys
install -d -m0750 root
install -d -m1777 tmp
install -d -m1777 run
# vsftpd won't run with write perms on /srv/ftp
# ftp (uid 14/gid 11)
install -d -m555 -g 11 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 \
passwd resolv.conf securetty shells profile subuid subgid; 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
install -m644 "$srcdir"/locale.sh etc/profile.d/locale.sh
install -Dm644 "$srcdir"/os-release usr/lib/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}
ln -s spool/mail var/mail
ln -s ../run var/run
ln -s ../run/lock var/lock
# setup /usr hierarchy
for d in sbin bin include lib libexec share/{misc,pixmaps} src; do
install -d -m755 usr/$d
done
for d in {1..8}; do
install -d -m755 usr/share/man/man$d
done
# add lib symlinks
ln -s usr/lib lib
# add bin symlinks
ln -s usr/bin bin
ln -s usr/sbin sbin
# setup /usr/local hierarchy
for d in bin etc include lib sbin share src; do
install -d -m755 usr/local/$d
done
install -d -m755 usr/local/share/man
# setup systemd-sysctl
install -D -m644 "$srcdir"/sysctl usr/lib/sysctl.d/10-arch.conf
# setup systemd-tmpfiles
install -D -m644 "$srcdir"/tmpfiles usr/lib/tmpfiles.d/arch.conf
# setup systemd.environment-generator
install -D -m755 "$srcdir"/env-generator usr/lib/systemd/system-environment-generators/10-arch
# include the ARMLFS service presets
install -d -m755 usr/lib/systemd/system-preset
install -m644 "$srcdir"/50-armlfs.preset usr/lib/systemd/system-preset/
}
# vim:set ts=2 sw=2 et:
sha256sums=('e03bede3d258d680548696623d5979c6edf03272e801a813c81ba5a5c64f4f82'
'b3dec00b70485733e56ed916b357fb58a21177e1ce66f6a3df5b6d61ce339dbb'
'e54626e74ed8fee4173b62a545ab1c3a3a069e4217a0ee8fc398d9933e9c1696'
'9695d24aace4ca0a9b3e16e940b02becbd59edc33e26c3b8e34ac4b597ac3222'
'ea0208d0f88681c0f78859fcb754eba4dcdd8f70739a3fcf53f7ce80e6f31e9c'
'4d7b647169063dfedbff5e1e22cee77bd1a4183dbcfd5e802e68939da4bbf733'
'494ceb597fed92dac3e6b357a3be85189baeb744064e167f141cb8eaecaae96b'
'e24085331d91b0cc2d2187ef6fc29b8e834a20c1f72cef6cae28bdba7ce782b6'
'8ca2d8eef6fb5143c9ef7e9174ccfef59ac7ad2deee243574cd10c763156cc10'
'cfd4d8cb5fb824dd942403d05573257802d0dfd622063facbd6250e0e4a713a0'
'8f08231922fe185d3132f9aedded5cd688fb7c482a6f6f272402ded82fa4849a'
'23e719c223ed68f8f46998dd1d2aab61f6daa82507b263181137434705f67616'
'5557d8e601b17a80d1ea7de78a9869be69637cb6a02fbfe334e22fdf64e61d4c'
'd88be2b45b43605ff31dd83d6a138069b6c2e92bc8989b7b9ab9eba8da5f8c7b'
'a158a55793e70ea6093f5cdc958c07ca4391712b34d9b3b797e4afd2cd0336f6'
'ec289c03aa0d150e90e8287f001c8e6552ab9dd54f450bdb5c2d2254e477965b'
'89e43a0b7028f52d5c8e7fb961d962c4b4f4e9595880a6157274ddb2c7c0b6b4'
'32b3bf0c65df838e1b297f0c23a7b457338cc21104cb55d9391d88fec9dd8440'
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
'608192053cfd7627984b62e76123c6dcc8d0d76e5436771b56ac8bae879c1303')