GNU bug report logs -
#73842
[PATCH] pack: Add support for AppImage pack format.
Previous Next
Reported by: Noé Lopez <noelopez <at> free.fr>
Date: Wed, 16 Oct 2024 21:52:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi!
Noé Lopez <noe <at> noé.eu> skribis:
> From: Noé Lopez <noelopez <at> free.fr>
>
> * gnu/packages/appimage.scm
> (gnu packages appimage): New module.
> (fuse-for-appimage, squashfuse-for-appimage)
> (appimage-type2-runtime): New variables.
>
> Change-Id: I857a8eb5399a6a493e52db70b6c8cf0c71360930
> ---
> gnu/packages/appimage.scm | 126 ++++++++++++++++++++++++++++++++++++++
Please add this file to ‘gnu/local.mk’.
> +(define fuse-for-appimage
> + (package
> + (inherit fuse)
Due to restrictions having to do with circular module dependencies, this
package must be defined in the same file as ‘fuse’ itself (apologies for
overlooking it!). You could add the ‘hidden?’ property if needed, but
IMO it perhaps not even necessary to hide it.
> +(define squashfuse-for-appimage
> + (package
> + (inherit squashfuse)
Likewise, this should be in the same file as ‘squashfuse’.
> + (arguments
> + (list
> + #:make-flags
> + #~(list "-Csrc/runtime" "runtime-fuse3"
> + (string-append "CFLAGS=" "-I" #$fuse-2 "/include/fuse/"
Rather: #$(this-package-input "fuse").
> + " -DGIT_COMMIT='\"" "guix-" #$version "\"'"
> + " -D_FILE_OFFSET_BITS=64"
> + " -static"))
You may need to add “-O2 -g” here, or the code might be compiled as with
“-O0 -g0”.
> + ;; Must be after all elf reliant phases.
> + (add-after 'make-dynamic-linker-cache 'set-magic-bytes
> + (lambda _
> + (let ((port (open (string-append #$output
> + "/bin/runtime-fuse3")
> + (logior O_WRONLY))))
> + (seek port 8 SEEK_SET)
> + (put-bytevector port #vu8(#x41 #x49 #x02))
> + (close-port port)))))
What’s the story with magic bytes here? :-)
Could you add a comment explaining what the phase does and why it’s
necessary?
> + #:disallowed-references (list squashfuse-for-appimage
> + fuse-for-appimage zstd zlib)))
> + ;; Only needed at build time.
> + (inputs (list squashfuse-for-appimage fuse-for-appimage
> + `(,zstd "static")
> + `(,zlib "static")))
It should probably be ‘native-inputs’, then.
Also, in #:disallowed-references, I think you need:
`(,zstd "static") `(,zlib "static")
> + (synopsis "Runtime for executing AppImages")
> + (description "The runtime is the executable part of every AppImage, it
> +mounts the payload via FUSE and executes the entrypoint.")
Please make that a full sentence, as per
<https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html>.
This bug report was last modified 178 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.