Skip to content

Instantly share code, notes, and snippets.

@ayosec
Created August 20, 2019 15:44
Show Gist options
  • Save ayosec/840d18c9fa0da071d70f022eb2b192e2 to your computer and use it in GitHub Desktop.
Save ayosec/840d18c9fa0da071d70f022eb2b192e2 to your computer and use it in GitHub Desktop.
Debian Repository

Debian Repository

Create a foobar repository:

apt-get install reprepro

OUTPUT=$(mktemp -d)
mkdir -p $OUTPUT/conf

cat > $OUTPUT/conf/distributions <<CONF
Codename: foobar
Components: main
Architectures: amd64
CONF

reprepro -b $OUTPUT includedeb foobar path/to/*.deb
rm -fr $OUTPUT/{db,conf}

aws s3 sync --acl public-read $OUTPUT/ s3://BUCKET/debian/buster/

To use it:

echo 'deb [trusted=yes] https://BUCKET.s3.amazonaws.com/debian/buster foobar main' \
    > /etc/apt/sources.list.d/foobar.list

apt-get update
apt-get install ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment