summaryrefslogtreecommitdiffstats
path: root/roles/distgit/files/dist-git-upload.cgi
Commit message (Collapse)AuthorAgeFilesLines
* dist-git: clean up unused files and the main scriptclime2017-07-131-265/+0
|
* Allow GSSAPI for lookasidePatrick Uiterwijk2016-10-141-0/+3
| | | | Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Make dist-git-upload.cgi PEP8 compliantTill Maas2016-05-171-23/+39
| | | | Signed-off-by: Till Maas <opensource@till.name>
* Move rpms to repositories on all scriptsPierre-Yves Chibon2015-12-211-1/+1
|
* Add the full traceback to the logsMathieu Bridon2015-06-051-0/+2
|
* distgit: Catch all errorsMathieu Bridon2015-06-051-1/+5
| | | | With this, we should never fail silently any more.
* distgit: Reuse the same code to create directoriesMathieu Bridon2015-06-051-12/+13
| | | | | | | | This avoids some race conditions, as testing for a directory existence before creating it is racy. The best way is to try creating it no matter what, and ignore errors when the directory already exists.
* distgit: Add some logs when hardlinks are madeMathieu Bridon2015-06-051-3/+5
|
* distgit: Simplify forming the fedmsg pathMathieu Bridon2015-06-051-5/+1
|
* distgit: Avoid reuploadMathieu Bridon2015-06-051-21/+32
| | | | | | | | | | | | | | The script checks for the file at the new location. As a result, it will report that the file is missing if it had only been uploaded to the old location, which will prompt the client to reupload. With this change, the script will check at the new location, and if it doesn't find the file it will try checking for it at the old location as well. If the file is found at the old location, we hardlink it to the new location, and report the file is available.
* distgit: Drop unused importsMathieu Bridon2015-06-051-3/+0
|
* distgit: Properly make the symlinkMathieu Bridon2015-06-041-1/+1
|
* distgit: One more case of error handlingMathieu Bridon2015-06-041-1/+1
|
* Add a docstring to send_errorMathieu Bridon2015-06-041-0/+9
|
* distgit: Improve error reporting to the clientMathieu Bridon2015-06-041-14/+21
| | | | | | | | | | | | | | | | | There is a send_error method, which sends the error message back to the client. (pyrpkg in our case) Unfortunately, that method doesn't send back an error HTTP status code, which I'm assuming must be interpreted as a "200 OK" status. pyrpkg completely ignore the text sent back by the server, unless the status code is not 200, which means all those errors are silently ignored. This commit makes sure the send_error method will always return an error status ("500 Internal Server Error" by default), and moves all the error handling code to use that method, specifying their own status code if needed.
* distgit: Don't raise, return the error to the clientMathieu Bridon2015-06-041-1/+1
| | | | | Raising only sends the error to the logs, the client thinks everything went fine.
* distgit: Actually hardlink over the existing source at the old pathMathieu Bridon2015-05-291-1/+13
| | | | | | | 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.
* distgit: And so does os.makedirsMathieu Bridon2015-05-291-1/+1
|
* distgit: os.link fails if the dest already existsMathieu Bridon2015-05-291-1/+7
|
* distgit: Ensure the folder existsMathieu Bridon2015-05-291-2/+3
| | | | | | | We can't hard link the file if the folder containing the link destination does not exist. Hurray for testing in staging!
* distgit: Upload files to both the new and old pathMathieu Bridon2015-05-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove the lookaside email hook (rely on fedmsg now).Ralph Bean2015-03-241-40/+0
|
* Strip unwanted prefix from git.lookaside.new messages.Ralph Bean2015-02-191-0/+4
|
* Try to fix lookaside.new fedmsg messages.Ralph Bean2015-02-191-1/+1
|
* distgit: Add the path to the source file to the emitted messagesMathieu Bridon2015-02-091-1/+4
| | | | | | | | This is the counterpart of this change: https://github.com/fedora-infra/fedmsg_meta_fedora_infrastructure/pull/170 Now that is has been deployed, we can start emitting the new messages.
* lookaside: Add the hash type to the folder structureMathieu Bridon2014-10-281-1/+5
| | | | | | This makes it more explicit which hash was used for a given tarball. https://fedorahosted.org/rel-eng/ticket/5846
* lookaside: Add support for sha512 file hashesMathieu Bridon2014-10-281-6/+18
| | | | | | | | | | With this change, the upload CGI script will start preferring uploads hashed as sha512, but still accept md5 as a fallback. The message emitted on fedmsg is unchanged, because doing so would break it. We're going to fix that later though. https://fedorahosted.org/rel-eng/ticket/5846
* lookaside: De-hardcode md5 assumptions...Mathieu Bridon2014-10-281-21/+20
| | | | | | | | | | | | | ... as much as possible. The point of this patch is to make it easier to move away from md5 in a subsequent patch, without having one monster change which would be impossible to review. Some md5 stuff remains hardcoded, because changing it at this point would break compatibility. https://fedorahosted.org/rel-eng/ticket/5846
* lookaside: Drop EL < 6 supportMathieu Bridon2014-10-281-6/+2
| | | | | | | This will make it easier to move away from md5 for the source tarballs. It shouldn't cause any problem anyway, as Fedora runs this on EL 6 in production, and EL 7 in staging.
* lookaside: Remove tempfile when hash verification failsMathieu Bridon2014-10-281-0/+1
| | | | Without this, tempfiles just accumulate.
* Add dist-git-upload cgiKevin Fenzi2014-08-261-0/+219