LinuxQuestions.org
Review your favorite Linux distribution.
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 02-12-2021, 09:37 PM   #1
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
new pkgtool location /var/lib/pkgtools for inxi -r slackware


I've been tying up some loose ends etc and just learned that slackware 15 is going to move its package location from /var/log/packages to /var/lib/pkgtools

Can someone confirm or deny that the new location will function the same, that is, that directory will contain the installed package files? Currently inxi just reads /var/log/packages and counts up what it found inside to complete the pkgtool: counts for -I line, or -r line. In other words, is this simply a move of the location of the main package info directory and no other changes?

I have this coded out in pinxi already, but just wanted to confirm that this assumption is correct.
 
Old 02-12-2021, 10:32 PM   #2
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,344

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Quote:
Originally Posted by h2-1 View Post
I've been tying up some loose ends etc and just learned that slackware 15 is going to move its package location from /var/log/packages to /var/lib/pkgtools

Can someone confirm or deny that the new location will function the same, that is, that directory will contain the installed package files? Currently inxi just reads /var/log/packages and counts up what it found inside to complete the pkgtool: counts for -I line, or -r line. In other words, is this simply a move of the location of the main package info directory and no other changes?

I have this coded out in pinxi already, but just wanted to confirm that this assumption is correct.
/var/log/packages is now a symlink to new location. /var/lib/....
 
Old 02-13-2021, 04:45 AM   #3
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,979

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
Code:
Tue Jun 19 22:35:25 UTC 2018
testing/packages/pkgtools-15.0-noarch-20.txz: Rebuilt.
       This update is a bit scarier than usual, so we're going to test it here
       first and then move it into the main tree in a couple of days if there
       are no serious bug reports. It's well-tested here, and works with the
       slackpkg that's in -current now, but I don't know about slackpkg+ so that's
       another reason to let it cool down here first. The purpose of this update
       is to migrate the package database and directories from /var/log to
       /var/lib/pkgtools. /var/log was never a good place for this data, as it is
       considered by many to be a directory that could be wiped to free up some
       space. Originally the package database was in /var/adm, but the FSSTND
       (later FHS) group decided that directory should be a symlink to /var/log,
       and I went along with that since it was years ago and I was a n00b and didn't
       know any better. /var/lib/pkgtools will be a better and safer location.
       The removed_packages and removed_scripts directories are really just logs
       that aren't actually used for anything - those will remain under /var/log,
       but moved into /var/log/pkgtools. Everything under /var/log will be
       considered potentially non-permanent by the pkgtools - if any directories or
       symlinks disappear from there, the pkgtools will automatically recreate them
       as needed. In fact, the migration process will create symlinks from all the
       old directory locations to the new ones, so anything that expects the old
       locations (including slackpkg, for now) should continue to work. Once this
       moves into the main tree, the plan is to fix other packages to use the new
       installer script directory (/var/lib/pkgtools/setup) and change the installer
       and slackpkg to use the new native locations for everything. When slackpkg
       is changed over to use the new native locations, I'll also make sure to float
       that in testing/ for a few days before moving it to the main tree to avoid
       more unintentional disruption to slackpkg+ users.
       Be aware that the package database migration is a one-way operation, but even
       so if you later downgrade to an older version of the pkgtools it will still
       work through the compatibility symlinks.
Code:
Thu Jun 21 22:58:42 UTC 2018
a/pkgtools-15.0-noarch-20.txz: Rebuilt.
       Move pkgtools database to /var/lib/pkgtools/.
       Move removed logs to /var/log/pkgtools/.

Last edited by chrisretusn; 02-13-2021 at 04:47 AM. Reason: Forgot the dates
 
3 members found this post helpful.
Old 02-13-2021, 12:45 PM   #4
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Oh, if /var/log/packages is now symbolic link to /var/lib/pkgtools inxi doesn't have to change anything, which is even better. Thanks for confirming. However, it sounds like they may get rid of the sym links once everything is solid, so probably best to use my fix anyway, which is, test for /var/lib/pkgtools directory, if exists, use it instead of legacy /var/log/packages, otherwise don't.

Last edited by h2-1; 02-13-2021 at 01:03 PM.
 
1 members found this post helpful.
Old 02-14-2021, 02:58 AM   #5
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,979

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
I'd say that is a good plan. I've even changed my habit of typing /var/log/packages to /lib/var/pkgtools/packages.
 
