How do we install .deb package from the command line?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

How do we install .deb package from the command line?

Post by JASpup »

Conventional wisdom for the masses is dpkg, but we have pupzip that runs executing .deb in a gui and a command line version which displays help for adding and extracting files, but not installing packages.

Code: Select all

root# pupzip --help
++ tr '[:upper:]' '[:lower:]'
++ echo --help
+ EXT=--help
+ for i in xarchive xarchiver file-roller arc
++ which xarchive
+ '[' '' ']'
+ for i in xarchive xarchiver file-roller arc
++ which xarchiver
+ '[' '' ']'
+ for i in xarchive xarchiver file-roller arc
++ which file-roller
+ '[' /usr/bin/file-roller ']'
+ ARCHIVER=file-roller
+ for i in xarchive xarchiver file-roller arc
++ which arc
+ '[' '' ']'
+ '[' file-roller = '' ']'
+ '[' --help = '' ']'
+ case $EXT in
+ exec file-roller --help
Usage:
  file-roller [OPTION...] - Create and modify an archive

Help Options:
  -?, --help                      Show help options
  --help-all                      Show all help options
  --help-gtk                      Show GTK+ Options
  --help-sm-client                Show session management options

Application Options:
  -a, --add-to=ARCHIVE            Add files to the specified archive and quit the program
  -d, --add                       Add files asking the name of the archive and quit the program
  -e, --extract-to=FOLDER         Extract archives to the specified folder and quit the program
  -f, --extract                   Extract archives asking the destination folder and quit the program
  -h, --extract-here              Extract the contents of the archives in the archive folder and quit the program
  --default-dir=FOLDER            Default folder to use for the '--add' and '--extract' commands
  --force                         Create destination folder without asking confirmation
  --display=DISPLAY               X display to use

My goal is to automate installation of all the packages needed in a FOR DO loop for an app.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
rcrsn51
Posts: 1194
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 266 times

Re: How do we .deb package install on the command line?

Post by rcrsn51 »

Try: dpkg-deb -x filename.deb /

But keep in mind that many packages have post-install stuff that this command will ignore.

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: How do we .deb package install on the command line?

Post by fredx181 »

rcrsn51 wrote: Tue Jul 06, 2021 2:21 pm

Try: dpkg-deb -x filename.deb /

But keep in mind that many packages have post-install stuff that this command will ignore.

Note that this will extract the deb package in / , uninstalling it afterwards is not possible this way.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: How do we .deb package install on the command line?

Post by JASpup »

fredx181 wrote: Tue Jul 06, 2021 2:27 pm
rcrsn51 wrote: Tue Jul 06, 2021 2:21 pm

Try: dpkg-deb -x filename.deb /

But keep in mind that many packages have post-install stuff that this command will ignore.

Note that this will extract the deb package in / , uninstalling it afterwards is not possible this way.

Extract or install?

In the gui the process is fairly automated after you indicate you want to install. There are two install prompts then waiting for menus to be updated.

If it's just extract I would probably try the -e, -f, or -h in pupzip.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
fredx181
Posts: 2558
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 273 times
Been thanked: 992 times
Contact:

Re: How do we .deb package install on the command line?

Post by fredx181 »

JASpup wrote:

Extract or install?

Extract.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: How do we .deb package install on the command line?

Post by JASpup »

rcrsn51 wrote: Tue Jul 06, 2021 2:21 pm

Try: dpkg-deb -x filename.deb /

I tried this with no luck.
It finishes instantly with no errors but I don't see installed .deb.

My goal is to not have to permanently install or download packages every time I want to use an app. I just tried to make a .sfs. It hangs with an icon cache slam:

icon-cache-slam.png
icon-cache-slam.png (36.41 KiB) Viewed 906 times

I can't even terminate or crtl-alt-backspace out. I had to kill it.

The only way I know to achieve my objective is installing to multiple pupsaves. I want to get something done, so I don't have time to wrestle with this right now.

Thanks for taking a look.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
foxpup
Posts: 186
Joined: Fri Jul 24, 2020 1:23 pm
Location: Europe near the Northsea
Has thanked: 75 times
Been thanked: 32 times

Re: How do we .deb package install on the command line?

Post by foxpup »

Could pkg from @sc0ttman help you out?
It is command line and 'integrated' with PPM.
It comes with Fossapup and with builds from @josejp2424 and maybe some others.
You could probably install it on other Puppys if they are not too old.
Pkg by Scottman

User avatar
lizardidi
Posts: 72
Joined: Sat Jul 18, 2020 9:42 am
Has thanked: 20 times
Been thanked: 12 times

Re: How do we .deb package install on the command line?

Post by lizardidi »

in fossapup, pkg is already built in.

you can automate the installation of all downloaded .deb packages of an app by using pkg in fossapup64:

cd /path/to/downloaded/debs

pkg install *.deb

thats it, wait untill all installations complete, and launch your app.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: How do we .deb package install on the command line?

Post by JASpup »

I will look at pkg when installing downloaded packages becomes the next thing to do.

I'm a Xenial guy and optimistic it's new enough.

It's really just a simple operation of automated installing cli instead of ppm because the packages are already downloaded. File manager gui works fine but is painfully manual.

Thanks for the pointer.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
foxpup
Posts: 186
Joined: Fri Jul 24, 2020 1:23 pm
Location: Europe near the Northsea
Has thanked: 75 times
Been thanked: 32 times

Re: How do we .deb package install on the command line?

Post by foxpup »

JASpup wrote: Sat Jul 17, 2021 2:53 am

It's really just a simple operation of automated installing cli instead of ppm because the packages are already downloaded. File manager gui works fine but is painfully manual.

That's exactly the reason (or one of the main reasons) @sc0ttman created pkg.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: How do we install .deb package from the command line?

Post by JASpup »

I ran pkg with no errors, but I'm also not sure what just happened.

This is Firefox 66 + dependencies in Tahr 32-bit:

Code: Select all

root# pkg e *.deb
Resolving dependencies..
Dependencies to get: dh-python libpython3-stdlib mime-support python3 python3-minimal python3.4 
Download libpython3-stdlib_3.4.0 from trusty-main repo:  
URL: http://ftp.filearena.net/pub/ubuntu/upkg[u][/u]buntu/pool/main/p/python3-defaults/libpython3-stdlib_3.4.0-0ubuntu2_i386.deb
Downloading libpython3-stdlib_3.4.0-0ubuntu2_i386.deb. Please wait: 100%
Downloaded: /root/pkg/libpython3-stdlib_3.4.0-0ubuntu2_i386.deb
Install package libpython3-stdlib_3.4.0-0ubuntu2_i386:  
Installed: libpython3-stdlib_3.4.0-0ubuntu2_i386
Skipping mime-support (already built-in)..
Download python3_3.4.0 from trusty-main repo:  
URL: http://ftp.filearena.net/pub/ubuntu/ubuntu/pool/main/p/python3-defaults/python3_3.4.0-0ubuntu2_i386.deb
Downloading python3_3.4.0-0ubuntu2_i386.deb. Please wait: 100%
Downloaded: /root/pkg/python3_3.4.0-0ubuntu2_i386.deb
Install package python3_3.4.0-0ubuntu2_i386:  
Installed: python3_3.4.0-0ubuntu2_i386
Download python3-minimal_3.4.0 from trusty-main repo:  
URL: http://ftp.filearena.net/pub/ubuntu/ubuntu/pool/main/p/python3-defaults/python3-minimal_3.4.0-0ubuntu2_i386.deb
Downloading python3-minimal_3.4.0-0ubuntu2_i386.deb. Please wait: 100%
Downloaded: /root/pkg/python3-minimal_3.4.0-0ubuntu2_i386.deb
Install package python3-minimal_3.4.0-0ubuntu2_i386:  
Installed: python3-minimal_3.4.0-0ubuntu2_i386
Download python3.4_3.4.3 from trusty-main repo:  
Resolving dependencies..
No missing dependencies.
Resolving dependencies..
No missing dependencies.
Resolving dependencies..
Dependencies to get: libcups2 libgtk-3-common libxkbcommon0 
Download libcups2_1.7.2 from trusty-main repo:  
Download libgtk from trusty-main repo:  
URL: http://ftp.filearena.net/pub/ubuntu/ubuntu/pool/main/g/gtk+3.0/libgtk-3-common_3.10.8-0ubuntu1.6_all.deb
Downloading libgtk-3-common_3.10.8-0ubuntu1.6_all.deb. Please wait: 100%
Downloaded: /root/pkg/libgtk-3-common_3.10.8-0ubuntu1.6_all.deb
Install package libgtk-3-common_3.10.8-0ubuntu1.6_all:  
Installed: libgtk-3-common_3.10.8-0ubuntu1.6_all
Download libxkbcommon0_0.4.1 from trusty-main repo:  
URL: http://ftp.filearena.net/pub/ubuntu/ubuntu/pool/main/libx/libxkbcommon/libxkbcommon0_0.4.1-0ubuntu1_i386.deb
Downloading libxkbcommon0_0.4.1-0ubuntu1_i386.deb. Please wait: 100%
Downloaded: /root/pkg/libxkbcommon0_0.4.1-0ubuntu1_i386.deb
Install package libxkbcommon0_0.4.1-0ubuntu1_i386:  
Installed: libxkbcommon0_0.4.1-0ubuntu1_i386
Resolving dependencies..
No missing dependencies.
Resolving dependencies..
No missing dependencies.
Resolving dependencies..
No missing dependencies.
Resolving dependencies..
No missing dependencies.
Resolving dependencies..
No missing dependencies.
root# 

The colors are prettier in-terminal but all the info is there.

What I'm not sure about is all the "Downloading" / "Downloaded" messages.

If the files are already downloaded, as referenced by the command line argument, could anything need to be downloaded other than the dependencies required to make pkg work?

This is the ppm installation of pkg followed by what installed running pkg e *.deb:

pkg-1st_run.png
pkg-1st_run.png (22.3 KiB) Viewed 1664 times

This is the directory of all the .deb that should have installed:

Code: Select all

root# ls -al *.deb
-rwxrwxrwx 1 root root    51090 Jul 17  2015 dh-python_1.20140128-1ubuntu8.2_all.deb
-rwxrwxrwx 1 root root 49637372 Apr 16  2019 firefox_66.0.3+build1-0ubuntu0.14.04.1_i386.deb
-rwxrwxrwx 1 root root   650764 Nov 22  2017 libdb5.3_5.3.28-3ubuntu3.1_i386.deb
-rwxrwxrwx 1 root root  1922936 Jul  1  2015 libgtk-3-0_3.10.8-0ubuntu1.6_i386.deb
-rwxrwxrwx 1 root root   166948 Jul  1  2015 libgtk-3-common_3.10.8-0ubuntu1.6_all.deb
-rwxrwxrwx 1 root root   458884 Nov 13  2018 libpython3.4-minimal_3.4.3-1ubuntu1~14.04.7_i386.deb
-rwxrwxrwx 1 root root  1966944 Nov 13  2018 libpython3.4-stdlib_3.4.3-1ubuntu1~14.04.7_i386.deb
-rwxrwxrwx 1 root root     6928 Mar 23  2014 libpython3-stdlib_3.4.0-0ubuntu2_i386.deb
-rwxrwxrwx 1 root root    88548 Oct  8  2018 libxkbcommon0_0.4.1-0ubuntu1.1_i386.deb
-rwxrwxrwx 1 root root    11640 May 18  2016 lsb-release_4.1+Debian11ubuntu6.2_all.deb
-rwxrwxrwx 1 root root    29322 Jan  8  2015 mime-support_3.54ubuntu1.1_all.deb
-rwxrwxrwx 1 root root     8676 Mar 23  2014 python3_3.4.0-0ubuntu2_i386.deb
-rwxrwxrwx 1 root root   177574 Nov 13  2018 python3.4_3.4.3-1ubuntu1~14.04.7_i386.deb
-rwxrwxrwx 1 root root  1172450 Nov 13  2018 python3.4-minimal_3.4.3-1ubuntu1~14.04.7_i386.deb
-rwxrwxrwx 1 root root    23306 Mar 23  2014 python3-minimal_3.4.0-0ubuntu2_i386.deb
root# 

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: How do we install .deb package from the command line?

