From durian at boogie.com Thu May 13 19:39:02 2021 From: durian at boogie.com (Michael Durian) Date: Thu, 13 May 2021 19:39:02 +0000 Subject: Trying to access invalid directory Message-ID: <01010179673d4f97-eec6aedf-4248-42ab-bf94-7840bde76b73-000000@us-west-2.amazonses.com> I?m seeing errors like the following appear in my log file: [Thu May 13 12:59:33.740795 2021] [authz_core:error] [pid 67752] [client 71.237.74.11:57890] AH01630: client denied by server configuration: /ebs1/git/src, referer: https://git.boogie.com/moca/src/Handset/diff/ I think rather than trying to access /ebs1/git/src, it should be trying to access /ebs1/git/moca/src. I?m guessing there is a way I can correct this using macro substitutions, but I?m not sure what configuration value needs to be adjusted. Here?s what I?m trying to do. I?m using apache authentication to restrict access to different git areas. Each area has its own .htpasswd. Basically, if you are trying to access /moca, you need to authenticate. The same LocationMatch block that handles the authentication defines REPO_NAME and SCANPATH environment variables that I then use in the cgitrc file. What should I adjust to keep cgit from trying to access the wrong filesystem path? Or am I thinking about this all wrong and should take a different approach completely? Excerpts from my VirtualHost definition: DocumentRoot /ebs1/git AuthType Basic AuthName 'Git Access' AuthUserFile /ebs1/git/moca/.htpasswd Require valid-user Order allow,deny Allow from all # Let cgit know where to search for repositories. # This value is passed to cgitrc where it is used # to for the scan-path variable. SetEnv REPO_NAME moca SetEnv SCANPATH /ebs1/git/moca SetEnv GIT_PROJECT_ROOT /ebs1/git SetEnv GIT_HTTP_EXPORT_ALL ScriptAliasMatch \ "(?x)^/(.*/(HEAD | \ info/refs | \ objects/info/[^/]+ | \ git-(upload|receive)-pack))$" \ /usr/local/libexec/git-core/git-http-backend/$1 # For cgit SetEnv CGIT_CONFIG /ebs1/git/cgit/cgitrc AllowOverride None Options +ExecCGI Require all granted Alias /cgit.png /ebs1/git/cgit/cgit.png Alias /cgit.css /ebs1/git/cgit/cgit.css Alias /favicon.ico /ebs1/git/cgit/favicon.ico ScriptAlias /moca /ebs1/git/cgit/cgit.cgi And here?s my /ebs1/git/cgit/cgitrc enable-http-clone=1 enable-commit-graph=1 enable-log-filecount=1 enable-log-linecount=1 remove-suffix=1 enable-git-config=1 clone-url=https://git.boogie.com/$REPO_NAME/$CGIT_REPO_URL scan-path=$SCANPATH Thanks, mike From list at eworm.de Tue May 18 20:54:48 2021 From: list at eworm.de (Christian Hesse) Date: Tue, 18 May 2021 22:54:48 +0200 Subject: [PATCH 1/1] RFC: git: update to v2.32.0-rc0 Message-ID: <20210518205448.52461-1-list@eworm.de> From: Christian Hesse Update to git version v2.32.0-rc0, this requires changes for these upstream commits: * 47957485b3b731a7860e0554d2bd12c0dce1c75a tree.h API: simplify read_tree_recursive() signature Signed-off-by: Christian Hesse --- Makefile | 4 ++-- git | 2 +- ui-blame.c | 9 +++------ ui-blob.c | 20 ++++++++------------ ui-plain.c | 7 +++---- ui-tree.c | 21 ++++++++------------- 6 files changed, 25 insertions(+), 38 deletions(-) diff --git a/Makefile b/Makefile index abc52bc..bf835e2 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ htmldir = $(docdir) pdfdir = $(docdir) mandir = $(prefix)/share/man SHA1_HEADER = -GIT_VER = 2.31.1 -GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz +GIT_VER = 2.32.0-rc0 +GIT_URL = https://www.kernel.org/pub/software/scm/git/testing/git-$(GIT_VER).tar.xz INSTALL = install COPYTREE = cp -r MAN5_TXT = $(wildcard *.5.txt) diff --git a/git b/git index 48bf2fa..bf949ad 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 48bf2fa8bad054d66bd79c6ba903c89c704201f7 +Subproject commit bf949ade81106fbda068c1fdb2c6fd1cb1babe7e diff --git a/ui-blame.c b/ui-blame.c index ec1d888..03136f7 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -221,8 +221,7 @@ cleanup: } static int walk_tree(const struct object_id *oid, struct strbuf *base, - const char *pathname, unsigned mode, int stage, - void *cbdata) + const char *pathname, unsigned mode, void *cbdata) { struct walk_tree_context *walk_tree_ctx = cbdata; @@ -291,10 +290,8 @@ void cgit_print_blame(void) walk_tree_ctx.match_baselen = (path_items.match) ? basedir_len(path_items.match) : -1; - read_tree_recursive(the_repository, - repo_get_commit_tree(the_repository, commit), - "", 0, 0, - &paths, walk_tree, &walk_tree_ctx); + read_tree(the_repository, repo_get_commit_tree(the_repository, commit), + &paths, walk_tree, &walk_tree_ctx); if (!walk_tree_ctx.state) cgit_print_error_page(404, "Not found", "Not found"); else if (walk_tree_ctx.state == 2) diff --git a/ui-blob.c b/ui-blob.c index f76c641..c10ae42 100644 --- a/ui-blob.c +++ b/ui-blob.c @@ -19,7 +19,7 @@ struct walk_tree_context { }; static int walk_tree(const struct object_id *oid, struct strbuf *base, - const char *pathname, unsigned mode, int stage, void *cbdata) + const char *pathname, unsigned mode, void *cbdata) { struct walk_tree_context *walk_tree_ctx = cbdata; @@ -56,9 +56,9 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only) goto done; if (oid_object_info(the_repository, &oid, &size) != OBJ_COMMIT) goto done; - read_tree_recursive(the_repository, - repo_get_commit_tree(the_repository, lookup_commit_reference(the_repository, &oid)), - "", 0, 0, &paths, walk_tree, &walk_tree_ctx); + read_tree(the_repository, + repo_get_commit_tree(the_repository, lookup_commit_reference(the_repository, &oid)), + &paths, walk_tree, &walk_tree_ctx); done: free(path_items.match); @@ -92,10 +92,8 @@ int cgit_print_file(char *path, const char *head, int file_only) type = oid_object_info(the_repository, &oid, &size); if (type == OBJ_COMMIT) { commit = lookup_commit_reference(the_repository, &oid); - read_tree_recursive(the_repository, - repo_get_commit_tree(the_repository, commit), - "", 0, 0, &paths, walk_tree, - &walk_tree_ctx); + read_tree(the_repository, repo_get_commit_tree(the_repository, commit), + &paths, walk_tree, &walk_tree_ctx); if (!walk_tree_ctx.found_path) return -1; type = oid_object_info(the_repository, &oid, &size); @@ -151,10 +149,8 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl if ((!hex) && type == OBJ_COMMIT && path) { commit = lookup_commit_reference(the_repository, &oid); - read_tree_recursive(the_repository, - repo_get_commit_tree(the_repository, commit), - "", 0, 0, &paths, walk_tree, - &walk_tree_ctx); + read_tree(the_repository, repo_get_commit_tree(the_repository, commit), + &paths, walk_tree, &walk_tree_ctx); type = oid_object_info(the_repository, &oid, &size); } diff --git a/ui-plain.c b/ui-plain.c index 001001c..65a205f 100644 --- a/ui-plain.c +++ b/ui-plain.c @@ -130,7 +130,7 @@ static void print_dir_tail(void) } static int walk_tree(const struct object_id *oid, struct strbuf *base, - const char *pathname, unsigned mode, int stage, void *cbdata) + const char *pathname, unsigned mode, void *cbdata) { struct walk_tree_context *walk_tree_ctx = cbdata; @@ -198,9 +198,8 @@ void cgit_print_plain(void) } else walk_tree_ctx.match_baselen = basedir_len(path_items.match); - read_tree_recursive(the_repository, - repo_get_commit_tree(the_repository, commit), - "", 0, 0, &paths, walk_tree, &walk_tree_ctx); + read_tree(the_repository, repo_get_commit_tree(the_repository, commit), + &paths, walk_tree, &walk_tree_ctx); if (!walk_tree_ctx.match) cgit_print_error_page(404, "Not found", "Not found"); else if (walk_tree_ctx.match == 2) diff --git a/ui-tree.c b/ui-tree.c index 1e4efb2..b61f6f5 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -139,8 +139,7 @@ struct single_tree_ctx { }; static int single_tree_cb(const struct object_id *oid, struct strbuf *base, - const char *pathname, unsigned mode, int stage, - void *cbdata) + const char *pathname, unsigned mode, void *cbdata) { struct single_tree_ctx *ctx = cbdata; @@ -185,8 +184,7 @@ static void write_tree_link(const struct object_id *oid, char *name, tree_ctx.name = NULL; tree_ctx.count = 0; - read_tree_recursive(the_repository, tree, "", 0, 1, - &paths, single_tree_cb, &tree_ctx); + read_tree(the_repository, tree, &paths, single_tree_cb, &tree_ctx); if (tree_ctx.count != 1) break; @@ -199,7 +197,7 @@ static void write_tree_link(const struct object_id *oid, char *name, } static int ls_item(const struct object_id *oid, struct strbuf *base, - const char *pathname, unsigned mode, int stage, void *cbdata) + const char *pathname, unsigned mode, void *cbdata) { struct walk_tree_context *walk_tree_ctx = cbdata; char *name; @@ -294,14 +292,13 @@ static void ls_tree(const struct object_id *oid, const char *path, struct walk_t } ls_head(); - read_tree_recursive(the_repository, tree, "", 0, 1, - &paths, ls_item, walk_tree_ctx); + read_tree(the_repository, tree, &paths, ls_item, walk_tree_ctx); ls_tail(); } static int walk_tree(const struct object_id *oid, struct strbuf *base, - const char *pathname, unsigned mode, int stage, void *cbdata) + const char *pathname, unsigned mode, void *cbdata) { struct walk_tree_context *walk_tree_ctx = cbdata; @@ -326,7 +323,7 @@ static int walk_tree(const struct object_id *oid, struct strbuf *base, return 0; } } - ls_item(oid, base, pathname, mode, stage, walk_tree_ctx); + ls_item(oid, base, pathname, mode, walk_tree_ctx); return 0; } @@ -374,10 +371,8 @@ void cgit_print_tree(const char *rev, char *path) goto cleanup; } - read_tree_recursive(the_repository, - repo_get_commit_tree(the_repository, commit), - "", 0, 0, - &paths, walk_tree, &walk_tree_ctx); + read_tree(the_repository, repo_get_commit_tree(the_repository, commit), + &paths, walk_tree, &walk_tree_ctx); if (walk_tree_ctx.state == 1) ls_tail(); else if (walk_tree_ctx.state == 2) From Jason at zx2c4.com Mon May 31 07:49:40 2021 From: Jason at zx2c4.com (Jason A. Donenfeld) Date: Mon, 31 May 2021 09:49:40 +0200 Subject: IRC channels #wireguard, #cgit, and #pass open on Libera.Chat Message-ID: Hi, The IRC channels #wireguard, #cgit, and #pass will now be on Libera.Chat in official capacity. This means that you can now connect with other users and developers of these projects by pointing your IRC client at: Server: irc.libera.chat Port: 6697 with TLS (aka "ssl" or "secure port") Channel: #wireguard, #cgit, and #pass On Weechat: /server add libera irc.libera.chat/6697 -ssl -autoconnect -autojoin=#wireguard,#cgit,#pass /save /connect libera On irssi: /network add libera /channel add -auto #wireguard libera /channel add -auto #cgit libera /channel add -auto #pass libera /server add -network libera -auto -tls irc.libera.chat 6697 /save /connect libera Users who want to simply pop online ephemerally to ask a quick question can also use the web interface: . Though do note that the community generally appreciates it when people maintain a more continuous presence logged in ("idling"). For folks who want to connect to IRC longer term, but don't want to futz around with overly technical things, services like IRCCloud.com (paid) and Matrix.org (free) offer a way of staying connected to IRC networks from your web browser and mobile phone. With large swaths of the free software community recently departing our old home of freenode, the choice was between the new Libera.Chat IRC network, the venerable OFTC IRC network, and something newfangled like Slack, Discord, Mattermost, Rocket.Chat, Zulip, or `ncat -l -k --chat`. This choice was not easy. The primary advantage of the newer platforms is their broader accessibility to less technical users and expanded feature sets. Their disadvantage is that they are standalone/siloed tools, which don't promote cross-pollination between our community and other communities. In contrast, the primary advantage of IRC in general over the more recent communication tools is the community around IRC. Somebody hanging out over in #archlinux asking a question about WireGuard is easily referred to #wireguard for additional troubleshooting, and vice versa. And different types of users and developers frequently meet and share ideas. It is a commons of sorts. There are additional differences between the platforms (with keywords like "javascript" or "licensing" or "curmudgeonly"), but this distinction between being part of the larger community and free software ecosystem, and not, strikes me as a critical basis of decision. In deciding between Libera.Chat and OFTC, the decision was a bit harder, but ultimately was made with the same principle in mind. OFTC is old and stable, having apparently few governance issues over a long history. In contrast, Libera.Chat is brand new and was created by a group of volunteers that, while having an impressive history of running freenode successfully for many years, have just emerged from a highly publicized conflict. However, Libera.Chat hosts a significantly larger portion of the free software community than OFTC. Seeing that our motivation for remaining on IRC in the first place is community, going with the larger network makes most sense, even if it does not yet have a proven track record of stability. I hope that rationale makes sense. See you all in the new channels. Thanks, Jason PS: WireGuard community members, enthusiasts, contributors, and developers can now request a "wireguard/tunneler/{nick}" cloak from Mira (mira), Aaron (amdj), or me (zx2c4). Shoot one of us a message on IRC and we'll set it up.