Initial packaging (#117)

* Add initial packaging

* Update Vcs URLs

* Disable test

* Update dh version

* Switch to ubuntu-20.04

* Add d/compat

* Update install

* Find file

* Update location

* Upload to bintray

* Add version

* Add dep

* Set vars

* Drop file

* Update Readme.md

* Update linux-debian-packages.yml

* Update linux-debian-packages.yml

Co-authored-by: Simone Basso <bassosimone@gmail.com>
This commit is contained in:
Federico Ceratto 2020-11-13 08:59:30 +00:00 committed by GitHub
parent c0a95c037f
commit 6df2c34974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 121 additions and 0 deletions

View File

@ -0,0 +1,33 @@
# Build a Debian package on every push or pull request
# and publish on a test/internal archive
name: linux-debian-packages
on: [push, pull_request]
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: find . -name ooniprobe -type f -executable
- run: sudo apt-get update -q
- run: sudo apt-get build-dep -y --no-install-recommends .
- run: |
VER=$(./CLI/linux/amd64/ooniprobe version)
DVER="${VER}~${GITHUB_RUN_NUMBER}"
dch -v $DVER "test version"
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

View File

@ -1,5 +1,7 @@
# OONI Probe CLI # OONI Probe CLI
[![linux-debian-packages](https://github.com/ooni/probe-cli/workflows/linux-debian-packages/badge.svg)](https://github.com/ooni/probe-cli/actions?query=workflow%3Alinux-debian-packages)
The next generation OONI Probe Command Line Interface. The next generation OONI Probe Command Line Interface.
## User setup ## User setup

8
debian/TODO vendored Normal file
View File

@ -0,0 +1,8 @@
pull python script
create bintray repo
detect tags
/etc conf file
timer
sandbox
shared unix group

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
ooniprobe-cli (0.0.0) UNRELEASED; urgency=medium
* Test release
-- Federico Ceratto <federico@openobservatory.org> Thu, 12 Nov 2020 16:26:14 +0000

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
11

17
debian/control vendored Normal file
View File

@ -0,0 +1,17 @@
Source: ooniprobe-cli
Maintainer: Federico Ceratto <federico@openobservatory.org>
Section: devel
Priority: optional
Build-Depends: dpkg-dev, debhelper, devscripts
Standards-Version: 4.5.0
Vcs-Browser: https://github.com/ooni/probe-cli
Vcs-Git: https://github.com/ooni/probe-cli.git
Homepage: https://github.com/ooni/probe-cli
Rules-Requires-Root: no
XS-Go-Import-Path: github.com/ooni/probe-cli
Package: ooniprobe-cli
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Built-Using: ${misc:Built-Using}
Description: OONI Probe CLI

40
debian/copyright vendored Normal file
View File

@ -0,0 +1,40 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/ooni/probe-cli
Upstream-Name: ooniprobe-cli
Files: *
Copyright: 2018 Open Observatory of Network Interference (OONI)
License: BSD-3-clause
Files: debian/*
Copyright: 2020 Federico Ceratto <federico@openobservatory.org>
License: BSD-3-clause
Comment: Debian packaging is licensed under the same terms as upstream
License: BSD-3-clause
Copyright 2018 Open Observatory of Network Interference (OONI), The Tor Project
.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

1
debian/ooniprobe-cli.install vendored Normal file
View File

@ -0,0 +1 @@
./CLI/linux/amd64/ooniprobe usr/bin

13
debian/rules vendored Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_build:
true
override_dh_dwz:
true
override_dh_auto_install:
dh_auto_install -- --no-source

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)