From 56dde3ff31a6b4152aea5945c0b6b17cda20e877 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 18 May 2016 13:28:02 -0400 Subject: [PATCH 01/11] Rename sigil package to gliderlabs-sigl Also fix a few lintian issues --- deb.mk | 17 +++++++++++++---- debian/control | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/deb.mk b/deb.mk index 8a8315c7e..f3caac115 100644 --- a/deb.mk +++ b/deb.mk @@ -26,7 +26,7 @@ SIGIL_DESCRIPTION = 'Standalone string interpolator and template processor' SIGIL_REPO_NAME ?= gliderlabs/sigil SIGIL_VERSION ?= 0.4.0 SIGIL_ARCHITECTURE = amd64 -SIGIL_PACKAGE_NAME = sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb +SIGIL_PACKAGE_NAME = gliderlabs_sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb SIGIL_URL = https://github.com/gliderlabs/sigil/releases/download/v$(SIGIL_VERSION)/sigil_$(SIGIL_VERSION)_Linux_x86_64.tgz .PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-plugn deb-setup deb-sshcommand deb-sigil @@ -143,15 +143,24 @@ deb-sshcommand: deb-sigil: deb-setup rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME) - mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin + mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin @echo "-> Downloading package" wget -q -O /tmp/tmp/sigil-$(SIGIL_VERSION).tgz $(SIGIL_URL) cd /tmp/tmp/ && tar zxf /tmp/tmp/sigil-$(SIGIL_VERSION).tgz @echo "-> Copying files into place" - cp /tmp/tmp/sigil /tmp/build/usr/local/bin/sigil && chmod +x /tmp/build/usr/local/bin/sigil + cp /tmp/tmp/sigil /tmp/build/usr/bin/sigil && chmod +x /tmp/build/usr/bin/sigil @echo "-> Creating $(SIGIL_PACKAGE_NAME)" - sudo fpm -t deb -s dir -C /tmp/build -n sigil -v $(SIGIL_VERSION) -a $(SIGIL_ARCHITECTURE) -p $(SIGIL_PACKAGE_NAME) --url "https://github.com/$(SIGIL_REPO_NAME)" --description $(SIGIL_DESCRIPTION) --license 'MIT License' . + sudo fpm -t deb -s dir -C /tmp/build -n gliderlabs-sigil \ + --version $(SIGIL_VERSION) \ + --architecture $(SIGIL_ARCHITECTURE) \ + --package $(SIGIL_PACKAGE_NAME) \ + --url "https://github.com/$(SIGIL_REPO_NAME)" \ + --maintainer "Jose Diaz-Gonzalez " \ + --category utils \ + --description $(SIGIL_DESCRIPTION) \ + --license 'MIT License' \ + . mv *.deb /tmp diff --git a/debian/control b/debian/control index b6ffa0e0e..a7cbe3448 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Version: 0.5.7 Section: web Priority: optional Architecture: amd64 -Depends: locales, git, make, curl, gcc, man-db, sshcommand, sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties +Depends: locales, git, make, curl, gcc, man-db, sshcommand, gliderlabs-sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties Recommends: herokuish Pre-Depends: nginx (>= 1.4.6), dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf Maintainer: Jose Diaz-Gonzalez From 88db4daa6282b2d09377e74f81a489e4eb5b529c Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 18 May 2016 13:28:33 -0400 Subject: [PATCH 02/11] Install lintian so built packages can be linted --- deb.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deb.mk b/deb.mk index f3caac115..6ac3e65bb 100644 --- a/deb.mk +++ b/deb.mk @@ -52,7 +52,7 @@ deb-all: deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil deb-setup: @echo "-> Updating deb repository and installing build requirements" @sudo apt-get update -qq > /dev/null - @sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -qq -y gcc git ruby-dev ruby1.9.1 > /dev/null 2>&1 + @sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -qq -y gcc git ruby-dev ruby1.9.1 lintian > /dev/null 2>&1 @command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc @ssh -o StrictHostKeyChecking=no git@github.com || true From a5ef53f2f5c7d968cba5f72a870e9d9f60e082ac Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 18 May 2016 13:37:23 -0400 Subject: [PATCH 03/11] Pass more lintian rules in plugn package --- deb.mk | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/deb.mk b/deb.mk index 6ac3e65bb..f43ef405e 100644 --- a/deb.mk +++ b/deb.mk @@ -112,17 +112,26 @@ deb-dokku: deb-setup deb-plugn: deb-setup rm -rf /tmp/tmp /tmp/build $(PLUGN_PACKAGE_NAME) - mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin + mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin @echo "-> Downloading package" wget -q -O /tmp/tmp/plugn-$(PLUGN_VERSION).tgz $(PLUGN_URL) cd /tmp/tmp/ && tar zxf /tmp/tmp/plugn-$(PLUGN_VERSION).tgz @echo "-> Copying files into place" - cp /tmp/tmp/plugn /tmp/build/usr/local/bin/plugn && chmod +x /tmp/build/usr/local/bin/plugn + cp /tmp/tmp/plugn /tmp/build/usr/bin/plugn && chmod +x /tmp/build/usr/bin/plugn @echo "-> Creating $(PLUGN_PACKAGE_NAME)" - sudo fpm -t deb -s dir -C /tmp/build -n plugn -v $(PLUGN_VERSION) -a $(PLUGN_ARCHITECTURE) -p $(PLUGN_PACKAGE_NAME) --url "https://github.com/$(PLUGN_REPO_NAME)" --description $(PLUGN_DESCRIPTION) --license 'MIT License' . + sudo fpm -t deb -s dir -C /tmp/build -n plugn \ + --version $(PLUGN_VERSION) \ + --architecture $(PLUGN_ARCHITECTURE) \ + --package $(PLUGN_PACKAGE_NAME) \ + --url "https://github.com/$(PLUGN_REPO_NAME)" \ + --maintainer "Jose Diaz-Gonzalez " \ + --category utils \ + --description $(PLUGN_DESCRIPTION) \ + --license 'MIT License' \ + . mv *.deb /tmp deb-sshcommand: From 904dfb64aaca396a14da74ff4cdd7eaed2ef555b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 18 May 2016 13:42:47 -0400 Subject: [PATCH 04/11] Pass more lintian rules in sshcommand package --- deb.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/deb.mk b/deb.mk index f43ef405e..e05be8233 100644 --- a/deb.mk +++ b/deb.mk @@ -147,7 +147,16 @@ deb-sshcommand: chmod +x /tmp/build/usr/local/bin/sshcommand @echo "-> Creating $(SSHCOMMAND_PACKAGE_NAME)" - sudo fpm -t deb -s dir -C /tmp/build -n sshcommand -v $(SSHCOMMAND_VERSION) -a $(SSHCOMMAND_ARCHITECTURE) -p $(SSHCOMMAND_PACKAGE_NAME) --url "https://github.com/$(SSHCOMMAND_REPO_NAME)" --description $(SSHCOMMAND_DESCRIPTION) --license 'MIT License' . + sudo fpm -t deb -s dir -C /tmp/build -n sshcommand \ + --version $(SSHCOMMAND_VERSION) \ + --architecture $(SSHCOMMAND_ARCHITECTURE) \ + --package $(SSHCOMMAND_PACKAGE_NAME) \ + --url "https://github.com/$(SSHCOMMAND_REPO_NAME)" \ + --maintainer "Jose Diaz-Gonzalez " \ + --category admin \ + --description $(SSHCOMMAND_DESCRIPTION) \ + --license 'MIT License' \ + . mv *.deb /tmp deb-sigil: deb-setup From b232f7cd490784eb5739713a0a120297b9d5b0f2 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 18 May 2016 13:53:23 -0400 Subject: [PATCH 05/11] Fix description lintian issue in plugn, sshcommand and sigil --- deb.mk | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/deb.mk b/deb.mk index e05be8233..6cc303f1f 100644 --- a/deb.mk +++ b/deb.mk @@ -8,27 +8,46 @@ DOKKU_DESCRIPTION = 'Docker powered mini-Heroku in around 100 lines of Bash' DOKKU_REPO_NAME ?= dokku/dokku DOKKU_ARCHITECTURE = amd64 -PLUGN_DESCRIPTION = 'Hook system that lets users extend your application with plugins' +define PLUGN_DESCRIPTION +Hook system that lets users extend your application with plugins +Plugin triggers are simply scripts that are executed by the system. +You can use any language you want, so long as the script is +executable and has the proper language requirements installed +endef PLUGN_REPO_NAME ?= dokku/plugn PLUGN_VERSION ?= 0.2.1 PLUGN_ARCHITECTURE = amd64 PLUGN_PACKAGE_NAME = plugn_$(PLUGN_VERSION)_$(PLUGN_ARCHITECTURE).deb PLUGN_URL = https://github.com/dokku/plugn/releases/download/v$(PLUGN_VERSION)/plugn_$(PLUGN_VERSION)_linux_x86_64.tgz -SSHCOMMAND_DESCRIPTION = 'Turn SSH into a thin client specifically for your app' +define SSHCOMMAND_DESCRIPTION +Turn SSH into a thin client specifically for your app +Simplifies running a single command over SSH, and +manages authorized keys (ACL) and users in order to do so. +endef SSHCOMMAND_REPO_NAME ?= dokku/sshcommand SSHCOMMAND_VERSION ?= 0.4.0 SSHCOMMAND_ARCHITECTURE = amd64 SSHCOMMAND_PACKAGE_NAME = sshcommand_$(SSHCOMMAND_VERSION)_$(SSHCOMMAND_ARCHITECTURE).deb SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v$(SSHCOMMAND_VERSION)/sshcommand -SIGIL_DESCRIPTION = 'Standalone string interpolator and template processor' +define SIGIL_DESCRIPTION +Standalone string interpolator and template processor +Sigil is a command line tool for template processing +and POSIX-compliant variable expansion. It was created +for configuration templating, but can be used for any +text processing. +endef SIGIL_REPO_NAME ?= gliderlabs/sigil SIGIL_VERSION ?= 0.4.0 SIGIL_ARCHITECTURE = amd64 SIGIL_PACKAGE_NAME = gliderlabs_sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb SIGIL_URL = https://github.com/gliderlabs/sigil/releases/download/v$(SIGIL_VERSION)/sigil_$(SIGIL_VERSION)_Linux_x86_64.tgz +export PLUGN_DESCRIPTION +export SIGIL_DESCRIPTION +export SSHCOMMAND_DESCRIPTION + .PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-plugn deb-setup deb-sshcommand deb-sigil install-from-deb: @@ -129,7 +148,7 @@ deb-plugn: deb-setup --url "https://github.com/$(PLUGN_REPO_NAME)" \ --maintainer "Jose Diaz-Gonzalez " \ --category utils \ - --description $(PLUGN_DESCRIPTION) \ + --description "$$PLUGN_DESCRIPTION" \ --license 'MIT License' \ . mv *.deb /tmp @@ -154,7 +173,7 @@ deb-sshcommand: --url "https://github.com/$(SSHCOMMAND_REPO_NAME)" \ --maintainer "Jose Diaz-Gonzalez " \ --category admin \ - --description $(SSHCOMMAND_DESCRIPTION) \ + --description "$$SSHCOMMAND_DESCRIPTION" \ --license 'MIT License' \ . mv *.deb /tmp @@ -178,7 +197,7 @@ deb-sigil: deb-setup --url "https://github.com/$(SIGIL_REPO_NAME)" \ --maintainer "Jose Diaz-Gonzalez " \ --category utils \ - --description $(SIGIL_DESCRIPTION) \ + --description "$$SIGIL_DESCRIPTION" \ --license 'MIT License' \ . mv *.deb /tmp From 9bd0c69dacc35dc1d264d8aaab6fedccc8efaab5 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 18 May 2016 13:56:09 -0400 Subject: [PATCH 06/11] Do not peg nginx to a specific version --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index a7cbe3448..095f75d63 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Priority: optional Architecture: amd64 Depends: locales, git, make, curl, gcc, man-db, sshcommand, gliderlabs-sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties Recommends: herokuish -Pre-Depends: nginx (>= 1.4.6), dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf +Pre-Depends: nginx, dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf Maintainer: Jose Diaz-Gonzalez Description: Docker-powered PaaS that helps build and manage the lifecycle of applications From 476429a7db60b7546c9d88d5bf4bcccce9f8059d Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 18 May 2016 14:10:27 -0400 Subject: [PATCH 07/11] Remove stray DS_Store files from package --- deb.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/deb.mk b/deb.mk index 6cc303f1f..153664900 100644 --- a/deb.mk +++ b/deb.mk @@ -115,6 +115,7 @@ deb-dokku: deb-setup cp dokku /tmp/build/usr/local/bin cp LICENSE /tmp/build/usr/share/doc/dokku/copyright + find . -name ".DS_Store" -depth -exec rm {} \; cp -r plugins/* /tmp/build/var/lib/dokku/core-plugins/available find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do touch /tmp/build/var/lib/dokku/core-plugins/available/$$plugin/.core; done $(MAKE) help2man From 29c69f9f86cc3b14e5ab7d33e74682cedc33796d Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 18 May 2016 14:10:45 -0400 Subject: [PATCH 08/11] Move dokku binary to /usr/bin from /usr/local/bin --- deb.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deb.mk b/deb.mk index 153664900..eac734a1e 100644 --- a/deb.mk +++ b/deb.mk @@ -107,13 +107,13 @@ deb-dokku: deb-setup mkdir -p /tmp/tmp /tmp/build cp -r debian /tmp/build/DEBIAN - mkdir -p /tmp/build/usr/local/bin + mkdir -p /tmp/build/usr/bin mkdir -p /tmp/build/var/lib/dokku/core-plugins/available mkdir -p /tmp/build/usr/share/man/man1 mkdir -p /tmp/build/usr/share/dokku/contrib mkdir -p /tmp/build/usr/share/doc/dokku - cp dokku /tmp/build/usr/local/bin + cp dokku /tmp/build/usr/bin cp LICENSE /tmp/build/usr/share/doc/dokku/copyright find . -name ".DS_Store" -depth -exec rm {} \; cp -r plugins/* /tmp/build/var/lib/dokku/core-plugins/available From 4d91b2085e51c0db73c109e3b5ef3c9c1407bf4a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 18 May 2016 14:11:06 -0400 Subject: [PATCH 09/11] Add extended description to dokku package --- debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 095f75d63..442e901a7 100644 --- a/debian/control +++ b/debian/control @@ -8,4 +8,5 @@ Recommends: herokuish Pre-Depends: nginx, dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf Maintainer: Jose Diaz-Gonzalez Description: Docker-powered PaaS that helps build and manage the lifecycle of applications - + Dokku is an extensible, open source Platform as a Service + that runs on a single server of your choice. From 4917330b79d7456fa314da2dada76c42d97df42d Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 18 May 2016 14:12:40 -0400 Subject: [PATCH 10/11] Make bash files executable --- plugins/config/functions | 0 plugins/docker-options/functions | 0 plugins/storage/install | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 plugins/config/functions mode change 100644 => 100755 plugins/docker-options/functions mode change 100644 => 100755 plugins/storage/install diff --git a/plugins/config/functions b/plugins/config/functions old mode 100644 new mode 100755 diff --git a/plugins/docker-options/functions b/plugins/docker-options/functions old mode 100644 new mode 100755 diff --git a/plugins/storage/install b/plugins/storage/install old mode 100644 new mode 100755 From a833688355c82cb8e849cabd1f85bd5886f592b5 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 18 May 2016 14:45:11 -0400 Subject: [PATCH 11/11] Allow users to override their server_names_hash_bucket_size --- plugins/nginx-vhosts/install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/nginx-vhosts/install b/plugins/nginx-vhosts/install index 0308d5e5f..e08840d2d 100755 --- a/plugins/nginx-vhosts/install +++ b/plugins/nginx-vhosts/install @@ -36,7 +36,10 @@ ssl_ciphers EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES: EOF fi -echo 'server_names_hash_bucket_size 512;' >| /etc/nginx/conf.d/server_names_hash_bucket_size.conf +# allow users to override their server_names_hash_bucket_size +if [[ ! -f /etc/nginx/conf.d/server_names_hash_bucket_size.conf ]]; then + echo 'server_names_hash_bucket_size 512;' >| /etc/nginx/conf.d/server_names_hash_bucket_size.conf +fi # revert dokku group changes gpasswd -a dokku adm