aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormadmurphy <madmurphy333@gmail.com>2022-06-12 15:33:39 +0100
committermadmurphy <madmurphy333@gmail.com>2022-06-12 15:33:39 +0100
commit22082c234c2013c65fc49a59d01c467a78c12f3e (patch)
treefaeb77ea21fc383c11d7226970461287dabf6776
parentff7753975e287cb60df51b6ce6a51241c8f4ed59 (diff)
downloadgnunet-22082c234c2013c65fc49a59d01c467a78c12f3e.tar.gz
gnunet-22082c234c2013c65fc49a59d01c467a78c12f3e.zip
Add Arch packages
-rw-r--r--contrib/Makefile.am28
-rw-r--r--contrib/packages/arch/gnunet-git/.SRCINFO73
-rw-r--r--contrib/packages/arch/gnunet-git/PKGBUILD128
-rw-r--r--contrib/packages/arch/gnunet-git/gnunet-system.service13
-rw-r--r--contrib/packages/arch/gnunet-git/gnunet-uri.desktop9
-rw-r--r--contrib/packages/arch/gnunet-git/gnunet-user.conf3
-rw-r--r--contrib/packages/arch/gnunet-git/gnunet-user.service10
-rw-r--r--contrib/packages/arch/gnunet-git/gnunet.install54
-rw-r--r--contrib/packages/arch/gnunet-git/gnunet.sysusers3
-rw-r--r--contrib/packages/arch/gnunet-git/gnunet.tmpfiles9
-rw-r--r--contrib/packages/arch/gnunet/.SRCINFO72
-rw-r--r--contrib/packages/arch/gnunet/PKGBUILD118
-rw-r--r--contrib/packages/arch/gnunet/gnunet-system.service13
-rw-r--r--contrib/packages/arch/gnunet/gnunet-uri.desktop9
-rw-r--r--contrib/packages/arch/gnunet/gnunet-user.conf3
-rw-r--r--contrib/packages/arch/gnunet/gnunet-user.service10
-rw-r--r--contrib/packages/arch/gnunet/gnunet.install54
-rw-r--r--contrib/packages/arch/gnunet/gnunet.sysusers3
-rw-r--r--contrib/packages/arch/gnunet/gnunet.tmpfiles9
19 files changed, 616 insertions, 5 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index e05e9caf9..801eacecf 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -42,9 +42,6 @@ INITD_FILES = \
42 services/openrc/gnunet.initd 42 services/openrc/gnunet.initd
43 43
44PACKAGES_FILES = \ 44PACKAGES_FILES = \
45 packages/guix/guix-env-py2.scm \
46 packages/guix/guix-env-gillmann.scm \
47 packages/guix/notest-guix-env.scm \
48 packages/alpine/gnunet-gtk/APKBUILD \ 45 packages/alpine/gnunet-gtk/APKBUILD \
49 packages/alpine/gnurl/APKBUILD \ 46 packages/alpine/gnurl/APKBUILD \
50 packages/alpine/gnunet/gnunet-user-services.initd \ 47 packages/alpine/gnunet/gnunet-user-services.initd \
@@ -57,9 +54,30 @@ PACKAGES_FILES = \
57 packages/alpine/gnunet/gnunet.pre-install \ 54 packages/alpine/gnunet/gnunet.pre-install \
58 packages/alpine/gnunet/gnunet-system-services.initd \ 55 packages/alpine/gnunet/gnunet-system-services.initd \
59 packages/alpine/gnunet/gnunet-gns-proxy.initd \ 56 packages/alpine/gnunet/gnunet-gns-proxy.initd \
57 packages/arch/gnunet-git/gnunet.install \
58 packages/arch/gnunet-git/gnunet-system.service \
59 packages/arch/gnunet-git/gnunet.sysusers \
60 packages/arch/gnunet-git/gnunet.tmpfiles \
61 packages/arch/gnunet-git/gnunet-uri.desktop \
62 packages/arch/gnunet-git/gnunet-user.conf \
63 packages/arch/gnunet-git/gnunet-user.service \
64 packages/arch/gnunet-git/PKGBUILD \
65 packages/arch/gnunet-git/.SRCINFO \
66 packages/arch/gnunet/gnunet.install \
67 packages/arch/gnunet/gnunet-system.service \
68 packages/arch/gnunet/gnunet.sysusers \
69 packages/arch/gnunet/gnunet.tmpfiles \
70 packages/arch/gnunet/gnunet-uri.desktop \
71 packages/arch/gnunet/gnunet-user.conf \
72 packages/arch/gnunet/gnunet-user.service \
73 packages/arch/gnunet/PKGBUILD \
74 packages/arch/gnunet/.SRCINFO \
75 packages/guix/guix-env-py2.scm \
76 packages/guix/guix-env-gillmann.scm \
77 packages/guix/notest-guix-env.scm \
78 packages/homebrew/gnunet.rb \
60 packages/nix/gnunet-dev.nix \ 79 packages/nix/gnunet-dev.nix \
61 packages/nix/default.nix \ 80 packages/nix/default.nix
62 packages/homebrew/gnunet.rb
63 81
64EXTRA_DIST = \ 82EXTRA_DIST = \
65 sounds/vonlynX-bdbAm-lo.wav \ 83 sounds/vonlynX-bdbAm-lo.wav \
diff --git a/contrib/packages/arch/gnunet-git/.SRCINFO b/contrib/packages/arch/gnunet-git/.SRCINFO
new file mode 100644
index 000000000..d73829db6
--- /dev/null
+++ b/contrib/packages/arch/gnunet-git/.SRCINFO
@@ -0,0 +1,73 @@
1pkgbase = gnunet-git
2 pkgdesc = A framework for secure peer-to-peer networking
3 pkgver = 0.17.0.r0.g0a9c2aa9d
4 pkgrel = 1
5 url = http://gnunet.org
6 install = gnunet.install
7 arch = i686
8 arch = x86_64
9 license = AGPL
10 makedepends = bluez-libs
11 makedepends = gettext
12 makedepends = git
13 makedepends = libpulse
14 makedepends = libtool
15 makedepends = opus
16 makedepends = pkgconfig
17 makedepends = postgresql
18 makedepends = python
19 makedepends = recutils
20 depends = brotli
21 depends = gettext
22 depends = gnurl
23 depends = gnutls
24 depends = iptables
25 depends = jansson
26 depends = libextractor
27 depends = libgcrypt
28 depends = libidn2
29 depends = libmicrohttpd
30 depends = libsodium
31 depends = libtool
32 depends = libunistring
33 depends = nss
34 depends = openssl
35 depends = sqlite
36 depends = which
37 depends = zlib
38 optdepends = bluez: for bluetooth transport
39 optdepends = gnunet-gtk: for handling the gnunet:// URI scheme
40 optdepends = libgabe: for Attribute-Based Encryption
41 optdepends = libogg: for conversation service
42 optdepends = libpabc: for re:claimID zero-knowledge privacy credentials
43 optdepends = libpulse: for conversation service
44 optdepends = miniupnpc: for NAT uPnP support
45 optdepends = mysql: for an alternative to sqlite in the database plugin
46 optdepends = opus: for conversation service
47 optdepends = pbc: for Attribute-Based Encryption
48 optdepends = postgresql: for an alternative to sqlite in the database plugin
49 optdepends = python: for test suite
50 optdepends = texi2mdoc: for automatic mdoc generation
51 optdepends = texinfo: for building the documentation
52 optdepends = texlive-core: for generating GNS business cards via gnunet-bcd
53 optdepends = zbar: for reading/writing QR codes using gnunet-qr
54 provides = gnunet
55 conflicts = gnunet
56 conflicts = gnunet-bin
57 backup = etc/gnunet.conf
58 source = git+https://git.gnunet.org/gnunet.git
59 source = gnunet-system.service
60 source = gnunet.sysusers
61 source = gnunet.tmpfiles
62 source = gnunet-uri.desktop
63 source = gnunet-user.conf
64 source = gnunet-user.service
65 sha256sums = SKIP
66 sha256sums = 163818b89beddcaf78937daba5bdf0ae060b2975de0731aa13d1ccdd813cf262
67 sha256sums = 66299dbbdd0219d2f5f0520e69fc094f38f789724d973c2f63a421257ea4f755
68 sha256sums = 5c34e1ecc6208900426f8e399e8c3edbef12cce19eba605fd7364ddb3547d9f0
69 sha256sums = 98e4e1d6d4fd7c7fd05d9e16402c95f1e7afeb4b97c8c68ac63e8abd11ff4ee7
70 sha256sums = 3f17b9ed2c1f8cc0f919fe477df99678c17778a31f1eeb56517e285e3cef30f2
71 sha256sums = 60caee20b53bcc69522556b35ac3d35d89e28c49b9a22a2ed5121df4a2c33be5
72
73pkgname = gnunet-git
diff --git a/contrib/packages/arch/gnunet-git/PKGBUILD b/contrib/packages/arch/gnunet-git/PKGBUILD
new file mode 100644
index 000000000..bb4d3598d
--- /dev/null
+++ b/contrib/packages/arch/gnunet-git/PKGBUILD
@@ -0,0 +1,128 @@
1# Maintainer: grufo <madmurphy333 AT gmail DOT com>
2# Contributor: redfish <redfish AT galactica DOT pw>
3# Contributor: kertase <kertase AT gmail DOT com>
4# Contributor: Sergej Pupykin <pupykin DOT s+arch AT gmail.com>
5# Contributor: wahnby <wahnby AT yahoo DOT fr>
6
7_appname='gnunet'
8pkgname="${_appname}-git"
9pkgver=0.17.0.r0.g0a9c2aa9d
10pkgrel=1
11pkgdesc='A framework for secure peer-to-peer networking'
12arch=('i686' 'x86_64')
13url="http://${_appname}.org"
14license=('AGPL')
15conflicts=("${_appname}" "${_appname}-bin")
16provides=("${_appname}")
17depends=('brotli' 'gettext' 'gnurl' 'gnutls' 'iptables' 'jansson'
18 'libextractor' 'libgcrypt' 'libidn2' 'libmicrohttpd' 'libsodium'
19 'libtool' 'libunistring' 'nss' 'openssl' 'sqlite' 'which' 'zlib')
20makedepends=('bluez-libs' 'gettext' 'git' 'libpulse' 'libtool' 'opus'
21 'pkgconfig' 'postgresql' 'python' 'recutils')
22optdepends=('bluez: for bluetooth transport'
23 'gnunet-gtk: for handling the gnunet:// URI scheme'
24 'libgabe: for Attribute-Based Encryption'
25 'libogg: for conversation service'
26 'libpabc: for re:claimID zero-knowledge privacy credentials'
27 'libpulse: for conversation service'
28 'miniupnpc: for NAT uPnP support'
29 'mysql: for an alternative to sqlite in the database plugin'
30 'opus: for conversation service'
31 'pbc: for Attribute-Based Encryption'
32 'postgresql: for an alternative to sqlite in the database plugin'
33 'python: for test suite'
34 'texi2mdoc: for automatic mdoc generation'
35 'texinfo: for building the documentation'
36 'texlive-core: for generating GNS business cards via gnunet-bcd'
37 'zbar: for reading/writing QR codes using gnunet-qr')
38backup=("etc/${_appname}.conf")
39source=("git+https://git.${_appname}.org/${_appname}.git"
40 "${_appname}-system.service"
41 "${_appname}.sysusers"
42 "${_appname}.tmpfiles"
43 "${_appname}-uri.desktop"
44 "${_appname}-user.conf"
45 "${_appname}-user.service")
46install="${_appname}.install"
47sha256sums=('SKIP'
48 '163818b89beddcaf78937daba5bdf0ae060b2975de0731aa13d1ccdd813cf262'
49 '66299dbbdd0219d2f5f0520e69fc094f38f789724d973c2f63a421257ea4f755'
50 '5c34e1ecc6208900426f8e399e8c3edbef12cce19eba605fd7364ddb3547d9f0'
51 '98e4e1d6d4fd7c7fd05d9e16402c95f1e7afeb4b97c8c68ac63e8abd11ff4ee7'
52 '3f17b9ed2c1f8cc0f919fe477df99678c17778a31f1eeb56517e285e3cef30f2'
53 '60caee20b53bcc69522556b35ac3d35d89e28c49b9a22a2ed5121df4a2c33be5')
54
55pkgver() {
56
57 cd "${_appname}" > /dev/null 2>&1
58 git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
59
60}
61
62prepare() {
63
64 cd "${srcdir}/${_appname}"
65
66 export GNUNET_PREFIX='/usr/lib'
67 ./bootstrap
68
69}
70
71build() {
72
73 cd "${srcdir}/${_appname}"
74
75 ./configure --prefix='/usr' --enable-experimental
76 make
77 make -C contrib
78
79}
80
81package() {
82
83 cd "${srcdir}/${_appname}"
84
85 make DESTDIR="${pkgdir}" install
86 make DESTDIR="${pkgdir}" -C contrib install
87
88 install -dm755 "${pkgdir}/usr/lib/systemd/system"
89 install -Dm644 "${srcdir}/${_appname}-system.service" \
90 "${pkgdir}/usr/lib/systemd/system/${_appname}.service"
91
92 install -dm755 "${pkgdir}/usr/lib/systemd/user"
93 install -Dm644 "${srcdir}/${_appname}-user.service" \
94 "${pkgdir}/usr/lib/systemd/user/${_appname}.service"
95
96 install -dm755 "${pkgdir}/usr/lib/sysusers.d"
97 install -Dm644 "${srcdir}/${_appname}.sysusers" \
98 "${pkgdir}/usr/lib/sysusers.d/${_appname}.conf"
99
100 install -dm755 "${pkgdir}/usr/lib/tmpfiles.d"
101 install -Dm644 "${srcdir}/${_appname}.tmpfiles" \
102 "${pkgdir}/usr/lib/tmpfiles.d/${_appname}.conf"
103
104 install -dm755 "${pkgdir}/usr/share/applications"
105 install -Dm644 "${srcdir}/${_appname}-uri.desktop" \
106 "${pkgdir}/usr/share/applications/${_appname}-uri.desktop"
107
108 install -dm700 "${pkgdir}/etc/skel/.config"
109 install -Dm600 "${srcdir}/${_appname}-user.conf" \
110 "${pkgdir}/etc/skel/.config/${_appname}.conf"
111
112 # Automatically generate a configuration file using the content of
113 # `/usr/share/gnunet/config.d/` as model; in this way we can ensure
114 # that this configuration file is the one backed up with each update,
115 # while `/usr/share/gnunet/config.d/` is kept as immutable default
116 # configuration.
117
118 install -dm755 "${pkgdir}/etc"
119
120 {
121 echo "# /etc/${_appname}.conf"
122 (cd "${pkgdir}" > /dev/null 2>&1 && find "usr/share/${_appname}/config.d" -type f -name '*.conf' \
123 -printf '\n\n# For the default values of the the following lines please refer to\n# /%p\n\n' \
124 -exec cat '{}' ';')
125 } > "${pkgdir}/etc/${_appname}.conf"
126
127}
128
diff --git a/contrib/packages/arch/gnunet-git/gnunet-system.service b/contrib/packages/arch/gnunet-git/gnunet-system.service
new file mode 100644
index 000000000..b429caf46
--- /dev/null
+++ b/contrib/packages/arch/gnunet-git/gnunet-system.service
@@ -0,0 +1,13 @@
1[Unit]
2Description=GNUnet system service
3After=network.target
4
5[Service]
6Type=simple
7User=gnunet
8ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c /etc/gnunet.conf
9StateDirectory=gnunet
10StateDirectoryMode=0700
11
12[Install]
13WantedBy=multi-user.target
diff --git a/contrib/packages/arch/gnunet-git/gnunet-uri.desktop b/contrib/packages/arch/gnunet-git/gnunet-uri.desktop
new file mode 100644
index 000000000..4f847d20f
--- /dev/null
+++ b/contrib/packages/arch/gnunet-git/gnunet-uri.desktop
@@ -0,0 +1,9 @@
1[Desktop Entry]
2Name=GNUnet URI
3Exec=gnunet-uri %u
4GenericName=URI handler for the GNUnet network
5Icon=gnunet
6Type=Application
7Terminal=false
8NoDisplay=true
9MimeType=x-scheme-handler/gnunet;
diff --git a/contrib/packages/arch/gnunet-git/gnunet-user.conf b/contrib/packages/arch/gnunet-git/gnunet-user.conf
new file mode 100644
index 000000000..22f1fe37a
--- /dev/null
+++ b/contrib/packages/arch/gnunet-git/gnunet-user.conf
@@ -0,0 +1,3 @@
1[arm]
2START_SYSTEM_SERVICES = NO
3START_USER_SERVICES = YES
diff --git a/contrib/packages/arch/gnunet-git/gnunet-user.service b/contrib/packages/arch/gnunet-git/gnunet-user.service
new file mode 100644
index 000000000..ae9f0d4f5
--- /dev/null
+++ b/contrib/packages/arch/gnunet-git/gnunet-user.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=GNUnet user service
3After=network.target
4
5[Service]
6Type=simple
7ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c ~/.config/gnunet.conf
8
9[Install]
10WantedBy=multi-user.target
diff --git a/contrib/packages/arch/gnunet-git/gnunet.install b/contrib/packages/arch/gnunet-git/gnunet.install
new file mode 100644
index 000000000..2560926d8
--- /dev/null
+++ b/contrib/packages/arch/gnunet-git/gnunet.install
@@ -0,0 +1,54 @@
1post_install() {
2
3 local _PWD_PAIRS_="$(awk -F ':' '$3>=1000 && $3<2000 {print $1":"$6}' '/etc/passwd')"
4 local _USER_
5 local _GROUP_
6 local _CFG_DIR_
7
8 for _PWD_PAIR_ in ${_PWD_PAIRS_}; do
9 _USER_="$(echo $_PWD_PAIR_ | cut -d ':' -f 1)"
10 _GROUP_="$(id -gn "${_USER_}")"
11 _CFG_DIR_="$(echo $_PWD_PAIR_ | cut -d ':' -f 2)/.config"
12 test -e "${_CFG_DIR_}/gnunet.conf" || (install -dm700 -o \
13 "${_USER_}" -g "${_GROUP_}" "${_CFG_DIR_}" && install \
14 -Dm600 -o "${_USER_}" -g "${_GROUP_}" \
15 '/etc/skel/.config/gnunet.conf' \
16 "${_CFG_DIR_}/gnunet.conf")
17 done
18
19 echo
20 echo 'Do not forget to add your user to the `gnunet` group, with'
21 echo
22 echo ' sudo usermod -aG gnunet "$(whoami)"'
23 echo
24 echo 'If later you want to remove your user from the group, launch'
25 echo
26 echo ' sudo gpasswd --delete "$(whoami)" gnunet'
27 echo
28 echo 'For information on how to use GNUnet plaese refer to the GNUnet article in the'
29 echo 'ArchWiki (https://wiki.archlinux.org/title/GNUnet).'
30 echo
31
32}
33
34post_remove() {
35
36 echo
37 echo 'The home directory of the `gnunet` user (`/var/lib/gnunet/`) is left after'
38 echo 'uninstalling GNUnet. If you are sure that you are never going to use GNUnet'
39 echo 'ever again, launch:'
40 echo
41 echo ' for username in $(getent group gnunet | cut -d: -f4 | tr '\'','\'' '\'' '\''); do \'
42 echo ' sudo gpasswd --delete "${username}" gnunet; done'
43 echo ' sudo userdel -r gnunet'
44 echo ' sudo groupdel gnunetdns'
45 echo
46 echo '**Warning** The identity and all the information about the network'
47 echo 'cumulatively stored by the current peer will be destroyed - this will not'
48 echo 'affect files explicitly downloaded in other paths.'
49 echo
50 echo 'For further information plaese refer to the GNUnet article in the ArchWiki'
51 echo '(https://wiki.archlinux.org/title/GNUnet).'
52 echo
53
54}
diff --git a/contrib/packages/arch/gnunet-git/gnunet.sysusers b/contrib/packages/arch/gnunet-git/gnunet.sysusers
new file mode 100644
index 000000000..163895934
--- /dev/null
+++ b/contrib/packages/arch/gnunet-git/gnunet.sysusers
@@ -0,0 +1,3 @@
1g gnunet -
2u gnunet - "GNUnet system account" /var/lib/gnunet
3g gnunetdns -
diff --git a/contrib/packages/arch/gnunet-git/gnunet.tmpfiles b/contrib/packages/arch/gnunet-git/gnunet.tmpfiles
new file mode 100644
index 000000000..5b0b4174d
--- /dev/null
+++ b/contrib/packages/arch/gnunet-git/gnunet.tmpfiles
@@ -0,0 +1,9 @@
1d /var/lib/gnunet 0700 gnunet gnunet - -
2z /usr/lib/gnunet/libexec/gnunet-helper-dns 4750 root gnunetdns - -
3z /usr/lib/gnunet/libexec/gnunet-helper-exit 4755 root root - -
4z /usr/lib/gnunet/libexec/gnunet-helper-nat-client 4755 root root - -
5z /usr/lib/gnunet/libexec/gnunet-helper-nat-server 4755 root root - -
6z /usr/lib/gnunet/libexec/gnunet-helper-transport-bluetooth 4755 root root - -
7z /usr/lib/gnunet/libexec/gnunet-helper-transport-wlan 4755 root root - -
8z /usr/lib/gnunet/libexec/gnunet-helper-vpn 4755 root root - -
9z /usr/lib/gnunet/libexec/gnunet-service-dns 2750 gnunet gnunetdns - -
diff --git a/contrib/packages/arch/gnunet/.SRCINFO b/contrib/packages/arch/gnunet/.SRCINFO
new file mode 100644
index 000000000..438f91230
--- /dev/null
+++ b/contrib/packages/arch/gnunet/.SRCINFO
@@ -0,0 +1,72 @@
1pkgbase = gnunet
2 pkgdesc = A framework for secure peer-to-peer networking
3 pkgver = 0.17.0
4 pkgrel = 1
5 url = http://gnunet.org
6 install = gnunet.install
7 arch = i686
8 arch = x86_64
9 license = AGPL
10 makedepends = bluez-libs
11 makedepends = libpulse
12 makedepends = libtool
13 makedepends = opus
14 makedepends = pkgconfig
15 makedepends = postgresql
16 makedepends = python
17 depends = brotli
18 depends = gettext
19 depends = gnurl
20 depends = gnutls
21 depends = iptables
22 depends = jansson
23 depends = libextractor
24 depends = libgcrypt
25 depends = libidn2
26 depends = libmicrohttpd
27 depends = libsodium
28 depends = libtool
29 depends = libunistring
30 depends = nss
31 depends = openssl
32 depends = sqlite
33 depends = which
34 depends = zlib
35 optdepends = bluez: for bluetooth transport
36 optdepends = gnunet-gtk: for handling the gnunet:// URI scheme
37 optdepends = libgabe: for Attribute-Based Encryption
38 optdepends = libogg: for conversation service
39 optdepends = libpabc: for re:claimID zero-knowledge privacy credentials
40 optdepends = libpulse: for conversation service
41 optdepends = miniupnpc: for NAT uPnP support
42 optdepends = mysql: for an alternative to sqlite in the database plugin
43 optdepends = opus: for conversation service
44 optdepends = pbc: for Attribute-Based Encryption
45 optdepends = postgresql: for an alternative to sqlite in the database plugin
46 optdepends = python: for test suite
47 optdepends = texi2mdoc: for automatic mdoc generation
48 optdepends = texinfo: for building the documentation
49 optdepends = texlive-core: for generating GNS business cards via gnunet-bcd
50 optdepends = zbar: for reading/writing QR codes using gnunet-qr
51 conflicts = gnunet-git
52 conflicts = gnunet-bin
53 backup = etc/gnunet.conf
54 source = ftp://ftp.gnu.org/gnu/gnunet/gnunet-0.17.0.tar.gz
55 source = ftp://ftp.gnu.org/gnu/gnunet/gnunet-0.17.0.tar.gz.sig
56 source = gnunet-system.service
57 source = gnunet.sysusers
58 source = gnunet.tmpfiles
59 source = gnunet-uri.desktop
60 source = gnunet-user.conf
61 source = gnunet-user.service
62 validpgpkeys = 3D11063C10F98D14BD24D1470B0998EF86F59B6A
63 sha256sums = 6b2f7bf34c3c3986f2c294f04e881dda9db8ef636c0e78ebcf8084b8a47d49ca
64 sha256sums = SKIP
65 sha256sums = 163818b89beddcaf78937daba5bdf0ae060b2975de0731aa13d1ccdd813cf262
66 sha256sums = 66299dbbdd0219d2f5f0520e69fc094f38f789724d973c2f63a421257ea4f755
67 sha256sums = 5c34e1ecc6208900426f8e399e8c3edbef12cce19eba605fd7364ddb3547d9f0
68 sha256sums = 98e4e1d6d4fd7c7fd05d9e16402c95f1e7afeb4b97c8c68ac63e8abd11ff4ee7
69 sha256sums = 3f17b9ed2c1f8cc0f919fe477df99678c17778a31f1eeb56517e285e3cef30f2
70 sha256sums = 60caee20b53bcc69522556b35ac3d35d89e28c49b9a22a2ed5121df4a2c33be5
71
72pkgname = gnunet
diff --git a/contrib/packages/arch/gnunet/PKGBUILD b/contrib/packages/arch/gnunet/PKGBUILD
new file mode 100644
index 000000000..2dfcdd6ec
--- /dev/null
+++ b/contrib/packages/arch/gnunet/PKGBUILD
@@ -0,0 +1,118 @@
1# Maintainer: grufo <madmurphy333 AT gmail DOT com>
2# Contributor: redfish <redfish AT galactica DOT pw>
3# Contributor: kertase <kertase AT gmail DOT com>
4# Contributor: Sergej Pupykin <pupykin DOT s+arch AT gmail.com>
5# Contributor: wahnby <wahnby AT yahoo DOT fr>
6
7pkgname='gnunet'
8pkgver='0.17.0'
9pkgrel=1
10pkgdesc='A framework for secure peer-to-peer networking'
11arch=('i686' 'x86_64')
12url="http://${pkgname}.org"
13license=('AGPL')
14conflicts=("${pkgname}-git" "${pkgname}-bin")
15depends=('brotli' 'gettext' 'gnurl' 'gnutls' 'iptables' 'jansson'
16 'libextractor' 'libgcrypt' 'libidn2' 'libmicrohttpd' 'libsodium'
17 'libtool' 'libunistring' 'nss' 'openssl' 'sqlite' 'which' 'zlib')
18makedepends=('bluez-libs' 'libpulse' 'libtool' 'opus' 'pkgconfig' 'postgresql'
19 'python')
20optdepends=('bluez: for bluetooth transport'
21 'gnunet-gtk: for handling the gnunet:// URI scheme'
22 'libgabe: for Attribute-Based Encryption'
23 'libogg: for conversation service'
24 'libpabc: for re:claimID zero-knowledge privacy credentials'
25 'libpulse: for conversation service'
26 'miniupnpc: for NAT uPnP support'
27 'mysql: for an alternative to sqlite in the database plugin'
28 'opus: for conversation service'
29 'pbc: for Attribute-Based Encryption'
30 'postgresql: for an alternative to sqlite in the database plugin'
31 'python: for test suite'
32 'texi2mdoc: for automatic mdoc generation'
33 'texinfo: for building the documentation'
34 'texlive-core: for generating GNS business cards via gnunet-bcd'
35 'zbar: for reading/writing QR codes using gnunet-qr')
36backup=("etc/${pkgname}.conf")
37source=("ftp://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.sig}
38 "${pkgname}-system.service"
39 "${pkgname}.sysusers"
40 "${pkgname}.tmpfiles"
41 "${pkgname}-uri.desktop"
42 "${pkgname}-user.conf"
43 "${pkgname}-user.service")
44install="${pkgname}.install"
45validpgpkeys=('3D11063C10F98D14BD24D1470B0998EF86F59B6A')
46sha256sums=('6b2f7bf34c3c3986f2c294f04e881dda9db8ef636c0e78ebcf8084b8a47d49ca'
47 'SKIP'
48 '163818b89beddcaf78937daba5bdf0ae060b2975de0731aa13d1ccdd813cf262'
49 '66299dbbdd0219d2f5f0520e69fc094f38f789724d973c2f63a421257ea4f755'
50 '5c34e1ecc6208900426f8e399e8c3edbef12cce19eba605fd7364ddb3547d9f0'
51 '98e4e1d6d4fd7c7fd05d9e16402c95f1e7afeb4b97c8c68ac63e8abd11ff4ee7'
52 '3f17b9ed2c1f8cc0f919fe477df99678c17778a31f1eeb56517e285e3cef30f2'
53 '60caee20b53bcc69522556b35ac3d35d89e28c49b9a22a2ed5121df4a2c33be5')
54
55prepare() {
56
57 cd "${srcdir}/${pkgname}-${pkgver}"
58
59 export GNUNET_PREFIX='/usr/lib'
60 autoreconf -i
61
62}
63
64build() {
65
66 cd "${srcdir}/${pkgname}-${pkgver}"
67
68 ./configure --prefix='/usr' --enable-experimental
69 make
70
71}
72
73package() {
74
75 cd "${srcdir}/${pkgname}-${pkgver}"
76
77 make DESTDIR="${pkgdir}" install
78
79 install -dm755 "${pkgdir}/usr/lib/systemd/system"
80 install -Dm644 "${srcdir}/${pkgname}-system.service" \
81 "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
82
83 install -dm755 "${pkgdir}/usr/lib/systemd/user"
84 install -Dm644 "${srcdir}/${pkgname}-user.service" \
85 "${pkgdir}/usr/lib/systemd/user/${pkgname}.service"
86
87 install -dm755 "${pkgdir}/usr/lib/sysusers.d"
88 install -Dm644 "${srcdir}/${pkgname}.sysusers" \
89 "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
90
91 install -dm755 "${pkgdir}/usr/lib/tmpfiles.d"
92 install -Dm644 "${srcdir}/${pkgname}.tmpfiles" \
93 "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
94
95 install -dm755 "${pkgdir}/usr/share/applications"
96 install -Dm644 "${srcdir}/${pkgname}-uri.desktop" \
97 "${pkgdir}/usr/share/applications/${pkgname}-uri.desktop"
98
99 install -dm700 "${pkgdir}/etc/skel/.config"
100 install -Dm600 "${srcdir}/${pkgname}-user.conf" \
101 "${pkgdir}/etc/skel/.config/${pkgname}.conf"
102
103 # Automatically generate a configuration file using the content of
104 # `/usr/share/gnunet/config.d/` as model; in this way we can ensure
105 # that this configuration file is the one backed up with each update,
106 # while `/usr/share/gnunet/config.d/` is kept as immutable default
107 # configuration.
108
109 install -dm755 "${pkgdir}/etc"
110
111 {
112 echo "# /etc/${pkgname}.conf"
113 (cd "${pkgdir}" > /dev/null 2>&1 && find "usr/share/${pkgname}/config.d" -type f -name '*.conf' \
114 -printf '\n\n# For the default values of the the following lines please refer to\n# /%p\n\n' \
115 -exec cat '{}' ';')
116 } > "${pkgdir}/etc/${pkgname}.conf"
117
118}
diff --git a/contrib/packages/arch/gnunet/gnunet-system.service b/contrib/packages/arch/gnunet/gnunet-system.service
new file mode 100644
index 000000000..b429caf46
--- /dev/null
+++ b/contrib/packages/arch/gnunet/gnunet-system.service
@@ -0,0 +1,13 @@
1[Unit]
2Description=GNUnet system service
3After=network.target
4
5[Service]
6Type=simple
7User=gnunet
8ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c /etc/gnunet.conf
9StateDirectory=gnunet
10StateDirectoryMode=0700
11
12[Install]
13WantedBy=multi-user.target
diff --git a/contrib/packages/arch/gnunet/gnunet-uri.desktop b/contrib/packages/arch/gnunet/gnunet-uri.desktop
new file mode 100644
index 000000000..4f847d20f
--- /dev/null
+++ b/contrib/packages/arch/gnunet/gnunet-uri.desktop
@@ -0,0 +1,9 @@
1[Desktop Entry]
2Name=GNUnet URI
3Exec=gnunet-uri %u
4GenericName=URI handler for the GNUnet network
5Icon=gnunet
6Type=Application
7Terminal=false
8NoDisplay=true
9MimeType=x-scheme-handler/gnunet;
diff --git a/contrib/packages/arch/gnunet/gnunet-user.conf b/contrib/packages/arch/gnunet/gnunet-user.conf
new file mode 100644
index 000000000..22f1fe37a
--- /dev/null
+++ b/contrib/packages/arch/gnunet/gnunet-user.conf
@@ -0,0 +1,3 @@
1[arm]
2START_SYSTEM_SERVICES = NO
3START_USER_SERVICES = YES
diff --git a/contrib/packages/arch/gnunet/gnunet-user.service b/contrib/packages/arch/gnunet/gnunet-user.service
new file mode 100644
index 000000000..ae9f0d4f5
--- /dev/null
+++ b/contrib/packages/arch/gnunet/gnunet-user.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=GNUnet user service
3After=network.target
4
5[Service]
6Type=simple
7ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c ~/.config/gnunet.conf
8
9[Install]
10WantedBy=multi-user.target
diff --git a/contrib/packages/arch/gnunet/gnunet.install b/contrib/packages/arch/gnunet/gnunet.install
new file mode 100644
index 000000000..2560926d8
--- /dev/null
+++ b/contrib/packages/arch/gnunet/gnunet.install
@@ -0,0 +1,54 @@
1post_install() {
2
3 local _PWD_PAIRS_="$(awk -F ':' '$3>=1000 && $3<2000 {print $1":"$6}' '/etc/passwd')"
4 local _USER_
5 local _GROUP_
6 local _CFG_DIR_
7
8 for _PWD_PAIR_ in ${_PWD_PAIRS_}; do
9 _USER_="$(echo $_PWD_PAIR_ | cut -d ':' -f 1)"
10 _GROUP_="$(id -gn "${_USER_}")"
11 _CFG_DIR_="$(echo $_PWD_PAIR_ | cut -d ':' -f 2)/.config"
12 test -e "${_CFG_DIR_}/gnunet.conf" || (install -dm700 -o \
13 "${_USER_}" -g "${_GROUP_}" "${_CFG_DIR_}" && install \
14 -Dm600 -o "${_USER_}" -g "${_GROUP_}" \
15 '/etc/skel/.config/gnunet.conf' \
16 "${_CFG_DIR_}/gnunet.conf")
17 done
18
19 echo
20 echo 'Do not forget to add your user to the `gnunet` group, with'
21 echo
22 echo ' sudo usermod -aG gnunet "$(whoami)"'
23 echo
24 echo 'If later you want to remove your user from the group, launch'
25 echo
26 echo ' sudo gpasswd --delete "$(whoami)" gnunet'
27 echo
28 echo 'For information on how to use GNUnet plaese refer to the GNUnet article in the'
29 echo 'ArchWiki (https://wiki.archlinux.org/title/GNUnet).'
30 echo
31
32}
33
34post_remove() {
35
36 echo
37 echo 'The home directory of the `gnunet` user (`/var/lib/gnunet/`) is left after'
38 echo 'uninstalling GNUnet. If you are sure that you are never going to use GNUnet'
39 echo 'ever again, launch:'
40 echo
41 echo ' for username in $(getent group gnunet | cut -d: -f4 | tr '\'','\'' '\'' '\''); do \'
42 echo ' sudo gpasswd --delete "${username}" gnunet; done'
43 echo ' sudo userdel -r gnunet'
44 echo ' sudo groupdel gnunetdns'
45 echo
46 echo '**Warning** The identity and all the information about the network'
47 echo 'cumulatively stored by the current peer will be destroyed - this will not'
48 echo 'affect files explicitly downloaded in other paths.'
49 echo
50 echo 'For further information plaese refer to the GNUnet article in the ArchWiki'
51 echo '(https://wiki.archlinux.org/title/GNUnet).'
52 echo
53
54}
diff --git a/contrib/packages/arch/gnunet/gnunet.sysusers b/contrib/packages/arch/gnunet/gnunet.sysusers
new file mode 100644
index 000000000..163895934
--- /dev/null
+++ b/contrib/packages/arch/gnunet/gnunet.sysusers
@@ -0,0 +1,3 @@
1g gnunet -
2u gnunet - "GNUnet system account" /var/lib/gnunet
3g gnunetdns -
diff --git a/contrib/packages/arch/gnunet/gnunet.tmpfiles b/contrib/packages/arch/gnunet/gnunet.tmpfiles
new file mode 100644
index 000000000..5b0b4174d
--- /dev/null
+++ b/contrib/packages/arch/gnunet/gnunet.tmpfiles
@@ -0,0 +1,9 @@
1d /var/lib/gnunet 0700 gnunet gnunet - -
2z /usr/lib/gnunet/libexec/gnunet-helper-dns 4750 root gnunetdns - -
3z /usr/lib/gnunet/libexec/gnunet-helper-exit 4755 root root - -
4z /usr/lib/gnunet/libexec/gnunet-helper-nat-client 4755 root root - -
5z /usr/lib/gnunet/libexec/gnunet-helper-nat-server 4755 root root - -
6z /usr/lib/gnunet/libexec/gnunet-helper-transport-bluetooth 4755 root root - -
7z /usr/lib/gnunet/libexec/gnunet-helper-transport-wlan 4755 root root - -
8z /usr/lib/gnunet/libexec/gnunet-helper-vpn 4755 root root - -
9z /usr/lib/gnunet/libexec/gnunet-service-dns 2750 gnunet gnunetdns - -