2023-08-24 15:46:51 +02:00
|
|
|
#! /bin/bash
|
|
|
|
set -e
|
|
|
|
|
2023-08-24 19:41:42 +02:00
|
|
|
# Give correct perms to Apt version checker
|
|
|
|
chmod 755 ./ppp
|
|
|
|
|
2023-08-24 15:46:51 +02:00
|
|
|
# ROCm MIRROR
|
|
|
|
mkdir -p ./output/rocm
|
|
|
|
cd ./output/rocm
|
2023-08-24 19:32:13 +02:00
|
|
|
|
|
|
|
# temp
|
|
|
|
apt update
|
|
|
|
apt upgrade -y
|
|
|
|
# end of temp
|
|
|
|
|
2023-08-24 19:41:42 +02:00
|
|
|
#Get rid of Pika sources to prevent conflicts
|
2023-08-24 19:26:03 +02:00
|
|
|
rm -rf /etc/apt/sources.list.d/pika*
|
|
|
|
rm -rf /etc/apt/preferences.d/*pika*
|
|
|
|
|
2023-08-24 19:41:42 +02:00
|
|
|
# Get ROCm pool
|
2023-09-16 10:30:18 +02:00
|
|
|
echo 'deb [arch=amd64 trusted=yes] https://repo.radeon.com/rocm/apt/5.7 jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list
|
2023-08-24 19:51:41 +02:00
|
|
|
wget -O - http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -
|
|
|
|
apt update -y
|
2023-08-24 19:41:42 +02:00
|
|
|
|
2023-09-16 10:30:18 +02:00
|
|
|
PPP=$(../../ppp https://ppa.pika-os.com/dists/lunar/rocm/binary-amd64/Packages http://repo.radeon.com/rocm/apt/5.7/dists/jammy/main/binary-amd64/Packages)
|
2023-08-24 20:26:18 +02:00
|
|
|
|
2023-08-24 22:08:10 +02:00
|
|
|
if [ ! -z "$PPP" ]
|
2023-08-24 19:58:27 +02:00
|
|
|
then
|
2023-08-28 15:00:29 +02:00
|
|
|
apt download $PPP -y --target-release 'o=repo.radeon.com'
|
2023-08-24 19:58:27 +02:00
|
|
|
else
|
|
|
|
echo "Repos are synced"
|
|
|
|
exit 0
|
|
|
|
fi
|
2023-08-24 20:26:18 +02:00
|
|
|
|
2023-08-24 15:46:51 +02:00
|
|
|
# Return to ROCm MIRROR
|
|
|
|
cd ../
|
|
|
|
mkdir -p ./output
|
|
|
|
find . -name \*.deb -exec cp -vf {} ./output \;
|
|
|
|
|
2023-09-06 20:13:45 +02:00
|
|
|
# send debs to server
|
|
|
|
rsync -azP ./output/ ferreo@direct.pika-os.com:/srv/www/incoming/
|
2023-08-24 15:46:51 +02:00
|
|
|
|
2023-09-06 20:13:45 +02:00
|
|
|
# add debs to repo
|
|
|
|
ssh ferreo@direct.pika-os.com 'aptly repo add -force-replace -remove-files pika-rocm /srv/www/incoming/'
|
2023-08-24 15:46:51 +02:00
|
|
|
|
2023-09-06 20:13:45 +02:00
|
|
|
# publish the repo
|
|
|
|
ssh ferreo@direct.pika-os.com 'aptly publish update -batch -skip-contents -force-overwrite lunar filesystem:pikarepo:'
|