summaryrefslogtreecommitdiff
path: root/libre-testing
diff options
context:
space:
mode:
authorFreemor <freemor@freemor.ca>2019-05-21 13:25:05 -0300
committerFreemor <freemor@freemor.ca>2019-05-21 13:25:05 -0300
commit77b371e7b7e2e0cea84fcff566dea1aa423ae656 (patch)
tree6114290ecc6be0b858974fdbab5a850e6b5c92a3 /libre-testing
parent114cac988d37036e832b6a2154ce347e8d915088 (diff)
Initial work on a package to address the Third Party Package Managar issue.
Diffstat (limited to 'libre-testing')
-rw-r--r--libre-testing/your-system-sanity/PKGBUILD23
-rw-r--r--libre-testing/your-system-sanity/TPPM.hook17
-rwxr-xr-xlibre-testing/your-system-sanity/TPPMwarn29
3 files changed, 69 insertions, 0 deletions
diff --git a/libre-testing/your-system-sanity/PKGBUILD b/libre-testing/your-system-sanity/PKGBUILD
new file mode 100644
index 000000000..a8e162dcc
--- /dev/null
+++ b/libre-testing/your-system-sanity/PKGBUILD
@@ -0,0 +1,23 @@
+# Maintainer: Parabola Project <dev@lists.parabola.nu>
+
+pkgname=your-system-sanity
+pkgdesc="This package Warns about and fails to install/upgrade any offending Third Party Package Manager."
+license=('GPL3')
+url="https://git.parabola.nu/abslibre.git"
+pkgver=0.1
+pkgrel=1
+
+arch=('any')
+depends=('pacman')
+groups=('base' 'base-openrc')
+
+source=('TPPM.hook' 'TPPMwarn')
+sha512sums=('fdba07a1f8b94e2a69336b8e25ce48bb1baa3af0bf29e86d11571ab5d4ff6344748fa0fd0f939b7e491986a27810aab59e541a50e02f6a70efefdda1695e32a4'
+ 'cc30673b8bdf63c8de6cb0cdd4397f93f3c855a051ce194cb3d2459f83728d8749b661dfab33ae961b64ba6ec4809946421806c596e459101f1da28d2fec6876')
+
+package() {
+ cd "$srcdir"
+
+ install -Dm755 TPPMwarn "$pkgdir"/usr/bin/TPPMwarn
+ install -Dm644 TPPM.hook "$pkgdir"/etc/pacman.d/hooks/TPPM.hook
+}
diff --git a/libre-testing/your-system-sanity/TPPM.hook b/libre-testing/your-system-sanity/TPPM.hook
new file mode 100644
index 000000000..d3ec1c2d1
--- /dev/null
+++ b/libre-testing/your-system-sanity/TPPM.hook
@@ -0,0 +1,17 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Type = Package
+Target = python-pip
+Target = wesnoth
+Target = openttd
+Target = rubygems
+
+
+[Action]
+Description = Warn user about Third Party Package Managers
+Depends = coreutils
+When = PreTransaction
+NeedsTargets
+Exec = /usr/bin/TPPMwarn
+AbortOnFail
diff --git a/libre-testing/your-system-sanity/TPPMwarn b/libre-testing/your-system-sanity/TPPMwarn
new file mode 100755
index 000000000..9a3271f08
--- /dev/null
+++ b/libre-testing/your-system-sanity/TPPMwarn
@@ -0,0 +1,29 @@
+#!/usr/bin/bash
+#
+# This is the script companion to the ALPM-hook file TPPM.hook
+# The purpose of this script is to warn about Third Party Package Managers
+
+#Get and print the offending Package name from stdin
+read PACKAGE
+echo -e "\n*** "$PACKAGE" ***\n"
+
+#Print the big scary warning
+cat << EOF
+This is a Third Party Package Manager.
+
+ By Installing this Third party package manager you assume all responsibility for
+any system or freedom issues it may cause as there is no viable way for Parabola
+Devs to police the packages provided by this Third party package manager.
+
+To be clear, using this software may:
+
+ Result in violation of one or all of your four freedoms.
+ Result in you system becoming broken or unstable.
+ All of the above.
+
+ If you absolutely need the above package you'll have to uninstall
+your-system-sanity first.
+EOF
+
+#Exit with fail so package is not installed.
+exit 1