OneCDOnly / sherpa

A mini-package-manager for QNAP NAS
GNU General Public License v3.0
115 stars 13 forks source link

Sherpa no sqlite3 #274

Closed dft601 closed 1 year ago

dft601 commented 1 year ago

Hi

I am on newestet QNAP 5.1.0.2466 build 20230721

I cannot manage to get sherpa sign packages.

When installing new:

sherpa check all
sherpa 230809-stable • a mini-package-manager for QNAP NAS

• These package actions were skipped:
      "sign" sherpa
      └─ reason: sqlite3 not installed

Then I install Entware

[/] # sherpa install entware
sherpa 230809-stable • a mini-package-manager for QNAP NAS

• These package actions completed OK:
      install Entware in 16 seconds

• These package actions were skipped:
      "sign" Entware
      └─ reason: sqlite3 not installed

When I then do a sherpa check:

[/] # sherpa check
sherpa 230809-stable • a mini-package-manager for QNAP NAS

proc: installing addon IPKs .../share/CACHEDEV1_DATA/.qpkg/sherpa/cache/sherpa.manager.sh: line 5361: 1: DeDupeWords(): undefined
• These package actions were skipped:
      "sign" Entware
      └─ reason: sqlite3 not installed
      "sign" sherpa
      └─ reason: sqlite3 not installed

After Reboot, when opkg is working sherpa check does not change anything... still the same failure

How can I solve this ? Mike

OneCDOnly commented 1 year ago

Hi Mike, thanks for reporting this. 👍🏽

Hmm... let's install sqlite3 the hard way:

opkg install sqlite3-cli

... then please run another check operation:

sherpa check
dft601 commented 1 year ago

good morning,

sorry cannot copy a whole log from here with qnap Browser Station.

Installation sqlite3-cli worked.

sherpa check could sign the packages

But still the error: proc: installing addon IPKs .../share/CACHEDEV1_DATA/.qpkg/sherpa/cache/sherpa.manager.sh: line 5361: 1: DeDupeWords(): undefined

Mike

OneCDOnly commented 1 year ago

No worries Mike. Yes, I imagine whatever problem that prevented sqlite3 being installed is still present.

If you're able to help me diagnose this, please run a 'check' operation in debug mode:

sherpa check debug

... then please 'paste' the debug log online:

sherpa paste log

and copypaste the generated pastebin URL back here so I can examine your log. This will help a lot. :)

dft601 commented 1 year ago

Yes sure :-)

Copy one line is fine with the Browser Station, so I can do it from here:

log

OneCDOnly commented 1 year ago

Cheers mate, I'll do some investigating here, and hopefully figure-out what's going wrong.

I'll post back when I can. :)

OneCDOnly commented 1 year ago

OK, after reviewing your debug log (thank you) and encouraging both my remaining brain-cells to work together, it looks like Entware didn't complete its original installation correctly. :(

Can you please do this?

Reinstall Entware, and record this to the debug log:

sherpa reinstall ew debug

... then post this latest log online:

sherpa paste last

... then copypaste the new URL back here? This will allow me to see what happens during the Entware install on your NAS model.

dft601 commented 1 year ago

Yes sure...

Here is the Log

now again no signing...

`sherpa 230809-stable • a mini-package-manager for QNAP NAS

• These package actions completed OK: uninstall Entware in 6 seconds install Entware in 1 second

• These package actions were skipped: "sign" Entware └─ reason: sqlite3 not installed ` Will solve as last time, after a long reboot :-( opkg won´t work yet.. I believe after reboot

Mike

OneCDOnly commented 1 year ago

Thanks Mike. 👍🏽

Extracting the Entware installation output, we see:

   230  dbug: (LL) -----------------------------------------------------------------------------------------------------
   231  dbug: (LL) = log file: '/share/CACHEDEV1_DATA/.qpkg/sherpa/logs/Entware_1.03a_std.qpkg.install.log'
   232  dbug: (LL) = command: 'DEBUG_QPKG=true QINSTALL_PATH=/share/CACHEDEV1_DATA/.qpkg /bin/sh /share/CACHEDEV1_DATA/.qpkg/sherpa/cache/QPKGs.downloads/Entware_1.03a_std.qpkg' ! result_code: [10] ***** stdout/stderr begins below *****
   233  dbug: (LL) Install QNAP package on TS-NAS...
   234  dbug: (LL) 16+1 records in
   235  dbug: (LL) 16+1 records out
   236  dbug: (LL) 54933 bytes (53.6KB) copied, 0.000366 seconds, 143.1MB/s
   237  dbug: (LL) ./
   238  dbug: (LL) ./built_info
   239  dbug: (LL) ./qinstall.sh
   240  dbug: (LL) ./package_routines
   241  dbug: (LL) ./qpkg.cfg
   242  dbug: (LL) 1+1 records in
   243  dbug: (LL) 1+1 records out
   244  dbug: (LL) 34453 bytes (33.6KB) copied, 0.000030 seconds, 1.1GB/s
   245  dbug: (LL) 26+0 records in
   246  dbug: (LL) 26+0 records out
   247  dbug: (LL) 26624 bytes (26.0KB) copied, 0.000099 seconds, 256.5MB/s
   248  dbug: (LL) Firmware check is fine.
   249  dbug: (LL) Sym-link /opt ...
   250  dbug: (LL) Info: Opkg package manager deployment...
   251  dbug: (LL) chmod: /opt/bin/opkg: No such file or directory
   252  dbug: (LL) /opt/etc/opkg.conf: No such file or directory
   253  dbug: (LL) /opt/lib/ld-2.27.so: No such file or directory
   254  dbug: (LL) chmod: /opt/lib/ld-2.27.so: No such file or directory
   255  dbug: (LL) ln: /opt/lib/ld-linux-x86-64.so.2: No such file or directory
   256  dbug: (LL) /opt/lib/libc-2.27.so: No such file or directory
   257  dbug: (LL) ln: /opt/lib/libc.so.6: No such file or directory
   258  dbug: (LL) /opt/lib/libpthread-2.27.so: No such file or directory
   259  dbug: (LL) ln: /opt/lib/libpthread.so.0: No such file or directory
   260  dbug: (LL) /opt/lib/libgcc_s.so.1: No such file or directory
   261  dbug: (LL) Info: Basic packages installation...
   262  dbug: (LL) package_routines: line 199: /opt/bin/opkg: No such file or directory
   263  dbug: (LL) package_routines: line 200: /opt/bin/opkg: No such file or directory
   264  dbug: (LL) chmod: /opt/tmp: No such file or directory
   265  dbug: (LL) ln: /opt/etc/passwd: No such file or directory
   266  dbug: (LL) ln: /opt/etc/group: No such file or directory
   267  dbug: (LL) /bin/cp: cannot stat `/opt/etc/shells.1': No such file or directory
   268  dbug: (LL) ln: /opt/etc/shadow: No such file or directory
   269  dbug: (LL) ln: /opt/etc/localtime: No such file or directory
   270  dbug: (LL) Link service start/stop script: Entware.sh
   271  dbug: (LL) Entware.sh: no such file
   272  dbug: (LL) Installation Abort.
   273  dbug: (LL) ! ***** stdout/stderr is complete *****
   274  dbug: (LL) -----------------------------------------------------------------------------------------------------

... so something is definitely going wrong there. :(

Do you have other QPKGs installed that also use the /opt directory?

What is in /opt right now?

ll /opt/
dft601 commented 1 year ago

After "reinstall" of EW I rebootet the QNAP... because I learned that Entware won´t work without reboot.

OPKG was not working after that... seemed that after reinstall there was not entware... So I installed again with sherpa after reboot it worked... could install sqlite3-cli and sign....

Here is the opt directory

`[/] # ll /opt/ total 120K drwxr-xr-x 14 admin administrators 4.0K 2023-08-18 23:23 ./ drwxrwxrwx 35 admin administrators 4.0K 2023-08-18 23:23 ../ lrwxrwxrwx 1 admin administrators 36 2023-08-18 21:53 Apache82 -> /share/CACHEDEV1_DATA/.qpkg/Apache82/ drwxr-xr-x 2 admin administrators 4.0K 2023-08-18 21:10 bin/ lrwxrwxrwx 1 admin administrators 45 2023-08-18 21:56 ChangeDetection82 -> /share/CACHEDEV1_DATA/.qpkg/ChangeDetection82/ lrwxrwxrwx 1 admin administrators 38 2023-08-18 21:56 CloudCMD82 -> /share/CACHEDEV1_DATA/.qpkg/CloudCMD82/ drwx--s--x 4 admin administrators 4.0K 2023-08-18 20:43 containerd/ -rwxr-xr-x 1 admin administrators 1.6K 2023-08-18 20:52 Entware.sh drwxr-xr-x 4 admin administrators 4.0K 2023-08-18 20:52 etc/ lrwxrwxrwx 1 admin administrators 37 2023-08-18 21:56 Fishshell -> /share/CACHEDEV1_DATA/.qpkg/Fishshell/ lrwxrwxrwx 1 admin administrators 34 2023-08-18 21:56 HDIdle -> /share/CACHEDEV1_DATA/.qpkg/HDIdle/ drwxr-xr-x 2 admin administrators 4.0K 2023-06-01 08:31 home/ lrwxrwxrwx 1 admin administrators 32 2023-08-18 21:55 HTOP -> /share/CACHEDEV1_DATA/.qpkg/HTOP/ lrwxrwxrwx 1 admin administrators 54 2023-08-18 21:53 kata -> /share/CACHEDEV1_DATA/.qpkg/container-station/opt/kata/ drwxr-xr-x 3 admin administrators 4.0K 2023-08-18 21:10 lib/ drwxr-xr-x 2 admin administrators 4.0K 2023-08-18 20:52 libexec/ -rw-r--r-- 1 admin administrators 75 2023-08-18 20:51 .list lrwxrwxrwx 1 admin administrators 30 2023-08-18 21:55 MC -> /share/CACHEDEV1_DATA/.qpkg/MC/ lrwxrwxrwx 1 admin administrators 32 2023-08-18 21:56 Nano -> /share/CACHEDEV1_DATA/.qpkg/Nano/ -rw-r--r-- 1 admin administrators 4.5K 2023-08-18 21:03 nasconfig_fs.img.tgz -rw-r--r-- 1 admin administrators 16K 2020-10-22 18:26 .qpkg_icon_80.gif -rw-r--r-- 1 admin administrators 16K 2020-10-22 18:26 .qpkg_icon.gif -rw-r--r-- 1 admin administrators 9.1K 2020-10-22 18:29 .qpkg_icon_gray.gif drwxr-xr-x 2 admin administrators 4.0K 2023-08-18 20:52 root/ drwxr-xr-x 2 admin administrators 4.0K 2023-08-18 20:52 sbin/ drwxr-xr-x 4 admin administrators 4.0K 2023-06-01 08:31 share/ lrwxrwxrwx 1 admin administrators 34 2023-08-18 20:52 SSHWeb -> /share/CACHEDEV1_DATA/.qpkg/SSHWeb/ drwxrwxrwx 3 admin administrators 4.0K 2023-08-18 21:10 tmp/ -rwxr-xr-x 1 admin administrators 1.1K 2023-08-18 20:52 .uninstall.sh drwxr-xr-x 4 admin administrators 4.0K 2023-06-01 08:31 usr/ drwxr-xr-x 6 admin administrators 4.0K 2023-08-18 20:52 var/ [/] # [/] #

`

OneCDOnly commented 1 year ago

The number of QPKGs using /opt these days is troublesome. :(

Note: sherpa doesn't use /opt.

The primary issue is: a non-persistent /opt (such as that used in QTS), doesn't play nice with multiple packages all using /opt as a virtual install location. They're not installed in /opt, but for the sake of the application included in the QPKG, they require a path that begins with /opt so the application will run. This means QPKGs can-and-do mistakenly interact with each other. i.e. they can break each other.

This has been an issue for many years, and it seems no-one has been able to come to an agreement on the "best way" to prevent it happening. 😞

For now, I suggest simplifying by uninstalling any QPKG whose function can be replicated in another. Examples would be Midnight Commander, Gnu nano, and htop - all are available via Entware.

Also, if you're not using SortMyQPKGs, please ensure it's installed so Entware will be started before your other QPKGs during NAS bootup. This will allow Entware to "own" the /opt symlink, and then every QPKG started later will need to use the /opt environment managed by Entware.

You'll probably need to go through a systematic process of disabling all QPKGs that use /opt, except for Entware. Leave Entware until last, then uninstall it (don't just stop it). Then reboot your NAS.

When your NAS has rebooted, install Entware via sherpa, and check that it works correctly. No-need to reboot again after installing Entware, just ensure you logout-then-login your SSH session.

Once you've confirmed Entware is running as it should, then you can start each of your other QPKGs that use /opt.

OneCDOnly commented 1 year ago

@dft601 how are things looking now? Is everything working as it should?

OneCDOnly commented 1 year ago

I'll close this issue as resolved. If you're still having problems, please feel free to reopen it. 🤓

dft601 commented 1 year ago

Yes, thank you, it works now !