PKGBUILD 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # SPDX-License-Identifier: CC0-1.0
  2. # Maintainer: Parabola Hackers <dev@lists.parabola.nu>
  3. # NOTE: This PKGBUILD does not need to be edited manually.
  4. # The package is normally built automatically by the auto-builder.
  5. # To generate a new package, simply push changes to blacklist.git.
  6. # If ${pkgname}-blacklist.txt is modified, the auto-builder will
  7. # replace $pkgver, $_srcver, and the checksum (updpkgsums),
  8. # build and publish the package, and commit the changes to abslibre.
  9. pkgname=your-privacy
  10. pkgver=20240212
  11. _srcver=6837f3645efbe7b2b22d27938accba27dad7da46
  12. pkgrel=1
  13. pkgdesc="This package will remove support for protocols and services known to endanger privacy."
  14. arch=(any)
  15. url=https://wiki.parabola.nu/Blacklist
  16. license=(custom:CCPL:zero)
  17. # license=('CCPL:zero') # TODO: NYI
  18. makedepends=(librelib)
  19. backup=(etc/NetworkManager/conf.d/20-connectivity.conf)
  20. install=${pkgname}.install
  21. _srcname=${pkgname}-blacklist-${_srcver}.txt
  22. source=(${_srcname}::https://git.parabola.nu/blacklist.git/plain/${pkgname}-blacklist.txt?id=${_srcver})
  23. source+=(archlinux-keyring.hook)
  24. sha256sums=('51bc5ed40f5ac65b5cd0bf2846675f94a4bc6c0487f7a981707ee101ef0e966e'
  25. '908ee242989fbf932ff013238ad9c56f9b318c21988199a7dcf404df058d4879')
  26. package()
  27. {
  28. # collect blacklisted package names as pacman conflicts
  29. conflicts=( $( libreblacklist normalize < ${_srcname} | \
  30. cut -d: -f1,2 | sed -n 's/:$//p' | sort -u ) )
  31. install -Dm644 ${_srcname} "${pkgdir}"/usr/share/doc/${pkgname}/blacklist.txt
  32. # disable automatic archlinux-keyring refresh
  33. install -Dm644 archlinux-keyring.hook "${pkgdir}"/usr/share/libalpm/hooks/archlinux-keyring.hook
  34. # disable NetworkManager connectviity check
  35. # TODO: This may disable some user-friendliness features.
  36. # Something a bit more sophisticated may be needed,
  37. # such as a source-level replacement check:
  38. # $ dns_ip=$(sed 's|^nameserver ||p;d' /etc/resolv.conf) ; [[ -n "${dns_ip}" ]] && ping -c 1 ${dns_ip} &> /dev/null ;
  39. # As of now, we are over-riding 'networkmanager' only for [nonsystemd],
  40. # which already changes the target URI to parabola.nu.
  41. # This simple solution is an attempt to avoid also packaging it for [nonprism].
  42. install -Dm644 /dev/stdin "${pkgdir}"/etc/NetworkManager/conf.d/20-connectivity.conf <<EOF
  43. [connectivity]
  44. uri=https://www.parabola.nu/static/nm-check.txt
  45. enabled=false
  46. EOF
  47. }