Artix Linux Forum

Artix Linux => Software development => Topic started by: Saburouta on 13 August 2023, 23:51:52

Title: Is there an Artix equivalent to `pkgctl`?
Post by: Saburouta on 13 August 2023, 23:51:52
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?
Title: Re: Is there an Artix equivalent to `pkgctl`?
Post by: Dudemanguy on 14 August 2023, 05:40:41
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.
Title: Re: Is there an Artix equivalent to `pkgctl`?
Post by: kiblaster on 11 September 2023, 20:10:15
I'd like something that fetches the package folder, in case you want to build it.

Can you use artixpkg for that?
Title: Re: Is there an Artix equivalent to `pkgctl`?
Post by: Dudemanguy on 11 September 2023, 22:31:04
Just use the git clone command like I said above.
Title: Re: Is there an Artix equivalent to `pkgctl`?
Post by: artoo on 12 September 2023, 12:31:42


Yes.

Code: [Select]
artixpkg git clone $pkgbase
Title: Re: Is there an Artix equivalent to `pkgctl`?
Post by: kiblaster on 12 September 2023, 16:32:37
Code: [Select]
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
Code: [Select]
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
Title: Re: Is there an Artix equivalent to `pkgctl`?
Post by: kiblaster on 29 October 2023, 20:33:42
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:
Code: [Select]
pkgctl repo clone --protocol https <package>
Title: Re: Is there an Artix equivalent to `pkgctl`?
Post by: ####### on 30 October 2023, 02:15:52
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)
Code: [Select]
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.
Title: Re: Is there an Artix equivalent to `pkgctl`?
Post by: gripped on 30 October 2023, 11:36:50
Even supplied with a correct package name
Code: [Select]
artixpkg git clone bash
will fail as it's using ssh and a normal user lacks authorisation.

As mentioned above you can
Code: [Select]
git clone https://gitea.artixlinux.org/packages/bash
Or you can create a bash function for brevity if desired.
in ~/.bashrc
Code: [Select]
getpkgbuild() (
  git clone https://gitea.artixlinux.org/packages/$1
)
Code: [Select]
$ 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
Code: [Select]
function getpkg
git clone https://gitea.artixlinux.org/packages/$argv[1]
end