diff options
| author | 2026-07-30 12:49:23 +0700 | |
|---|---|---|
| committer | 2026-07-31 11:38:28 +0700 | |
| commit | 306fafc1d1d19c51d7ac24479f49c76272934ce5 (patch) | |
| tree | e2ab62c141f406bf2c8d8c675b00b66a409f7c52 | |
| parent | 1614f25c38d5dd1817cf7651b2fc5e07503fc454 (diff) | |
| download | cgitext-1.3.1+9.tar.gz cgitext-1.3.1+9.zip | |
licensing: add author preambles where changes were donev1.3.1+9
Add a copyright for changes done by me, also note in README the nature
of this repo
| -rw-r--r-- | AUTHORS | 12 | ||||
| -rw-r--r-- | README | 99 | ||||
| -rw-r--r-- | README.md | 85 | ||||
| -rw-r--r-- | cgit.c | 6 | ||||
| -rw-r--r-- | cgitrc.5.txt | 1 | ||||
| -rw-r--r-- | cmd.c | 4 | ||||
| -rw-r--r-- | filter.c | 4 | ||||
| -rw-r--r-- | shared.c | 12 | ||||
| -rw-r--r-- | ui-ci.c | 2 | ||||
| -rw-r--r-- | ui-shared.c | 8 |
10 files changed, 114 insertions, 119 deletions
@@ -1,13 +1,5 @@ Maintainer: - Jason A. Donenfeld <Jason@zx2c4.com> + Saya Andy <saya.andy@posteo.com> Contributors: - Jason A. Donenfeld <Jason@zx2c4.com> - Lukas Fleischer <cgit@cryptocrack.de> - Johan Herland <johan@herland.net> - Lars Hjemli <hjemli@gmail.com> - Ferry Huberts <ferry.huberts@pelagic.nl> - John Keeping <john@keeping.me.uk> - -Previous Maintainer: - Lars Hjemli <hjemli@gmail.com> + Saya Andy <saya.andy@posteo.com> @@ -1,99 +0,0 @@ -cgit - CGI for Git -================== - -This is an attempt to create a fast web interface for the Git SCM, using a -built-in cache to decrease server I/O pressure. - -Installation ------------- - -Building cgit involves building a proper version of Git. How to do this -depends on how you obtained the cgit sources: - -a) If you're working in a cloned cgit repository, you first need to -initialize and update the Git submodule: - - $ git submodule init # register the Git submodule in .git/config - $ $EDITOR .git/config # if you want to specify a different url for git - $ git submodule update # clone/fetch and checkout correct git version - -b) If you're building from a cgit tarball, you can download a proper git -version like this: - - $ make get-git - -When either a) or b) has been performed, you can build and install cgit like -this: - - $ make - $ sudo make install - -This will install `cgit.cgi` and `cgit.css` into `/var/www/htdocs/cgit`. You -can configure this location (and a few other things) by providing a `cgit.conf` -file (see the Makefile for details). - -If you'd like to compile without Lua support, you may use: - - $ make NO_LUA=1 - -And if you'd like to specify a Lua implementation, you may use: - - $ make LUA_PKGCONFIG=lua5.1 - -If this is not specified, the Lua implementation will be auto-detected, -preferring LuaJIT if many are present. Acceptable values are generally "lua", -"luajit", "lua5.1", and "lua5.2". - - -Dependencies ------------- - -* libzip -* libcrypto (OpenSSL) -* libssl (OpenSSL) -* optional: luajit or lua, most reliably used when pkg-config is available - -Apache configuration --------------------- - -A new `Directory` section must probably be added for cgit, possibly something -like this: - - <Directory "/var/www/htdocs/cgit/"> - AllowOverride None - Options +ExecCGI - Order allow,deny - Allow from all - </Directory> - - -Runtime configuration ---------------------- - -The file `/etc/cgitrc` is read by cgit before handling a request. In addition -to runtime parameters, this file may also contain a list of repositories -displayed by cgit (see `cgitrc.5.txt` for further details). - -The cache ---------- - -When cgit is invoked it looks for a cache file matching the request and -returns it to the client. If no such cache file exists (or if it has expired), -the content for the request is written into the proper cache file before the -file is returned. - -If the cache file has expired but cgit is unable to obtain a lock for it, the -stale cache file is returned to the client. This is done to favour page -throughput over page freshness. - -The generated content contains the complete response to the client, including -the HTTP headers `Modified` and `Expires`. - -Online presence ---------------- - -* The cgit homepage is hosted by cgit at <https://git.zx2c4.com/cgit/about/> - -* Patches, bug reports, discussions and support should go to the cgit - mailing list: <cgit@lists.zx2c4.com>. To sign up, visit - <https://lists.zx2c4.com/mailman/listinfo/cgit> diff --git a/README.md b/README.md new file mode 100644 index 0000000..d4092ee --- /dev/null +++ b/README.md @@ -0,0 +1,85 @@ +## cgitext - CGI for Git extension by Saya Andy + +This is a custom expansion to cgit. Its most prominent changes by now are: + +* CI/CD tab, linking to an external service on ref pages by using template. The Jenkins plugin is added to support a scenario when a ref lacks a pipeline. + +The original cgit project is hosted at [git.zx2c4.com](https://git.zx2c4.com/cgit/about/) + +## cgit - CGI for Git + +This is an attempt to create a fast web interface for the Git SCM, using a built-in cache to decrease server I/O pressure. + +### Installation + +Building cgit involves building a proper version of Git. How to do this depends on how you obtained the cgit sources: + +1. If you're working in a cloned cgit repository, you first need to initialize and update the Git submodule: + + $ git submodule init # register the Git submodule in .git/config + $ $EDITOR .git/config # if you want to specify a different url for git + $ git submodule update # clone/fetch and checkout correct git version + +2. If you're building from a cgit tarball, you can download a proper git version like this: + + $ make get-git + +When either `1.` or `2.` has been performed, you can build and install cgit like +this: +``` +make +sudo make install +``` + +This will install `cgit.cgi` and `cgit.css` into `/var/www/htdocs/cgit`. You can configure this location (and a few other things) by providing a `cgit.conf` file (see the Makefile for details). + +If you'd like to compile without Lua support, you may use: +``` +make NO_LUA=1 +``` + +And if you'd like to specify a Lua implementation, you may use: +``` +make LUA_PKGCONFIG=lua5.1 +``` + +If this is not specified, the Lua implementation will be auto-detected, preferring LuaJIT if many are present. Acceptable values are generally "lua", "luajit", "lua5.1", and "lua5.2". + + +### Dependencies + +* libzip +* libcrypto (OpenSSL) +* libssl (OpenSSL) +* optional: luajit or lua, most reliably used when pkg-config is available + +### Apache configuration + +A new `Directory` section must probably be added for cgit, possibly something like this: + +``` +<Directory "/var/www/htdocs/cgit/"> + AllowOverride None + Options +ExecCGI + Order allow,deny + Allow from all +</Directory> +``` + +### Runtime configuration + +The file `/etc/cgitrc` is read by cgit before handling a request. In addition to runtime parameters, this file may also contain a list of repositories displayed by cgit (see `cgitrc.5.txt` for further details). + +### The cache + +When cgit is invoked it looks for a cache file matching the request and returns it to the client. If no such cache file exists (or if it has expired), the content for the request is written into the proper cache file before the file is returned. + +If the cache file has expired but cgit is unable to obtain a lock for it, the stale cache file is returned to the client. This is done to favour page throughput over page freshness. + +The generated content contains the complete response to the client, including the HTTP headers `Modified` and `Expires`. + +### Online presence + +* The cgit homepage is hosted by cgit at [git.zx2c4.com](https://git.zx2c4.com/cgit/about/) + +* Patches, bug reports, discussions and support should go to the cgit mailing list: [cgit@lists.zx2c4.com](mailto:cgit@lists.zx2c4.com). To sign up, visit [lists.zx2c4.com](https://lists.zx2c4.com/mailman/listinfo/cgit) @@ -1,6 +1,10 @@ /* cgit.c: cgi for the git scm * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * Copyright (C) 2026 Saya Andy <saya.andy@posteo.com> + * + * Modified 2026 by Saya Andy: + * Always check there is git repo on repo.path * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -997,7 +1001,7 @@ static void cgit_parse_args(int argc, const char **argv) for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "--version")) { - printf("CGit %s | https://git.zx2c4.com/cgit/\n\nCompiled in features:\n", CGIT_VERSION); + printf("CGit %s | https://sayag.it/cgitext.git | https://git.zx2c4.com/cgit/\n\nCompiled in features:\n", CGIT_VERSION); #ifdef NO_LUA printf("[-] "); #else diff --git a/cgitrc.5.txt b/cgitrc.5.txt index c03579f..76b2085 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -1117,3 +1117,4 @@ AUTHOR ------ Lars Hjemli <hjemli@gmail.com> Jason A. Donenfeld <Jason@zx2c4.com> +Saya Andy <saya.andy@posteo.com> @@ -1,6 +1,10 @@ /* cmd.c: the cgit command dispatcher * * Copyright (C) 2006-2017 cgit Development Team <cgit@lists.zx2c4.com> + * Copyright (C) 2026 Saya Andy <saya.andy@posteo.com> + * + * Modified 2026 by Saya Andy: + * Include ci ui element * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -1,6 +1,10 @@ /* filter.c: filter framework functions * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * Copyright (C) 2026 Saya Andy <saya.andy@posteo.com> + * + * Modified 2026 by Saya Andy: + * Integrate ci filter * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -1,6 +1,11 @@ /* shared.c: global vars + some callback functions * * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com> + * Copyright (C) 2026 Saya Andy <saya.andy@posteo.com> + * + * Modified 2026 by Saya Andy: + * Add cgit_have_repository() + * Add ci filter configuration * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -13,13 +18,6 @@ struct cgit_repolist cgit_repolist; struct cgit_context ctx; -/* Returns true when the git repository belonging to this request was opened - * successfully. Some requests print a page for a repository which could not - * be opened, e.g. because repo.path is wrong, and the object database and - * ref stores must not be touched in that case: they would abort with - * "reference backend is unknown" or dereference the not yet known hash - * algorithm. - */ int cgit_have_repository(void) { return startup_info->have_repository; @@ -1,6 +1,6 @@ /* ui-ci.c: redirect to an external CI system * - * Copyright (C) 2006-2025 cgit Development Team <cgit@lists.zx2c4.com> + * Copyright (C) 2026 Saya Andy <saya.andy@posteo.com> * * Licensed under GNU General Public License v2 * (see COPYING for full license text) diff --git a/ui-shared.c b/ui-shared.c index 9a9d014..97d1839 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -1,6 +1,12 @@ /* ui-shared.c: common web output functions * * Copyright (C) 2006-2017 cgit Development Team <cgit@lists.zx2c4.com> + * Copyright (C) 2026 Saya Andy <saya.andy@posteo.com> + * + * Modified 2026 by Saya Andy: + * Implement ci link tab + * Check repo existence + * Replace memrchr() for macOS compatibility * * Licensed under GNU General Public License v2 * (see COPYING for full license text) @@ -884,7 +890,7 @@ void cgit_print_docend(void) if (ctx.cfg.footer) html_include(ctx.cfg.footer); else { - htmlf("<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit %s</a> " + htmlf("<div class='footer'>generated by <a href='https://sayag.it/cgitext.git/about/'>cgitext %s</a> " "(<a href='https://git-scm.com/'>git %s</a>) at ", cgit_version, git_version_string); html_txt(show_date(time(NULL), 0, cgit_date_mode(DATE_ISO8601))); html("</div>\n"); |