Re: Strange hook in cloned package repositories
Alternatively, rpkg could ship the hook in a more central location (which has exec). This would allow you to set `core.hooksPath` for your fedpkg repos, maybe even automatically by using something like `git config includeif.gitdir:~/fedora/.path ~/.config/git/config.fedora` and putting the hook path config there. ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: Strange hook in cloned package repositories
On 27/03/2023 14:41, Fabio Valentini wrote: It's doing new pre-push checks that were introduced in rpkg 1.66: Thanks for the information. As far as I know, there's no way to disable the checks for now, other than to do "rm .git/hooks/pre-push". Will do, because my $HOME is mounted with 'noexec,nodev,nosuid' flags and on every push it throws a warning: $ git push hint: The '.git/hooks/pre-push' hook was ignored because it's not set as executable. hint: You can disable this warning with `git config advice.ignoredHook false`. I think a new configuration option skip_hooks should be added to the ~/.config/rpkg/fedpkg.conf file. -- Sincerely, Vitaly Zaitsev (vit...@easycoding.org) ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: Strange hook in cloned package repositories
On Mon, Mar 27, 2023 at 2:14 PM Vitaly Zaitsev via devel wrote: > > Hello. > > All of the newly cloned Fedora package repositories have a strange Git > pre-push hook. > > Code listing: > > ``` > #!/bin/bash > > _remote="$1" > _url="$2" > > exit_code=0 > while read -r _local_ref local_sha _remote_ref _remote_sha > do > command -v fedpkg >/dev/null 2>&1 || { echo >&2 "Warning: 'fedpkg' > is missing, \ > pre-push check is omitted. See .git/hooks/pre-push"; exit 0; } > fedpkg pre-push-check "$local_sha" > ret_code=$? > if [ $ret_code -ne 0 ] && [ $exit_code -eq 0 ]; then > exit_code=$ret_code > fi > done > > exit $exit_code > ``` > > What is the purpose of this hook? Is it possible to disable its > generation for my packages? It's doing new pre-push checks that were introduced in rpkg 1.66: https://docs.pagure.org/rpkg/releases/1.66.html#checking-a-repo-configuration-before-git-push-with-a-git-hook-script As far as I know, there's no way to disable the checks for now, other than to do "rm .git/hooks/pre-push". Fabio ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Strange hook in cloned package repositories
Hello. All of the newly cloned Fedora package repositories have a strange Git pre-push hook. Code listing: ``` #!/bin/bash _remote="$1" _url="$2" exit_code=0 while read -r _local_ref local_sha _remote_ref _remote_sha do command -v fedpkg >/dev/null 2>&1 || { echo >&2 "Warning: 'fedpkg' is missing, \ pre-push check is omitted. See .git/hooks/pre-push"; exit 0; } fedpkg pre-push-check "$local_sha" ret_code=$? if [ $ret_code -ne 0 ] && [ $exit_code -eq 0 ]; then exit_code=$ret_code fi done exit $exit_code ``` What is the purpose of this hook? Is it possible to disable its generation for my packages? -- Sincerely, Vitaly Zaitsev (vit...@easycoding.org) ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue