summaryrefslogtreecommitdiff
path: root/nonsystemd/filesystem/PKGBUILD
blob: 25b59295afccb372a430398d1a5f5da33b15b07f (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
# Maintainer: David P. <megver83@parabola.nu>
# Maintainer (Arch): Sébastien Luttringer
# Contributor (Arch): Tom Gundersen <teg@jklm.no>

pkgname=filesystem
pkgver=2018.8
pkgrel=1.parabola1
pkgrel+=.nonsystemd1
pkgdesc='Base Parabola GNU/Linux-libre files'
arch=('x86_64' 'i686' 'armv7h')
license=('GPL')
url='https://www.parabola.nu'
groups=('base')
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')
sha512sums=('5f268b557257a201c256663b35f510d7fede0093e44645f18dc2a447ece2112d28bd7a60816331b37b72931583eff50d9dc616b9f9e9ff6d8f982db8d5b0c008'
            'b2ddf3db123f757e68a84926223b56a227c6e4fa99f1d06972246625b62f2a1b147f934e1bb4534d326127f8441a39afa6856f6ea2c7ecf6be53391bf0083370'
            '0ade9187a5437076ec7d0f786528b0c4212e4f0c67edb87d8fd71815b144ab2876adeca7d943899d440e26d09ff7f4b3862733dc12decab202048cf640dfd5a8'
            '2d93356e221aba569c47adf6c882d56fd53ae102e4bb17909a35dab505625860a66efe4dcdd0a33f5e85a6d3eabb4b7f9b9e027f1f157a991242d03ab7cbc85e'
            'bc1e8c9be2d4c05992aa640a0862ed6d3822afc0d083d9779268a9a888edcd4527ae49c899f8aaa1878b7650187c9a484d488b159ae58a289a543c4a8cdccbca'
            '629ff56e5f4fd87de570fe5bc9af703efb9725743811541f21b6ada3c4a6e613c3a010029d7d73f4b706e33b3098337659a1ec5e556d11d952335f350ba108a8'
            'ad1d8521ad3ec1c50a6cca68543bb6c3acbe08832257fcfdfa04f1f8bfe8bc4ff91bde2971c7f5d36ee4f50e81c34ff586e28ee79d0a8d055a0b812001970fbc'
            '61cc6de0bdc2feab9f8103e8b47b62fd0493e902797b50d3f813ed405058d4d2682c41c120e3fa0e2a8cf7800929054414d1e06b59fcb280585369895392c4e5'
            'e48b5f08563117b5fe80d4387a60dd874f3554bcc9e6307671bfc0b081aff398d1bbdc902f4a5cb04069d2f0ce5992758cb756dba33fe582124275295253fc03'
            'cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e'
            '5706ecf2cdb02383c39e312117e48a34a78848d89c650456d162c986118790710df01b3371d4cbda089a04053d1b10a93f1502549573dd91705354230455fef0'
            'b8e9b15b7ba65a83c02b1017b9fb9b85486e222cfb5731e8cee350c46c1d67e2209831162465cb9bd191c62ab4aa716a4f38c6899876c5e6e709f784f6350fb4'
            'df24002d74d2d543be0f8b74b36def1eba7054efd8da1943b4422048ece6d41f3e40248c2169c5c1168ba64ede2dfbd6c21d6e70bbe1ba8c82137834327eecea'
            '56cdfbfd0d6d89ab7d1f098813b384740358b2880d7ed640e02ac91e2ca6f66957a24a825cc2303739ce06fdeaa4a86acdfd8796ce6728208ed516a18622ae82'
            '779049d55883fb7edf34ffd050e9d4d09252de529d776f507c1be19fd9688645d9100cf246fcd5b62ca1e1cf5408383ef02f09f3bc11203de33e5ad0ce17cda9'
            '3252ba4ae19a5ff0fe0b5e999016391943614e3c6916305be8cc6ec26533d94bc33f9ea908a8fa3aa19b304979cba1ddb0d0d1daa5a8d18398ce237780c81767'
            '6242431add157cc6b89aa8c1cac97fd83c7f8a7178f4ddf89b01af720002762d749e732920efb752a854a99a3345ec9cc20ab8dc3ce73001281f9ec54629b7c7'
            'c376b93b91dd181cf50b39a187255326aa1c76fb03972353620abb86ac2014631102c9296e11cc805c7409fb346bee827c4736cfb65fb9acf060fd5ca8957e02'
            'c040d3b13b9cb6dea00e88f2d5428c80c4045eeab9b9c1cf47eb1c3bf6b1f613a9f9181cd4133a18a8e15c651de70389d8ecf0ec873259e8a74068da5a24898e'
            '4258736de8e9c0fef5e32526e1edb899513c43e6d7ad183021382f27e192d05021f6bc8ef3b4f7b33a4fae408fc2354273a2e44e68ef720db5c87d5836170667'
            'bdb116224a39b340a91edf99d8a43ee83e3e661d2c863dd7ea5a4e902982e331ecfa593bee67eb562161c24b45ccbd1c89c8511665881aa6876870a09d9a4794')

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 -m755 "$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 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
  }

  # 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-parabola.conf
  ln -sv 10-parabola.conf usr/lib/sysctl.d/10-arch.conf

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

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

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