How to build OpenStack dev packages with custom patches

TAGS: linux openstack deb build

Intro

At some point, you will need building procedure for openstack packages (deb in our case). You can do it with following commands (I use Jenkins job for that).

Script

#!/bin/bash -ex rm * || true pushd sources git clean -fdx for remote in `git branch -r`; do git checkout --track $remote || true; done git checkout patch-queue/master git reset --hard origin/patch-queue/master git checkout master git reset --hard origin/master git clean -fdx rm debian/gbp.conf || true [[ `head -n 1 debian/changelog` =~ .*\((.*)\).* ]] last_version=${BASH_REMATCH[1]} new_version=$last_version"+itkey"$BUILD_NUMBER gbp pq export --commit #git add --all debian/patches #git commit -m "Adding patches" gbp dch -a --upstream-tag=trusty --git-author -R --spawn-editor=never -N $new_version --commit gbp buildpackage --git-pbuilder --git-dist=trusty --git-no-purge --git-ignore-new debsign

Written on February 21, 2019

Archive

linux openstack kubernetes gluster ceph ansible docker systemctl python openshift log centos sed registry kolla kibana keepalived elasticsearch deploy cloud-init auth HA zabbix vsphere vmware venv tools swift ssl ssh scm ruby rsyslog rhel rbac rabbitmq prometheus postgres policy pgpool2 patrole pacemaker ntp nfs net mq monitoring mongo mbr lvm logstash kubespray kubeadm kolla-ansible jenkins jekyII java ironic helm heketi harbor grub github ganesha fluentd fluent-bit fio drbd diskimage-builder devstack debug deb db cisco cicd ceph-ansible calico build bitbucket benchmarking apparmor api NUMA Linux Golang Go ELK 3par