Commit graph

48 commits

Author SHA1 Message Date
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
clime
ee0962dde7 do not include cgit_pkg_list into the package 2017-03-03 10:14:00 +01:00
clime
c9c2df3283 fix crudini usage to get section content and not section header 2017-02-25 22:59:23 +01:00
Pavel Raiskup
cd6821d0ae config: use ini file
Follow up after discussion in PR #11.
2017-02-23 17:12:00 +01:00
clime
28de2f1e63 made data storage paths variable, read from /etc/dist-git/dist-git.conf 2017-02-22 13:14:17 +01:00
clime
ff09d2de55 return back /var/lib/dist-git path for saving data 2017-02-21 16:04:11 +01:00
clime
7a9c2f667b always symlink gitolite's update hook 2017-02-14 16:16:22 +01:00
clime
0b0e150b75 add alternative arch git hook symlink 2017-02-14 07:20:05 +01:00
clime
d80ef11f85 remove gitolite-related comments from mkbranch scripts 2017-02-08 14:28:48 +01:00
clime
58728db83e add -g option in setup_git_package script for gitolite support
also remove check for already existing update hook, make all dist-git scripts executable
2017-02-08 14:28:09 +01:00
clime
fddc4bfa8c cgit_pkg_list added
Although cgit installation is optional, I think we can provide this useful script
2017-02-07 04:49:59 +01:00
clime
8f03e69d81 add kerberos support for lookaside-cache uploading 2017-02-02 15:16:42 +01:00
clime
4fefd7f1d5 reconfiguring package to fit into FedoraInfra 2016-10-31 04:30:33 +01:00
Adam Samalik
a5bcd0b08e optional cgit_pkg_list.sh parameter
to decide where to store pkgs-git-repos-list
2015-07-24 11:58:38 +02:00
Adam Samalik
2caf4f2159 change mv to cp + rm 2015-07-23 14:05:26 +02:00
Adam Samalik
addb175ea6 Change: lookaside dir perms + cgit_pkg_list.sh 2015-07-23 13:29:42 +02:00
Adam Samalik
313aecb8ee config update 2015-06-30 10:43:50 +02:00
Adam Samalik
8a5cf561b4 Upload files to new and old paths + remove email
=============
distgit: Upload files to both the new and old path

Currently, the CGI script is set to upload files:
- to the old path if the upload uses md5
- to the new path if the upload uses sha512

The old path is as follows:
    /%(srpmname)s/%(filename)s/%(hash)s/%(filename)s

The new path is:
    /%(srpmname)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s

This was meant to ensure compatibility with current fedpkg which
always downloads from the old path, but will eventually download from
the new path when we move to sha512.

However, working more on this, I now think it would make for a smoother
transition if we instead always stored the files at the new path, but
just hardlinked to the old path if the upload is using md5.

This is what this patch achieves.

With this deployed in production, fedpkg could be patched to try
downloading from the new path, and fallback to the old one if necessary,
which decouples the migration to the new path from the migration to the
new hash.

=============
distgit: Ensure the folder exists

We can't hard link the file if the folder containing the link
destination does not exist.

Hurray for testing in staging!

=============
distgit: os.link fails if the dest already exists

=============
distgit: And so does os.makedirs

=============
distgit: Actually hardlink over the existing source at the old path
Without this, the file could exist at both the old and new path, taking
the space on the disk twice.

This forces a hardlink if the file already existed at the old path.

=============
Remove the lookaside email hook (rely on fedmsg now).
2015-06-03 13:42:57 +02:00
Adam Samalik
a412858784 git hook: update-block-push-origin 2015-04-15 18:40:56 +02:00
Adam Samalik
c6563e59c2 unused files removed 2015-04-10 11:20:13 +02:00
Adam Samalik
7d8b6f4480 alpha package 2015-03-31 17:17:44 +02:00
Adam Samalik
eea04fcca4 reorganizing files 2015-03-30 14:56:32 +02:00