Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v1] package/bcm2835: bump version to 1.65
Date: Tue, 2 Jun 2020 23:33:38 +0200	[thread overview]
Message-ID: <20200602233338.05744983@windsurf.home> (raw)
In-Reply-To: <20200602204941.21984-1-ps.report@gmx.net>

Hello Peter,

On Tue,  2 Jun 2020 22:49:41 +0200
Peter Seiderer <ps.report@gmx.net> wrote:

> - disable doxygen documentation gneration using ac_cv_prog_DOXYGEN

Is this related to the version bump? Or would the existing 1.63 version
be potentially affected by a doxygen build issue? If that's the case,
we want a separate patch which fixes this, so that we can backport.

> +ifeq ($(BR2_PACKAGE_LIBCAP),y)
> +BCM2835_DEPENDENCIES = libcap
> +BCM2835_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -DBCM2835_HAVE_LIBCAP"

So, this again illustrates how wonderful the RPi ecosystem is.

 (1) They don't use configure.ac to check for libcap, even though they
     already have all the autotools machinery in place to do that.

 (2) They ask to define BCM2835_HAVE_LIBCAP manually, but then look at
     the code:

#ifdef BCM2835_HAVE_LIBCAP
#include <sys/capability.h>
static int bcm2835_has_capability(cap_value_t capability)
{
    int ok = 0;
    cap_t cap = cap_get_proc();
    if (cap)
    {
        cap_flag_value_t value;
        if (cap_get_flag(cap,capability,CAP_EFFECTIVE,&value) == 0 && value == CAP_SET)
            ok = 1;
       cap_free(cap);
    }
    return ok;
}
#endif

So far, so good: if BCM2835_HAVE_LIBCAP is defined, a new function
bcm2835_has_capability() is implemented.

Then, let's continue to the only place where this function is used:

#ifdef BCM2835_HAVE_LIBCAP2
        || bcm2835_has_capability(CAP_SYS_RAWIO)
#endif

It is under a different BCM2835_HAVE_LIBCAP2 define. I don't even see
how this can work. Has someone really tested this?

I'm sorry, but this new libcap dependency feels like a joke :-)

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2020-06-02 21:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 20:49 [Buildroot] [PATCH v1] package/bcm2835: bump version to 1.65 Peter Seiderer
2020-06-02 21:33 ` Thomas Petazzoni [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=20200602233338.05744983@windsurf.home \
    --to=thomas.petazzoni@bootlin.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox