I don't like PPM, because:
- It's slow as hell. It does lots of text processing using shell scripts, which is a big no-no.
- It's contaminated with huge amounts of old code and ugly hacks. It was born very long ago and keeps growing since then.
- Its native package format, PET, is poorly designed. It's the only package format I'm aware of, which has a sub-directory named after the package.
- Its repositories format is error-prone and doesn't work well with big repositories (annoying missing package errors in Woof).
- All stages in the process of creating PET packages are manual. Some are even graphical (dir2pet).
However, I don't think using another distro's package manager in Puppy is a good idea. If we go this way, I think pacman is the way to go. It's fast, easy to use and gets the job done. However:
- I think it could be even simpler and lighter.
- I don't see any reason why a package manager should ask questions.
- I think it's nice to have a package manager that does maintenance tasks automatically, without prompting the user.
I think we should kick PPM and replace it with a simple and solid package manager. Support for Debian, Slackware or Ubuntu packages can be provided in the form of converted packages (i.e a tool that converts an entire Slackware repository into a "native" repository).
That's why I wrote packdude, a small package manager inspired by pacman, which supports only one, simple package format. I post it here as a "technology preview" - I'd like to hear more opinions about this idea and get some feedback.
It's still young, so its features are quite limited:
- Package download and installation
- Fast and efficient package lookup, thanks to SQLite
- Lightweight decompression, using miniz (as opposed to LZMA2, as used by most major distros today)
- Fast package integrity verification, using the miniz CRC32 routine (instead of the zlib one)
- Support for multiple download protocols, via libcurl
- Fast, recursive dependencies resolution
- Package removal
- Automatic, recursive cleanup of unneeded dependencies
- Repositories
- Support for one, hardcoded repository
- repodude, a repository database generator, inspired by createrepo
- Package creation
- dudepack, a tool that converts tar archives into packages
- dudeunpack, a package extraction tool
- Distro building
- Support for working under a prefix as a regular user - i.e install packages to /tmp instead of /
Then, on top of that tool, we can build another tool, which converts a clean installed Puppy into a bootable ISO - a very thin and elegant tool that replaces woof-CE. This tool can used by remastering tools, too.
packdude is still considered experimental and may ruin your system. Use it at your own risk.
Sample Output
Installation of mtPaint:
Code: Select all
[Tue May 6 12:55:09 2014](INFO): Fetching the package database from <censored>
[Tue May 6 12:55:10 2014](INFO): Downloading mtpaint-git05052014.dude
[Tue May 6 12:55:11 2014](INFO): Verifying the integrity of ./var/packdude/archive/mtpaint-git05052014.dude
[Tue May 6 12:55:11 2014](INFO): Downloading libjpeg_turbo-1.3.0.dude
[Tue May 6 12:55:11 2014](INFO): Verifying the integrity of ./var/packdude/archive/libjpeg_turbo-1.3.0.dude
[Tue May 6 12:55:11 2014](INFO): Downloading musl-1.1.0.dude
[Tue May 6 12:55:12 2014](INFO): Verifying the integrity of ./var/packdude/archive/musl-1.1.0.dude
[Tue May 6 12:55:12 2014](INFO): Downloading linux_headers-2.6.32.61.dude
[Tue May 6 12:55:14 2014](INFO): Verifying the integrity of ./var/packdude/archive/linux_headers-2.6.32.61.dude
[Tue May 6 12:55:14 2014](INFO): Unpacking linux_headers
[Tue May 6 12:55:14 2014](INFO): Registering linux_headers
[Tue May 6 12:55:14 2014](INFO): Sucessfully installed linux_headers
[Tue May 6 12:55:14 2014](INFO): Unpacking musl
[Tue May 6 12:55:14 2014](INFO): Registering musl
[Tue May 6 12:55:14 2014](INFO): Sucessfully installed musl
[Tue May 6 12:55:14 2014](INFO): Unpacking libjpeg_turbo
[Tue May 6 12:55:14 2014](INFO): Registering libjpeg_turbo
[Tue May 6 12:55:14 2014](INFO): Sucessfully installed libjpeg_turbo
[Tue May 6 12:55:14 2014](INFO): Downloading libpng-1.6.10.dude
[Tue May 6 12:55:14 2014](INFO): Verifying the integrity of ./var/packdude/archive/libpng-1.6.10.dude
[Tue May 6 12:55:14 2014](INFO): Downloading zlib-1.2.8.dude
[Tue May 6 12:55:14 2014](INFO): Verifying the integrity of ./var/packdude/archive/zlib-1.2.8.dude
[Tue May 6 12:55:14 2014](WARNING): musl is already installed; skipping
[Tue May 6 12:55:14 2014](INFO): Unpacking zlib
[Tue May 6 12:55:14 2014](INFO): Registering zlib
[Tue May 6 12:55:14 2014](INFO): Sucessfully installed zlib
[Tue May 6 12:55:14 2014](INFO): Unpacking libpng
[Tue May 6 12:55:14 2014](INFO): Registering libpng
[Tue May 6 12:55:14 2014](INFO): Sucessfully installed libpng
[Tue May 6 12:55:14 2014](INFO): Downloading tiff-4.0.3.dude
[Tue May 6 12:55:21 2014](INFO): Verifying the integrity of ./var/packdude/archive/tiff-4.0.3.dude
[Tue May 6 12:55:21 2014](WARNING): musl is already installed; skipping
[Tue May 6 12:55:21 2014](WARNING): zlib is already installed; skipping
[Tue May 6 12:55:21 2014](WARNING): libjpeg_turbo is already installed; skipping
[Tue May 6 12:55:21 2014](INFO): Unpacking tiff
[Tue May 6 12:55:22 2014](INFO): Registering tiff
[Tue May 6 12:55:22 2014](INFO): Sucessfully installed tiff
[Tue May 6 12:55:22 2014](INFO): Downloading gifsicle-1.82.dude
[Tue May 6 12:55:22 2014](INFO): Verifying the integrity of ./var/packdude/archive/gifsicle-1.82.dude
[Tue May 6 12:55:22 2014](INFO): Downloading giflib-4.2.3.dude
[Tue May 6 12:55:22 2014](INFO): Verifying the integrity of ./var/packdude/archive/giflib-4.2.3.dude
[Tue May 6 12:55:22 2014](WARNING): musl is already installed; skipping
[Tue May 6 12:55:22 2014](INFO): Unpacking giflib
[Tue May 6 12:55:22 2014](INFO): Registering giflib
[Tue May 6 12:55:22 2014](INFO): Sucessfully installed giflib
[Tue May 6 12:55:22 2014](INFO): Unpacking gifsicle
[Tue May 6 12:55:22 2014](INFO): Registering gifsicle
[Tue May 6 12:55:22 2014](INFO): Sucessfully installed gifsicle
[Tue May 6 12:55:22 2014](INFO): Unpacking mtpaint
[Tue May 6 12:55:22 2014](INFO): Registering mtpaint
[Tue May 6 12:55:22 2014](INFO): Sucessfully installed mtpaint
Code: Select all
[Tue May 6 12:56:45 2014](INFO): Fetching the package database from <censored>
[Tue May 6 12:56:45 2014](INFO): Removing files installed by mtpaint
[Tue May 6 12:56:45 2014](INFO): Unregistering mtpaint
[Tue May 6 12:56:45 2014](INFO): Successfully removed mtpaint
[Tue May 6 12:56:45 2014](INFO): Cleaning up unneeded packages
[Tue May 6 12:56:45 2014](INFO): Removing files installed by libpng
[Tue May 6 12:56:45 2014](INFO): Unregistering libpng
[Tue May 6 12:56:45 2014](INFO): Successfully removed libpng
[Tue May 6 12:56:45 2014](INFO): Removing files installed by tiff
[Tue May 6 12:56:45 2014](INFO): Unregistering tiff
[Tue May 6 12:56:45 2014](INFO): Successfully removed tiff
[Tue May 6 12:56:45 2014](INFO): Removing files installed by gifsicle
[Tue May 6 12:56:45 2014](INFO): Unregistering gifsicle
[Tue May 6 12:56:45 2014](INFO): Successfully removed gifsicle
[Tue May 6 12:56:45 2014](INFO): Removing files installed by libjpeg_turbo
[Tue May 6 12:56:45 2014](INFO): Unregistering libjpeg_turbo
[Tue May 6 12:56:45 2014](INFO): Successfully removed libjpeg_turbo
[Tue May 6 12:56:45 2014](INFO): Removing files installed by zlib
[Tue May 6 12:56:45 2014](INFO): Unregistering zlib
[Tue May 6 12:56:45 2014](INFO): Successfully removed zlib
[Tue May 6 12:56:45 2014](INFO): Removing files installed by giflib
[Tue May 6 12:56:45 2014](INFO): Unregistering giflib
[Tue May 6 12:56:45 2014](INFO): Successfully removed giflib
[Tue May 6 12:56:45 2014](INFO): Removing files installed by musl
[Tue May 6 12:56:46 2014](INFO): Unregistering musl
[Tue May 6 12:56:46 2014](INFO): Successfully removed musl
[Tue May 6 12:56:46 2014](INFO): Removing files installed by linux_headers
[Tue May 6 12:56:46 2014](INFO): Unregistering linux_headers
[Tue May 6 12:56:46 2014](INFO): Successfully removed linux_headers
- Package categories and description (easy to add, nothing but more two columns in the database )
- Package updating
- Integration with PPM's gtkdialog interface - I think it would be amazing if I could replace PPM's backend with packdude, but keep the same interface - zero headaches for users, but greatly improved performance and robustness.
Building
You'll need GCC, make, Git, libcurl, sqlite3 and libarchive to build packdude. The devx of all modern Puppies should contain all these packages, but may lack libarchive.
Code: Select all
git clone https://github.com/iguleder/packdude.git
cd packdude
make
By default, packdude is configured to use a repository of static 64-bit packages I built for personal use. You can use these packages on any 64-bit distro, including Slacko64 and Fatdog.
You can try out packdude without doing any damage to your system, by using an installation prefix:
Code: Select all
mkdir -p /tmp/var/packdude/archive
packdude -p /tmp -i mtpaint
If anything fails or takes a long time, you can re-run packdude with "-d" to get tons of debugging information:
Code: Select all
packdude -p /tmp -i mtpaint -d
Test Case #1
Install two packages with some common dependencies:
Code: Select all
packdude -i tinyxserver -p /tmp
packdude -i libpng -p /tmp
Test Case #2
Install two packages with a common dependency, then remove one of them. The common dependency should remain installed:
Code: Select all
packdude -i mtpaint -p /tmp
packdude -i rox -p /tmp
packdude -r mtpaint -p /tmp
packdude -r rox -p /tmp
Test Case #3
Install a package, then install multiple packages that depend on it and remove them. The first package should remain installed, because it was installed by the user and not as a dependency.
Code: Select all
packdude -i zlib -p /tmp
packdude -i mtpaint -p /tmp
packdude -i tinyxserver -p /tmp
packdude -i rox -p /tmp
packdude -i lazy_utils -p /tmp
packdude -i dropbear -p /tmp
packdude -i bftpd -p /tmp
packdude -i curl -p /tmp
packdude -r mtpaint -p /tmp
packdude -r tinyxserver -p /tmp
packdude -r rox -p /tmp
packdude -r lazy_utils -p /tmp
packdude -r dropbear -p /tmp
packdude -r bftpd -p /tmp
packdude -r curl -p /tmp
Test Case #4
Install packdude using packdude
Code: Select all
packdude -i packdude -p /tmp