libguestfs/0046-test-data-binaries-Remove-x-attribute.patch
2024-06-28 10:10:57 +01:00

199 lines
8.6 KiB
Diff

From 69f567363a098654354e0be94adbf9c5f847a8e9 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 25 Apr 2024 12:56:48 +0100
Subject: [PATCH] test-data/binaries: Remove +x attribute
These binaries are not meant to be run, they are purely data files
used for testing. Remove the +x attribute to prevent accidentally
running them.
However to avoid breaking the phony guests, we need to chmod +x the
files when we upload them into those guests.
(cherry picked from commit 574a87f889c7b48b231fcabf0d45b88bd48b53f8)
---
test-data/binaries/bin-aarch64-dynamic | Bin
test-data/binaries/bin-armv7-dynamic | Bin
test-data/binaries/bin-i586-dynamic | Bin
test-data/binaries/bin-ia64-dynamic | Bin
test-data/binaries/bin-mipsel-dynamic | Bin
test-data/binaries/bin-ppc64-dynamic | Bin
test-data/binaries/bin-ppc64le-dynamic | Bin
test-data/binaries/bin-riscv64-dynamic | Bin
test-data/binaries/bin-s390x-dynamic | Bin
test-data/binaries/bin-sparc-dynamic | Bin
test-data/binaries/bin-win32.exe | Bin
test-data/binaries/bin-win64.exe | Bin
test-data/binaries/bin-x86_64-dynamic | Bin
test-data/binaries/lib-aarch64.so | Bin
test-data/binaries/lib-armv7.so | Bin
test-data/binaries/lib-i586.so | Bin
test-data/binaries/lib-ia64.so | Bin
test-data/binaries/lib-mipsel.so | Bin
test-data/binaries/lib-ppc64.so | Bin
test-data/binaries/lib-ppc64le.so | Bin
test-data/binaries/lib-riscv64.so | Bin
test-data/binaries/lib-s390x.so | Bin
test-data/binaries/lib-sparc.so | Bin
test-data/binaries/lib-win32.dll | Bin
test-data/binaries/lib-win64.dll | Bin
test-data/binaries/lib-x86_64.so | Bin
test-data/phony-guests/make-archlinux-img.sh | 1 +
test-data/phony-guests/make-debian-img.sh | 1 +
test-data/phony-guests/make-fedora-img.pl | 1 +
test-data/phony-guests/make-ubuntu-img.sh | 1 +
30 files changed, 4 insertions(+)
mode change 100755 => 100644 test-data/binaries/bin-aarch64-dynamic
mode change 100755 => 100644 test-data/binaries/bin-armv7-dynamic
mode change 100755 => 100644 test-data/binaries/bin-i586-dynamic
mode change 100755 => 100644 test-data/binaries/bin-ia64-dynamic
mode change 100755 => 100644 test-data/binaries/bin-mipsel-dynamic
mode change 100755 => 100644 test-data/binaries/bin-ppc64-dynamic
mode change 100755 => 100644 test-data/binaries/bin-ppc64le-dynamic
mode change 100755 => 100644 test-data/binaries/bin-riscv64-dynamic
mode change 100755 => 100644 test-data/binaries/bin-s390x-dynamic
mode change 100755 => 100644 test-data/binaries/bin-sparc-dynamic
mode change 100755 => 100644 test-data/binaries/bin-win32.exe
mode change 100755 => 100644 test-data/binaries/bin-win64.exe
mode change 100755 => 100644 test-data/binaries/bin-x86_64-dynamic
mode change 100755 => 100644 test-data/binaries/lib-aarch64.so
mode change 100755 => 100644 test-data/binaries/lib-armv7.so
mode change 100755 => 100644 test-data/binaries/lib-i586.so
mode change 100755 => 100644 test-data/binaries/lib-ia64.so
mode change 100755 => 100644 test-data/binaries/lib-mipsel.so
mode change 100755 => 100644 test-data/binaries/lib-ppc64.so
mode change 100755 => 100644 test-data/binaries/lib-ppc64le.so
mode change 100755 => 100644 test-data/binaries/lib-riscv64.so
mode change 100755 => 100644 test-data/binaries/lib-s390x.so
mode change 100755 => 100644 test-data/binaries/lib-sparc.so
mode change 100755 => 100644 test-data/binaries/lib-win32.dll
mode change 100755 => 100644 test-data/binaries/lib-win64.dll
mode change 100755 => 100644 test-data/binaries/lib-x86_64.so
diff --git a/test-data/binaries/bin-aarch64-dynamic b/test-data/binaries/bin-aarch64-dynamic
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-armv7-dynamic b/test-data/binaries/bin-armv7-dynamic
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-i586-dynamic b/test-data/binaries/bin-i586-dynamic
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-ia64-dynamic b/test-data/binaries/bin-ia64-dynamic
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-mipsel-dynamic b/test-data/binaries/bin-mipsel-dynamic
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-ppc64-dynamic b/test-data/binaries/bin-ppc64-dynamic
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-ppc64le-dynamic b/test-data/binaries/bin-ppc64le-dynamic
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-riscv64-dynamic b/test-data/binaries/bin-riscv64-dynamic
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-s390x-dynamic b/test-data/binaries/bin-s390x-dynamic
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-sparc-dynamic b/test-data/binaries/bin-sparc-dynamic
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-win32.exe b/test-data/binaries/bin-win32.exe
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-win64.exe b/test-data/binaries/bin-win64.exe
old mode 100755
new mode 100644
diff --git a/test-data/binaries/bin-x86_64-dynamic b/test-data/binaries/bin-x86_64-dynamic
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-aarch64.so b/test-data/binaries/lib-aarch64.so
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-armv7.so b/test-data/binaries/lib-armv7.so
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-i586.so b/test-data/binaries/lib-i586.so
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-ia64.so b/test-data/binaries/lib-ia64.so
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-mipsel.so b/test-data/binaries/lib-mipsel.so
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-ppc64.so b/test-data/binaries/lib-ppc64.so
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-ppc64le.so b/test-data/binaries/lib-ppc64le.so
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-riscv64.so b/test-data/binaries/lib-riscv64.so
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-s390x.so b/test-data/binaries/lib-s390x.so
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-sparc.so b/test-data/binaries/lib-sparc.so
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-win32.dll b/test-data/binaries/lib-win32.dll
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-win64.dll b/test-data/binaries/lib-win64.dll
old mode 100755
new mode 100644
diff --git a/test-data/binaries/lib-x86_64.so b/test-data/binaries/lib-x86_64.so
old mode 100755
new mode 100644
diff --git a/test-data/phony-guests/make-archlinux-img.sh b/test-data/phony-guests/make-archlinux-img.sh
index 066df09d..e0e3d3de 100755
--- a/test-data/phony-guests/make-archlinux-img.sh
+++ b/test-data/phony-guests/make-archlinux-img.sh
@@ -50,6 +50,7 @@ write /etc/hostname "archlinux.test"
upload $SRCDIR/archlinux-package /var/lib/pacman/local/test-package-1:0.1-1/desc
upload $SRCDIR/../binaries/bin-x86_64-dynamic /bin/ls
+chmod 0755 /bin/ls
mkdir /boot/grub
touch /boot/grub/grub.conf
diff --git a/test-data/phony-guests/make-debian-img.sh b/test-data/phony-guests/make-debian-img.sh
index 637bd4bc..27c68e6e 100755
--- a/test-data/phony-guests/make-debian-img.sh
+++ b/test-data/phony-guests/make-debian-img.sh
@@ -85,6 +85,7 @@ write /etc/hostname "debian.invalid"
upload $SRCDIR/debian-packages /var/lib/dpkg/status
upload $SRCDIR/../binaries/bin-x86_64-dynamic /bin/ls
+chmod 0755 /bin/ls
upload $SRCDIR/debian-syslog /var/log/syslog
diff --git a/test-data/phony-guests/make-fedora-img.pl b/test-data/phony-guests/make-fedora-img.pl
index 6362e225..b7dc902e 100755
--- a/test-data/phony-guests/make-fedora-img.pl
+++ b/test-data/phony-guests/make-fedora-img.pl
@@ -331,6 +331,7 @@ $g->write ('/usr/lib/rpm/macros', <<EOF);
EOF
$g->upload ($ENV{SRCDIR}.'/../binaries/bin-x86_64-dynamic', '/bin/ls');
+$g->chmod (0755, '/bin/ls');
$g->tar_in ($ENV{SRCDIR}.'/fedora-journal.tar.xz', '/var/log/journal', compress => "xz");
diff --git a/test-data/phony-guests/make-ubuntu-img.sh b/test-data/phony-guests/make-ubuntu-img.sh
index a3aa6105..5e7a3a96 100755
--- a/test-data/phony-guests/make-ubuntu-img.sh
+++ b/test-data/phony-guests/make-ubuntu-img.sh
@@ -76,6 +76,7 @@ write /etc/hostname "ubuntu.invalid"
upload $SRCDIR/debian-packages /var/lib/dpkg/status
upload $SRCDIR/../binaries/bin-x86_64-dynamic /bin/ls
+chmod 0755 /bin/ls
mkdir /boot/grub
touch /boot/grub/grub.conf