summaryrefslogtreecommitdiff
path: root/libre/filesystem/PKGBUILD
blob: 0fa3ca06f858e0a9690def9a2cebd335b0c0b881 (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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# Maintainer (Arch): Sébastien Luttringer
# Contributor (Arch): Tom Gundersen <teg@jklm.no>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Nicolás Reynolds <fauno@kiwwwi.com.ar>

pkgname=filesystem
pkgver=2018.12
pkgrel=2
pkgrel+=.par2
pkgdesc='Base Parabola GNU/Linux-libre files'
arch=('i686' 'x86_64' 'armv7h' 'ppc64le')
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' 'env-generator' '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')
md5sums=('5fa6674df7645d7f5895f2d12b4ef4e9'
         '2b0344e9639f35f3c0d5637a23556089'
         'e33f6dfdd61978fcb3ddf1431286e05a'
         '7fed1e1fb855e41a6d64d41f8521d69a'
         '1c1e3b08acfa286f4b417c49de3e4366'
         '7d119a9cce152aa182fb3392ddeecea7'
         'a1315ea3e2b64d197b6efaf9c14ff778'
         '50d7534eb401aeeff3fec43cdea1c616'
         '5deb9f890a4d08a245e9752ede77271e'
         '580cf8b59eebfaac4fad373ffadc9912'
         'd41d8cd98f00b204e9800998ecf8427e'
         '981ee4d7e506a9d6d9ed2d872e16004b'
         'afdb512931a0fb34e59b67df5ac7f02d'
         '5182ac38a0de85da8ade93ef71975ca4'
         '2c79e1762978235e7b4a9ef595f6c029'
         '0ee015fad07732676d9488ae498eed41'
         'f04bcb2803afc4dcb95670fe87343b4d'
         'f64466dd77c7bec37a8b47681468211a'
         'a78cd8d7f8240a8448edee82f503c34e'
         'a51847c012555c843dbdf8df0da171d3'
         '9010c45efc9156e6f57f641ce43f9ad7'
         '0267a3a463f35eec8a31f40a720dfd86')
sha256sums=('e03bede3d258d680548696623d5979c6edf03272e801a813c81ba5a5c64f4f82'
            'ed0cb4f1db4021f8c3b5ce78fdf91d2c0624708f58f36c9cf867f4d93c3bc6da'
            'e54626e74ed8fee4173b62a545ab1c3a3a069e4217a0ee8fc398d9933e9c1696'
            '244f0718ee2a9d6862ae59d6c18c1dd1568651eada91a704574fa527fbac2b3a'
            '90d879374f77bac47f132164c1e7fc4892e994ff1d1ac376efa0c1c26ea37273'
            '4d7b647169063dfedbff5e1e22cee77bd1a4183dbcfd5e802e68939da4bbf733'
            'd9cd8a77d9e0aa5e90d7f4ed74c8745c17b525e720e28e4c44364150003c35f9'
            '8b8f24af3454e87b4e316b4978d0de7958a98cc44606aa801d9696d2c21f4385'
            'dad04a370e488aa85fb0a813a5c83cf6fd981ce01883fc59685447b092de84b5'
            '8ca2d8eef6fb5143c9ef7e9174ccfef59ac7ad2deee243574cd10c763156cc10'
            'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
            '2af11d071689f648859a65dd9fbb677bfaa89b0935676e4f1df769e9a90f73a9'
            '790e27d0c37afab5a2816f8a848b38b3298efde88fd4ee655adc27bd60901e15'
            '5e06477834f51abf42ea4e8dc199632afc6afbfd8c44354685a271e9a48d2c0a'
            '5da078777cda24e4df697e2928451723f2303bfdbb2ce9551c822188c7945d25'
            '5557d8e601b17a80d1ea7de78a9869be69637cb6a02fbfe334e22fdf64e61d4c'
            'd88be2b45b43605ff31dd83d6a138069b6c2e92bc8989b7b9ab9eba8da5f8c7b'
            '8ce994663d7588143ad7ed4441b07f468f4f7d3590164dd73ddfa3ea307ece8e'
            'c390b31fffc4a2b5d78ae8c89f5317aadef1f71baac09cfb467b675db1406d61'
            '89e43a0b7028f52d5c8e7fb961d962c4b4f4e9595880a6157274ddb2c7c0b6b4'
            '04dd4cbe5078f5181176ade3a82f333e3f48091b118360d69cc45a3526503818'
            '618ac097441c1f2daffc9967e5c3cd18ea8866f776db62d04bf401c53907b1c9')

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 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 systemd-sysctl
  install -D -m644 "$srcdir"/sysctl usr/lib/sysctl.d/10-arch.conf

  # setup systemd-sysusers
  install -D -m644 "$srcdir"/sysusers usr/lib/sysusers.d/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
}

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