summaryrefslogtreecommitdiffstats
path: root/roles/distgit
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Add some distgit tagsPierre-Yves Chibon2015-06-051-0/+20
|
* 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: Pretend we're on NFSMathieu Bridon2015-06-051-0/+8
| | | | | | Staging doesn't use NFS for its lookaside cache, like Prod does. This makes SELinux happier, pretending that staging also is on NFS.
* Update upload_cgi and add cgi-nfs for pkgsPatrick Uiterwijk2015-06-055-6/+33
| | | | Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* distgit: Properly make the symlinkMathieu Bridon2015-06-041-1/+1
|
* distgit: One more case of error handlingMathieu Bridon2015-06-041-1/+1
|
* Store the new version of the selinux policy for distgitPierre-Yves Chibon2015-06-041-0/+0
|
* Require the types git_script_t and nfs_tPierre-Yves Chibon2015-06-041-0/+2
|
* 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.
* Allow git_script_t to create link on NFSPierre-Yves Chibon2015-06-041-0/+3
|
* 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.
* (fedmenu) extract the package name from the url.Ralph Bean2015-04-241-5/+11
|
* Add forgotten slash.Ralph Bean2015-04-241-1/+1
|
* Undo this stg/prod distinction.Ralph Bean2015-04-243-82/+3
|
* Try the fedmenu header for stg cgit.Ralph Bean2015-04-241-1/+20
|
* Typofix.Ralph Bean2015-04-241-1/+1
|
* Try adding a custom cgit header for staging.Ralph Bean2015-04-243-0/+10
|
* Typofix.Ralph Bean2015-04-241-1/+1
|
* Make cgitrc into separate files for prod and staging.Ralph Bean2015-04-242-1/+84
|
* Fix http{s} git cloning on pkgs. Fixes ticket 4688Kevin Fenzi2015-04-231-0/+7
|
* Remove the lookaside email hook (rely on fedmsg now).Ralph Bean2015-03-241-40/+0
|
* We need the _exec version off coursePatrick Uiterwijk2015-03-131-2/+2
|
* More fixes to selinux pkgsPatrick Uiterwijk2015-03-131-2/+2
|
* Same fix on more placesPatrick Uiterwijk2015-03-131-2/+2
|
* This type is always nfs_t, and we have a policy to allow that..Patrick Uiterwijk2015-03-121-8/+0
|
* Update policies to be compatible with RHEL7Patrick Uiterwijk2015-03-122-6/+8
|
* Try and fix git branches sync to work with git packed refs.Kevin Fenzi2015-03-061-63/+91
|
* Fix setup_git_package to handle setting up after gitolite setup a broken repoPatrick Uiterwijk2015-02-271-2/+8
| | | | | | | | | | | | | setup_git_package did the same check as pkgdb_sync did [1]. Also, if gitolite already came by, it will have created an update hook, which blocks us from pushing the initial commit (since gitolite has no idea who we are). So in that case, we will just remove the update hook: gitolite will recreate it when it comes by the repo with genacls.sh. The change to mkdir -p is just synto make it not print an error in case the directory already existed. [1]: https://lists.fedoraproject.org/pipermail/infrastructure/2015-February/015600.html Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Make pkgdb_sync more resilient by always calling SETUP_PACKAGE if master ↵Patrick Uiterwijk2015-02-271-1/+1
| | | | | | | | | | | | | | | | | does not exist This should make it recover in case there are any repos in a weird state (aka, no master branch). This could for example happen if the package was created in pkgdb after pkgdb_sync ran, but before genacls.pkgdb runs, because then gitolite will see it as a new repo, and create a totally blank repo. Especially since pkgdb_sync will abort after the first error, it would then leave all later created repos broken as well. Calling setup_git_package in a repo without master branch has no ill effect: - Running git init on a pre-initialized repo is a no-op (or at least doesn't destroy current git data) - Since it doesn't have master, it didn't run the script, so adding the first commit and hooks etc are what we want the script to do Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Only remove master from request if it was requestedPatrick Uiterwijk2015-02-251-10/+11
| | | | Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Just always take the first commit returned on the master branchPatrick Uiterwijk2015-02-251-1/+1
| | | | | | | Some repos have multiple first master commits due to force-pushes. Without this, that would crash upon branching for those packages. Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Publish master creationPatrick Uiterwijk2015-02-241-0/+9
|
* Creating branches is now started by genacls.sh.Patrick Uiterwijk2015-02-243-10/+1
| | | | Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Lets first create all repos before creating ACLs for themPatrick Uiterwijk2015-02-231-1/+2
| | | | Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* Feel free to run this as root, mmkey?Patrick Uiterwijk2015-02-232-14/+0
|
* Make genacls call pkgdb_sync_git_branches.pyPatrick Uiterwijk2015-02-231-0/+1
| | | | | | | | | | | | gitolite compile creates empty git repos during compile for repos in its acl that don't exist. Since this is automagically run by fedmsg, it triggers before scm-admins can run pkgdb_sync_git_branches.py Because of this, pkgdb_sync_git_branches sees a git repo, thus does not execute setup_git_package. But since setup_git_package creates master, and pkgdb_sync_git_branches later on tries to create new branches from master.... Aka, this broke process-git-requests. Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
* setup_git_repo creates masterPatrick Uiterwijk2015-02-191-0/+1
|
* When a bare repo is created, HEAD is invalid, so cloning won't work.Patrick Uiterwijk2015-02-191-1/+2
|