1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Updated DEB build workflow

Updates to Makefile include:
 * add targets: deb-src, deb-src-upload, deb-upload
 * add variables to control DEB building: DEBUILD_OPTS, DPUT_OPTS, DEB_PPA, DEB_DIST, DEB_RELEASE
 * create deb files for all release values in DEB_DIST

Several updates to packaging/debian/*
 * Updated control file
 * Whitespace/formatting of changelog

Add deb-build to .gitignore
This commit is contained in:
James Laska 2014-06-20 16:04:10 -04:00
parent 1c3a654912
commit 411311495f
4 changed files with 100 additions and 39 deletions

1
.gitignore vendored
View file

@ -35,6 +35,7 @@ docsite/searchindex.js
docsite/htmlout docsite/htmlout
# deb building stuff... # deb building stuff...
debian/ debian/
deb-build
# Vim swap files # Vim swap files
*.swp *.swp
*.swo *.swo

View file

@ -5,7 +5,9 @@
# #
# useful targets: # useful targets:
# make sdist ---------------- produce a tarball # make sdist ---------------- produce a tarball
# make srpm ----------------- produce a SRPM
# make rpm ----------------- produce RPMs # make rpm ----------------- produce RPMs
# make deb-src -------------- produce a DEB source
# make deb ------------------ produce a DEB # make deb ------------------ produce a DEB
# make docs ----------------- rebuild the manpages (results are checked in) # make docs ----------------- rebuild the manpages (results are checked in)
# make tests ---------------- run the tests # make tests ---------------- run the tests
@ -45,6 +47,29 @@ else
DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M) DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M)
endif endif
# DEB build parameters
DEBUILD_BIN ?= debuild
DEBUILD_OPTS = --source-option="-I"
DPUT_BIN ?= dput
DPUT_OPTS =
ifeq ($(OFFICIAL),yes)
DEB_RELEASE = 1ppa
# Sign OFFICIAL builds using 'DEBSIGN_KEYID'
# DEBSIGN_KEYID is required when signing
ifneq ($(DEBSIGN_KEYID),)
DEBUILD_OPTS += -k$(DEBSIGN_KEYID)
endif
else
DEB_RELEASE = 0.git$(DATE)
# Do not sign unofficial builds
DEBUILD_OPTS += -uc -us
DPUT_OPTS += -u
endif
DEBUILD = $(DEBUILD_BIN) $(DEBUILD_OPTS)
DEB_PPA ?= ppa
# Choose the desired Ubuntu release: lucid precise saucy trusty
DEB_DIST ?= unstable
# RPM build parameters # RPM build parameters
RPMSPECDIR= packaging/rpm RPMSPECDIR= packaging/rpm
RPMSPEC = $(RPMSPECDIR)/ansible.spec RPMSPEC = $(RPMSPECDIR)/ansible.spec
@ -178,12 +203,44 @@ rpm: rpmcommon
@echo "#############################################" @echo "#############################################"
debian: sdist debian: sdist
@for DIST in $(DEB_DIST) ; do \
mkdir -p deb-build/$${DIST} ; \
tar -C deb-build/$${DIST} -xvf dist/$(NAME)-$(VERSION).tar.gz ; \
cp -a packaging/debian deb-build/$${DIST}/$(NAME)-$(VERSION)/ ; \
sed -ie "s#^$(NAME) (\([^)]*\)) \([^;]*\);#ansible (\1-$(DEB_RELEASE)~$${DIST}) $${DIST};#" deb-build/$${DIST}/$(NAME)-$(VERSION)/debian/changelog ; \
done
deb: debian deb: debian
cp -r packaging/debian ./ @for DIST in $(DEB_DIST) ; do \
chmod 755 debian/rules (cd deb-build/$${DIST}/$(NAME)-$(VERSION)/ && $(DEBUILD) -b) ; \
fakeroot debian/rules clean done
fakeroot dh_install @echo "#############################################"
fakeroot debian/rules binary @echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
@echo "#############################################"
deb-src: debian
@for DIST in $(DEB_DIST) ; do \
(cd deb-build/$${DIST}/$(NAME)-$(VERSION)/ && $(DEBUILD) -S) ; \
done
@echo "#############################################"
@echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_source.changes ; \
done
@echo "#############################################"
deb-upload: deb
@for DIST in $(DEB_DIST) ; do \
$(DPUT_BIN) $(DPUT_OPTS) $(DEB_PPA) deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
deb-src-upload: deb-src
@for DIST in $(DEB_DIST) ; do \
$(DPUT_BIN) $(DPUT_OPTS) $(DEB_PPA) deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_source.changes ; \
done
# for arch or gentoo, read instructions in the appropriate 'packaging' subdirectory directory # for arch or gentoo, read instructions in the appropriate 'packaging' subdirectory directory

View file

@ -8,49 +8,49 @@ ansible (1.6.3) unstable; urgency=low
* 1.6.3 release * 1.6.3 release
-- Michael DeHaan <michael@ansible.com> Mon, 09 Jun 2014 16:30:00 -0500 -- Michael DeHaan <michael@ansible.com> Mon, 09 Jun 2014 16:30:00 -0500
ansible (1.6.2) unstable; urgency=low ansible (1.6.2) unstable; urgency=low
* 1.6.2 release * 1.6.2 release
-- Michael DeHaan <michael@ansible.com> Fri, 23 May 2014 17:30:00 -0500 -- Michael DeHaan <michael@ansible.com> Fri, 23 May 2014 17:30:00 -0500
ansible (1.6.1) unstable; urgency=low ansible (1.6.1) unstable; urgency=low
* 1.6.1 release * 1.6.1 release
-- Michael DeHaan <michael@ansible.com> Wed, 07 May 2014 13:30:00 -0500 -- Michael DeHaan <michael@ansible.com> Wed, 07 May 2014 13:30:00 -0500
ansible (1.6) unstable; urgency=low ansible (1.6) unstable; urgency=low
* 1.6.0 release * 1.6.0 release
-- Michael DeHaan <michael@ansible.com> Mon, 05 May 2014 17:30:03 -0500 -- Michael DeHaan <michael@ansible.com> Mon, 05 May 2014 17:30:03 -0500
ansible (1.5.5) unstable; urgency=low ansible (1.5.5) unstable; urgency=low
* 1.5.5 release * 1.5.5 release
-- Michael DeHaan <michael@ansible.com> Fri, 18 April 2014 15:00:00 -0500 -- Michael DeHaan <michael@ansible.com> Fri, 18 April 2014 15:00:00 -0500
ansible (1.5.4) unstable; urgency=low ansible (1.5.4) unstable; urgency=low
* 1.5.4 release * 1.5.4 release
-- Michael DeHaan <michael@ansible.com> Tue, 01 April 2014 08:46:00 -0500 -- Michael DeHaan <michael@ansible.com> Tue, 01 April 2014 08:46:00 -0500
ansible (1.5.3) unstable; urgency=low ansible (1.5.3) unstable; urgency=low
* 1.5.3 release * 1.5.3 release
-- Michael DeHaan <michael@ansible.com> Thu, 13 March 2014 08:46:00 -0500 -- Michael DeHaan <michael@ansible.com> Thu, 13 March 2014 08:46:00 -0500
ansible (1.5.2) unstable; urgency=low ansible (1.5.2) unstable; urgency=low
* 1.5.2 release * 1.5.2 release
-- Michael DeHaan <michael@ansible.com> Tue, 11 March 2014 08:46:00 -0500 -- Michael DeHaan <michael@ansible.com> Tue, 11 March 2014 08:46:00 -0500
ansible (1.5.1) unstable; urgency=low ansible (1.5.1) unstable; urgency=low

View file

@ -1,13 +1,16 @@
Source: ansible Source: ansible
Section: admin Section: admin
Priority: optional Priority: optional
Maintainer: Henry Graham (hzgraham) <Henry.Graham@mail.wvu.edu> Standards-Version: 3.9.3
Build-Depends: cdbs, debhelper (>= 5.0.0), asciidoc Maintainer: Michael DeHaan <michael.dehaan@gmail.com>
Standards-Version: 3.9.1 Build-Depends: cdbs, debhelper (>= 5.0.0), asciidoc, python, python-support, python-setuptools
Homepage: http://ansible.github.com/ Homepage: http://ansible.github.com/
Package: ansible Package: ansible
Architecture: all Architecture: all
Depends: python, python-support (>= 0.90), python-jinja2, python-yaml, python-paramiko, python-httplib2, sshpass Depends: python, python-support (>= 0.90), python-jinja2, python-yaml, python-paramiko, python-httplib2, sshpass, ${misc:Depends}
Description: Ansible Application Description: A radically simple IT automation platform
Ansible is a extra-simple tool/API for doing 'parallel remote things' over SSH executing commands, running "modules", or executing larger 'playbooks' that can serve as a configuration management or deployment system. A radically simple IT automation platform that makes your applications and
systems easier to deploy. Avoid writing scripts or custom code to deploy and
update your applications— automate in a language that approaches plain English,
using SSH, with no agents to install on remote systems.