Post by JASpup »

First run of the command is like this:

Code: Select all

root# pkg install *.deb
============================================================
  Pkg 1.9.22 - a command-line package manager
============================================================

  pkg repo-update      # update the contents of each installed repo
  pkg repo-list        # list all available repos
  pkg repo <name>      # change to the chosen repo

Second run (in the same directory)::

Code: Select all

root# pkg install *.deb
Install package dh-python_1.20140128-1ubuntu8.2_all:  
Installed: dh-python_1.20140128-1ubuntu8.2_all
Already installed: firefox_66.0.3+build1-0ubuntu0.14.04.1_i386
Install package libdb5.3_5.3.28-3ubuntu3.1_i386:  
Installed: libdb5.3_5.3.28-3ubuntu3.1_i386
Install package libgtk-3-0_3.10.8-0ubuntu1.6_i386:  
Installed: libgtk-3-0_3.10.8-0ubuntu1.6_i386
Already installed: libgtk-3-common_3.10.8-0ubuntu1.6_all
Install package libpython3.4-minimal_3.4.3-1ubuntu1~14.04.7_i386:  
Installed: libpython3.4-minimal_3.4.3-1ubuntu1~14.04.7_i386
Install package libpython3.4-stdlib_3.4.3-1ubuntu1~14.04.7_i386:  
Installed: libpython3.4-stdlib_3.4.3-1ubuntu1~14.04.7_i386
Already installed: libpython3-stdlib_3.4.0-0ubuntu2_i386
Install package libxkbcommon0_0.4.1-0ubuntu1.1_i386:  
Installed: libxkbcommon0_0.4.1-0ubuntu1.1_i386
sed: -e expression #2, char 0: no previous regular expression
sed: -e expression #2, char 0: no previous regular expression
Install package lsb-release_4.1+Debian11ubuntu6.2_all:  
Installed: lsb-release_4.1+Debian11ubuntu6.2_all
sed: -e expression #2, char 0: no previous regular expression
Already installed: mime-support_3.54ubuntu1.1_all
Already installed: python3_3.4.0-0ubuntu2_i386
Install package python3.4_3.4.3-1ubuntu1~14.04.7_i386:  
Installed: python3.4_3.4.3-1ubuntu1~14.04.7_i386
To run, type:  /usr/bin/python3.4
Install package python3.4-minimal_3.4.3-1ubuntu1~14.04.7_i386:  
Installed: python3.4-minimal_3.4.3-1ubuntu1~14.04.7_i386
Already installed: python3-minimal_3.4.0-0ubuntu2_i386
root# 

Around python3.4 installation I lose both my upper panel and the lower panel app menu. Qucklaunch is still there. Also the normal display of icons disappears. Restarting X doesn't make a difference.

Python?

Anyway after that fiasco I went back into the file manager and noticed installing from within activates the Puppy Package Manager.

That's all fine and dandy, but I don't see a way to install pre-downloaded packages with the main installation app, gui or command line.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

williams2
Posts: 1023
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 288 times

Re: How do we install .deb package from the command line?

Post by williams2 »

If you are trying to install Python3, I found it very easy to compile the source.

get the source https://www.python.org/downloads/source/
Load the devx.sfs
Unzip the source.
Open a terminal in the source dir.
Type:
./configure
make
make altinstall

It compiled with no errors.
altinstall installs it to it's own dirs, so it doesn't over write python 2.7
Make sure you have the correct symlinks for python, python2, python3, pip, pip3

It works with youtube-dl, anyway.

Code: Select all

# python
Python 3.9.5 (default, May 29 2021, 15:07:08) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: How do we install .deb package from the command line?

Post by JASpup »

williams2 wrote: Wed Jul 21, 2021 7:18 pm

If you are trying to install Python3, I found it very easy to compile the source.

Appreciate the consideration. If you feel like dumbing-down to a user level again:

The issue is an inconsistency.

