debian: run as a daemon, ask informed consent (#162)

* Set verbose mode, depend on adduser

* Run as daemon

* Generate manpage

* Implement informed consent

* Set version

* Switch format to native

* Set environment

* Update packaging

* Create test and release pipelines

* Update debian/ooniprobe-cli.service

Co-authored-by: Simone Basso <bassosimone@gmail.com>

* Update debian/ooniprobe-cli.service

Co-authored-by: Simone Basso <bassosimone@gmail.com>

* Update debian/ooniprobe.conf.disabled

Co-authored-by: Simone Basso <bassosimone@gmail.com>

* fix(linux-debian-packages): build also on pull requests

Otherwise there's no way for us to test :^).

* fix(debian/control): ubuntu 20.04 has debhelper 12

See https://packages.ubuntu.com/focal/debhelper

* fix(debian/control): debhelper-compat relations doesn't work the way I thought

* Update debian/ooniprobe-cli.timer

Co-authored-by: Simone Basso <bassosimone@gmail.com>
This commit is contained in:
Federico Ceratto
2020-12-15 12:05:13 +00:00
committed by GitHub
parent 862e27efcd
commit 8df91ecb1b
15 changed files with 192 additions and 13 deletions
@@ -0,0 +1,37 @@
# Build a Debian package only when a relase tag is applied
# and publish it on the public/release archive
name: linux-debian-packages
on:
push:
tags:
- '*'
jobs:
build:
runs-on: "ubuntu-20.04"
steps:
- uses: actions/setup-go@v1
with:
go-version: "1.14"
- uses: actions/checkout@v2
- run: ./build.sh linux
# - run: ./smoketest.sh ./CLI/linux/amd64/ooniprobe
- run: find . -name ooniprobe -type f -executable
- run: sudo apt-get update -q
- run: sudo apt-get build-dep -y --no-install-recommends .
# Use probe version as package version
- run: |
DVER=$(./CLI/linux/amd64/ooniprobe version)
dch -v $DVER "New release"
dpkg-buildpackage -us -uc -b
find ../ -name "*.deb" -type f
DEB="../ooniprobe-cli_${DVER}_amd64.deb"
BT_FNAME="ooniprobe-cli_${DVER}_amd64.deb"
curl --upload-file "${DEB}" -u "${BT_APIUSER}:${BT_APIKEY}" \
"https://api.bintray.com/content/${BT_ORG}/${BT_REPO}/${BT_PKGNAME}/${DVER}/${BT_FNAME};deb_distribution=${DEBDIST};deb_component=main;deb_architecture=amd64;publish=1"
env:
DEBDIST: unstable
BT_APIKEY: ${{ secrets.BT_APIKEY }}
BT_APIUSER: federicoceratto
BT_ORG: ooni
BT_PKGNAME: ooniprobe
BT_REPO: ooniprobe-debian
+4 -1
View File
@@ -1,6 +1,7 @@
# Build a Debian package and publish on a test/internal archive
name: linux-debian-packages
on:
pull_request:
push:
branches:
- master
@@ -13,9 +14,11 @@ jobs:
go-version: "1.14"
- uses: actions/checkout@v2
- run: ./build.sh linux
# - run: ./smoketest.sh ./CLI/linux/amd64/ooniprobe
- run: find . -name ooniprobe -type f -executable
- run: sudo apt-get update -q
- run: sudo apt-get build-dep -y --no-install-recommends .
# Use <probe version>~<github build number> as package version
- run: |
VER=$(./CLI/linux/amd64/ooniprobe version)
DVER="${VER}~${GITHUB_RUN_NUMBER}"
@@ -32,4 +35,4 @@ jobs:
BT_APIUSER: federicoceratto
BT_ORG: ooni
BT_PKGNAME: ooniprobe
BT_REPO: ooniprobe-debian
BT_REPO: ooniprobe-debian-test