Skip to content

Update deny list to all system packages for ARMv6 HF. #1018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changes/1018.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"description": "deny installation of armhf debian packages for the arm-unknown-linux-gnueabihf target.",
"type": "fixed"
}
3 changes: 3 additions & 0 deletions docker/Dockerfile.arm-unknown-linux-gnueabihf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ RUN /crosstool-ng.sh arm-unknown-linux-gnueabihf.config 5

ENV PATH /x-tools/arm-unknown-linux-gnueabihf/bin/:$PATH

COPY deny-debian-packages.sh /
RUN TARGET_ARCH=armhf /deny-debian-packages.sh

COPY qemu.sh /
RUN /qemu.sh arm

Expand Down
25 changes: 17 additions & 8 deletions docker/deny-debian-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,24 @@
set -x
set -euo pipefail

main() {
local package

for package in "${@}"; do
echo "Package: ${package}:${TARGET_ARCH}
deny_package() {
local package="${1}"
local filename="${2}"
echo "Package: ${package}:${TARGET_ARCH}
Pin: release *
Pin-Priority: -1" > "/etc/apt/preferences.d/${package}"
echo "${package}"
done
Pin-Priority: -1" > "/etc/apt/preferences.d/${filename}"
}

main() {
if [[ $# -eq 0 ]]; then
deny_package '*' "all-packages"
else
local package
for package in "${@}"; do
deny_package "${package}" "${package}"
echo "${package}"
done
fi

rm "${0}"
}
Expand Down