Skip to content
Snippets Groups Projects
Commit 7e79df0b authored by Nico's avatar Nico
Browse files

Initial Commit

parents
No related branches found
No related tags found
No related merge requests found
aptly
debs-to-add/*
This diff is collapsed.
# Briar's APT repo
This project contains helper scripts around Briar's APT repository. To
use the apt repository to install Briar's apps on your device, do the
following:
```bash
# Download Briar's PGP key
wget -O- https://briarproject.org/keys/contact.asc | sudo apt-key add -
# Add Briar's repo to APT's sources list
echo "deb [arch=amd64] https://apt.briarproject.org/ bullseye main" | sudo tee -a /etc/apt/sources.list.d/briar-bullseye.list
# Update APT and install e.g. Briar GTK
sudo apt update && sudo apt install briar-gtk
```
## How it works
The packages in this apt repo are built reproducibly by various
different reproducers:
* [briar-debian-reproducer](https://code.briarproject.org/briar/briar-debian-reproducer)
* [briar-gtk-reproducer](https://code.briarproject.org/briar/briar-gtk-reproducer)
* [python-briar-wrapper-reproducer](https://code.briarproject.org/briar/python-briar-wrapper-reproducer)
Later on these built .deb files are collected by _aptly_, a tool for
maintaining apt repositories.
## How to use
When setting up the apt repo, call `./setup.sh`.
Once you've built .deb files, place them together with the source packages
into _debs-to-add/_ and call `./add-debs.sh`. This will add those
binary and source packages to the repository, create a new snapshot and update
_aptly/public/_ which can then be published by e.g. _rsync_:
```bash
rsync -avzPh --progress --checksum --delete-after aptly/public/ briar:/var/www/apt/
```
For adding a new release of e.g. Briar GTK, you would need to place the
following files into _debs-to-add/_:
```
briar-headless_1.2.18.orig.tar.gz
briar-headless_1.2.18-1.debian.tar.xz
briar-headless_1.2.18-1.dsc
briar-headless_1.2.18-1_amd64.buildinfo
briar-headless_1.2.18-1_amd64.changes
briar-headless_1.2.18-1_amd64.deb
```
## More information
* [aptly - Debian Manpages](https://manpages.debian.org/buster/aptly/aptly.1.en.html)
#!/bin/bash
set -x
set -e
CONFIG="aptly.conf"
GPG_ID="3D7EA4950100A0D222C970717C23232F3BF374D7"
REPO_NAME="stable"
DISTRIBUTION="bullseye"
SNAPSHOT="$REPO_NAME-$(date +"%D %T")"
# Add .deb files to repo
aptly -config="$CONFIG" repo include -accept-unsigned -repo="$REPO_NAME" debs-to-add/
# aptly -config="$CONFIG" repo add -remove-files "$REPO_NAME" debs-to-add/ # alternative to `repo include`
aptly -config="$CONFIG" repo show "$REPO_NAME"
# Create snapshot
aptly -config="$CONFIG" snapshot create "$SNAPSHOT" from repo "$REPO_NAME"
aptly -config="$CONFIG" snapshot show "$SNAPSHOT"
# Publish snapshot
aptly -config="$CONFIG" publish switch -gpg-key="$GPG_ID" "$DISTRIBUTION" "$SNAPSHOT"
aptly -config="$CONFIG" publish show "$DISTRIBUTION"
{
"rootDir": "aptly",
"downloadConcurrency": 4,
"downloadSpeedLimit": 0,
"architectures": ["amd64", "arm64", "armhf"],
"dependencyFollowSuggests": false,
"dependencyFollowRecommends": false,
"dependencyFollowAllVariants": false,
"dependencyFollowSource": false,
"dependencyVerboseResolve": false,
"gpgDisableSign": false,
"gpgDisableVerify": false,
"gpgProvider": "gpg",
"downloadSourcePackages": false,
"skipLegacyPool": true,
"ppaDistributorID": "ubuntu",
"ppaCodename": "",
"skipContentsPublishing": false,
"FileSystemPublishEndpoints": {},
"S3PublishEndpoints": {},
"SwiftPublishEndpoints": {}
}
setup.sh 0 → 100755
#!/bin/bash
set -x
set -e
CONFIG="aptly.conf"
GPG_ID="3D7EA4950100A0D222C970717C23232F3BF374D7"
REPO_NAME="stable"
DISTRIBUTION="bullseye"
COMMENT="Official APT repository of The Briar Project"
SNAPSHOT="$REPO_NAME-initial-$(date +"%D %T")"
# Create repository
aptly -config="$CONFIG" repo create -comment="$COMMENT" -distribution="$DISTRIBUTION" "$REPO_NAME"
# Create first snapshot
aptly -config="$CONFIG" snapshot create "$SNAPSHOT" from repo "$REPO_NAME"
aptly -config="$CONFIG" snapshot show "$SNAPSHOT"
# Publish first snapshot
aptly -config="$CONFIG" publish snapshot -gpg-key="$GPG_ID" "$SNAPSHOT"
aptly -config="$CONFIG" publish show "$DISTRIBUTION"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment