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 /debian | |
parent | b317b3e1114e93f5133429a64de82a4e865939f7 (diff) | |
download | gnunet-941ea7f200d30d148a6c0db5c703494769d644b9.tar.gz gnunet-941ea7f200d30d148a6c0db5c703494769d644b9.zip |
debian: various packaging fixes
Diffstat (limited to 'debian')
-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 @@ | |||
1 | var/lib/gnunet | var/lib/gnunet | |
2 | 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 | |||
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 | |||
209 | cat > "${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 | |||
214 | GNUNET_USER=${_USERNAME} | ||
215 | GNUNET_GROUP=${_GROUPNAME} | ||
216 | GNUNET_AUTOSTART="${_AUTOSTART}" | ||
217 | EOF | ||
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 @@ | |||
1 | Template: gnunet-systempeer/username | ||
2 | Type: string | ||
3 | Default: 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 | |||
10 | Template: gnunet-systempeer/groupname | ||
11 | Type: string | ||
12 | Default: 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 | |||
20 | Template: gnunet-systempeer/autostart | 1 | Template: gnunet-systempeer/autostart |
21 | Type: boolean | 2 | Type: boolean |
22 | Default: true | 3 | Default: 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 | ||
28 | Template: gnunet-dns/libnsswitch | 9 | Template: gnunet-dns/libnsswitch |
29 | Type: boolean | 10 | Type: boolean |
30 | Default: true | 11 | Default: 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 | ||
38 | Template: gnunet-user/proxy | 19 | Template: gnunet-user/proxy |
39 | Type: boolean | 20 | Type: boolean |
40 | Default: true | 21 | Default: 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 | ||
36 | override_dh_auto_install-indep: | 36 | override_dh_auto_install-indep: |
37 | 37 | ||
38 | override_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 | |||
38 | execute_after_dh_auto_install: | 44 | execute_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 \ |