#225 Permit % character in git.centos.org refs
Closed: Invalid 3 years ago by arrfab. Opened 3 years ago by rohanpm.

The gitolite config used on git.centos.org seems to reject usage of the '%' character, even though this is valid in git refs.

Could this please be tweaked in the gitolite settings (REF_OR_FILENAME_PATT) so the % character can be used?

Context:

  • RPMs have started to appear using the~ character in their names, e.g. "ongres-scram-1.0.0~beta.2-5.el8"
  • This would result in alt-src wanting to push a ref such as: refs/tags/imports/c8-beta/ongres-scram-1.0.0~beta.2-5.el8. However, ~ isn't valid in a ref (rules are in man git-check-ref-format) so it's instead encoded to refs/tags/imports/c8-beta/ongres-scram-1.0.0%7ebeta.2-5.el8.
  • This is a valid git ref, but gitolite's default config rejects it for unknown reasons, producing a log like:
2021-01-22.04:20:29     11994   pre_git rpms/ongres-scram       centosrcm       W       any     refs/.*
2021-01-22.04:20:29     11994           system,git,shell,-c,git-receive-pack '/srv/git//repositories/rpms/ongres-scram.git'
2021-01-22.04:20:30     11994   die     invalid characters in ref or filename: 'refs/tags/imports/c8-beta/ongres-scram-1.0.0%7ebeta.2-5.el8'<<newline>>
2021-01-22.04:20:30     11994   END

See also:


Metadata Update from @siddharthvipul1:
- Issue tagged with: feature-request, high-trouble, medium-gain

3 years ago

Metadata Update from @arrfab:
- Issue assigned to arrfab

3 years ago

Hi @rohanpm
(sorry for "late" answer but just back from PTO)

git.centos.org is using pagure and normally no gitolite config anymore.
I need to check with @pingou if that's a pagure setting that would reject it or something else
If I understand correctly it's only needed for git tags ?

Metadata Update from @arrfab:
- Issue priority set to: Waiting on Reporter (was: Needs Review)

3 years ago

I just did a quick test on git.dev.centos.org pagure instance and % is allowed for git tags :
https://git.dev.centos.org/rpms/httpd/commits/c7-sig-altarch-test-push

This is a just a test so don't look at content but tag imports/c8-httpd-2.4.37-7%betatest contains % character in the tag string and it worked.

Metadata Update from @arrfab:
- Issue tagged with: centos-common-infra

3 years ago

Also, after internal discussion, we see that there was a successful push to git.stg.centos.org, so let me close this inexisting issue on centos-infra

For ref : https://git.stg.centos.org/rpms/ongres-scram/commits/c8-beta

Metadata Update from @arrfab:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata
Boards 1