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 19 Nov 2018, 00:46
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 3 of 4 [47 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
sc0ttman


Joined: 16 Sep 2009
Posts: 2610
Location: UK

PostPosted: Sun 16 Sep 2018, 19:56    Post subject: installing from PPA repos  

On Launchpad.net there are many "PPA" repos containing user contributed or more
up-to-date packages, which can be added to an ubuntu (and Debian) system.

To add a new PPA repo, Ubuntu/Debian users can simply do:
Code:
sudo add-apt-repository ppa:foo/bar


Well, I created a new script called ppa2pup.
So, now Puppy users can do:

Code:
ppa2pup ppa:foo/bar [debian|ubuntu] [bionic|artful|xenial|stretch|etc]


If you're on an Ubuntu Bionic pup, if you only give the first option
(the PPA URL) it will grab the ubuntu bionic PPA pkgs by default.

Override by supplying the 2nd and 3rd options.

Full usage info:

Code:
This script creates a Puppy-compatible repo file from a PPA repo URL.

Usage: ppa2pup ppa:<user>/<repo> [debian|ubuntu] [bionic|stretch|artful|etc]

Examples:

  ppa2pup ppa:team-xbmc/ppa

  ppa2pup ppa:team-xbmc/ppa ubuntu bionic

  ppa2pup ppa:team-xbmc/ppa ubuntu artful

  ppa2pup ppa:team-xbmc/ppa debian stretch


See: https://gitlab.com/sc0ttj/Pkg/issues/31

It's not finished, but will do the following:

* find and download the relevant Packages.gz file of the PPA
* create a new puppy-compatible repo file from it
* install the repo, using Pkg

Example output:

Code:

# ppa2pup ppa:freecad-maintainers/freecad-stable ubuntu bionic

Found URL:

  http://ppa.launchpad.net/freecad-maintainers/freecad-stable/ubuntu/dists/bionic/main/binary-i386/Packages.gz

File to create:
   ~/.packages/Packages-ubuntu-bionic-freecadmaintainers

Success! File created.

Repo 'bionic-freecad-maintainers' added successfully.

Adding repo: stretch-main..
Adding repo: noarch..
Adding repo: common..
Adding repo: stretch-contrib..
Adding repo: stretch-multimedia..
Adding repo: stretch-non-free..
Adding repo: bionic-libretro..
Adding repo: bionic-freecad-maintainers..
Sources updated.

Repo info:
- Repo:          bionic-freecad-maintainers
- Repo file:     Packages-ubuntu-bionic-freecadmaintainers
- Package Type:  deb
- Packages:      27
- URL Mirror 1:  http://ppa.launchpad.net

- Fall back to:  bionic-libretro, stretch-main, noarch, common,
  stretch-contrib, stretch-multimedia,
  stretch-non-free

Success! Repo added and available to use.

To use this repo, simply type the following and hit ENTER:
  pkg repo bionic-freecad-maintainers


Smile Please test it out... It will be integrated into Pkg later as:

Code:
pkg add-ppa team-xbmc/ppa ubuntu bionic

Code:
pkg rm-ppa team-xbmc/ppa ubuntu bionic


Then into the `apt-wrapper` Cool

.. could also be improved to add the new repo to PetGet too .. ppa2pup would just need to update the ~/.packages/DISTRO_* files as well (i think)...

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

Last edited by sc0ttman on Mon 17 Sep 2018, 03:26; edited 2 times in total
Back to top
View user's profile Send private message 
rockedge


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

PostPosted: Mon 17 Sep 2018, 00:14    Post subject:  

I will test it by adding the Ubuntu ZoneMinder PPA from iconner PPA and see pkg will install zoneminder correctly. or close to correctly...
Back to top
View user's profile Send private message Visit poster's website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2610
Location: UK

PostPosted: Tue 18 Sep 2018, 04:23    Post subject:  

rockedge wrote:
I will test it by adding the Ubuntu ZoneMinder PPA from iconner PPA and see pkg will install zoneminder correctly. or close to correctly...

If you pull down the latest commit (240a6ec6 or later), and re-download the `ppa2pup` script (https://gitlab.com/sc0ttj/Pkg/issues/31#note_101706643) then hopefully, it should work OK...

Don't forget to switch to the new PPA repo after you install it..

pkg repo <repo-name>

.. then you can start adding packages from the PPA repo:

pkg add <pkgname>


NOTE ABOUT 'FALLBACK REPOS':

By default, Pkg will create a 'fall back' list for the newly added repos..
A 'fall back' list is simply the list of other repos to fall back to when looking for deps..

When you add a PPA repo, its fallback list will starts with the repo selected at the time of adding
the PPA, and then that repos fallbacks, and then the other repos..

For example, if your current repo is 'bionic-teamxbmc' when adding a new PPA repo, then
'bionic-teamxbmc' will be the first repo that your newly added PPA falls back to when looking for deps...

Therefore - it is recommended (not essential) you add new PPA repos while your current repo is one of the
'main' ones, like 'bionic-main', or 'xenial-main' (etc)..
(and not some other PPA repo)

Type `pkg repo-info` to see repo info, including the fallback list for that repo.

You can always edit the fall back lists in ~/.pkg/sources (look for the line that contains your new repo, and
edit the last field (a space separated list of repo names).

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

Last edited by sc0ttman on Tue 18 Sep 2018, 10:08; edited 1 time in total
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2610
Location: UK

PostPosted: Tue 18 Sep 2018, 08:22    Post subject:  

Also added a nice fix for TAB completion ... Makes it work much better..

Pkg can auto complete commands (install, update, search, list-deps, add-source ,etc, etc) ... and also package names ... and repo names ..

And it is context sensitive.. Pkg will auto-complete and list only the relevant things depending on which command you run..
(for example, Pkg will list only installed packages for `pkg rm [TAB]`)

If you already installed the gitlab repo somewhere, you can update like so:

Code:
cd ~/gitlab/Pkg  # (or wherever you put it)
git checkout master
git pull origin master
./installer.sh

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

Joined: 20 Mar 2015
Posts: 2

PostPosted: Thu 27 Sep 2018, 11:14    Post subject:  Successfully installed Transmission 2.94!  

Wow, it worked! Thanks, sc0ttman Very Happy

I'd been struggling to install Transmission 2.94 on BionicPup 64 as the dependencies appeared to grow arms and legs and crawl off in different directions. This script got it installed and working in an instant.

In case anyone else needs it, I got the PPA details from here:
http://ubuntuhandbook.org/index.php/2018/05/install-transmission-2-94-ubuntu-18-04/

I added the repo, downloaded the .deb and installed it, all through the script. I love the way the user's guided through the steps - all beautifully clear.
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 996
Location: not Bulgaria

PostPosted: Fri 28 Sep 2018, 02:28    Post subject:  

This package manager seems to be coming along in leaps and bounds. Very exciting for Puppy I'd say. Are there plans for this to become integrated into woofCE or at least become standard install with new Pups (which certainly would require it being provided by woofCE at least)? I'm surprised, in the circumstances of its need, not to hear more comments from Pup main developers about this development aside from the regular reports from its dev in this thread. Come on guys, get this adopted as a core Puppy facility!

wiak
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2610
Location: UK

PostPosted: Sun 07 Oct 2018, 14:47    Post subject:  

Updates

Improvements to ppa2pup script:
* now supports third-party debian repo URLs, as well as Launchpad PPA URLs
* which now allows installing repos from websites other than Launchpad Smile
* also, important fixes in getting the deps list of each package

New slack2pup script:
* convert third-party Slackware repos to Puppy repos


Downloads

Download ppa2pup:
https://gitlab.com/sc0ttj/dotfiles/raw/puppy-stretch-7.5/bin/ppa2pup

Download slack2pup:
https://gitlab.com/sc0ttj/dotfiles/raw/puppy-stretch-7.5/bin/slack2pup

Save in your $PATH.. Make executable..

Both scripts create and also install the repos for you (requires Pkg to be installed).


ppa2pup usage:

Code:
This script creates a Puppy-compatible repo file from a PPA or Debian repo.

For Launchpad PPA repos:

  Usage: ppa2pup ppa:<user>/<repo> [debian|ubuntu] [bionic|stretch|artful|etc]

Examples:

  ppa2pup ppa:team-xbmc/ppa

  ppa2pup ppa:team-xbmc/ppa ubuntu bionic

  ppa2pup ppa:team-xbmc/ppa ubuntu artful

  ppa2pup ppa:team-xbmc/ppa debian stretch


For other third-party Debian repos:

  Usage: ppa2pup http://site.com/[debian|ubuntu]/ [stretch|bionic|etc] [main|contrib|etc]

Examples:

  ppa2pup http://rpms.litespeedtech.com/debian/

  ppa2pup http://rpms.litespeedtech.com/debian/ stretch main


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




slack2pup usage:

Code:
slack2pup - convert Slackware repos to Puppy repo files

Usage examples:

  slack2pup http://site.com/path/to/PACKAGES.TXT

  slack2pup http://site.com/path/to/PACKAGES.TXT.gz


NOTES:

Finding third-party Debian repos:

If the file listing dir in your browser contains dirs called 'dists' and 'pool', then that URL is probably the URL you need for ppa2pup - just paste it into the terminal and optionally append the distro version and repo stream (main/contrib/etc) to the `ppa2pup` command, if needed.

Finding Slackware repos:

Choose the repos for your architecture... Be careful choosing the PACKAGES.TXT file for Slackware repos, some sites contain multiples ones at various levels.. In that case, choose the first one you find (highest level) and start there.

Some 3rd party Slackware repos can be found here: http://www.slakfinder.org/showrepo.php

EDIT: Just fixed some errors in generating the correct repo names & URLs from given URLs.. Should be fixed now... If Pkg was giving "Error: Package URL not found", this should fix it.

EDIT2: Just re-fixed slack2pup - it was including '.gz.' in repo url ... Embarassed Rolling Eyes

_________________
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: 2610
Location: UK

PostPosted: Mon 08 Oct 2018, 15:27    Post subject:  

I have updated the ppa2pup script so that is also takes the repo stream as well.. Download from link above.

Code:
Usage examples:

ppa2pup ppa:foo/bar ubuntu bionic contrib
ppa2pup ppa:foo/bar ubuntu bionic non-free
ppa2pup ppa:foo/bar debian stretch main
..etc..


If you don't give the repo stream, it will default to 'main' ..

_________________
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: 2610
Location: UK

PostPosted: Mon 15 Oct 2018, 18:26    Post subject:  

I've updated the ppa2pup script:

Some of the launchpad/ppa/debian repo URLs that ppa2pup supports have multiple
repos inside them, called things like 'main', 'contrib', 'non-free', and other stuff...

The ppa2pup script now supports the creation of separate repos for each 'component',
so it will create a repo for each 'component' passed to it...


Example:

ppa2pup http://foo.com/debian/ stretch main contrib non-free

(So, the usage is the same as before, but you can now add more components to the end)

In the example above, 3 repos would be created (foo-main, foo-contrib & foo-non-free), each making
packages from foo.com available to install..

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

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


Joined: 16 Sep 2009
Posts: 2610
Location: UK

PostPosted: Mon 15 Oct 2018, 18:35    Post subject: apt2pup
Subject description: process /etc/apt/sources.list & /etc/apt//etc/apt/sources.list.d/* into puppy repos
 

....I've been trying to make it easier to add new repos to Puppy...

Background info

You'll often see installation instructions for 3rd party repos in Debian/Ubuntu like these:

Code:
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

or
Code:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

or
Code:
wget -O- http://neuro.debian.net/lists/stretch.de-m.libre | sudo tee /etc/apt/sources.list.d/neurodebian.list


(just FYI, the "official" repos tend to be in /etc/apt/sources.list, while 3rd party repos go in /etc/apt/sources.list.d/<name>.list )

Read more info about SourcesList at the Debian website.


Problem!

The commands above don't work in Puppy - not even ones based on Debian/Ubuntu Sad

But in Debian/Ubuntu, all these commands (and others) add a new repo to the system, making new
packages available..


Solution (so far)

New script: apt2pup

A script which processes the contents of /etc/apt/sources.list and /etc/apt/sources.list.d/*.list files,
and converts each repo found into a Puppy-compatible repo (using ppa2pup)

it will remove and (re)convert the repos it finds each time it is run... And it is quite slow... Embarassed

Download:
https://gitlab.com/sc0ttj/dotfiles/raw/puppy-stretch-7.5/bin/apt2pup

Requires Pkg and ppa2pup be installed...

Code:
# apt2pup -h

This script gets the repo URLs listed in /etc/apt/sources.list, and
passes them to `ppa2pup`, which then creates a Puppy-compatible repo
from the repo URLs it receives (if possible).

More info:

/etc/apt/sources.list usually contains lines like:

    deb      https://deb.nodesource.com/node_8.x     trusty           main
    deb      http://apt.postgresql.org/pub/repos/apt   trusty-pgdg  main
    deb-src http://apt.postgresql.org/pub/repos/apt  trusty-pgdg   main

The first bit refers to package type (regular or source), the second
is the URL where the packages are, the third is OS version, and
the last is the "repo stream" - often main, contrib, or non-free.

This script will ignore "deb-src" entries, and parse the others


....Why?

Eventually, these scripts will end up inside Pkg, making it easy to add/remove repos from
a variety of (compatible) sources:

* 3rd party Slackware, Ubuntu, Debian URLs
* Launchpad PPAs
* using `apt-add-repository` commands
* using `pkg add-source` command

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


Joined: 28 Jun 2006
Posts: 372
Location: GodZone Kiwi

PostPosted: Sun 04 Nov 2018, 21:18    Post subject:  

G'day sc0ttman, I've been Directed 2 your cli Package Manager in the Hope that it can Resolve Missing Python ( among Other ) Dependencies when Trying 2 install Compiz & VLC w/ the Std Native Puppy Package Manager in LxPup Bionic 18.05 on an HP Compaq NC8230, 1.73 GHz intel Centrino CPU, 2 GB RAMemory, ATI Radeon X600 Graphix. Frugal install Dual Booting w/ M$ Virus Magnet Windows

However My cli aRe rather Basic & I Need Help installing your cli Package Manager, Please WinkK
Screenshot.png
Description 
png

 Download 
Filename  Screenshot.png 
Filesize  151.8 KB 
Downloaded  18 Time(s) 

_________________
PC is Not Political Correctness Razz , it's a Personal Computer!
Back to top
View user's profile Send private message Yahoo Messenger 
sc0ttman


Joined: 16 Sep 2009
Posts: 2610
Location: UK

PostPosted: Tue 06 Nov 2018, 18:36    Post subject:  

cd into the Pkg-master folder, and THEN run the installer...

Sorry, it's a crappy, simplistic installer script..

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


Joined: 28 Jun 2006
Posts: 372
Location: GodZone Kiwi

PostPosted: Wed 07 Nov 2018, 17:19    Post subject:  

G'day sc0ttman, I'm Sorry but it's still not working? What am I doing wRong?, Please...

;-(K
Screenshot2.png
Description 
png

 Download 
Filename  Screenshot2.png 
Filesize  136.96 KB 
Downloaded  16 Time(s) 

_________________
PC is Not Political Correctness Razz , it's a Personal Computer!
Back to top
View user's profile Send private message Yahoo Messenger 
sc0ttman


Joined: 16 Sep 2009
Posts: 2610
Location: UK

PostPosted: Wed 07 Nov 2018, 19:38    Post subject:  

I could suggest other ways to install ... But I'll tell you where you went wrong, in case you care...

You typed:

cd /Pkg-master

but you should have typed (no leading slash):

cd Pkg-master

or (also works):

cd /root/Pkg-master

The reason it didn't work for you is because "cd /Pkg-master" expects the Pkg-master folder to exist at / (the very top level).
..But it's inside the /root folder... hence the latter two commands work...

Then ... once you got inside the /root/Pkg-master folder, you ran

installer.sh

... you tried to run the script but didnt give any path, only the filename (by default your terminal looks for comands with no path in /usr/bin/, /usr/local/bin/ and a bunch of other places where commands (like 'cd') live.. It's called the $PATH)... But in this case it couldn't find installer.sh, cos it's not in your $PATH, it's in the current dir...

To fix your input, simply give the path, which in your case, at that point, was the current dir (represented by a dot):

./installer.sh

... that should do it... Using ./something means something in the current dir...

[...confusingly the 'cd' command (and others) don't need ./ to find stuff in the current dir, but when executing commands or scripts directly in the terminal itself (running Bash), then you do need to use ./ to execute stuff in the current dir, else it will look in $PATH]

I will get around to making a more up to date PET at some point, which
would be easier to install...

Or... last resort, you can *probably* use ROX to highlight all the folders in Pkg-master, then drag and copy to / ... That might also work..

... Hopefully that is all clear as mud Embarassed

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


Joined: 28 Jun 2006
Posts: 372
Location: GodZone Kiwi

PostPosted: Wed 07 Nov 2018, 21:47    Post subject:  

Thanx sc0ttman 4 your support... Clear as Mud indeed! ;-\

Thanx 2 yoU, I've Successfully installed your cli Package Manager, which then Successfully installed VLC, Testes Working! Wink

But unfortunately Compiz still isn't working... ? I don't understand the Error Sad
Screenshot3.png
Description 
png

 Download 
Filename  Screenshot3.png 
Filesize  177.65 KB 
Downloaded  15 Time(s) 

_________________
PC is Not Political Correctness Razz , it's a Personal Computer!
Back to top
View user's profile Send private message Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 3 of 4 [47 Posts]   Goto page: Previous 1, 2, 3, 4 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.1250s ][ Queries: 13 (0.0322s) ][ GZIP on ]