LinuxQuestions.org
Help answer threads with 0 replies.
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 04-21-2021, 02:49 PM   #1
DryFalls
Member
 
Registered: Apr 2021
Posts: 44

Rep: Reputation: Disabled
pkgtools upgrade $ROOT


Greetings! I use pkgtools to build/upgrade sfs modules for another distro (a fork of puppy linux - 50M running slackware64-current). My scripts use
Quote:
ROOT=<path> upgradepkg ~/slackware/*/*.txz
The new system looks in the destination directory for system files so fails. Please forgive my ignorance, but I'm fairly new to this. My immediate solution was to retain the original upgradepkg script. But with 'slackpkg upgradeall' or slapt-get, this will break. How can I modify my build scripts to accommodate the new pkgtools upgrade? Thanks in advance.

DryFalls
 
Old 04-21-2021, 04:17 PM   #2
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 907

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Here is the recent change that was made:

https://git.slackware.nl/current/dif...c8a83be9650a6c

which leads to the solution:

First do a
Code:
# ROOT=<path> installpkg pkgtools
So that installpkg will exist at "$ROOT/sbin/installpkg" when running upgradepkg. To be honest, I'm not sure why this change was made... In my opinion, upgradepkg should find out where it is installed and use the installpkg that is installed in the same path. But I'm not Pat.
 
Old 04-22-2021, 03:57 AM   #3
DryFalls
Member
 
Registered: Apr 2021
Posts: 44

Original Poster
Rep: Reputation: Disabled
Thanks drumz. I imagine there's something in the works with slackpkg which will need the $ROOT syntax but it means it's more cumbersome to use slackware to work on other systems. There are a lot of distros which use slackware packages and slapt-get or slackpkg/pkgtools. I think I will go ahead and upgrade pkgtools and rename the previous 'upgradepkg' to something like 'upgradepkg2' in my build scripts. It seems a bit over-kill to install pkgtools into each and every sfs module I build.
 
Old 04-22-2021, 09:20 AM   #4
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 907

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Another option: I think it would be sufficient to just copy /sbin/installpkg to $ROOT/sbin/installpkg and then run upgradepkg. After you're done, delete $ROOT/sbin/installpkg. I didn't test though.

/sbin/installpkg is just a shell script that weighs in at a whopping 27KiB (27635 bytes), so this shouldn't slow down your process at all (as long as you automate it).

Edit: And yet another option: Just create a symlink:
Code:
ln -s /sbin/installpkg $ROOT/sbin/installpkg

Last edited by drumz; 04-22-2021 at 09:22 AM.
 
Old 04-22-2021, 04:20 PM   #5
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,344

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
Same problem here , i have squashfs container , respecting slackware series , like

slack_a.squashfs
slack_ap.squashfs
slack_d.squashfs


when try to upgrade the containers with

ROOT=slack_a upgradepkg new_package

Now only see errors , for me its not a solution install in all *.squashfs , cause when arrives a update for the upgradepkg file, then i need upgrade in all containers.

I thing the managing tools , ever need to be executes from the real ROOT directory , not from dirs passed to the $ROOT parameter.


And no , for me not a solution make all series in one big *.squashfs , i prefer small container separately.

Last edited by USUARIONUEVO; 04-22-2021 at 04:22 PM.
 
Old 04-22-2021, 09:55 PM   #6
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,344

Rep: Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942Reputation: 942
If some one need fix this, dowgrade to pkgtools-15.0-noarch-37 , and blacklist to avoid version 38 of this package ,is now totally break.

can download for 64bit here
https://slackware.uk/cumulative/slac...slackware64/a/

The problem , is caused because now , the script make ROOT like this

ROOT/sbin/upgradepkg or other tool from this packages

If the ROOT DESTDIR not have the tool installed (installpkg/upgradepkg) , then fails , cause executable no exists under custom dir destination.

This now breaks totally some particular usages , as a little example , livekit from eric (alienbob) , make separated squashfs container using --root argument , now all fails , cause not all squashfs have the tools installed , this force to install this package in every series , and IN OUR CUSTOM ADDONS , cause we cant do now as example a new nvidia squashed file container cause the command fails if not install pkgtools under same dir , and remove it later to clean squashfs.

Imagine we have nvidia-466.67....txz , and we try to make our addon ,

ROOT=folder-to-make-our-squash installpkg nvidia....txz -----------> fails
installpkg --root=folder-to-make-our-squash nvidia...txz ---> fails

I know , eric provide this addon , okey ..imagine try wahtever you want ... need first install pkgtools , to desired custom root dir , install our package , and later remove pkgtools from the custom dir.


pkgtools-15.0-38 is totally breaked for me.
 
Old 04-23-2021, 04:13 PM   #7
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 907

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Fixed

Code:
Fri Apr 23 19:13:09 UTC 2021
a/pkgtools-15.0-noarch-39.txz: Rebuilt.
       upgradepkg: revert change where $ROOT/sbin/installpkg is called instead of
       /sbin/installpkg. Conceptually, this seemed like a nice change (but would
       have also required removepkg to be called the same way), but it seems to
       break an established expectation that the pkgtools can be used without them
       actually being installed in $ROOT. Thanks to alienBOB.
 
  


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] slackpkg/pkgtools upgrade issue on -current HQuest Slackware 35 11-30-2019 07:22 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
[SOLVED] dialog screen mangled when running slackpkg or pkgtools as root (but not sbopkg) Paulo2 Slackware 25 04-21-2018 02:04 PM
Forgot to install pkgtools? jrbush82 Slackware 3 10-27-2004 04:31 AM
pkgtools problem??? brbrow Slackware 2 09-10-2003 01:58 PM

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

All times are GMT -5. The time now is 09:21 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