Skip to content

Overwritten file detection and fixes, one more step to TLP build

Herve Codina buildroot 1 version New

Get series with b4
b4 am 20210625151330.35f3adc8@fedora

Versions newest first

  1. v1 Latest0 of 15 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 15 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Buildroot] [PATCH 00/15] Overwritten file detection and fixes, one more step to TLP build

Hi,

Quoted 11 lines · On Fri, 25 Jun 2021 11:08:43 +0200 Andreas Naumann <[email protected]> wrote:

after a long time I have recently picked up playing with TLP build again. As part of that I found a problem in qt5 where I sent a patch two days ago "qt5: Fix sporadic build failure during top-level parallel build" which is caused by manipulation of the hard-linked qt.conf in HOST_DIR from different qt5 packages.

Now I see your promising set, but the matter is quite complex and so I wonder if the "overwritten file detection" would a) uncover the qt.conf problem and b)if your patch series somehow fixes it in a generic way?

I quickly looked at your patch and it looks like an overwrite issue.

Your patch:
---- 8< ----

 # compiled into the Qt library. We need it to make "qmake" relocatable and
 # tweak the per-package install pathes
 define QT5_INSTALL_QT_CONF
+	rm -f $(HOST_DIR)/bin/qt.conf
 	sed -e "s|@@HOST_DIR@@|$(HOST_DIR)|" -e "s|@@STAGING_DIR@@|$(STAGING_DIR)|" \
 		$(QT5BASE_PKGDIR)/qt.conf.in > $(HOST_DIR)/bin/qt.conf
 endef
---- 8< ----

This overwrite is done by sed whose output is redirected $(HOST_DIR)/bin/qt.conf

With TLP this overwite leads to package A seeing modification done by package B

Without your patch and with overwrite detection present in my series the overwrite should be detected and the build stopped.

My series do not contains any fixes for this specific Qt5 overwrite. This is a concrete example of what I said still missing ...

Your 'rm' breaks the hardlink and so the following sed does not perform overwrite anymore.
That's the correct fix.

To go further with interactions with my current series still ongoing and not ready to be merged, the entire macro (QT5_INSTALL_QT_CONF) should be moved to <PKG>_PER_PACKAGE_TWEAK_HOOKS and QT5_QT_CONF_FIXUP is no more needed.

Herv?

Signature · 3 lines
Herv? Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com