mirror of
https://github.com/release-engineering/dist-git.git
synced 2025-02-24 07:22:54 +00:00
store repos directly under git/
This commit is contained in:
parent
7e68e079c4
commit
02a2bb2d30
9 changed files with 10 additions and 17 deletions
|
@ -64,7 +64,7 @@ Install Cgit, the web interface for Git:
|
|||
And point it to the DistGit repositories:
|
||||
|
||||
```
|
||||
echo "scan-path=/var/lib/dist-git/git/repositories/" >> /etc/cgitrc
|
||||
echo "scan-path=/var/lib/dist-git/git/" >> /etc/cgitrc
|
||||
```
|
||||
|
||||
It is useful to comment out `cache-size` entry in /etc/cgitrc (or set it to zero) to always get up-to-date repository state at each page refresh.
|
||||
|
|
|
@ -22,7 +22,7 @@ rlJournalStart
|
|||
cd $TESTPATH
|
||||
|
||||
# clone repo using fedpkg
|
||||
rlRun "fedpkg clone /var/lib/dist-git/git/repositories/prunerepo"
|
||||
rlRun "fedpkg clone /var/lib/dist-git/git/prunerepo"
|
||||
|
||||
cd prunerepo
|
||||
|
||||
|
@ -50,7 +50,7 @@ rlJournalStart
|
|||
|
||||
rlPhaseStartCleanup BasicTest
|
||||
rm -rf $TESTPATH/prunerepo $TESTPATH/prunerepo-copy* $TESTPATH/prunerepo-1.1.tar.gz
|
||||
pkgs_cmd 'rm -rf /var/lib/dist-git/git/repositories/prunerepo.git'
|
||||
pkgs_cmd 'rm -rf /var/lib/dist-git/git/prunerepo.git'
|
||||
pkgs_cmd 'sudo rm -rf /var/lib/dist-git/cache/lookaside/pkgs/prunerepo'
|
||||
rlPhaseEnd
|
||||
rlJournalEnd &> /dev/null
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SetEnv GIT_PROJECT_ROOT /var/lib/dist-git/git/repositories
|
||||
SetEnv GIT_PROJECT_ROOT /var/lib/dist-git/git
|
||||
SetEnv GIT_HTTP_EXPORT_ALL
|
||||
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
|
||||
|
||||
|
|
|
@ -5,5 +5,5 @@ Wants=dist-git.socket
|
|||
|
||||
[Service]
|
||||
User=nobody
|
||||
ExecStart=/usr/libexec/git-core/git-daemon --base-path=/var/lib/dist-git/git/repositories --export-all --user-path=public_git --syslog --inetd --verbose
|
||||
ExecStart=/usr/libexec/git-core/git-daemon --base-path=/var/lib/dist-git/git --export-all --user-path=public_git --syslog --inetd --verbose
|
||||
StandardInput=socket
|
||||
|
|
|
@ -111,7 +111,6 @@ cp -a configs/systemd/* %{buildroot}%{_unitdir}/
|
|||
# ------------------------------------------------------------------------------
|
||||
install -d %{buildroot}%{installdir}
|
||||
install -d %{buildroot}%{installdir}/git
|
||||
install -d %{buildroot}%{installdir}/git/rpms
|
||||
install -d %{buildroot}%{installdir}/cache
|
||||
install -d %{buildroot}%{installdir}/cache/lookaside
|
||||
install -d %{buildroot}%{installdir}/cache/lookaside/pkgs
|
||||
|
@ -119,8 +118,6 @@ install -d %{buildroot}%{installdir}/web
|
|||
|
||||
cp -a scripts/httpd/upload.cgi %{buildroot}%{installdir}/web/
|
||||
|
||||
ln -f -s %{installdir}/git/rpms %{buildroot}%{installdir}/git/repositories
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# SELinux
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -145,7 +142,6 @@ done
|
|||
%{_sbindir}/restorecon -v %{installdir}/cache/lookaside || :
|
||||
%{_sbindir}/restorecon -v %{installdir}/cache/lookaside/pkgs || :
|
||||
%{_sbindir}/restorecon -v %{installdir}/git || :
|
||||
%{_sbindir}/restorecon -v %{installdir}/git/rpms || :
|
||||
%{_sbindir}/restorecon -Rv %{installdir}/web/ || :
|
||||
|
||||
%systemd_post dist-git.socket
|
||||
|
@ -190,16 +186,13 @@ fi
|
|||
# non-standard-dir-perm:
|
||||
# - git repositories and their contents must have w permission for their creators
|
||||
%dir %{installdir}
|
||||
%dir %{installdir}/git
|
||||
%attr (2775, -, packager) %{installdir}/git/rpms
|
||||
%attr (2775, -, packager) %{installdir}/git
|
||||
%dir %{installdir}/web
|
||||
%attr (755, apache, apache) %{installdir}/web/upload.cgi
|
||||
%dir %{installdir}/cache
|
||||
%dir %{installdir}/cache/lookaside
|
||||
%attr (2775, apache, apache) %{installdir}/cache/lookaside/pkgs
|
||||
|
||||
%{installdir}/git/repositories
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# /usr/share ...... executable files
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
||||
|
||||
eval "$(crudini --format=sh --get /etc/dist-git/dist-git.conf dist-git)"
|
||||
REPODIR=$gitroot_dir/repositories
|
||||
REPODIR=$gitroot_dir
|
||||
|
||||
# check if a moron is driving me
|
||||
if [ ! -d $REPODIR ] ; then
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
RUNDIR=$(cd "$(dirname "$0")" && pwd)
|
||||
|
||||
eval "$(crudini --format=sh --get /etc/dist-git/dist-git.conf dist-git)"
|
||||
REPODIR=$gitroot_dir/repositories
|
||||
REPODIR=$gitroot_dir
|
||||
|
||||
# check if a moron is driving me
|
||||
if [ ! -d $REPODIR ] ; then
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
# Figure out the environment we're running in
|
||||
eval "$(crudini --format=sh --get /etc/dist-git/dist-git.conf dist-git)"
|
||||
REPODIR=$gitroot_dir/repositories
|
||||
REPODIR=$gitroot_dir
|
||||
: ${git_author_name="Undefined"}
|
||||
: ${git_author_email="undefined@example.com"}
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ def main():
|
|||
msgpath = os.path.join(name, filename, hash_type, checksum, filename)
|
||||
|
||||
# first test if the module really exists
|
||||
git_dir = os.path.join(config['dist-git']['gitroot_dir'], 'repositories', '%s.git' % name)
|
||||
git_dir = os.path.join(config['dist-git']['gitroot_dir'], '%s.git' % name)
|
||||
if not os.path.isdir(git_dir):
|
||||
sys.stderr.write('[username=%s] Unknown module: %s' % (username, name))
|
||||
send_error('Module "%s" does not exist!' % name,
|
||||
|
|
Loading…
Add table
Reference in a new issue