aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/pipewire/0003-test-fix-tmpdir-value-after-setenv.patch77
-rw-r--r--community/pipewire/APKBUILD5
2 files changed, 80 insertions, 2 deletions
diff --git a/community/pipewire/0003-test-fix-tmpdir-value-after-setenv.patch b/community/pipewire/0003-test-fix-tmpdir-value-after-setenv.patch
new file mode 100644
index 00000000000..fc4c5f2f35c
--- /dev/null
+++ b/community/pipewire/0003-test-fix-tmpdir-value-after-setenv.patch
@@ -0,0 +1,77 @@
+From cf3c0431c387a72fdbc66ec78086f695d0b6de3c Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue, 26 Oct 2021 11:14:06 +1000
+Subject: [PATCH 1/2] test: fix tmpdir value after setenv
+
+Introduced in a2856c6e0f692b7a379e06d3ed6ac8107f9b946b
+
+set_test_env() modifies TMPDIR so we must not use getenv until after
+that call.
+
+Fixes #1736
+---
+ test/pwtest.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/test/pwtest.c b/test/pwtest.c
+index fbf16cb2f..a000153fd 100644
+--- a/test/pwtest.c
++++ b/test/pwtest.c
+@@ -915,9 +915,7 @@ static void run_test(struct pwtest_context *ctx, struct pwtest_suite *c, struct
+ pid_t pw_daemon = 0;
+ int read_fds[_FD_LAST], write_fds[_FD_LAST];
+ int r;
+- const char *tmpdir = getenv("TMPDIR");
+-
+- spa_assert_se(tmpdir != NULL);
++ const char *tmpdir;
+
+ if (t->result == PWTEST_SKIP) {
+ char *buf = pw_array_add(&t->logs[FD_LOG], 64);
+@@ -934,6 +932,8 @@ static void run_test(struct pwtest_context *ctx, struct pwtest_suite *c, struct
+ }
+
+ set_test_env(ctx, t);
++ tmpdir = getenv("TMPDIR");
++ spa_assert_se(tmpdir != NULL);
+ r = chdir(tmpdir);
+ if (r < 0) {
+ t->sig_or_errno = -errno;
+--
+GitLab
+
+
+From 07c5511aedf0b0606c0d3f92ce829c5402436d58 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue, 26 Oct 2021 11:03:22 +1000
+Subject: [PATCH 2/2] test: handle chdir errors correctly
+
+When we get to this code, we already updated the environment variables
+so we need to use the usual error path to restore them.
+
+And where chdir does fail, print an error to the log. 256 chars should
+be enough here, if your tmpdir exceeds that you just have the error
+message cut off.
+---
+ test/pwtest.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/test/pwtest.c b/test/pwtest.c
+index a000153fd..35e7b003c 100644
+--- a/test/pwtest.c
++++ b/test/pwtest.c
+@@ -936,8 +936,10 @@ static void run_test(struct pwtest_context *ctx, struct pwtest_suite *c, struct
+ spa_assert_se(tmpdir != NULL);
+ r = chdir(tmpdir);
+ if (r < 0) {
++ char *buf = pw_array_add(&t->logs[FD_LOG], 256);
++ spa_scnprintf(buf, 256, "pwtest: failed to chdir to '%s'\n", tmpdir);
+ t->sig_or_errno = -errno;
+- return;
++ goto error;
+ }
+
+ if (t->args.pw_daemon) {
+--
+GitLab
+
diff --git a/community/pipewire/APKBUILD b/community/pipewire/APKBUILD
index 2af87b01e37..6fb474d1731 100644
--- a/community/pipewire/APKBUILD
+++ b/community/pipewire/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=pipewire
pkgver=0.3.39
-pkgrel=2
+pkgrel=3
pkgdesc="Multimedia processing graphs"
url="https://pipewire.org/"
# s390x blocked due to failing tests on big-endian
@@ -56,10 +56,10 @@ install="$pkgname.post-upgrade"
source="https://gitlab.freedesktop.org/PipeWire/pipewire/-/archive/$pkgver/pipewire-$pkgver.tar.gz
0001-fix-intl-lookup.patch
0002-cpu-fix-compilation-on-some-architectures.patch
+ 0003-test-fix-tmpdir-value-after-setenv.patch
pipewire.desktop
pipewire-launcher.sh
"
-options="!check" # Failing, https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1736
case "$CARCH" in
# Limited by webrtc-audio-processing-dev
@@ -189,6 +189,7 @@ sha512sums="
75ed35177577efe7559341394605777be21d0f3952b9379a23c8d4c71d35ed88ec45c3e9ad58832099c8f370753d8b47a5767f47453a599c4f4a4b641b2b0d9d pipewire-0.3.39.tar.gz
04f7420cb9aedde53f9d51061bbe010913690934630bc5f1ee8d1c3f6a9fd66ac2c2660f2410d63f69a16c6cba17d1764c9183a0aec8ccd3cef0a035aa9e4f45 0001-fix-intl-lookup.patch
cd230f80b01c4d07225ded8f9c5bab7f3d063e76f2c49956b9d8a08dcace291f5625a33268631b432b3f24f8bdbddb0da42c4418ed06c5840e1c11b1d8204a80 0002-cpu-fix-compilation-on-some-architectures.patch
+18e7ff1527ce49311d82b2816c22fcccd3c0fd89cee4ae617b606b9f7b73c1833e67b28e867ea7e772899857b0ac06ef9c91fcc253b720e8a42ff17fb963b69e 0003-test-fix-tmpdir-value-after-setenv.patch
d5d8bc64e42715aa94296e3e26e740142bff7f638c7eb4fecc0301e46d55636d889bdc0c0399c1eb523271b20f7c48cc03f6ce3c072e0e8576c821ed1ea0e3dd pipewire.desktop
51a1733571a09f73f30a4e98424dfdf96b2f73036843738f9579bb3fff08019d9136ee0e434124e46b6e1066a7f7aa1cd9580aedd7ec17573031be435ae1201b pipewire-launcher.sh
"