Commit Graph

23 Commits

Author SHA1 Message Date
Nils Philippsen
74752c3a3c Cope with dangling symlinks
The exists() method uses os.stat() instead of os.lstat() and so doesn't
work for symlinks pointing to a non-existent path. A corresponding
lexists() method doesn't exist yet.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-06-25 10:30:33 +02:00
Nils Philippsen
34d165ab0d Fix hook links to Pagure hookrunner script, too
This doesn't attempt to prefix the base directory if a supplied `target`
is an absolute path (for debugging).

Fixes: fedora-infrastructure#9000

Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-06-25 07:26:50 +00:00
Nils Philippsen
5175246b89 Fix wrong argument help string
Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-06-25 07:26:50 +00:00
Nils Philippsen
a87c762569 Convert to pathlib API for easy path manipulation
The only left over is os.readlink() which was only introduced as
Path.readlink() in Python 3.9.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-06-25 07:26:50 +00:00
Pierre-Yves Chibon
e864768c74 Typi typoes...
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 15:49:44 +02:00
Pierre-Yves Chibon
7b6407df81 Technically we only need os.walk() on forks
The other namespace won't have sub-folders

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 15:46:41 +02:00
Pierre-Yves Chibon
cab27352d2 Some more fixes to the script
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 15:26:02 +02:00
Pierre-Yves Chibon
c825ebf5a0 Another attempt at not going down the rabbit hole
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 15:22:17 +02:00
Pierre-Yves Chibon
8a180b87c0 Fix checking only a specific namespace
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 15:14:28 +02:00
Pierre-Yves Chibon
1320c7f424 Remove a debugging statement
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 14:06:21 +02:00
Pierre-Yves Chibon
0b2079ca11 Add new script to check the post-receive hooks on dist-git
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2018-04-17 12:52:32 +02:00
Patrick Uiterwijk
936e8b261a yum accepted pkg=, package calls it name=
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2017-10-09 00:38:26 +02:00
Patrick Uiterwijk
adcbf72f03 Packageize this, packageize that, packageize the world
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-10-08 22:25:52 +00:00
Pierre-Yves Chibon
59fe50e3f1 Add support for the hooks setup by pagure itself on dist-git
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2017-10-06 09:55:47 +02:00
Pierre-Yves Chibon
254fcc0f13 Fix the check-perms.py script/cron 2017-10-06 08:52:06 +02:00
Pierre-Yves Chibon
b486208ce2 Rework the fedmsg-hook check so that it actually works and give some space to the code 2016-11-01 10:19:09 +01:00
Pierre-Yves Chibon
064118d064 Add the git tag while at it 2016-11-01 09:38:58 +01:00
Pierre-Yves Chibon
e08b9de4c8 Tag the git/checks role 2016-11-01 09:28:58 +01:00
Pierre-Yves Chibon
8d17e6534b Add the alternativearch hook to the check-perms script 2016-11-01 09:20:15 +01:00
Mathieu Bridon
a28756babd git/check-perms: Adapt the script to the Gitolite3 VREF stuff 2015-01-23 11:57:09 +01:00
Pierre-Yves Chibon
b1725c6878 Second fix for the gitolite3 update hook 2015-01-21 11:02:47 +01:00
Mathieu Bridon
3681259c21 git/checks: Check for the update hooks
We are now setting up distgit (and possibily other things like
Fedora Hosted) to use a more elaborate system of update hooks.

This updates the checking script so it is capable of ensuring this set
up.
2014-10-27 10:48:12 +01:00
Mathieu Bridon
16ffb744be Rearrange some tasks
We have a gitolite/check_fedmsg_hooks role, which installs a script and
schedules it.

Turns out, this script does more than just checking the fedmsg hooks,
depending on the command-line arguments used when running it.

As such, it makes sense to separate it out into its own role, and make
the gitolite/check_fedmsg_hooks role (and any other one using the
script) depend on it.

For example, this script is used for Fedora Hosted (still in Puppet),
and will soon be used for a new distgit hook check.
2014-10-27 10:48:12 +01:00