Skip to content

Instantly share code, notes, and snippets.

@guyhughes
Last active October 19, 2016 17:09
Show Gist options
  • Save guyhughes/1a3164f3e86f90e3ddb4a0ab075288a2 to your computer and use it in GitHub Desktop.
Save guyhughes/1a3164f3e86f90e3ddb4a0ab075288a2 to your computer and use it in GitHub Desktop.

Aptly

aka how to make a stupid mirror

  1. get aptly (https://aur.archlinux.org/aptly.git)

  2. get the ubuntu-archive-keyring. can use any ssl mirror.

curl -OJL https://gpl.savoirfairelinux.net/pub/mirrors/ubuntu/project/ubuntu-archive-keyring.gpg.sig
gpg2 *.sig
#curl -OJL https://gpl.savoirfairelinux.net/pub/mirrors/ubuntu/project/ubuntu-archive-keyring.gpg
  1. this nonsense
gpg2 --no-default-keyring --keyring ./ubuntu-archive-keyring.gpg --export | gpg --no-default-keyring --keyring trustedkeys.gpg --import 
aptly mirror create x http://ca.archive.ubuntu.com/ubuntu/ xenial main restricted
aptly mirror edit -architectures="amd64" x
aptly mirror edit -filter-with-deps=true -filter=PACKAGENAME
aptly mirror edit -keyring=./trustedkeys.gpg
aptly mirror update
aptly snapshot create z from mirror y
aptly publish snapshot z
rsync --recursive --safe-links --munge-links --executability --no-owner --progress --partial ~/.aptly/public /media/usb
  1. cry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment