I see that `artools` replaces `devtools`, but I don't see how to facilitate downloading sources from the official repos.
Is there a tool for this on Artix?
We use artixpkg instead. It's a part of artools-pkg. I'm not actually sure if using the clone command with that works if you're not a dev/don't have permissions (never tried). You can always just "git clone https://gitea.artixlinux.org/packages/${package}" though.
I'd like something that fetches the package folder, in case you want to build it.
Can you use artixpkg for that?
Just use the git clone command like I said above.
Yes.
artixpkg git clone $pkgbase
artixpkg git clone artools-pkg
==> Cloning artools-pkg ...
Cloning into 'artools-pkg'...
ssh: connect to host gitea.artixlinux.org port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
==> ERROR: failed to clone artools-pkg
artixpkg git clone https://gitea.artixlinux.org/packages/artools-pkg==> Cloning https://gitea.artixlinux.org/packages/artools-pkg ...
Cloning into 'https://gitea.artixlinux.org/packages/artools-pkg'...
ssh: connect to host gitea.artixlinux.org port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
==> ERROR: failed to clone https://gitea.artixlinux.org/packages/artools-pkg
Could you enable not registered users to clone the repo with artixpkg? Or something else.
If it is not a problem.
For extra you use:
pkgctl repo clone --protocol https <package>
You will NEVER be given permission to clone that package!!!! >:(
That isn't because it is restricted to anyone special, but because it is a sub-package, you can get PKGBUILD's that make more than one package, ;D , see here:
https://gitea.artixlinux.org/packages/artools/src/branch/master/PKGBUILD (https://gitea.artixlinux.org/packages/artools/src/branch/master/PKGBUILD)
pkgbase=artools
pkgname=('artools-base' 'artools-pkg' 'artools-iso')
You need to clone artools instead - there are several packages like that, if you get that error it just means you are trying to clone something that doesn't exist.
Even supplied with a correct package name
artixpkg git clone bash
will fail as it's using ssh and a normal user lacks authorisation.
As mentioned above you can
git clone https://gitea.artixlinux.org/packages/bash
Or you can create a bash function for brevity if desired.
in ~/.bashrc
getpkgbuild() (
git clone https://gitea.artixlinux.org/packages/$1
)
$ getpkgbuild bash
Cloning into 'bash'...
remote: Enumerating objects: 222, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 222 (delta 0), reused 0 (delta 0), pack-reused 218
Receiving objects: 100% (222/222), 35.54 KiB | 35.54 MiB/s, done.
Resolving deltas: 100% (97/97), done.
That will work for most packages except the few with names that differ between the repo and gitea.
eg. pkgbase=libxml++ is libxmlplusplus on gitea
Edit: For those of us who use fish (I just decided to implement this for myself)
In ~/.config/fish/config.fish
function getpkg
git clone https://gitea.artixlinux.org/packages/$argv[1]
end