~xenrox

Wuppertal

https://xenrox.net

Recent activity

Re: 404 error when automatingg sourcehut pages 25 days ago

From Thorben Günther to ~sircmpwn/sr.ht-discuss

On Fri, Feb 02, 2024 at 06:30:46PM -0500, Gabriel wrote:
> Hi Thorben, thanks for looking into it.
>
> That's one way to do it.
>
> I am trying to implement the automated way, in which  I don't make a
> tar, instead
> I use a git repository and builds.sr.ht would generate the webpage form the git
> repository.
>
> As described in the  automating-deployments webpage.

Yes your automated deployment through a builds.sr.ht job would work if
you change your build manifest to this:

Re: 404 error when automatingg sourcehut pages 25 days ago

From Thorben Günther to ~sircmpwn/sr.ht-discuss

You are zipping the entire repository, but you only need to do it for the
"public" folder. Try to do it like this instead:
tar -C public -cvz . > ../site.tar.gz

Besides you do not really have to commit this folder into your git
repository, instead you could add an intermediate step and build it with
hugo.

Re: [PATCH v2] pager/editor: Invoke command with "sh -c" 26 days ago

From Thorben Günther to ~emersion/hut-dev

On Thu, Feb 01, 2024 at 02:30:55PM +0000, Simon Ser wrote:

> Weird, it consistently fails from the command line for me. Tried both
> dash and bash.
>
> What seems to work is sh -c -- '%s "$@"' '-asdf'.

With my zsh setup it works, but yeah dash fails.
Honestly this all feels like too much "magic" to me, so I sent a shlex
patch.

[PATCH] pager/editor: Use shlex to parse command 26 days ago

From Thorben Günther to ~emersion/hut-dev

This will at least allow hut to handle flags.

References: https://todo.sr.ht/~emersion/hut/44
---
 go.mod   | 1 +
 go.sum   | 2 ++
 main.go  | 9 ++++++++-
 pager.go | 8 +++++++-
 4 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/go.mod b/go.mod
index 36e3ad9..8e34561 100644
--- a/go.mod
+++ b/go.mod
[message trimmed]

Re: [PATCH v2] pager/editor: Invoke command with "sh -c" 26 days ago

From Thorben Günther to ~emersion/hut-dev

On Thu, Feb 01, 2024 at 02:13:50PM +0000, Simon Ser wrote:
> Seems like git does it like I suggested [1].
>
> TBH I'm tempted to just ask users to use an intermediary shell script if
> they want to spawn an editor with a shell.
>
> [1]: https://github.com/git/git/blob/bc7ee2e5e16f0d1e710ef8fab3db59ab11f2bbe7/run-command.c#L295

When invoked from the terminal your suggestion works perfectly fine for
all 3 tested edge cases (space, quotes, starting with dash).
Just with exec.Command it fails for "-test". Seems like go parses it a
bit differently...

My favourite solution would be to just add shlex to what we have right

Re: Re: [PATCH v2] pager/editor: Invoke command with "sh -c" 26 days ago

From Thorben Günther to ~emersion/hut-dev

On Wed, Jan 31, 2024 at 09:07:51PM +0000, Simon Ser wrote:
> Hm, but then this doesn't handle quotes in the filename. What I mean was
> something like:
>
>     exec.Command("sh", "-c", editor + ` "$@"`, "--", file.Name())

I really could not find a solution that would work for all edge cases.

Your proposal above works for quotes but fails if the path starts with a dash:
export TMPDIR="-hut"

[PATCH v2] pager/editor: Invoke command with "sh -c" 27 days ago

From Thorben Günther to ~emersion/hut-dev

Closes: https://todo.sr.ht/~emersion/hut/44
---
v2: Handle leading dashes and spaces in file path

 main.go  | 2 +-
 pager.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/main.go b/main.go
index 7c05bee..825815a 100644
--- a/main.go
+++ b/main.go
@@ -152,7 +152,7 @@ func getInputWithEditor(pattern, initialText string) (string, error) {
		return "", err
[message trimmed]

[PATCH v2] todo ticket list: Add status filtering 27 days ago

From Thorben Günther to ~emersion/hut-dev

---
v2: Check that the status string contains a valid ticket status.

 doc/hut.1.scd |  7 ++++++-
 todo.go       | 15 ++++++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/doc/hut.1.scd b/doc/hut.1.scd
index 0e90942..76d1291 100644
--- a/doc/hut.1.scd
+++ b/doc/hut.1.scd
@@ -755,9 +755,14 @@ Options are:
	*-l*, *--label* <name>
		Name of the label (required).
[message trimmed]

[PATCH sr.ht-container-compose] minio: Expose console a month ago

From Thorben Günther to ~emersion/public-inbox

By default minio will chose a random port for binding the UI/console.
Instead bind to "9001", to allow easier access.
Accessing the console/UI can be useful to easily inspect the contents of
a bucket.
---
 README.md    | 2 ++
 compose.yaml | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 80b3cfe..a87a2d7 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,8 @@ The following services are included:
[message trimmed]

[PATCH sr.ht-container-compose] Add paste.sr.ht a month ago

From Thorben Günther to ~emersion/public-inbox

---
 .dockerignore    |  1 +
 .gitignore       |  1 +
 Dockerfile       | 12 ++++++++++++
 Makefile         |  1 +
 README.md        |  1 +
 compose.yaml     | 32 ++++++++++++++++++++++++++++++++
 config.ini       | 13 +++++++++++++
 hut-config       |  3 +++
 init-postgres.sh |  7 ++++++-
 9 files changed, 70 insertions(+), 1 deletion(-)

diff --git a/.dockerignore b/.dockerignore
index 29bf816..047ccb9 100644
[message trimmed]