makeself icon indicating copy to clipboard operation
makeself copied to clipboard

LSM required not optional

Open MichalMisiaszek opened this issue 8 years ago • 15 comments

Hello, I created archive with simple command from examples but start of script has lines: No LSM. EOLSM exit 0 Which basically means unless I provide LSM file I cannot create archive. The manual points to LSM as being option.

MichalMisiaszek avatar Aug 25 '16 18:08 MichalMisiaszek

Just ran into the same issue, Makeself version 2.4.0, Ubuntu 20.04 / ARM64. Is there a workaround?

tresf avatar Mar 26 '21 18:03 tresf

So I managed to fix this by changing the directory I build from. Was on a Parallel's shared volume. Not sure why changing to a local directory fixed it... I'm chaining from ant.

Here's the bad build:

     [exec] Executing 'makeself' with arguments:
     [exec] '/media/psf/Home/tray/out/dist'
     [exec] '/media/psf/Home/tray/out/qz-tray-2.1.2.run'
     [exec] 'QZ Tray Installer'
     [exec] './install'
     [exec] 
     [exec] The ' characters around the executable and arguments are
     [exec] not part of the command.
     [exec] 
     [exec] About to compress 130720 KB of data...
     [exec] Adding files to archive named "/media/psf/Home/tray/out/qz-tray-2.1.2.run"...
     [exec] Header is 587 lines long
     [exec] ./
     [exec] [... <truncated>...]
     [exec] CRC: 1864573242
-    [exec] MD5: 1a6f8dcf52e9019c2c04ee69b864eda3/usr/bin/makeself: 1: /usr/share/makeself/makeself-header.sh: cannot create /media/psf/Home/tray/out/qz-tray-2.1.2.run: Interrupted system call
     [exec] Self-extractable archive "/media/psf/Home/tray/out/qz-tray-2.1.2.run" successfully created.

Here's the good build:

     [exec] Executing 'makeself' with arguments:
     [exec] '/home/ubuntu/tray/out/dist'
     [exec] '/home/ubuntu/tray/out/qz-tray-2.1.2.run'
     [exec] 'QZ Tray Installer'
     [exec] './install'
     [exec] 
     [exec] The ' characters around the executable and arguments are
     [exec] not part of the command.
     [exec] 
     [exec] About to compress 130324 KB of data...
     [exec] Adding files to archive named "/home/ubuntu/tray/out/qz-tray-2.1.2.run"...
     [exec] Header is 587 lines long
     [exec] ./
     [exec] [... <truncated>...]
     [exec] CRC: 2932364619
     [exec] MD5: 5614c368635d57feaf6188e49d61ff91
     [exec] 
     [exec] Self-extractable archive "/home/ubuntu/tray/out/qz-tray-2.1.2.run" successfully created.

tresf avatar Mar 26 '21 18:03 tresf

Have you tried a more recent version of Makeself? We're on 2.4.3 right now, and there were quite a few fixes since

megastep avatar Mar 26 '21 21:03 megastep

Have you tried a more recent version of Makeself? We're on 2.4.3 right now, and there were quite a few fixes since

Whatever on the Parallels share folder that's breaking it, still occurs with 2.4.3. Still same broken header:

  CRC: 2666403789
  MD5: 01067c85590d0ec9c75fd149c7559b1e
- /home/ubuntu/makeself-2.4.2/makeself.sh: 1: /home/ubuntu/makeself-2.4.2/makeself-header.sh: cannot create /media/psf/Home/tray/out/qz-tray-2.1.2.run: Interrupted system call

  Self-extractable archive "/media/psf/Home/tray/out/qz-tray-2.1.2.run" successfully created.
No LSM.
EOLSM
        exit 0
        ;;
    --list)
        echo Target directory: $targetdir
        offset=`head -n 587 "$0" | wc -c | tr -d " "`
        for s in $filesizes
        do
            MS_dd "$0" $offset $s | eval "gzip -cd" | UnTAR t
            offset=`expr $offset + $s`
        done
        exit 0
        ;;
        --tar)
        offset=`head -n 587 "$0" | wc -c | tr -d " "`
        arg1="$2"
    if ! shift 2; then MS_Help; exit 1; fi

tresf avatar Mar 26 '21 21:03 tresf

This "interrupted system call" error is odd and is likely being output by one of the commands being called by Makeself, need to figure out which and why.

megastep avatar Mar 26 '21 21:03 megastep

likely being output by one of the commands being called by Makeself, need to figure out which and why.

Happy to, any idea where to start?

tresf avatar Mar 26 '21 21:03 tresf

Run the archive through bash -x to get a trace of the commands being called, this should tell you the likely culprit.

megastep avatar Mar 26 '21 21:03 megastep

Oddly, bash doesn't exhibit the issue. sh -x shows the following on or around the error:

SHAsum=0000000000000000000000000000000000000000000000000000000000000000
+ . /home/ubuntu/makeself-2.4.2/makeself-header.sh
+ dirname /home/ubuntu/makeself-2.4.2/makeself.sh
/home/ubuntu/makeself-2.4.2/makeself.sh: 1: /home/ubuntu/makeself-2.4.2/makeself-header.sh: cannot create /media/psf/Home/tray/out/qz-tray-2.1.2.run: Interrupted system call
+ cat
+ eval echo No LSM. >> "$archname"
+ echo No LSM.
+ cat
+ test n = n
+ echo

tresf avatar Mar 26 '21 23:03 tresf

Mmh I wonder if cat is getting that error, though it could just be your shell if it doesn't happen with bash.

megastep avatar Mar 27 '21 00:03 megastep

You said it only happens while on a shared volume though? I bet it's got something to do with the filesystem somehow. What kind of filesystem is in use here (what mount reports)?

megastep avatar Mar 27 '21 00:03 megastep

What kind of filesystem is in use here (what mount reports)?

Something called prl_fs?

mount |grep psf
Home on /media/psf/Home type prl_fs (rw,nosuid,nodev,noatime,sync,ttl=250,share)

You said it only happens while on a shared volume though?

Only on a shared volume AND only with sh. The cat chunk is what I started staring at too, but I've never had to debug a large chunk like that before. I found a few people complaining about locked file reads causing this in certain environments? Shot in the dark.

tresf avatar Mar 27 '21 00:03 tresf

Since I'm on a prerelease of Parallels for aarch64, I'll test on Intel and see if it happens there too, incase it's a bug with the prl_fs implementation.

tresf avatar Mar 27 '21 00:03 tresf

Yeah I highly suspect this prl_fs is to blame - if it's a custom kernel extension it could raise these kinds of issues, and maybe sh is more sensible to it.

megastep avatar Mar 27 '21 01:03 megastep

The Intel doesn't exhibit the same issue. I'll file a report to Parallels.

tresf avatar Mar 27 '21 01:03 tresf

Submitted to Parallels:

[Parallels #2938997] Ubuntu prl_fs "Interrupted system call"

Steps (here for posterity):

Ubuntu 20.04 ARM64 Guest, latest updates.

- Works on Intel
- Does not work on Apple Silicon

# Dependencies
sudo apt-get install makeself

# Create an bogus installer
mkdir test
touch test/install
openssl rand -out test/junk.dat -base64 9999999 # make a random ~13MB file
makeself test my_installer.sh "My Installer" test/install
# ^--- repeat until fails with "Interrupted system call"

# Cleanup
rm -rf test
rm my_installer.sh

Thanks for the troubleshooting steps.

tresf avatar Mar 27 '21 01:03 tresf