Hi. Attached are a couple of enhancements to rpkg. The first adds a --runas option. This allows you to run Koji commands as a different user, if the Koji hub has been configured to allow you to do so. This is useful for automation that launches builds on behalf of other users. The other patch fixes support for password authentication (it has never worked correctly) and cleans up Koji session creation, so all relevant config options are passed through to the new session. This should improve compatibility between the Koji cli and rpkg. Let me know if there are any questions.
Thanks, Mike
On 10/30/14 1:21 PM, Mike Bonnet wrote:
Hi. Attached are a couple of enhancements to rpkg. The first adds a --runas option. This allows you to run Koji commands as a different user, if the Koji hub has been configured to allow you to do so. This is useful for automation that launches builds on behalf of other users. The other patch fixes support for password authentication (it has never worked correctly) and cleans up Koji session creation, so all relevant config options are passed through to the new session. This should improve compatibility between the Koji cli and rpkg. Let me know if there are any questions.
It came to my attention that these patches broke fedpkg because it passes keyword args as positional args. This patch to fedpkg fixes that, which should make enhancing rpkg and fedpkg easier in the future.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 12 Nov 2014 10:11:31 -0800 Mike Bonnet mikeb@redhat.com wrote:
On 10/30/14 1:21 PM, Mike Bonnet wrote:
Hi. Attached are a couple of enhancements to rpkg. The first adds a --runas option. This allows you to run Koji commands as a different user, if the Koji hub has been configured to allow you to do so. This is useful for automation that launches builds on behalf of other users. The other patch fixes support for password authentication (it has never worked correctly) and cleans up Koji session creation, so all relevant config options are passed through to the new session. This should improve compatibility between the Koji cli and rpkg. Let me know if there are any questions.
It came to my attention that these patches broke fedpkg because it passes keyword args as positional args. This patch to fedpkg fixes that, which should make enhancing rpkg and fedpkg easier in the future.
nak, we need to do this without changing the api, there is other users of rpkg outside of our control, we can not go changing the API on them and breaking their clients. rpkg needs to be changed without changing the API
Dennis
On 11/12/14 5:06 PM, Dennis Gilmore wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 12 Nov 2014 10:11:31 -0800 Mike Bonnet mikeb@redhat.com wrote:
On 10/30/14 1:21 PM, Mike Bonnet wrote:
Hi. Attached are a couple of enhancements to rpkg. The first adds a --runas option. This allows you to run Koji commands as a different user, if the Koji hub has been configured to allow you to do so. This is useful for automation that launches builds on behalf of other users. The other patch fixes support for password authentication (it has never worked correctly) and cleans up Koji session creation, so all relevant config options are passed through to the new session. This should improve compatibility between the Koji cli and rpkg. Let me know if there are any questions.
It came to my attention that these patches broke fedpkg because it passes keyword args as positional args. This patch to fedpkg fixes that, which should make enhancing rpkg and fedpkg easier in the future.
nak, we need to do this without changing the api, there is other users of rpkg outside of our control, we can not go changing the API on them and breaking their clients. rpkg needs to be changed without changing the API
I didn't think the order of kwargs was part of the API. If fedpkg was using the API correctly, order wouldn't matter.
Dennis -----BEGIN PGP SIGNATURE----- Version: GnuPG v2
iQIcBAEBAgAGBQJUZAQDAAoJEH7ltONmPFDRLQEQAJEqKAIgZ0u/FckZ9b5RWhpe SN+aG+Zj1EIUA1/6rlzLEI3W0HaW3NPMbqKjFb+/fjBCJG+0ZOV6oB7gtW5K8FMt TqfO8It+j8ykAxwBp0E3itGsAW9/ZvTPklqbqvTS/AqusQhDmoTvuWluXKv3uWQJ Yr4veSoB8is/7pXDuzM0XI06eFryUhDe904Sst6eBZOEGeJ2GEQLjhVtivJfth8C up42aa6UmC8t8RkTwxS92+5ozG/JzN0G/fTY6d/ZdYu/c1aqpNBvXynZ1hpHNVYm NR4ACiz+9UsHH5YSYKj2GgzcZsiK32umGJceSBUNggDPsuPG4XTWlAXmm4lwE0jQ kKHltGNIHJo1zR4mGKFGYgnytfbnDeMAqsHcfyO1WJMpMtr6Dr0w5awPSHxbC87w eWZyK0E/ZWx9CRBU7eWXmoBfiYo6sWdbC9C4N+chhwFMg745tY6Abzt1x3XxuLrD 2yt452XHBEIuRn7U3m8lFQSt/dbeplSAZEX2DhOldWJCWd8I+WXEYiH5Ch6qMBi5 6CUSVt0a4JXN+La8X0pQcLzFSSNOXKGQasUqF67nFe8J8YT+TOII4RZL9NrtWI2E 5yAGb0BCQMIFTn2DcOUbBkKtEZqBXBjLmsxGKRTQY/sH/2IYWCExAtbiljV4QMSH 6xGJJzofmzUHTLqVpwXF =F7Hb
-----END PGP SIGNATURE-----
buildsys mailing list buildsys@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/buildsys
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 12 Nov 2014 17:17:17 -0800 Mike Bonnet mikeb@redhat.com wrote:
On 11/12/14 5:06 PM, Dennis Gilmore wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 12 Nov 2014 10:11:31 -0800 Mike Bonnet mikeb@redhat.com wrote:
On 10/30/14 1:21 PM, Mike Bonnet wrote:
Hi. Attached are a couple of enhancements to rpkg. The first adds a --runas option. This allows you to run Koji commands as a different user, if the Koji hub has been configured to allow you to do so. This is useful for automation that launches builds on behalf of other users. The other patch fixes support for password authentication (it has never worked correctly) and cleans up Koji session creation, so all relevant config options are passed through to the new session. This should improve compatibility between the Koji cli and rpkg. Let me know if there are any questions.
It came to my attention that these patches broke fedpkg because it passes keyword args as positional args. This patch to fedpkg fixes that, which should make enhancing rpkg and fedpkg easier in the future.
nak, we need to do this without changing the api, there is other users of rpkg outside of our control, we can not go changing the API on them and breaking their clients. rpkg needs to be changed without changing the API
I didn't think the order of kwargs was part of the API. If fedpkg was using the API correctly, order wouldn't matter.
Too early in the day here, you're right. we should fix up fedpkg
Dennis
On 11/13/2014 02:57 AM, Dennis Gilmore wrote:
On Wed, 12 Nov 2014 17:17:17 -0800 Mike Bonnet mikeb@redhat.com wrote:
On 11/12/14 5:06 PM, Dennis Gilmore wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 12 Nov 2014 10:11:31 -0800 Mike Bonnet mikeb@redhat.com wrote:
On 10/30/14 1:21 PM, Mike Bonnet wrote:
[...]
It came to my attention that these patches broke fedpkg because it passes keyword args as positional args. This patch to fedpkg fixes that, which should make enhancing rpkg and fedpkg easier in the future.
nak, we need to do this without changing the api, there is other users of rpkg outside of our control, we can not go changing the API on them and breaking their clients. rpkg needs to be changed without changing the API
I didn't think the order of kwargs was part of the API. If fedpkg was using the API correctly, order wouldn't matter.
Too early in the day here, you're right. we should fix up fedpkg
I've applied 0001-pass-keyword-args-as-keyword-args.patch to fedpkg repo then and pushed to upstream repo.
On 10/30/2014 09:21 PM, Mike Bonnet wrote:
Hi. Attached are a couple of enhancements to rpkg. The first adds a --runas option. This allows you to run Koji commands as a different user, if the Koji hub has been configured to allow you to do so. This is useful for automation that launches builds on behalf of other users.
Looks ok. Applied.
The other patch fixes support for password authentication (it has never worked correctly) and cleans up Koji session creation, so all relevant config options are passed through to the new session. This should improve compatibility between the Koji cli and rpkg. Let me know if there are any questions.
I'm not sure about this patch. You modified "defaults" dictionary: - removed pkgurl key, - changed type and value of krbservice
Are we sure this won't break clients which might depend on this?
On 11/13/14 8:31 AM, Pavol Babincak wrote:
On 10/30/2014 09:21 PM, Mike Bonnet wrote:
Hi. Attached are a couple of enhancements to rpkg. The first adds a --runas option. This allows you to run Koji commands as a different user, if the Koji hub has been configured to allow you to do so. This is useful for automation that launches builds on behalf of other users.
Looks ok. Applied.
The other patch fixes support for password authentication (it has never worked correctly) and cleans up Koji session creation, so all relevant config options are passed through to the new session. This should improve compatibility between the Koji cli and rpkg. Let me know if there are any questions.
I'm not sure about this patch. You modified "defaults" dictionary:
- removed pkgurl key,
pkgurl has been deprecated in Koji for a very long time. It appears nowhere else in the rpkg codebase, and is not passed through to the Koji session or saved as part of the Commands object. Removing it will have no effect on any users.
- changed type and value of krbservice
Changing the default to None just lets the default handling fall through to the Koji ClientSession, where it defaults to the prevous value of "host". This will cause no change in behavior to any users.
Are we sure this won't break clients which might depend on this?
Yes, I have a high level of confidence that this won't break anyone. The only change in behavior will be that some config parameters in the Koji config which were not being respected before (like keepalive, max_retries, anon_retry, etc.) now will be, which should improve consistency between the Koji cli and rpkg-based clis.
Thanks for the review! Mike
buildsys@lists.fedoraproject.org