debuginfod arch-linux test binaries
authorEli Schwartz <eschwartz@archlinux.org>
Wed, 5 Feb 2020 22:09:30 +0000 (17:09 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Mon, 10 Feb 2020 16:10:12 +0000 (11:10 -0500)
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
tests/debuginfod-tars/hello-1-1-x86_64.pkg.tar.xz [new file with mode: 0644]
tests/debuginfod-tars/hello-debug-1-1-x86_64.pkg.tar.bz2 [new file with mode: 0644]
tests/debuginfod-tars/pacman-sources/PKGBUILD [new file with mode: 0644]
tests/debuginfod-tars/pacman-sources/README.md [new file with mode: 0644]
tests/debuginfod-tars/pacman-sources/hello.c [new file with mode: 0644]

diff --git a/tests/debuginfod-tars/hello-1-1-x86_64.pkg.tar.xz b/tests/debuginfod-tars/hello-1-1-x86_64.pkg.tar.xz
new file mode 100644 (file)
index 0000000..fd78433
Binary files /dev/null and b/tests/debuginfod-tars/hello-1-1-x86_64.pkg.tar.xz differ
diff --git a/tests/debuginfod-tars/hello-debug-1-1-x86_64.pkg.tar.bz2 b/tests/debuginfod-tars/hello-debug-1-1-x86_64.pkg.tar.bz2
new file mode 100644 (file)
index 0000000..8701861
Binary files /dev/null and b/tests/debuginfod-tars/hello-debug-1-1-x86_64.pkg.tar.bz2 differ
diff --git a/tests/debuginfod-tars/pacman-sources/PKGBUILD b/tests/debuginfod-tars/pacman-sources/PKGBUILD
new file mode 100644 (file)
index 0000000..0cac170
--- /dev/null
@@ -0,0 +1,19 @@
+pkgname=hello
+pkgver=1
+pkgrel=1
+pkgdesc="Simple hello world program to exercise debuginfod"
+arch=('x86_64')
+source=('hello.c')
+sha256sums=('f85badd2007451bbda4791e7fe820b41be0a424172a567573511688bff975235')
+
+# guarantee that split debug packages are turned on
+options=('strip' 'debug')
+
+build() {
+    # implicit Makefile
+    make hello
+}
+
+package() {
+    install -Dm755 hello "${pkgdir}"/usr/bin/hello
+}
diff --git a/tests/debuginfod-tars/pacman-sources/README.md b/tests/debuginfod-tars/pacman-sources/README.md
new file mode 100644 (file)
index 0000000..17f59bc
--- /dev/null
@@ -0,0 +1,19 @@
+# Creating sample pacman packages
+
+You will need:
+- an archlinux installation
+- `pacman -S base-devel` for basic build requirements (like debian "build-essential")
+
+Run `makepkg` inside this directory to produce *.pkg.tar.* archives. This may
+be .xz, .zst, .gz etc. depending on the current defaults, see makepkg.conf(5)
+"PKGEXT" for details. The archives will appear in the current directory, or the
+"PKGDEST" defined by makepkg.conf(5).
+
+# Byte-for-byte reproduction
+
+You will need:
+- an archlinux installation
+- `pacman -S devtools` for the clean chroot builder/reproducer
+
+Run `makerepropkg /path/to/hello-debug-1-1-x86_64.pkg.tar.xz` (or whichever the
+archive filename is) inside this directory.
diff --git a/tests/debuginfod-tars/pacman-sources/hello.c b/tests/debuginfod-tars/pacman-sources/hello.c
new file mode 100644 (file)
index 0000000..c1ef155
--- /dev/null
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main() {
+    printf("hello\n");
+    return 0;
+}