diff options
author | Florian Dold <florian@dold.me> | 2021-08-28 18:23:05 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-08-28 18:23:05 +0200 |
commit | 941ea7f200d30d148a6c0db5c703494769d644b9 (patch) | |
tree | 6a669014703241485d3da2496076690a85675ad9 | |
parent | b317b3e1114e93f5133429a64de82a4e865939f7 (diff) |
debian: various packaging fixes
-rw-r--r-- | debian/gnunet.dirs | 1 | ||||
-rw-r--r-- | debian/gnunet.postinst | 28 | ||||
-rw-r--r-- | debian/gnunet.templates | 25 | ||||
-rwxr-xr-x | debian/rules | 6 |
4 files changed, 11 insertions, 49 deletions
diff --git a/debian/gnunet.dirs b/debian/gnunet.dirs index 1e2a7d4c0..e6da73664 100644 --- 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 index d625ccfb6..bde8b1462 100644 --- 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 index 074fb41fe..df74f77f0 100644 --- 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 index b8d577405..2d913f6b6 100755 --- 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 \ |