PKGBUILD 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. # Maintainer (arch): Sébastien Luttringer
  2. # Contributor: Tom Gundersen <teg@jklm.no>
  3. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  4. # Contributor: Nicolás Reynolds <fauno@kiwwwi.com.ar>
  5. # Contributor: bill-auger <bill-auger@programmer.net>
  6. # parabola changes and rationale:
  7. # - parabola branding (os-release,motd,icon,logo)
  8. # - disable dotnet telemetry (redmine #2894)
  9. pkgname=filesystem
  10. pkgver=2023.09.18
  11. pkgrel=1
  12. pkgrel+=.parabola1
  13. pkgdesc='Base Parabola GNU/Linux-libre files'
  14. arch=('x86_64')
  15. arch+=('armv7h' 'i686' 'ppc64le')
  16. license=('GPL')
  17. url='https://www.parabola.nu'
  18. depends=('iana-etc')
  19. backup=('etc/crypttab' 'etc/fstab' 'etc/group' 'etc/gshadow' 'etc/host.conf'
  20. 'etc/hosts' 'etc/issue' 'etc/ld.so.conf' 'etc/nsswitch.conf'
  21. 'etc/passwd' 'etc/profile' 'etc/resolv.conf' 'etc/securetty'
  22. 'etc/shadow' 'etc/shells' 'etc/subuid' 'etc/subgid')
  23. backup+=('etc/motd')
  24. source=('crypttab' 'env-generator' 'fstab' 'group' 'gshadow' 'host.conf' 'hosts'
  25. 'issue' 'ld.so.conf' 'locale.sh' 'nsswitch.conf' 'os-release' 'profile'
  26. 'passwd' 'resolv.conf' 'securetty' 'shadow' 'shells' 'sysctl' 'sysusers'
  27. 'tmpfiles' 'subuid' 'subgid' 'archlinux-logo.svg' 'archlinux-logo.png'
  28. 'archlinux-logo-text.svg' 'archlinux-logo-text-dark.svg')
  29. source=( ${source[*]//archlinux-logo/parabola-logo} )
  30. source+=('motd')
  31. source+=('disable-dotnet-telemetry.sh')
  32. # NOTE: the commented files below, are those which should differ from arch
  33. sha256sums=('e03bede3d258d680548696623d5979c6edf03272e801a813c81ba5a5c64f4f82'
  34. 'ed0cb4f1db4021f8c3b5ce78fdf91d2c0624708f58f36c9cf867f4d93c3bc6da'
  35. 'e54626e74ed8fee4173b62a545ab1c3a3a069e4217a0ee8fc398d9933e9c1696'
  36. '244f0718ee2a9d6862ae59d6c18c1dd1568651eada91a704574fa527fbac2b3a'
  37. '90d879374f77bac47f132164c1e7fc4892e994ff1d1ac376efa0c1c26ea37273'
  38. '4d7b647169063dfedbff5e1e22cee77bd1a4183dbcfd5e802e68939da4bbf733'
  39. 'd9cd8a77d9e0aa5e90d7f4ed74c8745c17b525e720e28e4c44364150003c35f9'
  40. '8b8f24af3454e87b4e316b4978d0de7958a98cc44606aa801d9696d2c21f4385' # issue (branding)
  41. 'dad04a370e488aa85fb0a813a5c83cf6fd981ce01883fc59685447b092de84b5'
  42. '8ca2d8eef6fb5143c9ef7e9174ccfef59ac7ad2deee243574cd10c763156cc10'
  43. 'c8ee7a9faf798caab178ec51afae4146f1efd8a716b7acedf28345b6c75f9697'
  44. '359623c74da854d93e7dcc5335f3e3c95c378af75f640fc728596268ce4391a9' # os-release (branding)
  45. '8f08231922fe185d3132f9aedded5cd688fb7c482a6f6f272402ded82fa4849a'
  46. '5e06477834f51abf42ea4e8dc199632afc6afbfd8c44354685a271e9a48d2c0a'
  47. '5557d8e601b17a80d1ea7de78a9869be69637cb6a02fbfe334e22fdf64e61d4c'
  48. 'd88be2b45b43605ff31dd83d6a138069b6c2e92bc8989b7b9ab9eba8da5f8c7b'
  49. '6e13705ac4d6f69cdba118c6b70c722346fd3c45224133e6bbfe28aca719563c'
  50. 'ec289c03aa0d150e90e8287f001c8e6552ab9dd54f450bdb5c2d2254e477965b'
  51. '89e43a0b7028f52d5c8e7fb961d962c4b4f4e9595880a6157274ddb2c7c0b6b4'
  52. '59877ca8c00192776d06d0c11087083e31e5c5ba6830c4faaa924d858df42f8a' # sysusers (branding)
  53. '5d8e61479f0093852365090e84d8d95b1e7fccfab068274ee25863bde6ff3e07'
  54. 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
  55. 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
  56. 'd5f0a4f75761afd5ebbc6970ac9aba5be3c28bb660adf7118353a0e018911e68' # parabola-logo.svg
  57. 'c6486f4c9456fa62a75727adfcc8f2403a1a9fac29386f942c0678c109cc72e8' # parabola-logo.png
  58. '09838fea00c5ceff6e7ed28bb1b6d62feb1e2471df9fe5a4328071ecb9e837f3' # parabola-logo-text.svg
  59. 'bc9be3442fab17ac6990814db4c0cc76c2ac6112c70a6c103530f607aa54c11e') # parabola-logo-text-dark.svg
  60. sha256sums+=('0018e0387155ee65472f71f0003fcbcb863355d12442150922e7156da12cabad') # motd
  61. sha256sums+=('0869a4e09afceabf9dbc3c46622b254e373eda48af71e2936acd0652c7d3518e') # disable-dotnet-telemetry.sh
  62. prepare() {
  63. # inject OS variant information into os-release
  64. local init='SystemD'
  65. sed -i "s|@VARIANT@|${CARCH} ${init} Edition|" "${srcdir}"/os-release
  66. sed -i "s|@VARIANT_ID@|${CARCH}-${init,,}|" "${srcdir}"/os-release
  67. }
  68. package() {
  69. cd "$pkgdir"
  70. # setup root filesystem
  71. for d in boot dev etc home mnt usr var opt srv/http run; do
  72. install -d -m755 $d
  73. done
  74. install -d -m555 proc
  75. install -d -m555 sys
  76. install -d -m0750 root
  77. install -d -m1777 tmp
  78. # vsftpd won't run with write perms on /srv/ftp
  79. # ftp (uid 14/gid 11)
  80. install -d -m555 -g 11 srv/ftp
  81. # setup /etc and /usr/share/factory/etc
  82. install -d etc/{ld.so.conf.d,skel,profile.d} usr/share/factory/etc
  83. for f in fstab group host.conf hosts issue ld.so.conf nsswitch.conf \
  84. passwd resolv.conf securetty shells profile subuid subgid; do
  85. install -m644 "$srcdir"/$f etc/
  86. install -m644 "$srcdir"/$f usr/share/factory/etc/
  87. done
  88. ln -s ../proc/self/mounts etc/mtab
  89. for f in gshadow shadow crypttab; do
  90. install -m600 "$srcdir"/$f etc/
  91. install -m600 "$srcdir"/$f usr/share/factory/etc/
  92. done
  93. touch etc/arch-release
  94. touch etc/parabola-release
  95. install -m644 "$srcdir"/motd etc/
  96. install -m644 "$srcdir"/locale.sh etc/profile.d/locale.sh
  97. install -Dm644 "$srcdir"/os-release usr/lib/os-release
  98. # stop-gap fix for https://labs.parabola.nu/issues/2894
  99. install -m644 "$srcdir"/disable-dotnet-telemetry.sh etc/profile.d/disable-dotnet-telemetry.sh
  100. # setup /var
  101. for d in cache local opt log/old lib/misc empty; do
  102. install -d -m755 var/$d
  103. done
  104. install -d -m1777 var/{tmp,spool/mail}
  105. # allow setgid games (gid 50) to write scores
  106. install -d -m775 -g 50 var/games
  107. ln -s spool/mail var/mail
  108. ln -s ../run var/run
  109. ln -s ../run/lock var/lock
  110. # setup /usr hierarchy
  111. for d in bin include lib share/{misc,pixmaps} src; do
  112. install -d -m755 usr/$d
  113. done
  114. for d in {1..8}; do
  115. install -d -m755 usr/share/man/man$d
  116. done
  117. # add lib symlinks
  118. ln -s usr/lib lib
  119. [[ $CARCH = 'ppc64le' ]] || \
  120. [[ $CARCH = 'x86_64' ]] && {
  121. ln -s usr/lib lib64
  122. ln -s lib usr/lib64
  123. }
  124. # add bin symlinks
  125. ln -s usr/bin bin
  126. ln -s usr/bin sbin
  127. ln -s bin usr/sbin
  128. # setup /usr/local hierarchy
  129. for d in bin etc games include lib man sbin share src; do
  130. install -d -m755 usr/local/$d
  131. done
  132. ln -s ../man usr/local/share/man
  133. # setup systemd-sysctl
  134. install -D -m644 "$srcdir"/sysctl usr/lib/sysctl.d/10-arch.conf
  135. # setup systemd-sysusers
  136. install -D -m644 "$srcdir"/sysusers usr/lib/sysusers.d/arch.conf
  137. # setup systemd-tmpfiles
  138. install -D -m644 "$srcdir"/tmpfiles usr/lib/tmpfiles.d/arch.conf
  139. # setup systemd.environment-generator
  140. install -D -m755 "$srcdir"/env-generator usr/lib/systemd/system-environment-generators/10-arch
  141. # add logo
  142. install -D -m644 "$srcdir"/parabola-logo{.png,.svg,-text.svg,-text-dark.svg} usr/share/pixmaps
  143. }