If I manually click on the 15 .deb within a file manager to install Firefox 66 in 32-bit Tahr, it works with no errors. The browser runs normally.

If I use the pkg cli utility, it obliterates a panel and the start/menu icon, and Firefox won't run.

Is there any way, say, you can trick ppm into thinking a local directory is a repository?

How else should we install downloaded packages and their dependencies?

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
mikewalsh
Moderator
Posts: 5564
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 566 times
Been thanked: 1678 times

Re: How do we install .deb package from the command line?

Post by mikewalsh »

@JASpup :-

Don't get TOO 'peeved' with williams2. As he/she has demonstrated on a great many occasions, his/her preference is more 'command-line' orientated than most.....more of a 'traditionalist' Unix-type mode of operation. Not everybody wants to get into the general user/GUI-related stuff.

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

In my experience, ANY WM will always "feel" faster than a DE, since it doesn't have all that extraneous 'crap' integrated into it. Barry's choice of JWM along with using ROX-filer (with its 'pinboard') was an inspired choice. A very light footprint, together with (most) of the functionality of a fully-featured DE.

I tried pretty much all the major DEs during my "distro-hopping" phase several years ago.....and came to the conclusion that I didn't really like ANY of them. LXDE came close, perhaps, for overall 'lightness', but then it was pretty light on features, too. When I first came to Puppy 7 years ago, sure; the JWM/ROX-filer 'combo' took some getting used to.....but when you've got used to using it, it can't be beaten for responsiveness.

I've never bothered trying out different DEs with Puppy. As I said, I don't LIKE any of 'em. And it's a selfish attitude, perhaps, but I'm not too concerned about how easy it is for the great unwashed to come to grips with. It works for me.....and that's MY main concern.

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

As for ease of app installation into a Puppy install, so that you don't have to go through all the downloading/installing rigmarole, there IS another solution. @davids45 came up with it a long time ago, and for quite a while I used it myself; not so much nowadays, since I prefer the use of portable apps wherever possible.

It involves setting-up a 'ghost' file-system on an external, auto-mounted partition, into which you manually 'install' all the component parts of any application you wish to use. Once you've 'installed' everything, you then sym-link everything into its appropriate, matching location within Puppy itself.....including Menu entries. A re-start of "X", and everything is up-and-running.

The neat aspect of all this is that once everything IS set-up - yes, there's a LOT of manual work involved to start with, I won't deny that - it's possible to construct a .pet package that consists entirely of nothing BUT sym-links to the 'ghost' file-system. (David & I proved this works, so I know it can be done.)

So; you install Puppy. You install this one .pet, and.....all your favourite apps/programs are 'installed' straightaway. It's not a method that will appeal to everybody, but it's certainly fun to do.....and an interesting illustration of just what CAN be achieved. As a bonus, many of these 'externally-installed' apps/programs can often be shared between more than one Puppy.

Worthy of consideration, perhaps? Just an idea I've thrown out there....

Mike. ;)

Last edited by mikewalsh on Fri Jul 23, 2021 11:50 am, edited 1 time in total.

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

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

Re: How do we install .deb package from the command line?

Post by rockedge »

JASpup wrote:

Is there any way, say, you can trick ppm into thinking a local directory is a repository?

I think you can modify /root/.packages/DISTRO_COMPAT_REPOS and or /root/.packages/DISTRO_PET_REPOS to include a local directory in the repository chain for the PPM.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: How do we install .deb package from the command line?

Post by JASpup »

There might some technical back-end reason why XFCE is undesirable, but from a user standpoint, when you're clonking along watching the Task Manager, it doesn't seem like there's greater resource use in XFCE, and it's not noticably slower.

'Course there's always the mystical ramdisk usage you have to look for.

The ultimate proof is it's more efficient than Ubuntu or Mint XFCE. Add tire-kicked stability and that's going to be attractive to a lot of users.

If it were noticably slower or strained I simply wouldn't boot it.

Then side-by-side LXDE doesn't compare on refinement.

I don't see how it's worth anyone's time to quantify resources at a user level, but that's the sum.

mikewalsh wrote: Fri Jul 23, 2021 11:06 am

...there IS another solution. @davids45 came up with it a long time ago, and for quite a while I used it myself; not so much nowadays, since I prefer the use of portable apps wherever possible.

I just noticed here: Xenial doesn't require the 14 dependencies to run Firefox 66. The one app .deb itself runs when installed.

I'm only in X-Tahr because there's no 32-bit X-Xenial.

I could have easily installed manually once and made it standalone but wasn't thinking about it. I just ran into a hurdle, "Hey, why can't I install multiple downloaded packages automatically?"

I consider that a general skill now over this particular project goal (using a browser on-demand without having it permanently installed).

I've two issues here with standalone Firefox.

One is forced updates. Installing a .deb fresh will always be the same version. The other is I didn't think of making it standalone because my other machine has it, so I just saw the hurdle as itself and not the overall goal of just using the app (which would have precluded me from asking the installation quesiton).

Alas standalone would be for Xenial. When you need dependencies that aren't installed to the Firefox directory, it's not going to help if you don't save them.

The ghost system reads like a useful hack if needed.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: How do we install .deb package from the command line?

Post by JASpup »

rockedge wrote: Fri Jul 23, 2021 11:32 am

I think you can modify /root/.packages/DISTRO_COMPAT_REPOS and or /root/.packages/DISTRO_PET_REPOS to include a local directory in the repository chain for the PPM.

If that edits this list it sounds possible:

Attachments
XenialChooseRepositories.png
XenialChooseRepositories.png (38.55 KiB) Viewed 1606 times

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

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

Re: How do we install .deb package from the command line?

Post by rockedge »

I think in /root/.packages/DISTRO_PET_REPOS around line 45 and 60, I think you can insert the path of the local package repo and the name of it. Use the format the others use and don't forget the quote at the end of the stanza. It is one long string.

Code: Select all

#------------------
#PKG_DOCS_PET_REPOS - where to download the pet pkgs databases from.
#------------------
# 1|2|3
#   1 - domain. for testing the url.
#   2 - full URI of the database file.
#   3 - name of db file when local and after being processed into standard format
#  (in the case of PET databases, the names are the same and no processing is required)

if [ "${BUILD_FROM_WOOF//;/_}" != "$BUILD_FROM_WOOF" ] ; then
	WCE_BRANCH="${BUILD_FROM_WOOF%%;*}" #cut -f 1 -d ';'
else
	WCE_BRANCH=testing
fi

PKG_DOCS_PET_REPOS="
z|https://distro.ibiblio.org/puppylinux/Packages-puppy-${DISTRO_DB_SUBNAME}-official|z
z|https://raw.githubusercontent.com/puppylinux-woof-CE/woof-CE/${WCE_BRANCH}/woof-distro/Packages-puppy-noarch-official|z
z|https://raw.githubusercontent.com/puppylinux-woof-CE/woof-CE/${WCE_BRANCH}/woof-distro/x86_64/Packages-puppy-common64-official|z
z|https://distro.ibiblio.org/puppylinux/Packages-puppy-bionic64-official|z
z|https://raw.githubusercontent.com/puppylinux-woof-CE/woof-CE/${WCE_BRANCH}/woof-distro/x86_64/ubuntu/xenial64/Packages-puppy-xenial64-official|z
z|https://raw.githubusercontent.com/puppylinux-woof-CE/woof-CE/${WCE_BRANCH}/woof-distro/x86_64/ubuntu/Packages-puppy-tahr64-official|z
"

#---------
#PET_REPOS - hardcode the pet repos in here...
#---------
# 1|2|3
#   1 - domain. for testing the url.
#   2 - full URI of the repo
#   3 - name of db-file(s) associated with that repo. it may have glob wildcards.
#   ex: Packages-puppy-4-official (note, url paths are in the database)

PET_REPOS='
z|http://distro.ibiblio.org/puppylinux|Packages-puppy-*-official
z|http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux|Packages-puppy-*-official
z|http://ftp.cc.uoc.gr/mirrors/linux/puppylinux|Packages-puppy-*-official
z|ftp://mirror.aarnet.edu.au/pub/puppylinux|Packages-puppy-*-official
z|http://distro.ibiblio.org/puppylinux|Packages-puppy-*-official
z|http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux|Packages-puppy-*-official
z|ftp://ftp.vcu.edu/pub/gnu+linux/puppylinux|Packages-puppy-*-official
z|http://ftp.cc.uoc.gr/mirrors/linux/puppylinux|Packages-puppy-*-official
z|http://mirror.aarnet.edu.au/pub/puppylinux|Packages-puppy-*-official
z|http://mirror.internode.on.net/pub/puppylinux|Packages-puppy-*-official
'

#----------------------
#PACKAGELISTS_PET_ORDER
#----------------------
#   this defines where Woof (and PPM) looks first and second
#   (and third, etc.) for pet pkgs

PACKAGELISTS_PET_ORDER="
Packages-puppy-${DISTRO_DB_SUBNAME}-official
Packages-puppy-common64-official
Packages-puppy-noarch-official
Packages-puppy-bionic64-official
Packages-puppy-xenial64-official
Packages-puppy-tahr64-official
"

#---------------
# fix variables
#---------------
PKG_DOCS_PET_REPOS="$(echo $PKG_DOCS_PET_REPOS)"
PET_REPOS="$(echo $PET_REPOS)"
PACKAGELISTS_PET_ORDER="$(echo $PACKAGELISTS_PET_ORDER)"
User avatar
foxpup
Posts: 186
Joined: Fri Jul 24, 2020 1:23 pm
Location: Europe near the Northsea
Has thanked: 75 times
Been thanked: 32 times

Re: How do we install .deb package from the command line?

Post by foxpup »

pkg has dir2repo. That may be able to add a local repo.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: How do we install .deb package from the command line?

Post by JASpup »

foxpup wrote: Sat Jul 24, 2021 10:11 am

pkg has dir2repo. That may be able to add a local repo.

I'm off pkg if it's going to inexplicably cripple X-Tahr, but rockedge's suggestion I'll check out back in that distro.

I have faith in coders' talents, but feeling the one thing well mantra. A single developer by themself is not going to be able to thoroughly test all machines and scenarios.

I'm in this weird, bizarre, ample 64 system resource land now, concluding that it might be a little masochistic to not use one all the time when that's an option.

I like my old clunkers.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: How do we install .deb package from the command line?

Post by JASpup »

Tahr DISTRO_PET_REPOS is a bit smaller and uses some different formatting.

Code: Select all

#PET_REPOS
#hardcode the pet repos in here...
#first field is for testing the url.
#second field is full URI of the repo
#third field is the name of db-file(s) associated with that repo. it may have glob wildcards.
# ex: Packages-puppy-4-official (note, url paths are in the database)
PKG_DOCS_PET_REPOS="
ibiblio.org|http://distro.ibiblio.org/puppylinux/Packages-puppy-${DISTRO_DB_SUBNAME}-official|Packages-puppy-${DISTRO_DB_SUBNAME}-official ibiblio.org|http://distro.ibiblio.org//puppylinux/Packages-puppy-common-official|Packages-puppy-common-official ibiblio.org|http://distro.ibiblio.org/puppylinux/Packages-puppy-precise-official|Packages-puppy-precise-official 
ibiblio.org|http://distro.ibiblio.org//puppylinux/Packages-puppy-noarch-official|Packages-puppy-noarch-official 
ibiblio.org|http://distro.ibiblio.org//puppylinux/Packages-puppy-wary5-official|Packages-puppy-wary5-official
ibiblio.org|http://distro.ibiblio.org//puppylinux/Packages-puppy-wary5-official|Packages-puppy-wary5-official

The entries are one line I separated by the space between them.

What would be the first field URL for a local directory?
Is the second field an ftp?
Do I need to create a db-file for the third field?

Same space reformatting here:

Code: Select all

#PACKAGELISTS_PET_ORDER
#this defines where Woof (and PPM) looks first and second (and third, etc.) for pet pkgs
PACKAGELISTS_PET_ORDER="
Packages-puppy-${DISTRO_DB_SUBNAME}-official 
Packages-puppy-noarch-official 
Packages-puppy-common-official 
Packages-puppy-precise-official 
Packages-puppy-wary5-official
Packages-***"

***MANUAL ENTRY - What to call this?

rockedge wrote: Sat Jul 24, 2021 2:12 am

I think in /root/.packages/DISTRO_PET_REPOS around line 45 and 60, I think you can insert the path of the local package repo and the name of it. Use the format the others use and don't forget the quote at the end of the stanza. It is one long string.

Code: Select all

#------------------
#PKG_DOCS_PET_REPOS - where to download the pet pkgs databases from.
#------------------
# 1|2|3
#   1 - domain. for testing the url.
#   2 - full URI of the database file.
#   3 - name of db file when local and after being processed into standard format
#  (in the case of PET databases, the names are the same and no processing is required)

if [ "${BUILD_FROM_WOOF//;/_}" != "$BUILD_FROM_WOOF" ] ; then
	WCE_BRANCH="${BUILD_FROM_WOOF%%;*}" #cut -f 1 -d ';'
else
	WCE_BRANCH=testing
fi

PKG_DOCS_PET_REPOS="
z|https://distro.ibiblio.org/puppylinux/Packages-puppy-${DISTRO_DB_SUBNAME}-official|z
z|https://raw.githubusercontent.com/puppylinux-woof-CE/woof-CE/${WCE_BRANCH}/woof-distro/Packages-puppy-noarch-official|z
z|https://raw.githubusercontent.com/puppylinux-woof-CE/woof-CE/${WCE_BRANCH}/woof-distro/x86_64/Packages-puppy-common64-official|z
z|https://distro.ibiblio.org/puppylinux/Packages-puppy-bionic64-official|z
z|https://raw.githubusercontent.com/puppylinux-woof-CE/woof-CE/${WCE_BRANCH}/woof-distro/x86_64/ubuntu/xenial64/Packages-puppy-xenial64-official|z
z|https://raw.githubusercontent.com/puppylinux-woof-CE/woof-CE/${WCE_BRANCH}/woof-distro/x86_64/ubuntu/Packages-puppy-tahr64-official|z
"

#---------
#PET_REPOS - hardcode the pet repos in here...
#---------
# 1|2|3
#   1 - domain. for testing the url.
#   2 - full URI of the repo
#   3 - name of db-file(s) associated with that repo. it may have glob wildcards.
#   ex: Packages-puppy-4-official (note, url paths are in the database)

PET_REPOS='
z|http://distro.ibiblio.org/puppylinux|Packages-puppy-*-official
z|http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux|Packages-puppy-*-official
z|http://ftp.cc.uoc.gr/mirrors/linux/puppylinux|Packages-puppy-*-official
z|ftp://mirror.aarnet.edu.au/pub/puppylinux|Packages-puppy-*-official
z|http://distro.ibiblio.org/puppylinux|Packages-puppy-*-official
z|http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux|Packages-puppy-*-official
z|ftp://ftp.vcu.edu/pub/gnu+linux/puppylinux|Packages-puppy-*-official
z|http://ftp.cc.uoc.gr/mirrors/linux/puppylinux|Packages-puppy-*-official
z|http://mirror.aarnet.edu.au/pub/puppylinux|Packages-puppy-*-official
z|http://mirror.internode.on.net/pub/puppylinux|Packages-puppy-*-official
'

#----------------------
#PACKAGELISTS_PET_ORDER
#----------------------
#   this defines where Woof (and PPM) looks first and second
#   (and third, etc.) for pet pkgs

PACKAGELISTS_PET_ORDER="
Packages-puppy-${DISTRO_DB_SUBNAME}-official
Packages-puppy-common64-official
Packages-puppy-noarch-official
Packages-puppy-bionic64-official
Packages-puppy-xenial64-official
Packages-puppy-tahr64-official
"

#---------------
# fix variables
#---------------
PKG_DOCS_PET_REPOS="$(echo $PKG_DOCS_PET_REPOS)"
PET_REPOS="$(echo $PET_REPOS)"
PACKAGELISTS_PET_ORDER="$(echo $PACKAGELISTS_PET_ORDER)"

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

Post Reply

Return to “Users”