~ludovicchabant

Recent activity

[PATCH sr.ht-nginx] Add https cloning config to hg.sr.ht a month ago

From Ludovic Chabant to ~sircmpwn/sr.ht-dev

It was mentioned in man.sr.ht, before sr.ht-nginx existed.
---
 hg.sr.ht.conf | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/hg.sr.ht.conf b/hg.sr.ht.conf
index fcb4237..f934907 100644
--- a/hg.sr.ht.conf
+++ b/hg.sr.ht.conf
@@ -35,4 +35,18 @@ server {
	location ~ ^/[~^][a-z0-9_]+/[a-zA-Z0-9_.-]+/\.hg/bundles/.*$ {
		root /var/lib/mercurial;
	}

[message trimmed]

[PATCH hg.sr.ht] Unauthorized access should be a 403 error a month ago

From Ludovic Chabant to ~sircmpwn/sr.ht-dev

# HG changeset patch
# User Ludovic Chabant <ludovic@chabant.com>
# Date 1705385014 0
#      Tue Jan 16 06:03:34 2024 +0000
# Node ID ee631d1b686970cad1b0c924cf650ae78754e9c5
# Parent  429f5c2a99742fdc2fd0c7bbbbcc7461f5b5610f
Unauthorized access should be a 403 error

diff --git a/hgsrht/access.py b/hgsrht/access.py
--- a/hgsrht/access.py
+++ b/hgsrht/access.py
@@ -34,7 +34,7 @@
    if not repo:
        abort(404)
[message trimmed]

[PATCH hg.sr.ht] Remove nested request in https cloning a month ago

From Ludovic Chabant to ~sircmpwn/sr.ht-dev

# HG changeset patch
# User Ludovic Chabant <ludovic@chabant.com>
# Date 1705385616 0
#      Tue Jan 16 06:13:36 2024 +0000
# Node ID 5f68e8efb0cbeb67babde0862a76fbe95fd1827b
# Parent  0821da11ccf1a0a63f8927e10b47142f59aa51da
Remove nested request in https cloning

HTTP(s) cloning is handled as a WSGI app wrapper that detects requests
coming from mercurial in order to forward them to hgweb. However it needs
to check authorization to access a repo before doing so.

Instead of making another request to the /authorize endpoint, we now setup
a db environment to check access directly in the same request. This fixes a
[message trimmed]

Re: Current status and future of Sourcehut 3 months ago

From Ludovic Chabant to ~sircmpwn/sr.ht-discuss

> Kind of slightly off-topic question: how is the Mercurial doing? What
> is the proportion of git.sr.ht versus hg.sr.ht? Is there some growing
> or decreasing tendency? How much does it cost?

I can't speak to the last two questions, but for the first two:

1) The mercurial hosting part of sourcehut is doing OK AFAICT. The good
   and bad thing about it is that I'm the one who wrote most of it, but
   I have very simple and basic needs. So it's fine to me, has been fine
   for years, and so I haven't felt much need to do anything except some
   occasional bug fixing, or rare important upgrades like GQL support.
   To anybody else however it might seem like it's missing a lot of
   features. I encourage these people to submit patches.

[PATCH] py3-unidiff: upgrade 5 months ago

From Ludovic Chabant to ~sircmpwn/sr.ht-dev

This fixes a bug when displaying large patches in hg.sr.ht
See https://todo.sr.ht/~sircmpwn/hg.sr.ht/46
---
 sr.ht/py3-unidiff/APKBUILD | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sr.ht/py3-unidiff/APKBUILD b/sr.ht/py3-unidiff/APKBUILD
index aefa1d4..356eacb 100644
--- a/sr.ht/py3-unidiff/APKBUILD
+++ b/sr.ht/py3-unidiff/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py3-unidiff
_pyname=unidiff
[message trimmed]

Re: [PATCH hg.sr.ht] Upgrade hgsrht-shell to sqlalchemy 2.0 API usage 9 months ago

From Ludovic Chabant to ~sircmpwn/sr.ht-dev

It looks like sqlalchemy completely changed their API with version 2.0...

I'm not sure however how package installs specify which version of sqlalchemy to install on Alpine? So I don't know if this patch would be premature. All I know is that with setup.py, my latest upgrade grabbed sqlalchemy 2+.

[PATCH hg.sr.ht] Upgrade hgsrht-shell to sqlalchemy 2.0 API usage 9 months ago

From Ludovic Chabant to ~sircmpwn/sr.ht-dev

# HG changeset patch
# User Ludovic Chabant <ludovic@chabant.com>
# Date 1684262080 0
#      Tue May 16 18:34:40 2023 +0000
# Node ID 429f5c2a99742fdc2fd0c7bbbbcc7461f5b5610f
# Parent  2240911d9025c8a5b874085917cd13166e80e6ab
Upgrade hgsrht-shell to sqlalchemy 2.0 API usage

diff --git a/hgsrht-shell b/hgsrht-shell
--- a/hgsrht-shell
+++ b/hgsrht-shell
@@ -7,6 +7,7 @@
import sys
from datetime import datetime
[message trimmed]

Re: [hg.sr.ht] ssh clone/push doesn't work out of the box 9 months ago

From Ludovic Chabant to ~sircmpwn/sr.ht-discuss

> So my question is: is this a packaging bug? I'm thinking that if
> that user's shell would be set to /bin/sh in the post-install script,
> the issues I've described wouldn't happen. Or maybe administrators are
> supposed to do things I've described (changing user's password and
> shell)?

It does indeed look like a bug in the post-install script. I can't say
why it was written like this since I'm running my sourcehut instance on
Ubuntu and not Alpine, but the similar post-install script for git.sr.ht
does setup the git user with /bin/sh. It apparently used to be
/sbin/nologin, but was changed to /bin/sh with:

https://git.sr.ht/~sircmpwn/sr.ht-apkbuilds/commit/a411788b6c2472b4a74a5cc96c2d72e6400be206#sr.ht/git.sr.ht/git.sr.ht.post-install

Re: [PATCH hg.sr.ht] hgsrht: Use canonical user IDs 1 year, 6 months ago

From Ludovic Chabant to ~sircmpwn/sr.ht-dev

Sounds good, thanks!