Skip to content

Commit df3ee05

Browse files
committed
add patch to disable IPA signing for Flatpak compatibility
1 parent 7de384d commit df3ee05

2 files changed

Lines changed: 61 additions & 1 deletion

File tree

io.github.saeugetier.photobooth.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"--socket=fallback-x11",
1919
"--socket=wayland",
2020
"--env=LIBCAMERA_LOG_LEVELS=*:DEBUG",
21-
"--env=LIBCAMERA_IPA_FORCE_ISOLATION=0",
2221
"--env=LIBCAMERA_IPA_MODULE_PATH=/app/lib/libcamera",
2322
"--env=LIBCAMERA_IPA_CONFIG_PATH=/app/share/libcamera/ipa"
2423
],
@@ -81,6 +80,10 @@
8180
"type": "git",
8281
"url": "https://github.com/raspberrypi/libcamera.git",
8382
"tag": "v0.6.0"
83+
},
84+
{
85+
"type": "patch",
86+
"path": "patches/disable-ipa-signing.patch"
8487
}
8588
],
8689
"modules": [

patches/disable-ipa-signing.patch

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
2+
index 34e20f55..72ddbf47 100644
3+
--- a/src/libcamera/meson.build
4+
+++ b/src/libcamera/meson.build
5+
@@ -85,24 +85,10 @@ libyaml = dependency('yaml-0.1', default_options : [
6+
'werror=false',
7+
])
8+
9+
-# Use one of gnutls or libcrypto (provided by OpenSSL), trying gnutls first.
10+
-libcrypto = dependency('gnutls', required : false)
11+
-if libcrypto.found()
12+
- config_h.set('HAVE_GNUTLS', 1)
13+
-else
14+
- libcrypto = dependency('libcrypto', required : false)
15+
- if libcrypto.found()
16+
- config_h.set('HAVE_CRYPTO', 1)
17+
- endif
18+
-endif
19+
-
20+
-if not libcrypto.found()
21+
- warning('Neither gnutls nor libcrypto found, all IPA modules will be isolated')
22+
- summary({'IPA modules signed with': 'None (modules will run isolated)'},
23+
- section : 'Configuration')
24+
-else
25+
- summary({'IPA modules signed with' : libcrypto.name()}, section : 'Configuration')
26+
-endif
27+
+# IPA signing disabled for Flatpak compatibility
28+
+warning('IPA signing disabled for Flatpak sandbox compatibility')
29+
+summary({'IPA modules signed with': 'None (modules will run isolated)'},
30+
+ section : 'Configuration')
31+
32+
if liblttng.found()
33+
tracing_enabled = true
34+
diff --git a/src/meson.build b/src/meson.build
35+
index 9b63c8e8..687d6b51 100644
36+
--- a/src/meson.build
37+
+++ b/src/meson.build
38+
@@ -15,17 +15,8 @@ summary({
39+
}, section : 'Paths')
40+
41+
# Module Signing
42+
-openssl = find_program('openssl', required : false)
43+
-if openssl.found()
44+
- ipa_priv_key = custom_target('ipa-priv-key',
45+
- output : ['ipa-priv-key.pem'],
46+
- command : [gen_ipa_priv_key, '@OUTPUT@'])
47+
- config_h.set('HAVE_IPA_PUBKEY', 1)
48+
- ipa_sign_module = true
49+
-else
50+
- warning('openssl not found, all IPA modules will be isolated')
51+
- ipa_sign_module = false
52+
-endif
53+
+# IPA signing disabled for Flatpak compatibility
54+
+ipa_sign_module = false
55+
56+
# libyuv, used by the Android adaptation layer and the virtual pipeline handler.
57+
# Fallback to a subproject if libyuv isn't found, as it's typically not provided

0 commit comments

Comments
 (0)