Accepting request 305288 from home:jengelh:branches:devel:tools:scm

- Update to new upstream release 0.11.2
* addition of a Lua scripting engine
* fine-grained authentication support through the new Lua
  scripting system
* support for the "rawdiff" command was added
* sendfile() is now used when available (Linux systems) instead
  of a loop of read() and write(). This should significantly
  increase performance for high volume sites which make heavy use
  of the caching feature, as it saves copies to and from
  user-space.
* Caching granularity is now improved with the introduction of
  the cache-snapshot-ttl option, which allows configuration of
  the ttl for tarball and zip snapshots of repositories.
* When filtering in the index, make the sorting links point to
  the same filtered page of results
* Take into account leading slashes when comptuing links

OBS-URL: https://build.opensuse.org/request/show/305288
OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/cgit?expand=0&rev=21
This commit is contained in:
Andreas Stieger 2015-05-11 19:15:08 +00:00 committed by Git OBS Bridge
parent 6fb8e56506
commit ed042c7bcd
13 changed files with 228 additions and 254 deletions

3
cgit-0.11.2.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2e126e770693d7296c7eb5eb83b809410aef29870bfe8f54da072a3f4d813e3b
size 93556

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e2d7de92cfcd5d61a7dacee2f603784843903081675f3c74e4845df9185930a0
size 66472

View File

@ -1,58 +0,0 @@
From babf94e04e74123eb658a823213c062663cdadd6 Mon Sep 17 00:00:00 2001
From: Jason A. Donenfeld <Jason@zx2c4.com>
Date: Sat, 25 May 2013 17:47:15 +0000
Subject: ui-summary: Disallow directory traversal
Using the url= query string, it was possible request arbitrary files
from the filesystem if the readme for a given page was set to a
filesystem file. The following request would return my /etc/passwd file:
http://git.zx2c4.com/?url=/somerepo/about/../../../../etc/passwd
http://data.zx2c4.com/cgit-directory-traversal.png
This fix uses realpath(3) to canonicalize all paths, and then compares
the base components.
This fix introduces a subtle timing attack, whereby a client can check
whether or not strstr is called using timing measurements in order
to determine if a given file exists on the filesystem.
This fix also does not account for filesystem race conditions (TOCTOU)
in resolving symlinks.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
---
ui-summary.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -96,6 +96,7 @@ void cgit_print_repo_readme(char *path)
* to the directory containing the configured readme.
*/
if (path) {
+ char *resolved_base, *resolved_full;
slash = strrchr(ctx.repo->readme, '/');
if (!slash) {
if (!colon)
@@ -104,7 +105,19 @@ void cgit_print_repo_readme(char *path)
}
tmp = xmalloc(slash - ctx.repo->readme + 1 + strlen(path) + 1);
strncpy(tmp, ctx.repo->readme, slash - ctx.repo->readme + 1);
+ if (!ref)
+ resolved_base = realpath(tmp, NULL);
strcpy(tmp + (slash - ctx.repo->readme + 1), path);
+ if (!ref) {
+ resolved_full = realpath(tmp, NULL);
+ if (!resolved_base || !resolved_full ||
+ strstr(resolved_full, resolved_base) != resolved_full) {
+ free(tmp);
+ return;
+ }
+ free(resolved_base);
+ free(resolved_full);
+ }
} else
tmp = ctx.repo->readme;

View File

