Commit Graph

59 Commits

Author SHA1 Message Date
Ralph Bean
04c59d4eee Remove the lookaside email hook (rely on fedmsg now). 2015-03-24 14:41:16 +00:00
Patrick Uiterwijk
8d3fc995d8 Update policies to be compatible with RHEL7 2015-03-12 15:26:30 +00:00
Patrick Uiterwijk
6e98a2dc66 Fix setup_git_package to handle setting up after gitolite setup a broken repo
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>
2015-02-27 23:44:20 +00:00
Patrick Uiterwijk
54097dc186 Just always take the first commit returned on the master branch
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>
2015-02-25 13:41:18 +00:00
Patrick Uiterwijk
1365500c17 Creating branches is now started by genacls.sh.
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2015-02-24 09:40:25 +00:00
Patrick Uiterwijk
2969d0d188 Lets first create all repos before creating ACLs for them
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2015-02-23 22:02:22 +00:00
Patrick Uiterwijk
afa5f86ab9 Feel free to run this as root, mmkey? 2015-02-23 21:51:43 +00:00
Patrick Uiterwijk
4b55f9a4ff Make genacls call pkgdb_sync_git_branches.py
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>
2015-02-23 21:34:16 +00:00
Patrick Uiterwijk
ea48d2a2a9 When a bare repo is created, HEAD is invalid, so cloning won't work. 2015-02-19 15:56:46 +00:00
Ralph Bean
9b5b3b531d Strip unwanted prefix from git.lookaside.new messages. 2015-02-19 15:01:14 +00:00
Ralph Bean
c50b0de2ab Try to fix lookaside.new fedmsg messages. 2015-02-19 13:26:59 +00:00
Mathieu Bridon
33ea9998d1 distgit: Add the path to the source file to the emitted messages
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.
2015-02-09 10:27:29 +01:00
Pierre-Yves Chibon
869802eddc RemiFedora said 0002 was better, especially if we want to access directories 2015-01-30 14:55:21 +01:00
Pierre-Yves Chibon
25ac7e8793 Give other the right to read the file
This will make cgit happy

Thanks Mathieu :)
2015-01-30 14:48:40 +01:00
Pierre-Yves Chibon
d2e73c5d91 Add our own SELinux policy for upload.cgi
Many thanks to tfirg on #selinux for helping out making this policy
2015-01-28 12:22:16 +01:00
Mathieu Bridon
5996178fd3 distgit: Don't try reloading apache if it's off 2015-01-27 15:58:24 +01:00
Mathieu Bridon
8a6719517b Revert "distgit: Merge in the cgit/make_pkgs_list role"
This reverts commit a29f50a19a.

Turns out, Fedora People needs this as well, so it needs to remain
separated.

Sorry for the noise!
2015-01-27 15:33:45 +01:00
Mathieu Bridon
a29f50a19a distgit: Merge in the cgit/make_pkgs_list role
Having it split out was causing trouble, because distgit depends on it,
but it depends on the /srv/git folder being created, which is created
in the distgit role...

