Wednesday, April 27, 2022

Re: [NEW] www/gotosocial

Hukadan <me@hukadan.org> wrote:
> Le 2022-04-27 10:46, Omar Polo a écrit :
> > Hukadan <me@hukadan.org> wrote:
> >> Hi,
> >>
> >> I would like to submit this new port:
> >> https://docs.gotosocial.org/en/latest
> >>
> >> I have been using it for more than a month now. It has few rough edges
> >> but works well for me.
> >>
> >> COMMENT: ActivityPub social network server
> >>
> >> DESCR:
> >> GoToSocial provides a lightweight, customizable, and safety-focused
> >> entryway
> >> into the Fediverse, and is comparable to (but distinct from) existing
> >> projects
> >> such as Mastodon, Pleroma, Friendica, and PixelFed.
> >>
> >> It needs a dedicated _gotosocial user.
> >>
> >> portcheck did not complain.
> >>
> >> This is my first port so I am not sure I have done everything properly.
> >> Bear with me ;)
> >
> > it's a solid first submission!
> >
> > I have a few comments, but they're mostly nitpicking:
> >
> > - I'd format slightly different pkg/DESCR so the lines are a bit
> > shorter, it reads better IMHO
> >
> > - drop MODGO_VERSION from modules.inc
> >
> > - add WRKDIST=${WRKSRC} so `make update-patches' & co works
> >
> > - add a proper patch instead of running sed in place: it adds a file to
> > the port but it's easier to handle for updates. If the config file
> > changes significatly, patch will fail and you'll be notified, sed won't.
> >
> > - SEPARATE_BUILD=yes is the default for go ports, no need to re-set it.
> >
> > - i'd indent the continuation lines in the do-install slightly
> > differently, so they stand out more, but this is just a matter of
> > preference
> >
> > - i've shuffled the entry in the plist a bit: by moving the @cwd
> > ${LOCALBASE} under the items that goes in /var we avoid one @cwd.
> > There's a reason to install the web assets as 750? in the attached
> > tarball I'm just resetting @mode, @owner and @group after storage.
> >
> > - i'd @sample the configuration file in /etc since the rcfile uses it
> > as default --config-path.
> >
> > - I'd also add a brief pkg/README. upstream documentation is good, but
> > adding some reminders here is handy IMHO, especially since we run it
> > as a dedicated user.
> >
> > I've only briefly tested locally, so I can't asses how good this works,
> > but the port looks good to me now ;)
> >
> > I'm reattaching a tarball with my suggestions. Note that I bumped the
> > _gotosocial uid/gid because shairport was recently imported.
> >
> > (I'm not sure if the _gotosocial needs to inherit from daemon or not)
> >
> > Index: user.list
> > ===================================================================
> > RCS file: /home/cvs/ports/infrastructure/db/user.list,v
> > retrieving revision 1.398
> > diff -u -p -r1.398 user.list
> > --- user.list 27 Apr 2022 02:20:03 -0000 1.398
> > +++ user.list 27 Apr 2022 06:59:06 -0000
> > @@ -385,3 +385,4 @@ id user group port
> > 874 _snowflakeproxy _snowflakeproxy net/snowflake_proxy
> > 875 _guacd _guacd net/guacamole/server
> > 876 _shairport _shairport audio/shairport-sync
> > +877 _gotosocial _gotosocial www/gotosocial
>
> Hi Omar,
>
> Thank you for your time and the modified tarball. You did all the work
> ;)
>
> Here is a new version with the following modifications:
> - the _gotosocial user has now the `default` login class;
> - the README now mentions the possibility to use an admin interface.

I'm not 100% in for suggesting user to manually build nodejs stuff and
copy it in a directory owned by a package (even if it's under /var/ in
this case.) It'd be really cool to somehow package the admin interface
too, but js stuff tends to be hard to manage. (the few node js ports I
*think* are using "precompiled" tarballs built either by upstream or by
the port maintaintainer.)

I'll let others chime in for this :)

> I tested it again and it runs fine.

Woops, i forgot to ${SUBST_CMD} on the configuration file after
patching, otherwise the ${VARBASE} doesn't get substituted. You
probably haven't noticed because pkg_add doesn't (normally) replace the
configuration file if they were changed.

> > There's a reason to install the web assets as 750?
> No, my bad.
>
> Thank you again.
>
> Hukadan

updated tarball with the missing SUBST_CMD attached, it's ok op@ for
import if someone wants to :)

No comments:

Post a Comment