Skip to content

Instantly share code, notes, and snippets.

@endreszabo
Created May 8, 2018 11:08
Show Gist options
  • Save endreszabo/86f17ecdd7d791099dd07a460403d9ae to your computer and use it in GitHub Desktop.
Save endreszabo/86f17ecdd7d791099dd07a460403d9ae to your computer and use it in GitHub Desktop.
Make your very own archzfs-tied kernels Arch Linux repository.
#!/usr/bin/env bash -x
set -o nounset
set -o errexit
curl http://archzfs.com/archzfs/x86_64/archzfs.db | tar xJvf -
cat */desc | perl -e'while(<>) {
if (m/^%DEPENDS/) {
while(<>) {
chomp;
last if $_ eq "";
m/linux.*=/ && $p{$_}++}
}
};
foreach my $a (keys %p) {
$a=~s/((.).*)=(.*)/https:\/\/archive.archlinux.org\/packages\/$2\/$1\/$1-$3-x86_64.pkg.tar.xz/;
print "$a\n$a.sig\n";
}' > kernels.txt
rm -r zfs-*/ spl-*/
wget -i kernels.txt -nc -o kernels.log
repo-add archzfs-kernels.db.tar.xz *tar.xz
@endreszabo
Copy link
Author

Obviously it won't clean up old kernel packages that will eventually fill up your multi-zettabyte storages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment