Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 10 Dec 2018, 15:59
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Pkg - CLI package manager
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 4 of 5 [70 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
sc0ttman


Joined: 16 Sep 2009
Posts: 2620
Location: UK

PostPosted: Sun 11 Nov 2018, 19:51    Post subject: at last...  

Sorry ... I dont know anything about Compiz... You could post in the Users (for the regulars) section ...


-------------------

Somewhat related to the above post about working with local files..

I have finally fixed TAB completion for local files and dirs in the latest Pkg Very Happy Cool

Code:
pkg <command> ./path/to/local/file

and

Code:
pkg <command> ../path/to/local/file


Basically, whenever working with local files, Pkg TAB completion will work much better.. especially if you start with ./ or ../ when TABbing to complete dirs & files Very Happy

This makes Pkg much nicer to work with when checking, converting, installing (etc) local files - cos you can complete long pkg names and traverse long dir names so much easier (just hit TAB)..

------------

Pkg still keeps it's custom, context-sensitive TAB completion too...

Example, if you type

Code:
pkg repo-list [TAB]

you will get a list of all repos auto completed (not local files and dirs)..

And if you do

Code:
pkg uninstall [TAB]

you will get a list of all installed packages (not local files or dirs)

And if you do

Code:
pkg add gimp[TAB]

you will get available gimp packages listed from your repos

...etc..


As far as I am aware, there are not many (if any) other package managers out there with this cool, context-sensitive TAB completion - Pkg can now auto-complete files & dirs properly (like most commands), but also (auto filtered) package names, repo names, build scripts, as well as its own commands & options, and more.

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search

Last edited by sc0ttman on Sun 18 Nov 2018, 12:15; edited 1 time in total
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2620
Location: UK

PostPosted: Sun 18 Nov 2018, 10:46    Post subject: Pkg to 1.9.22  

I've updated Pkg to 1.9.22

I have also added an updated PET to the first post for easier download/install:

Download link:
http://www.murga-linux.com/puppy/viewtopic.php?mode=attach&id=120124

Pkg is in a pretty good place at the moment, hence the versioned release...

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 11367
Location: S.C. USA

PostPosted: Wed 21 Nov 2018, 12:11    Post subject:  

Any way to get the GUI to startup in a bigger window so the description is visible?

looking like this:
capture20272.jpg
 Description   Make it start like this
 Filesize   52.11 KB
 Viewed   505 Time(s)

capture20272.jpg

capture20968.png
 Description   As it now starts
 Filesize   47.85 KB
 Viewed   507 Time(s)

capture20968.png


_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2620
Location: UK

PostPosted: Sun 25 Nov 2018, 12:54    Post subject:  

You could update your JWM settings in ~/.jwm/jwmrc-personal to fix the dimensions.

Or hack /usr/sbin/gpkgdialog (look for a line that has gtkdialog in it, around there somewhere, adjust the height="" and width="" bits)

----------------------

I've done some updates and fixes for Pkg since releasing the 1.9.22 PET ..
(available on Gitlab)

I've done some fixes for the commands:

Code:
pkg sfs-combine <pkg-name>

Code:
pkg pkg-combine <pkg-name>


The fixes, some of which only affect .deb based Pups, include:

- fix handling of libs: respect /usr/lib/i386-linux-gnu symlinks (also i486/i586/i686 and amd64)
- fixes failure to handle package names with various suffixes
- fixes failure to sometimes find the right file
- fix - delete downloaded packages once they're no longer needed
- fixes in creation of a single, combined pinstall.sh file
- fixes in output messages (removed outdated commands, and more)
- fixes in `pkg install <sfs-file>` and `pkg uninstall <sfs-file>`


So now, the following work fine for me on Puppy Stretch 7.5 (based on Debian):

Code:
pkg sfs-combine gimp

Code:
pkg sfs-combine kodi

.. the 2 commands above should now produce working SFS files of the Gimp and Kodi on any .deb based Puppies Smile

Also, the following commmands should now work OK for loading/unloading SFS files:

Code:
pkg install /path/to/some.sfs

Code:
pkg uninstall /path/to/some.sfs

(Pkg will detect they are SFS files and (un)mount them as needed... So now Pkg is a bit better at handling SFS files as native packages Wink )


If the SFS files you created are in ~/pkg/ (the default Pkg work dir), then, even simpler, you can just do this:

Code:
pkg install <package-name>

Code:
pkg uninstall <package-name>

For example:
Code:
pkg install gimp

(will install the GIMP SFS package, if it's found in ~/pkg/)

...Also, I updated command_not_handle.sh to show local packages too..

So when you run a command that is not found, you will see something like this - with matching local packages now suggested too:

Code:
# kodi
The 'kodi' command might be available in the following packages:

kodi_17.1+dfsg1-3

You can install it with the following command:
  pkg add kodi

These local packages may also be a match:

  kodi_17.1+dfsg1-3-WITHDEPS_stretch_7.5.sfs


(I tested the above stuff by building Blender, Gimp, OpenArena, Nexuiz and Kodi SFS files, all of which ran OK after install after these fixes Smile )

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search

Last edited by sc0ttman on Mon 03 Dec 2018, 20:42; edited 2 times in total
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2620
Location: UK

PostPosted: Tue 27 Nov 2018, 19:01    Post subject: new commands: add-repo, rm-repo  

I've added two new, pretty cool commands:

pkg add-repo - add a third-party Ubuntu, Debian or Slackware repo

pkg rm-repo - remove/uninstall any user-added repo

... now adding more repos to your Puppy will be easier than ever!

Now available in the latest Pkg Smile


Adding a repo:

Code:
pkg add-repo <repo-name|repo-url> [distro] [distro-version] [repo-stream(s)]
...to see more help and info, just type:

Code:
pkg add-repo
or
Code:
pkg usage add-repo


You will get:

Code:
# pkg usage add-repo

Usage: pkg add-repo <repo-name|repo-url> [distro] [distro-version] [repo-stream(s)]

Creates a Puppy-compatible repo file from a third-party PPA (Ubuntu), Debian or Slackware repo.

** For Launchpad PPA or Ubuntu third-party repos:

  pkg add-repo ppa:<user>/<repo> [debian|ubuntu] [bionic|stretch|artful|etc] [main,all,contrib,non-free,etc]

Examples:

  pkg add-repo ppa:team-xbmc/ppa
  pkg add-repo ppa:team-xbmc/ppa ubuntu bionic
  pkg add-repo ppa:team-xbmc/ppa ubuntu artful
  pkg add-repo ppa:team-xbmc/ppa debian stretch

** For third-party Debian repos:

  pkg add-repo http://site.com/[debian|ubuntu]/ [stretch|bionic|etc] [main,contrib,non-free,etc]

Examples:

  pkg add-repo http://rpms.litespeedtech.com/debian/
  pkg add-repo http://rpms.litespeedtech.com/debian/ stretch main
  pkg add-repo http://repo.steampowered.com/steam/ precise steam
  pkg add-repo http://http.kali.org/kali/ kali-bleeding-edge main contrib non-free

NOTE: Any ommitted distro names, distro versions or repo streams will be guessed.

** For third-party Slackware repos:

  pkg add-repo <repo-url>

Examples:

  pkg add-repo https://rlworkman.net/pkgs/14.2/PACKAGES.TXT.gz
  pkg add-repo https://packages.slackonly.com/pub/packages/14.2-x86/PACKAGES.TXT.gz

NOTE: Slackware repos must end with PACKAGES.TXT or PACKAGES.TXT.gz


EDIT [29th Nov]: bugfixed the above commands, and the installer - which will no longer remove any repos you added yourself upon (re)installation..

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2620
Location: UK

PostPosted: Sat 01 Dec 2018, 13:38    Post subject:  

I know there doesn't seem to be much interest in Pkg, so it's unlikely anyone will wanna help out with it, but here are a few features I wanna add (just FYI):

New syntax for combining packages: pkg combine <pkgname> --sfs|--pet|--deb|--txz|--tgz
(https://gitlab.com/sc0ttj/Pkg/issues/22)

Plugin system:
(https://gitlab.com/sc0ttj/Pkg/issues/13)

If there are any other things people want or need from Pkg, let me know..

If you wanna help out with Pkg, making it more 'woof2' compatible would be nice...
The end goal being that Pkg can help woof build no X puppies.. or be integrated into woof2.. or used as remaster tool..

At some point I plan to make a remaster tool using Pkg, maybe called woofy2, but I'm not sure Pkg
is there yet - it needs to be able to remove built-in packages.. maybe other stuff too..

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search

Last edited by sc0ttman on Sun 02 Dec 2018, 15:06; edited 1 time in total
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2620
Location: UK

PostPosted: Sun 02 Dec 2018, 11:38    Post subject:  

As per above... Added a new command:

Code:
pkg split /path/to/package/file

This will split the given package file into separate DEV, DOC, and NLS packages.

The generated packages will be of the same file type as the original - .pet, .sfs, .txz, etc ... (not yet including .deb).

The naming conventions of the new packages will (hopefully) correctly match the package file type (package names will
get either _DEV or -dev, depending on if the package being split is a .sfs, .deb, .txz, .pet, etc)

Example:

1. I created a PET of GIMP with all deps included, using `pkg pkg-combine gimp` ..
2. Then I split the PET into separate DEV, DOC and NLS packages like so:

Code:
pkg split ./gimp_2.8.18-1+deb9u1-WITHDEPS_stretch.pet

Success: Package split into these new files:
 gimp_2.8.18-1+deb9u1-WITHDEPS_stretch.pet
 gimp-dev_2.8.18-1+deb9u1-WITHDEPS_stretch.pet
 gimp-doc_2.8.18-1+deb9u1-WITHDEPS_stretch.pet
 gimp-nls_2.8.18-1+deb9u1-WITHDEPS_stretch.pet


Another example, using SFS files:

Code:
# pkg split ~/pkg/blender_2.79.b+dfsg0-1-WITHDEPS_stretch_7.5.sfs

Success: Package split into these new files:
 blender_2.79.b+dfsg0-1-WITHDEPS_stretch_7.5.sfs
 blender_DEV_2.79.b+dfsg0-1-WITHDEPS_stretch_7.5.sfs
 blender_DOC_2.79.b+dfsg0-1-WITHDEPS_stretch_7.5.sfs
 blender_NLS_2.79.b+dfsg0-1-WITHDEPS_stretch_7.5.sfs

Smile

(NOTE: creation of .deb packages not yet implemented.. For now, convert deb packages to PET, then split, if need be)

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2620
Location: UK

PostPosted: Mon 03 Dec 2018, 18:06    Post subject:  

New command: pkg dir2repo (not ready yet)

I've been working on an easy way for users to create and share their own repos..

Feedback welcome!

It's not ready yet... but here's where I got so far..

I created the directory /root/myrepo, and put 2 packages in it.

Then I made some updates to Pkg..
Now Pkg can do the following:

Code:
# pkg dir2repo myrepo

Creating repo from contents of: /root/myrepo

Step 1 of 3: CHOOSE A REPO NAME
(something like 'username-repo', such as 'bob-main' or 'sc0ttman-games')

Type a repo name and hit ENTER: bob-main

Step 2 of 3: ADD THE REPO URL
(the full URL where you will upload your repo file and packages)

Type a repo URL and hit ENTER: http://foo.com/bob-main/

Step 3 of 3: ADD FALLBACK REPOS
(the other repos to fall back to when looking for dependencies)

List fallback repos (separated by a space) and hit ENTER: noarch common32

Success: Repo bob-main created.

You should upload everything in /root/myrepo to:

  http://foo.com/bob-main/

You (and anyone else) can then install the repo using:

  pkg add-repo http://foo.com/bob-main/

NOTE: You can edit the install and Packages-debian-stretch-bob-main
files in a text editor, before you upload your new repo.


What happens is Pkg goes through each package, builds a standard Puppy repo file,
asks for a repo name and URL, then creates a file called 'install' in the repo dir,
which contains info that Pkg can use to install the repo using `pkg add-repo <repo-url>`.

Note, you can build repos of PET, SFS, txz, deb packages (etc), but you cannot mix and match..
All packages in the repo dir must have the same extension.

EDIT: Here is the usage info (so far):

Code:
# pkg usage dir2repo

Usage: pkg dir2repo DIR

Create a Puppy-compatible package repository (repo).

DIR must be a valid directory containing valid packages,
and all packages must have the same file extension.

HOW TO:

Run the command, you will be asked to give a repo name,
repo URL, and optional 'fall back' repos.

The entire contents of the given directory should
then be uploaded to your chosen repo URL.


MORE INFO:

Alongside the packages, a repo file will be generated
in the repo directory, as well as a repo installer file.

You can edit the contents of the following files
before uploading your repo:

Packages-*     <-- the repo file
install        <-- a repo info file (for installing the repo from URL)

SHARING REPOS:

Repos generated in this way and uploaded online can be
installed by other users simply by running this command:

  pkg add-repo <your-repo-URL>

SUPPORTED PACKAGES:

Supported packaged types include PET, SFS, DEB, TXZ.
You can use any supported packages types, but you
cannot mix and match them in a single repo.

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search

Last edited by sc0ttman on Thu 06 Dec 2018, 19:11; edited 2 times in total
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2620
Location: UK

PostPosted: Thu 06 Dec 2018, 19:02    Post subject:  

I'm just gonna put this out there:

Pkg is really quite good nowadays... And could probably be getting a bit more attention..

It's not perfect, and I still didn't get round to implementing some very useful
commands (like removing builtins) yet... But overall, Pkg is pretty damn good..

The package size in total is only 160kb, the deps are very minimal/standard (busybox, bash,
core-utils, wget, etc), yet Pkg provides a lot of the same features as the "big boys"..

It's easy to maintain and improve on - entirely written in shell script, mostly in one big file
admittedly, but nicely organised into little functions for each task..

It is one of the only package managers with context-sensitive TAB completion, which makes it
super easy to use in the terminal..

But it also has three(!) frontend GUIs - created more as demos that anything else, even if they
mostly work great.. But they can still be made better..

It has a whole bunch of Puppy-specific commands too..

In case people have not realised (the thread is messy), here are the things that Pkg can do already:

* easily find/search for packages to install from a range of repos
* easily add or remove you own repos with a couple of easy commands
* easily install, remove, analyze, convert and combine packages
* easily build/create your own packages (pet, deb, txz, tgz, rpm)
* compile packages from source (supports petbuild, SboPkg - which has lots & lots of build scripts, and the fantastic src2pkg)
* super easy to build custom SFS packages containing all deps needed to run your chosen program
* wrapper script for apt, yum to make copy & paste installation instructions for other distros work in Puppy
* and much more

And stuff Pkg will/can do in future, with additional scripts/modifications:

* easy way to create your own repos and share them, so others can install them with one command! (coming soon)
* could work with EasyOS or FatDog
* provision/setup a Puppy OS remotely (over ssh)
* create installer scripts for various programs much, much more easily
* automated building of custom ISOs (make Pkg work as a remaster tool)
* web frontend for building ISOs (like Slax)
* better support and integrations with amigos src2pkg (<-- this is a very good one to do)
* integration with woof (should remove buildpet, use only petbuild)
* buildpet is great, but it's build scripts are outdated.. they should be updated..
* other stuff

----------------

Also, can anyone please point me to a dir2deb bash function that definitely works in a recent Puppy? ..if it exists..

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search

Last edited by sc0ttman on Sat 08 Dec 2018, 07:25; edited 1 time in total
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2989

PostPosted: Fri 07 Dec 2018, 10:01    Post subject: Re: Pkg - CLI package manager
Subject description: contribute here, or at https://gitlab.com/sc0ttj/Pkg
 

sc0ttman wrote:
Download latest: https://gitlab.com/sc0ttj/Pkg/-/archive/master/Pkg-master.tar.gz
(extract then run 'installer.sh).

It may have some learning curve but I did the above and then
Code:
# pkg repo-update
Updating repositories.. Please wait.
Repo files updated:
Packages-slackware-14.2-official
Packages-slackware-14.2-salix
Packages-slackware-14.2-extra
Packages-slackware-14.2_updates-official
# pkg repo-list
noarch
#ls .packages/Packages-*
.packages/Packages-puppy-common32-official
.packages/Packages-puppy-noarch-official
.packages/Packages-puppy-slacko14.2-official
.packages/Packages-slackware-14.2-extra
.packages/Packages-slackware-14.2-official
.packages/Packages-slackware-14.2-salix

Is this the expected behavior? (I would think that existing repos would be used or at least considered)

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 11367
Location: S.C. USA

PostPosted: Fri 07 Dec 2018, 11:20    Post subject:  

Quote:
Pkg is really quite good nowadays... And could probably be getting a bit more attention..

Please do not think that people are not looking at this and not following your progress in development!!!!!!
We are following your progress in development!

With something that can do all that you post about it.
It takes some time to check it all.

Anything that can deal with program packages needs to be used with some caution.
We all understand that program packaging is always a problem getting it correct for Puppy.
Even more so when you try to use stuff from non-Puppy repositories.

Pkg is looking like a very good feature rich program.
Keep up the work on this!

We are watching what you are doing!!!!!!!!

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
foxpup


Joined: 29 Jul 2016
Posts: 613
Location: europa near northsea

PostPosted: Fri 07 Dec 2018, 11:38    Post subject:  

bigpup wrote:
Quote:
Pkg is really quite good nowadays... And could probably be getting a bit more attention..

Please do not think that people are not looking at this and not following your progress in development!!!!!!
We are following your progress in development!
...
Pkg is looking like a very good feature rich program.
Keep up the work on this!

We are watching what you are doing!!!!!!!!
I totally agree.
I was a fan from the first time I came across this, at the beginning, and it's been on my short watch list ever since.
It's amazing at what pace it develops and what it aims for.
I sometimes wonder if it will take the place of woof-CE Wink (I'm sure not.)
To me it looks obvious it will eventually take the place of PPM. As I understand it is compatible with it, which is a big advantage for Puppy.
Great work sc0ttman!

I intend to try and test it more in future and report, but it is true it has some learning curve.
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 881
Location: Connecticut, United States

PostPosted: Fri 07 Dec 2018, 11:42    Post subject:  

I also agree! I use it and follow it's development. I think for me this will be the PPM replacement.
Back to top
View user's profile Send private message Visit poster's website 
mikeslr


Joined: 16 Jun 2008
Posts: 2833
Location: 500 seconds from Sol

PostPosted: Fri 07 Dec 2018, 12:28    Post subject:  

ditto foxpup and rockedge. Very Happy
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2620
Location: UK

PostPosted: Fri 07 Dec 2018, 21:00    Post subject: Re: Pkg - CLI package manager
Subject description: contribute here, or at https://gitlab.com/sc0ttj/Pkg
 

mavrothal wrote:
sc0ttman wrote:
Download latest: https://gitlab.com/sc0ttj/Pkg/-/archive/master/Pkg-master.tar.gz
(extract then run 'installer.sh).

It may have some learning curve but I did the above and then
Code:
# pkg repo-update
Updating repositories.. Please wait.
Repo files updated:
Packages-slackware-14.2-official
Packages-slackware-14.2-salix
Packages-slackware-14.2-extra
Packages-slackware-14.2_updates-official
# pkg repo-list
noarch
#ls .packages/Packages-*
.packages/Packages-puppy-common32-official
.packages/Packages-puppy-noarch-official
.packages/Packages-puppy-slacko14.2-official
.packages/Packages-slackware-14.2-extra
.packages/Packages-slackware-14.2-official
.packages/Packages-slackware-14.2-salix

Is this the expected behavior? (I would think that existing repos would be used or at least considered)

It may be that you needed to run

pkg update-sources
pkg repo-update
pkg repo-list


IIRC, the first one should run itself on first load, but maybe it's not working..
Or maybe I need to boot a slack pup and fix some stuff..

(You can see all repos (currently) supported in the ~/.pkg/sources-all file)

------------

I should say I hope my previous post didn't sound like a rant or complaint - more that I
realise the thread is a lot of just me talking to myself, and probably not as clear to
understand the point of it all for others as it is to me..

.. but Pkg is a bit more involved and in-depth than many other forum based user contributed scripts/programs...
So I glad I'm not the only one using it..

............

As for Pkg having a steep learning curve... True - I proposed to fix this a while back by doing the following:

* create a proper `pkg init` command, run by installer (or user later) that does all the required setup stuff
* strip out some less often used commands from help output (-h) but leave them in full help output (-H)
* advertise and improve Gpkgdialog, Pkgdialog and Xpkgdialog a bit more

...Also, if this helps, here is a "quick help" summary that does 90% of what people might need:

SETUP
pkg update-sources # update supported repo list
pkg repo-update # download latest repo files and use them

CHOOSING REPOS
pkg repo-list # list all available repos by name
pkg repo <repo-name> # switch to chosen repo

SEARCHING
pkg search <search-term(s)> # search repo for any matches
pkg names <pkg-name(s)> # list matching packages by name

INSTALLING & REMOVING PACKAGES
pkg add <pkg-name(s)> # download and install a package and its deps
pkg rm <pkg-names(s)> # uninstall a package and any left-over (unused) deps


...plus the other stuff (run `pkg help` to see all commands)

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 4 of 5 [70 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1590s ][ Queries: 13 (0.0132s) ][ GZIP on ]