* [Buildroot] [PATCH] pkg-autotools: explicitly use /usr/{bin, sbin, lib}, with merged usr
@ 2017-11-01 3:36 Carlos Santos
2017-11-05 12:52 ` Arnout Vandecappelle
0 siblings, 1 reply; 6+ messages in thread
From: Carlos Santos @ 2017-11-01 3:36 UTC (permalink / raw)
To: buildroot
Prevent packages from using /bin, /sbin or /lib when those paths are
symlinks to their /usr counterparts.
This is useful for util-linux, whose installation attempts to move
shared libraries from ${usrlib_execdir} to ${libdir} if both paths are
not the same, leading to error messages like this:
mv: '$(TARGET_DIR)/usr/lib/libfoo.so.1' and '$(TARGET_DIR)/lib/libfoo.so.1' are the same file
Fortunalely that error is not fatal but other packages may do similar
things with bad results, so let's avoid possible problems.
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
---
package/pkg-autotools.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
index 45de99356f..32e76b54c2 100644
--- a/package/pkg-autotools.mk
+++ b/package/pkg-autotools.mk
@@ -189,6 +189,7 @@ define $(2)_CONFIGURE_CMDS
--build=$$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
+ $$(if $$(BR2_ROOTFS_MERGED_USR),--bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib,) \
--sysconfdir=/etc \
--localstatedir=/var \
--program-prefix="" \
--
2.13.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] pkg-autotools: explicitly use /usr/{bin, sbin, lib}, with merged usr
2017-11-01 3:36 [Buildroot] [PATCH] pkg-autotools: explicitly use /usr/{bin, sbin, lib}, with merged usr Carlos Santos
@ 2017-11-05 12:52 ` Arnout Vandecappelle
2017-11-05 13:25 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2017-11-05 12:52 UTC (permalink / raw)
To: buildroot
On 01-11-17 04:36, Carlos Santos wrote:
> Prevent packages from using /bin, /sbin or /lib when those paths are
> symlinks to their /usr counterparts.
>
> This is useful for util-linux, whose installation attempts to move
> shared libraries from ${usrlib_execdir} to ${libdir} if both paths are
> not the same, leading to error messages like this:
>
> mv: '$(TARGET_DIR)/usr/lib/libfoo.so.1' and '$(TARGET_DIR)/lib/libfoo.so.1' are the same file
>
> Fortunalely that error is not fatal but other packages may do similar
> things with bad results, so let's avoid possible problems.
Well, since the default for bindir is <exec_prefix>/bin and exec_prefix is
/usr, for most packages this is not going to be an issue. It's only util-linux
that overrides it.
Therefore, I don't think this should be done globally, but specifically for
util-linux.
Regards,
Arnout
>
> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
> ---
> package/pkg-autotools.mk | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
> index 45de99356f..32e76b54c2 100644
> --- a/package/pkg-autotools.mk
> +++ b/package/pkg-autotools.mk
> @@ -189,6 +189,7 @@ define $(2)_CONFIGURE_CMDS
> --build=$$(GNU_HOST_NAME) \
> --prefix=/usr \
> --exec-prefix=/usr \
> + $$(if $$(BR2_ROOTFS_MERGED_USR),--bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib,) \
> --sysconfdir=/etc \
> --localstatedir=/var \
> --program-prefix="" \
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] pkg-autotools: explicitly use /usr/{bin, sbin, lib}, with merged usr
2017-11-05 12:52 ` Arnout Vandecappelle
@ 2017-11-05 13:25 ` Thomas Petazzoni
2017-11-08 23:42 ` [Buildroot] [PATCH] util-linux: " Carlos Santos
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2017-11-05 13:25 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 5 Nov 2017 13:52:29 +0100, Arnout Vandecappelle wrote:
> > Fortunalely that error is not fatal but other packages may do similar
> > things with bad results, so let's avoid possible problems.
>
> Well, since the default for bindir is <exec_prefix>/bin and exec_prefix is
> /usr, for most packages this is not going to be an issue. It's only util-linux
> that overrides it.
>
> Therefore, I don't think this should be done globally, but specifically for
> util-linux.
I would also be more comfortable to do this just for util-linux, as
it's a bit easier to validate the impact/consequences of such a change
if it's limited to a single package.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] util-linux: explicitly use /usr/{bin, sbin, lib}, with merged usr
2017-11-05 13:25 ` Thomas Petazzoni
@ 2017-11-08 23:42 ` Carlos Santos
2017-11-09 0:05 ` Carlos Santos
0 siblings, 1 reply; 6+ messages in thread
From: Carlos Santos @ 2017-11-08 23:42 UTC (permalink / raw)
To: buildroot
Prevent the installation from attempting to move shared libraries from
${usrlib_execdir} to ${libdir} if both paths are not the same, leading
to error messages like this:
mv: '$(TARGET_DIR)/usr/lib/libfoo.so.1' and '$(TARGET_DIR)/lib/libfoo.so.1' are the same file
That error is not fatal but let's avoid possible future problems.
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
---
package/util-linux/util-linux.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 8464288600..31a3fe47ab 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -41,6 +41,13 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
UTIL_LINUX_DEPENDENCIES += busybox
endif
+# Prevent the installation from attempting to move shared libraries from
+# ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are
+# the same when merged usr is in use.
+ifeq ($(BR2_ROOTFS_MERGED_USR),y)
+UTIL_LINUX_CONF_OPTS += --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib
+endif
+
ifeq ($(BR2_PACKAGE_NCURSES),y)
UTIL_LINUX_DEPENDENCIES += ncurses
ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
--
2.13.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] util-linux: explicitly use /usr/{bin, sbin, lib}, with merged usr
2017-11-08 23:42 ` [Buildroot] [PATCH] util-linux: " Carlos Santos
@ 2017-11-09 0:05 ` Carlos Santos
2017-11-22 21:46 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Carlos Santos @ 2017-11-09 0:05 UTC (permalink / raw)
To: buildroot
Prevent the installation from attempting to move shared libraries from
${usrlib_execdir} to ${libdir} if both paths are the same, which leads
to error messages like this:
mv: '$(TARGET_DIR)/usr/lib/libfoo.so.1' and '$(TARGET_DIR)/lib/libfoo.so.1' are the same file
That error is not fatal but let's avoid possible future problems.
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
---
Changes v1->v2:
Fix commit message to remove spurious "not".
---
package/util-linux/util-linux.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 8464288600..31a3fe47ab 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -41,6 +41,13 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
UTIL_LINUX_DEPENDENCIES += busybox
endif
+# Prevent the installation from attempting to move shared libraries from
+# ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are
+# the same when merged usr is in use.
+ifeq ($(BR2_ROOTFS_MERGED_USR),y)
+UTIL_LINUX_CONF_OPTS += --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib
+endif
+
ifeq ($(BR2_PACKAGE_NCURSES),y)
UTIL_LINUX_DEPENDENCIES += ncurses
ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
--
2.13.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] util-linux: explicitly use /usr/{bin, sbin, lib}, with merged usr
2017-11-09 0:05 ` Carlos Santos
@ 2017-11-22 21:46 ` Thomas Petazzoni
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2017-11-22 21:46 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 8 Nov 2017 22:05:33 -0200, Carlos Santos wrote:
> Prevent the installation from attempting to move shared libraries from
> ${usrlib_execdir} to ${libdir} if both paths are the same, which leads
> to error messages like this:
>
> mv: '$(TARGET_DIR)/usr/lib/libfoo.so.1' and '$(TARGET_DIR)/lib/libfoo.so.1' are the same file
>
> That error is not fatal but let's avoid possible future problems.
>
> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
> ---
> Changes v1->v2:
> Fix commit message to remove spurious "not".
> ---
> package/util-linux/util-linux.mk | 7 +++++++
> 1 file changed, 7 insertions(+)
Applied to next, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-11-22 21:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01 3:36 [Buildroot] [PATCH] pkg-autotools: explicitly use /usr/{bin, sbin, lib}, with merged usr Carlos Santos
2017-11-05 12:52 ` Arnout Vandecappelle
2017-11-05 13:25 ` Thomas Petazzoni
2017-11-08 23:42 ` [Buildroot] [PATCH] util-linux: " Carlos Santos
2017-11-09 0:05 ` Carlos Santos
2017-11-22 21:46 ` Thomas Petazzoni
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.