@ -1,54 +0,0 @@
--- ui-blob.c
+++ ui-blob.c
@@ -37,11 +37,14 @@ int cgit_print_file(char *path, const char *head)
return -1;
type = sha1_object_info(sha1, &size);
if(type == OBJ_COMMIT && path) {
+ struct pathspec pathspec;
commit = lookup_commit_reference(sha1);
match_path = path;
matched_sha1 = sha1;
found_path = 0;
- read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL);
+ init_pathspec(&pathspec, paths);
+ read_tree_recursive(commit->tree, "", 0, 0, &pathspec, walk_tree, NULL);
+ free_pathspec(&pathspec);
if (!found_path)
return -1;
type = sha1_object_info(sha1, &size);
@@ -80,10 +83,13 @@ void cgit_print_blob(const char *hex, char *path, const char *head)
type = sha1_object_info(sha1, &size);
if((!hex) && type == OBJ_COMMIT && path) {
+ struct pathspec pathspec;
commit = lookup_commit_reference(sha1);
match_path = path;
matched_sha1 = sha1;
- read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL);
+ init_pathspec(&pathspec, paths);
+ read_tree_recursive(commit->tree, "", 0, 0, &pathspec, walk_tree, NULL);
+ free_pathspec(&pathspec);
type = sha1_object_info(sha1,&size);
}
--- ui-plain.c
+++ ui-plain.c
@@ -145,6 +145,7 @@ void cgit_print_plain(struct cgit_context *ctx)
unsigned char sha1[20];
struct commit *commit;
const char *paths[] = {ctx->qry.path, NULL};
+ struct pathspec pathspec;
if (!rev)
rev = ctx->qry.head;
@@ -165,7 +166,9 @@ void cgit_print_plain(struct cgit_context *ctx)
}
else
match_baselen = basedir_len(paths[0]);
- read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL);
+ init_pathspec(&pathspec, paths);
+ read_tree_recursive(commit->tree, "", 0, 0, &pathspec, walk_tree, NULL);
+ free_pathspec(&pathspec);
if (!match)
html_status(404, "Not found", 0);
else if (match == 2)

View File

@ -1,20 +0,0 @@
--- ui-tree.c 2011-11-17 18:00:20.036822908 +0100
+++ ui-tree.c 2011-11-17 18:01:22.396236999 +0100
@@ -262,6 +262,7 @@
unsigned char sha1[20];
struct commit *commit;
const char *paths[] = {path, NULL};
+ struct pathspec pathspec;
if (!rev)
rev = ctx.qry.head;
@@ -283,6 +284,8 @@
}
match_path = path;
- read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL);
+ init_pathspec(&pathspec, paths);
+ read_tree_recursive(commit->tree, "", 0, 0, &pathspec, walk_tree, NULL);
+ free_pathspec(&pathspec);
ls_tail();
}

View File

