pkgrel=0
pkgdesc="Graphical user interface for GNUnet"
url="https://gnunet.org"
-arch="all"
+arch="all !ppc64le"
license="GPL-3.0-only"
makedepends="gnunet-dev gtk+3.0-dev glade-dev"
subpackages="$pkgname-dev $pkgname-doc"
}
check() {
- make DESTDIR="$pkgdir" check
+ make check
}
package() {
pkgrel=0
pkgdesc="A framework for secure and privacy enhancing peer-to-peer networking"
url="https://gnunet.org"
-arch="all"
+arch="all !ppc64le"
license="AGPL-3.0-only"
depends="gnutls-utils bash which iptables coreutils"
depends_dev="libgpg-error-dev libgcrypt-dev nettle-dev unbound-dev gnutls-dev
gnurl-dev libmicrohttpd-dev openssl-dev libunistring-dev libidn2-dev
- nss-dev sqlite-dev zlib-dev miniupnpc-dev gmp-dev gettext openjpeg-dev"
+ nss-dev sqlite-dev zlib-dev miniupnpc-dev gmp-dev gettext openjpeg-dev
+ jansson-dev"
makedepends="$depends_dev autoconf automake libtool gettext-dev python3
texlive texinfo"
-install="$pkgname.pre-install $pkgname.post-install $pkgname.pre-deinstall"
+install="$pkgname.pre-install $pkgname.post-install"
pkgusers="gnunet"
pkggroups="gnunet gnunetdns"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
gnunet-user.conf
gnunet-system-services.initd
gnunet-user-services.initd
- gnunet.xsession
+ gnunet-gns-proxy.initd
"
build() {
$pkgdir/etc/init.d/$pkgname-system-services
install -m755 -D $srcdir/$pkgname-user-services.initd \
$pkgdir/etc/init.d/$pkgname-user-services
- install -m755 -D $srcdir/$pkgname.xsession \
- $pkgdir/etc/X11/xinit/xinitrc.d/80-$pkgname-user-services
+ install -m755 -D $srcdir/$pkgname-gns-proxy.initd \
+ $pkgdir/etc/init.d/$pkgname-gns-proxy
}
dev() {
$pkgdir/usr/bin/gnunet-config
}
-#sha512sums="3f066f72486fccd247045495e1072c3680f12109bfceae782a52892824639e2990e34054bfeebcc58bb8778069bfd8a9c1feba19e2d726f12b6128fc27004759 gnunet-0.11.8.tar.gz
+sha512sums="42d778eb1a7847d84255581657c1d71d12bda54f4d33e60b7a389c498d9c830b0501fe4a83725f3aa452f88875a96d5856171a686c8738f5d4ee3de06860a079 gnunet-0.12.0.tar.gz
a0f55413ed2c6edd6746a751d92ddac95ba70f20eefb07330817870d749456448f44bba95d245911a00f6078e0c2ac626004e3b764be5e5e049c00626c4c5ac0 gnunet-system.conf
b21112ff16aee771332aa9c33f55b0c7f46fe0266053543241e3efbe25dba56482c0e11112a192eefe59f1c74d2af5d7071b6a4e1e875cfc7e9d55b5fe8a0a33 gnunet-user.conf
96ab78bb48d5fb10f0b34336ad05e73b543c4362c73436ef20b3bb83dff214e997acf38a2ea493b1901bdc37c8877d83cdaebd73a0e50831e2f23413c8edda76 gnunet-system-services.initd
3dc88aaedc3886c0795bdb4c8e259125232ba10f2bc762216c341bb3240ef0855cba968799ba121304463a65e73ed0f62dec03759a2be478ec4ac086361b49ba gnunet-user-services.initd
-4fe1ed80cbaa4c140805bde2629fdb32b97f3273281ae7277c8988b4e490605652cdb9975fc1178169426f2279597c55f6e6b75b52315a426d78a1fedbb08401 gnunet.xsession"
+19c9bb3fde1fe36dd53a6181ec0f08a00ed2871bca026832983cbbe6550e258c9f3166923f2b6715fc9edb5eb0dae38d2f497f54c8ba74fdb7c483608450fa4b gnunet-gns-proxy.initd"
--- /dev/null
+#!/sbin/openrc-run
+# Contributor: xrs <xrs@mail36.net>
+# Maintainer: xrs <xrs@mail36.net>
+
+name="gnunet-gns-proxy"
+description="GNUnet GNS proxy for name resolution in Firefox/Chromium"
+command_background="yes"
+pidfile="/run/${SVCNAME}.pid"
+users=`awk -F ':' '$3>=1000 && $3<2000 {print $1}' /etc/passwd`
+
+depend() {
+ need gnunet-user-services
+}
+
+start() {
+ # Enable GNS proxy for existant users.
+ for user in $users; do
+ # Create/Renew GNS certificate authority (CA) per user.
+ su $user -c "gnunet-gns-proxy-setup-ca"
+
+ # Customize gnunet.conf
+ port=$((8000+$(id -u $user)))
+ gnunet-config -c /home/$user/.config/gnunet.conf \
+ --rewrite \
+ --section=gns-proxy \
+ --option=IMMEDIATE_START \
+ --value=YES
+ gnunet-config -c /home/$user/.config/gnunet.conf \
+ --rewrite \
+ --section=gns-proxy \
+ --option=OPTIONS \
+ --value="-p $port"
+
+ # Start gns-proxy
+ if test -z "`ps|grep $user|grep gnunet-gns-proxy`" > /dev/null 2>&1
+ then
+ su $user -c "gnunet-arm \
+ -c /home/$user/.config/gnunet.conf -i gns-proxy"
+ fi
+
+ # Firefox
+ if [ ! -d /home/$user/.mozilla/firefox/*.default ];then
+ timeout 3s firefox --headless # dirty: create profile if not existent
+ fi
+ for ffprofile in /home/$user/.mozilla/firefox/*.*/; do
+ js=$ffprofile/user.js
+ if [ -f $js ]; then
+ sed -i '/Preferences for using the GNU Name System/d' $js
+ sed -i '/network.proxy.socks/d' $js
+ sed -i '/network.proxy.socks_port/d' $js
+ sed -i '/network.proxy.socks_remote_dns/d' $js
+ sed -i '/network.proxy.type/d' $js
+ fi
+ echo "// Preferences for using the GNU Name System" >> $js
+ echo "user_pref(\"network.proxy.socks\", \"localhost\");" >> $js
+ echo "user_pref(\"network.proxy.socks_port\", $port);" >> $js
+ echo "user_pref(\"network.proxy.socks_remote_dns\", true);" >> $js
+ echo "user_pref(\"network.proxy.type\", 1);" >> $js
+ done
+
+ # Chromium
+ profile=/home/$user/.profile
+ if [ -f $profile ]; then
+ sed -i '/CHROMIUM_USER_FLAGS/d' $profile
+ fi
+ echo "export CHROMIUM_USER_FLAGS=--proxy-server=socks5://localhost:$port" \
+ >> $profile
+ done
+}
+
+stop() {
+ for user in $users; do
+ # Stop gns-proxy
+ if test "`ps|grep $user|grep gnunet-gns-proxy`" > /dev/null 2>&1
+ then
+ su $user -c "gnunet-arm \
+ -c /home/$user/.config/gnunet.conf -k gns-proxy"
+ fi
+
+ # Disable gns-proxy in config
+ gnunet-config -c /home/$user/.config/gnunet.conf \
+ --rewrite \
+ --section=gns-proxy \
+ --option=IMMEDIATE_START \
+ --value=NO
+
+ # Reset proxy preferences
+ for ffprofile in /home/$user/.mozilla/firefox/*.*/; do
+ for file in user.js prefs.js; do
+ js=$ffprofile/$file
+ if [ -f $js ]; then
+ sed -i '/Preferences for using the GNU Name System/d' $js
+ sed -i '/network.proxy.socks/d' $js
+ sed -i '/network.proxy.socks_port/d' $js
+ sed -i '/network.proxy.socks_remote_dns/d' $js
+ sed -i '/network.proxy.type/d' $js
+ fi
+ done
+ done
+
+ # Chromium
+ profile=/home/$user/.profile
+ if [ -f $profile ]; then
+ sed -i '/CHROMIUM_USER_FLAGS/d' $profile
+ fi
+ done
+}
/home/$user/.config/gnunet.conf
done
-# Enable GNS proxy for users, if desired.
-echo "Use GNU Name System in Firefox/Chromium by default? [y,N]"
-read -r yn
-case $yn in
-y|Y )
- # Enable GNS proxy for existant users.
- for user in $users; do
- port=$((8000+$(id -u $user)))
- gnunet-config -c /home/$user/.config/gnunet.conf \
- --rewrite \
- --section=gns-proxy \
- --option=IMMEDIATE_START \
- --value=YES
- gnunet-config -c /home/$user/.config/gnunet.conf \
- --rewrite \
- --section=gns-proxy \
- --option=OPTIONS \
- --value="-p $port"
- done
-
- # Enable GNS proxy for future users.
- echo "[gns-proxy]" >> /etc/skel/.config/gnunet.conf
- echo "IMMEDIATE_START = YES" >> /etc/skel/.config/gnunet.conf
- ;;
-* )
- ;;
-esac
-
exit 0
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Contributor: xrs <xrs@mail36.net>
# Maintainer: xrs <xrs@mail36.net>
pkgname=gnurl
url="https://gnunet.org/en/gnurl.html"
arch="all"
license="MIT"
-#depends="ca-certificates gnutls libidn2 zlib"
depends="ca-certificates"
depends_dev="gnutls-dev libidn2-dev zlib-dev"
makedepends="$depends_dev autoconf automake libtool perl pkgconf python3"
--without-winssl \
--without-darwinssl \
--disable-sspi \
- --disable-ntlm-wb \
--disable-ldap \
--disable-rtsp \
--disable-dict \
--disable-file \
--disable-ftp \
--disable-smb \
- --disable-ares
+ --disable-ntlm-wb \
+ --with-libz \
+ --without-ca-fallback \
+ --without-gssapi \
+ --disable-valgrind \
+ --without-ngtcp2 \
+ --without-nghttp2 \
+ --without-nghttp3 \
+ --without-quiche
make
}