~blowry

Sometimes I write code and sometimes it works

~blowry/inbox

Last active 4 months ago
View more

Recent activity

Re: Should the mailing list respect the user's privacy settings? 3 days ago

From Benjamin Lowry to ~sircmpwn/sr.ht-discuss

Sorry if I miss the point, but I'm trying to understand why you would
want this...all of the emails sent by lists.sr.ht originate by being
created by other users. If the list is public it doesn't matter whether
you get the emails encrypted or not because they're publicly viewable,
and if you want to keep list messages private you should have senders
encrypt their own mail instead of the list doing it for them.

Re: License detection 13 days ago

From Benjamin Lowry to ~sircmpwn/sr.ht-dev

> It has both
> ```
> https://git.sr.ht/~lucidone/ryo-iso/tree/master/LICENSE-MIT
> https://git.sr.ht/~lucidone/ryo-iso/tree/master/LICENSE-APACHE
> ```
> 
> Is there a preferred approach here?
Here's the list of files git.sr.ht checks for:
                "LICENSE", "LICENCE", "COPYING",
                "LICENSE.txt", "license.txt",
                "LICENCE.txt", "licence.txt",
                "COPYING.txt", "copying.txt",
                "LICENSE.md", "license.md",
                "LICENCE.md", "licence.md",

[PATCH] Makefile: remove getopt.h from public_includes a month ago

From Benjamin Lowry to ~emersion/mrsh-dev

Fixes 'make install' failing since getopt.h was made private
in 8312ce143903f0befff5d0d595bf94d7836236ec.
---
 Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Makefile b/Makefile
index b5db765..ce88f4b 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,6 @@ public_includes=\
		include/mrsh/buffer.h \
		include/mrsh/builtin.h \
		include/mrsh/entry.h \
[message trimmed]

Re: Supporting user groups/organizations on SourceHut a month ago

From Benjamin Lowry to ~sircmpwn/sr.ht-discuss

> > The only point of a having a prefix for groups is if you have plans
> > to
> > have a *third* "thing" later down the line, and we need to
> > differentiate between all three (although even then, 2 could have
> > prefixes and the 3rd doesn't).
> 
> There already is a third thing: special urls, like /create/ or /api/.
Seconding this. Too many websites have no differentiation between
arbitraty resource URLs created by users and special URLs to perform
actions on the website. What happens if someone names their group
"create"? There's already https://git.sr.ht/create.... -ben

Re: Question about building a Docker image a month ago

From Benjamin Lowry to ~sircmpwn/sr.ht-discuss

On Sun, 2020-02-09 at 01:16 -0500, Zachary King wrote:
> That was the impression I had as well. Official images would be nice,
> but I was more looking for pointers as to where to start if I wanted
> to build my own unofficial images. Though I guess the answer of that
> is mostly just go through the docs and figure out any missing pieces.
I have a set of (badly hacked together) Dockerfiles for sourcehut
services that can be run using docker-compose. I've only tested them
under podman and not all services are working but it should be a good
starting point. Honestly I'd recommend just using a VM because
rebuilding all the images after changing one line in core.sr.ht is
annoying, but if you want em, they're at 
https://git.sr.ht/~blowry/sourcehut-compose. -ben

[PATCH lists.sr.ht v2] patches.py: check if patch number is int 2 months ago

From Benjamin Lowry to ~sircmpwn/sr.ht-dev

Previously, the patchset (patches/<number>) endpoint would return a 500
(sqlalchemy.exc.DataError) if the patch number wasn't actually a number.
This patch requires the patchset_id to be an int.
Fixes https://todo.sr.ht/~sircmpwn/lists.sr.ht/131

Signed-off-by: Benjamin Lowry <ben@ben.gmbh>
---
 v2 uses Flask's route key typing (which I was unaware of before)
 listssrht/blueprints/patches.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/listssrht/blueprints/patches.py b/listssrht/blueprints/patches.py
index c30a96e..2aeb815 100644
--- a/listssrht/blueprints/patches.py
[message trimmed]

Re: [PATCH core.sr.ht v3] Replace misaka (hoedown) with mistletoe 2 months ago

From Benjamin Lowry to ~sircmpwn/sr.ht-dev

Just tested this, didn't notice any regressions. I had to make one
change to get it to work:
> +        inner = html.escape(token.children[0].content)
You need an "import html" at the top of the file.

[PATCH lists.sr.ht] patches.py: check if patch number is int 2 months ago

From Benjamin Lowry to ~sircmpwn/sr.ht-dev

Previously, the patchset (patches/<number>) endpoint would return a 500
(sqlalchemy.exc.DataError) if the patch number wasn't actually a number.
This patch adds a check and returns 404 if the patch number cannot be
converted to int. Fixes https://todo.sr.ht/~sircmpwn/lists.sr.ht/131

Signed-off-by: Benjamin Lowry <ben@ben.gmbh>
---
 listssrht/blueprints/patches.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/listssrht/blueprints/patches.py b/listssrht/blueprints/patches.py
index c30a96e..3d836ec 100644
--- a/listssrht/blueprints/patches.py
+++ b/listssrht/blueprints/patches.py
[message trimmed]

[PATCH core.sr.ht] flask.py: change import for Werkzeug 1.0 2 months ago

From Benjamin Lowry to ~sircmpwn/sr.ht-dev

Werkzeug 1.0 (which is now in prerelease) decided to move
DispatcherMiddleware to werkzeug.middleware.dispatcher.
(https://github.com/pallets/flask/issues/3373)

Signed-off-by: Benjamin Lowry <ben@ben.gmbh>
---
 srht/flask.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srht/flask.py b/srht/flask.py
index 008cac0..f53fefd 100644
--- a/srht/flask.py
+++ b/srht/flask.py
@@ -17,7 +17,10 @@ from urllib.parse import urlparse, quote_plus
[message trimmed]

[PATCH sr.ht-docs] Update alpine repository information 2 months ago

From Benjamin Lowry to ~sircmpwn/sr.ht-dev

Update the alpine version number, and add a note informing that the
community repository must be enabled.

Signed-off-by: Benjamin Lowry <ben@ben.gmbh>
---
 packages.md | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/packages.md b/packages.md
index d608212..496b2c1 100644
--- a/packages.md
+++ b/packages.md
@@ -10,9 +10,10 @@ can find packages for sr.ht software in various distributions at

[message trimmed]