Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOURCE_DATE_EPOCH fatal error in Arch makepkg #1202

Open
DeeeeLAN opened this issue Jul 17, 2022 · 2 comments
Open

SOURCE_DATE_EPOCH fatal error in Arch makepkg #1202

DeeeeLAN opened this issue Jul 17, 2022 · 2 comments

Comments

@DeeeeLAN
Copy link

DeeeeLAN commented Jul 17, 2022

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:

args[i++] = "-mkfs-time";
args[i++] = "0";

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

@probonopd
Copy link
Member

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).

@DeeeeLAN
Copy link
Author

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.

maltfield added a commit to BusKill/buskill-app that referenced this issue Mar 31, 2024
Apparently appimagetool passes '--mkfs-time 0' to `mksquashfs`. It does this to make builds reproducible, but we set SOURCE_DATE_EPOCH for this purpose. If *both* are passed, then `mksquashfs`, exits with an error.

To be consistent, this commit just strips the `--mkfs-time 0` option

 * #78 (comment)
 * AppImage/AppImageKit#1202
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants