Skip to main content
Topic: Artix Linux way of installing package from arch mirrors (Read 1706 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Artix Linux way of installing package from arch mirrors

Hello, I have needs to install package not present in Artix Linux

I have used in the past the usual way to add Arch Linux repository and ended up in a mixed system with many packages installed from arch linux world and extra repositories.

Now I have wiped out my root partition and installed everything from artix linux.

But some packages are missing>

tint2
openbox-xdgmenu (from AUR)

and some others.

So the question is> How to add these packages without polluting too much an artixlinux installation.

Regards

Carlo D.

Re: Artix Linux way of installing package from arch mirrors

Reply #1
If you don't want to add the arch repo's then with arch packages you can either fetch them from an arch mirror manually or build the package yourself.
However you also need to take account of dependencies.

In the PKGBUILD for tint2 you'll see
Quote
depends=(gtk3 imlib2 startup-notification)
makedepends=(cmake git ninja setconf)

If you are just downloading the packages from an arch mirror you only need to concern yourself with depends. If you are building the package you need the makedepends as well.

The simplest thing is just to try it and see what errors you get about missing packages and then source them as well (They may have their own depends which you'll need to get if they are not in the artix repos and so on)

All of gtk3 imlib2 startup-notification are in Artix so so downloading the package from it Arch package page and installing it should work fine.
Download https://archlinux.org/packages/extra/x86_64/tint2/download/
in the download directory
Code: [Select]
sudo pacman -U tint2*.zst
To build it yourself make sure base-devel and git are installed
Code: [Select]
sudo pacman -S base-devel git
Code: [Select]
git clone https://gitlab.archlinux.org/archlinux/packaging/packages/tint2
cd tint2
makepkg -si
s tells makepkg to download needed dependencies, i tells makepkg to install after building.

makepkg will complain that setconf is not available so you'd need to build and install that one first
Code: [Select]
git clone https://gitlab.archlinux.org/archlinux/packaging/packages/setconf
cd setconf
makepkg -si
The links for source and prebuilt needed can always be found on the package page as above.

For AUR use an AUR helper such as yay or build manually. In the latter case you can get the build files from the packages AUR page eg. https://aur.archlinux.org/packages/openbox-xdgmenu
"Download snapshot" https://aur.archlinux.org/cgit/aur.git/snapshot/openbox-xdgmenu.tar.gz
Sometimes AUR packages have AUR only dependencies which an AUR helper will resolve for you but of course manually you'll need to resolve yourself.

Packages you install manually will not get updates. You'll have to do it.
And they may break when libraries they depend on get updated.
tint2's dependencies
Spoiler (click to show/hide)
If for example libjpeg is updated and libjpeg.so.8 becomes libjpeg.so.9 tint2 will fail to start. It would either need rebuilding or the updated package downloading and installing.

So if you don't want to enable the arch repos and/or use an AUR helper you'll have more control but also more work.

Jesus I've ended up writing an essay  :o

Re: Artix Linux way of installing package from arch mirrors

Reply #2
If you don't want to add the arch repo's then with arch packages you can either fetch them from an arch mirror manually or build the package yourself.
However you also need to take account of dependencies.

...

So if you don't want to enable the arch repos and/or use an AUR helper you'll have more control but also more work.

Jesus I've ended up writing an essay  :o


Thanks for the exhaustive  explanation, I will try to add tint2 this way, about openbox, I have downloaded the PKGBUILD for  archlinux-xdg-menu and compiled myself renaming artix-xdg-menu only for having a different name.

Now I have to get drivers for my printer and scanner, Brother DCP197.

DONE, simply cloning the package from AUR and compiling locally (installing manually it will make the job, as they are for an old printer, not maintained from 2020 I hope I won't update them very often :-D)

Main concerns in activating arch Linux repositories is that there seems to be not a way to choose from what repo I have to install a package and so many packages were installed from arch linux repos instead from artix linux repos, making  system maintaing a nightmare, expecially during major upgrades in arch linux, artix linux packages versions were behind, making the system instable and not functional from some days.

However thank you again for the explanation, probably the most interesting things would be to ask a maintainer to add tint2 (that seem fairly used among users that don't use DE) and probably trying to make a branded version of "archlinux-xdg-menu".

Regards

Carlo D.

Re: Artix Linux way of installing package from arch mirrors

Reply #3
So long as the artix repo's are above the arch repos in /etc/pacman.conf they should take priority. i.e. packages from artix should be installed in preference to the arch versions where a version exists in both.
However I've never been 100% confident this always works as complications come into play where packages are at different versions and may have 'depends' which specify exact or greater than versions. So I suspect that Arch packages can end up drawing in more Arch packages over time. Just a hunch though. I don't know  ?

You can specify the repo when a package exists in both arch & artix repos

Lets say you wanted to install ninja, which is in both repos, but for whatever reason you wanted to install the arch package.
Just preface with the repo name
Code: [Select]
pacman -S extra/ninja

Conversely if you had the arch ninja installed already but wanted the artix version
Code: [Select]
pacman -S world/ninja

If you only need very few arch packages installing them manually is not a bad idea. As the number grows I think it's probably better to enable the arch repo's. Best solution is for the packages to be added to artix, as you suggest.

Re: Artix Linux way of installing package from arch mirrors

Reply #4
So long as the artix repo's are above the arch repos in /etc/pacman.conf they should take priority. i.e. packages from artix should be installed in preference to the arch versions where a version exists in both.
However I've never been 100% confident this always works as complications come into play where packages are at different versions and may have 'depends' which specify exact or greater than versions. So I suspect that Arch packages can end up drawing in more Arch packages over time. Just a hunch though. I don't know  ?
...
If you only need very few arch packages installing them manually is not a bad idea. As the number grows I think it's probably better to enable the arch repo's. Best solution is for the packages to be added to artix, as you suggest.



In fact it ended up updating packages, and probably requiring newer versions from time to time, making extra arch packages installed instead of world (as example), wihtout too much control (or evidence in pacman) from where packages where installed from.

Most annoying thing is that now I have to tune the myriad of little things I have customized in some years of using Artix, but I'm keeping a diary of package installed, and action required, saving them in a github repo (or other provider) to have a backup.

Thanks again and regards.

Carlo D.

Re: Artix Linux way of installing package from arch mirrors

Reply #5
Checking where package comes from should be easy, replace last word with repo name but keep '^':

Code: [Select]
pacman -Sl | grep "^system"

Code: [Select]
pacman -Sl | grep "^world"

Code: [Select]
pacman -Sl | grep "^galaxy"

Code: [Select]
pacman -Sl | grep "^extra"

Code: [Select]
pacman -Sl | grep "^community"

Yeah packages creeping in because of -Syu with newer versions is significant, even non-related packages get overwritten if they are newer on Arch. I think I'll stick with PKGBUILDS if package that I need doesn't exist on Artix.

Edit: hang on while I check commands above, it seems I am querying where is what in repos, not what I installed. One sec.

Edit2: Yes, above commands are querying what's available, for a moment I thought that's what's pulled it. Give me few days and I'll write proper analyzer where each package comes from and open separate topic.

Re: Artix Linux way of installing package from arch mirrors

Reply #6
Sorry about messy previous post, it does show all the files available in the repo, not only installed ones. However using

Code: [Select]
pacman -Sl "extra" | grep "\[installed\]"

or

Code: [Select]
pacman -Sl "community" | grep "\[installed\]"

does work properly and does shows that significant number of Arch packages do replace original Artix packages. It seems that, even if pacman.conf has proper order of repos, newer packages will be installed anyway.

Re: Artix Linux way of installing package from arch mirrors

Reply #7
That doesn't tell you where a package comes from, it just tells you what packages are in extra or community and whether they are installed. Try pacman -Qi zip (or whatever appears on the list) and it should tell you it was built by the Artix build bot, which certainly means it isn't the Arch version. If things are properly configured there should be no problem. The only edge case I know of is when in rare cases package A has a version specific dependency on package B, which is configured in the PKGBUILD. In this case, Pacman cannot install the wrong version (because A won't work) so it then hunts further on through the available repos looking for B at the correct version, which might be from the Arch repos. Usually this is the correct thing to do, but if the Arch package B has some systemd dependency then it won't work. Package B will not be downloaded again from the Artix repos when the newer version reaches them, until either the version number is incremented on a future update, or it is manually deleted from the cache and reinstalled. As Arch packages are almost always built from the same PKGBUILD as in Artix barring systemd requirements they are mostly effectively identical and interchangeable, also the Artix dev's try very hard to ensure this situation never arises by releasing packages and their deps into the repos together. So in reality Arch packages (almost) never get installed when Artix ones are available and they don't creep in, it has never caused problems for me, and I've been using Artix since before it was called Artix.  :D There have been several version dependency issues I have solved by installing newer packages from the Arch repos however, but that has not been needed recently either.  It can only happen in very rare cases, possibly due to having a package installed that is not widely used so has not been "proofed" somehow against this.

Re: Artix Linux way of installing package from arch mirrors

Reply #8
That doesn't tell you where a package comes from, it just tells you what packages are in extra or community and whether they are installed. Try pacman -Qi zip (or whatever appears on the list) and it should tell you it was built by the Artix build bot, which certainly means it isn't the Arch version.

You are right, I run some more tests yesterday that show that -Sl lists everything in the repo, so the [installed] can show in multiple repos. The only real test is looping trough all the installed packages and checking who built it. Is there any script/snippet available to do this?

Re: Artix Linux way of installing package from arch mirrors

Reply #9

I'm  quite happy with the actual state as I have to import package files for:
- tint2
- numlockx
- jgmenu

and build from AUR:

brother-dcp197c.git
brscan3.git
texlive-installer.git

But I have not installed the last needed package that is FreeCAD from a repository made by one of FreeCAD maintainer for Arch Linux, that I suspect will bring in some problematic dependendencies from Arch Linux, let's see.

However, having a way to see in pacman (or some wrapper developed for artixlinux) some warnings that will show that packages have to be downloaded from arch repos, will  improve things and will help to have a clean installation.

one minor things is that I have to compile downloading PKGBUILD from arch packages:

- arch-xdg-menu to have a decent application menu in openbox, let's see if I can extract partially from the arch package only the executables files and creeate a proper menu tree that satisfy my needs.
- beep

Thanks for the interesting post.

Regards

Carlo D.