_ _ _ _ __ __ _ ___| | ____| |_ _ __| | ___ | '_ \ / _` |/ __| |/ / _` | | | |/ _` |/ _ \ | |_) | (_| | (__| < (_| | |_| | (_| | __/ | .__/ \__,_|\___|_|\_\__,_|\__,_|\__,_|\___| |_| Overview ======== packdude is a lightweight, permissively-licensed package manager for Linux (https://www.kernel.org/) distributions. It tries to combine: - The speed and robustness of pacman (https://www.archlinux.org/pacman/) - Easy creation of repositories, as with createrepo (http://createrepo.baseurl.org/) and PPM (http://bkhome.org/woof/ppm.htm) - The "autoremove" feature of Apt (https://wiki.debian.org/Apt) - The ability to extract PPM's (http://bkhome.org/woof/ppm.htm) PET packages on any distribution (using standard command-line tools), despite of their custom format Features ======== - Package download and installation, with recursive dependencies resolution - Package removal, with automatic cleanup of unneeded packages - Support for multiple package repositories Dependencies ============ packdude depends on: - libarchive (http://libarchive.org/) with XZ support (http://tukaani.org/xz/) - SQLite (https://sqlite.org/) - libcurl (http://curl.haxx.se/) - zlib (http://www.zlib.net/) Usage ===== - First, compile your favorite libraries and applications as usual. Put each in a tar archive (https://wikipedia.org/wiki/Tar_(file_format)) compressed using LZMA2 (http://tukaani.org/xz/). Make sure the archive uses relative paths. - Then, use dudepack to convert each archive into a packdude package. - Use repodude to generate a package metadata database. - Upload the packages and the database to the root directory of a web server and name the database "repo.sqlite3". - Test the repository using packdude. FAQ === 'packdude'? Are you serious? ---------------------------- Yes. It's like pacman (https://www.archlinux.org/pacman/), the best package manager around, but very barebones. packdude may lack many features, but it's a true friend. Why build another package manager? ---------------------------------- Since installation and removal of packages is a complex task, binary package managers provide a major performance benefit compared to script-based ones. Most small, community-powered distributions use slow, script-based, home-grown package management solutions. packdude was born as an attempt to provide small distributions with a fast and extremely solid package manager, that is easy to use and doesn't make it hard to contribute packages (something vital for a small distribution). When packdude was conceived, none of the existing, binary packagers matched these criteria. What makes packdude simple? --------------------------- - packdude doesn't ask any questions; it does the right thing and that's it. Once a package is removed, all leftover dependencies are cleaned up automatically, including those of other packages. - The metadata of all packages stored in a packdude repository is contained in one file, a database. - packdude's package format is simple - a tar archive (https://wikipedia.org/wiki/Tar_(file_format)) compressed using LZMA2 (http://tukaani.org/xz/), a four-byte magic number (0x65647564), one byte for the package version and 4 bytes for a CRC32 hash (https://wikipedia.org/wiki/Cyclic_redundancy_check) of the archive. Simple, isn't it? - packdude ships with a tool for easy conversion of archives into packages. This makes it easy to integrate packdude into existing package and distribution building systems. - packdude supports only one repository at a time. What makes packdude fast? --------------------------- - The use of a database, instead of huge text files that need to be read and parsed - packdude is written entirely in C, rather than using scripts for high-level package management logic - Efficient design - packdude doesn't try to achieve perfect parallelism, to keep its code clean and maintainable. Instead, it does things in a logical order: for example, it verifies the sanity of a package before it tries to download and install its dependencies. - The compression algorithm - although compression consumes lots of time and memory, the decompression doesn't - Caching How come packdude is "lightweight" when it has these dependencies? ------------------------------------------------------------------ packdude's dependencies were chosen very carefully. They are permissively-licensed, small, written in C and support static linking: four features required to make packdude a good choice for lightweight or embedded systems. They're not very heavy, but they do introduce minor overhead. However, they can be easily replaced, since packdude's code provides just enough abstraction to hide the nasty details of database handling, compression, file download, etc' from other modules. Why use a database? Real geeks use text files. ---------------------------------------------- That's correct - going the Unix way means text files. However, using text files in a package manager is a mess, since each package has both its metadata (i.e its list of dependencies) and installation information (i.e who initiated its installation and when). It's hard to store this information in files, since this slows down pretty much every aspect of package management and makes error handling a mess in a programming language without support for exceptions. Using a database improves performance with big repositories, simplifies the code and makes debugging easier, since databases store useful information (for example, complete history of executed queries). Moreover, using an embedded database makes it possible to store the metadata of all packages of a repository in a single file that doesn't need to be parsed (unlike text files). Credits and Legal Information ============================= packdude is licensed under a 2-clause BSD license, see COPYING for the license text. For a list of its authors and contributors, see AUTHORS. The ASCII art logo at the top was made using FIGlet (http://www.figlet.org/).