Pkg2: The fork of scottman's pkg

Under development: PCMCIA, wireless, etc.

Moderator: Forum moderators

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Pkg2: The fork of scottman's pkg

Post by mistfire »

This a fork of @sc0ttman 's pkg command line package manager. It works the same as the vanilla pkg but with enhancements:
* Ability to upgrade/downgrade installed packages
* Ability to rollback to builtin packages it the user was installed updated version of a package which was builtin in puppy but removed.
* Ability to remove duplicate package files and replace with symlink.
* Improved package installation and removal.
* Ability to trim package upon installation
* Highly configurable by modifying the variables inside pkg script (for advanced users only).
* OverlayFS support (starting version 2.0.7)

WARNING: Use it under your own risk.

Attachments
pkg-2.2.0.pet
* Improved package dependency resolution
* Improved package search
* Performance overhaul
* Added systemd service file translation
(143.31 KiB) Downloaded 193 times
pkg-2.1.0.pet
* Added removal of broken symlinks during package upgrade/downgrade and during package removal
(140.84 KiB) Downloaded 135 times
pkg-2.0.9.pet
* Verbose package repo update
* Configurate 0setup script and categories.dat path
(140.7 KiB) Downloaded 166 times
Last edited by mistfire on Thu Mar 30, 2023 1:38 pm, edited 19 times in total.
User avatar
rockedge
Site Admin
Posts: 6561
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2766 times
Been thanked: 2643 times
Contact:

Re: Pkg2: The fork of scottman's pkg

Post by rockedge »

@mistfire,
I'll be following this development keenly! An excellent development and I'm looking forward to putting 2.0 through a test by running my build_ZM.sh script that will perform a complete install of Zoneminder and the needed web server components on Bionic and Fossa Pup's. The script uses Pkg extensively. Will be needing opencv and beefing up python and PERL by adding modules to those using a mix of Pkg, cpanminus, cpan and pip to accomplish this and add on object/face detection recognition abilities.

Very exciting stuff and I hope after some initial testing that this will be imported into woof-CE and the next gen Puppy's.

@wiak , @fredx181 , @dimkr , @peebee , @01micko @666philb I am bringing this to your attention to get a good level of testing going and fast inclusion into the Puppy Linux systems.

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Re: Pkg2: The fork of scottman's pkg

Post by mistfire »

rockedge wrote: Mon Mar 07, 2022 2:21 pm

@mistfire,
I'll be following this development keenly! An excellent development and I'm looking forward to putting 2.0 through a test by running my build_ZM.sh script that will perform a complete install of Zoneminder and the needed web server components on Bionic and Fossa Pup's. The script uses Pkg extensively. Will be needing opencv and beefing up python and PERL by adding modules to those using a mix of Pkg, cpanminus, cpan and pip to accomplish this and add on object/face detection recognition abilities.

Very exciting stuff and I hope after some initial testing that this will be imported into woof-CE and the next gen Puppy's.

@wiak , @fredx181 , @dimkr , @peebee , @01micko @666philb I am bringing this to your attention to get a good level of testing going and fast inclusion into the Puppy Linux systems.

This fork begins with modified pkg from QuickPup64. I used it as backend for slackware package updater. I noticed that sc0ttman's pkg was a good package management tool. However the package installation and removal code was outdated compared to PPM. I tried to make a pull request, however sc0ttman went missing. So I forced to fork it. So far pkg2 works nicely for me before I deploy it here.

dimkr
Posts: 2428
Joined: Wed Dec 30, 2020 6:14 pm
Has thanked: 53 times
Been thanked: 1203 times

Re: Pkg2: The fork of scottman's pkg

Post by dimkr »

rockedge wrote: Mon Mar 07, 2022 2:21 pm

Very exciting stuff and I hope after some initial testing that this will be imported into woof-CE and the next gen Puppy's.

Once it's a git repo, it should be trivial to replace pkg with the fork.

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Re: Pkg2: The fork of scottman's pkg

Post by mistfire »

dimkr wrote: Tue Mar 08, 2022 1:07 pm
rockedge wrote: Mon Mar 07, 2022 2:21 pm

Very exciting stuff and I hope after some initial testing that this will be imported into woof-CE and the next gen Puppy's.

Once it's a git repo, it should be trivial to replace pkg with the fork.

Git repo was worked in progress.

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Re: Pkg2: The fork of scottman's pkg

