summaryrefslogtreecommitdiff
path: root/nonsystemd/filesystem/PKGBUILD
blob: 3631735a55dce061985fb55e30f601967525dc1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Maintainer: David P. <megver83@parabola.nu>
# Maintainer (Arch): Sébastien Luttringer
# Contributor (Arch): Tom Gundersen <teg@jklm.no>

pkgname=filesystem
pkgver=2019.10
pkgrel=1
pkgrel+=.par1
pkgrel+=.nonsystemd1
pkgdesc='Base Parabola GNU/Linux-libre files'
arch=('x86_64' 'i686' 'armv7h' 'ppc64le')
license=('GPL')
url='https://www.parabola.nu'
depends=('iana-etc')
replaces=(filesystem-parabola)
conflicts=(filesystem-parabola)
backup=('etc/crypttab' 'etc/fstab' 'etc/group' 'etc/gshadow' 'etc/host.conf'
        'etc/hosts' 'etc/issue' 'etc/ld.so.conf' 'etc/motd' 'etc/nsswitch.conf'
        'etc/passwd' 'etc/profile' 'etc/resolv.conf' 'etc/securetty'
        'etc/shadow' 'etc/shells')
source=('crypttab' 'fstab' 'group' 'gshadow' 'host.conf' 'hosts'
        'issue' 'ld.so.conf' 'locale.sh' 'motd' 'nsswitch.conf' 'os-release'
        'passwd' 'profile' 'resolv.conf' 'securetty' 'shadow' 'shells' 'sysctl'
        'sysusers' 'tmpfiles' 'parabola.svg' 'parabola.png')
sha512sums=('5f268b557257a201c256663b35f510d7fede0093e44645f18dc2a447ece2112d28bd7a60816331b37b72931583eff50d9dc616b9f9e9ff6d8f982db8d5b0c008'
            'b2ddf3db123f757e68a84926223b56a227c6e4fa99f1d06972246625b62f2a1b147f934e1bb4534d326127f8441a39afa6856f6ea2c7ecf6be53391bf0083370'
            '0ade9187a5437076ec7d0f786528b0c4212e4f0c67edb87d8fd71815b144ab2876adeca7d943899d440e26d09ff7f4b3862733dc12decab202048cf640dfd5a8'
            '2d93356e221aba569c47adf6c882d56fd53ae102e4bb17909a35dab505625860a66efe4dcdd0a33f5e85a6d3eabb4b7f9b9e027f1f157a991242d03ab7cbc85e'
            'bc1e8c9be2d4c05992aa640a0862ed6d3822afc0d083d9779268a9a888edcd4527ae49c899f8aaa1878b7650187c9a484d488b159ae58a289a543c4a8cdccbca'
            '629ff56e5f4fd87de570fe5bc9af703efb9725743811541f21b6ada3c4a6e613c3a010029d7d73f4b706e33b3098337659a1ec5e556d11d952335f350ba108a8'
            '794f6af7ea5b32cdbbda5637890cc1478ee009007e8e4576cd4a7afdfaf45011e81db53faf6094a3334430c5ad6accbbfa51d0232480d68a15027589c1877fee'
            '61cc6de0bdc2feab9f8103e8b47b62fd0493e902797b50d3f813ed405058d4d2682c41c120e3fa0e2a8cf7800929054414d1e06b59fcb280585369895392c4e5'
            'e48b5f08563117b5fe80d4387a60dd874f3554bcc9e6307671bfc0b081aff398d1bbdc902f4a5cb04069d2f0ce5992758cb756dba33fe582124275295253fc03'
            'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e'
            '90d33e4b8826219697708d64829903f49d24e6b53366d4b4276e231e5b9db0b55ec2d30434708823d722a8afc82ce3fd30de608b58225ee5a13977225c49a729'
            '0b0b41845a9a23a4e128bb73d50ad239ed0c55b5f6474cbf788cc1f3ff17277735f1cff2ca5806195041180f1c18e2ab1ccd668164e8447e83fa553f07b45a30'
            'df24002d74d2d543be0f8b74b36def1eba7054efd8da1943b4422048ece6d41f3e40248c2169c5c1168ba64ede2dfbd6c21d6e70bbe1ba8c82137834327eecea'
            '56cdfbfd0d6d89ab7d1f098813b384740358b2880d7ed640e02ac91e2ca6f66957a24a825cc2303739ce06fdeaa4a86acdfd8796ce6728208ed516a18622ae82'
            '779049d55883fb7edf34ffd050e9d4d09252de529d776f507c1be19fd9688645d9100cf246fcd5b62ca1e1cf5408383ef02f09f3bc11203de33e5ad0ce17cda9'
            '3252ba4ae19a5ff0fe0b5e999016391943614e3c6916305be8cc6ec26533d94bc33f9ea908a8fa3aa19b304979cba1ddb0d0d1daa5a8d18398ce237780c81767'
            '6242431add157cc6b89aa8c1cac97fd83c7f8a7178f4ddf89b01af720002762d749e732920efb752a854a99a3345ec9cc20ab8dc3ce73001281f9ec54629b7c7'
            'c376b93b91dd181cf50b39a187255326aa1c76fb03972353620abb86ac2014631102c9296e11cc805c7409fb346bee827c4736cfb65fb9acf060fd5ca8957e02'
            'c040d3b13b9cb6dea00e88f2d5428c80c4045eeab9b9c1cf47eb1c3bf6b1f613a9f9181cd4133a18a8e15c651de70389d8ecf0ec873259e8a74068da5a24898e'
            '22f7c80247f3d2ce617a3fcf56f8404f53d61d49bd2efa4946d037359b859fa33e98d5aecf44c59dcb93e26ebb2914db2a6e55ae003bf691bdba4e6e1d3eb4ff'
            'bdb116224a39b340a91edf99d8a43ee83e3e661d2c863dd7ea5a4e902982e331ecfa593bee67eb562161c24b45ccbd1c89c8511665881aa6876870a09d9a4794'
            '29d6c3953a418f0e345b6e96fb0ad7c39ab2f8165fb0e0a9bc2ad0375c2c8dabc2626e55b8b1394dc3b05009497dc4e4495fea850f1ea97cf4e69656c74b25d2'
            'dd67ac882b02f715a9ad91363186f3a3f5a51e8459a3ea19000732bea23560b9275f6e0a9df1d205c512d0e1d954e37814278207bfc0ddd252c9af4e93a002b9')

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
  # 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 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 -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}

  # allow setgid games (gid 50) to write scores
  install -d -m775 -g 50 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,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
  [[ $CARCH = 'x86_64' ]] && {
    ln -s usr/lib lib64
    ln -s lib usr/lib64
  }
  [[ $CARCH = 'powerpc64le' ]] && {
    ln -s usr/lib lib64
    ln -s lib usr/lib64
  }

  # add bin symlinks
  ln -s usr/bin bin
  ln -s usr/bin sbin
  ln -s bin usr/sbin

  # 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

  # setup sysctl
  install -D -m644 "$srcdir"/sysctl usr/lib/sysctl.d/10-arch.conf

  # setup opensysusers
  install -D -m644 "$srcdir"/sysusers usr/lib/sysusers.d/arch.conf

  # setup opentmpfiles
  install -D -m644 "$srcdir"/tmpfiles usr/lib/tmpfiles.d/arch.conf

  # add logo
  install -D -m644 "$srcdir"/parabola.{svg,png} usr/share/pixmaps
}

# vim:set ts=2 sw=2 et: