Compare commits
10 Commits
Author | SHA1 | Date |
---|---|---|
Starbeamrainbowlabs | d2189a7015 | |
Starbeamrainbowlabs | 1d0eee8ad8 | |
Starbeamrainbowlabs | cb17042a4a | |
Starbeamrainbowlabs | ade6b835e2 | |
Starbeamrainbowlabs | f8140ac7f5 | |
Starbeamrainbowlabs | a78a2dfcf8 | |
Starbeamrainbowlabs | a0e7848fd2 | |
Starbeamrainbowlabs | 33bc5889b2 | |
Starbeamrainbowlabs | 05b59e23d8 | |
Starbeamrainbowlabs | 930b987b70 |
11
README.md
11
README.md
|
@ -1,4 +1,13 @@
|
||||||
# aptosaurus
|
# aptosaurus
|
||||||
> The code behind the apt repository at apt.starbeamrainbowlabs.com.
|
> The code behind the apt repository at apt.starbeamrainbowlabs.com.
|
||||||
|
|
||||||
See the blog post here: https://starbeamrainbowlabs.com/blog/article.php?article=posts/396-apt-repo.html
|
See the blog post here: https://starbeamrainbowlabs.com/blog/article.php?article=posts/396-apt-repo.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
NOTE TO SELF: Fill out this readme.
|
||||||
|
|
||||||
|
|
||||||
|
## System requirements
|
||||||
|
- Linux w/an apt-based distro
|
||||||
|
- `dpkg-sig`
|
|
@ -202,7 +202,7 @@ task_delete-old() {
|
||||||
task_begin "Deleting packages more than ${keep_versions} versions ago";
|
task_begin "Deleting packages more than ${keep_versions} versions ago";
|
||||||
# Find and delete old package versions
|
# Find and delete old package versions
|
||||||
export -f __analyse_package_simple;
|
export -f __analyse_package_simple;
|
||||||
find sources/ -type f -name "*.deb" -print0 | xargs -0 -n1 -P "$(nproc)" -I{} bash -c '__analyse_package_simple "{}"' | sort -k1,2Vr | uniq | awk -v keep_ago=${keep_versions} '{ package=$1; gsub(/^.*\//, "", package); gsub(/_.*+$/, "", package); arch=$1; gsub(/^.*_/, "", arch); gsub(/\.deb$/, "", arch); counts[package arch]++; if(counts[package arch] > keep_ago) print($1); }' | xargs --verbose --no-run-if-empty rm
|
find sources/ -type f -name "*.deb" -print0 | xargs -0 -P "$(nproc)" -I{} bash -c '__analyse_package_simple "{}"' | sort -k1,2Vr | uniq | awk -v keep_ago=${keep_versions} '{ package=$1; gsub(/^.*\//, "", package); gsub(/_.*+$/, "", package); arch=$1; gsub(/^.*_/, "", arch); gsub(/\.deb$/, "", arch); counts[package arch]++; if(counts[package arch] > keep_ago) print($1); }' | xargs --verbose --no-run-if-empty rm
|
||||||
# Result resultant broken symlinks
|
# Result resultant broken symlinks
|
||||||
find "${dir_repo}" -xtype l -delete -print0 | xargs -0 -n1 echo Deleting;
|
find "${dir_repo}" -xtype l -delete -print0 | xargs -0 -n1 echo Deleting;
|
||||||
task_end "$?";
|
task_end "$?";
|
||||||
|
|
2
cron.sh
2
cron.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e;
|
set -e;
|
||||||
|
|
||||||
source="/home/ci/sftp-root/CIAptPackages";
|
source="/home/ci/sftp-root/apt-packages";
|
||||||
destination="/srv/aptosaurus/sources";
|
destination="/srv/aptosaurus/sources";
|
||||||
aptosaurus="/srv/aptosaurus/aptosaurus.sh";
|
aptosaurus="/srv/aptosaurus/aptosaurus.sh";
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -29,9 +29,9 @@
|
||||||
<pre><code># Add the repository
|
<pre><code># Add the repository
|
||||||
echo "deb https://apt.starbeamrainbowlabs.com/ ./ # apt.starbeamrainbowlabs.com" | sudo tee /etc/apt/sources.list.d/sbrl.list
|
echo "deb https://apt.starbeamrainbowlabs.com/ ./ # apt.starbeamrainbowlabs.com" | sudo tee /etc/apt/sources.list.d/sbrl.list
|
||||||
# Import the signing key
|
# Import the signing key
|
||||||
wget -q https://apt.starbeamrainbowlabs.com/aptosaurus.asc -O- | sudo apt-key add -
|
wget -q https://apt.starbeamrainbowlabs.com/aptosaurus.asc -O- | sudo tee /etc/apt/trusted.gpg.d/sbrl.asc
|
||||||
# Alternatively, import the signing key from a keyserver:
|
# Alternatively, import the signing key from a keyserver:
|
||||||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D48D801C6A66A5D8
|
sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys D48D801C6A66A5D8
|
||||||
# Update apt's cache
|
# Update apt's cache
|
||||||
sudo apt update</code></pre>
|
sudo apt update</code></pre>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue