All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] darkhttpd: new package
Date: Sun, 25 Sep 2016 18:25:44 +0200	[thread overview]
Message-ID: <20160925162543.GA23763@itchy> (raw)
In-Reply-To: <20160917141052.61d23a72@free-electrons.com>

Hi!

On 16-09-17 14:10:52, Thomas Petazzoni wrote:
> On Sat, 17 Sep 2016 13:31:39 +0200, Eric Le Bihan wrote:
> > This new package provides darkhttpd, a simple, fast HTTP 1.1 web server
> > for static content.
> >
> > Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
>
> Thanks for this patch. A few comments/questions below.
>
> > diff --git a/package/darkhttpd/Config.in b/package/darkhttpd/Config.in
> > new file mode 100644
> > index 0000000..bd12588
> > --- /dev/null
> > +++ b/package/darkhttpd/Config.in
> > @@ -0,0 +1,18 @@
> > +config BR2_PACKAGE_DARKHTTPD
> > +	bool "darkhttpd"
>
> Did you validate the architecture/toolchain dependencies? MMU, C++,
> wchar, etc. ?

I missed a fork(), so it will depend on BR2_USE_MMU.

> > +	  Note: when Busybox or SysV init system is used, darkhttpd logs to
> > +	  /var/log/darkhttpd.log, which may grow beyond the file system limits.
> > +	  Please consider using a log rotating system such as logrotate or
> > +	  change the path to the log file using the configuration file.
>
> Is it really worth having such a comment here? I believe this applies
> to many (all?) daemons.

Of course, so maybe a warning about this should be added in some section
of the manual... I'll remove it.

> > +# Allow a few customizations from a config file
> > +test -r /etc/default/darkhttpd && . /etc/default/darkhttpd
> > +
> > +DARKHTTPD_PROG=/usr/sbin/darkhttpd
> > +DARKHTTPD_PIDFILE=/var/run/darkhttpd.pid
> > +DARKHTTPD_FLAGS="$DARKHTTPD_FLAGS --chroot --uid nobody --gid www-data"
> > +DARKHTTPD_ARGS="${DARKHTTPD_ROOT:-/var/www} --log /var/log/darkhttpd.log $DARKHTTPD_FLAGS"
>
> I don't understand why you have this construction of _ARGS in several
> steps. What about:
>
> DARKHTTPD_ARGS="${DARKHTTPD_ROOT:-/var/www} --log /var/log/darkhttpd.log $DARKHTTPD_ARGS --chroot --uid nobody --gid www-data"
>
> instead (assuming the variable in the /etc/default file is
> DARKHTTP_ARGS instead of DARKHTTP_FLAGS, the former being much more
> common than the latter IMO).

I used this to avoid a long line. It is only a cosmetic choice. I'll use
a single statement.

I used two distinct variables named $DARKHTTPD_ROOT and $DARKHTTP_FLAGS
because the command line parsing of darkhttpd is not very tolerant: the
root directory must be the first argument and all remaining ones should
be options.

$DARKHTTPD_ARGS is too general and does not highlight this.

> > +DARKHTTPD_MAKE_OPTS = CC="$(TARGET_CC)"
>
> Can you use $(TARGET_CONFIGURE_OPTS) instead ?

Will do!

Thanks for the review.

Best regards,

--
ELB

      reply	other threads:[~2016-09-25 16:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-17 11:31 [Buildroot] [PATCH] darkhttpd: new package Eric Le Bihan
2016-09-17 12:10 ` Thomas Petazzoni
2016-09-25 16:25   ` Eric Le Bihan [this message]

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=20160925162543.GA23763@itchy \
    --to=eric.le.bihan.dev@free.fr \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.