Old 02-17-2021, 01:58 PM   #6
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Quote:
Originally Posted by chrisretusn View Post
I'd say that is a good plan. I've even changed my habit of typing /var/log/packages to /lib/var/pkgtools/packages.
/lib/var/pkgtools/packages << is that a typo? for /var/lib/pkgtools/

is there a packages subdirectory in /var/lib/pgktools?

The goal is basically for: ls /var/lib/pgktools/

to result in the list of installed packages.
 
Old 02-17-2021, 02:03 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,065

Rep: Reputation: Disabled
Code:
root[/]# tree -d /var/lib/pkgtools/
/var/lib/pkgtools/
├── douninst.sh
├── packages
├── removed_packages -> ../../log/pkgtools/removed_packages
├── removed_scripts -> ../../log/pkgtools/removed_scripts
├── scripts
└── setup
    └── tmp

7 directories
root[/]#
So now: ls /var/lib/pkgtools/packages

Last edited by Didier Spaier; 02-17-2021 at 02:06 PM.
 
Old 02-17-2021, 02:28 PM   #8
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Ah, I'm glad I asked, so the public messages about this change are actually not right I believe. I was wondering why all the packages were being tossed directly into pkgtools/ and not into a sub directory. Thanks for following up.

These changes are in pinxi now if you want to test that it's working as expected. (wget -O pinxi smxi.org/pinxi && chmod +x pinxi && pinxi -ra :: or: pinxi -U if pinxi is already installed)

Last edited by h2-1; 02-17-2021 at 02:33 PM.
 
Old 02-17-2021, 07:58 PM   #9
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,979

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
Quote:
Originally Posted by h2-1 View Post
Ah, I'm glad I asked, so the public messages about this change are actually not right I believe. I was wondering why all the packages were being tossed directly into pkgtools/ and not into a sub directory. Thanks for following up.
Guess depends on how you read it. Prior to this update, there was no /var/lib/pkgtools/ directory. "The purpose of this update is to migrate the package database and directories from /var/log to /var/lib/pkgtools." The database being the /var/log/ subdirectoies packages/, removed_packages/, removed_scripts/, scripts/ and setup/. The migration created a /var/lib/pkgtools/ and /var/log/pkgtools/ directories. The packages/, scripts/ and setup/ directories in /var/log/ were moved to /var/lib/pkgtools/. The removed_packages/ and removed_scripts/ directories were moved to /var/log/pkgtools/. Symlinks were added to maintain compatibility in the event of downgrading to an older version of pkgtools.

Quote:
These changes are in pinxi now if you want to test that it's working as expected. (wget -O pinxi smxi.org/pinxi && chmod +x pinxi && pinxi -ra :: or: pinxi -U if pinxi is already installed)
Code:
pinxi -ra
Repos:     Packages: pkgtool: 1905 lib: 329 rpm: 0 
           slackpkg repos in: /etc/slackpkg/mirrors 
           1: file://home/slackware/slackware64-current/
           slackpkg+ repos in: /etc/slackpkg/slackpkgplus.conf 
           1: slackpkgplus ~ http://slakfinder.org/slackpkg+dev/
           2: nonslack ~ file://home/non-slack/slackbuilds/
           3: multilib ~ file://home/non-slack/multilib/current/
           4: alienbob ~ file://home/non-slack/alienbob/current/x86_64/
           5: restricted ~ file://home/non-slack/alienbob_restricted/current/x86_64/
           6: slackpkgbeta ~ httpsdir://slackpkg.org/beta/
Looks good! , same as inxi; which I presume is using the symlinks.
 
1 members found this post helpful.
Old 02-18-2021, 12:10 AM   #10
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
inxi should work since the symbolic links are in place and would give the same end result while they remain there, but I like to be ahead of the game so if they go away, next inxi will still work fine for slackware.

I just need to tweak the testing a bit more so it's not as hackish, but won't impact the outcomes.

thanks for confirming.
 
  


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
Testersfeedback for new pinxi/inxi feature -E/--bluetooth h2-1 Slackware 2 01-29-2021 06:53 PM
Huge inxi/pinxi upgrade, new features, Logical volumes, raid rewrite, beta testers? h2-1 Slackware 12 12-17-2020 05:04 PM
[SOLVED] /var/log/pkgtools usage logic on -current and stable abga Slackware 5 08-24-2019 05:21 PM
Curious: pkgtools Directories and SymlLnks with pkgtools-15.0-noarch-20.txz on Thu Jun 21 22:58:42 UTC 2018 kjhambrick Slackware 4 06-23-2018 01:16 AM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-28-2004 11:33 PM

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

All times are GMT -5. The time now is 10:30 AM.

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