Page 1 of 1

I sort of installed APT, dpkg and pkg on upupGG+D

Posted: Sat Dec 19, 2020 8:49 am
by s243a

I'm not trying to entice anyone to the darkside here. In some ways, I like the puppy package manager better than apt/dpkg but in other ways I don't. upupGG+D (AKA GroovyPup) is a good candidate to experiment with apt on puppy because the package versions don't exactly match between Grove Gorilla and Bullseye. If this causes any issues then I think that dpkg will be better at resolving them then either ppm or pkg. Howevber, on the downside apt/dpkg is easier to break than ppm/pkg and cannot utilize foreign repo types like pet repos..

That said, on upupGG+D, the puppy package manager is failing to install some things that I can install with pkg and for some packages (e.g. libreoffice) I haven't been able to get working via either pkg or the ppm (puppy package manager) on upupGG+D. Maybe I can do so with apt/dpkg. However, I'm taking this slow.

The only thing that I've done so far was to create a scipt to create the dpkg status file from the ppm metadata and the script should likely have some checkes against duplicates because duplicate entries in the status file can break apt/dpkg.

For info about this script see my post:
Create dpkg status file from ppm metadata

What inspired me to do this is that I wanted to learn how to compile the debain source package for libreoffice. However, I also thought that apt/dpkg might be better at choosing the correct package version then the ppm and I also thought it might handle multi-arch better than the ppm.

Tonight I decided to delve a little bit deeper and see if my script will let some of the apt/dpkg features work that otherwise wouldn't. The reason being, is that I discovered that you can use dpkg-deb to extract specific files from a tar archive, without extracting all the files. I thought that this could be useful for creating document packages. E.g. packages that just add the manpages of a pacakge and nothing else. I discussed how to do this in another post:
viewtopic.php?p=12691#p12691

and now, I thought, well since I've already installed the full version of dpkg and it allowed me to extract files in the way, I want, I wonder what else might work. So I decided to install, apt, and then I created the following sources.list file:

I than ran

Code: Select all

apt-get update

and checked to see if the following command would work:

Code: Select all

# apt-cache search bash | grep ^bash
bash - GNU Bourne Again SHell
bash-completion - programmable completion for the bash shell
bash-doc - Documentation and examples for the GNU Bourne Again SHell
bash-builtins - Bash loadable builtins - headers & examples
bash-static - GNU Bourne Again SHell (static version)
bashtop - Resource monitor that shows usage and stats

and it did. However, maybe this command would have worked anyway without the status file? I"m not sure.

So far that's all I tested. I want to try installations of pacages in a sandboxed environment using dpkg and I am tweaking my sandbox scripts. I'm also missing some key rings, that I need for my sources.list file to be fully utilized. I'm also missing some metadata for dpkg about the list of files in the packages. Finally, I want to be able to sync apt/pkg with pkg/ppm. I'll get around later to adding what I'm missing here and adding sync capabilities.

I'm in no rush here because pkg works very will for me and also for things I can't get working on upupGG+D, I'm finding that x11forwarding works quite well from fatdog64. I will update this thread as I make further progress. My thought was to use apt/dpkg in a sandboxed environment as a way of building sfs files for cases where ppm or pkg might have difficulty. Libreoffice is one such case due to multiple alternatives for java versions / implementations.

P.S. some instructions for installing the google keyring can be found at:
https://www.google.com/linuxrepositories/
**Not sure the security implications of doing this. It looks like the tor keyring is available in the ubuntu repos:
https://www.ubuntuupdates.org/package/t ... rg-keyring


Re: I sort of installed APT, dpkg and pkg on upupGG+D

Posted: Tue Feb 16, 2021 7:50 pm
by s243a

I've updated the above script to sync the status file:

I've also added a script to sync the list of files contained in a package:

In the first script I now have the AWK code in an external file rather as a string (. However, I should use the string as a fallback):

The code at the moment might not work any more on the host system because I wanted to apply it to a subfolder (like a chroot folder) to get around this edit the line that is of the form "CHROOT_DIR=..." to:

Code: Select all

CHROOT_DIR=""

in order for it to work on the host system. In the future, I'll add command line options so this doesn't have to be done. Also note the code that syncs the file lists is somewhat risky if you are upgrading or uninstalling these packages because the way Woof-CE works is that certain packages are grouped together in a single list. This is so it there are fewer options to decide on when deciding which packages to include vs excuse in a puppy.

My code works as follows. If the file list refers to a single package then:
the file list in "/var/packages/builtin-breakout" is hardlinked to the file list in "/var/packages/builtin_files". Otherwise symlinks are used. In the latter case there could be multiple symlinks pointing to the same file.

The idea here is the symlink servers as a reminder that there is further work left to do to break the file list into file lists for seperate packages. Also when symlinks are used there is a third symlink created in /var/lib/dpkg/info that points to the related file in /var/packages/builtin-breakout but when hardlinks are used all three files are hardlinked together.

TODO: Currently, my code is assuming that the file lists are based on the packages in the binary compatible distribution. However, this isn't always the case so more thought and coding will need to be done for this special case.