[aur-general] Fields like 'GitRepoPath' in AUR RPC results
Dear AUR developers and users, Not sure whether it's the best place to discuss this problem. Here are my ideas: Current package info returned by rpc.php contains information about a package. For example: $ curl "https://aur4.archlinux.org/rpc.php?type=info&arg=package-query" | json_reformat % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 473 0 473 0 0 400 0 --:--:-- 0:00:01 --:--:-- 400 { "version": 1, "type": "info", "resultcount": 1, "results": { "ID": 197458, "Name": "package-query", "PackageBaseID": 35915, "PackageBase": "package-query", "Version": "1.6.2-1", "Description": "Query ALPM and AUR", "URL": "https://github.com/archlinuxfr/package-query/", "NumVotes": 1007, "OutOfDate": 0, "Maintainer": "archlinuxfr", "FirstSubmitted": 1269472680, "LastModified": 1434485688, "License": "GPL", "URLPath": "/cgit/aur.git/snapshot/package-query.tar.gz", "CategoryID": 1, "Popularity": 0 } } I hope there's an additional GitRepoPath part. For example: { "version": 1, "type": "info", "resultcount": 1, "results": { "ID": 197458, "Name": "package-query", "PackageBaseID": 35915, "PackageBase": "package-query", "Version": "1.6.2-1", "Description": "Query ALPM and AUR", "URL": "https://github.com/archlinuxfr/package-query/", "NumVotes": 1007, "OutOfDate": 0, "Maintainer": "archlinuxfr", "FirstSubmitted": 1269472680, "LastModified": 1434485688, "License": "GPL", "URLPath": "/cgit/aur.git/snapshot/package-query.tar.gz", *"GitRepoPath": "/package-query.git/",* "CategoryID": 1, "Popularity": 0 } } Is it possible with current AUR codebase? Or some patches are necessary? Best Regards, Yen Chi Hsuan
Il 26/07/2015 18:14, Chi Hsuan Yen ha scritto:
Dear AUR developers and users,
Not sure whether it's the best place to discuss this problem. Here are my ideas:
Current package info returned by rpc.php contains information about a package. For example:
$ curl "https://aur4.archlinux.org/rpc.php?type=info&arg=package-query" | json_reformat % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 473 0 473 0 0 400 0 --:--:-- 0:00:01 --:--:-- 400 { "version": 1, "type": "info", "resultcount": 1, "results": { "ID": 197458, "Name": "package-query", "PackageBaseID": 35915, "PackageBase": "package-query", "Version": "1.6.2-1", "Description": "Query ALPM and AUR", "URL": "https://github.com/archlinuxfr/package-query/", "NumVotes": 1007, "OutOfDate": 0, "Maintainer": "archlinuxfr", "FirstSubmitted": 1269472680, "LastModified": 1434485688, "License": "GPL", "URLPath": "/cgit/aur.git/snapshot/package-query.tar.gz", "CategoryID": 1, "Popularity": 0 } }
I hope there's an additional GitRepoPath part. For example:
{ "version": 1, "type": "info", "resultcount": 1, "results": { "ID": 197458, "Name": "package-query", "PackageBaseID": 35915, "PackageBase": "package-query", "Version": "1.6.2-1", "Description": "Query ALPM and AUR", "URL": "https://github.com/archlinuxfr/package-query/", "NumVotes": 1007, "OutOfDate": 0, "Maintainer": "archlinuxfr", "FirstSubmitted": 1269472680, "LastModified": 1434485688, "License": "GPL", "URLPath": "/cgit/aur.git/snapshot/package-query.tar.gz", *"GitRepoPath": "/package-query.git/",* "CategoryID": 1, "Popularity": 0 } }
Is it possible with current AUR codebase? Or some patches are necessary?
Best Regards,
Yen Chi Hsuan
I think it is useless, sincerly, as each package that has a Git repo on AUR4 can be cloned using the URL: ssh+git://aur@aur4.archlinux.org/PACKAGE.git/ where PACKAGE is the name of the package you're looking for. E.g 'foo' -> ssh+git://aur@aur4.archlinux.org/foo.git/ Also, you can use HTTPS instead of SSH for cloning, you would have: https://aur4.archlinux.org/PACKAGE.git You should use this last option if you're not one of the package maintainers. -- Giovanni Santini My blog: http://giovannisantini.tk My code: https://github.com/ItachiSan My code, again: https://gitlab.com/u/ItachiSan My Twitter: https://twitter.com/santini__gio My Facebook: https://www.facebook.com/giovanni.santini My Google+: https://plus.google.com/+GiovanniSantini/ My GPG: 2FADEBF5
On 27 July 2015 at 01:03, Giovanni 'ItachiSan' Santini < giovannisantini93@yahoo.it> wrote:
Il 26/07/2015 18:14, Chi Hsuan Yen ha scritto:
Dear AUR developers and users,
Not sure whether it's the best place to discuss this problem. Here are my ideas:
Current package info returned by rpc.php contains information about a package. For example:
$ curl "https://aur4.archlinux.org/rpc.php?type=info&arg=package-query" | json_reformat % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 473 0 473 0 0 400 0 --:--:-- 0:00:01 --:--:-- 400 { "version": 1, "type": "info", "resultcount": 1, "results": { "ID": 197458, "Name": "package-query", "PackageBaseID": 35915, "PackageBase": "package-query", "Version": "1.6.2-1", "Description": "Query ALPM and AUR", "URL": "https://github.com/archlinuxfr/package-query/", "NumVotes": 1007, "OutOfDate": 0, "Maintainer": "archlinuxfr", "FirstSubmitted": 1269472680, "LastModified": 1434485688, "License": "GPL", "URLPath": "/cgit/aur.git/snapshot/package-query.tar.gz", "CategoryID": 1, "Popularity": 0 } }
I hope there's an additional GitRepoPath part. For example:
{ "version": 1, "type": "info", "resultcount": 1, "results": { "ID": 197458, "Name": "package-query", "PackageBaseID": 35915, "PackageBase": "package-query", "Version": "1.6.2-1", "Description": "Query ALPM and AUR", "URL": "https://github.com/archlinuxfr/package-query/", "NumVotes": 1007, "OutOfDate": 0, "Maintainer": "archlinuxfr", "FirstSubmitted": 1269472680, "LastModified": 1434485688, "License": "GPL", "URLPath": "/cgit/aur.git/snapshot/package-query.tar.gz", *"GitRepoPath": "/package-query.git/",* "CategoryID": 1, "Popularity": 0 } }
Is it possible with current AUR codebase? Or some patches are necessary?
Best Regards,
Yen Chi Hsuan
I think it is useless, sincerly, as each package that has a Git repo on AUR4 can be cloned using the URL:
ssh+git://aur@aur4.archlinux.org/PACKAGE.git/
where PACKAGE is the name of the package you're looking for.
E.g 'foo' -> ssh+git://aur@aur4.archlinux.org/foo.git/
Also, you can use HTTPS instead of SSH for cloning, you would have:
https://aur4.archlinux.org/PACKAGE.git
You should use this last option if you're not one of the package maintainers.
-- Giovanni Santini My blog: http://giovannisantini.tk My code: https://github.com/ItachiSan My code, again: https://gitlab.com/u/ItachiSan My Twitter: https://twitter.com/santini__gio My Facebook: https://www.facebook.com/giovanni.santini My Google+: https://plus.google.com/+GiovanniSantini/ My GPG: 2FADEBF5
Thanks for the information. I was wrong as I thought ssh URLs are only cloneable by maintainers. Now what I need is: { "version": 1, "type": "info", "resultcount": 1, "results": { "ID": 197458, "Name": "package-query", "PackageBaseID": 35915, "PackageBase": "package-query", "Version": "1.6.2-1", "Description": "Query ALPM and AUR", "URL": "https://github.com/archlinuxfr/package-query/", "NumVotes": 1007, "OutOfDate": 0, "Maintainer": "archlinuxfr", "FirstSubmitted": 1269472680, "LastModified": 1434485688, "License": "GPL", "URLPath": "/cgit/aur.git/snapshot/package-query.tar.gz", *"GitRepoPath": "ssh+git://aur@aur4.archlinux.org/package-query.git/ <http://aur@aur4.archlinux.org/package-query.git/>",* "CategoryID": 1, "Popularity": 0 } } Seems the RPC node does not support such a field. Does that mean hardcoded paths are the only option? For example "ssh+git:// aur@aur4.archlinux.org/%s.git/".
On 27/07, Chi Hsuan Yen wrote:
Seems the RPC node does not support such a field. Does that mean hardcoded paths are the only option? For example "ssh+git://aur@aur4.archlinux.org/%s.git/".
Lukas was against adding a field for it, so yes. -- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
Am 27. Juli 2015 01:13:13 MESZ, schrieb "Johannes Löthberg" <johannes@kyriasis.com>:
On 27/07, Chi Hsuan Yen wrote:
Seems the RPC node does not support such a field. Does that mean hardcoded paths are the only option? For example "ssh+git://aur@aur4.archlinux.org/%s.git/".
Lukas was against adding a field for it, so yes.
I don't understand the purpose of this field. It contains no information. You already know the package name, the aur URL and the fact, that they all end with .git. Is this just in case the AUR starts working differently over night?
On 27 July 2015 at 08:01, Sascha Shaw <sascha.shaw@mail.de> wrote:
Am 27. Juli 2015 01:13:13 MESZ, schrieb "Johannes Löthberg" < johannes@kyriasis.com>:
On 27/07, Chi Hsuan Yen wrote:
Seems the RPC node does not support such a field. Does that mean hardcoded paths are the only option? For example "ssh+git://aur@aur4.archlinux.org/%s.git/".
Lukas was against adding a field for it, so yes.
I don't understand the purpose of this field. It contains no information. You already know the package name, the aur URL and the fact, that they all end with .git. Is this just in case the AUR starts working differently over night?
I'm trying to implement https://github.com/archlinuxfr/package-query/issues/11 and https://github.com/archlinuxfr/yaourt/issues/129. In package-query, the tarball URL is from the RPC JSON result, and fallback to the hardcoded one if such an information is not provided by the remote end. I hope to use the same approach to add a field in package-query without loss of consistence in code base, so I'm requesting adding a field in upstream. Using hardcoded paths works just fine, but less elegant in my opinion. Regards, Yen Chi Hsuan
With split packages you can't construct the clone URL simply by using .../$pkgname.git, use PkgBase from rpc.php. --byte
On 27/07, Sascha Shaw wrote:
Am 27. Juli 2015 01:13:13 MESZ, schrieb "Johannes Löthberg" <johannes@kyriasis.com>:
On 27/07, Chi Hsuan Yen wrote:
Seems the RPC node does not support such a field. Does that mean hardcoded paths are the only option? For example "ssh+git://aur@aur4.archlinux.org/%s.git/".
Lukas was against adding a field for it, so yes.
I don't understand the purpose of this field. It contains no information. You already know the package name, the aur URL and the fact, that they all end with .git. Is this just in case the AUR starts working differently over night?
There are two usecases: 1) The git URLs change on the Arch AUR instance in the future, and thus everything has to be changed to use the new one. Not that big of a deal, but still eh. 2) It will be more work to get AUR helpers to work for other AUR instances. With the field you would only need a config option for the RPC interface, and then you'd get everything from it. -- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
Am 27. Juli 2015 12:04:42 MESZ, schrieb "Johannes Löthberg" <johannes@kyriasis.com>:
On 27/07, Sascha Shaw wrote:
Am 27. Juli 2015 01:13:13 MESZ, schrieb "Johannes Löthberg" <johannes@kyriasis.com>:
On 27/07, Chi Hsuan Yen wrote:
Seems the RPC node does not support such a field. Does that mean hardcoded paths are the only option? For example "ssh+git://aur@aur4.archlinux.org/%s.git/".
Lukas was against adding a field for it, so yes.
I don't understand the purpose of this field. It contains no information. You already know the package name, the aur URL and the fact, that they all end with .git. Is this just in case the AUR starts
working differently over night?
There are two usecases:
1) The git URLs change on the Arch AUR instance in the future, and thus
everything has to be changed to use the new one. Not that big of a deal, but still eh.
2) It will be more work to get AUR helpers to work for other AUR instances. With the field you would only need a config option for the RPC interface, and then you'd get everything from it.
Thank you for the insight. We have to consider server load, traffic and another feature more or less to maintain on the server side against convenience on the client side. The traffic impact per call would be around a 10 percent gain or more, depending on the length of the name. However, the same could be said about URLPath, it also has only static information that does not change between packages and could be implemented client side. Now I wonder what's the reason for keeping one and not adding the other, besides the fact that it has not been implemented at all.
On 27 July 2015 at 22:56, Sascha Shaw <sascha.shaw@mail.de> wrote:
Thank you for the insight. We have to consider server load, traffic and another feature more or less to maintain on the server side against convenience on the client side. The traffic impact per call would be around a 10 percent gain or more, depending on the length of the name. However, the same could be said about URLPath, it also has only static information that does not change between packages and could be implemented client side.
Now I wonder what's the reason for keeping one and not adding the other, besides the fact that it has not been implemented at all.
Keeping URLPath helps outdated helpers with the transition on August 8 — they won’t notice the change, because they will just query the new URLPath (git snapshots). Without it, they would just crash and burn with weird bugs. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16
On 27/07, Sascha Shaw wrote:
Am 27. Juli 2015 12:04:42 MESZ, schrieb "Johannes Löthberg" <johannes@kyriasis.com>:
There are two usecases:
1) The git URLs change on the Arch AUR instance in the future, and thus
everything has to be changed to use the new one. Not that big of a deal, but still eh.
2) It will be more work to get AUR helpers to work for other AUR instances. With the field you would only need a config option for the RPC interface, and then you'd get everything from it.
Thank you for the insight. We have to consider server load, traffic and another feature more or less to maintain on the server side against convenience on the client side. The traffic impact per call would be around a 10 percent gain or more, depending on the length of the name. However, the same could be said about URLPath, it also has only static information that does not change between packages and could be implemented client side.
It will likely be less due to compression. -- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
participants (6)
-
Chi Hsuan Yen
-
Chris Warrick
-
Giovanni 'ItachiSan' Santini
-
Jens Adam
-
Johannes Löthberg
-
Sascha Shaw