LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-01-2021, 11:03 AM   #1
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Lightbulb Alternative update approach to slackpkg - request for testing/feedback


I've been revising/polishing a couple of scripts I use to keep my slackware system updated and I think they're about ready for a wider audience now.

The README pretty much explains what and how they work, so I'll not repeat it here, but to pique folks' interest, they
  • are non-interactive.
  • do not use/store any metadata or database, outside of those pkgtools already use.
  • support multiple package sources, specified via a simple config file: which is just an ordered list of directories/URLS.
  • support local and remote package sources, which may be mixed.
  • will gpg verify if requested.
  • has a blacklist feature
  • has a per-package post-install-script feature.

So, if any of that sounds appealing then please point your browsers at my github repo and see if you want to give them a try.

I'm open to questions if anyone has any, and feedback is welcome.

Cheers.
 
Old 10-02-2021, 04:56 AM   #2
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,360

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Hi GazL,

I just tried (just slackscan for now)

my feedbacks:

- eventually, to put also a blacklist for slackscan

It could be interesting :

- to put /var/lib/slackpkg by default in the conf
- and to automatically retrieve the uncommented mirror in /etc/slackpkg/mirrors
this way, even with an unmodified configuration file, the slackscan would work

- to display the package names (with a special mention) instead of "not available", even if they are external slackbuilds

Last edited by marav; 10-02-2021 at 06:24 AM.
 
1 members found this post helpful.
Old 10-02-2021, 08:22 AM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Original Poster
Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Thanks for taking the time to have a look and to comment.

Quote:
Originally Posted by marav View Post
- eventually, to put also a blacklist for slackscan
I intentionally kept slackscan light on features as per the UNIX philosophy:
  • Write programs that do one thing and do it well.
  • Write programs to work together.
  • Write programs to handle text streams, because that is a universal interface.

slackscan's "one thing" is to look what package files are available in its configured locations and then generate lists of packages to be added, updated or removed.

If you want to do a blacklisting then 'grep -v' will serve nicely.
For example, if I wanted to update/install everything except stuff in a blacklist and remove any removed files except stuff from SBo, then I could:
Code:
slackscan -i in.list -u up.list -r rm.list
grep -v -f blacklist.file in.list up.list | xargs -r upgradepkg --install-new
grep -v '_SBo$' rm.list | xargs -r removepkg
This is pretty much the same as an update, install-new, upgrade-all, clean-system run in slackpkg.

The above is pretty much what early versions of my 'slackup' script did before I expanded its feature set and made it output a command stream instead. Doing the above is likely a little unwieldy for the average user, which is why I wrote slackup with all those nice features like blacklists and filtering. all behind a more accessible command-line interface.

Quote:
Originally Posted by marav View Post
It could be interesting :

- to put /var/lib/slackpkg by default in the conf
- and to automatically retrieve the uncommented mirror in /etc/slackpkg/mirrors
this way, even with an unmodified configuration file, the slackscan would work
Actually, slackscan might make a better back-end for slackpkg than the other way around.


Quote:
Originally Posted by marav View Post
- to display the package names (with a special mention) instead of "not available", even if they are external slackbuilds
I'm not really sure what you mean here. The "not-available" stuff you see mentioned within the script itself is just used internally, the user will never see that. slackscan will output a list of packages whose package files have been removed to the file specified by the -r option.

For example, if I temporarily remove my hw-accel/ dir from my package locations to simulate some removals, it will look like this:
Code:
$ /usr/sbin/slackscan -r -
intel-gmmlib-19.2.3-x86_64-1_local
intel-media-driver-19.2.1-x86_64-1_local
libvdpau-va-gl-0.4.2-x86_64-2_local
$
 
Old 10-02-2021, 08:47 AM   #4
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,360

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Quote:
Originally Posted by GazL View Post
I'm not really sure what you mean here. The "not-available" stuff you see mentioned within the script itself is just used internally, the user will never see that. slackscan will output a list of packages whose package files have been removed to the file specified by the -r option.

For example, if I temporarily remove my hw-accel/ dir from my package locations to simulate some removals, it will look like this:
Code:
$ /usr/sbin/slackscan -r -
intel-gmmlib-19.2.3-x86_64-1_local
intel-media-driver-19.2.1-x86_64-1_local
libvdpau-va-gl-0.4.2-x86_64-2_local
$
Code:
blackstar ~ # slackscan -i -
not-available
not-available
not-available
not-available
https://slackware.nl/people/alien/sbrepos/current/x86_64/BeautifulSoup/BeautifulSoup-4.1.1-x86_64-1alien.tgz
https://slackware.nl/people/alien/sbrepos/current/x86_64/FAudio/FAudio-20.09-x86_64-1alien.tgz
http://local-mirror/slackware/slackware64-current/slackware64/xfce/Greybird-3.22.15-noarch-1.txz
....
After commenting
Code:
#    | join -a 1 -e 'not-installed' -o 1.1,2.2 - /dev/fd/$installed \
#    | join -a 1 -e 'not-available' -o 1.1,1.2,2.2,2.3 - /dev/fd/$available \
Code:
/var/lib/pkgtools/packages/cnijfilter2-5.90-1.x86_64
/var/lib/pkgtools/packages/duplicati-2.0.6.100-2.0.6.100_canary_20210811.noarch
/var/lib/pkgtools/packages/scangearmp2-3.90-1.x86_64
/var/lib/pkgtools/packages/swapinzram-1.1-noarch-Slackware
BeautifulSoup
Cython
FAudio
GConf
Greybird
...

Last edited by marav; 10-02-2021 at 08:49 AM.
 
Old 10-02-2021, 08:59 AM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Original Poster
Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
You can't just comment out those joins like that, they're essential for the way slackscan works and it will corrupt slackscan's internal database table.

