srevinsaju / zap

:zap: Delightful AppImage package manager
https://zap.srev.in
MIT License
504 stars 20 forks source link

Zap not fully integrating in Mint Cinnamon 20.3 (una)/5.2.7 + v1 branch downloads blank AppImage + v1 script failure #69

Closed sullivan-goings closed 2 years ago

sullivan-goings commented 2 years ago

I'm losing my mind here. Zap is not fully integrating into the desktop in Mint. (inxi output) inxi -Fxz System: Kernel: 5.4.0-100-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.2.7 Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal Machine: Type: Laptop System: Insyde product: CherryTrail v: N/A serial: <filter> Mobo: Insyde model: Cherry Trail CR v: Type2 - Board Version serial: <filter> UEFI: INSYDE v: M1106.V024 date: 09/20/2016 Battery: ID-1: axp288_fuel_gauge charge: 100% condition: N/A model: N/A status: Full CPU: Topology: Quad Core model: Intel Atom x5-Z8350 bits: 64 type: MCP arch: Airmont rev: 4 L2 cache: 1024 KiB flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 11520 Speed: 480 MHz min/max: 480/1920 MHz Core speeds (MHz): 1: 480 2: 480 3: 1797 4: 1793 Graphics: Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics driver: i915 v: kernel bus ID: 00:02.0 Display: x11 server: X.Org 1.20.13 driver: modesetting unloaded: fbdev,vesa resolution: 1366x768~60Hz OpenGL: renderer: Mesa DRI Intel HD Graphics (CHV) v: 4.6 Mesa 21.2.6 direct render: Yes Audio: Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Imaging Unit driver: intel_atomisp2_pm v: kernel bus ID: 00:03.0 Sound Server: ALSA v: k5.4.0-100-generic Network: Message: No Device data found. IF-ID-1: docker0 state: down mac: <filter> IF-ID-2: wlan0 state: up mac: <filter> Drives: Local Storage: total: 57.62 GiB used: 17.95 GiB (31.1%) ID-1: /dev/mmcblk0 model: NCard size: 57.62 GiB Partition: ID-1: / size: 55.00 GiB used: 17.16 GiB (31.2%) fs: ext4 dev: /dev/dm-0 ID-2: swap-1 size: 976.0 MiB used: 802.1 MiB (82.2%) fs: swap dev: /dev/dm-1 Sensors: System Temperatures: cpu: 63.0 C mobo: N/A Fan Speeds (RPM): N/A Info: Processes: 250 Uptime: 15h 19m Memory: 1.83 GiB used: 1.01 GiB (55.3%) Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.17 inxi: 3.0.38

I decided to have a go at creating a bash script to have zap partially integrate the appimage then finish the integration including creating a .desktop to include the link with the proper icon in the menu. My issues with this with the current build are that printf and expects are not cooperating because of the interactive configuration module included with the current build (namely zap -init). I'd provide the horror show that is the autoexpects output, but it's about 20 pages worth of untranslatable symbols interspersed with the expects text and sends. Ideally, I could have fixed this with v1, however when I download the v1 AppImage according to the instructions on that branch, it fails, and when I download the branch manually, it downloads a blank appimage. I didn't notice the blank appimage until I tried using the install script to associate zap with the appimage input. Here's the associated outputs.

This can't be run sudo. It doesn't require going into root, but it fails as user (and we have to be root for the bash file), so lets try. Done: result:

--2022-02-27 08:23:26--  https://git.io/zapinit
Resolving git.io (git.io)... 52.204.242.176, 18.205.36.100, 54.162.128.250, ...
Connecting to git.io (git.io)|52.204.242.176|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/srevinsaju/zap/raw/master/tools/install.sh [following]
--2022-02-27 08:23:27--  https://github.com/srevinsaju/zap/raw/master/tools/install.sh
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-02-27 08:23:27 ERROR 404: Not Found.

Ok, well let's find a way around this then. How about we call that address manually with wget?

#wget -O /root/.zap/install_zap.sh https://github.com/srevinsaju/zap/raw/master/tools/install.sh
--2022-02-27 08:34:59--  https://github.com/srevinsaju/zap/raw/master/tools/install.sh
Resolving github.com (github.com)... 140.82.114.3
Connecting to github.com (github.com)|140.82.114.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-02-27 08:34:59 ERROR 404: Not Found.

Ok, what about the raw address you have listed? (notice it's quoted instead of marked as code, we'll get back to this)

wget -O /root/.zap/install_zap.sh https://raw.githubusercontent.com/srevinsaju/zap/master/tools/install.sh

--2022-02-27 08:35:54-- https://raw.githubusercontent.com/srevinsaju/zap/master/tools/install.sh Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.111.133, 185.199.109.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 2869 (2.8K) [text/plain] Saving to: ‘/root/.zap/install_zap.sh’

/root/.zap/install_ 100%[===================>] 2.80K --.-KB/s in 0.001s

2022-02-27 08:35:54 (3.78 MB/s) - ‘/root/.zap/install_zap.sh’ saved [2869/2869]

SUCCESS! Now let's run our install. (still as root)

#~/.zap# bash install_zap.sh
Creating /root/.zap
 Downloading the latest 🗲 Zap Release 

#zap --help

Command 'zap' not found, but can be installed with:

apt install dvb-apps        # version 1.1.1+rev1500-1.2, or
apt install libxbase64-bin  # version 3.1.2-13build1

Well that's definitely not right. Ok, let's check the bash file. Long story short, there are several issues I have. First, echo "#!/bin/bash" > "zap" resolves as an attempted bash. Usually, just to make sure, i do echo -n "#" > "zap" echo -n "!" >> "zap" echo "/bin/bash" >> "zap" . However, we aren't receiving an error, so there's something between "downloading" and echo. My guess is that missing fi on line 46 where your elif for curl starts, but let's just install manually, which I did and i get this.

#zap
#zap --help
#

repeat ad nauseam.

so, lets check out that zap appimage that got downloaded I opened the properties, it's listed as Size: 0bytes. Obviously, that's not an appimage...it's not anything really. Now back to that quote instead of code....

/root/.zap/install_ 100%[===================>] 2.80K --.-KB/s in 0.001s

I notice I got a progress bar and knew what was happening the whole time. I know you're trying to make things clean with -q --show-progress, but I feel like knowing what's going on with a script, having output for people to send, is more important. It's a personal preference, but when people tell me to re-do a command that they quieted, it really irks me. But here it is anyway.

# wget -O ~/.zap/zapv1.AppImage https://github.com/srevinsaju/zap/releases/download/continuous/zap-x86_64.AppImage
--2022-02-27 09:32:56--  https://github.com/srevinsaju/zap/releases/download/continuous/zap-x86_64.AppImage
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-02-27 09:32:57 ERROR 404: Not Found.

So, here's where I ask, please....please bring the config arguments back instead of removing them for init. I mean, init is nice, keep init, but just bring back config. In fact, there are several configuration tools that would be nice to have back, appdata, get-md5, show (maybe make the browser opening optional though). But that's not as important. My intent here is to add some compatibility with calls from a bash script so that people can work around any incompatibilities in the system. Can I just zap init before I run my bash? Of course, but then really, that's not true automation and I will spend 1000 years writing an automation script to save 5 seconds.

I hope this is ample info to solve the current issues with v1 if you're still updating there, and maybe I'll get some feature updates out of this, but either way, thanks for making zap, I just wish it worked for me.

srevinsaju commented 2 years ago

@sullivan-goings , thanks for this issue. I'm sorry zap frustrated you.

  1. Zap v1 is deprecated. I didnt understand from your issue why v2 didnt work.
  2. What do you mean by "config arguments", can you give an example? I dont know which config has been removed.
sullivan-goings commented 2 years ago
  1. Desktop integration isn't complete. I zap install xxxx.AppImage and Icons are not being shown at all even though I have custom icons set to no. I have used --appimage-extract to check the files for one, just to check my sanity, and the icon was in the files. Whether the application can be searched or not, they are not in the menu at all unless searched, and it seems to be a 50/50 shot on whether it is found when I search. The index and icons folders are being created when I run the zap commands, and they are in the proper folder, but there are no .config or .desktop files for the appimage in the appropriate directories. I KNOW some integration is happening, because the appimages are not found at all in the menu prior to running zap, but after running zap, they sometimes show up. The install directories are on path, i've also run zap sudo and root, but I'm getting no change. I'm assuming that you have compatibility with the systems that mint is built on (debian/ubuntu), but there may be some difference between them and mint that is preventing integration. I'd also like to clarify that I've installed zap on system paths, but i'm trying to install the appimages on a local user path. It's possible that system installation may have some issue? Is there a hardcoded path in zap that is causing the issue maybe? Zap completes without errors, but I am not sure that means there are actually no errors.
  2. In v1 readme you have:

config Shows the config or allows to configure the...

I haven't been able to test, but I assume you were able to configure zap piecemeal (part by part, i.e. configure just the path, or just using custom icons, etc.). If I'm incorrect, that's fine, but configuring each part individually would be really helpful. Also, if there is a configuration file that zap outputs init to that I could modify using a script, that would be fine as well. Do you have an init output file somewhere that I'm just not finding?

srevinsaju commented 2 years ago

Desktop integration isn't complete. I zap install xxxx.AppImage and Icons are not being shown at all even though I have custom icons set to no. I have used --appimage-extract to check the files for one, just to check my sanity, and the icon was in the files. Whether the application can be searched or not, they are not in the menu at all unless searched, and it seems to be a 50/50 shot on whether it is found when I search. The index and icons folders are being created when I run the zap commands, and they are in the proper folder, but there are no .config or .desktop files for the appimage in the appropriate directories. I KNOW some integration is happening, because the appimages are not found at all in the menu prior to running zap, but after running zap, they sometimes show up. The install directories are on path, i've also run zap sudo and root, but I'm getting no change. I'm assuming that you have compatibility with the systems that mint is built on (debian/ubuntu), but there may be some difference between them and mint that is preventing integration. I'd also like to clarify that I've installed zap on system paths, but i'm trying to install the appimages on a local user path. It's possible that system installation may have some issue? Is there a hardcoded path in zap that is causing the issue maybe? Zap completes without errors, but I am not sure that means there are actually no errors.

Gotcha, can you check if ~/.local/share/applications exists on your machine?

I haven't been able to test, but I assume you were able to configure zap piecemeal (part by part, i.e. configure just the path, or just using custom icons, etc.). If I'm incorrect, that's fine, but configuring each part individually would be really helpful. Also, if there is a configuration file that zap outputs init to that I could modify using a script, that would be fine as well. Do you have an init output file somewhere that I'm just not finding?

Particularly, which part of zap would you like to configure which is currently not configurable? Also, the configuration files are stored in ~/.config/zap/v2/config.ini (for v2). v1 is deprecated.

srevinsaju commented 2 years ago

Closing this as a stale issue.