This commit is contained in:
Ward Nakchbandi (Cosmic Fusion) 2023-08-24 20:26:03 +03:00 committed by GitHub
parent ed737a7723
commit 8291fe00be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 4 deletions

34
external-sys76.sh Normal file
View File

@ -0,0 +1,34 @@
#! /bin/bash
set -e
# External Sys76 PPA MIRROR
mkdir -p ./output/rocm
cd ./output/rocm
# Get External Sys76 PPA pool
echo 'deb [trusted=yes] https://ppa.launchpadcontent.net/system76-dev/pre-stable/ubuntu lunar main' | sudo tee /etc/apt/sources.list.d/sys76.list
apt update -y
apt download -y
# Return to External Sys76 PPA MIRROR
cd ../
mkdir -p ./output
find . -name \*.deb -exec cp -vf {} ./output \;
# Sign the packages
dpkg-sig --sign builder ./output/*.deb
# Pull down existing ppa repo db files etc
rsync -azP --exclude '*.deb' ferreo@direct.pika-os.com:/srv/www/pikappa/ ./output/repo
# Check if the rocm component exists
if cat ./output/repo/conf/distributions | grep Components: | grep rocm
then
true
else
sed -i "s#Components:#Components: rocm#" ./output/repo/conf/distributions
fi
# Add the new package to the repo
reprepro -C rocm -V --basedir ./output/repo/ includedeb lunar ./output/*.deb
# Push the updated ppa repo to the server
rsync -azP ./output/repo/ ferreo@direct.pika-os.com:/srv/www/pikappa/

24
rocm.sh
View File

@ -4,11 +4,31 @@ set -e
# ROCm MIRROR # ROCm MIRROR
mkdir -p ./output/rocm mkdir -p ./output/rocm
cd ./output/rocm cd ./output/rocm
# Get package list from ROCm Pool
wget http://repo.radeon.com/rocm/apt/5.6/dists/jammy/main/binary-amd64/Packages
# Get rid of Pika sources to prevent conflicts
rm -rf /etc/apt/sources.list.d/pika*
rm -rf /etc/apt/preferences.d/*pika*
for i in $(cat ./Packages | grep "Package: " | awk '{print $2}')
do
# Get ROCm pool from pika
echo 'deb [arch=amd64 trusted=yes] https://ppa.pika-os.com/ lunar rocm' | sudo tee /etc/apt/sources.list.d/rocm-pika.list
apt update -y
apt-cache show $i | grep Version: > ./$i-pika.txt
rm -rf /etc/apt/sources.list.d/rocm-pika.list
# Get ROCm pool # Get ROCm pool
echo 'deb [arch=amd64 trusted=yes] https://repo.radeon.com/rocm/apt/5.6 jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list echo 'deb [arch=amd64 trusted=yes] https://repo.radeon.com/rocm/apt/5.6 jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list
apt update -y apt update -y
wget http://repo.radeon.com/rocm/apt/5.6/dists/jammy/main/binary-amd64/Packages apt-cache show $i | grep Version: > ./$i-repo.txt
apt download $(cat ./Packages | grep "Package: " | awk '{print $2}' | tr '\n' ' ') -y if [[ $(cat ./$i-pika.txt ) == $(cat ./$i-repo.txt ) ]]
then
true
else
echo $i >> pkglist.txt
fi
done
apt download $(cat ./pkglist.txt | tr '\n' ' ') -y
# Return to ROCm MIRROR # Return to ROCm MIRROR
cd ../ cd ../
mkdir -p ./output mkdir -p ./output