Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 00/50] busybox: invert dependencies
Date: Fri, 6 Jul 2018 17:10:15 +0200	[thread overview]
Message-ID: <20180706151015.GA3128@scaer> (raw)
In-Reply-To: <4f9e3665-aecc-5067-02aa-25b4a816195c@mind.be>

Arnout, All,

On 2018-07-06 00:54 +0200, Arnout Vandecappelle spake thusly:
> On 04-07-18 18:39, Yann E. MORIN wrote:
> > Arnout, all,
> > 
> > On 2018-07-04 00:56 +0200, Arnout Vandecappelle spake thusly:
> >> On 07/02/18 23:12, Yann E. MORIN wrote:
> >>> Hello All!
> >>>
> >>> Currently, the issue that busybox may install the same executables as
> >>> those from other packages, is handled in all those packages. This is
> >>> not very practical.
> >>
> >>  The reverse is also not very practical...
> > 
> > The reverse means that the dependencies are sprinkled in all those
> > packages, while now they are all nicely gathered in a single location.
> > At least, I believe this is a maintenance improvment; not an enormous
> > gain, but still.
> 
>  It certainly is!

Is that an ACK of the patch? ;-p

> 
> >>> Furthermore, this means that those packages all overwrite the
> >>> busybox-installed applets, which means that this triggers the
> >>> no-two-packages-touch-the-same-file rule. So far, this is only a
> >>> warning, but when we eventually go with TLPB, we'll have to enforce
> >>> that rule.
> >>
> >>  Although we've already discussed this a couple of times in BR meetings, we
> >> never found a solution that is really satisfactory.
> > 
> > I'm not sure what you mean by "satisfactory". If speakign about busybox,
> > I think this solution is technically better than the alternative,
> > current situation, at least becasue we know that busybox will enforce a
> > noclobber install (heck, this was already the case with our hook), while
> > we can not easily audit all packages to be sure they properly install
> > their executalbes.
> 
>  Well, normally the proper way to install is to overwrite what was previously there.
> 
>  So the solution is not entirely satisfactory because it only really applies to
> busybox. Which means that for other packages, we either have to perform manual
> install commands to prevent overwriting, or we have to revert the dependency
> (i.e., for busybox, the first package wins, while for other packages, the last
> package wins...).

OK, I see what you meant. Right.

>  Also note that in the latter case, we should allow two packages to touch the
> same file, at least as long as there is a dependency between them. Indeed, if
> there is a dependency, then the build result is reproducible, so there is no
> need to disallow it. Checking for that will get hairy though...
> 
> 
> > For example, the attr package we current have will forcibly overwrite
> > any destination file without unlinking it, thus effectively replacing
> > /usr/bin/setfattr withits own code, and if that fiel happens to be a
> > hardlink or a symlink to busybox, we lose busybox. See
> >     https://bugs.busybox.net/show_bug.cgi?id=10986
> 
>  *That* is really a bug in the attr package. If it would use install, like the
> rest of the world does, it wouldn't have this problem.

And I fixed it, and upstream also fixed it by switching to automake.

My point was that we can't audit all such packages, because it is a pita.

> > So, I think it is better to rely on a single package we know behaves
> > correctly.
> > 
> >>  However, I have a new idea now...
> >>
> >>  IIUC, with PPS, there is no real problem with two packages touching the same
> >> file, as long as the dependency is explicitly tracked in Buildroot, right?
> >> Because when it is explicitly tracked, the file created by package A will always
> >> be present in package B's PPS when package B is built, so it's perfectly
> >> reproducible.
> 
>  Huh weird, I thought this was a new idea I had tonight, but apparently I
> already thought of it yesterday :-)

Eh! I'm more of the other kind of people, going lke "hmm, what was I
thinking minutes ago? It was super important and so exceptional, too
bad I can't remember..." ;-)

Yes, we could relax the rule, to say that a package can only modify
files in {,/usr}/{,s}bin, but modifing (replacing/appending) to a file
in any other location is forbidden.

But that is still not very nice either. Say, two packages install
/sbin/httpd, and the two want to install its config file /etc/httpd.conf
The first replacement is OK, the second is not.

But as you say, hat causes issues is appending, not replacing. So, we
could further relax, saying "replacing is OK, not appending", but then
how do we differentiate an append from a replace?

[--SNIP--]
>  OK. Just thought I'd shoot the idea.

Yes, but we already have a lot of trouble even landing TLPB at all.
Making the implementation even more complex can only postpone TLPB.

And ultimately, we can refine the implentation later, and then relax the
restrictions. It is easier for user to upgrade to a more laxist implem,
rather than going to a more restrictive one...

