mirror of
https://github.com/KDE/kde-linux.git
synced 2026-02-19 15:17:53 -05:00
bootstrap: fold getbuild_date into bootstrap AND build
unfrotunately we need a code copy for this because bootstrap must be self contained. not too much to worry about since they are both in the same repo so I expect people will grep for stuff (hopefully :D)
This commit is contained in:
13
bootstrap.sh
13
bootstrap.sh
@@ -5,6 +5,9 @@
|
||||
|
||||
# Bootstraps an Arch Linux Docker container to be ready for building KDE Linux.
|
||||
|
||||
# WARNING: DO NOT CALL INTO OTHER SCRIPTS HERE.
|
||||
# This file needs to be self-contained because it gets run by the CI VM provisioning in isolation.
|
||||
|
||||
# Exit immediately if any command fails and print all commands before they are executed.
|
||||
set -ex
|
||||
|
||||
@@ -38,7 +41,15 @@ SigLevel = Never
|
||||
Server = https://cdn.kde.org/kde-linux/packaging/packages-debug/
|
||||
EOF
|
||||
|
||||
./bootstrap_getbuild_date.sh
|
||||
# Ensure the packages repo and the base image do not go out of sync
|
||||
# by using the same snapshot date from build_date.txt for both
|
||||
# WARNING: code copy in build.sh
|
||||
BUILD_DATE=$(curl --fail --silent https://cdn.kde.org/kde-linux/packaging/build_date.txt)
|
||||
if [ -z "$BUILD_DATE" ]; then
|
||||
echo "ERROR: Could not fetch build_date.txt — refusing to build out-of-sync image." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Server = https://archive.archlinux.org/repos/${BUILD_DATE}/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist
|
||||
|
||||
# ParallelDownloads is enabled by default since pacman 7.0.0.r6.gc685ae6-2,
|
||||
# so no need to uncomment or manually set it unless we want to change the value.
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/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>
|
||||
# SPDX-FileCopyrightText: 2024 Bruno Pajdek <brupaj@proton.me>
|
||||
|
||||
set -eux
|
||||
|
||||
SYSROOT=${SYSROOT:-/}
|
||||
|
||||
# Ensure the packages repo and the base image do not go out of sync
|
||||
# by using the same snapshot date from build_date.txt for both
|
||||
BUILD_DATE=$(curl --fail --silent https://cdn.kde.org/kde-linux/packaging/build_date.txt)
|
||||
if [ -z "$BUILD_DATE" ]; then
|
||||
echo "ERROR: Could not fetch build_date.txt — refusing to build out-of-sync image." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Server = https://archive.archlinux.org/repos/${BUILD_DATE}/\$repo/os/\$arch" > $SYSROOT/etc/pacman.d/mirrorlist
|
||||
10
build.sh
10
build.sh
@@ -61,7 +61,15 @@ export SYSTEMD_LOG_LEVEL=debug
|
||||
|
||||
cp /etc/pacman.conf mkosi.sandbox/etc
|
||||
mkdir --parents mkosi.sandbox/etc/pacman.d
|
||||
SYSROOT=mkosi.sandbox ./bootstrap_getbuild_date.sh
|
||||
# Ensure the packages repo and the base image do not go out of sync
|
||||
# by using the same snapshot date from build_date.txt for both
|
||||
# WARNING: code copy in bootstrap.sh
|
||||
BUILD_DATE=$(curl --fail --silent https://cdn.kde.org/kde-linux/packaging/build_date.txt)
|
||||
if [ -z "$BUILD_DATE" ]; then
|
||||
echo "ERROR: Could not fetch build_date.txt — refusing to build out-of-sync image." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Server = https://archive.archlinux.org/repos/${BUILD_DATE}/\$repo/os/\$arch" > mkosi.sandbox/etc/pacman.d/mirrorlist
|
||||
|
||||
# Make sure permissions are sound
|
||||
./permission-fix.sh
|
||||
|
||||
Reference in New Issue
Block a user