Pkg - CLI package manager

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#16 Post by sc0ttman »

I have moved Pkg to GitLab, people can contribute fixes here or there.

Thanks for the feedback ppl.. I have logged these issues on GitLab.

Issues: https://gitlab.com/sc0ttj/Pkg/issues


wiak:

As for better Woof integration, I think Pkg is a little rough around the edges yet, but yes, it's still my plan ;)

I have a fork of Woof locally, which I once customised a bit.. Can't remember what, but I will go back to it, keep at it, and hopefully re-write Woof to give it a CLI .. Then a dialog/ncurses frontend like buildroot, which uses Pkg/Pkgdialog as a backend ...

When I get time.... :roll:

EDIT: See example UI, with screenshot here: http://murga-linux.com/puppy/viewtopic. ... 466#987466


666philb:

Agreed on most points, have logged the issues in GitLab.. Would rather not rely on /usr/local/petget/postinstallhacks though, I want to remove Pkgs dependencies on PetGet where possible.

In fact, that just reminded me to log an Issue about updating the repos - Pkg currently calls /usr/local/petget/0setup to update the repos...
Last edited by sc0ttman on Mon 02 Apr 2018, 19:34, edited 5 times in total.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#17 Post by sc0ttman »

Bugger... Can't do GitHub.. Will move to GitLab.... EDIT: Done.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#18 Post by wiak »

sc0ttman wrote:
EDIT: See example UI, with screenshot here: http://murga-linux.com/puppy/viewtopic. ... 466#987466
Yeah, that looks good - if all that will be incorporated in a new woof-CE that would be a big change in the Puppy world. A lot of work to implement all that functionality though - or have you made a start on that?

wiak

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

#19 Post by wiak »

sc0ttman wrote:
EDIT: See example UI, with screenshot here: http://murga-linux.com/puppy/viewtopic. ... 466#987466
Yeah, that looks good - if all that will be incorporated in a new woof-CE that would be a big change in the Puppy world. A lot of work to implement all that functionality though - or have you made a start on that?

wiak

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#20 Post by sc0ttman »

It's just a demo, but I wanted something (slightly) concrete that represents the end goal ...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#21 Post by sc0ttman »

Updated on GitLab:

fixes and updates to Gpkgdialog:
- fixes packages not installing properly if not in WORKDIR
- fixes output and logging of installs, uninstalls etc
- uses new --quiet option added to Pkg
- added option to force (re-)install of package
- added option to install pkg at bottom of package status window


Will do some more fixes then post an updated PET later.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#22 Post by sc0ttman »

Updated on GitLab:

Code: Select all

  added new commands: `pkg add` and `pkg remove`:
    - `pkg add PKGNAME` is just an alias for `pkg get`, and works the same (installs a pkg and its deps)
    - `pkg remove PKGNAME` uninstalls a package, and its unused, left over deps
    - can also use `pkg rm PKGNAME` too
    - updated help info, usage docs and example commands to match
    - added some advanced example commands too

  fixes for --ask and --force options:
    - only ask user once at start to install/download a pkg
    - only ask user once at start to get a pkg and its deps
    - only ask user once at start to get pkg deps
    - fixed --force option with download command
    - so using --force to download will re-download a pkg, not skip it

  added support for blacklisted packages:
    - get PKG_NAME_IGNORE from /root/.packages/PKGS_MANAGEMENT
    - skip/ignore packages and deps in various places if found in $PKG_NAME_IGNORE
    - this fixes (for example) libglib2.0-0 being installed and breaking Gtk file choosers in Stretch
To install Pkg via GitLab, load the devx for your Puppy and simply run these commands:

Code: Select all

# download and install Pkg from GitLab
cd ~
mkdir -p GitLab/Pkg
cd GitLab/Pkg
git clone https://gitlab.com/sc0ttj/Pkg.git .
./installer.sh

# setup Pkg
source /etc/bash_completion.d/pkg
pkg update-sources
pkg repo-update
pkg repo-list

# choose a repo.. for example
pkg repo stretch-main

# now your ready to use Pkg :)
If you installed Pkg using Git, you can update Pkg by doing this:

Code: Select all

