mirror of
https://github.com/KDE/kde-linux.git
synced 2026-04-22 23:49:12 -04:00
it breaks matching on the erofs somehow such that systemd downloads the caibx thinking it is the erofs
42 lines
1.7 KiB
Bash
Executable File
42 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
# SPDX-FileCopyrightText: 2024 Harald Sitter <sitter@kde.org>
|
|
|
|
set -eux
|
|
|
|
# For the vacuum helper and this script
|
|
export SSH_IDENTITY="$PWD/.secure_files/ssh.key"
|
|
export SSH_USER=kdeos
|
|
export SSH_HOST=origin.files.kde.org
|
|
export SSH_PATH=/home/kdeos/kde-linux
|
|
export SSH_REALLY_DELETE=1
|
|
|
|
chmod 600 "$SSH_IDENTITY"
|
|
|
|
go -C ./upload-vacuum/ build -o upload-vacuum .
|
|
./upload-vacuum/upload-vacuum
|
|
|
|
# The following variables are for this script only. Not shared with the vacuum helper.
|
|
sudo chown -Rvf "$(id -u):$(id -g)" "$PWD/.secure_files" # Make sure we have access
|
|
export GNUPGHOME="$PWD/.secure_files/gpg"
|
|
gpg --verbose --no-options --homedir="$GNUPGHOME" --import "$PWD/.secure_files/gpg.private.key"
|
|
REMOTE=$SSH_USER@$SSH_HOST:$SSH_PATH
|
|
# You can use `ssh-keyscan origin.files.kde.org` to get the host key
|
|
echo "origin.files.kde.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILUjdH4S7otYIdLUkOZK+owIiByjNQPzGi7GQ5HOWjO6" >> ~/.ssh/known_hosts
|
|
|
|
# The initial SHA256SUMS file is created by the vacuum script based on what is left on the server. We append to it.
|
|
|
|
# More readable this way, ignore shellcheck
|
|
# shellcheck disable=SC2129
|
|
sha256sum -- *.efi >> SHA256SUMS
|
|
sha256sum -- *.raw >> SHA256SUMS
|
|
sha256sum -- *.tar.zst >> SHA256SUMS
|
|
sha256sum -- *.torrent >> SHA256SUMS
|
|
sha256sum -- *.erofs >> SHA256SUMS
|
|
# Don't put caibx into the SHA256SUMS, it will break file matching.
|
|
|
|
gpg --homedir="$GNUPGHOME" --output SHA256SUMS.gpg --detach-sign SHA256SUMS
|
|
|
|
scp -i "$SSH_IDENTITY" ./*.efi ./*.raw ./*.tar.zst ./*.torrent ./*.erofs ./*.caibx "$REMOTE"
|
|
scp -i "$SSH_IDENTITY" SHA256SUMS SHA256SUMS.gpg "$REMOTE" # upload as last artifact to finalize the upload
|