Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Commit

Permalink
added debian packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
jhermann committed Jun 14, 2016
1 parent ac2a58c commit 404a72c
Show file tree
Hide file tree
Showing 11 changed files with 125 additions and 0 deletions.
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config-sesame (0.1.0) xenial; urgency=low

* config-sesame: Initial debian packaging

-- Juergen Hermann <jh@web.de> Tue, 14 Jun 2016 11:37:51 +0200
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
1 change: 1 addition & 0 deletions debian/config-sesame.links
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
opt/virtualenvs/config-sesame/bin/config-sesame usr/bin/config-sesame
15 changes: 15 additions & 0 deletions debian/config-sesame.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
#
# "config-sesame" postinst script
#
set -e

#DEBHELPER#

# Add your own code here, note that some "dh_venv_*" env vars are available,
# at least these ones:
#
# dh_venv_package Name of the Debian package
# dh_venv_install_dir Root directory for the installed virtualenv

exit 0
11 changes: 11 additions & 0 deletions debian/config-sesame.triggers
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Register interest in Python interpreter changes (Python 2 for now); and
# don't make the Python package dependent on the virtualenv package
# processing (noawait)
interest-noawait /usr/bin/python2.6
interest-noawait /usr/bin/python2.7
interest-noawait /usr/bin/python3.3
interest-noawait /usr/bin/python3.4
interest-noawait /usr/bin/python3.5

# Also provide a symbolic trigger for all dh-virtualenv packages
interest dh-virtualenv-interpreter-update
20 changes: 20 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Source: config-sesame
Section: contrib/python
Priority: extra
Maintainer: 1&1 Group <jh@web.de>
Build-Depends: debhelper (>= 9), python, dh-virtualenv (>= 0.11), tar
Standards-Version: 3.9.5
Homepage: https://github.com/1and1/config-sesame

Package: config-sesame
Architecture: any
Pre-Depends: dpkg (>= 1.16.1), python2.7 | python2.6, ${misc:Pre-Depends}
Depends: ${python:Depends}, ${misc:Depends}
Description: A tool to look up secrets from a vault based on existing shareable configuration.
.
This is a distribution of "config-sesame" as a self-contained
Python virtualenv wrapped into a Debian package ("omnibus" package,
all passengers on board). The packaged virtualenv is kept in sync with
the host's interpreter automatically.
.
See https://github.com/spotify/dh-virtualenv for more details.
14 changes: 14 additions & 0 deletions debian/cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"distro": "UNRELEASED",
"email": "jh@web.de",
"full_name": "1&1 Group",
"github_username": "1and1",
"license": "Apache 2.0",
"package": "config-sesame",
"repo_name": "debian",
"short_description": "A tool to look up secrets from a vault based on existing shareable configuration.",
"snake": "/usr/bin/python2",
"url": "https://github.com/1and1/config-sesame",
"version": "0.1.0",
"year": "2016"
}
13 changes: 13 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2016, 1&1 Group <jh@web.de>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
36 changes: 36 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/make -f
#
# Build Debian package using https://github.com/spotify/dh-virtualenv
#
# The below targets create a clean copy of the workdir via
# using "sdist", else "pip" goes haywire when installing from
# sourcedir ".", because that includes the debian build stage,
# and a recursive explosion ensues when symlinks are followed.
#
# It also ensures your MANIFEST is complete and at least covers
# all files needed for a release build.

# Increase trace logging, see debhelper(7) (uncomment to enable)
#DH_VERBOSE=1

export DH_VIRTUALENV_INSTALL_ROOT=/opt/virtualenvs
SNAKE=/usr/bin/python2
EXTRA_REQUIREMENTS=--preinstall "setuptools>=17.1" --preinstall "pip>=7" --preinstall "wheel"
DH_VENV_ARGS=--with python-virtualenv --setuptools --python $(SNAKE) $(EXTRA_REQUIREMENTS) #-v
PACKAGE=$(shell dh_listpackages)
VERSION=$(shell $(SNAKE) setup.py --version)
SDIST_DIR=debian/$(PACKAGE)-$(VERSION)

clean:
test ! -d dist || rm -rf dist
test ! -d $(SDIST_DIR) || rm -rf $(SDIST_DIR)
dh $@ $(DH_VENV_ARGS)

build-arch:
$(SNAKE) setup.py sdist --formats tar
mkdir -p $(SDIST_DIR)
tar -x -C $(SDIST_DIR) --strip-components=1 --exclude '*.egg-info' -f dist/*.tar
dh $@ $(DH_VENV_ARGS) --sourcedir $(SDIST_DIR)

%:
dh $@ $(DH_VENV_ARGS) --sourcedir $(SDIST_DIR)
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
8 changes: 8 additions & 0 deletions debian/source/options
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tar-ignore
tar-ignore = .coverage
tar-ignore = .tox
tar-ignore = .venv
tar-ignore = bin
tar-ignore = docs/_build
tar-ignore = *.log
tar-ignore = *.egg-info

0 comments on commit 404a72c

Please sign in to comment.