From 4a19fe41c34a519f6320d1e606a79171507d2b05 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Tue, 27 Aug 2024 12:53:31 +0400 Subject: [PATCH] gnu: libcamera: Re-sign binaries after stripping. * gnu/packages/networking.scm (libcamera) [arguments]: Re-sign binaries after stripping. Change-Id: If57a44d22347d8ebc7eab7df343e9c3996fe1793 --- gnu/packages/networking.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index a0881e3308..98726a36bd 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -427,7 +427,21 @@ them in order to efficiently transfer a minimal amount of data.") (mkdir-p (string-append gst "/lib")) (rename-file (string-append out "/lib/gstreamer-1.0") - (string-append gst "/lib/gstreamer-1.0")))))))) + (string-append gst "/lib/gstreamer-1.0"))))) + (add-after 'shrink-runpath 're-sign-binaries + (lambda* (#:key outputs #:allow-other-keys) + "Update signatures of all ipa libraries. + +After stipping phases signatures are not valid anymore, so it's necessary to +re-sign." + (let* ((out (assoc-ref outputs "out"))) + (for-each + (lambda (file) + (invoke + "source/src/ipa/ipa-sign.sh" "src/ipa-priv-key.pem" + file (string-append file ".sign"))) + (find-files + (string-append out "/lib/libcamera") "\\.so$")))))))) (native-inputs (list googletest graphviz ;for 'dot'