From e38c0f7779d2c97da7e8cfc69146cd6d5b145bb5 Mon Sep 17 00:00:00 2001 From: Neil Carlo Sucuangco Date: Fri, 2 May 2025 02:45:12 +0800 Subject: [PATCH 1/2] Create allow-apt-repository-changes.sh --- scripts/allow-apt-repository-changes.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scripts/allow-apt-repository-changes.sh diff --git a/scripts/allow-apt-repository-changes.sh b/scripts/allow-apt-repository-changes.sh new file mode 100644 index 000000000..afb0c5596 --- /dev/null +++ b/scripts/allow-apt-repository-changes.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +if [ ! -f "/etc/apt/apt.conf.d/99allow-repository-change" ]; then + echo "Configuring APT to allow repository label and other metadata changes..." + + cat << EOF | sudo tee /etc/apt/apt.conf.d/99allow-repository-change +Acquire::AllowReleaseInfoChange::Label "true"; +Acquire::AllowReleaseInfoChange::Suite "true"; +Acquire::AllowReleaseInfoChange::Version "true"; +Acquire::AllowReleaseInfoChange::Codename "true"; +EOF + + echo "APT configuration for repository changes completed." +else + echo "APT already configured to handle repository changes." +fi From fdb9fbf86e7570ed15a5ded82d0af4c2442227e9 Mon Sep 17 00:00:00 2001 From: Neil Carlo Sucuangco Date: Fri, 2 May 2025 02:47:06 +0800 Subject: [PATCH 2/2] Update homestead.rb --- scripts/homestead.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/homestead.rb b/scripts/homestead.rb index 1fd98ecaf..f199365d0 100644 --- a/scripts/homestead.rb +++ b/scripts/homestead.rb @@ -270,6 +270,8 @@ def self.configure(config, settings) end end + config.vm.provision "allow_apt_changes", type: "shell", path: script_dir + "/allow-apt-repository-changes.sh" + config.vm.provision "apt_update", type: "shell", inline: "apt-get update" # Ensure we have PHP versions used in sites in our features