~gpanders

https://gpanders.com

~gpanders/ijq

Last active 2 months ago

~gpanders/passage

Last active 1 year, 1 month ago

~gpanders/public-inbox

Last active 1 year, 6 months ago

~gpanders/pushbroom

Last active 1 year, 8 months ago
View more

Recent activity

Re: Link to download binaries? 2 months ago

From Gregory Anders to ~gpanders/ijq

On Tue, 09 Nov 2021 20:29 +0100, Jman wrote:
>
>Hello,
>
>perhaps I'm not too familiar with how sr.ht stores binary releases, but I
>could not find a way to download the binary release (i.e. with the `ijq`
>file) by reading the README.md.
>
>This link seems to point to the source release:
>https://git.sr.ht/~gpanders/ijq/refs/vX.Y.Z/ijq-vX.Y.Z-linux-x86_64.tar.gz
>
>Can you help me out? Am I missing something? :)
>
>thanks

[PATCH] Indicate support for 'filename' option in compile functions 4 months ago

From Gregory Anders to ~technomancy/fennel

---
 api.md | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/api.md b/api.md
index 60fc0ed..a772948 100644
--- a/api.md
+++ b/api.md
@@ -144,13 +144,15 @@ provided. Unlike the other functions, the `compile` functions default
to performing no global checks, though you can pass in an `allowedGlobals`
table in `options` to enable it.

Accepts `filename` in `options` as in `fennel.eval`.

[message trimmed]

[PATCH] Slightly relax new log file permissions 7 months ago

From Gregory Anders to ~emersion/soju-dev

Make new log files group-readable by default. To retain the prior
behavior, soju can be started with a umask set to 0077.
---
 msgstore_fs.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/msgstore_fs.go b/msgstore_fs.go
index d17859d..5f7025b 100644
--- a/msgstore_fs.go
+++ b/msgstore_fs.go
@@ -129,12 +129,12 @@ func (ms *fsMessageStore) Append(network *network, entity string, msg *irc.Messa
		}

		dir := filepath.Dir(path)
[message trimmed]

Re: [PATCH] Add optional umask parameter to log config option 7 months ago

From Gregory Anders to ~emersion/soju-dev

On Sat, 12 Jun 2021 12:21 +0000, Simon Ser wrote:
>Yeah. Log files can be a little sensitive, since they contain private
>communication.
>
>Can you tell a little bit more about your use-case? Why do you need to
>access the log files as a different user?

Sure. I run soju on a single-user server using a dedicated user and 
group (soju:soju). I've added my user to the 'soju' group and chmod'ed 
the soju log directory to g+rX to make browsing and reading log files a 
little easier (i.e. without using sudo).

However, new log files are written with 0600 so even though they are 
owned by the 'soju' group I still can't read them without sudo.

[PATCH git.sr.ht] Use next commit in log continuation 7 months ago

From Gregory Anders to ~sircmpwn/sr.ht-dev

Fixes a bug where the first commit in the log after clicking the Next 
button would match the last commit on the previous page.

---
 gitsrht/blueprints/repo.py | 12 ++++++++----
 gitsrht/templates/log.html |  4 ++--
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py
index 49e4f58..5cf1d0b 100644
--- a/gitsrht/blueprints/repo.py
+++ b/gitsrht/blueprints/repo.py
@@ -418,17 +418,21 @@ def log(owner, repo, ref, path):
        if not commit:
[message trimmed]

Re: List of possibly outdated todos 7 months ago

From Gregory Anders to ~sircmpwn/sr.ht-dev

On Thu, 10 Jun 2021 22:49 +0300, Sol Fisher Romanoff wrote:
>If you find any more tickets, please add them so Drew can check.

https://todo.sr.ht/~sircmpwn/git.sr.ht/334 is done.

Re: [PATCH] Add optional umask parameter to log config option 7 months ago

From Gregory Anders to ~emersion/soju-dev

Now that I think about it I wonder if the best way to handle this is to just delegate to the *actual* umask set by the user/OS instead of re-implementing the functionality in soju. In order to do that, the patch would be much simpler: we’d simply change the mode argument of the MkdirAll call to 0777 and the mode argument of the OpenFile call to 0666.

Of course, for anyone who has a standard umask of 0022 set, this would suddenly make log files world readable, which is undesirable. But I do think having *some* way to handle the permissions on the log files is a useful feature (it’d be useful to me, at least).

I’m curious to hear your thoughts.

Greg

[PATCH] Add optional umask parameter to log config option 7 months ago

From Gregory Anders to ~emersion/soju-dev

Add a umask parameter (0077 by default) that specifies the umask to use
when creating new log files. This allows users to specify more
relaxed permissions which allows finer grained access control of log
files on their servers.
---
 cmd/soju/main.go |  1 +
 config/config.go | 13 +++++++++++++
 doc/soju.1.scd   |  5 +++--
 msgstore_fs.go   | 10 +++++++---
 server.go        |  2 ++
 user.go          |  2 +-
 6 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/cmd/soju/main.go b/cmd/soju/main.go
[message trimmed]

[PATCH] Forward user mode changes in single-upstream mode 7 months ago

From Gregory Anders to ~emersion/soju-dev

---
 downstream.go | 16 ++++++++++++++--
 upstream.go   | 23 ++++++++++++++++++++---
 2 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/downstream.go b/downstream.go
index 8e94095..5ee99ec 100644
--- a/downstream.go
+++ b/downstream.go
@@ -1182,6 +1182,14 @@ func (dc *downstreamConn) welcome() error {
		}
	})

	if uc := dc.upstream(); uc != nil {
[message trimmed]

[PATCH v2] Forward MOTD messages downstream 7 months ago

From Gregory Anders to ~emersion/soju-dev

The first MOTD upon connection is ignored, but subsequent MOTD messages
(requested by the "MOTD" message from the client, typically using a
/motd command) are forwarded.
---
 downstream.go |  2 +-
 upstream.go   | 29 ++++++++++++++++++++++++++++-
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/downstream.go b/downstream.go
index e263054..8e94095 100644
--- a/downstream.go
+++ b/downstream.go
@@ -1105,7 +1105,7 @@ func (dc *downstreamConn) welcome() error {
	dc.SendMessage(&irc.Message{
[message trimmed]