Nothing else uses this though, so merging it is the easy way out.
2015-01-27 15:31:17 +01:00
Mathieu Bridon
e39ab5d3e8 lookaside: Try again allowing the CGI script 2015-01-26 17:15:52 +01:00
Mathieu Bridon
2562566485 lookaside: Also grant access for the upload 2015-01-26 16:44:10 +01:00
Pierre-Yves Chibon
1351f8609e In EL7 we need to specify who can access 2015-01-26 16:43:18 +01:00
Kevin Fenzi
5da470ec26 Drop ; thats causing an error. Need to merge this with koji hub version. 2015-01-23 21:56:27 +00:00
Pierre-Yves Chibon
21db51bbf0 Restorecon and restart apache after installing the new cert 2015-01-23 17:20:19 +01:00
Pierre-Yves Chibon
8336113e0f When updating the crl, take into account that there might not be one already 2015-01-23 17:20:19 +01:00
Mathieu Bridon
3ed1da51ca distgit: Remove the update-chained stuff
This doesn't work with Gitolite.
2015-01-23 11:23:28 +01:00
Pierre-Yves Chibon
a2abada992 Set the local_code folder in full path 2015-01-23 10:38:05 +01:00
Pierre-Yves Chibon
2eee8a28fe Add the gitolite update hook 2015-01-23 10:13:12 +01:00
Pierre-Yves Chibon
4b57e9101d Run the compile as root but then specify the HOME variable 2015-01-23 10:04:12 +01:00
Pierre-Yves Chibon
0912a7c2a5 Indicate where we list the pkgs admins 2015-01-22 17:59:09 +01:00
Pierre-Yves Chibon
40536895b3 No need to install our hook ourself anymore 2015-01-22 15:40:15 +01:00
Pierre-Yves Chibon
94578dfddd Activate the site-local gitolite code 2015-01-22 15:40:15 +01:00
Pierre-Yves Chibon
a0f3bc7aad Fix path to the gitolite update hook 2015-01-21 11:01:03 +01:00
Pierre-Yves Chibon
86589714ab Let the gen-acls user compile the configuration file 2015-01-20 19:27:45 +01:00
Pierre-Yves Chibon
fd8e6033bc Drop the -s/--source branch argument in mkbranch
In the process of automating the git branch creation based on fedmsg
message we can no longer rely on passing a -s/--source branch argument
to the mkbranch script.
As decided in https://fedorahosted.org/rel-eng/ticket/5931 the branches
will be created with the first commit of the master branch.

This commit thus drops the use of -s/--source and SRC_BRANCH in favor of
creating the branch with the first commit of the master branch:
git branch --no-track $BRANCH `git rev-list --max-parents=0 master`
2015-01-13 13:23:31 +01:00
Pierre-Yves Chibon
8de1473156 Replace tab with spaces 2015-01-13 13:23:31 +01:00
Till Maas
a87f2b4325 Remove process-git-requests from distgit role
The script is maintained in rel-eng repo. The version here is outdated.
2015-01-12 22:34:13 +01:00
Pierre-Yves Chibon
441c1455da Do not install nor configure the email-libravatar script while the package isn't in epel7 2014-12-16 19:06:33 +01:00
Mathieu Bridon
08d6bc634f distgit: Update the gitolite.rc file to Gitolite3 2014-12-15 17:46:19 +00:00
Mathieu Bridon
1b2337558f lookaside: Add the hash type to the folder structure
This makes it more explicit which hash was used for a given tarball.

https://fedorahosted.org/rel-eng/ticket/5846
2014-10-28 10:59:01 +01:00
Mathieu Bridon
a92efe252a lookaside: Add support for sha512 file hashes
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
2014-10-28 10:59:01 +01:00
Mathieu Bridon
608810be28 lookaside: De-hardcode md5 assumptions...
... 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
2014-10-28 10:59:01 +01:00
Mathieu Bridon
b842616187 lookaside: Drop EL < 6 support
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.
2014-10-28 10:16:30 +01:00
Mathieu Bridon
76d83b13a0 lookaside: Remove tempfile when hash verification fails
Without this, tempfiles just accumulate.
2014-10-28 10:16:30 +01:00
Mathieu Bridon
7ab3ff2817 distgit: Block push of branches named 'origin/*'
We already use the update hook for gitolite.

This introduces a new update hook, which merely chains the gitolite one,
and a new one to block pushes to badly named branches.

The new hook was written originally by Till Maas.

https://fedorahosted.org/rel-eng/ticket/4071
2014-10-27 10:48:12 +01:00
Pierre-Yves Chibon
0d41c13df1 Move the genacls.pkgdb script to the template directory 2014-09-09 10:55:12 +02:00
Pierre-Yves Chibon
137bb9ccaf Let every packager access the gitolite.conf-compiled.pm file 2014-09-08 18:00:34 +02:00
Mathieu Bridon
f591a084dd distgit: Update the script to the latest from puppet 2014-09-05 11:03:30 +02:00
Pierre-Yves Chibon
4828953da0 Replace gl-compile-conf by gitolite compile 2014-08-29 12:05:38 +02:00
Pierre-Yves Chibon
a73e4f501c Add a daily cron job for genacls.sh as backup for fedmsg-genacls 2014-08-29 11:47:41 +02:00
Pierre-Yves Chibon
64f77e40bd Move the pkgdb_sync_git_branches.py from a file to a template 2014-08-28 18:17:58 +02:00