Add rudimentary Debian packaging for binaries

This is very much not up to the standards of an official Debian
package. To make a proper package of Radicle will require packaging
all the dependencies first, and the Radicle crates need to be
published to crates.io, among other things. This is just a lazy first
cut to see if there's any interest in a .deb.
This commit is contained in:
Lars Wirzenius 2023-09-25 08:36:39 +03:00 committed by cloudhead
parent 15cf5c6100
commit d67f9ea9bb
No known key found for this signature in database
13 changed files with 166 additions and 0 deletions

34
debian/build-deb vendored Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
set -euo pipefail
rm -f ../radicle*_*
git clean -fdx
# Get name and version of source package.
name="$(dpkg-parsechangelog -SSource)"
version="$(dpkg-parsechangelog -SVersion)"
# Get upstream version: everything before the last dash.
uv="$(echo "$version" | sed 's/-[^-]*$//')"
orig="${name}_${uv}.orig.tar.xz"
# Create a tar ball without the Debian packaging.
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
git archive HEAD | tar -C "$tmp" -xf -
rm -rf "$tmp/debian"
tar -C "$tmp" -cf - . | xz >"../$orig"
# Actually build the package, without signing the .changes file.
dpkg-buildpackage -us -uc
# Dump some information to make it easier to visually verify
# everything looks OK. Also, test the package with the lintian tool.
arch="$(dpkg --print-architecture)"
deb="../${name}_${version}_${arch}.deb"
changes="../${name}_${version}_${arch}.changes"
ls -l "$deb"
dpkg -c "$deb"
lintian -i "$changes"

1
debian/cargo-checksum.json vendored Normal file
View File

@ -0,0 +1 @@
/* This file needs to exist, but can be empty. */

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
radicle (0.8.0-1) unstable; urgency=medium
* New release.
-- Lars Wirzenius <liw@liw.fi> Mon, 25 Sep 2023 08:34:08 +0300

2
debian/compat vendored Normal file
View File

@ -0,0 +1,2 @@
10

18
debian/control vendored Normal file
View File

@ -0,0 +1,18 @@
Source: radicle
Maintainer: The Radicle Team <team@radicle.xyz>
Uploaders: Lars Wirzenius <liw@liw.fi>
Section: vcs
Priority: optional
Standards-Version: 4.6.2
Build-Depends: debhelper (>= 10~),
dh-cargo,
asciidoctor
Homepage: https://radicle.xyz/
Package: radicle
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, git
Description: peer-to-peer, distributed git hosting
Radicle is a secure, decentralized and powerful alternative to code
forges such as GitHub and GitLab that preserves user sovereignty and
freedom.

10
debian/copyright vendored Normal file
View File

@ -0,0 +1,10 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: heartwood
Upstream-Contact: https://radicle.xyz/
Source: https://app.radicle.xyz/seeds/seed.radicle.xyz
Files: *
Copyright: 2019-2021, The Radicle Foundation
License: Apache-2 or Expat
License texts omitted, see LICENSE-APACHE and LICENSE-MIT in the
source tree.

1
debian/install vendored Normal file
View File

@ -0,0 +1 @@
*.1 usr/share/man/man1

1
debian/lintian-overrides vendored Normal file
View File

@ -0,0 +1 @@
radicle binary: initial-upload-closes-no-bugs

17
debian/rules vendored Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/make -f
%:
dh $@ --buildsystem cargo
override_dh_auto_build:
scripts/build-man-pages.sh . *.adoc
override_dh_auto_install:
cargo install --locked --path=radicle-cli --root=debian/radicle
cargo install --locked --path=radicle-node --root=debian/radicle
cargo install --locked --path=radicle-remote-helper --root=debian/radicle
cargo install --locked --path=radicle-httpd --root=debian/radicle
rm -f debian/*/.crates*.*
override_dh_auto_test:
echo tests are disabled, for now

1
debian/source/format vendored Normal file
View File

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

26
git-remote-rad.1.adoc Normal file
View File

@ -0,0 +1,26 @@
= git-remote-rad(1)
The Radicle Team <team@radicle.xyz>
:doctype: manpage
:revnumber: 0.8.0
:revdate: 2023-10-12
:mansource: rad {revnumber}
:manmanual: Radicle CLI Manual
== Name
git-remote-rad - Git remote helper for Radicle
== Synopsis
*git-remote-rad* *
== Description
**git-remote-rad** is a **git**(1) remote helper program to allow git
to interact with the local Radicle storage. git will use this program
automatically, when using a remote repository with the "rad" protocol.
It is never invoked directly.
== SEE ALSO ==
*git-remote-helpers*(1), *rad*(1)

25
radicle-httpd.1.adoc Normal file
View File

@ -0,0 +1,25 @@
= radicle-httpd(1)
The Radicle Team <team@radicle.xyz>
:doctype: manpage
:revnumber: 0.8.0
:revdate: 2023-10-12
:mansource: rad {revnumber}
:manmanual: Radicle CLI Manual
== Name
radicle-httpd - Radicle HTTP daemon
== Synopsis
*radicle-httpd* --help
== Description
A Radicle HTTP daemon exposing a JSON HTTP API that allows someone to browse local
repositories on a Radicle node via their web browser. This manual page is a
placeholder to point you at the *--help* option.
== SEE ALSO ==
*rad*(1)

25
radicle-node.1.adoc Normal file
View File

@ -0,0 +1,25 @@
= radicle-node(1)
The Radicle Team <team@radicle.xyz>
:doctype: manpage
:revnumber: 0.8.0
:revdate: 2023-10-12
:mansource: rad {revnumber}
:manmanual: Radicle CLI Manual
== Name
radicle-node - Radicle node
== Synopsis
*radicle-node* --help
== Description
A Radicle node synchronizes its Git repositories with other nodes.
This manual page is a placeholder to point you at the *--help**
option.
== SEE ALSO ==
*rad*(1)