@ -1,71 +0,0 @@
---
shared.c | 11 ++++++-----
ui-stats.c | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
Index: cgit-0.9.0.2/shared.c
===================================================================
--- cgit-0.9.0.2.orig/shared.c 2011-07-21 16:24:10.000000000 +0200
+++ cgit-0.9.0.2/shared.c 2011-08-04 01:20:42.695017536 +0200
@@ -303,7 +303,7 @@ void cgit_diff_tree(const unsigned char
filepair_fn fn, const char *prefix, int ignorews)
{
struct diff_options opt;
- int prefixlen;
+ struct pathspec_item pitem;
diff_setup(&opt);
opt.output_format = DIFF_FORMAT_CALLBACK;
@@ -315,10 +315,11 @@ void cgit_diff_tree(const unsigned char
opt.format_callback = cgit_diff_tree_cb;
opt.format_callback_data = fn;
if (prefix) {
- opt.nr_paths = 1;
- opt.paths = &prefix;
- prefixlen = strlen(prefix);
- opt.pathlens = &prefixlen;
+ opt.pathspec.nr = 1;
+ opt.pathspec.raw = &prefix;
+ pitem.match = prefix;
+ pitem.len = strlen(prefix);
+ opt.pathspec.items = &pitem;
}
diff_setup_done(&opt);
Index: cgit-0.9.0.2/ui-stats.c
===================================================================
--- cgit-0.9.0.2.orig/ui-stats.c 2011-07-21 16:24:10.000000000 +0200
+++ cgit-0.9.0.2/ui-stats.c 2011-08-04 01:20:42.695017536 +0200
@@ -239,7 +239,7 @@ struct string_list collect_stats(struct
init_revisions(&rev, NULL);
rev.abbrev = DEFAULT_ABBREV;
rev.commit_format = CMIT_FMT_DEFAULT;
- rev.no_merges = 1;
+ rev.max_parents = 1;
rev.verbose_header = 1;
rev.show_root_diff = 0;
setup_revisions(argc, argv, &rev, NULL);
Index: cgit-0.9.0.2/ui-tree.c
===================================================================
--- cgit-0.9.0.2.orig/ui-tree.c 2011-07-21 16:24:10.000000000 +0200
+++ cgit-0.9.0.2/ui-tree.c 2011-08-04 01:20:58.632061214 +0200
@@ -206,6 +206,8 @@ static void ls_tail()
static void ls_tree(const unsigned char *sha1, char *path)
{
+ const char *paths[] = { path, NULL };
+ struct pathspec pathspec;
struct tree *tree;
tree = parse_tree_indirect(sha1);
@@ -216,7 +218,9 @@ static void ls_tree(const unsigned char
}
ls_head();
- read_tree_recursive(tree, "", 0, 1, NULL, ls_item, NULL);
+ init_pathspec(&pathspec, paths);
+ read_tree_recursive(tree, "", 0, 1, &pathspec, ls_item, NULL);
+ free_pathspec(&pathspec);
ls_tail();
}

View File

@ -1,14 +1,16 @@
---
Makefile | 1 +
cgit.mk | 1 +
1 file changed, 1 insertion(+)
--- a/Makefile
+++ b/Makefile
@@ -134,6 +134,7 @@
Index: cgit-0.11.2/cgit.mk
===================================================================
--- cgit-0.11.2.orig/cgit.mk
+++ cgit-0.11.2/cgit.mk
@@ -17,6 +17,7 @@ $(CGIT_PREFIX)VERSION: force-version
CFLAGS += -g -Wall -Igit
+CFLAGS += $(RPM_OPT_FLAGS)
CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)'
CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"'
CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
# CGIT_CFLAGS is a separate variable so that we can track it separately
# and avoid rebuilding all of Git when these variables change.
+CGIT_CFLAGS += $(RPM_OPT_FLAGS)
CGIT_CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
CGIT_CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
CGIT_CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"'

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Mon May 4 08:56:39 UTC 2015 - jengelh@inai.de
- Update to new upstream release 0.11.2
* addition of a Lua scripting engine
* fine-grained authentication support through the new Lua
scripting system
* support for the "rawdiff" command was added
* sendfile() is now used when available (Linux systems) instead
of a loop of read() and write(). This should significantly
increase performance for high volume sites which make heavy use
of the caching feature, as it saves copies to and from
user-space.
* Caching granularity is now improved with the introduction of
the cache-snapshot-ttl option, which allows configuration of
the ttl for tarball and zip snapshots of repositories.
* When filtering in the index, make the sorting links point to
the same filtered page of results
* Take into account leading slashes when comptuing links
- Avoid double %setup (messes with quilt). Simplify filelist.
%doc for man is implicit.
- Drop cgit-git-1.7.6_build_fix.patch,
cgit-fix-print-tree.diff,
cgit-fix-more-read_tree_recursive-invocations.diff,
cgit-CVE-2013-2117-disallow-directory-traversal.patch
- Add signature for the git core tarball.
-------------------------------------------------------------------
Mon Nov 24 13:10:34 UTC 2014 - guillaume@opensuse.org

152
cgit.keyring Normal file
View File

@ -0,0 +1,152 @@
pub 4096R/713660A7 2011-10-01
uid [ unknown] Junio C Hamano <gitster@pobox.com>
uid [ unknown] Junio C Hamano <jch@google.com>
uid [ unknown] Junio C Hamano <junio@pobox.com>
sub 4096R/833262C4 2011-10-01
sub 4096R/96AFE6CB 2011-10-03 [expires: 2015-09-21]
sub 4096R/B3F7CAC9 2014-09-20 [expires: 2017-09-19]
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQINBE6GdewBEADE3szNmKeUAUad22z1tWkLjLzyDcJpF7IzEnLs8bD1y0I6iqH0
169ru5iXKn29wc+YAuxWorb4P5a2i2B/vs32hJy/rXE7dpvsAqlHLSGSDUJXiFzM
Bb9SfJO0EY2r+vqzeQgSUmhp/b4dAXVnMATFM37V83H/mq8REl5Wwb2rxP3pcv6W
F6i51+tPEWIUgo1N74QkR4wdLcPztDO9v7ZIaFKl+2GEGkx6Z+YjECTqQuyushjq
41K3UVmv+AmLhJYKA78HY5KqCkXrz8rCgoi+Ih+ZT2sgjx637yT84Dr/QDh7BkIB
blmpRQ+yoJlVDWI5/bI8rcdrPz+NmxaJ7dKEBg0qTclbwquacpwG1DCCD8NgQrwL
WVLGVdsT2qwek+KkmOs+iNBXY1TgKPAeuv0ZDKKYrCwYpN1K90oXk431g79bKsH5
8Tybg5uW+e2i+H5gnDeyl481HOt8aHOPu9qIB/zIek6lDH69q3nGcf7k3prxDf3I
qYy6CPcpjTfpN4i/7gxQDNI+AIgbs21EE5Kg1TPUe0XgfdJMtIF+D6wTjbrLtDnn
09Iwz0SfIZR52IrZHxUlFXZFjk10RXYATtdMqEFgYgjYvYXxL9EEr7T5Dgso+qaE
wV0rrg0VDKrf/afrjGOeffumlhBhJnBnns1T+p65Vz5hyQl7SFKLw+Ix7wARAQAB
tB9KdW5pbyBDIEhhbWFubyA8amNoQGdvb2dsZS5jb20+iQI4BBMBAgAiBQJOhnjV
AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRAg0E5acTZgp4SyD/9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JggIMR16G7JVxSKMLw7pE45eXRR9x9HDlLAAYAY8w5spMDH
gJwrUvepDq8L12ttigGD+7GVb+3CgaLbI4Z3Mhrs55J0TWbLxvc0nuJYlxk1sF+U
B73fL4z9G5nI6rV+BWyM7BvrepKyyeXlluTstOsawI/3YQn2KH0ERqb7t1i0a+HI
3EBzpFTORQ7G6zycU6liAnWpWLlvTEefdBfsh8VssQAZFP5SRPDUiVORIT/YGDzH
OfuIaeCD9pPJ4guMS5DZUmwrAYbY9s1Yt/gFsddKH1pDh6jFdF0aYMDv66pyA2aO
7DmxdrNN05Mq3duly18AeWC8puQVzi5wTi5668RhMJFEK5YqixbE1sXgV/YXMmZ+
JqDgWd177m1Cg5UnBUoBMXNVC69ZAP4TSq+hXZlrNhDNUmY2W4IsIg22ZSc/zPQW
1FogQD0WWGmt4nH2TiPT22yO6XpKSWgP4trGG7ArSsx8DfYHBOzwyyLJQv5lyB62
RWqsZW4azM9IhxHOpr03zM6UmfFJ3Db8URNIHYfXCZteBGyWIilZ9+S59F2jc9M0
Ard75N4RY/1/TVEDTgazvBNgD9oHQAmdXlglicn4jiR/zdsiUvxzXYfAwJ2wn93b
H36Mo/R9JLZoiNx9YlED1s/emsTzoSw8JiIA5V4aLnc8FdwY8Wa9cvZAAw==
=f2jS
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -16,71 +16,67 @@
#
%define git_version 1.7.6.4
%define git_version 2.4.0
Name: cgit
Version: 0.9.1
Version: 0.11.2
Release: 0
Summary: A web frontend for git repositories
Url: http://git.zx2c4.com/cgit/
License: GPL-2.0
Group: Development/Libraries/C and C++
Source0: %{name}-%{version}.tar.xz
Source1: git-%{git_version}.tar.gz
Source2: cgitrc
Patch: cgit-optflags.diff
Patch1: cgit-git-1.7.6_build_fix.patch
Patch3: cgit-fix-print-tree.diff
Patch4: cgit-fix-more-read_tree_recursive-invocations.diff
Patch5: cgit-CVE-2013-2117-disallow-directory-traversal.patch
Group: Development/Tools/Version Control
#Git-Clone: git://git.zx2c4.com/cgit
Source: http://git.zx2c4.com/cgit/snapshot/%name-%version.tar.xz
Source2: https://www.kernel.org/pub/software/scm/git/git-%git_version.tar.xz
Source3: https://www.kernel.org/pub/software/scm/git/git-%git_version.tar.sign
Source4: %name.keyring
Source9: cgitrc
Patch0: cgit-optflags.diff
# Requirements for cgit
BuildRequires: gnu-crypto libopenssl-devel libzip-devel
BuildRequires: gnu-crypto
BuildRequires: libopenssl-devel
BuildRequires: libzip-devel
# Requirements for cgitrc man page generation
BuildRequires: asciidoc libxslt xz
BuildRequires: asciidoc
BuildRequires: libxslt
BuildRequires: xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This is an attempt to create a fast web interface for the git scm, using a
builtin cache to decrease server io-pressure.
This is an attempt to create a fast web interface for the Git SCM, using a
builtin cache to decrease server I/O pressue.
Authors:
--------
Lars Hjemli (hjemli@gmail.com)
%prep
%setup -q
%setup -q -T -D -a 1
%patch -p1
%patch1 -p1
%patch3
%patch4
%patch5 -p1
%setup -qa2
%patch0 -p1
rm -rf git
mv git-%{git_version} git
ln -s git-%git_version git
%build
make V=1 %{?_smp_mflags}
make V=1 prefix="%_prefix" %{?_smp_mflags}
%install
make install DESTDIR="%{buildroot}" CGIT_SCRIPT_PATH=/srv/www/htdocs/cgit
make install-man DESTDIR="%{buildroot}"
make install install-man DESTDIR="%buildroot" prefix="%_prefix" \
CGIT_SCRIPT_PATH="/srv/www/htdocs/cgit"
mkdir -p "%{buildroot}"/srv/www/cgi-bin/cgit/
mkdir -p "%buildroot/srv/www/cgi-bin/cgit/"
mv "%{buildroot}"/srv/www/{htdocs,cgi-bin}/cgit/cgit.cgi
mkdir -p "%{buildroot}"/etc
cp %{SOURCE2} "%{buildroot}"/etc/cgitrc
cp %{SOURCE9} "%{buildroot}"/etc/cgitrc
%files
%defattr(-,root,root)
%doc README COPYING
%doc %{_mandir}/man5/cgitrc.5.gz
%dir /srv/www/htdocs/cgit
%dir /srv/www/cgi-bin/cgit
/srv/www/cgi-bin/cgit/cgit.cgi
/srv/www/htdocs/cgit/cgit.css
/srv/www/htdocs/cgit/cgit.png
/usr/lib/cgit
%_mandir/man5/cgitrc.5.gz
/srv/www/cgi-bin/cgit/
/srv/www/htdocs/cgit/
/usr/lib/cgit/
%config(noreplace) /etc/cgitrc
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c95bb6fdfa8276a6cbc1c3150e56ce3dc2fc29a4bcecd9c246ab9df5d9638ec6
size 3399093

BIN
git-2.4.0.tar.sign Normal file

Binary file not shown.

3
git-2.4.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b33438dd94659958a74850aacae4a2b3a626baec36d7f29c266130b08045bb24
size 3681516