Commit Graph

149 Commits

Author SHA1 Message Date
Ralph Bean
f86bafdf03 (fedmenu) extract the package name from the url. 2015-04-24 17:45:47 +00:00
Ralph Bean
b1d54a9d96 Add forgotten slash. 2015-04-24 17:34:47 +00:00
Ralph Bean
00c0c89076 Undo this stg/prod distinction. 2015-04-24 17:31:24 +00:00
Ralph Bean
498ca4f3e9 Try the fedmenu header for stg cgit. 2015-04-24 17:28:25 +00:00
Ralph Bean
4690a26ece Typofix. 2015-04-24 17:18:48 +00:00
Ralph Bean
fbccedc4e6 Try adding a custom cgit header for staging. 2015-04-24 17:17:53 +00:00
Ralph Bean
f4a1646d89 Typofix. 2015-04-24 17:12:36 +00:00
Ralph Bean
48c540664c Make cgitrc into separate files for prod and staging. 2015-04-24 17:11:03 +00:00
Kevin Fenzi
52ecc14e3a Fix http{s} git cloning on pkgs. Fixes ticket 4688 2015-04-23 17:03:48 +00:00
Ralph Bean
04c59d4eee Remove the lookaside email hook (rely on fedmsg now). 2015-03-24 14:41:16 +00:00
Patrick Uiterwijk
273620cd25 We need the _exec version off course 2015-03-13 00:50:40 +00:00
Patrick Uiterwijk
4a19044c35 More fixes to selinux pkgs 2015-03-13 00:49:11 +00:00
Patrick Uiterwijk
c015ad545c Same fix on more places 2015-03-13 00:45:16 +00:00
Patrick Uiterwijk
04dee89215 This type is always nfs_t, and we have a policy to allow that.. 2015-03-12 15:26:30 +00:00
Patrick Uiterwijk
8d3fc995d8 Update policies to be compatible with RHEL7 2015-03-12 15:26:30 +00:00
Kevin Fenzi
ae9eaa4966 Try and fix git branches sync to work with git packed refs. 2015-03-06 21:48:13 +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
6bb938abfe Make pkgdb_sync more resilient by always calling SETUP_PACKAGE if master 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>
2015-02-27 23:26:49 +00:00
Patrick Uiterwijk
12e10d8279 Only remove master from request if it was requested
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2015-02-25 13:42:49 +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
2c7598455b Publish master creation 2015-02-24 09:48:16 +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
0243923759 setup_git_repo creates master 2015-02-19 16:20:25 +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
Patrick Uiterwijk
586efb310d Remove source_branch stuff, and refuse to create master branch to pre-existing repo 2015-02-19 15:10:41 +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
Pierre-Yves Chibon
1adc8fae3e Formatting and add the f22 branch 2015-02-19 13:54:05 +01:00
Pierre-Yves Chibon
f883635ab5 Set the git_cgi_use_nfs SELinux boolean for the lookaside 2015-02-19 13:38:24 +01:00
Kevin Fenzi
5c6d849828 Wonder if it's a formatting issue 2015-02-16 16:01:27 +00:00
Kevin Fenzi
efc074f1ae Some more idemportency stuff 2015-02-16 15:51:08 +00:00
Kevin Fenzi
e6f2b7ad74 Run this even when doing check 2015-02-16 15:37:37 +00:00
Kevin Fenzi
88d5fd21e6 Move mount of lookaside on pkgs to nfs/client role 2015-02-16 14:47:04 +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
31d4a63cd5 We do want a certificate in stg 2015-01-29 17:03:35 +00:00
Pierre-Yves Chibon
ad0972e28c Use different certs for prod and stg 2015-01-29 16:59:37 +00:00
Pierre-Yves Chibon
94c23a6992 Turn on the SELinux boolean nis_enabled on pkgs 2015-01-29 11:59:48 +01:00
Pierre-Yves Chibon
edaf6e3e80 Fix the content for /srv/cache 2015-01-28 15:27:57 +01:00
Pierre-Yves Chibon
bca02bd864 No need for two states and s/file/touch 2015-01-28 14:03:14 +01:00
Pierre-Yves Chibon
63fc693a28 Needs space 2015-01-28 13:55:29 +01:00
Pierre-Yves Chibon
44fe149b9e Precise the state, we want directories not file 2015-01-28 13:54:53 +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
Pierre-Yves Chibon
299ecf5943 Adjust the mode for the update hook itself 2015-01-27 18:44:14 +01:00
Mathieu Bridon
31933066d0 distgit: Fix perms on the Gitolite stuff
We can't execute the update hooks otherwise.
2015-01-27 18:40:11 +01:00
Pierre-Yves Chibon
14eeee7437 Fix the check-update-hooks, repos are in /srv 2015-01-27 17:14:30 +01:00