Preface
Goal: Examine Package Manager, Focus on Command Line Interface
Heaven does exist !
I have been dreaming of having my own lab, examining variety of package manager, using my own notebook. Five years has past, yet still broken dreams I have. I cannot afford high end machine with virtual machine performance. Like a dream come true, docker allow me to install, other distribution without CPU burden. I finally fulfill my destiny.
I can use Docker to learn package management such as, Crux’s Ports, Gentoo’s Portage, Slackware’s Package, Void Linux’s XBPS, Fedora’s DNF, openSUSE’s Zypper, Debian’s APT, and LFS’s Build. Of course they are all interesting.
Diversity
People see Diversity in Linux, as Distribution. Beginner can see how a system can use many Desktop Environment. And coder can see that they can rewrite from one scripting language to another. This is true, but inaccurate. There are other frontier, that is actually fundamental, from the perspective of Operating System.
I do think that we need more focus on other main diversity as well such as
-
Package Manager
-
Init
-
File system
This will encourage beginner to go deeper, than just mainstream blogger topic, such as apt, systemd-based, and ext4-only. Enable broader range of discussion. Gain more diverse knowledge. Thus empower our beloved community.
But I could be wrong about that.
As a result, beginner should narrow how to choose their OS, from choosing distro to choosing package manager.
An enthusiast user should experience package management diversity in linux. And try each. Otherwise, most beginner would stuck, in the mainstream APT-based distribution, as you can see the fact in distrowatch top list.
Testing Tools
The issue with package management learning is, you have to live with it.
The downside of learning package manager is, the need of good internet connection.
There are a few methods.
-
Multiboot. But install so distribution many would be exhausted.
-
Virtualization such as Virtual Box. I only have dual core.
-
Docker or LXC. I actually use docker to learn other Portage and Slackpkg. This is suitable for my resource limitation. As an alternative, there is this LXC. I do not use LXC anymore.
-
Live OS (not recommended). You cannot just use flash disk, trying some command line, and pretend you understand package manager.
Persistence Docker Process
Anyone new with Docker should differ between LXC and Docker. With LXC, the state changed as we exit each image. With Docker, each time we run image, docker spawn a new process.
We need a persistence state that our distro
keep the change we made after exiting the session.
This is why we should beware of the flow. Docker is different with LXC. Docker has image, and process. Each image an be spawn into several container process.
I wish you luck
Package Manager
Genre
This is some mainstream Package Management in Linux.
APT: Advanced Package Tool
ALPM: Arch Linux Package Management
RPM: RPM Package Manager
Portage:
XBPS: X Binary Package System
As for enthusiast user I give link for each source code. I am sure you all love manual.
Do not forget to read the manual first.
Why don’t we go further to read the source code ?
Approximate Timeline for Linux Package Manager Frontend
Data taken from NEWS, wikipedia, Github First Commit, and Change Log. This may not be accurate.
-
maybe 1993: pkgtools/slackpkg
-
1994: dpkg
-
1997: rpm
-
1998: apt-get
-
1999: aptitude
-
2000: portage/emerge
-
2000: ports/prt-get
-
2002: pacman/makepkg
-
2003: yum
-
2003: slapt-get
-
2006: zypper
-
2008: yaourt
-
2010: xbps
-
2010: package-query
-
2010: cower
-
2010: packer
-
2011: pacaur
-
2012: aura
-
2013: apt
-
2014: slpkg
-
2014: asp
-
2015: dnf
-
2016: eopkg
Flow for Learning Linux Distribution
Since we want a persistence distro, we only need one process. So here the step.
(1) Terminal 1: List all images.
If this is empty, you can pull for docker hub.
(2) Terminal 2: List all processes.
This list could be emptyor has several processess. You can delete all unnecessary processes, and start with a clean process.
Note that you can show based on docker id, or docker names.
or
or
You can add the size, so you can monitor how the process grow as you work with your container. But size take a longer calculation as a drawback.
(3) Terminal 3: Run an image to create process
Do use interactive.
And exit from process. You can start later.
A new process will be shown in process list such as inspiring_davinci. Docker give random name automatically.
(4) Terminal 4: Attach process to your favorite terminal
Do not forget to press any character. The docker wait for your response.
After you exit, you need to start the process again.
(5) Open New Terminal
Tips: Without sudo
To avoid typing sudo all the time,
add user in /etc/group
.
Do not forget to logout, and relogin.
Tips: Alias
For convenience you may put aliases to ~/.bashrc
.
Screenshot:
-
OS: Artix Linux
-
WM: Herbstluftwm
Related Screenshot
Alternative: Artix LXC
OS: Artix Linux (formerly Manjaro-OpenRC)
-
Window Manager: HerbstluftWM
-
Panel: Lemonbar
-
Wallpaper: Original Wallpaper
Container: LXC
-
Client: Gentoo
-
Running: emerge
Alternative: Manjaro LXC
OS: Manjaro-OpenRC
-
Window Manager: Awesome (floating mode)
-
Running: pacman, emerge, yum, apt
Docker Collection
These are some docker containers, that I utilize in this blog.
For each I provide the command.
In addition the default latest
tag,
you can use other tag such as tumbleweed
,
rawhide
, stretch
.
There are [ links ] for each docker topic, each article has deeper package management discussion.
SlackPkg
Article: [ Slackware - Package ]
: Slackware: C
- Package Cache (slackpkg)
slapt-get
slpkg
Portage Frontend
Article: [ Gentoo - Portage ]
Emerge
-
https://github.com/gentoo/portage
Portage Library
- /usr/lib/portage
XBPS
Article: [ Void - XBPS ]
XBPS: C
Crux Ports
Article: [ Crux - Ports ]
Pkgutils: Crux: C
Frontend
ALPM Frontend, ASP and AUR Helper”
Article: [ Arch - ALPM ]
ALPM = “Arch Linux Package Management”
Note that ABS tools is deprecated.
Pacman: C
ASP: BASH
Cower: C
Package Query: C
AURA: Haskell
Pacaur: BASH/C
Packer: BASH
Yaourt: BASH/C
RPM Frontend
I do not cover RPM here.
Format
RPM: C
RPM is special in a way that RPM has many front end implementation.
Frontend
URPMI: Mageia: Perl
YUM: Python
DNF Frontend
Article: [ Fedora - DNF ]
DNF (Dandified YUM): Fedora: Python
ZYpp Frontend
Article: [ openSUSE - Zypper ]
Zypper: openSUSE
APT Frontend
Article: [ Debian - APT ]
APT: Python
DPKG: C: Eight Years Ago
apt-src
- No github yet
apt-get
- No github yet
aptitude
- No github yet
LFS Build
Article: [ LFS - Build ]
Miscellanous Docker
Other Frontend
Sol (eopkg replacement in Solus): C
Thank You
#respect
My intention is to give appreciation to the community, because I have many riddled that, I can’t solve without help from the Community. I hope this people do not mind that I put their name here.
-
Arch Linux: “Dean Wallace”:
-
Fedora: “Станислав Нижниченко:, “s10e G” , “Flavio R. Cavalcanti”
-
openSUSE: “Tim Baker”:
-
Slackware: “Roberto Val”, “Flavio R. Cavalcanti”
-
Gentoo: “Darko Luketic”
-
Void Linux: “cintrikz”:
-
Crux Linux: “pitillo”
-
LFS: “Michał Radwański”
Also “Michael Boyle” for EIX advice, and “Linux Lady05 Winter” for giving support, and “Pașca Alexandru” for BTRFS issue for my First openSUSE install.
Thank you so much for being helpful. You are all great sweet people.
Conclusion
This is just a summary, we have not finished yet. There are links for each docker topic on top of this page. Consider reading each topic.
[ Debian - APT ] [ openSUSE - Zypper ] [ Fedora - DNF ] [ Arch - ALPM ] [ Crux - Ports ] [ Void - XBPS ] [ Slackware - Package ] [ Gentoo - Portage ] [ LFS - Build ]
Dream come true
Thank you for reading