AppImageKit icon indicating copy to clipboard operation
AppImageKit copied to clipboard

SOURCE_DATE_EPOCH fatal error in Arch makepkg

Open DeeeeLAN opened this issue 3 years ago • 2 comments
trafficstars

Hi, I am getting the following error:

appimagetool, continuous build (commit 7f9be69), build <local dev build> built on 2022-07-16 02:23:34 UTC
Desktop file: /home/dillan/Downloads/aur/openra-rv-git/src/Romanovs-Vengeance/packaging/linux/Romanovs Vengeance.appdir/openra-rv.desktop
Name: OpenRA - Romanovs Vengeance
Icon: openra-rv
Exec: openra-rv %U
Comment entry not found in desktop file
Comment: (null)
Type: Application
Categories: Game;StrategyGame;
Environmental variable ARCH used for determining architecture x86_64
Using architecture x86_64
App name for filename: OpenRA_-_Romanovs_Vengeance
/home/dillan/Downloads/aur/openra-rv-git/src/Romanovs-Vengeance/packaging/linux/Romanovs Vengeance.appdir should be packaged as /home/dillan/Downloads/aur/openra-rv-git/src/Romanovs Vengeance-3822.git.08da500-x86_64.AppImage
WARNING: AppStream upstream metadata is missing, please consider creating it
         in usr/share/metainfo/openra-rv.appdata.xml
         Please see https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps
         for more information or use the generator at http://output.jsbin.com/qoqukof.
Generating squashfs...
Size of the embedded runtime: 189632 bytes
mksquashfs commandline: /tmp/.mount_appimaHcvpqP/usr/bin/../lib/appimagekit/mksquashfs /home/dillan/Downloads/aur/openra-rv-git/src/Romanovs-Vengeance/packaging/linux/Romanovs Vengeance.appdir /home/dillan/Downloads/aur/openra-rv-git/src/Romanovs Vengeance-3822.git.08da500-x86_64.AppImage -offset 189632 -comp gzip -root-owned -noappend -mkfs-time 0 
FATAL ERROR:SOURCE_DATE_EPOCH and command line options can't be used at the same time to set timestamp(s)
Embedding ELF...
Not able to open the AppImage for writing, aborting

Here is the command that is running inside the makepkg script:

curl -s -L -O https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod a+x appimagetool-x86_64.AppImage
ARCH=x86_64 ./appimagetool-x86_64.AppImage -v "${APPDIR}" "${OUTPUTDIR}/${PACKAGING_INSTALLER_NAME}-${TAG}-x86_64.AppImage"

I know Arch makepkg provides a SOURCE_DATE_EPOCH env variable with each run, but I am not supplying any command line options that would conflict with that. However, it looks like the -mkfs-time 0 argument is getting hard-coded onto the command line at: https://github.com/AppImage/AppImageKit/blob/7f9be6958ea3723d15f2e7a338e6da6e3d28baf2/src/appimagetool.c#L205-L206

Is there a way to disable this functionality, or do I need to unset the env variable in my script?

DeeeeLAN avatar Jul 17 '22 08:07 DeeeeLAN

Can you unset SOURCE_DATE_EPOCH before running appimagetool? I think we are using -mkfs-time 0 in order to allow for reproducible builds (iirc).

probonopd avatar Jul 17 '22 19:07 probonopd

That is what I am currently doing as a workaround. From the docs it sounded like either option was supposed to be supported, but if that had changed, maybe the docs need to be updated, or the tool should handle unsetting the variable internally.

DeeeeLAN avatar Jul 18 '22 03:07 DeeeeLAN