Commit graph

71 commits

Author SHA1 Message Date
Pavel Raiskup
738dc51b8d Avoid using "whitelist" word 2021-11-23 18:00:50 +01:00
Pavel Raiskup
ea98aabd22 remove_unused_sources: log with PID and DATE 2021-11-23 18:00:39 +01:00
Miroslav Suchý
fcf1244046 rename variable
follow up of #44
2021-11-23 18:00:26 +01:00
Miroslav Suchý
d9dfe63e34 allow to configure name of the master (main) branch
This is preparation for
https://fedoraproject.org/wiki/Changes/GitRepos-master-to-main

For now, there is no change in the name. It still defaults to master. But can be changed by DevOps admin.
2021-09-19 21:25:25 +02:00
Miroslav Suchý
c4ed46aebf specify full path
otherwise the systemd unit will fails when executed from command line and cwd to /etc/dist-git
2021-02-10 12:39:09 +01:00
Silvie Chlupova
003303a065 Garbage collection script
This makes subsequent git clones from the dist-git machine much more IO effective and faster.
It also saves disk space. It cleans up all unnecessary files.
The dist-git-gc script will run monthly.
2020-09-25 15:23:12 +02:00
Pierre-Yves Chibon
9415fff005 Fix the topic of the notifications sent on the bus
In the fedmsg world this was done by the modname passed to the
fedmsg.publish() function but in fedora-messaging there is no
such concept, so we need to pass the exact/correct topic.
This commit fixes that.

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-06-17 17:33:21 +02:00
Pierre-Yves Chibon
b3701269f5 Log a little more information when a generic error is caught
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-06-17 17:33:21 +02:00
clime
d70acba297 fix error messages for fedora messaging 2020-06-15 11:56:08 +02:00
Pierre-Yves Chibon
a2d334e898 Add support for fedora-messaging notifications
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2020-06-11 14:40:57 +02:00
clime
541924646d comment tweak 2020-05-13 09:07:45 +02:00
Jakub Kadlcik
b1574ccad3 Add executable bit for upload.cgi script
It doesn't make much sense to have a shebang in a script that is
not executable. Also, we set 775 permissions to it in a spec file
anyway.