Are you saying that happened before you commented out those joins?
If so, that shouldn't happen. Please can you post your default.conf so I can try and debug. Also what $LANG are you running.
 
Old 10-02-2021, 09:05 AM   #6
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,360

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Quote:
Originally Posted by GazL View Post

Are you saying that happened before you commented out those joins?
If so, that shouldn't happen. Please can you post your default.conf so I can try and debug. Also what $LANG are you running.
Yep

This one :
Code:
blackstar ~ # slackscan -i -
not-available
not-available
not-available
not-available
...
Code:
blackstar :: ~ » echo $LANG
fr_FR.UTF-8
Code:
blackstar ~ # sed -e /^$/d -e /^#/d /etc/slackscan/default.conf
/var/lib/slackpkg
http://local-mirror/slackware/slackware64-current/CHECKSUMS.md5
blackstar ~ #
Attached Files
File Type: txt default.conf.txt (1.4 KB, 11 views)

Last edited by marav; 10-02-2021 at 09:10 AM.
 
Old 10-02-2021, 09:07 AM   #7
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Original Poster
Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Please post your /etc/slackscan/default.conf for me.

edit: thanks I'll take a look.

Last edited by GazL; 10-02-2021 at 09:12 AM.
 
Old 10-02-2021, 09:26 AM   #8
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Original Poster
Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
If you remove /var/lib/slackpkg do you still get those lines?

Obviously I can't see your local mirror from here, but I tried with
Code:
/var/lib/slackpkg
http://slackware.uk/slackware/slackware64-current/CHECKSUMS.md5
and everything looks fine here, but my /var/lib/slackpkg is empty. What is in there on your system?
 
Old 10-02-2021, 09:30 AM   #9
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,360

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Code:
blackstar ~ # ls /var/lib/slackpkg 
ChangeLogs     CHECKSUMS.md5.asc  SLACKPKGPLUS_alienbob-filelist.gz      current            pasture-filelist.gz  slackware64-filelist.gz
gpg            ChangeLog.txt      SLACKPKGPLUS_slackers-filelist.gz      extra-filelist.gz  patches-filelist.gz  testing-filelist.gz
CHECKSUMS.md5  PACKAGES.TXT       SLACKPKGPLUS_slackpkgplus-filelist.gz  install.log        pkglist
same as above without :
/var/lib/slackpkg in default.conf
Code:
blackstar ~ # sed -e /^$/d -e /^#/d /etc/slackscan/default.conf
http://local-mirror/slackware/slackware64-current/CHECKSUMS.md5
blackstar ~ # slackscan -i -                           
not-available
not-available
not-available
not-available
http://local-mirror/slackware/slackware64-current/slackware64/xfce/Greybird-3.22.15-noarch-1.txz
http://local-mirror/slackware/slackware64-current/slackware64/xap/MPlayer-20210418-x86_64-1.txz
...

Last edited by marav; 10-02-2021 at 09:54 AM.
 
Old 10-02-2021, 09:48 AM   #10
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Original Poster
Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
One thing I can tighten up on is that I've not done anything to detect malformed package names. That could potentially be causing issues.

I'll add some code to make that more robust.
 
Old 10-02-2021, 10:37 AM   #11
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,360

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Quote:
Originally Posted by GazL View Post
One thing I can tighten up on is that I've not done anything to detect malformed package names. That could potentially be causing issues.

I'll add some code to make that more robust.
Let me know when you commit
I will test it again

Last edited by marav; 10-02-2021 at 10:38 AM.
 
Old 10-02-2021, 10:49 AM   #12
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Original Poster
Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Thanks marav. Just pushed to github.
 
Old 10-02-2021, 11:18 AM   #13
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,360

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Quote:
Originally Posted by GazL View Post
Thanks marav. Just pushed to github.


Code:
blackstar ~ # slackscan -i -
http://local-mirror/slackware/slackware64-current/slackware64/xfce/Greybird-3.22.15-noarch-1.txz
http://local-mirror/slackware/slackware64-current/slackware64/xap/MPlayer-20210418-x86_64-1.txz
http://local-mirror/slackware/slackware64-current/slackware64/xap/NetworkManager-openvpn-1.8.16-x86_64-1.txz
http://local-mirror/slackware/slackware64-current/pasture/apmd-3.2.2-x86_64-3.txz
...
 
1 members found this post helpful.
Old 10-02-2021, 12:22 PM   #14
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Original Poster
Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Excellent. Thank you for helping to test.

I've tightened up the regex matching even further and tagged it as release 2.3.
 
Old 10-02-2021, 12:42 PM   #15
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,360

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
Quote:
Originally Posted by GazL View Post
Excellent. Thank you for helping to test.

I've tightened up the regex matching even further and tagged it as release 2.3.
It's not a big deal,
but a small summary at the end of the list, for each, like :

XXX pkgs can be { installed / removed / upgraded }

could be nice

Last edited by marav; 10-02-2021 at 12:43 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I have run slackpkg update gpg instead of slackpkg update amikoyan Slackware 13 08-15-2021 02:12 AM
SARPI on Pi3 - Ran slackpkg update & slackpkg upgrade-all and now won't boot, can't find init petejc Slackware - ARM 11 03-25-2020 04:30 AM
[SOLVED] Slackpkg upgrade-all returns 'no packages to upgrade' after slackpkg-update has downloaded files san2ban Slackware 8 11-01-2019 05:44 AM
[SOLVED] [ENCHANCEMENT] slackpkg+: do not show the notices "pkglist is older than 24h..." and "remember to re-run 'slackpkg update''..."... yars Slackware 1 01-09-2016 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration