[Pkg-varnish-devel] Bug#596373: varnish postinst script fails on GNU/kFreeBSD
Marc Fournier
marc.fournier at camptocamp.com
Fri Sep 10 19:37:10 UTC 2010
Package: varnish
Version: 2.1.2-1
Severity: important
Tags: patch
*** Please type your report below this line ***
The postinst script copies /proc/sys/kernel/random/uuid to /etc/varnish/secret,
but this proc entry isn't available on GNU/kFreeBSD:
# dpkg --configure varnish
Setting up varnish (2.1.2-1) ...
install: cannot stat `/proc/sys/kernel/random/uuid': No such file or directory
dpkg: error processing varnish (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
varnish
Here is a suggestion which generates a random secret using tools found in
coreutils, and without relying on /proc entries:
--- /var/lib/dpkg/info/varnish.postinst.orig 2010-09-10 21:16:00.000000000 +0200
+++ /var/lib/dpkg/info/varnish.postinst 2010-09-10 21:27:41.000000000 +0200
@@ -38,7 +38,9 @@
varnish_create_secret() {
if ! [ -f "${secret_file}" ]; then
- install -m 0600 /proc/sys/kernel/random/uuid "${secret_file}"
+ touch "${secret_file}" && \
+ chmod 0600 "${secret_file}" && \
+ dd if=/dev/urandom count=1 bs=128 2>/dev/null | tr -dc "A-Za-z0-9" > "${secret_file}"
fi
}
(tested and works for me).
Cheers,
Marc
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'testing-proposed-updates'), (20, 'unstable')
Architecture: kfreebsd-amd64 (x86_64)
Kernel: kFreeBSD 8.1-1-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages varnish depends on:
ii adduser 3.112 add and remove users and groups
ii gcc 4:4.4.4-2 The GNU C compiler
ii libc0.1 2.11.2-2 Embedded GNU C Library: Shared lib
ii libc0.1-dev [libc6-dev] 2.11.2-2 Embedded GNU C Library: Developmen
ii libncurses5 5.7+20100313-2 shared libraries for terminal hand
ii libvarnish1 2.1.2-1 shared libraries for Varnish
varnish recommends no packages.
varnish suggests no packages.
-- no debconf information
More information about the Pkg-varnish-devel
mailing list