Post by mistfire »

@dimkr @peebee @rockedge

pkg github repo is now online and open for pull request
https://github.com/rizalmart/Pkg2

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Re: Pkg2: The fork of scottman's pkg

Post by mistfire »

pkg2 package has been reuploaded. Now its full package set with improvements.

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Re: Pkg2: The fork of scottman's pkg

Post by mistfire »

pkg2 2.0.1 released

Changes:
* usrmerge file hierarchy support
* package removal bugfixes

Download link was on the first post of this thread

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Re: Pkg2: The fork of scottman's pkg

Post by mistfire »

pkg2 2.0.2 released

Changes:
* Fixed package download bug

Download link was on the first post of this thread

User avatar
norgo
Posts: 283
Joined: Mon Jul 13, 2020 6:39 pm
Location: Germany
Has thanked: 6 times
Been thanked: 111 times
Contact:

Re: Pkg2: The fork of scottman's pkg

Post by norgo »

@mistfire

pkg.diff.tar
remove tar fake extension
(2.34 KiB) Downloaded 165 times

thank you for your work

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Re: Pkg2: The fork of scottman's pkg

Post by mistfire »

pkg2 2.0.3 released

Changes:
* Improved system cache update
* Improved libstdc++ upgrade/downgrade
* Improved handling of pipewire

Download link was on the first post of this thread

User avatar
rockedge
Site Admin
Posts: 6561
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2766 times
Been thanked: 2643 times
Contact:

Re: Pkg2: The fork of scottman's pkg

Post by rockedge »

About to do a major script install of Zoneminder on a Fossapup64 and soon on a jammy using the pkg2 2.0.3.

Some point today I hope to do the run. At the moment building a Weedogged ClearLinux.

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Pkg2: The fork of scottman's pkg

Post by mistfire »

pkg2 2.0.4 released

Changes:
* Improved stability and bugfixes

Download link was on the first post of this thread

User avatar
rockedge
Site Admin
Posts: 6561
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2766 times
Been thanked: 2643 times
Contact:

Re: Pkg2: The fork of scottman's pkg

Post by rockedge »

An odd thing happened when using pkg repo-update with the latest Pkg2. Somehow a main component of the running web server, the php-cgi package was removed or white listed. Directly after running the repo update the web server started seemingly normally but reported Internal Server Error and would not render any php coded websites, like the Zoneminder console or Gallery 3.

Using the PPM I simply clicked on the apparently installed php-cgi package which promptly auto-installed when selected. This fixed the Internal Server Error and the Hiawatha web server parses PHP again.

The machine is running Bionic64-8 and has performed solidly for a long time. I just upgraded Pkg to the Pkg2 fork and only ran pkg repo- update.

It is unkown at this time if Pkg2 100% caused this, but is the only change made while the web server functioned smoothly and didn't directly thereafter.

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Pkg2: The fork of scottman's pkg

Post by mistfire »

pkg2 2.0.5 released

Changes:
* Some code optimization

Download link was on the first post of this thread

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Pkg2: The fork of scottman's pkg

Post by mistfire »

pkg2 2.0.6 released

Changes:
* Added package trimming capability aka "TRIM THE FAT"
Remove dev files, locale files, and docs upon installation of packages. Great for saving disk space.

To use package trimming function, there are two ways to do it:

use "--no-bloat" parameter

Code: Select all

pkg add gtk4 --no-bloat

or use NO_BLOAT environment variable (values=true|false)

Code: Select all

export NO_BLOAT="true"
pkg add gtk4

Code: Select all

NO_BLOAT="true" pkg add gtk4

Download link was on the first post of this thread

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

pkg2 2.0.7 released

Post by mistfire »

pkg2 2.0.7 released

Changes:
* OverlayFS support
* Debian package installation bugfix
* Read package metadata for alien packages. (Example: If Slackware-based puppy installed debian packages. It will just read deb package metadata as package database entry)

Download link was on the first post of this thread

Clarity
Posts: 3845
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1633 times
Been thanked: 527 times

Re: Pkg2: The fork of scottman's pkg

Post by Clarity »

Because this has widespread ability over Puppy Linux's PPM, it is hopeful that the WoofCE development team is watchful for a timing to adopt this packaging as a replacement for OLD PPM.

This embraces and overcomes past/current PPM shortcomings (agree/not ???)

Couple of forum distros are already onboard, but this needs Puppy WoofCE development evaluations.

User avatar
josejp2424
Posts: 245
Joined: Sun Jul 12, 2020 11:40 pm
Has thanked: 261 times
Been thanked: 154 times

Re: Pkg2: The fork of scottman's pkg

Post by josejp2424 »

Clarity wrote: Fri Oct 07, 2022 10:27 pm

Because this has widespread ability over Puppy Linux's PPM, it is hopeful that the WoofCE development team is watchful for a timing to adopt this packaging as a replacement for OLD PPM.

This embraces and overcomes past/current PPM shortcomings (agree/not ???)

Couple of forum distros are already onboard, but this needs Puppy WoofCE development evaluations.

I agree with what you say, PKG should replace ppm.

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

pkg2 2.0.8 released

Post by mistfire »

pkg2 2.0.8 released

Changes:
* Bugfix for zstd compressed rpm packages (requires full rpm utils)

Download was in the first post of this thread

User avatar
rockedge
Site Admin
Posts: 6561
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2766 times
Been thanked: 2643 times
Contact:

Re: Pkg2: The fork of scottman's pkg

Post by rockedge »

This might be the answer for F96 and the problems with pkg-cli!! I am going to install this in the F96_4-radky5-CE to replace the original and give it a test run. Having Pkg2 work in F96 will be the final touches before a production release..

User avatar
rockedge
Site Admin
Posts: 6561
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2766 times
Been thanked: 2643 times
Contact:

Re: Pkg2: The fork of scottman's pkg

Post by rockedge »

Pkg2 is also not seeing the Ubuntu-Focal repos and only reports tahr64,xenial, noarch, common64. So far the repo-update appears to work but it is not possible to access the majority of the Focal repos at all.

User avatar
bigpup
Moderator
Posts: 7001
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 915 times
Been thanked: 1532 times

Re: Pkg2: The fork of scottman's pkg

Post by bigpup »

Look in /root/.pkg/sources

It needs to have this in it:

Code: Select all

focal-main|deb|Packages-ubuntu-focal-main|http://archive.ubuntu.com/ubuntu/||||focal-universe noarch common64 tahr64 xenial64 focal-main focal-multiverse fossa64 
focal-multiverse|deb|Packages-ubuntu-focal-multiverse|http://archive.ubuntu.com/ubuntu/|http://mirrors.kernel.org/ubuntu/|ftp.osuosl.org/pub/ubuntu/||noarch common64 tahr64 xenial64 focal-main focal-universe
focal-universe|deb|Packages-ubuntu-focal-universe|http://archive.ubuntu.com/ubuntu/|http://mirrors.kernel.org/ubuntu/|ftp.osuosl.org/pub/ubuntu/||noarch common64 tahr64 xenial64 focal-main focal-multiverse

You probably already have this, but if not it too needs to be there:

Code: Select all

fossa64|pet|Packages-puppy-fossa64-official|http://distro.ibiblio.org/puppylinux/pet_packages-fossa64/||||noarch common64 tahr64 xenial64 focal-main focal-universe focal-multiverse

In /root/.pkg/sources-all

It needs to have this:

Code: Select all

fossa64|pet|Packages-puppy-fossa64-official|http://distro.ibiblio.org/puppylinux/pet_packages-fossa64/||||noarch common64 tahr64 xenial64 focal-main focal-universe focal-multiverse
focal-main|deb|Packages-ubuntu-focal-main|http://archive.ubuntu.com/ubuntu/|http://mirrors.kernel.org/ubuntu/|ftp.osuosl.org/pub/ubuntu/||noarch common64 tahr64 xenial64 focal-universe focal-multiverse
focal-universe|deb|Packages-ubuntu-focal-universe|http://archive.ubuntu.com/ubuntu/|http://mirrors.kernel.org/ubuntu/|ftp.osuosl.org/pub/ubuntu/||noarch common64 tahr64 xenial64 focal-main focal-multiverse
focal-multiverse|deb|Packages-ubuntu-focal-multiverse|http://archive.ubuntu.com/ubuntu/|http://mirrors.kernel.org/ubuntu/|ftp.osuosl.org/pub/ubuntu/||noarch common64 tahr64 xenial64 focal-main focal-universe[/codee]

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Re: Pkg2: The fork of scottman's pkg

