~vladh

London

https://vladh.net

Love cats, programming, philosophy, music, languages and videogames. Being kind is cool.

I worked on the Hare programming language, please check it out!

~vladh/hare-project-library

Last active 5 days ago
View more

Recent activity

[PATCH hut v3] add pager 6 days ago

From Vlad-Stefan Harbuz to ~emersion/hut-dev

Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
---
v2 -> v3:
    * Rebase

 builds.go                          | 64 +++++++++++---------
 export/git.go                      |  2 +-
 export/hg.go                       |  2 +-
 git.go                             | 62 +++++++++++--------
 hg.go                              | 58 ++++++++++--------
 lists.go                           | 56 +++++++++++-------
 pager.go                           | 95 ++++++++++++++++++++++++++++++
 srht/buildssrht/gql.go             |  7 ++-
 srht/buildssrht/operations.graphql |  5 +-
[message trimmed]

[PATCH hut v2] add pager 8 days ago

From Vlad-Stefan Harbuz to ~emersion/hut-dev

Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
---
v1 -> v2:
    * Username parsing now happens outside of pagerify(). Not quite at
    the top of the file, since different subcommands use different
    arguments, but the parsing should definitely only happen once now.

 builds.go                          | 64 +++++++++++---------
 export/git.go                      |  2 +-
 export/hg.go                       |  2 +-
 git.go                             | 62 +++++++++++--------
 hg.go                              | 58 ++++++++++--------
 lists.go                           | 54 ++++++++++-------
 pager.go                           | 95 ++++++++++++++++++++++++++++++
[message trimmed]

Re: Following a mailing-list through RSS 17 days ago

From Vlad-Stefan Harbuz to ~sircmpwn/sr.ht-discuss

On Wed, 16 Nov 2022, at 19:50, sourcehut@ploum.eu wrote:
> I suggest adding a RSS/Atom feed on each mailing-list archive to allow
> following a list through your feedreader.

I'm working on this.

Re: permission denied when creating repo on selfhosted git.sr.ht instance 19 days ago

From Vlad-Stefan Harbuz to ~sircmpwn/sr.ht-discuss

On Mon Nov 14, 2022 at 7:40 PM GMT, Slips wrote:
>  > The git.sr.ht API will create repos on the filesystem as whatever user
>  > you're running it as.It's running as git, as far as I can tell, since 
>  > that's the default user
> it runs as in the OpenRC service, and htop shows git as the process 
> owner for both the regular and API processes.

Ah, I see, I had misunderstood your issue. If you are getting a
permissions error, it would be quite surprising if the issue was not a
permissions issue. Just to confirm, do you still get the error if you
set the following?

```
doas chmod o+x /var /var/lib

Re: permission denied when creating repo on selfhosted git.sr.ht instance 20 days ago

From Vlad-Stefan Harbuz to ~sircmpwn/sr.ht-discuss

On Mon Nov 14, 2022 at 5:45 AM GMT, Slips wrote:
> mkdir /var/lib/git/~slips: permission denied

The git.sr.ht API will create repos on the filesystem as whatever user
you're running it as. Are you perhaps running it using your own user?
When running `./api/api`, make sure to run it as the git user. You
could, for example, do `doas -u git ./api/api`.

[PATCH sr.ht-docs 1/2] hacking: update db instructions to use schema.sql 20 days ago

From Vlad-Stefan Harbuz to ~sircmpwn/sr.ht-dev

Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
---
 configuration.md | 11 ++++++-----
 hacking.md       |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/configuration.md b/configuration.md
index 0f6190d..c6e680e 100644
--- a/configuration.md
+++ b/configuration.md
@@ -126,11 +126,12 @@ its own database login, with full permissions for its database so that it may
manage its own schema migrations.

Once you populate the `connection-string` field in your `config.ini`, you may
[message trimmed]

[PATCH sr.ht-docs 2/2] hacking: add examples for clarity 20 days ago

From Vlad-Stefan Harbuz to ~sircmpwn/sr.ht-dev

Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
---
 hacking.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hacking.md b/hacking.md
index f7010c2..7c7dea9 100644
--- a/hacking.md
+++ b/hacking.md
@@ -51,7 +51,7 @@ When filling in the `config.ini` file, remember the following:
* If you do not have SSL enabled for Postgres, be sure to add `?sslmode=disable`
  to the end of your Postgres URL.

Then, for each `SERVICE`:
[message trimmed]

[PATCH todo.sr.ht] ignore ticket references inside <pre> tags 22 days ago

From Vlad-Stefan Harbuz to ~sircmpwn/sr.ht-dev

Fixes: https://todo.sr.ht/~sircmpwn/todo.sr.ht/277
Fixes: https://todo.sr.ht/~sircmpwn/todo.sr.ht/219
Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
---
Previously, numbers such as #1, #2, #3 inside code tags ("```" etc.)
would be expanded to ticket references (<a href="...">#2</a>). This
happened especially often for core dumps.

This patch is an imperfect solution, on purpose. It does not support the
"~~~" fence, or the possibility of having up to three spaces before a
fence, or the four-space indent fence. It will also erroneously trigger
when the "```" backticks are not on the beginning of a line. Randomly
writing a bunch of backticks will also confuse the function.
[message trimmed]

[PATCH hub.sr.ht] refactor patchset_set_tool to use GraphQL API 24 days ago

From Vlad-Stefan Harbuz to ~sircmpwn/sr.ht-dev

Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
---

I am pretty sure this is right. I have tested all of the codepaths, but
I have not actually _run a worker_ --- that shouldn't make a difference,
though.

Would you like me to do something in particular about the logging in
builds.py? I am not sure how sr.ht handles logging.

 hubsrht/blueprints/webhooks.py |  4 ++--
 hubsrht/builds.py              | 17 ++++++++++------
 hubsrht/services.py            | 36 +++++++++++++++++++++++++++++-----
 3 files changed, 44 insertions(+), 13 deletions(-)
[message trimmed]