I am adding it because the tests need to run the script.
2020-05-11 12:08:52 +02:00
Jakub Kadlcik
5c4de58f41 Move form hash parsing to its own function 2020-05-03 14:35:06 +02:00
Jakub Kadlcik
77dccfad21 Move fedmsg code to its own function
Except for a simple refactoring that shortens our over-complicated
`main` function, this also have an added value. Not every distgit
instance is interested in sending `fedmsg` messages. In such cases,
we don't want to force them to install the `python-fedmsg` package.
2020-05-03 01:36:43 +02:00
Jakub Kadlcik
57eac00d19 Move config parsing to its own function
At the same time, allow to use a non-default config file by specifying
its path in `DISTGIT_CONFIG` environment variable.
2020-05-02 15:35:26 +02:00
Pavel Raiskup
25a94ec4e7 remove_unused_sources: print to log what we are unlinking 2019-10-02 16:26:23 +02:00
clime
6ff6fb94bd we first need to read all the input to be able to send an error
* this is done by creating the cgi.FieldStorage
2019-06-14 10:34:08 +02:00
clime
3111958b1e use more generic conversion to float for mtime 2019-06-14 10:34:08 +02:00
clime
48f795801f fix bug with renderring error responses
* they were rendered incorrectly due to printing Content-type with
extra new line already in main body. That means error statuses were
not properly handed to httpd. Also fix related buggy test.
2019-06-14 10:34:08 +02:00
Dominik Turecek
ba39b12442 add script for removing unused source tarballs in lookaside cache
The script goes through all branches of a project (specified
by a path to the package git directory) and deletes all sources
in lookaside cache that are not referenced by the latest commits
in any of the branches.
2019-05-17 10:49:17 +02:00
clime
98db9de1ce we need to read whole stdin in post-receive hook to avoid error during git push
the error being 'error in sideband demultiplexer'
2019-03-11 22:28:35 +01:00
clime
465967d52b fix post-receive hook to account for empty post-receive-chained.d 2019-03-11 15:59:05 +01:00
clime
eb9ab02d02 make upload.cgi python2/3 compatible, fix formatting 2019-03-11 12:41:08 +01:00
clime
d2329ea330 add support for setting mtime for an uploaded file 2018-11-15 15:49:13 +01:00
Patrick Uiterwijk
0141af8a39 Use REMOTE_USER as fallback for GSS_NAME
GSS_NAME is only set in a specific configuration (with GssapiLocalNames on).
Make the upload.cgi also work if that configuration is not set.

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2018-09-30 20:34:59 +02:00
clime
1ae51fade8 set umask 0002 in all available dist-git scripts
* not necessary if you run the scripts/hooks as an unprivileged user
but useful if you happen to run them as root, which you probably should
not.
2018-09-24 11:01:25 +02:00
clime
115742f026 do not touch sources file when creating the repo 2018-09-20 11:40:42 +02:00
clime
26bb3048c4 add lookaside_dir option, deprecate cache_dir 2018-08-14 21:06:50 +02:00
clime
a8a544a6ef add deprecated cache_dir_override option
* yes, you read it correctly.
2018-03-27 12:29:54 +02:00
clime
bce932a662 add disable_group_check configuration option for upload script 2018-03-26 20:57:51 +02:00
clime
ba8fd50109 use config.get('upload', 'option') instead of config['upload'].get('option')
* the former does not give internal server error when 'upload' is missing
2018-02-26 14:10:27 +01:00
clime
e0b629ab8c move fedmsgs, nomd5, old_paths config options to [upload] ini section 2018-02-26 09:24:23 +01:00
clime
04073f1108 fix position of default namespace application 2018-02-06 19:30:38 +01:00
clime
ee19bebbb6 remove no longer needed Fedora specific stuff - git hook setup & mail config 2018-02-06 17:47:36 +01:00
clime
3a0c21cb90 added default_namespace config option 2018-02-05 22:12:53 +01:00
clime
8f08d577b0 add 'fedmsgs' and 'old_paths' configuration variables 2018-02-03 18:36:48 +01:00
clime
ba87b8ba32 disable md5 by default 2017-07-24 13:12:58 +02:00
Patrick Uiterwijk
ee14f31cbc
Disallow uploading of new md5 checksummed files
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-07-23 00:09:02 +02:00
Brandon Gray
229a151c87 translate '/' to '-' in package name for mailinglist hook 2017-06-22 14:26:58 -05:00
clime
6debd4a0ad remove mail git hook 2017-05-26 16:31:21 +02:00
clime
eb0c75da81 grokmirror support 2017-05-26 10:10:09 +02:00
clime
aaeaaef8d8 fix name/email switch 2017-05-03 09:47:27 +02:00
clime
02a2bb2d30 store repos directly under git/ 2017-04-08 16:12:27 +02:00
clime
7e7c18f094 fix branch-exists conditions in mkbranch scripts 2017-04-01 10:30:33 +02:00
clime
886602ad82 fix ignore/exit when branch already exists 2017-03-31 11:32:05 +02:00
clime
7e519706f9 return 128 if branch already exists in the mkbranch scripts 2017-03-31 11:23:01 +02:00
clime
08bdc1b048 if package exists, raise a different error code in setup_git_package 2017-03-31 11:02:51 +02:00
clime
0af2fae2a2 set initial commit author with git config instead of git commit --author
The latter does not seem to work if git config was not called for a user doing the commit
2017-03-30 17:07:08 +02:00
clime
77282abfab make gitolite "support" configurable 2017-03-03 11:30:41 +01:00
clime
6c240e12a2 remove unused local script variables 2017-03-03 10:21:09 +01:00