Regards,
Yann E. MORIN.

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

      reply	other threads:[~2018-07-06 15:10 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02 21:12 [Buildroot] [PATCH 00/50] busybox: invert dependencies Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 01/50] package/busybox: backport upstream patch to fix install-noclobber Yann E. MORIN
2018-07-02 21:28   ` Matthew Weber
2018-07-03  5:25   ` Baruch Siach
2018-07-03 11:37     ` Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 02/50] package/busybox: invert dependency with whois Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 03/50] package/busybox: invert dependency with wget Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 04/50] package/busybox: invert dependency with vim Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 05/50] package/busybox: invert dependency with util-linux Yann E. MORIN
2018-07-03 11:12   ` Carlos Santos
2018-07-02 21:11 ` [Buildroot] [PATCH 06/50] package/busybox: invert dependency with usbutils Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 07/50] package/busybox: invert dependency with unzip Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 08/50] package/busybox: invert dependency with traceroute Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 09/50] package/busybox: invert dependency with tftpd Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 10/50] package/busybox: invert dependency with tar Yann E. MORIN
2018-07-03  5:29   ` Baruch Siach
2018-07-02 21:11 ` [Buildroot] [PATCH 11/50] package/busybox: invert dependency with sysvinit Yann E. MORIN
2018-07-03 11:13   ` Carlos Santos
2018-07-02 21:11 ` [Buildroot] [PATCH 12/50] package/busybox: invert dependency with systemd Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 13/50] package/busybox: invert dependency with syslog-ng Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 14/50] package/busybox: invert dependency with sysklogd Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 15/50] package/busybox: invert dependency with start-stop-daemon Yann E. MORIN
2018-07-03 11:33   ` Carlos Santos
2018-07-02 21:11 ` [Buildroot] [PATCH 16/50] package/busybox: invert dependency with rsyslogd Yann E. MORIN
2018-07-06  1:58   ` Carlos Santos
2018-07-06 15:10     ` Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 17/50] package/busybox: invert dependency with psmisc Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 18/50] package/busybox: invert dependency with procps-ng Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 19/50] package/busybox: invert dependency with pciutils Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 20/50] package/busybox: invert dependency with ntp Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 21/50] package/busybox: invert dependency with nnamp Yann E. MORIN
2018-07-03 11:30   ` Carlos Santos
2018-07-02 21:11 ` [Buildroot] [PATCH 22/50] package/busybox: invert dependency with netcat-openbsd Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 23/50] package/busybox: invert dependency with netcat Yann E. MORIN
2018-07-02 21:11 ` [Buildroot] [PATCH 24/50] package/busybox: invert dependency with net-tools Yann E. MORIN
2018-07-03  5:36   ` Baruch Siach
2018-07-02 21:11 ` [Buildroot] [PATCH 25/50] package/busybox: invert dependency with mtd Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 26/50] package/busybox: invert dependency with lsof Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 27/50] package/busybox: invert dependency with less Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 28/50] package/busybox: invert dependency with kmod Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 29/50] package/busybox: invert dependency with iputils Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 30/50] package/busybox: invert dependency with iproute2 Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 31/50] package/busybox: invert dependency with ifupdown Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 32/50] package/busybox: invert dependency with ifplugd Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 33/50] package/busybox: invert dependency with ifenslave Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 34/50] package/busybox: invert dependency with i2c-tools Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 35/50] package/busybox: invert dependency with gzip Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 36/50] package/busybox: invert dependency with grep Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 37/50] package/busybox: invert dependency with gawk Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 38/50] package/busybox: invert dependency with fbset Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 39/50] package/busybox: invert dependency with e2fsprogs Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 40/50] package/busybox: invert dependency with dos2unix Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 41/50] package/busybox: invert dependency with diffutils Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 42/50] package/busybox: invert dependency with debianutils Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 43/50] package/busybox: invert dependency with dcron Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 44/50] package/busybox: invert dependency with cpio Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 45/50] package/busybox: invert dependency with coreutils Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 46/50] package/busybox: invert dependency with binutils Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 47/50] package/busybox: invert dependency with bc Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 48/50] package/busybox: invert dependency with bash Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 49/50] package/busybox: add dependency on attr Yann E. MORIN
2018-07-02 21:12 ` [Buildroot] [PATCH 50/50] support/scripts: don't draw most of busybox' dependencies Yann E. MORIN
2018-07-02 21:28   ` Matthew Weber
2018-07-03 11:20   ` Carlos Santos
2018-07-03 11:41     ` Yann E. MORIN
2018-07-03 12:19       ` Carlos Santos
2018-07-03 22:56 ` [Buildroot] [PATCH 00/50] busybox: invert dependencies Arnout Vandecappelle
2018-07-04 16:39   ` Yann E. MORIN
2018-07-05 22:54     ` Arnout Vandecappelle
2018-07-06 15:10       ` Yann E. MORIN [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=20180706151015.GA3128@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox