aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-08-28 18:23:05 +0200
committerFlorian Dold <florian@dold.me>2021-08-28 18:23:05 +0200
commit941ea7f200d30d148a6c0db5c703494769d644b9 (patch)
tree6a669014703241485d3da2496076690a85675ad9 /debian
parentb317b3e1114e93f5133429a64de82a4e865939f7 (diff)
downloadgnunet-941ea7f200d30d148a6c0db5c703494769d644b9.tar.gz
gnunet-941ea7f200d30d148a6c0db5c703494769d644b9.zip
debian: various packaging fixes
Diffstat (limited to 'debian')
-rw-r--r--debian/gnunet.dirs1
-rw-r--r--debian/gnunet.postinst28
-rw-r--r--debian/gnunet.templates25
-rwxr-xr-xdebian/rules6
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 @@
1var/lib/gnunet var/lib/gnunet
2var/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
42 configure) 42 configure)
43 db_version 2.0 43 db_version 2.0
44 44
45 db_get gnunet-systempeer/username 45 _USERNAME="gnunet"
46 _USERNAME="${RET:-gnunet}" 46 _GROUPNAME="gnunet"
47
48 db_get gnunet-systempeer/groupname
49 _GROUPNAME="${RET:-gnunet}"
50 47
51 db_get gnunet-systempeer/autostart 48 db_get gnunet-systempeer/autostart
52 _AUTOSTART="${RET}" # boolean 49 _AUTOSTART="${RET}" # boolean
@@ -169,8 +166,6 @@ case "${1}" in
169 # Update files and directories permissions. 166 # Update files and directories permissions.
170 # Assuming default values, this *should* not be changed. 167 # Assuming default values, this *should* not be changed.
171 echo -n "Updating files and directories permissions:" 168 echo -n "Updating files and directories permissions:"
172 chown ${_USERNAME}:${_GROUPNAME} /var/log/gnunetd
173 chown ${_USERNAME}:${_GROUPNAME} /var/log/gnunetd/*
174 # Secure access to the data directory 169 # Secure access to the data directory
175 chmod 0700 "${GNUNET_HOME}" || true 170 chmod 0700 "${GNUNET_HOME}" || true
176 # Restrict access on setuid binaries 171 # Restrict access on setuid binaries
@@ -202,25 +197,6 @@ case "${1}" in
202 fi 197 fi
203 echo " done." 198 echo " done."
204 199
205 # Writing new values to configuration file
206 echo -n "Writing new configuration file:"
207 CONFIG_NEW=$(tempfile)
208
209cat > "${CONFIG_NEW}" <<EOF
210# This file controls the behaviour of the GNUnet init script.
211# It will be parsed as a shell script.
212# please do not edit by hand, use 'dpkg-reconfigure gnunet-systempeer'.
213
214GNUNET_USER=${_USERNAME}
215GNUNET_GROUP=${_GROUPNAME}
216GNUNET_AUTOSTART="${_AUTOSTART}"
217EOF
218
219 cp -f "${CONFIG_NEW}" "${CONFIG_FILE}"
220 echo " done."
221
222 # Cleaning
223 rm -f "${CONFIG_NEW}"
224 echo "All done." 200 echo "All done."
225 201
226 ;; 202 ;;
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 @@
1Template: gnunet-systempeer/username
2Type: string
3Default: gnunet
4_Description: GNUnet user:
5 Please choose the user that the GNUnet server process will run as.
6 .
7 This should be a dedicated account. If the specified account does not
8 already exist, it will automatically be created, with no login shell.
9
10Template: gnunet-systempeer/groupname
11Type: string
12Default: gnunet
13_Description: GNUnet group:
14 Please choose the group that the GNUnet peer process will run as.
15 .
16 This should be a dedicated group, not one that already owns data.
17 Only the members of this group will have access to GNUnet data, and
18 be allowed to start and stop the GNUnet server.
19
20Template: gnunet-systempeer/autostart 1Template: gnunet-systempeer/autostart
21Type: boolean 2Type: boolean
22Default: true 3Default: false
23_Description: Should the GNUnet server be launched on boot? 4_Description: Should the GNUnet server be launched on boot?
24 If you choose this option, a GNUnet peer will be launched each time 5 If you choose this option, a GNUnet peer will be launched each time
25 the system is started. Otherwise, you will need to launch 6 the system is started. Otherwise, you will need to launch
@@ -27,7 +8,7 @@ _Description: Should the GNUnet server be launched on boot?
27 8
28Template: gnunet-dns/libnsswitch 9Template: gnunet-dns/libnsswitch
29Type: boolean 10Type: boolean
30Default: true 11Default: false
31_Description: Should GNS be hooked into the system resolution process? 12_Description: Should GNS be hooked into the system resolution process?
32 If you choose this option, GNS will be hooked into the system 13 If you choose this option, GNS will be hooked into the system
33 resolution process. Records that can be resolved using GNS are 14 resolution process. Records that can be resolved using GNS are
@@ -37,7 +18,7 @@ _Description: Should GNS be hooked into the system resolution process?
37 18
38Template: gnunet-user/proxy 19Template: gnunet-user/proxy
39Type: boolean 20Type: boolean
40Default: true 21Default: false
41_Description: Use the GNU Name System in Firefox/Chromium by default?" 22_Description: Use the GNU Name System in Firefox/Chromium by default?"
42 If you choose this option the proxy settings for Firefox and Chromium will be 23 If you choose this option the proxy settings for Firefox and Chromium will be
43 adjusted to use a user local running gnunet-gns-proxy to delegate DNS requests 24 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:
35 35
36override_dh_auto_install-indep: 36override_dh_auto_install-indep:
37 37
38override_dh_installsystemd:
39 # Do not enable or start the GNUnet service by default.
40 dh_installsystemd -pgnunet --name=gnunet --no-start --no-enable
41 # Final invocation to generate daemon reload
42 dh_installsystemd
43
38execute_after_dh_auto_install: 44execute_after_dh_auto_install:
39 dh_link -plibgnunet-dev \ 45 dh_link -plibgnunet-dev \
40 usr/lib/$(DEB_HOST_MULTIARCH)/gnunet/nss/libnss_gns.so.2 usr/lib/$(DEB_HOST_MULTIARCH)/libnss_gns.so \ 46 usr/lib/$(DEB_HOST_MULTIARCH)/gnunet/nss/libnss_gns.so.2 usr/lib/$(DEB_HOST_MULTIARCH)/libnss_gns.so \