From: Michael Orlitzky <mjo@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Help testing ebuilds? golang/Fabio load balancer
Date: Fri, 10 Nov 2017 07:59:13 -0500 [thread overview]
Message-ID: <b5ff9501-987e-6ada-7a09-bff27a622b9c@gentoo.org> (raw)
In-Reply-To: <CAE5cDqMtPuiOxnzgC4Wf1jd=gz9xJFeG=V7SpuX-ihCGmGcocw@mail.gmail.com>
On 11/09/2017 11:08 PM, Damo Brisbane wrote:
> I've run up a couple of golang based ebuilds - for the fabio load
> balancer. My first run at it, not completely sure of any follow up
> process, mentor? other posting, overlap with existing work? Anyway,
> would appreciate the feedback.
Your $VERSION variable can probably be replaced with "${PV}" to save a line.
Your init script takes care of the permissions on /var/lib/fabio and
/var/log/fabio/fabio.log...
start_pre() {
checkpath -q -d -o ${FABIO_USER}:${FABIO_GROUP} ${FABIO_HOMEDIR}
checkpath -q -f -o ${FABIO_USER}:${FABIO_GROUP} ${FABIO_LOGFILE}
}
so the following in the ebuild might be redundant?
for x in /var/{lib,log}/${PN}; do
keepdir "${x}"
fowners fabio:fabio "${x}"
done
(warning: I have never understood what keepdir is supposed to
accomplish, so maybe I'm wrong here).
On the other hand, if you've created a dedicated user and group for the
daemon, I don't think there's much benefit to letting the end user
switch them via FABIO_USER and FABIO_GROUP (it just makes the
permissions harder to get right). That's a judgment call though.
Finally, if the stanza above *does* turn out to be redundant, then
there's another small improvement that can be made. Since the "fabio"
user and group are used nowhere else in the ebuild, you could create
them in pkg_preinst() instead of pkg_setup(). Doing that has one main
benefit -- namely that if the installation fails, the user and group
won't be created.
Overall, looks good.
For testing help, you'll probably have the best luck in #gentoo-user on
IRC. For ebuild reviews, we have a dedicated mailing list,
gentoo-devhelp@lists.gentoo.org and an associated IRC channel,
#gentoo-dev-help (yes, they're hyphenated differently...)
next prev parent reply other threads:[~2017-11-10 13:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-10 4:08 [gentoo-dev] Help testing ebuilds? golang/Fabio load balancer Damo Brisbane
2017-11-10 12:59 ` Michael Orlitzky [this message]
2017-11-10 21:36 ` Damo Brisbane
2017-11-11 0:21 ` Michael Orlitzky
2017-11-11 7:58 ` Michał Górny
2017-11-11 17:31 ` Michael Orlitzky
2017-11-11 19:26 ` Michał Górny
2017-11-12 12:53 ` Michael Orlitzky
2017-11-12 13:43 ` Michał Górny
2017-11-13 15:10 ` Michael Orlitzky
2017-11-12 15:21 ` Ulrich Mueller
2017-11-13 15:16 ` Michael Orlitzky
2017-11-11 19:54 ` Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b5ff9501-987e-6ada-7a09-bff27a622b9c@gentoo.org \
--to=mjo@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox