You are not logged in.
I spent basically my whole day off today working on this project I have wanting for several years.
It is a package management system for pacman, or yay (or, theoretically, it could also work for other package managers). Rather than having to execute install and remove commands manually, PacTxtMan allows you to specify your packages in a special text file. This makes it super easy to keep track of what you have installed (because you can organize it) and also makes it super easy to keep multiple systems in sync or reinstall everything you want when reinstalling the OS.
https://github.com/JonathanILevi/pactxtman
Pactxtman works with a file called `pacman.txt`, typically in `/etc` or `~/.config`.
A simple example:
```
# CORE
base linux linux-firmware
sudo make gcc
# GUI
sway swayidle swaylock dmenu
# APPS
xterm
firefox vlc
```
Or get more advanced with nested grouping:
```
: System
base linux linux-firmware
: GUI
: Sway # Cuz sway is the best!
sway swayidle swaylock
xorg-xwayland
dmenu
xorg-xrdb qt5ct
xterm
: Audio
# Modern pipewire instead of pulseaudio!
pipewire pipewire-alsa pipewire-pulse
alsa-utils pavucontrol
helvum easyeffects
: Internet
wpa_supplicant dhcpcd
# etc...
```
pactxtman can be run in the background to automagically install/remove packages whenever `pacman.txt` is edited (`pacman.txt` should only be writable by root!). Or pactxtman can be ran only when you want to commit changes. It could also, theoretically, just be used as a way check what differences exist.
There are definitely still a few bugs and lacking features, but I am already using it myself. I plan to get it in the AUR in the near future.
What do you think? I don't know if anyone else out there is like me and would find this useful... Have any input on how it could be improved?
Offline
Rather than having to execute install and remove commands manually, PacTxtMan allows you to specify your packages in a special text file.
Did you know pacman can accept a list from STDIN?
archie:~$ tee packages <<!
> vim
> git
> firefox
> !
vim
git
firefox
archie:~$ doas pacman -S - <packages
warning: vim-8.2.3582-3 is up to date -- reinstalling
warning: git-2.34.1-1 is up to date -- reinstalling
warning: firefox-95.0-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (3) firefox-95.0-1 git-2.34.1-1 vim-8.2.3582-3
Total Download Size: 66.78 MiB
Total Installed Size: 263.28 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] n
archie:~1$
But your tool does allow for a daemon, which may be useful for some, so thanks for the contribution
Oh, and the correct spelling is "systemd", no capitals.
Para todos todo, para nosotros nada
Offline
Did you know pacman can accept a list from STDIN?
I did not remember that. That would probably be appropriate to use in case the list of packages is ever too long.
Pactxtman has some other advantages over your example of piping input from a file. Pactxtman's `pacman.txt` can be conveniently organized and with comments etc. Pactxtman also only tries to install packages which are not already installed, so pacman will not try to reinstall (although pacman probably does have a flag for that). Pactxtman also can be used for removing packages, removing packages not listed or explicitly by marking them (with `!package`).
Here is an example output of pactxtman:
https://user-images.githubusercontent.c … d771ea.png
moderator edit -- replaced oversized image with link.
Pasting pictures and code
Last edited by 2ManyDogs (2021-12-18 23:54:04)
Offline
Neat Idea.
You should provide a little more info, like installation, configuration and whatnot.
I keep a list of installed packages that gets updated with a pacman hook. I keep that list on a zpool mirror that hangs of a usb port. Everything that I need to rebuild this machine resides on that pool.
I was wondering if it is possible to run pactxtman from somewhere like that.
Offline
Thanks for the interest! I appreciate the advice too!
The repo readme gives a little more explanation.
A prebuilt binary is provided in the dist folder.
The tool is written in D, the build.sh in the root of the project can be used to rebuild (make sure Dmd us installed).
PacTxtMan currently has no configuration file, everything is configured with commandline arguments. I will be adding a config file at some point to make things easier. Try `pactxtman --help` or the repo readme.
PacTxtMan could absolutely be run portably from a removable media. I haven't used zpool or ZFS filesystems before but as long as a file can be referenced with a filepath and opened with standard file read APIs then PacTxtMan can parse it. Try using `sudo pactxtman -f ./pacman.txt`. This will run it interactivly to allow you to confirm operations.
Offline