From 0a71dca825c7d888aa6f14066f0fa3bc142b6ac6 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Mon, 18 May 2015 21:54:12 -0400 Subject: [PATCH] add preliminary build tools for a Mail-in-a-Box PPA Starting with my dnswl.org modifications to postgrey. --- ppa/Makefile | 30 ++++++++++++++++++++++++++++++ ppa/README.md | 38 ++++++++++++++++++++++++++++++++++++++ ppa/Vagrantfile | 11 +++++++++++ 3 files changed, 79 insertions(+) create mode 100755 ppa/Makefile create mode 100644 ppa/README.md create mode 100644 ppa/Vagrantfile diff --git a/ppa/Makefile b/ppa/Makefile new file mode 100755 index 00000000..3300412c --- /dev/null +++ b/ppa/Makefile @@ -0,0 +1,30 @@ +all: + # Clean. + rm -rf build + + # Prepare to build source packages. + sudo apt-get install -y git dpkg-dev devscripts dput + mkdir -p build + + # POSTGREY + + # Download our fork of the Debian postgrey package. + git clone https://github.com/mail-in-a-box/postgrey build/postgrey + + # Download the corresponding upstream package. + wget -O build/postgrey_1.35.orig.tar.gz http://postgrey.schweikert.ch/pub/postgrey-1.35.tar.gz + + # Build the source package. + sudo apt-get build-dep -y postgrey + (cd build/postgrey; dpkg-source -b .) + (cd build/postgrey; dpkg-buildpackage -S -us -uc -nc) + + # Sign the packages. + debsign build/postgrey_1.35-1miab1_source.changes + + # Upload to PPA. + dput ppa:mail-in-a-box/ppa build/postgrey_1.35-1miab1_source.changes + + # Clear the intermediate files. + rm -rf build/postgrey + diff --git a/ppa/README.md b/ppa/README.md new file mode 100644 index 00000000..91c2f712 --- /dev/null +++ b/ppa/README.md @@ -0,0 +1,38 @@ +ppa instructions +================ + +Mail-in-a-Box maintains a Launchpad.net PPA ([Mail-in-a-Box PPA](https://launchpad.net/~mail-in-a-box/+archive/ubuntu/ppa)) for additional deb's that we want to have installed on systems. + +Packages +-------- + +* [postgrey](https://github.com/mail-in-a-box/postgrey), with a modification to whitelist senders that are whitelisted by [dnswl.org](https://www.dnswl.org/) (i.e. don't greylist mail from them). + +Building +-------- + +To rebuild the packages in the PPA, you'll need to be @JoshData. + +First: + +* You should have an account on Launchpad.net. +* Your account should have your GPG key set (to the fingerprint of a GPG key on your system matching the identity at the top of the debian/changelog files). +* You should have write permission to the PPA. + +To build: + + # Start a clean VM. + vagrant up + + # Put your signing keys (on the host machine) into the VM (so it can sign the debs). + gpg --export-secret-keys | vagrant ssh -- gpg --import + + # Build & upload to launchpad. + vagrant ssh -- "cd /vagrant && make" + +To use on a Mail-in-a-Box box, add the PPA and then upgrade packages: + + apt-add-repository ppa:mail-in-a-box/ppa + apt-get update + apt-get upgrade + diff --git a/ppa/Vagrantfile b/ppa/Vagrantfile new file mode 100644 index 00000000..34cc4068 --- /dev/null +++ b/ppa/Vagrantfile @@ -0,0 +1,11 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "ubuntu14.04" + config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" + + config.vm.provision :shell, :inline => <<-SH + sudo apt-get update +SH +end