Cheers Michael, I've made most those changes, including USER/GROUP*, that confuses me too; copied pattern from another ebuild. Also removed creating separate folder /etc/fabio.d; re this, I noticed the fabio configuration accepts either folder path or *URL* for configuration file; not sure how this works, though it does seem to underlie some type of arbitrariness in including such a /etc/fabio.d folder within this ebuild. Re for...keepdir, I found removing it then the /var/log/fabio folders were not getting created, so keeping it in there. http://www.calculate-linux.org/main/en/using_ebuild, says this of *keepdir*: *Creates (if necessary) a .keep file in the given directory so that it isn't auto-cleaned. Never create a .keep file yourself. If Portage changes how keepdir works, then creating the file yourself will break the package.* regards, Damon On Fri, Nov 10, 2017 at 10:59 PM, Michael Orlitzky wrote: > 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...) > >