mirror of
https://github.com/release-engineering/dist-git.git
synced 2025-02-23 23:12:55 +00:00
unused files removed
This commit is contained in:
parent
b9e844c58a
commit
c6563e59c2
10 changed files with 2 additions and 672 deletions
|
@ -1,71 +0,0 @@
|
|||
#
|
||||
# See cgitrc(5) or /usr/share/doc/cgit-*/cgitrc.5.html for details
|
||||
#
|
||||
|
||||
# Enable caching of up to 1000 output entries
|
||||
cache-size=1000
|
||||
|
||||
# Specify some default clone prefixes
|
||||
clone-prefix=git://pkgs.fedoraproject.org ssh://pkgs.fedoraproject.org http://pkgs.fedoraproject.org/git
|
||||
|
||||
# Specify the css url
|
||||
css=/cgit-data/cgit.css
|
||||
|
||||
# Show extra links for each repository on the index page
|
||||
enable-index-links=1
|
||||
|
||||
# Enable ASCII art commit history graph on the log pages
|
||||
enable-commit-graph=1
|
||||
|
||||
# Show number of affected files per commit on the log pages
|
||||
enable-log-filecount=1
|
||||
|
||||
# Show number of added/removed lines per commit on the log pages
|
||||
enable-log-linecount=1
|
||||
|
||||
# Add a cgit favicon
|
||||
#favicon=/favicon.ico
|
||||
|
||||
# Use a custom logo
|
||||
logo=/cgit-data/cgit.png
|
||||
|
||||
# Enable statistics per week, month and quarter
|
||||
max-stats=quarter
|
||||
|
||||
# Set the title and heading of the repository index page
|
||||
root-title=Fedora Project Packages GIT repositories
|
||||
|
||||
# Set a subheading for the repository index page
|
||||
#root-desc=tracking the foobar development
|
||||
|
||||
# Include some more info about this site on the index page
|
||||
#root-readme=/var/www/html/about.html
|
||||
|
||||
# Allow download of tar.gz, tar.bz2 and zip-files
|
||||
snapshots=tar.gz tar.xz zip
|
||||
|
||||
##
|
||||
## List of common mimetypes
|
||||
##
|
||||
|
||||
mimetype.gif=image/gif
|
||||
mimetype.html=text/html
|
||||
mimetype.jpg=image/jpeg
|
||||
mimetype.jpeg=image/jpeg
|
||||
mimetype.pdf=application/pdf
|
||||
mimetype.png=image/png
|
||||
mimetype.svg=image/svg+xml
|
||||
|
||||
# Enable syntax highlighting (requires the highlight package)
|
||||
#source-filter=/usr/libexec/cgit/filters/syntax-highlighting.sh
|
||||
#email-filter=lua:/usr/libexec/cgit/filters/email-libravatar-korg.lua
|
||||
|
||||
|
||||
##
|
||||
## List of repositories.
|
||||
## PS: Any repositories listed when section is unset will not be
|
||||
## displayed under a section heading
|
||||
## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos')
|
||||
## and included like this:
|
||||
project-list=/var/lib/dist-git/git/pkgs-git-repos-list
|
||||
scan-path=/var/lib/dist-git/git/rpms/
|
|
@ -1,2 +0,0 @@
|
|||
*/15 * * * * root find /var/cache/cgit/ -cmin +60 -name '*.lock' -type f -delete -maxdepth 1
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
config = {
|
||||
'genacls.consumer.enabled': True,
|
||||
'genacls.consumer.delay': 5, # 5 seconds
|
||||
}
|
|
@ -1,165 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import re
|
||||
import requests
|
||||
import sys
|
||||
import getpass
|
||||
import pkgdb2client
|
||||
import subprocess
|
||||
|
||||
#PAGE_URL = 'https://fedoraproject.org/w/api.php?format=json&action=query&rvprop=content&prop=revisions&titles=User:Codeblock/RequestsSANDBOX'
|
||||
PAGE_URL = 'https://fedoraproject.org/w/api.php?format=json&action=query&rvprop=content&prop=revisions&titles=EPEL/epel7/Requests'
|
||||
NEW_EPEL_VERSION = '7'
|
||||
NEW_EPEL_SOURCE_BRANCH = 'f19'
|
||||
RHEL_PKGS_PATH = '/var/lib/rhel/rhel' + NEW_EPEL_VERSION
|
||||
|
||||
# parse_page :: String -> IO (Map String String)
|
||||
# This returns a dictionary of {"pkg_name": "branch"}
|
||||
def parse_page(url):
|
||||
r = requests.get(url).json()
|
||||
text = r['query']['pages'][r['query']['pages'].keys()[0]]['revisions'][0]['*']
|
||||
lines = text.split("\n")
|
||||
pkgs = filter(lambda y: y.startswith('| '), lines)
|
||||
__pkgs_list__ = map(lambda y: ''.join(y.split())[1:].split('||'), pkgs)
|
||||
pkgs_list = filter(lambda y: y[0] != 'foo', __pkgs_list__)
|
||||
pkgs_dict = dict(pkgs_list)
|
||||
return pkgs_dict
|
||||
|
||||
# is_in_rhel :: String -> IO Bool
|
||||
def is_in_rhel(pkg):
|
||||
with open(RHEL_PKGS_PATH) as f:
|
||||
pkgs = map(lambda x: x.strip(), f.readlines())
|
||||
return (pkg in pkgs)
|
||||
|
||||
# These tuples will be used to substitute one pattern for another.
|
||||
# Every transform will be run on every branch name so be sure the
|
||||
# pattern cannot match if you don't want it to be triggered.
|
||||
transforms = (
|
||||
(re.compile(r'^devel$'), 'master'),
|
||||
(re.compile(r'-'), ''),
|
||||
(re.compile(r'^fc([0-9])'), r'f\1'),
|
||||
(re.compile(r'^epel([456])$'), r'el\1'),
|
||||
(re.compile(r'^el([789]|[1-9][0-9])'), r'epel\1'),
|
||||
)
|
||||
branch_replacements = {'devel': (re.compile(r'^devel$'), 'master'),}
|
||||
|
||||
# generate_collection_cache :: PkgDB -> IO [String]
|
||||
def generate_collection_cache(pkgdb):
|
||||
raw_collections = pkgdb.get_collections(clt_status=(
|
||||
'Active',
|
||||
'Under Development'))
|
||||
collection_cache = frozenset(map(lambda y: y['branchname'],
|
||||
raw_collections['collections']))
|
||||
return collection_cache
|
||||
|
||||
# normalize_branch :: [String] -> String -> IO (Option String)
|
||||
def normalize_branch(collection_cache, branch):
|
||||
# I originally had this implemented as a foldRight (which it really is).
|
||||
# But Python doesn't eliminate tail calls. It probably would have been fine
|
||||
# because "transforms" above is only 5 elements, but instead I will deal
|
||||
# with the local mutation and wish that I had a type system to reason with.
|
||||
# -rbe
|
||||
norm_branch = branch.lower()
|
||||
for transform in transforms:
|
||||
norm_branch = re.sub(transform[0], transform[1], norm_branch)
|
||||
|
||||
|
||||
# Ugh, here we break purity. Where is the option type when you need it?
|
||||
if not (norm_branch in collection_cache):
|
||||
print('Unknown collection specified: {0}'.format(branch))
|
||||
return None
|
||||
|
||||
return norm_branch
|
||||
|
||||
# process_package :: PkgDB -> String -> String -> IO Bool
|
||||
def process_package(pkgdb, pkg, src, dest):
|
||||
print "*** Processing package: " + pkg
|
||||
|
||||
data = pkgdb.get_package(pkg)
|
||||
pkg_list = data['packages']
|
||||
|
||||
maybe_source = [branch for branch in pkg_list if branch['collection']['branchname'] == src]
|
||||
maybe_dest = [branch for branch in pkg_list if branch['collection']['branchname'] == dest]
|
||||
|
||||
if len(maybe_source) == 0:
|
||||
print "Source branch `" + src + "' not found. Please "\
|
||||
"branch " + pkg + " manually."
|
||||
return False
|
||||
|
||||
if len(maybe_dest) != 0:
|
||||
print "Package `" + pkg + "' was already branched for `" + dest + "'."\
|
||||
" Not overwriting branch."
|
||||
return False
|
||||
|
||||
if 'acls' not in maybe_source[0].keys():
|
||||
print "No 'acls' key given to us by pkgdb. Cloning ACLs from a "\
|
||||
"branch that has no ACLs due to retirement/orphan?"
|
||||
return False
|
||||
|
||||
acls = [
|
||||
acl
|
||||
for acl in maybe_source[0]['acls']
|
||||
if acl['fas_name'] != 'group::provenpackager'
|
||||
]
|
||||
|
||||
for acl in acls:
|
||||
pkgdb.update_acl(pkg, dest, acl['acl'], acl['status'], acl['fas_name'])
|
||||
|
||||
pkgdb.update_package_poc(pkg, dest, maybe_source[0]['point_of_contact'])
|
||||
|
||||
return True
|
||||
|
||||
# main :: [String] -> IO Unit
|
||||
def main(args):
|
||||
new_epel_requests = "epel" + NEW_EPEL_VERSION + "-requests"
|
||||
if len(args) < 1 or (len(args) < 3 and args[0] != new_epel_requests) or\
|
||||
len(args) > 3 or (len(args) > 1 and args[0] == new_epel_requests):
|
||||
print "Usage: pkgdb2-clone " + new_epel_requests
|
||||
print " - OR -"
|
||||
print " pkgdb2-clone <source branch> <dest branch> <pkgs ...>"
|
||||
sys.exit(1)
|
||||
|
||||
pkgdb = pkgdb2client.PkgDB()
|
||||
|
||||
username = raw_input('Username: ')
|
||||
password = getpass.getpass()
|
||||
pkgdb.login(username, password, True)
|
||||
|
||||
collection_cache = generate_collection_cache(pkgdb)
|
||||
|
||||
if args[0] == new_epel_requests:
|
||||
pkgs = parse_page(PAGE_URL)
|
||||
for key in pkgs:
|
||||
if is_in_rhel(key):
|
||||
continue
|
||||
src_branchname = normalize_branch(collection_cache, pkgs[key])
|
||||
dest_branchname = normalize_branch(collection_cache,
|
||||
'epel' + NEW_EPEL_VERSION)
|
||||
if not src_branchname or not dest_branchname:
|
||||
print "[" + key + "] Invalid source or destination branch "\
|
||||
"name, " + src_branchname + " -> " + dest_branchname
|
||||
else:
|
||||
if process_package(pkgdb, key, src_branchname, dest_branchname):
|
||||
subprocess.call(["git_branch.sh",
|
||||
"-s",
|
||||
NEW_EPEL_SOURCE_BRANCH,
|
||||
"epel" + NEW_EPEL_VERSION,
|
||||
key])
|
||||
print "[" + key + "] \033[1m\033[32mSUCCESS\033[0m"
|
||||
else:
|
||||
print "[" + key + "] \033[1m\033[31mERROR\033[0m"
|
||||
print "Done."
|
||||
else:
|
||||
src_branchname = normalize_branch(collection_cache, args[0])
|
||||
dest_branchname = normalize_branch(collection_cache, args[1])
|
||||
if not src_branchname or not dest_branchname:
|
||||
print "[" + key + "] Invalid source or destination branch "\
|
||||
"name, " + src_branchname + " -> " + dest_branchname
|
||||
for pkg in args[2:]:
|
||||
if process_package(pkgdb, key, src_branchname, dest_branchname):
|
||||
print "[" + key + "] \033[1m\033[32mSUCCESS\033[0m"
|
||||
else:
|
||||
print "[" + key + "] \033[1m\033[31mERROR\033[0m"
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv[1:])
|
|
@ -1,154 +0,0 @@
|
|||
RedirectMatch permanent ^/$ http://pkgs.fedoraproject.org/cgit/
|
||||
|
||||
RewriteEngine on
|
||||
|
||||
# Use cgit and redirect (some) old gitweb-caching things
|
||||
RewriteRule ^/cgit-data/(.*)$ /cgit-data/$1 [L,PT]
|
||||
RewriteRule ^/cgit/(.*)$ /cgit/$1 [L,PT]
|
||||
|
||||
# blob
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/blob/(.+)/(.+):/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=blob;h=(.+);hb=(.+);f=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/tree/%5?id=%3;id2=%4 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/blob/(.+):/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=blob;hb=(.+);f=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/tree/%4?id=%3 [R,L,NE]
|
||||
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+);h=(.+);hb=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/tree/%3?id=%4;id2=%5 [R,L,NE]
|
||||
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+);h=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/tree/%3?id=%4 [R,L,NE]
|
||||
|
||||
# tree
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/tree/(.+)/(.+):/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=tree;h=(.+);hb=(.+);f=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/tree/%5?id=%4 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/tree/(.+):/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=tree;hb=(.+);f=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/tree/%4?id=%3 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/tree/(.+)/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=tree;h=(.+);hb=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/tree/?id=%4 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/tree/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=tree;hb=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/tree/?id=%3 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/tree [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=tree
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/tree/? [R,L,NE]
|
||||
|
||||
# commitdiff
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/commitdiff/(.+)/(.+):/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=blobdiff;h=(.+);hp=(.+);hb=(.+);f=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/diff/%6?id2=%4;id=%3;id3=%5 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/commitdiff/(.+)/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=commitdiff;h=(.+);hp=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/diff/?id=%4;id2=%3 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/commitdiff/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=commitdiff;h=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/diff/?id=%3 [R,L,NE]
|
||||
|
||||
# commit
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/commit/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=commit;h=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/commit/?id=%3 [R,L,NE]
|
||||
|
||||
# summary
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/summary [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=summary
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/? [R,L,NE]
|
||||
|
||||
# shortlog
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/shortlog/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=shortlog;h=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/log/?id=%3 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/shortlog [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=shortlog
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/log/? [R,L,NE]
|
||||
|
||||
# log
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/log/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=log;h=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/log/?id=%3 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/log [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=log
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/log? [R,L,NE]
|
||||
|
||||
# history
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/history/(.+)/(.+):/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=history;h=(.+);hb=(.+);f=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/log/%5?id=%4 [R,L,NE]
|
||||
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=history;f=(.+);h=(.+);hb=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/log/%3?id=%4;id2=%5 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/history/(.+):/(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/log/%4?id=%3 [R,L,NE]
|
||||
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=history;f=(.+);h=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/log/%3?id=%4 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/history/(.+)/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=history;h=(.+);hb=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/log/?id=%4 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/history/(.+):/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=history;hb=(.+);f=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/log/%4?id=%3 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/history/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=history;hb=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/log/?id=%3 [R,L,NE]
|
||||
|
||||
# tag
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/tag/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=tag;h=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/tag/?id=%3 [R,L,NE]
|
||||
|
||||
# blob_plain
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/blob_plain/(.+):/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;h=(.+);f=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/plain/%4?id=%3 [R,L,NE]
|
||||
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;f=(.+);hb=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/plain/%3?id2=%4 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/blob_plain/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;f=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/plain/%3 [R,L,NE]
|
||||
|
||||
# rss|atom
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/(rss|atom)/refs/heads/(.+) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=(rss|atom);h=refsheads/(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/atom?h=%4 [R,L,NE]
|
||||
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/(rss|atom) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=(rss|atom)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/atom? [R,L,NE]
|
||||
|
||||
# snapshot
|
||||
RewriteCond %{REQUEST_URI} /(.+)(\.git)/snapshot/(.+)(\.tar\.gz|\.tar\.bz2) [OR]
|
||||
RewriteCond %{query_string} p=(.+)(\.git);a=snapshot;h=(.+);sf=(.+)
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/snapshot/%3.tar.gz [R,L,NE]
|
||||
|
||||
# base old gitweb project
|
||||
RewriteCond %{REQUEST_URI} /gitweb/(.+)\.git.* [OR]
|
||||
RewriteCond %{query_string} p=(.+)\.git.*
|
||||
RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/? [R,L,NE]
|
||||
|
||||
# Fail safes incase nothing above matches, try at least to put the person in the project
|
||||
#RewriteCond %{REQUEST_URI} /(.+)\.git.* [OR]
|
||||
#RewriteCond %{query_string} p=(.+)\.git.*
|
||||
#RewriteRule ^/.*$ http://pkgs.fedoraproject.org/cgit/%1.git/? [R,L,NE]
|
||||
|
||||
# Or else in the root of cgit
|
||||
#RewriteRule ^.* http://pkgs.fedoraproject.org/cgit/ [R,L,NE]
|
Binary file not shown.
|
@ -1,25 +0,0 @@
|
|||
policy_module(upload_cgi,1.0.0)
|
||||
|
||||
|
||||
gen_require(` type httpd_git_script_t ; ')
|
||||
type upload_cgi_tmp_t;
|
||||
files_tmp_file(upload_cgi_tmp_t);
|
||||
allow httpd_git_script_t upload_cgi_tmp_t:file manage_file_perms;
|
||||
files_tmp_filetrans(httpd_git_script_t, upload_cgi_tmp_t, file);
|
||||
|
||||
|
||||
# Do not audit attempts to read the process state (/proc/pid) of all domains.
|
||||
domain_read_all_domains_state(httpd_git_script_t);
|
||||
|
||||
# List the contents of the sysfs directories.
|
||||
dev_list_sysfs(httpd_git_script_t);
|
||||
|
||||
# Allow sending logs to syslog
|
||||
logging_send_syslog_msg(httpd_git_script_t);
|
||||
|
||||
# Get the attributes of all pty device nodes.
|
||||
term_getattr_all_ptys(httpd_git_script_t);
|
||||
# Get the attributes of all tty device nodes.
|
||||
term_getattr_all_ttys(httpd_git_script_t);
|
||||
# Do not audit attempts to get the attributes of generic pty devices.
|
||||
term_dontaudit_getattr_generic_ptys(httpd_git_script_t);
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
URL=https://admin.fedoraproject.org/ca/crl.pem
|
||||
OLD=/etc/pki/tls/crl.pem
|
||||
NEW=/tmp/crl.pem
|
||||
|
||||
if [ -f $OLD ]; then
|
||||
wget -q $URL -O $NEW
|
||||
OLDUPDATE=`openssl crl -in $OLD -noout -lastupdate`
|
||||
NEWUPDATE=`openssl crl -in $NEW -noout -lastupdate`
|
||||
|
||||
if [ "$OLDUPDATE" != "$NEWUPDATE" ]; then
|
||||
mv $NEW $OLD
|
||||
/usr/sbin/restorecon $OLD
|
||||
/usr/bin/systemctl reload httpd
|
||||
fi
|
||||
else
|
||||
wget -q $URL -O $OLD
|
||||
/usr/sbin/restorecon $OLD
|
||||
/usr/bin/systemctl is-active httpd && /usr/bin/systemctl reload httpd
|
||||
fi
|
|
@ -1,227 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
# Bad, bad, bad developer! (Just temporary)
|
||||
setenforce permissive
|
||||
systemctl stop firewalld
|
||||
|
||||
|
||||
### ENV ###
|
||||
DISTGITHOME="/var/lib/dist-git/git/"
|
||||
cd /home/adam
|
||||
### COMMON CONFIG ###
|
||||
|
||||
echo ACTION: configuration
|
||||
mkdir /etc/dist-git/
|
||||
chmod 0755 /etc/dist-git/
|
||||
cp files/dist_git_main.conf /etc/dist-git/dist-git.conf
|
||||
chmod 0755 /etc/dist-git/dist-git.conf
|
||||
|
||||
echo ACTION: install all the packages:
|
||||
yum install -y git httpd gitolite3 cgit perl-Sys-Syslog git-daemon python-requests /usr/sbin/semanage
|
||||
|
||||
echo ACTION: httpd config dir:
|
||||
cp files/dist-git.conf /etc/httpd/conf.d/dist-git.conf
|
||||
mkdir /etc/httpd/conf.d/dist-git
|
||||
|
||||
# echo ACTION: install the mod_ssl config:
|
||||
# echo "LoadModule ssl_module modules/mod_ssl.so" > /etc/httpd/conf.d/ssl.conf
|
||||
|
||||
echo ACTION: SELinux httpd_use_nfs
|
||||
# this is not important for the basic setup
|
||||
setsebool -P httpd_use_nfs true
|
||||
|
||||
### DIST GIT ###
|
||||
|
||||
echo ACTION: root directory
|
||||
mkdir -p $DISTGITHOME/rpms
|
||||
chmod 0755 $DISTGITHOME
|
||||
groupadd packager
|
||||
chown :packager $DISTGITHOME/rpms
|
||||
chmod 2775 $DISTGITHOME/rpms
|
||||
|
||||
echo ACTION: selinux context
|
||||
semanage fcontext -a -t httpd_git_content_t "/var/lib/dist-git/git(/.*)?"
|
||||
restorecon -R /var/lib/dist-git/git/
|
||||
|
||||
echo ACTION: dist git script dir
|
||||
mkdir /usr/share/dist-git
|
||||
chmod 755 /usr/share/dist-git
|
||||
|
||||
echo ACTION: dist git scripts
|
||||
for SCRIPT in git_package.sh git_branch.sh pkgdb2-clone pkgdb_sync_git_branches.py
|
||||
do
|
||||
cp files/scripts/$SCRIPT /usr/share/dist-git/
|
||||
chown root:root /usr/share/dist-git/$SCRIPT
|
||||
chmod 0755 /usr/share/dist-git/$SCRIPT
|
||||
done
|
||||
|
||||
echo ACTION: httpd config for dist git
|
||||
cp files/git-smart-http.conf /etc/httpd/conf.d/dist-git/
|
||||
|
||||
echo ACTION: cron job pkgdb_pkgdb_sync_git_branches
|
||||
# tbd
|
||||
|
||||
|
||||
### GITOLITE ###
|
||||
|
||||
echo ACTION: gen-acls group and user
|
||||
groupadd gen-acls
|
||||
useradd -g gen-acls -G packager -s /bin/bash -d $DISTGITHOME gen-acls
|
||||
|
||||
echo ACTION: directories
|
||||
mkdir /var/log/gitolite
|
||||
chown root:packager /var/log/gitolite
|
||||
chmod 2775 /var/log/gitolite
|
||||
|
||||
mkdir -p /etc/gitolite/conf
|
||||
chown gen-acls:gen-acls /etc/gitolite/conf
|
||||
chmod 0755 /etc/gitolite/conf
|
||||
|
||||
mkdir /etc/gitolite/logs
|
||||
chown gen-acls:packager /etc/gitolite/logs
|
||||
chmod 0775 /etc/gitolite/logs
|
||||
|
||||
mkdir -p /etc/gitolite/local/VREF
|
||||
chown gen-acls:packager /etc/gitolite/local/VREF
|
||||
chmod 0775 /etc/gitolite/local/VREF
|
||||
|
||||
echo ACTION: gitolite config
|
||||
cp files/gitolite.rc /etc/gitolite/
|
||||
chmod 0755 /etc/gitolite/gitolite.rc
|
||||
|
||||
echo ACTION: repositories symlink
|
||||
ln -s $DISTGITHOME/rpms/ $DISTGITHOME/repositories
|
||||
|
||||
echo ACTION: gitolite.rc symlink
|
||||
ln -s /etc/gitolite/gitolite.rc $DISTGITHOME/.gitolite.rc
|
||||
|
||||
echo ACTION: gitolite config symlink
|
||||
ln -s /etc/gitolite/ $DISTGITHOME/.gitolite
|
||||
|
||||
echo ACTION: update-block-push-origin symlink
|
||||
ln -s /usr/share/git-core/update-block-push-origin /etc/gitolite/local/VREF/update-block-push-origin
|
||||
|
||||
echo ACTION: dist_git_sync.sh script
|
||||
cp files/scripts/dist_git_sync.sh /usr/share/dist-git/
|
||||
chmod 0755 /usr/share/dist-git/dist_git_sync.sh
|
||||
|
||||
echo ACTION: pkgdb_gen_gitolite_conf.py script
|
||||
cp files/scripts/pkgdb_gen_gitolite_conf.py /usr/share/dist-git/
|
||||
chmod 0755 /usr/share/dist-git/pkgdb_gen_gitolite_conf.py
|
||||
|
||||
echo ACTION: genacl daily cron job
|
||||
# tbd
|
||||
|
||||
echo ACTION: admin users
|
||||
echo "adam" > /etc/gitolite/admins
|
||||
chown gen-acls:packager /etc/gitolite/admins
|
||||
chmod 0660 /etc/gitolite/admins
|
||||
|
||||
echo ACTION: Fix permissions on the Gitolite stuff
|
||||
mkdir /etc/gitolite/hooks
|
||||
chown :packager /etc/gitolite/hooks
|
||||
chmod 0770 /etc/gitolite/hooks
|
||||
|
||||
mkdir /etc/gitolite/hooks/common
|
||||
chown :packager /etc/gitolite/hooks/common
|
||||
chmod 0770 /etc/gitolite/hooks/common
|
||||
|
||||
touch /etc/gitolite/hooks/common/update
|
||||
chown :packager /etc/gitolite/hooks/common/update
|
||||
chmod 0755 /etc/gitolite/hooks/common/update
|
||||
|
||||
|
||||
### CGIT ###
|
||||
|
||||
echo ACTION: config file
|
||||
cp files/cgitrc /etc/cgitrc
|
||||
|
||||
echo ACTION: httpd config
|
||||
cp files/redirect.conf /etc/httpd/conf.d/dist-git/
|
||||
|
||||
# cgit/make_pkgs_list
|
||||
echo ACTION: make pkgs list script
|
||||
touch $DISTGITHOME/pkgs-git-repos-list
|
||||
chown apache:apache $DISTGITHOME/pkgs-git-repos-list
|
||||
chmod 0644 $DISTGITHOME/pkgs-git-repos-list
|
||||
cp files/scripts/cgit_pkg_list.sh /usr/share/dist-git/
|
||||
chmod 0755 /usr/share/dist-git/cgit_pkg_list.sh
|
||||
# tbd: cron job
|
||||
|
||||
# cgit/clean_lock_cron
|
||||
cp files/clean-lock.cron /etc/cron.d/cgit-clean-lock.cron
|
||||
chmod 0644 /etc/cron.d/cgit-clean-lock.cron
|
||||
|
||||
# git/server
|
||||
rm -f /usr/lib/systemd/system/git@.service
|
||||
cp files/git@.service /usr/lib/systemd/system/git@.service
|
||||
chmod 0644 /usr/lib/systemd/system/git@.service
|
||||
|
||||
|
||||
### LOOKASIDE ###
|
||||
|
||||
echo ACTION: lookaside cache
|
||||
mkdir -p /var/lib/dist-git/cache/lookaside/pkgs
|
||||
chown apache:apache /var/lib/dist-git/cache/lookaside/pkgs
|
||||
|
||||
cp files/lookaside.conf /etc/httpd/conf.d/dist-git/
|
||||
cp files/lookaside-upload.conf /etc/httpd/conf.d/dist-git/
|
||||
|
||||
mkdir /var/lib/dist-git/web
|
||||
cp files/scripts/dist-git-upload.cgi /var/lib/dist-git/web/upload.cgi
|
||||
chmod 0755 /var/lib/dist-git/web/upload.cgi
|
||||
|
||||
|
||||
### OTHERS ###
|
||||
groupadd cvsadmin
|
||||
groupadd fedora-arm
|
||||
groupadd fedora-sparc
|
||||
groupadd fedora-ia64
|
||||
groupadd fedora-s390
|
||||
groupadd fedora-ppc
|
||||
groupadd provenpackager
|
||||
groupadd eclipse-sig
|
||||
groupadd gnome-sig
|
||||
groupadd infra-sig
|
||||
groupadd kde-sig
|
||||
groupadd python-sig
|
||||
groupadd robotics-sig
|
||||
|
||||
git config --global user.name "John Root Doe"
|
||||
git config --global user.email thebigbigboss@example.com
|
||||
|
||||
systemctl restart httpd
|
||||
systemctl start git.socket
|
||||
|
||||
|
||||
# user frank
|
||||
useradd frank
|
||||
USER="frank"
|
||||
RSA="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC68iXNohFGki3huodI6FJi4ivRqkt8Dx/XWel8qmMuqezCoWNQN9w1mNvKaIfPGZCjBtLcKawNgliYvrOpBydHIgqMwXkw4rv3NBPDHKw5XVS4YsSZVdgE5JaEcLR85ahU4r25bfBP/Av0os0TkUzO9ij/6wNXGWpLs1611B2zI4IB0xpp9CVY4aEU3zgbDCHEMSqJZ39M4mJD2iitXpMF/yhvf4Z7jRWa2539HUXVvPp72rCQCgyvhJdcagQBHPWGT8gwipIL+RapF2Hyz+t8/zbQh1L+fwIL2w1tzSjq5SkdPlrNJjdW4XD56aUItRgjZJzwX12wLJY+CFwYqfTP frank@localhost.localdomain"
|
||||
|
||||
mkdir /home/$USER/.ssh
|
||||
echo "command=\"HOME=/var/lib/dist-git/git/ /usr/share/gitolite3/gitolite-shell $USER\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty $RSA" > /home/$USER/.ssh/authorized_keys
|
||||
chown -R $USER:$USER /home/$USER/.ssh
|
||||
usermod -aG packager $USER
|
||||
|
||||
# packages
|
||||
/usr/share/dist-git/dist_git_sync.sh
|
||||
/usr/share/dist-git/cgit_pkg_list.sh
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -107,9 +107,8 @@ def main():
|
|||
config = ConfigParser()
|
||||
config.read(CONFIG_FILE)
|
||||
|
||||
EMAIL_DOMAIN = _get_conf(config, "notifications", "email_domain", "fedoraproject.org")
|
||||
PKG_OWNER_EMAILS = _get_conf(config, "notifications", "pkg_owner_emails",
|
||||
"$PACKAGE-owner@fedoraproject.org,scm-commits@lists.fedoraproject.org")
|
||||
EMAIL_DOMAIN = _get_conf(config, "notifications", "email_domain", "")
|
||||
PKG_OWNER_EMAILS = _get_conf(config, "notifications", "pkg_owner_emails", "")
|
||||
|
||||
os.umask(002)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue