You are not logged in.

#1 2021-02-22 10:08:45

saurabh000345
Member
From: West Bengal, India
Registered: 2018-12-20
Posts: 30
Website

[SOLVED] SHASUM changing when I copy a file from my PKGBUILD

In my PKGBUILD, I'm downloading an appimage. When I issue the command:

install -Dm755 "${srcdir}/linux" "${pkgdir}/${pkgname}.appimage"

the SHASUM changes and the appimage complains:

This doesn't look like a squashfs image.

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information
open dir error: No such file or directory

when I issue makepkg, the SHASUM is different. When I issue the same command manually, this issue doesn't occur. I have tried using "install" as well as "cp".

Also, I read on another post that it might be because of a faulty RAM unit. I tried making the package on another computer and the results are the same.




The solution was to disable strip from the options:

options=(!strip)

Last edited by saurabh000345 (2021-02-23 15:10:28)


I skimmed through the wiki

Offline

#2 2021-02-22 12:25:21

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,887

Re: [SOLVED] SHASUM changing when I copy a file from my PKGBUILD

https://github.com/AppImage/AppImageKit/wiki/FUSE

There are 2 types of AppImage , which type is the AppImage you downloaded ?

Please post your PKGBUILD


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2021-02-22 12:46:32

saurabh000345
Member
From: West Bengal, India
Registered: 2018-12-20
Posts: 30
Website

Re: [SOLVED] SHASUM changing when I copy a file from my PKGBUILD

Lone_Wolf wrote:

https://github.com/AppImage/AppImageKit/wiki/FUSE

There are 2 types of AppImage , which type is the AppImage you downloaded ?

Please post your PKGBUILD

I added that to the original post. Also, the appimage file runs from the src directory. but, after the install or copy is done, the shasum changes and it complains when executed from the pkg directory.
Also, don't judge the PKGBUILD too harshly, I was frustrated so I might have written stupid stuff.

8260d18e9d6c3bb65a8f0f384e265b0ed687196015cc649cf604582e7e23af8a  pkg/session-messenger/session-messenger.appimage
dccafa8c1052c275ca818951a28bfb8943eec6b6679914cb3b2a57341c05ee36  src/linux

Last edited by saurabh000345 (2021-02-22 12:47:57)


I skimmed through the wiki

Offline

#4 2021-02-22 12:52:59

progandy
Member
Registered: 2012-05-17
Posts: 4,127

Re: [SOLVED] SHASUM changing when I copy a file from my PKGBUILD

This is probably unrelated to your problem, but do not skip the checksum for the appimage and set the correct package version. If possible use a versioned URL for the appimage as well.

Edit: You will probably want to disable stripping and other options that change executable files.

Last edited by progandy (2021-02-22 13:00:27)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2021-02-22 12:59:50

saurabh000345
Member
From: West Bengal, India
Registered: 2018-12-20
Posts: 30
Website

Re: [SOLVED] SHASUM changing when I copy a file from my PKGBUILD

progandy wrote:

This is probably unrelated to your problem, but do not skip the checksum for the appimage and set the correct package version. If possible use a versioned URL for the appimage as well.

Edit: You will probably want to disable stripping and other options that change executable files.

I don't think they have a public mention of the appimage checksum on their website. Also, the releases weren't versioned from the website atleast. It's there on their Github I just checked. Maybe I'll consider building from there instead.

Last edited by saurabh000345 (2021-02-22 13:00:12)


I skimmed through the wiki

Offline

#6 2021-02-22 13:01:31

progandy
Member
Registered: 2012-05-17
Posts: 4,127

Re: [SOLVED] SHASUM changing when I copy a file from my PKGBUILD

The releases are here: https://github.com/oxen-io/session-desktop/releases You could also try building from source. I suggest you rename to session-messenger-bin or session-messenger-appimage if you keep using the compiled version.

By the way, the download redirects to github:

curl -I https://getsession.org/linux | grep location

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2021-02-22 13:05:34

saurabh000345
Member
From: West Bengal, India
Registered: 2018-12-20
Posts: 30
Website

Re: [SOLVED] SHASUM changing when I copy a file from my PKGBUILD

progandy wrote:

The releases are here: https://github.com/oxen-io/session-desktop/releases You could also try building from source. I suggest you rename to session-messenger-bin or session-messenger-appimage if you keep using the compiled version.

By the way, the download redirects to github:

curl -I https://getsession.org/linux | grep location

Thanks. I will once this thing is solved. It's weird. I literally just copied the file and the shasum changed


I skimmed through the wiki

Offline

#8 2021-02-22 14:36:55

progandy
Member
Registered: 2012-05-17
Posts: 4,127

Re: [SOLVED] SHASUM changing when I copy a file from my PKGBUILD

As I mentioned, prevent makepkg from stripping binaries for this package:

options=(!strip)
PKGBUILD manpage wrote:

https://archlinux.org/pacman/PKGBUILD.5.html
options (array)

    This array allows you to override some of makepkg’s default behavior when building packages. To set an option, just include the option name in the options array. To reverse the default behavior, place an “!” at the front of the option. Only specify the options you specifically want to override, the rest will be taken from makepkg.conf(5). NOTE: force is a now-removed option in favor of the top level epoch variable.

    strip

        Strip symbols from binaries and libraries. If you frequently use a debugger on programs or libraries, it may be helpful to disable this option.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#9 2021-02-23 15:08:47

saurabh000345
Member
From: West Bengal, India
Registered: 2018-12-20
Posts: 30
Website

Re: [SOLVED] SHASUM changing when I copy a file from my PKGBUILD

progandy wrote:

As I mentioned, prevent makepkg from stripping binaries for this package:

options=(!strip)
PKGBUILD manpage wrote:

https://archlinux.org/pacman/PKGBUILD.5.html
options (array)

    This array allows you to override some of makepkg’s default behavior when building packages. To set an option, just include the option name in the options array. To reverse the default behavior, place an “!” at the front of the option. Only specify the options you specifically want to override, the rest will be taken from makepkg.conf(5). NOTE: force is a now-removed option in favor of the top level epoch variable.

    strip

        Strip symbols from binaries and libraries. If you frequently use a debugger on programs or libraries, it may be helpful to disable this option.

Thanks, that worked


I skimmed through the wiki

Offline

Board footer

Powered by FluxBB