Git Product home page Git Product logo

consul-deb's Introduction

A debian package for Consul

Build Status

Overview

This project can be used to create a debian package for the Consul git repository on github (https://github.com/hashicorp/consul). The package is produced following the standard layout of git-buildpackage projects, except for the name of the debian branch (which in this case is debian instead of master), and uses Docker to ensure isolated, repeatable builds.

To build the package, checkout the debian branch and run make:

$ git checkout debian
$ make -C debian/build

The command only depends on the presence of git and Docker; it creates a new image locally and executes gbp buildpackage in it. Results will be saved to /tmp/consul-deb.

$ ls /tmp/consul-deb
consul_0.6.4-1~trusty1~ppa1.debian.tar.gz  consul_0.6.4-1~trusty1~ppa1.dsc
consul_0.6.4-1~trusty1~ppa1_source.build   consul_0.6.4-1~trusty1~ppa1_source.changes
consul_0.6.4.orig.tar.gz

This repository is tagged with upstream versions (e.g., v0.6.4), which point to the commits from the upstream branch, and Debian package versions (e.g. v0.6.4-1_trusty1_ppa1). Since the tilde (~) character is not legal in git tags, Debian revision tags use underscore instead (the tag in the example points to version 0.6.4-1~trusty1~ppa1). You can build a specific version of the package by checking out the relevant tag:

$ # ==> build version 0.6.4-1~trusty1~ppa1
$ git checkout v0.6.4-1_trusty1_ppa1
$ make -C debian/build

Ubuntu packages built regularly with this Makefile are available at this Launchpad PPA for releases up to 16.04 (Wily Werewolf), and at this other PPA for Yakkety and newer. To install the latest Consul packages on your Ubuntu system you just need to add one of the repositories and update the local sources:

$ # For Trusty, Wily, Xenial
$ sudo apt-add-repository ppa:bcandrea/consul
$ sudo apt-get update
$ sudo apt-get install consul consul-web-ui

$ # For Yakkety and newer
$ sudo apt-add-repository ppa:bcandrea/consul-new
$ sudo apt-get update
$ sudo apt-get install consul consul-web-ui

Usage

The available targets in the makefile are:

  • buildpackage: The default target. Builds binary and source packages.
  • buildsource: Builds a source debian package that can be used for uploads to Launchpad.
  • upload: Uploads the source package to Launchpad. Requires setting the PPA variable on the command line (e.g. make -C debian/build upload PPA=myuser/myppa).
  • clean: Removes intermediate Docker images and the /tmp/consul-deb directory.

Prerequisites

The build machine just needs a working Docker installation (and, of course, git) to be able to run the makefile (e.g. it can be a Mac). When building a source package to upload to a PPA you will also need a GPG key.

Setting up GPG

First make sure GPG is installed and working:

$ gpg --list-sec

The output should contain a list of valid GPG signing keys. For the makefile to work, a file named ~/.devscripts must be created with at least the following variable:

DEBSIGN_KEYID=<gpg key id>

(you can specify other values, e.g. DEBFULLNAME and DEBEMAIL).

Package update (import a new consul version)

To import a new consul version in this repo (and therefore build the corresponding Debian package), you can use a git-buildbackage workflow.

$ git checkout debian
$ gbp import-orig --uscan
$ gbp dch
$ git tag -s v0.9.2-1_xenial1_clustree1 -m 'Update changelog for xenial'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.