All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC PATCH] package/util-linux: build libraries as a separate package
Date: Tue, 7 May 2019 22:40:18 +0200	[thread overview]
Message-ID: <20190507204018.GH6887@scaer> (raw)
In-Reply-To: <20190507215424.791e69d3@windsurf>

On 2019-05-07 21:54 +0200, Thomas Petazzoni spake thusly:
> Hello Carlos,
> 
> On Tue,  7 May 2019 13:51:58 -0300
> unixmania at gmail.com wrote:
> 
> > The findmount and lsblk utilities need udev to work correctly but cannot
> > be built with udev support because the packages providing libudev (eudev
> > and systemd) depend on util-linux, creating a chicken-egg problem. Solve
> > it by means of the following changes:
> 
> Thanks a lot for working on this topic. It is obviously becoming a
> nightmare :-/

Indeed, this is not a nice situation.

However, here is what I propose we do

 1- introduce util-linux-libs as you did, with a blind kconfig option
    (i.e. BR2_PACKAGE_UTIL_LINUX_LIBS exists but has no a prompt)
 2- update util-linux to depend on util=linux-libs when it is enabled
 3- change the existing udev providers (eudev and systemd) to depend on
    and select util-linux-libs instead of util-linux

So yes, this means that we end up with the libs installed twice. That
would be reported by the check-uniq-file step.

However, I believe this is really not a problem in fact. chekc-uniq-file
was initially introduced in preparation of top-level parallel build, but
the reason it was introduced is no longer 100% valid, as the trend is
now to install to a per-package target/ dir, and assemble the whole at
the end, in a reproducible order.

And even if check-uniq-files would still be needed, we could teach it to
ignore specific cases, like this util-linux vs. util-linux-libs duality.

So, in case upstream is not amenable to splitting util-linux, or at
least teach it to separate the libs and progs builds, or while waiting
they do it, we can prepare the above.

And when they finally release a version that can build either only libs
or only progs, we'll be ready and we'll just have to adpat both
packages' CONF_OPTS to pass appropriate --enable and --disable flags.

Regards,
Yann E. MORIN.

> > - Add the util-linux-libs package, which provides libblkid, libfdisk,
> >   libmount, libsmartcols and libuuid. It needs a small patch to
> >   install the uuidd.h header, used to build the uuidd utility.
> > - Make util-linux depend on util-linux-libs and build only the programs.
> >   This requires a quite intrusive patch that modifies Makefile.am and
> >   some Makemodule.am files, thus requiring AUTORECONF.
> 
> Could you get in touch with upstream util-linux, expose the problem,
> and see if they would be willing to merge some changes that would help
> building only the programs ?
> 
> The best would of course be for upstream to realize that there is now a
> circular dependency, and that it should be broken up by splitting
> util-linux upstream itself in two separate projects.
> 
> Best regards,
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2019-05-07 20:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07 16:51 [Buildroot] [RFC PATCH] package/util-linux: build libraries as a separate package unixmania at gmail.com
2019-05-07 19:54 ` Thomas Petazzoni
2019-05-07 20:40   ` Yann E. MORIN [this message]
2019-05-07 22:12     ` Carlos A. M. dos Santos
2019-05-07 23:27       ` Arnout Vandecappelle
2019-05-09 14:34         ` Carlos A. M. dos Santos
2019-05-07 22:13   ` Carlos A. M. dos Santos

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=20190507204018.GH6887@scaer \
    --to=yann.morin.1998@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.