aboutsummaryrefslogtreecommitdiffstats
path: root/www-apps
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/cgit/Manifest6
-rw-r--r--www-apps/cgit/cgit-1.2.3-r4.ebuild107
-rw-r--r--www-apps/cgit/files/cgit-1.2.3-disable-cached-clones.patch58
-rw-r--r--www-apps/cgit/files/cgit-1.2.3-git-http-backend.patch221
-rw-r--r--www-apps/cgit/metadata.xml26
5 files changed, 0 insertions, 418 deletions
diff --git a/www-apps/cgit/Manifest b/www-apps/cgit/Manifest
deleted file mode 100644
index a3383b0..0000000
--- a/www-apps/cgit/Manifest
+++ /dev/null
@@ -1,6 +0,0 @@
-AUX cgit-1.2.3-disable-cached-clones.patch 1574 BLAKE2B 05c2627998175566a2f186a4f1946ce943bea67ae28f9dd339530b723545434932bccfe396b908f3a386e864dcf0347787f2521e915bb1df74547838827201ec SHA512 4a1c87d49a22140add69a96ce62a859402162d6740b070b7196a388e7208e4357e2659c0987c0c73828ace0183cf8a20adaf3e59967eb354db419851d9eb4df8
-AUX cgit-1.2.3-git-http-backend.patch 6647 BLAKE2B 920fdc85ec122020bf360587e19fd98067ef61ad11be3f044c4808f9f68eff9bc74bd8d3db5743bae565eb2985e536e3607eb055c99fec37870179c78808f228 SHA512 cfb245c0aa2e783961fca27f56706c6afe021e3c3620c0c6dcb8e29751dc7f68673a6c9c10ae6220efb304703fee4a6d18255015e2f84c4db65839880576f51c
-DIST cgit-1.2.3.tar.xz 90632 BLAKE2B 594a9b2ae0b449e0ef090f428f955cc02833f5f5b1e4d6dc8c737daa565d01ba6840933c0bdc53d4eb683b2f44e2fae885ddd020cfb2de38141a870a6eae2380 SHA512 58f9bb644b07be49dc51f3ef30a3d0e53699cede3c06b1d6920f3874fe846c83dd2589632aa84357b70ea2d60272448409aa1b892f405d14dd6745f5559b4504
-DIST git-2.25.1.tar.xz 5875548 BLAKE2B 582da3d4ac996d7b9ce6cf505661496ab1a2cd061f058745350498121956b33d79739b567fb5fea0b4e298303261256034aa0b8da0b842feab04ae67a7d5b142 SHA512 15241143acfd8542d85d2709ac3c80dbd6e8d5234438f70c4f33cc71a2bdec3e32938df7f6351e2746d570b021d3bd0b70474ea4beec0c51d1fc45f9c287b344
-EBUILD cgit-1.2.3-r4.ebuild 2443 BLAKE2B b681ff0af7e23f261ebd08a9874dc4cf10b5dbe0de9f71eecd1e495ed4efd97e73e578c6d4dbbd093f3c095a088a8aa4f12a20e158caed978d1418904363e42b SHA512 bf964f5782b1ae8bf46cab86e3318610cc3cfaf795b318385d1a4d1b41aa100f6a608111ff9c5fbeb03e938e56d9ee756cf3fda948f09ad462a568928109b353
-MISC metadata.xml 1029 BLAKE2B e46976de1886fef155a1488142b4b3733c1e682a8851b4b36449e95759a050722d3147221f3cc587a984e28c2b167dacf3e29a4cc208f30bd52e0216806d2327 SHA512 bcd83dfd7789597db8ef429aebe5c34138aba888706bce5972208e6cb8e991a820691cef5268fcebf9e30ec5bf9d4ccc65d36790372282f96c09243137856fdd
diff --git a/www-apps/cgit/cgit-1.2.3-r4.ebuild b/www-apps/cgit/cgit-1.2.3-r4.ebuild
deleted file mode 100644
index 7dae402..0000000
--- a/www-apps/cgit/cgit-1.2.3-r4.ebuild
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit multilib toolchain-funcs
-
-GIT_V="2.25.1"
-
-DESCRIPTION="a fast web-interface for git repositories"
-HOMEPAGE="https://git.zx2c4.com/cgit/about"
-SRC_URI="https://www.kernel.org/pub/software/scm/git/git-${GIT_V}.tar.xz
- https://git.zx2c4.com/cgit/snapshot/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="doc highlight lua luajit lzip markdown static +vanilla zip zstd"
-
-LUA_DEPEND="
- lua? (
- luajit? ( dev-lang/luajit )
- !luajit? ( dev-lang/lua:0 )
- )
-"
-
-BDEPEND="
- doc? ( app-text/docbook-xsl-stylesheets
- >=app-text/asciidoc-8.5.1 )
-"
-
-RDEPEND="${LUA_DEPEND}
- dev-vcs/git
- highlight? ( || ( dev-python/pygments app-text/highlight ) )
- lzip? ( app-arch/lzip )
- markdown? ( dev-python/markdown )
- zip? ( app-arch/zip )
- zstd? ( app-arch/zstd )
- !static? ( sys-libs/zlib )
-"
-
-DEPEND="${LUA_DEPEND}
- static? (
- sys-libs/zlib[static-libs(+)]
- )
-"
-
-# +static fails with +luajit
-REQUIRED_USE="
- static? ( !luajit )
-"
-
-src_prepare() {
- if ! use vanilla; then
- PATCHES+=(
- "${FILESDIR}/${P}-git-http-backend.patch"
- "${FILESDIR}/${P}-disable-cached-clones.patch"
- )
- fi
-
- default
-
- rmdir git || die
- mv "${WORKDIR}"/git-"${GIT_V}" git || die
-
- echo "prefix = ${EPREFIX}/usr" >> cgit.conf
- echo "libdir = ${EPREFIX}/usr/$(get_libdir)" >> cgit.conf
- echo "CACHE_ROOT = ${CGIT_CACHEDIR}" >> cgit.conf
- echo "DESTDIR = ${D}" >> cgit.conf
- echo "CGIT_SCRIPT_PATH = ${EPREFIX}/usr/libexec/cgit" >> cgit.conf
- echo "CGIT_DATA_PATH = ${EPREFIX}/usr/share/cgit/resources" >> cgit.conf
- if use lua; then
- if use luajit; then
- echo "LUA_PKGCONFIG = luajit" >> cgit.conf
- else
- echo "LUA_PKGCONFIG = lua" >> cgit.conf
- fi
- else
- echo "NO_LUA = 1" >> cgit.conf
- fi
-}
-
-src_configure() {
- myopts=(
- $(usex elibc_musl NO_REGEX=NeedsStartEnd '')
- )
-
- export MY_MAKEOPTS="${myopts[@]}"
- LDFLAGS="${LDFLAGS} $(usex static -static '')"
-}
-
-src_compile() {
- emake ${MY_MAKEOPTS} V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
- use doc && emake V=1 doc-man
-}
-
-src_install() {
- emake ${MY_MAKEOPTS} V=1 AR="$(tc-getAR)" CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" install
-
- dodoc README
- use doc && doman cgitrc.5
-}
-
-pkg_postinst() {
- ewarn "For caching support in its default configuration, /var/cache/cgit"
- ewarn "needs to exist and be owned by the user executing cgit."
-}
diff --git a/www-apps/cgit/files/cgit-1.2.3-disable-cached-clones.patch b/www-apps/cgit/files/cgit-1.2.3-disable-cached-clones.patch
deleted file mode 100644
index c9c547e..0000000
--- a/www-apps/cgit/files/cgit-1.2.3-disable-cached-clones.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 8f9eeb3280c43ef184eb6ce08b322bc7d9ad6c3f Mon Sep 17 00:00:00 2001
-From: Wynn Wolf Arbor <wolf@oriole.systems>
-Date: Fri, 3 Jul 2020 15:17:02 +0200
-Subject: [PATCH 1/2] cache: Disable caching for clones
-
-Whilst the cache feature is useful for content that the web browser will
-see, it is less useful when cgit is asked to clone a repository. Users
-might end up with a tree that is ever so slightly out of date.
-
-An upcoming commit will introduce functionality to offload clones to
-git-http-backend(1). The cache feature will prevent this from working
-correctly.
-
-Therefore, disable cache processing for commands that have the is_clone
-flag set.
----
- cache.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/cache.c b/cache.c
-index 2c70be7..bb4fc47 100644
---- a/cache.c
-+++ b/cache.c
-@@ -15,6 +15,7 @@
-
- #include "cgit.h"
- #include "cache.h"
-+#include "cmd.h"
- #include "html.h"
- #ifdef HAVE_LINUX_SENDFILE
- #include <sys/sendfile.h>
-@@ -356,6 +357,7 @@ int cache_process(int size, const char *path, const char *key, int ttl,
- struct strbuf filename = STRBUF_INIT;
- struct strbuf lockname = STRBUF_INIT;
- struct cache_slot slot;
-+ struct cgit_cmd *cmd;
- int result;
-
- /* If the cache is disabled, just generate the content */
-@@ -370,6 +372,15 @@ int cache_process(int size, const char *path, const char *key, int ttl,
- fn();
- return 0;
- }
-+
-+ cmd = cgit_get_cmd();
-+
-+ /* Do not cache files that are being cloned */
-+ if (cmd && cmd->is_clone) {
-+ fn();
-+ return 0;
-+ }
-+
- if (!key)
- key = "";
- hash = hash_str(key) % size;
---
-2.27.0
-
diff --git a/www-apps/cgit/files/cgit-1.2.3-git-http-backend.patch b/www-apps/cgit/files/cgit-1.2.3-git-http-backend.patch
deleted file mode 100644
index e43eb09..0000000
--- a/www-apps/cgit/files/cgit-1.2.3-git-http-backend.patch
+++ /dev/null
@@ -1,221 +0,0 @@
-From dcf96f0b2210d15b390ba1a5d26cd271f89aa924 Mon Sep 17 00:00:00 2001
-From: Wynn Wolf Arbor <wolf@oriole.systems>
-Date: Fri, 3 Jul 2020 15:23:45 +0200
-Subject: [PATCH 2/2] Support Git over HTTP by proxying git-http-backend(1)
-
-cgit lacks an easy way to support the "smart" HTTP protocol out of the
-box. A patch [1] has been proposed in the past, but was never merged.
-A few years later there was a short discussion at [2] which did not go
-anywhere.
-
-The majority of users who want to support the "smart" HTTP protocol
-right now seem to conditionally point their web server to
-git-http-backend(1) directly. This relies on proper path-matching and
-regular expression support in the web server as seen in the EXMAPLES
-section of git-http-backend(1).
-
-As proposed in [3], it is possible to have cgit interface with the
-necessary functionality in Git directly, but that would require more
-work. It does not seem that this is something forthcoming in cgit.
-
-Instead, for now, use a modified version of the patch suggested in [1],
-which simply executes git-http-backend(1) when needed. This removes the
-need for any additional plumbing in the web server.
-
-Notable changes to the original patch:
-
- * Remove automatic handling of GIT_PROJECT_ROOT in favour of having the
- user set the variable correctly themselves. This reduces complexity.
-
- * Use the correct function to generate error pages. The original patch
- used html_status(), which does not exist anymore.
-
- * In cmd.c, adjust the struct entries to fit. Sadly we cannot use the
- def_cmd() macro directly, as the endpoints "git-upload-pack" and
- "git-receive-pack" contain dashes.
-
-[1] https://lists.zx2c4.com/pipermail/cgit/2014-December/002312.html
-[2] https://lists.zx2c4.com/pipermail/cgit/2016-February/002907.html
-[3] https://lists.zx2c4.com/pipermail/cgit/2016-February/002926.html
----
- cgit.c | 3 +++
- cgit.h | 1 +
- cgitrc.5.txt | 8 ++++++++
- cmd.c | 13 +++++++++++++
- ui-clone.c | 42 ++++++++++++++++++++++++++++++++++++++++++
- ui-clone.h | 2 ++
- 6 files changed, 69 insertions(+)
-
-diff --git a/cgit.c b/cgit.c
-index c4320f0..fc85c18 100644
---- a/cgit.c
-+++ b/cgit.c
-@@ -151,6 +151,8 @@ static void config_cb(const char *name, const char *value)
- ctx.cfg.head_include = xstrdup(value);
- else if (!strcmp(name, "header"))
- ctx.cfg.header = xstrdup(value);
-+ else if (!strcmp(name, "http-backend-path"))
-+ ctx.cfg.http_backend_path = xstrdup(value);
- else if (!strcmp(name, "logo"))
- ctx.cfg.logo = xstrdup(value);
- else if (!strcmp(name, "logo-link"))
-@@ -379,6 +381,7 @@ static void prepare_context(void)
- ctx.cfg.css = "/cgit.css";
- ctx.cfg.logo = "/cgit.png";
- ctx.cfg.favicon = "/favicon.ico";
-+ ctx.cfg.http_backend_path = NULL;
- ctx.cfg.local_time = 0;
- ctx.cfg.enable_http_clone = 1;
- ctx.cfg.enable_index_owner = 1;
-diff --git a/cgit.h b/cgit.h
-index 7ec46b4..cd29892 100644
---- a/cgit.h
-+++ b/cgit.h
-@@ -200,6 +200,7 @@ struct cgit_config {
- char *footer;
- char *head_include;
- char *header;
-+ char *http_backend_path;
- char *logo;
- char *logo_link;
- char *mimetype_file;
-diff --git a/cgitrc.5.txt b/cgitrc.5.txt
-index 33a6a8c..820cfa6 100644
---- a/cgitrc.5.txt
-+++ b/cgitrc.5.txt
-@@ -234,6 +234,11 @@ header::
- The content of the file specified with this option will be included
- verbatim at the top of all pages. Default value: none.
-
-+http-backend-path::
-+ Path to the git-http-backend binary. Setting this allows the git clone to
-+ fetch/push via Git over HTTP. You'll also need to set enable-http-clone
-+ for this to work. See git-http-backend(1). Default value: none.
-+
- include::
- Name of a configfile to include before the rest of the current config-
- file is parsed. Default value: none. See also: "MACRO EXPANSION".
-@@ -824,6 +829,9 @@ enable-index-owner=1
- # Allow http transport git clone
- enable-http-clone=1
-
-+# Use git-http-backend to serve Git over HTTP
-+http-backend-path=/usr/lib/git-core/git-http-backend
-+
-
- # Show extra links for each repository on the index page
- enable-index-links=1
-diff --git a/cmd.c b/cmd.c
-index bf6d8f5..7f1ca98 100644
---- a/cmd.c
-+++ b/cmd.c
-@@ -164,6 +164,17 @@ static void tree_fn(void)
- cgit_print_tree(ctx.qry.sha1, ctx.qry.path);
- }
-
-+static void git_upload_pack_fn(void)
-+{
-+ cgit_clone_git_upload_pack();
-+}
-+
-+static void git_receive_pack_fn(void)
-+{
-+ cgit_clone_git_receive_pack();
-+}
-+
-+
- #define def_cmd(name, want_repo, want_vpath, is_clone) \
- {#name, name##_fn, want_repo, want_vpath, is_clone}
-
-@@ -191,6 +202,8 @@ struct cgit_cmd *cgit_get_cmd(void)
- def_cmd(summary, 1, 0, 0),
- def_cmd(tag, 1, 0, 0),
- def_cmd(tree, 1, 1, 0),
-+ {"git-upload-pack", git_upload_pack_fn, 1, 0, 1},
-+ {"git-receive-pack", git_receive_pack_fn, 1, 0, 1},
- };
- int i;
-
-diff --git a/ui-clone.c b/ui-clone.c
-index 5dccb63..5dea33c 100644
---- a/ui-clone.c
-+++ b/ui-clone.c
-@@ -77,8 +77,24 @@ static void send_file(const char *path)
- html_include(path);
- }
-
-+static void dispatch_to_git_http_backend(void)
-+{
-+ if (access(ctx.cfg.http_backend_path, X_OK) == -1) {
-+ fprintf(stderr, "[cgit] http-backend-path (%s) is not executable: %s\n",
-+ ctx.cfg.http_backend_path, strerror(errno));
-+ cgit_print_error_page(500, "Internal Server Error", "Internal Server Error");
-+ return;
-+ }
-+
-+ execl(ctx.cfg.http_backend_path, "git-http-backend", NULL);
-+}
-+
- void cgit_clone_info(void)
- {
-+ if (ctx.cfg.http_backend_path) {
-+ return dispatch_to_git_http_backend();
-+ }
-+
- if (!ctx.qry.path || strcmp(ctx.qry.path, "refs")) {
- cgit_print_error_page(400, "Bad request", "Bad request");
- return;
-@@ -94,6 +110,10 @@ void cgit_clone_objects(void)
- {
- char *p;
-
-+ if (ctx.cfg.http_backend_path) {
-+ return dispatch_to_git_http_backend();
-+ }
-+
- if (!ctx.qry.path)
- goto err;
-
-@@ -122,5 +142,27 @@ err:
-
- void cgit_clone_head(void)
- {
-+ if (ctx.cfg.http_backend_path) {
-+ return dispatch_to_git_http_backend();
-+ }
-+
- send_file(git_path("%s", "HEAD"));
- }
-+
-+void cgit_clone_git_upload_pack(void)
-+{
-+ if (ctx.cfg.http_backend_path) {
-+ return dispatch_to_git_http_backend();
-+ }
-+
-+ cgit_print_error_page(404, "Not found", "Not found");
-+}
-+
-+void cgit_clone_git_receive_pack(void)
-+{
-+ if (ctx.cfg.http_backend_path) {
-+ return dispatch_to_git_http_backend();
-+ }
-+
-+ cgit_print_error_page(404, "Not found", "Not found");
-+}
-diff --git a/ui-clone.h b/ui-clone.h
-index 3e460a3..b27087e 100644
---- a/ui-clone.h
-+++ b/ui-clone.h
-@@ -4,5 +4,7 @@
- void cgit_clone_info(void);
- void cgit_clone_objects(void);
- void cgit_clone_head(void);
-+void cgit_clone_git_upload_pack(void);
-+void cgit_clone_git_receive_pack(void);
-
- #endif /* UI_CLONE_H */
---
-2.27.0
-
diff --git a/www-apps/cgit/metadata.xml b/www-apps/cgit/metadata.xml
deleted file mode 100644
index 4e0a8bf..0000000
--- a/www-apps/cgit/metadata.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>zx2c4@gentoo.org</email>
- <name>Jason A. Donenfeld</name>
- </maintainer>
- <maintainer type="project">
- <email>web-apps@gentoo.org</email>
- <name>Gentoo Webapps</name>
- </maintainer>
- <longdescription lang="en">
- cgit - cgi for git
-
- This is an attempt to create a fast web interface for the git scm, using a
- builtin cache to decrease server io-pressure.
- </longdescription>
- <use>
- <flag name="lzip">Enable generation of snapshots compressed with app-arch/lzip</flag>
- <flag name="zip">Enable generation of snapshots compressed with app-arch/zip</flag>
- <flag name="zstd">Enable generation of snapshots compressed with app-arch/zstd</flag>
- <flag name="markdown">Enable markdown rendering in the about page</flag>
- <flag name="highlight">Enable source code highlighting</flag>
- <flag name="lua">Enable support for Lua scripting</flag>
- </use>
-</pkgmetadata>