Post by mistfire »

I noticed that sc0ttman's pkg was depended on PPM's 0setup script as well as conversion utils. I was thinking of including 0setup script at PPM utils on pkg2 to make it fully independent from PPM

User avatar
rockedge
Site Admin
Posts: 6561
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2766 times
Been thanked: 2643 times
Contact:

Re: Pkg2: The fork of scottman's pkg

Post by rockedge »

@bigpup Yes that's it. All of the strings were missing. Now Pkg2 is working.

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

pkg2 2.0.9 released

Post by mistfire »

pkg2 2.0.9 released

Changes:
* Verbose package repo update
* Configurable 0setup script path and categories.dat path

Download was in the first post of this thread

User avatar
josejp2424
Posts: 245
Joined: Sun Jul 12, 2020 11:40 pm
Has thanked: 261 times
Been thanked: 154 times

Re: Pkg2: The fork of scottman's pkg

Post by josejp2424 »

hi @mistfire .

I am trying to make it work in Archpup
but something must be wrong, add the repo.
I updated them and everything is fine but when it comes to install it doesn't find them.
Do you have any suggestions?.
I leave you the list of repo I use.

pkgrc.tar.gz
remove tar.gz
(415 Bytes) Downloaded 118 times
sources.tar.gz
remove tar.gz
(337 Bytes) Downloaded 128 times
mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Re: Pkg2: The fork of scottman's pkg

Post by mistfire »

josejp2424 wrote: Mon Feb 06, 2023 2:05 pm

hi @mistfire .

I am trying to make it work in Archpup
but something must be wrong, add the repo.
I updated them and everything is fine but when it comes to install it doesn't find them.
Do you have any suggestions?.
I leave you the list of repo I use.pkgrc.tar.gzsources.tar.gz

@josejp2424

What are steps did you make it. In order to recreate it on ArchPup?

I have a tip for you. Since ArchPup was a rolling release. I suggest that the puppy core files must be isolated to a separate folder in order to avoid override and can cause breakage. And you must configure pkg2 to use static binaries in order to survive system breakage. Even the system breaks pkg2 still works. You can check my QuickPup for more details. Also QuickPup has a single script (update-builtin-packages) which can upgrade the main puppy sfs builtin packages as long as compatible package. Which ease the creation of ArchPup rather than rebuild it from woof. Just run it under chroot. You may port it to ArchPup since that package was for slackware packages only

mistfire
Posts: 718
Joined: Thu Jul 16, 2020 2:16 am
Location: CALABARZON, PH
Has thanked: 3 times
Been thanked: 173 times

Re: Pkg2: The fork of scottman's pkg

Post by mistfire »

@josejp2424

Posting this entry from ArchPup

I finally found the problem

It seems you forgot to add this entry to /root/.pkg/sources thats why pkg2 unable to find the packages. You must include it on main puppy sfs as soon as possible

Code: Select all

archlinux-64-core|pkg.tar.zst|Packages-arch-64-core|http://distro.ibiblio.org/archlinux/|||| 
archlinux-64-extra|pkg.tar.zst|Packages-arch-64-extra|http://distro.ibiblio.org/archlinux/|||| 
archlinux-64-community|pkg.tar.zst|Packages-arch-64-community|http://distro.ibiblio.org/archlinux/|||| 
User avatar
josejp2424
Posts: 245
Joined: Sun Jul 12, 2020 11:40 pm
Has thanked: 261 times
Been thanked: 154 times

Re: Pkg2: The fork of scottman's pkg

Post by josejp2424 »

mistfire wrote: Tue Feb 07, 2023 12:21 am

@josejp2424

Posting this entry from ArchPup

I finally found the problem

It seems you forgot to add this entry to /root/.pkg/sources thats why pkg2 unable to find the packages. You must include it on main puppy sfs as soon as possible

Code: Select all

archlinux-64-core|pkg.tar.zst|Packages-arch-64-core|http://distro.ibiblio.org/archlinux/|||| 
archlinux-64-extra|pkg.tar.zst|Packages-arch-64-extra|http://distro.ibiblio.org/archlinux/|||| 
archlinux-64-community|pkg.tar.zst|Packages-arch-64-community|http://distro.ibiblio.org/archlinux/|||| 

thanks @mistfire now it works for me.

Post Reply

Return to “Cutting Edge”