From 0e924fa82940a4275ae3369839a32bd744bdd297 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Wed, 10 Sep 2014 22:30:47 +0200 Subject: [PATCH] Update the VM setup, use sid to build the debian package. --- Vagrantfile | 17 +++++++++++++++++ bootstrap-debian.sh | 14 +++++++++++++- conf/bashrc.sh | 9 +++++++++ conf/devscripts | 3 +++ conf/gpg-agent.conf | 5 +++++ conf/gpg.conf | 7 +++++++ conf/sources.list | 5 +++++ 7 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 conf/bashrc.sh create mode 100644 conf/devscripts create mode 100644 conf/gpg-agent.conf create mode 100644 conf/gpg.conf create mode 100644 conf/sources.list diff --git a/Vagrantfile b/Vagrantfile index becf8ca..c87bc37 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -9,10 +9,27 @@ Vagrant.configure("2") do |config| config.vm.define "wheezy" do |wheezy| wheezy.vm.box = "wheezy64" + config.vm.provision :file do |file| + file.source = 'conf/gpg-agent.conf' + file.destination = '/home/vagrant/.gnupg/gpg-agent.conf' + end + + config.vm.provision :file do |file| + file.source = 'conf/gpg.conf' + file.destination = '/home/vagrant/.gnupg/gpg.conf' + end + + config.vm.provision :file do |file| + file.source = 'conf/devscripts' + file.destination = '/home/vagrant/.devscripts' + end + config.vm.provision "shell" do |s| s.path = "bootstrap-debian.sh" s.privileged = false end + + config.vm.network :forwarded_port, guest: 4505, host: 4505 end config.vm.define "centos" do |centos| diff --git a/bootstrap-debian.sh b/bootstrap-debian.sh index baedf0a..e1d2f17 100644 --- a/bootstrap-debian.sh +++ b/bootstrap-debian.sh @@ -1,5 +1,16 @@ #!/usr/bin/env bash +if [ ! -f /etc/apt/sources.list.old ] +then + sudo mv /etc/apt/sources.list /etc/apt/sources.list.old + sudo cp /vagrant/conf/sources.list /etc/apt/sources.list +fi + +sudo apt-get update +sudo apt-get dist-upgrade -y + +cat /vagrant/conf/bashrc.sh >> ~/.bashrc + # PostgreSQL sidsrc=/etc/apt/sources.list.d/sid-src.list echo "deb-src http://ftp.fr.debian.org/debian/ sid main" | sudo tee $sidsrc @@ -21,7 +32,8 @@ sudo apt-get install -y postgresql-9.3 postgresql-contrib-9.3 \ sbcl \ git patch unzip \ devscripts pandoc \ - libsqlite3-dev + libsqlite3-dev \ + gnupg gnupg-agent sudo DEBIAN_FRONTEND=noninteractive \ apt-get install -y --allow-unauthenticated mariadb-server diff --git a/conf/bashrc.sh b/conf/bashrc.sh new file mode 100644 index 0000000..f793e18 --- /dev/null +++ b/conf/bashrc.sh @@ -0,0 +1,9 @@ + +# GnuPG Agent +export GPG_TTY=`tty` +eval "$(gpg-agent --daemon)" + +# DEBIAN +export DEBEMAIL="dim@tapoueh.org" +export DEBFULLNAME="Dimitri Fontaine" +export DEBSIGN_KEYID="60B1CB4E" diff --git a/conf/devscripts b/conf/devscripts new file mode 100644 index 0000000..1246852 --- /dev/null +++ b/conf/devscripts @@ -0,0 +1,3 @@ +DEBEMAIL="dim@tapoueh.org" +DEBFULLNAME="Dimitri Fontaine" +DEBSIGN_KEYID="60B1CB4E" diff --git a/conf/gpg-agent.conf b/conf/gpg-agent.conf new file mode 100644 index 0000000..e81f55e --- /dev/null +++ b/conf/gpg-agent.conf @@ -0,0 +1,5 @@ +# Keyboard control +no-grab + +# PIN entry program +pinentry-program /usr/bin/pinentry-curses diff --git a/conf/gpg.conf b/conf/gpg.conf new file mode 100644 index 0000000..e133c30 --- /dev/null +++ b/conf/gpg.conf @@ -0,0 +1,7 @@ +default-key 60B1CB4E +keyserver hkp://keys.gnupg.net +use-agent + +personal-digest-preferences SHA512 +cert-digest-algo SHA512 +default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed diff --git a/conf/sources.list b/conf/sources.list new file mode 100644 index 0000000..87448b2 --- /dev/null +++ b/conf/sources.list @@ -0,0 +1,5 @@ +deb http://ftp.fr.debian.org/debian sid main non-free contrib +deb-src http://ftp.fr.debian.org/debian sid main non-free contrib + +# deb http://security.debian.org/ wheezy/updates main contrib non-free +# deb-src http://security.debian.org/ wheezy/updates main contrib non-free