$ strings /usr/bin/mksquashfs| grep SOURCE_DATE
SOURCE_DATE_EPOCH
FATAL ERROR:SOURCE_DATE_EPOCH and command line options can't be used at the same time to set timestamp(s)
Env Var SOURCE_DATE_EPOCH has invalid time value
We would need to update the mksquashfs that goes into the snap binary for this to work. The version we currently have comes from 16.04.
I see this happen to. I think the problem is that mksquashfs from the snapd snap (or the core snap is too old).
This is from strace when invoking `snap pack`:
[pid 57453] execve( "/var/lib/ snapd/snap/ snapd/current/ lib/x86_ 64-linux- gnu/ld- 2.23.so" , ["/var/ lib/snapd/ snap/snapd/ current/ lib/x86_ 64-linux- gnu/ld- 2.23.so" , "--library-path", "/var/lib/ snapd/snap/ snapd/current/ usr/local/ lib:/var/ lib/snapd/ snap/snapd/ current/ lib/x86_ 64-linux- gnu:/var/ lib/snapd/ snap/snapd/ current/ usr/lib/ x86_64- linux-gnu" , "/var/lib/ snapd/snap/ snapd/current/ usr/bin maciek/ work/canonical/ image/snapd_ 2.45.3. 1+git2336. g484f47d_ amd64.snap" , "-noappend", "-comp", "xz", "-no-fragments", "-no-progress", "-wildcards", "-ef", "/tmp/. snap-pack- exclude- 981155965" , "-all-root", "-no-xattrs"], ["DBUS_ SESSION_ BUS_ADDRESS= unix:path= /run/user/ 1000/bus" , "DISPLAY=:0", "HOME=/ home/maciek" , "INVOCATION_ ID=6b2d474429d6 4baebb7b8457e00 57 STREAM= 8:39754" , "LANG=en_US.UTF-8", "LC_TIME= pl_PL.UTF- 8", "LOGNAME=maciek", "MAIL=/ var/spool/ mail/maciek" , "MANAGERPID=1483", "PATH=/ usr/local/ bin:/usr/ bin:/var/ lib/snapd/ snap/bin: /home/maciek/ bin:/home/ maciek/ .local/ bin:/usr/ local/sbin: /var/lib/ flatpak/ exports/ bin:/usr/ lib/jvm/ default/ bin:/usr/ bin/site_ perl:/usr/ bin/vendor_ perl:/usr/ bin/core_ perl", "PLASMA_USE_QT maciek/ work/canonical/ image", "SHELL= /usr/bin/ zsh", "SSH_AUTH_ SOCK=/run/ user/1000/ keyring/ ssh", "TERM=screen- 256color" , "TMUX=/ tmp//tmux- 1000/default, 1557,0" , "TMUX_PANE=%8", "USER=maciek", "XAUTHORITY= /run/user/ 1000/gdm/ Xauthority" , "XDG_DATA_ DIRS=/home/ maciek/ .local/ share/flatpak/ exports/ share:/ var/lib/ flatpak/ exports/ share:/ usr/local/ share/: /usr/share/ :/ snapd/desktop" , "XDG_RUNTIME_ DIR=/run/ user/1000" , "SHLVL=1", "OLDPWD= /home/maciek" , "KWIN_TRIPLE_ BUFFER= 1", "HG=/usr/bin/hg", "MOZ_PLUGIN_ PATH=/usr/ lib/mozilla/ plugins" , "EDITOR=emacsclient -t -a ''", "PAGER=less", "LC_MESSAGES=", "_=/usr/ bin/strace" , "SOURCE_ DATE_EPOCH= 1596107149" ]) = 0
/mksquashfs", ".", "/home/
a7e", "JOURNAL_
_SCALING=1", "PWD=/home/
var/lib/
Clearly the environment variable is passed to mksquashfs. However, the mksquashfs binary is not aware of SOURCE_DATE_EPOCH at all:
$ strings /var/lib/ snapd/snap/ snapd/current/ usr/bin/ mksquashfs| grep SOURCE_DATE
Now my local binary is:
$ strings /usr/bin/ mksquashfs| grep SOURCE_DATE DATE_EPOCH and command line options can't be used at the same time to set timestamp(s)
SOURCE_DATE_EPOCH
FATAL ERROR:SOURCE_
Env Var SOURCE_DATE_EPOCH has invalid time value
We would need to update the mksquashfs that goes into the snap binary for this to work. The version we currently have comes from 16.04.