#update to latest git version
git pull origin master
./installer.sh
With the latest versions (commit 16e4d11e and later) you can now do these commands:

Code: Select all

# download and install a package, and its deps
pkg add vlc

# uninstall a package, and uninstall its unused/left-over deps
pkg rm vlc
I will upload a new PET after a few more fixes and stuff...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

Promoting puppy around the web

#23 Post by sc0ttman »

Promoting Puppy using Pkg

Many popular Linux packages/apps put easy install instructions on their project pages, in the form of copy and paste commands for popular package managers.

For example, many sites list apt-get, pacman, yum (etc) commands, so users of different distros can easily install stuff.

What's my point?

Puppy is never listed alongside the other distros, cos it doesn't have any command line package manager ... So no copy & paste stuff for Puppy users...

How to fix this?

If Pkg (or another CLI package manager) is included in most Puppys by default, we could

1. Request app and package developers update their pages with Puppy friendly, copy & paste install instructions.

2. Do pull requests on Github on popular projects, and add the setup/installation commands into their READMEs ourselves.

Why bother?

Puppy will then be listed alongside the other major distros on many popular software homepages and repos. Free advertising.

We can show off the "super simple, easy to use" nature of Puppy by having 1 simple command, like the other distros:

Code: Select all

pkg add vlc
Puppys name will be out there more, letting people know Puppy is a valid alternative to the other distros listed - with all the same great apps available, and just as easy to use.

...The bottom line is, once we have an easy CLI way to install/remove packages, we can put those commands on popular software homepages and repos, and Puppy will be more visible online, sitting alongside the most well-known distros, offering easy installation of popular software, just like the big boys :)

... just a thought...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#24 Post by sc0ttman »

Latest changes (on GitLab):

1. Pkg should now support BionicPup and ArtfulPup out of the box.

2. Fixes to Xenial, Tahr, Precise and trusty repo settings.

3. Improvements to `pkg update [pkgname]` # find newer packages in the repos

4. Improvements to `pkg combine <pkgname>` # combine a package and its deps

5. Improvements to `pkg ldd <pkgname>` ' # check missing libs of given package, and its deps

6. Improvements to package compiling with Buildpet.

When using Buildpet as the compiling backend (not the default petbuild), Pkg now supports the following:

Code: Select all

pkg build xarchiver --configure='--prefix=/usr/local --other-opts' --cflags='-D -02 -whatever'
This means, that you can now customise the packages you build on a per package basis.

You could also pass the options as ENVIRONMENT variables:

Code: Select all

PKG_CONFIGURE="--prefix=/usr/local" PKG_CFLAGS='-02' pkg build xarchiver
Or, you could set and export them before calling Pkg, and use those options for all packages you build :)

Code: Select all

export PKG_CONFIGURE='(your opts)'
export PKG_CFLAGS='(your opts)'

pkg build xarchiver
NOTE: Only the xarchiver buildscript has been updated to support these features for now - use it as a test or example of how to update the other build scripts (in /usr/share/buildpet/).

Essentially, you just replace "/usr" with ${BASE_INSTALL_PREFIX} everywhere in the build script, and you should be good to go :)

These buildpet scripts are included in Pkg by default, but need updating, and also fixing to support these new options.

TO USE THESE NEW BUILDPET FEATURES:

Set BUILDTOOL=buildpet in ~/.pkg/pkgrc, then run

Code: Select all

pkg build xarchiver [your configure and CFLAG opts here]
To install the latest Pkg from GitLab, load the devx, and run these commands:

Code: Select all

cd /root
rm -rf gitlab/pkg/
mkdir -p gitlab/pkg
cd gitlab/pkg
git clone https://gitlab.com/sc0ttj/Pkg.git .
./installer.sh
Last edited by sc0ttman on Tue 01 May 2018, 19:54, edited 1 time in total.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

Dry Falls
Posts: 616
Joined: Tue 16 Dec 2014, 23:37
Location: Upper Columbia

#25 Post by Dry Falls »

To
install the latest Pkg from GitLab, load the devx, and run these
commands:

