gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit 941ea7f200d30d148a6c0db5c703494769d644b9
parent b317b3e1114e93f5133429a64de82a4e865939f7
Author: Florian Dold <florian@dold.me>
Date:   Sat, 28 Aug 2021 18:23:05 +0200

debian: various packaging fixes

Diffstat:
Mdebian/gnunet.dirs | 1-
Mdebian/gnunet.postinst | 28++--------------------------
Mdebian/gnunet.templates | 25+++----------------------
Mdebian/rules | 6++++++
4 files changed, 11 insertions(+), 49 deletions(-)

diff --git a/debian/gnunet.dirs b/debian/gnunet.dirs @@ -1,2 +1 @@ var/lib/gnunet -var/log/gnunetd diff --git a/debian/gnunet.postinst b/debian/gnunet.postinst @@ -42,11 +42,8 @@ case "${1}" in configure) db_version 2.0 - db_get gnunet-systempeer/username - _USERNAME="${RET:-gnunet}" - - db_get gnunet-systempeer/groupname - _GROUPNAME="${RET:-gnunet}" + _USERNAME="gnunet" + _GROUPNAME="gnunet" db_get gnunet-systempeer/autostart _AUTOSTART="${RET}" # boolean @@ -169,8 +166,6 @@ case "${1}" in # Update files and directories permissions. # Assuming default values, this *should* not be changed. echo -n "Updating files and directories permissions:" - chown ${_USERNAME}:${_GROUPNAME} /var/log/gnunetd - chown ${_USERNAME}:${_GROUPNAME} /var/log/gnunetd/* # Secure access to the data directory chmod 0700 "${GNUNET_HOME}" || true # Restrict access on setuid binaries @@ -202,25 +197,6 @@ case "${1}" in fi echo " done." - # Writing new values to configuration file - echo -n "Writing new configuration file:" - CONFIG_NEW=$(tempfile) - -cat > "${CONFIG_NEW}" <<EOF -# This file controls the behaviour of the GNUnet init script. -# It will be parsed as a shell script. -# please do not edit by hand, use 'dpkg-reconfigure gnunet-systempeer'. - -GNUNET_USER=${_USERNAME} -GNUNET_GROUP=${_GROUPNAME} -GNUNET_AUTOSTART="${_AUTOSTART}" -EOF - - cp -f "${CONFIG_NEW}" "${CONFIG_FILE}" - echo " done." - - # Cleaning - rm -f "${CONFIG_NEW}" echo "All done." ;; diff --git a/debian/gnunet.templates b/debian/gnunet.templates @@ -1,25 +1,6 @@ -Template: gnunet-systempeer/username -Type: string -Default: gnunet -_Description: GNUnet user: - Please choose the user that the GNUnet server process will run as. - . - This should be a dedicated account. If the specified account does not - already exist, it will automatically be created, with no login shell. - -Template: gnunet-systempeer/groupname -Type: string -Default: gnunet -_Description: GNUnet group: - Please choose the group that the GNUnet peer process will run as. - . - This should be a dedicated group, not one that already owns data. - Only the members of this group will have access to GNUnet data, and - be allowed to start and stop the GNUnet server. - Template: gnunet-systempeer/autostart Type: boolean -Default: true +Default: false _Description: Should the GNUnet server be launched on boot? If you choose this option, a GNUnet peer will be launched each time the system is started. Otherwise, you will need to launch @@ -27,7 +8,7 @@ _Description: Should the GNUnet server be launched on boot? Template: gnunet-dns/libnsswitch Type: boolean -Default: true +Default: false _Description: Should GNS be hooked into the system resolution process? If you choose this option, GNS will be hooked into the system resolution process. Records that can be resolved using GNS are @@ -37,7 +18,7 @@ _Description: Should GNS be hooked into the system resolution process? Template: gnunet-user/proxy Type: boolean -Default: true +Default: false _Description: Use the GNU Name System in Firefox/Chromium by default?" If you choose this option the proxy settings for Firefox and Chromium will be adjusted to use a user local running gnunet-gns-proxy to delegate DNS requests diff --git a/debian/rules b/debian/rules @@ -35,6 +35,12 @@ override_dh_auto_install-arch: override_dh_auto_install-indep: +override_dh_installsystemd: + # Do not enable or start the GNUnet service by default. + dh_installsystemd -pgnunet --name=gnunet --no-start --no-enable + # Final invocation to generate daemon reload + dh_installsystemd + execute_after_dh_auto_install: dh_link -plibgnunet-dev \ usr/lib/$(DEB_HOST_MULTIARCH)/gnunet/nss/libnss_gns.so.2 usr/lib/$(DEB_HOST_MULTIARCH)/libnss_gns.so \