mirror of
https://github.com/docker/docker-credential-helpers.git
synced 2026-06-13 16:01:28 +05:30
add a deb package for pass/secret service backends
Note that this single source package produces two binary packages: one for -pass, and one for -secretservice, so that users can install whichever password backend (and thus deps) that they want. Signed-off-by: Tycho Andersen <tycho@docker.com>
This commit is contained in:
committed by
Tycho Andersen
parent
1ab1037707
commit
86c94d3e30
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: all deps osxkeychain secretservice test validate wincred pass
|
.PHONY: all deps osxkeychain secretservice test validate wincred pass deb
|
||||||
|
|
||||||
TRAVIS_OS_NAME ?= linux
|
TRAVIS_OS_NAME ?= linux
|
||||||
VERSION := $(shell grep 'const Version' credentials/version.go | awk -F'"' '{ print $$2 }')
|
VERSION := $(shell grep 'const Version' credentials/version.go | awk -F'"' '{ print $$2 }')
|
||||||
@@ -68,3 +68,15 @@ fmt:
|
|||||||
gofmt -s -l `ls **/*.go | grep -v vendor`
|
gofmt -s -l `ls **/*.go | grep -v vendor`
|
||||||
|
|
||||||
validate: vet lint fmt
|
validate: vet lint fmt
|
||||||
|
|
||||||
|
|
||||||
|
BUILDIMG:=docker-credential-secretservice-$(VERSION)
|
||||||
|
deb:
|
||||||
|
mkdir -p release
|
||||||
|
docker build -f deb/Dockerfile \
|
||||||
|
--build-arg VERSION=$(VERSION) \
|
||||||
|
--build-arg DISTRO=xenial \
|
||||||
|
--tag $(BUILDIMG) \
|
||||||
|
.
|
||||||
|
docker run --rm --net=none $(BUILDIMG) tar cf - /release | tar xf -
|
||||||
|
docker rmi $(BUILDIMG)
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
FROM ubuntu:xenial
|
||||||
|
|
||||||
|
ARG VERSION
|
||||||
|
ARG DISTRO
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -yy debhelper dh-make golang-go libsecret-1-dev
|
||||||
|
RUN mkdir -p /build
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
ENV GOPATH /build
|
||||||
|
|
||||||
|
COPY Makefile .
|
||||||
|
COPY credentials credentials
|
||||||
|
COPY secretservice secretservice
|
||||||
|
COPY pass pass
|
||||||
|
COPY deb/debian ./debian
|
||||||
|
COPY deb/build-deb .
|
||||||
|
|
||||||
|
RUN /build/build-deb ${VERSION} ${DISTRO}
|
||||||
Executable
+26
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
version=$1
|
||||||
|
distro=$2
|
||||||
|
|
||||||
|
maintainer=$(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control)
|
||||||
|
|
||||||
|
cat > "debian/changelog" <<-EOF
|
||||||
|
docker-credential-helpers ($version) $DISTRO; urgency=low
|
||||||
|
|
||||||
|
* New upstream version
|
||||||
|
|
||||||
|
-- $maintainer $(date --rfc-2822)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkdir -p src/github.com/docker/docker-credential-helpers
|
||||||
|
ln -s /build/credentials /build/src/github.com/docker/docker-credential-helpers/credentials
|
||||||
|
ln -s /build/secretservice /build/src/github.com/docker/docker-credential-helpers/secretservice
|
||||||
|
ln -s /build/pass /build/src/github.com/docker/docker-credential-helpers/pass
|
||||||
|
|
||||||
|
dpkg-buildpackage -us -uc
|
||||||
|
|
||||||
|
mkdir /release
|
||||||
|
mv /docker-credential-* /release
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
9
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
Source: docker-credential-helpers
|
||||||
|
Section: admin
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Docker <support@docker.com>
|
||||||
|
Homepage: https://dockerproject.org
|
||||||
|
Standards-Version: 3.9.6
|
||||||
|
Vcs-Browser: https://github.com/docker/docker-credential-helpers
|
||||||
|
Vcs-Git: git://github.com/docker/docker-credential-helpers.git
|
||||||
|
Build-Depends: debhelper
|
||||||
|
, dh-make
|
||||||
|
, libsecret-1-dev
|
||||||
|
|
||||||
|
Package: docker-credential-secretservice
|
||||||
|
Architecture: any
|
||||||
|
Depends: libsecret-1-0
|
||||||
|
, ${misc:Depends}
|
||||||
|
Description: docker-credential-secretservice is a credential helper backend
|
||||||
|
which uses libsecret to keep Docker credentials safe.
|
||||||
|
|
||||||
|
Package: docker-credential-pass
|
||||||
|
Architecture: any
|
||||||
|
Depends: pass
|
||||||
|
, ${misc:Depends}
|
||||||
|
Description: docker-credential-secretservice is a credential helper backend
|
||||||
|
which uses the pass utility to keep Docker credentials safe.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
debian/tmp/usr/bin/docker-credential-pass
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
debian/tmp/usr/bin/docker-credential-secretservice
|
||||||
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
DESTDIR := $(CURDIR)/debian/tmp
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
make secretservice pass
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
install -D bin/docker-credential-secretservice $(DESTDIR)/usr/bin/docker-credential-secretservice
|
||||||
|
install -D bin/docker-credential-pass $(DESTDIR)/usr/bin/docker-credential-pass
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
||||||
|
# no tests
|
||||||
|
|
||||||
Reference in New Issue
Block a user