[DRE-commits] [redmine] 06/07: debian/postinst: generate random secret with Ruby
Antonio Terceiro
terceiro at moszumanska.debian.org
Sat Nov 12 23:06:51 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository redmine.
commit 4b155b4277a76cc1d85b15a3dc9cf80cd9ad4363
Author: Antonio Terceiro <terceiro at debian.org>
Date: Sat Nov 12 20:43:49 2016 -0200
debian/postinst: generate random secret with Ruby
---
debian/changelog | 2 ++
debian/postinst | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index e7b4194..309373c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ redmine (3.3.1-1) UNRELEASED; urgency=medium
* redmine-mysql: switch dependency from mysql-client to
default-mysql-client, and suggestion from mysql-server to
default-mysql-server.
+ * debian/postinst: generate random secret with Ruby instead of OpenSSL
+ directly. For some reason this fixes the autopkgtest tests under LXC.
-- Antonio Terceiro <terceiro at debian.org> Sat, 12 Nov 2016 19:12:46 -0200
diff --git a/debian/postinst b/debian/postinst
index 7779538..1c38f83 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -70,7 +70,7 @@ manage_instance() {
local secret_key=/etc/redmine/$instance/secret_key.txt
if [ ! -f $secret_key ]; then
- openssl rand -hex 16 > $secret_key
+ ruby -rsecurerandom -e 'puts SecureRandom.hex(16)' > $secret_key
fi
chown root:www-data $secret_key
chmod 0640 $secret_key
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/redmine.git
More information about the Pkg-ruby-extras-commits
mailing list