Code:
cd /root
rm -rf gitlab/pkg/
mkdir -p gitlab/pkg
cd gitlab/pkg
git clone https://gitlab.com/sc0ttj/Pkg.git .
./installer.sh
Since the clone command doesn't follow symlinks, to install into
lighthouse (which isn't a woofCE build) add this after running the
above:

Code: Select all

cp -R /root/gitlab/pkg/usr/lib/pkg /usr/lib64
and everything works great!

Thanks, sc0ttman.

df

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#26 Post by rockedge »

I have PKG installed..did it sort of wildcat....downloaded extracted ran install.sh...worked......on Bionic 18.05 kernel 4.17 woof-CE built yesterday.

will do more extensive tests....this will really help in the installation instructions for running a LAMP or LHMP with zoneminder on puppy linux.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#27 Post by sc0ttman »

Most recent updates on GitLab (since May 01, my last post):

- fix for 64-bit systems: moved /usr/lib/pkg to /usr/share/pkg
- fixed setup of TAB completion on first run
- fixed `pkg LI <search-term>` not filtering the list
- fixed `pkg update [pkgname]` listing malformed package names
- fixes in `pkg contents <pkgname>` make it more reliable
- fixes in Petbuild initialisation
- fixes in Buildpets parsing of the Pkg --configure option when it contains quotes
- fixed buildpet & all build scripts to correctly support --configure and --cflags params (see previous posts)
- added /usr/share/pkg/command_not_found_handle.sh (can replace default "Command not found" message with package suggestions, like apt-get)
- added available ENV vars to help output and READMEs
- added more examples to READMEs

To update, or install, see previous posts. Basically:

Code: Select all

rm -rf ~/Gitlab/Pkg
mkdir -p ~/Gitlab/Pkg
git clone http://gitlab.com/sc0ttj/Pkg ~/Gitlab/Pkg
cd ~/Gitlab/Pkg
./installer.sh

Then, to get started, run this command and follow instructions:

Code: Select all

pkg welcome

To replace the default 'Command not found' message with package suggestions,
add the following to your ~/.bashrc file, or type it into the console and hit ENTER:

Code: Select all

source /usr/share/pkg/command_not_found_handle.sh
To get the default 'Command not found' message back:

Code: Select all

unset command_not_found_handle
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
aaaaa
Posts: 39
Joined: Tue 22 May 2018, 14:57

#28 Post by aaaaa »

Woofce will get rid of the multi arch symlink soon
This will cause a conflict with external scripts and stuff
...but this patch fixes compatibility with woofce:

pkg-woofce_no_multiarch_symlink.patch

Code: Select all

--- pkg-orig	2018-09-03 19:35:36.000000000 +0800
+++ pkg	2018-09-03 19:43:26.000000000 +0800
@@ -3215,22 +3215,27 @@
 						dpkg-deb --contents ${CURDIR}/${PKGNAME}.deb | grep -v '/$' | tr -s ' ' | cut -f6 -d' ' | sed -e 's/^.//g' | grep -v '^$' > $HOME/.packages/${PKGNAME}.files
 					fi
 
-					pkg_has_archdir="$(grep -m1 "$DISTRO_ARCHDIR" "$HOME/.packages/${PKGNAME}.files")"
-
-					# Workaround to avoid overwriting the $DISTRO_ARCHDIR symlink.  
-					if [ "$DISTRO_ARCHDIR" != "" -a -f $HOME/.packages/${PKGNAME}.files -a "$pkg_has_archdir" != "" ]; then
-					   mkdir -p /tmp/$PKGNAME
-					   rm -rf /tmp/$PKGNAME/*
-					   dpkg-deb -x ${CURDIR}/${PKGNAME}.deb /tmp/$PKGNAME/ 2> $TMPDIR/$SELF-cp-errlog
-					   for f in $(find /tmp/$PKGNAME \( -type f -o -type l \))
-					   do
-						 xpath=$(echo "$f" |  cut  -f 4-30 -d "/" | sed "s/$DISTRO_ARCHDIR\///")
-						 mkdir -p ${DIRECTSAVEPATH}/$(dirname "$xpath")
-						 cp -a "$f" ${DIRECTSAVEPATH}/$(dirname "$xpath")/
-					  done
-					  rm -rf /tmp/$PKGNAME &>/dev/null
+					# woofce: NO_MULTIARCH_SYMLINK=1 (DISTRO_SPECS)
+					if [ -z "$NO_MULTIARCH_SYMLINK" ] ; then
+						pkg_has_archdir="$(grep -m1 "$DISTRO_ARCHDIR" "$HOME/.packages/${PKGNAME}.files")"
+
+						# Workaround to avoid overwriting the $DISTRO_ARCHDIR symlink.  
+						if [ "$DISTRO_ARCHDIR" != "" -a -f $HOME/.packages/${PKGNAME}.files -a "$pkg_has_archdir" != "" ]; then
+						   mkdir -p /tmp/$PKGNAME
+						   rm -rf /tmp/$PKGNAME/*
+						   dpkg-deb -x ${CURDIR}/${PKGNAME}.deb /tmp/$PKGNAME/ 2> $TMPDIR/$SELF-cp-errlog
+						   for f in $(find /tmp/$PKGNAME \( -type f -o -type l \))
+						   do
+							 xpath=$(echo "$f" |  cut  -f 4-30 -d "/" | sed "s/$DISTRO_ARCHDIR\///")
+							 mkdir -p ${DIRECTSAVEPATH}/$(dirname "$xpath")
+							 cp -a "$f" ${DIRECTSAVEPATH}/$(dirname "$xpath")/
+						  done
+						  rm -rf /tmp/$PKGNAME &>/dev/null
+						else
+						   dpkg-deb -x ${CURDIR}/${PKGNAME}.deb ${DIRECTSAVEPATH}/ 2> $TMPDIR/$SELF-cp-errlog
+						fi
 					else
-					   dpkg-deb -x ${CURDIR}/${PKGNAME}.deb ${DIRECTSAVEPATH}/ 2> $TMPDIR/$SELF-cp-errlog
+						dpkg-deb -x ${CURDIR}/${PKGNAME}.deb ${DIRECTSAVEPATH}/ 2> $TMPDIR/$SELF-cp-errlog
 					fi
 
 					if [ "`cat $TMPDIR/$SELF-cp-errlog | grep 'tar: Exiting with failure status due to previous errors'`" != "" ];then
@@ -3451,34 +3456,37 @@
 			 fi
 			done
 
-			#121217 it seems that this problem is occurring in other modes (13 reported)...
-			#121123 having a problem with multiarch symlinks in full-installation...
-			#it seems that the symlink is getting replaced by a directory.
-			if [ "$DISTRO_ARCHDIR" ];then #in /etc/rc.d/DISTRO_SPECS. 130112 change test from DISTRO_ARCHDIR. 130114 revert DISTRO_ARCHDIR_SYMLINKS==yes.
-			  if [ -d /usr/lib/${DISTRO_ARCHDIR} ];then
-			   if [ ! -h /usr/lib/${DISTRO_ARCHDIR} ];then
-				cp -a -f --remove-destination /usr/lib/${DISTRO_ARCHDIR}/* /usr/lib/
-				sync
-				rm -r -f /usr/lib/${DISTRO_ARCHDIR}
-				ln -s ./ /usr/lib/${DISTRO_ARCHDIR}
-			   fi
-			  fi
-			  if [ -d /lib/${DISTRO_ARCHDIR} ];then
-			   if [ ! -h /lib/${DISTRO_ARCHDIR} ];then
-				cp -a -f --remove-destination /lib/${DISTRO_ARCHDIR}/* /lib/
-				sync
-				rm -r -f /lib/${DISTRO_ARCHDIR}
-				ln -s ./ /lib/${DISTRO_ARCHDIR}
-			   fi
-			  fi
-			  if [ -d /usr/bin/${DISTRO_ARCHDIR} ];then
-			   if [ ! -h /usr/bin/${DISTRO_ARCHDIR} ];then
-				cp -a -f --remove-destination /usr/bin/${DISTRO_ARCHDIR}/* /usr/bin/
-				sync
-				rm -r -f /usr/bin/${DISTRO_ARCHDIR}
-				ln -s ./ /usr/bin/${DISTRO_ARCHDIR}
-			   fi
-			  fi
+			# woofce: NO_MULTIARCH_SYMLINK=1 (DISTRO_SPECS)
+			if [ -z "$NO_MULTIARCH_SYMLINK" ] ; then
+				#121217 it seems that this problem is occurring in other modes (13 reported)...
+				#121123 having a problem with multiarch symlinks in full-installation...
+				#it seems that the symlink is getting replaced by a directory.
+				if [ "$DISTRO_ARCHDIR" ];then #in /etc/rc.d/DISTRO_SPECS. 130112 change test from DISTRO_ARCHDIR. 130114 revert DISTRO_ARCHDIR_SYMLINKS==yes.
+				  if [ -d /usr/lib/${DISTRO_ARCHDIR} ];then
+				   if [ ! -h /usr/lib/${DISTRO_ARCHDIR} ];then
+					cp -a -f --remove-destination /usr/lib/${DISTRO_ARCHDIR}/* /usr/lib/
+					sync
+					rm -r -f /usr/lib/${DISTRO_ARCHDIR}
+					ln -s ./ /usr/lib/${DISTRO_ARCHDIR}
+				   fi
+				  fi
+				  if [ -d /lib/${DISTRO_ARCHDIR} ];then
+				   if [ ! -h /lib/${DISTRO_ARCHDIR} ];then
+					cp -a -f --remove-destination /lib/${DISTRO_ARCHDIR}/* /lib/
+					sync
+					rm -r -f /lib/${DISTRO_ARCHDIR}
+					ln -s ./ /lib/${DISTRO_ARCHDIR}
+				   fi
+				  fi
+				  if [ -d /usr/bin/${DISTRO_ARCHDIR} ];then
+				   if [ ! -h /usr/bin/${DISTRO_ARCHDIR} ];then
+					cp -a -f --remove-destination /usr/bin/${DISTRO_ARCHDIR}/* /usr/bin/
+					sync
+					rm -r -f /usr/bin/${DISTRO_ARCHDIR}
+					ln -s ./ /usr/bin/${DISTRO_ARCHDIR}
+				   fi
+				  fi
+				fi
 			fi
 
 			#flush unionfs cache, so files in pup_save layer will appear "on top"...
How to apply the patch.. place the file in the same location as pkg and run:

Code: Select all

patch pkg < pkg-woofce_no_multiarch_symlink.patch 
Attachments
pkg-woofce_no_multiarch_symlink.patch_fake.gz
(4.89 KiB) Downloaded 359 times

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#29 Post by sc0ttman »

Thanks mate.. I will integrate it into Pkg soon :)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#30 Post by sc0ttman »

Hi aaaaa,

I have added your patch, but had to do it manually as the latest Pkg had some changes in that area of the script..

Please could you grab the latest version from Gitlab (https://gitlab.com/sc0ttj/Pkg/-/archive ... ter.tar.gz) and test it is OK (at some point, no rush...) ..

(I already installed a few more packages since applying the changes, seems OK.. )
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

installing from PPA repos

#31 Post by sc0ttman »

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: Select all

sudo add-apt-repository ppa:foo/bar
Well, I created a new script called ppa2pup.
So, now Puppy users can do:

Code: Select all

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: Select all

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: Select all

# 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
:) Please test it out... It will be integrated into Pkg later as:

Code: Select all

pkg add-ppa team-xbmc/ppa ubuntu bionic

Code: Select all

pkg rm-ppa team-xbmc/ppa ubuntu bionic
Then into the `apt-wrapper` 8)

.. 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)...
Last edited by sc0ttman on Mon 17 Sep 2018, 07:26, edited 2 times in total.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#32 Post by rockedge »

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

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#33 Post by sc0ttman »

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).
Last edited by sc0ttman on Tue 18 Sep 2018, 14:08, edited 1 time in total.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#34 Post by sc0ttman »

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: Select all

cd ~/gitlab/Pkg  # (or wherever you put it)
git checkout master
git pull origin master
./installer.sh
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

RedQuine
Posts: 52
Joined: Fri 20 Mar 2015, 14:34

Successfully installed Transmission 2.94!

#35 Post by RedQuine »

Wow, it worked! Thanks, sc0ttman :D

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/201 ... ntu-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.
Last edited by RedQuine on Sat 23 Feb 2019, 09:53, edited 1 time in total.

Post Reply