mirror of
https://github.com/nchevsky/systemrescue-zfs.git
synced 2025-12-06 07:12:01 +01:00
Also disable gpg trust caching & regeneration to not "burn" the trust database by running pacman without the faketime wrapper once.
26 lines
846 B
Bash
Executable file
26 lines
846 B
Bash
Executable file
#! /usr/bin/env bash
|
|
#
|
|
# call pacman and fake the system date to the day this version of SystemRescue was released
|
|
# this can help to work around expired package signatures
|
|
#
|
|
# Author: Gerd v. Egidy
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
#
|
|
# see https://www.system-rescue.org/manual/Installing_packages_with_pacman/ for details
|
|
#
|
|
|
|
# get SystemRescue release date
|
|
RELEASE_DATE=$(grep BUILD_ID /etc/os-release | sed -e "s/.*\"\(.*\)\"/\1/")
|
|
if [[ -z "$RELEASE_DATE" ]] || ! echo "$RELEASE_DATE" | grep -E -q "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"; then
|
|
echo "ERROR: can't determine SystemRescue release date"
|
|
exit 1
|
|
fi
|
|
|
|
if ! command -v faketime &>/dev/null ; then
|
|
echo "ERROR: 'faketime' command not found. Is this the correct release of SystemRescue?"
|
|
exit 1
|
|
fi
|
|
|
|
# wrap pacman with all arguments
|
|
faketime "$RELEASE_DATE" pacman "$@"
|