All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Misc improvements 2 from Mentor
@ 2015-11-12 23:41 Christopher Larson
  2015-11-12 23:41 ` [PATCH 1/4] linux-dtb.inc: use absolute upd-alt paths Christopher Larson
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Christopher Larson @ 2015-11-12 23:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

This is the final of three pull requests / patch series from Mentor's queue of
changes destined for oe-core master (not jethro). This series includes a small
number of improvements which may be more contentious or may require more
consideration and review.


The following changes since commit e44ed8c18e395b9c055aefee113b90708e8a8a2f:

  build-appliance-image: Update to jethro head revision (2015-11-03 14:02:57 +0000)

are available in the git repository at:

  git://github.com/kergoth/openembedded-core mentor-misc-improvements-2-after-jethro
  https://github.com/kergoth/openembedded-core/tree/mentor-misc-improvements-2-after-jethro

Christopher Larson (4):
  linux-dtb.inc: use absolute upd-alt paths
  opkg-utils: add update-alternatives PACKAGECONFIG
  systemd: add myhostname to nsswitch.conf
  systemd: arrange for volatile /etc/resolv.conf

 meta/recipes-core/systemd/systemd_225.bb           | 20 ++++++++++++++++++++
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 12 +++++++++---
 meta/recipes-kernel/linux/linux-dtb.inc            |  4 ++--
 3 files changed, 31 insertions(+), 5 deletions(-)

-- 
2.2.1



^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/4] linux-dtb.inc: use absolute upd-alt paths
  2015-11-12 23:41 [PATCH 0/4] Misc improvements 2 from Mentor Christopher Larson
@ 2015-11-12 23:41 ` Christopher Larson
  2016-12-21 19:10   ` Denys Dmytriyenko
  2015-11-12 23:41 ` [PATCH 2/4] opkg-utils: add update-alternatives PACKAGECONFIG Christopher Larson
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Christopher Larson @ 2015-11-12 23:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

This works around a limitation of the chkconfig update-alternatives, so it
works with all our update-alternatives providers.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-kernel/linux/linux-dtb.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
index ee3a5e1..5810b10 100644
--- a/meta/recipes-kernel/linux/linux-dtb.inc
+++ b/meta/recipes-kernel/linux/linux-dtb.inc
@@ -64,7 +64,7 @@ pkg_postinst_kernel-devicetree () {
 	do
 		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
 		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-		update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+		update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
 	done
 }
 
@@ -74,6 +74,6 @@ pkg_postrm_kernel-devicetree () {
 	do
 		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
 		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-		update-alternatives --remove ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+		update-alternatives --remove ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
 	done
 }
-- 
2.2.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/4] opkg-utils: add update-alternatives PACKAGECONFIG
  2015-11-12 23:41 [PATCH 0/4] Misc improvements 2 from Mentor Christopher Larson
  2015-11-12 23:41 ` [PATCH 1/4] linux-dtb.inc: use absolute upd-alt paths Christopher Larson
@ 2015-11-12 23:41 ` Christopher Larson
  2016-01-15  9:23   ` Robert Yang
  2015-11-12 23:41 ` [PATCH 3/4] systemd: add myhostname to nsswitch.conf Christopher Larson
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 18+ messages in thread
From: Christopher Larson @ 2015-11-12 23:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

This lets someone use a different update-alternatives-native provider. Without
this available, they'll step on one another in the sysroot unconditionally,
since we need to build opkg-utils-native for ipk based builds regardless.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 5f518d2..b242d1f 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "http://code.google.com/p/opkg/"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
                     file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
-PROVIDES += "virtual/update-alternatives"
+PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
 
 SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
 PV = "0.1.8+git${SRCPV}"
@@ -21,15 +21,21 @@ TARGET_CC_ARCH += "${LDFLAGS}"
 PYTHONRDEPS = "python python-shell python-io python-math python-crypt python-logging python-fcntl python-subprocess python-pickle python-compression python-textutils python-stringold"
 PYTHONRDEPS_class-native = ""
 
-PACKAGECONFIG = "python"
+PACKAGECONFIG = "python update-alternatives"
 PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
+PACKAGECONFIG[update-alternatives] = ",,,"
 
 do_install() {
 	oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+	if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
+		rm -f "${D}${bindir}/update-alternatives"
+	fi
 }
 
 do_install_append_class-target() {
-	sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${libdir},g'
+	if [ -e "${D}${bindir}/update-alternatives" ]; then
+		sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${libdir},g'
+	fi
 }
 
 PACKAGES =+ "update-alternatives-opkg"
-- 
2.2.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/4] systemd: add myhostname to nsswitch.conf
  2015-11-12 23:41 [PATCH 0/4] Misc improvements 2 from Mentor Christopher Larson
  2015-11-12 23:41 ` [PATCH 1/4] linux-dtb.inc: use absolute upd-alt paths Christopher Larson
  2015-11-12 23:41 ` [PATCH 2/4] opkg-utils: add update-alternatives PACKAGECONFIG Christopher Larson
@ 2015-11-12 23:41 ` Christopher Larson
  2015-11-17  7:25   ` Andreas Müller
  2015-11-18  3:49   ` Dan McGregor
  2015-11-12 23:41 ` [PATCH 4/4] systemd: arrange for volatile /etc/resolv.conf Christopher Larson
  2016-01-05 19:08 ` [PATCH 0/4] Misc improvements 2 from Mentor Christopher Larson
  4 siblings, 2 replies; 18+ messages in thread
From: Christopher Larson @ 2015-11-12 23:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

We don't need nss-myhostname on systemd systems, because systemd already
provides myhostname, but we weren't configuring nsswitch to use it. Being able
to resolve the hostname is useful for a number of different applications, so
enable it using the same postinst/prerm bits which are in nss-myhostname.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-core/systemd/systemd_225.bb | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_225.bb b/meta/recipes-core/systemd/systemd_225.bb
index 18c2448..20515f5 100644
--- a/meta/recipes-core/systemd/systemd_225.bb
+++ b/meta/recipes-core/systemd/systemd_225.bb
@@ -397,6 +397,18 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
 ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
 ALTERNATIVE_PRIORITY[runlevel] ?= "300"
 
+pkg_postinst_${PN} () {
+	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+		-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
+		-i $D${sysconfdir}/nsswitch.conf
+}
+
+pkg_prerm_${PN} () {
+	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+		-e '/^hosts:/s/\s*myhostname//' \
+		-i $D${sysconfdir}/nsswitch.conf
+}
+
 pkg_postinst_udev-hwdb () {
 	if test -n "$D"; then
 		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
-- 
2.2.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 4/4] systemd: arrange for volatile /etc/resolv.conf
  2015-11-12 23:41 [PATCH 0/4] Misc improvements 2 from Mentor Christopher Larson
                   ` (2 preceding siblings ...)
  2015-11-12 23:41 ` [PATCH 3/4] systemd: add myhostname to nsswitch.conf Christopher Larson
@ 2015-11-12 23:41 ` Christopher Larson
  2016-01-05 19:08 ` [PATCH 0/4] Misc improvements 2 from Mentor Christopher Larson
  4 siblings, 0 replies; 18+ messages in thread
From: Christopher Larson @ 2015-11-12 23:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

On sysvinit systems, volatiles is configured to make /etc/resolv.conf symlink
to a file in a volatile path, which lets us write to /etc/resolv.conf for
read-only-rootfs. For systemd, this isn't set up unless we enable
systemd-resolved, which we don't by default. When it's not enabled, create the
/etc/resolv.conf symlink and ensure the volatile path is created on boot with
tmpfiles.d.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/recipes-core/systemd/systemd_225.bb | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_225.bb b/meta/recipes-core/systemd/systemd_225.bb
index 20515f5..095448d 100644
--- a/meta/recipes-core/systemd/systemd_225.bb
+++ b/meta/recipes-core/systemd/systemd_225.bb
@@ -196,6 +196,13 @@ do_install() {
 	if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
 		${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
 	fi
+	if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
+		# if resolved is disabled, it won't handle the link of resolv.conf, so
+		# set it up ourselves
+		ln -s ../run/resolv.conf ${D}${sysconfdir}/resolv.conf
+		echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
+		echo 'f /run/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
+	fi
 	install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
 }
 
@@ -290,6 +297,7 @@ FILES_${PN} = " ${base_bindir}/* \
                 ${sysconfdir}/tmpfiles.d/ \
                 ${sysconfdir}/xdg/ \
                 ${sysconfdir}/init.d/README \
+                ${sysconfdir}/resolv.conf \
                 ${rootlibexecdir}/systemd/* \
                 ${systemd_unitdir}/* \
                 ${base_libdir}/security/*.so \
-- 
2.2.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/4] systemd: add myhostname to nsswitch.conf
  2015-11-12 23:41 ` [PATCH 3/4] systemd: add myhostname to nsswitch.conf Christopher Larson
@ 2015-11-17  7:25   ` Andreas Müller
  2015-11-17 13:55     ` Christopher Larson
  2015-11-18  3:49   ` Dan McGregor
  1 sibling, 1 reply; 18+ messages in thread
From: Andreas Müller @ 2015-11-17  7:25 UTC (permalink / raw)
  To: Christopher Larson
  Cc: Christopher Larson, Patches and discussions about the oe-core layer

On Fri, Nov 13, 2015 at 12:41 AM, Christopher Larson <kergoth@gmail.com> wrote:
> From: Christopher Larson <chris_larson@mentor.com>
>
> We don't need nss-myhostname on systemd systems, because systemd already
> provides myhostname, but we weren't configuring nsswitch to use it. Being able
> to resolve the hostname is useful for a number of different applications, so
> enable it using the same postinst/prerm bits which are in nss-myhostname.
>
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> ---
>  meta/recipes-core/systemd/systemd_225.bb | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/meta/recipes-core/systemd/systemd_225.bb b/meta/recipes-core/systemd/systemd_225.bb
> index 18c2448..20515f5 100644
> --- a/meta/recipes-core/systemd/systemd_225.bb
> +++ b/meta/recipes-core/systemd/systemd_225.bb
> @@ -397,6 +397,18 @@ ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
>  ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
>  ALTERNATIVE_PRIORITY[runlevel] ?= "300"
>
> +pkg_postinst_${PN} () {
> +       sed -e '/^hosts:/s/\s*\<myhostname\>//' \
> +               -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
> +               -i $D${sysconfdir}/nsswitch.conf
> +}
> +
> +pkg_prerm_${PN} () {
> +       sed -e '/^hosts:/s/\s*\<myhostname\>//' \
> +               -e '/^hosts:/s/\s*myhostname//' \
> +               -i $D${sysconfdir}/nsswitch.conf
> +}
> +
>  pkg_postinst_udev-hwdb () {
>         if test -n "$D"; then
>                 ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
> --
> 2.2.1
>
> --
This seems to solve my xfce4-terminal delay - thanks. I have a
questions regarding this patch: As soon as basefiles are updated
resolving stops working - right? So why not handle at basefiles based
on systemd distro setting?

Andreas


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/4] systemd: add myhostname to nsswitch.conf
  2015-11-17  7:25   ` Andreas Müller
@ 2015-11-17 13:55     ` Christopher Larson
  0 siblings, 0 replies; 18+ messages in thread
From: Christopher Larson @ 2015-11-17 13:55 UTC (permalink / raw)
  To: Andreas Müller; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2541 bytes --]

On Tue, Nov 17, 2015 at 12:25 AM, Andreas Müller <
schnitzeltony@googlemail.com> wrote:

> On Fri, Nov 13, 2015 at 12:41 AM, Christopher Larson <kergoth@gmail.com>
> wrote:
> > From: Christopher Larson <chris_larson@mentor.com>
> >
> > We don't need nss-myhostname on systemd systems, because systemd already
> > provides myhostname, but we weren't configuring nsswitch to use it.
> Being able
> > to resolve the hostname is useful for a number of different
> applications, so
> > enable it using the same postinst/prerm bits which are in nss-myhostname.
> >
> > Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> > ---
> >  meta/recipes-core/systemd/systemd_225.bb | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/meta/recipes-core/systemd/systemd_225.bb
> b/meta/recipes-core/systemd/systemd_225.bb
> > index 18c2448..20515f5 100644
> > --- a/meta/recipes-core/systemd/systemd_225.bb
> > +++ b/meta/recipes-core/systemd/systemd_225.bb
> > @@ -397,6 +397,18 @@ ALTERNATIVE_TARGET[runlevel] =
> "${base_bindir}/systemctl"
> >  ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
> >  ALTERNATIVE_PRIORITY[runlevel] ?= "300"
> >
> > +pkg_postinst_${PN} () {
> > +       sed -e '/^hosts:/s/\s*\<myhostname\>//' \
> > +               -e
> 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname
> \3\4\5/' \
> > +               -i $D${sysconfdir}/nsswitch.conf
> > +}
> > +
> > +pkg_prerm_${PN} () {
> > +       sed -e '/^hosts:/s/\s*\<myhostname\>//' \
> > +               -e '/^hosts:/s/\s*myhostname//' \
> > +               -i $D${sysconfdir}/nsswitch.conf
> > +}
> > +
> >  pkg_postinst_udev-hwdb () {
> >         if test -n "$D"; then
> >                 ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')}
> hwdb --update \
> > --
> > 2.2.1
> >
> > --
> This seems to solve my xfce4-terminal delay - thanks. I have a
> questions regarding this patch: As soon as basefiles are updated
> resolving stops working - right? So why not handle at basefiles based
> on systemd distro setting?


As far as I know, nsswitch.conf is flagged as a conffile (actually in
master everything in /etc/ will be), so once it's modified externally (in
this case, by the systemd recipe), the original package which installed the
file won't blindliy overwrite those changes.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 3809 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/4] systemd: add myhostname to nsswitch.conf
  2015-11-12 23:41 ` [PATCH 3/4] systemd: add myhostname to nsswitch.conf Christopher Larson
  2015-11-17  7:25   ` Andreas Müller
@ 2015-11-18  3:49   ` Dan McGregor
  2015-12-07 19:49     ` Christopher Larson
  1 sibling, 1 reply; 18+ messages in thread
From: Dan McGregor @ 2015-11-18  3:49 UTC (permalink / raw)
  To: Christopher Larson
  Cc: Christopher Larson, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1990 bytes --]

On 12 Nov 2015 5:41 p.m., "Christopher Larson" <kergoth@gmail.com> wrote:
>
> From: Christopher Larson <chris_larson@mentor.com>
>
> We don't need nss-myhostname on systemd systems, because systemd already
> provides myhostname, but we weren't configuring nsswitch to use it. Being
able
> to resolve the hostname is useful for a number of different applications,
so
> enable it using the same postinst/prerm bits which are in nss-myhostname.

I have this and a similar change for resolved in an append at work. Would
others be interested in that too?

>
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> ---
>  meta/recipes-core/systemd/systemd_225.bb | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/meta/recipes-core/systemd/systemd_225.bb
b/meta/recipes-core/systemd/systemd_225.bb
> index 18c2448..20515f5 100644
> --- a/meta/recipes-core/systemd/systemd_225.bb
> +++ b/meta/recipes-core/systemd/systemd_225.bb
> @@ -397,6 +397,18 @@ ALTERNATIVE_TARGET[runlevel] =
"${base_bindir}/systemctl"
>  ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
>  ALTERNATIVE_PRIORITY[runlevel] ?= "300"
>
> +pkg_postinst_${PN} () {
> +       sed -e '/^hosts:/s/\s*\<myhostname\>//' \
> +               -e
's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname
\3\4\5/' \
> +               -i $D${sysconfdir}/nsswitch.conf
> +}
> +
> +pkg_prerm_${PN} () {
> +       sed -e '/^hosts:/s/\s*\<myhostname\>//' \
> +               -e '/^hosts:/s/\s*myhostname//' \
> +               -i $D${sysconfdir}/nsswitch.conf
> +}
> +
>  pkg_postinst_udev-hwdb () {
>         if test -n "$D"; then
>                 ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')}
hwdb --update \
> --
> 2.2.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

[-- Attachment #2: Type: text/html, Size: 3004 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/4] systemd: add myhostname to nsswitch.conf
  2015-11-18  3:49   ` Dan McGregor
@ 2015-12-07 19:49     ` Christopher Larson
  2015-12-10 18:33       ` Dan McGregor
  0 siblings, 1 reply; 18+ messages in thread
From: Christopher Larson @ 2015-12-07 19:49 UTC (permalink / raw)
  To: Dan McGregor; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]

On Tue, Nov 17, 2015 at 8:49 PM, Dan McGregor <danismostlikely@gmail.com>
wrote:

> On 12 Nov 2015 5:41 p.m., "Christopher Larson" <kergoth@gmail.com> wrote:
> >
> > From: Christopher Larson <chris_larson@mentor.com>
> >
> > We don't need nss-myhostname on systemd systems, because systemd already
> > provides myhostname, but we weren't configuring nsswitch to use it.
> Being able
> > to resolve the hostname is useful for a number of different
> applications, so
> > enable it using the same postinst/prerm bits which are in nss-myhostname.
>
> I have this and a similar change for resolved in an append at work. Would
> others be interested in that too?
>

I'm sure there are folks that would find that interesting. I'm sure not
everyone uses resolved, but I'm sure we want it to work well for folks taht
do want to use it.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1599 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/4] systemd: add myhostname to nsswitch.conf
  2015-12-07 19:49     ` Christopher Larson
@ 2015-12-10 18:33       ` Dan McGregor
  0 siblings, 0 replies; 18+ messages in thread
From: Dan McGregor @ 2015-12-10 18:33 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

On 7 Dec 2015 1:49 p.m., "Christopher Larson" <kergoth@gmail.com> wrote:
>
>
> On Tue, Nov 17, 2015 at 8:49 PM, Dan McGregor <danismostlikely@gmail.com>
wrote:
>>
>> On 12 Nov 2015 5:41 p.m., "Christopher Larson" <kergoth@gmail.com> wrote:
>> >
>> > From: Christopher Larson <chris_larson@mentor.com>
>> >
>> > We don't need nss-myhostname on systemd systems, because systemd
already
>> > provides myhostname, but we weren't configuring nsswitch to use it.
Being able
>> > to resolve the hostname is useful for a number of different
applications, so
>> > enable it using the same postinst/prerm bits which are in
nss-myhostname.
>>
>> I have this and a similar change for resolved in an append at work.
Would others be interested in that too?
>
>
> I'm sure there are folks that would find that interesting. I'm sure not
everyone uses resolved, but I'm sure we want it to work well for folks taht
do want to use it.
>

Cool. I'll post my change. nss_resolve can be used unconditionally if it's
there. If resolved isn't running it falls back to nss_dns.

[-- Attachment #2: Type: text/html, Size: 1538 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/4] Misc improvements 2 from Mentor
  2015-11-12 23:41 [PATCH 0/4] Misc improvements 2 from Mentor Christopher Larson
                   ` (3 preceding siblings ...)
  2015-11-12 23:41 ` [PATCH 4/4] systemd: arrange for volatile /etc/resolv.conf Christopher Larson
@ 2016-01-05 19:08 ` Christopher Larson
  2016-01-05 20:26   ` Burton, Ross
  4 siblings, 1 reply; 18+ messages in thread
From: Christopher Larson @ 2016-01-05 19:08 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Christopher Larson

[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]

On Thu, Nov 12, 2015 at 4:41 PM, Christopher Larson <kergoth@gmail.com>
wrote:

> From: Christopher Larson <chris_larson@mentor.com>
>
> This is the final of three pull requests / patch series from Mentor's
> queue of
> changes destined for oe-core master (not jethro). This series includes a
> small
> number of improvements which may be more contentious or may require more
> consideration and review.
>
>
> The following changes since commit
> e44ed8c18e395b9c055aefee113b90708e8a8a2f:
>
>   build-appliance-image: Update to jethro head revision (2015-11-03
> 14:02:57 +0000)
>
> are available in the git repository at:
>
>   git://github.com/kergoth/openembedded-core
> mentor-misc-improvements-2-after-jethro
>
> https://github.com/kergoth/openembedded-core/tree/mentor-misc-improvements-2-after-jethro
>
> Christopher Larson (4):
>   linux-dtb.inc: use absolute upd-alt paths
>   opkg-utils: add update-alternatives PACKAGECONFIG
>   systemd: add myhostname to nsswitch.conf
>   systemd: arrange for volatile /etc/resolv.conf
>
>  meta/recipes-core/systemd/systemd_225.bb           | 20
> ++++++++++++++++++++
>  meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 12 +++++++++---
>  meta/recipes-kernel/linux/linux-dtb.inc            |  4 ++--
>  3 files changed, 31 insertions(+), 5 deletions(-)
>

Any objections to this series?
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 2609 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 0/4] Misc improvements 2 from Mentor
  2016-01-05 19:08 ` [PATCH 0/4] Misc improvements 2 from Mentor Christopher Larson
@ 2016-01-05 20:26   ` Burton, Ross
  0 siblings, 0 replies; 18+ messages in thread
From: Burton, Ross @ 2016-01-05 20:26 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

On 5 January 2016 at 19:08, Christopher Larson <chris_larson@mentor.com>
wrote:

> Any objections to this series?
>

Slipped through the net, thanks for the ping.  They look good to me, in mut
now.

Ross

[-- Attachment #2: Type: text/html, Size: 654 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] opkg-utils: add update-alternatives PACKAGECONFIG
  2015-11-12 23:41 ` [PATCH 2/4] opkg-utils: add update-alternatives PACKAGECONFIG Christopher Larson
@ 2016-01-15  9:23   ` Robert Yang
  2016-01-15 20:07     ` Christopher Larson
  0 siblings, 1 reply; 18+ messages in thread
From: Robert Yang @ 2016-01-15  9:23 UTC (permalink / raw)
  To: Christopher Larson, openembedded-core; +Cc: Christopher Larson


Hi Chris,

I've afraid this patch can't work well, when opkg-utils doesn't provide
virtual/update-alternatives, then chkconfig would be built and there would
be dependency loops for example,

PACKAGECONFIG = "python"
$ bitbake core-image-minimal

[snip]
ERROR:
Dependency loop #1 found:
   Task 747 
(/buildarea/lyang1/poky/meta/recipes-support/libpcre/libpcre_8.38.bb, 
do_packagedata) (dependent Tasks ['libpcre, do_package'])
   Task 2067 (/buildarea/lyang1/poky/meta/recipes-extended/slang/slang_2.2.4.bb, 
do_package) (dependent Tasks ['gcc-runtime, do_packagedata', 'pseudo, 
do_populate_sysroot', 'slang, do_install', 'libpcre, do_packagedata', 
'libtool-cross, do_packagedata', 'glibc, do_packagedata', 'rpm, 
do_populate_sysroot'])
   Task 2064 (/buildarea/lyang1/poky/meta/recipes-extended/slang/slang_2.2.4.bb, 
do_packagedata) (dependent Tasks ['slang, do_package'])
   Task 1876 
(/buildarea/lyang1/poky/meta/recipes-extended/newt/libnewt_0.52.18.bb, 
do_package) (dependent Tasks ['slang, do_packagedata', 'gcc-runtime, 
do_packagedata', 'pseudo, do_populate_sysroot', 'libnewt, do_install', 
'libtool-cross, do_packagedata', 'glibc, do_packagedata', 'popt, 
do_packagedata', 'rpm, do_populate_sysroot'])
   Task 1873 
(/buildarea/lyang1/poky/meta/recipes-extended/newt/libnewt_0.52.18.bb, 
do_packagedata) (dependent Tasks ['libnewt, do_package'])
   Task 1405 
(/buildarea/lyang1/poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb, 
do_package) (dependent Tasks ['gcc-runtime, do_packagedata', 'pseudo, 
do_populate_sysroot', 'glibc, do_packagedata', 'libnewt, do_packagedata', 
'chkconfig, do_install', 'popt, do_packagedata', 'gettext, do_packagedata', 
'rpm, do_populate_sysroot'])
   Task 1402 
(/buildarea/lyang1/poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb, 
do_packagedata) (dependent Tasks ['chkconfig, do_package'])
   Task 853 (/buildarea/lyang1/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb, 
do_package) (dependent Tasks ['gcc-runtime, do_packagedata', 'bzip2, 
do_install_ptest_base', 'bzip2, do_install', 'libtool-cross, do_packagedata', 
'glibc, do_packagedata', 'pseudo, do_populate_sysroot', 'chkconfig, 
do_packagedata', 'rpm, do_populate_sysroot'])
   Task 850 (/buildarea/lyang1/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb, 
do_packagedata) (dependent Tasks ['bzip2, do_package'])
   Task 750 
(/buildarea/lyang1/poky/meta/recipes-support/libpcre/libpcre_8.38.bb, 
do_package) (dependent Tasks ['libpcre, do_install_ptest_base', 'libpcre, 
do_install', 'gcc-runtime, do_packagedata', 'pseudo, do_populate_sysroot', 
'libtool-cross, do_packagedata', 'glibc, do_packagedata', 'bzip2, 
do_packagedata', 'zlib, do_packagedata', 'rpm, do_populate_sysroot'])

[snip]

// Robert


On 11/13/2015 07:41 AM, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@mentor.com>
>
> This lets someone use a different update-alternatives-native provider. Without
> this available, they'll step on one another in the sysroot unconditionally,
> since we need to build opkg-utils-native for ipk based builds regardless.
>
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> ---
>   meta/recipes-devtools/opkg-utils/opkg-utils_git.bb | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> index 5f518d2..b242d1f 100644
> --- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> +++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
> @@ -5,7 +5,7 @@ HOMEPAGE = "http://code.google.com/p/opkg/"
>   LICENSE = "GPLv2+"
>   LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
>                       file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
> -PROVIDES += "virtual/update-alternatives"
> +PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
>
>   SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
>   PV = "0.1.8+git${SRCPV}"
> @@ -21,15 +21,21 @@ TARGET_CC_ARCH += "${LDFLAGS}"
>   PYTHONRDEPS = "python python-shell python-io python-math python-crypt python-logging python-fcntl python-subprocess python-pickle python-compression python-textutils python-stringold"
>   PYTHONRDEPS_class-native = ""
>
> -PACKAGECONFIG = "python"
> +PACKAGECONFIG = "python update-alternatives"
>   PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
> +PACKAGECONFIG[update-alternatives] = ",,,"
>
>   do_install() {
>   	oe_runmake PREFIX=${prefix} DESTDIR=${D} install
> +	if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
> +		rm -f "${D}${bindir}/update-alternatives"
> +	fi
>   }
>
>   do_install_append_class-target() {
> -	sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${libdir},g'
> +	if [ -e "${D}${bindir}/update-alternatives" ]; then
> +		sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${libdir},g'
> +	fi
>   }
>
>   PACKAGES =+ "update-alternatives-opkg"
>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] opkg-utils: add update-alternatives PACKAGECONFIG
  2016-01-15  9:23   ` Robert Yang
@ 2016-01-15 20:07     ` Christopher Larson
  2016-01-16  5:57       ` Robert Yang
  0 siblings, 1 reply; 18+ messages in thread
From: Christopher Larson @ 2016-01-15 20:07 UTC (permalink / raw)
  To: Robert Yang; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3385 bytes --]

On Fri, Jan 15, 2016 at 2:23 AM, Robert Yang <liezhi.yang@windriver.com>
wrote:

>
> I've afraid this patch can't work well, when opkg-utils doesn't provide
> virtual/update-alternatives, then chkconfig would be built and there would
> be dependency loops for example,
>
> PACKAGECONFIG = "python"
> $ bitbake core-image-minimal
>
> [snip]
> ERROR:
> Dependency loop #1 found:
>   Task 747 (/buildarea/lyang1/poky/meta/recipes-support/libpcre/
> libpcre_8.38.bb, do_packagedata) (dependent Tasks ['libpcre, do_package'])
>   Task 2067 (/buildarea/lyang1/poky/meta/recipes-extended/slang/
> slang_2.2.4.bb, do_package) (dependent Tasks ['gcc-runtime,
> do_packagedata', 'pseudo, do_populate_sysroot', 'slang, do_install',
> 'libpcre, do_packagedata', 'libtool-cross, do_packagedata', 'glibc,
> do_packagedata', 'rpm, do_populate_sysroot'])
>   Task 2064 (/buildarea/lyang1/poky/meta/recipes-extended/slang/
> slang_2.2.4.bb, do_packagedata) (dependent Tasks ['slang, do_package'])
>   Task 1876 (/buildarea/lyang1/poky/meta/recipes-extended/newt/
> libnewt_0.52.18.bb, do_package) (dependent Tasks ['slang,
> do_packagedata', 'gcc-runtime, do_packagedata', 'pseudo,
> do_populate_sysroot', 'libnewt, do_install', 'libtool-cross,
> do_packagedata', 'glibc, do_packagedata', 'popt, do_packagedata', 'rpm,
> do_populate_sysroot'])
>   Task 1873 (/buildarea/lyang1/poky/meta/recipes-extended/newt/
> libnewt_0.52.18.bb, do_packagedata) (dependent Tasks ['libnewt,
> do_package'])
>   Task 1405 (/buildarea/lyang1/poky/meta/recipes-extended/chkconfig/
> chkconfig_1.3.58.bb, do_package) (dependent Tasks ['gcc-runtime,
> do_packagedata', 'pseudo, do_populate_sysroot', 'glibc, do_packagedata',
> 'libnewt, do_packagedata', 'chkconfig, do_install', 'popt, do_packagedata',
> 'gettext, do_packagedata', 'rpm, do_populate_sysroot'])
>   Task 1402 (/buildarea/lyang1/poky/meta/recipes-extended/chkconfig/
> chkconfig_1.3.58.bb, do_packagedata) (dependent Tasks ['chkconfig,
> do_package'])
>   Task 853 (/buildarea/lyang1/poky/meta/recipes-extended/bzip2/
> bzip2_1.0.6.bb, do_package) (dependent Tasks ['gcc-runtime,
> do_packagedata', 'bzip2, do_install_ptest_base', 'bzip2, do_install',
> 'libtool-cross, do_packagedata', 'glibc, do_packagedata', 'pseudo,
> do_populate_sysroot', 'chkconfig, do_packagedata', 'rpm,
> do_populate_sysroot'])
>   Task 850 (/buildarea/lyang1/poky/meta/recipes-extended/bzip2/
> bzip2_1.0.6.bb, do_packagedata) (dependent Tasks ['bzip2, do_package'])
>   Task 750 (/buildarea/lyang1/poky/meta/recipes-support/libpcre/
> libpcre_8.38.bb, do_package) (dependent Tasks ['libpcre,
> do_install_ptest_base', 'libpcre, do_install', 'gcc-runtime,
> do_packagedata', 'pseudo, do_populate_sysroot', 'libtool-cross,
> do_packagedata', 'glibc, do_packagedata', 'bzip2, do_packagedata', 'zlib,
> do_packagedata', 'rpm, do_populate_sysroot'])


Afaict it should work for the native case, just not target, if you use the
chkconfig-alternatives-native recipe. In meta-mentor we have that recipe
for target as well, to cover both cases, I'll see about submitting that.
We've been using the chkconfig update-alternatives implementation for a few
releases now.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 4800 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/4] opkg-utils: add update-alternatives PACKAGECONFIG
  2016-01-15 20:07     ` Christopher Larson
@ 2016-01-16  5:57       ` Robert Yang
  0 siblings, 0 replies; 18+ messages in thread
From: Robert Yang @ 2016-01-16  5:57 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Patches and discussions about the oe-core layer



On 01/16/2016 04:07 AM, Christopher Larson wrote:
>
> On Fri, Jan 15, 2016 at 2:23 AM, Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@windriver.com>> wrote:
>
>
>     I've afraid this patch can't work well, when opkg-utils doesn't provide
>     virtual/update-alternatives, then chkconfig would be built and there would
>     be dependency loops for example,
>
>     PACKAGECONFIG = "python"
>     $ bitbake core-image-minimal
>
>     [snip]
>     ERROR:
>     Dependency loop #1 found:
>        Task 747
>     (/buildarea/lyang1/poky/meta/recipes-support/libpcre/libpcre_8.38.bb
>     <http://libpcre_8.38.bb>, do_packagedata) (dependent Tasks ['libpcre,
>     do_package'])
>        Task 2067
>     (/buildarea/lyang1/poky/meta/recipes-extended/slang/slang_2.2.4.bb
>     <http://slang_2.2.4.bb>, do_package) (dependent Tasks ['gcc-runtime,
>     do_packagedata', 'pseudo, do_populate_sysroot', 'slang, do_install',
>     'libpcre, do_packagedata', 'libtool-cross, do_packagedata', 'glibc,
>     do_packagedata', 'rpm, do_populate_sysroot'])
>        Task 2064
>     (/buildarea/lyang1/poky/meta/recipes-extended/slang/slang_2.2.4.bb
>     <http://slang_2.2.4.bb>, do_packagedata) (dependent Tasks ['slang, do_package'])
>        Task 1876
>     (/buildarea/lyang1/poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
>     <http://libnewt_0.52.18.bb>, do_package) (dependent Tasks ['slang,
>     do_packagedata', 'gcc-runtime, do_packagedata', 'pseudo,
>     do_populate_sysroot', 'libnewt, do_install', 'libtool-cross,
>     do_packagedata', 'glibc, do_packagedata', 'popt, do_packagedata', 'rpm,
>     do_populate_sysroot'])
>        Task 1873
>     (/buildarea/lyang1/poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
>     <http://libnewt_0.52.18.bb>, do_packagedata) (dependent Tasks ['libnewt,
>     do_package'])
>        Task 1405
>     (/buildarea/lyang1/poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
>     <http://chkconfig_1.3.58.bb>, do_package) (dependent Tasks ['gcc-runtime,
>     do_packagedata', 'pseudo, do_populate_sysroot', 'glibc, do_packagedata',
>     'libnewt, do_packagedata', 'chkconfig, do_install', 'popt, do_packagedata',
>     'gettext, do_packagedata', 'rpm, do_populate_sysroot'])
>        Task 1402
>     (/buildarea/lyang1/poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
>     <http://chkconfig_1.3.58.bb>, do_packagedata) (dependent Tasks ['chkconfig,
>     do_package'])
>        Task 853
>     (/buildarea/lyang1/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
>     <http://bzip2_1.0.6.bb>, do_package) (dependent Tasks ['gcc-runtime,
>     do_packagedata', 'bzip2, do_install_ptest_base', 'bzip2, do_install',
>     'libtool-cross, do_packagedata', 'glibc, do_packagedata', 'pseudo,
>     do_populate_sysroot', 'chkconfig, do_packagedata', 'rpm, do_populate_sysroot'])
>        Task 850
>     (/buildarea/lyang1/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
>     <http://bzip2_1.0.6.bb>, do_packagedata) (dependent Tasks ['bzip2, do_package'])
>        Task 750
>     (/buildarea/lyang1/poky/meta/recipes-support/libpcre/libpcre_8.38.bb
>     <http://libpcre_8.38.bb>, do_package) (dependent Tasks ['libpcre,
>     do_install_ptest_base', 'libpcre, do_install', 'gcc-runtime,
>     do_packagedata', 'pseudo, do_populate_sysroot', 'libtool-cross,
>     do_packagedata', 'glibc, do_packagedata', 'bzip2, do_packagedata', 'zlib,
>     do_packagedata', 'rpm, do_populate_sysroot'])
>
>
> Afaict it should work for the native case, just not target, if you use the
> chkconfig-alternatives-native recipe. In meta-mentor we have that recipe for
> target as well, to cover both cases, I'll see about submitting that. We've been
> using the chkconfig update-alternatives implementation for a few releases now.

If I understand correctly, maybe we need make PACKAGECONFIG only
be available for opkg-utils-native ?

// Robert

> --
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] linux-dtb.inc: use absolute upd-alt paths
  2015-11-12 23:41 ` [PATCH 1/4] linux-dtb.inc: use absolute upd-alt paths Christopher Larson
@ 2016-12-21 19:10   ` Denys Dmytriyenko
  2016-12-21 20:18     ` Christopher Larson
  0 siblings, 1 reply; 18+ messages in thread
From: Denys Dmytriyenko @ 2016-12-21 19:10 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Christopher Larson, openembedded-core

On Thu, Nov 12, 2015 at 04:41:28PM -0700, Christopher Larson wrote:
> From: Christopher Larson <chris_larson@mentor.com>
> 
> This works around a limitation of the chkconfig update-alternatives, so it
> works with all our update-alternatives providers.

I know this change is old and has been in for over a year...

But the side-effect of it is that it breaks NFS-boot due to absolute DTB 
symlinks. We had to implement a local workaround to switch them back to 
relative links.

Is there another way to fix the original issue w/o absolute links?

-- 
Denys


> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> ---
>  meta/recipes-kernel/linux/linux-dtb.inc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc
> index ee3a5e1..5810b10 100644
> --- a/meta/recipes-kernel/linux/linux-dtb.inc
> +++ b/meta/recipes-kernel/linux/linux-dtb.inc
> @@ -64,7 +64,7 @@ pkg_postinst_kernel-devicetree () {
>  	do
>  		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
>  		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
> -		update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
> +		update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
>  	done
>  }
>  
> @@ -74,6 +74,6 @@ pkg_postrm_kernel-devicetree () {
>  	do
>  		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
>  		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
> -		update-alternatives --remove ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
> +		update-alternatives --remove ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
>  	done
>  }
> -- 
> 2.2.1
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] linux-dtb.inc: use absolute upd-alt paths
  2016-12-21 19:10   ` Denys Dmytriyenko
@ 2016-12-21 20:18     ` Christopher Larson
  2016-12-22 18:34       ` Denys Dmytriyenko
  0 siblings, 1 reply; 18+ messages in thread
From: Christopher Larson @ 2016-12-21 20:18 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 907 bytes --]

On Wed, Dec 21, 2016 at 12:10 PM, Denys Dmytriyenko <denis@denix.org> wrote:

> On Thu, Nov 12, 2015 at 04:41:28PM -0700, Christopher Larson wrote:
> > From: Christopher Larson <chris_larson@mentor.com>
> >
> > This works around a limitation of the chkconfig update-alternatives, so
> it
> > works with all our update-alternatives providers.
>
> I know this change is old and has been in for over a year...
>
> But the side-effect of it is that it breaks NFS-boot due to absolute DTB
> symlinks. We had to implement a local workaround to switch them back to
> relative links.
>
> Is there another way to fix the original issue w/o absolute links?


I expect so. I’d be fine with dropping this, it was a workaround more than
anything else anyway.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 1396 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/4] linux-dtb.inc: use absolute upd-alt paths
  2016-12-21 20:18     ` Christopher Larson
@ 2016-12-22 18:34       ` Denys Dmytriyenko
  0 siblings, 0 replies; 18+ messages in thread
From: Denys Dmytriyenko @ 2016-12-22 18:34 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Patches and discussions about the oe-core layer

On Wed, Dec 21, 2016 at 01:18:44PM -0700, Christopher Larson wrote:
> On Wed, Dec 21, 2016 at 12:10 PM, Denys Dmytriyenko <denis@denix.org> wrote:
> 
> > On Thu, Nov 12, 2015 at 04:41:28PM -0700, Christopher Larson wrote:
> > > From: Christopher Larson <chris_larson@mentor.com>
> > >
> > > This works around a limitation of the chkconfig update-alternatives, so
> > it
> > > works with all our update-alternatives providers.
> >
> > I know this change is old and has been in for over a year...
> >
> > But the side-effect of it is that it breaks NFS-boot due to absolute DTB
> > symlinks. We had to implement a local workaround to switch them back to
> > relative links.
> >
> > Is there another way to fix the original issue w/o absolute links?
> 
> I expect so. I’d be fine with dropping this, it was a workaround more than
> anything else anyway.

Ok, someone just changed it, works for me :)

http://cgit.openembedded.org/openembedded-core/commit/?id=c7bc46b9bc29dd0953ab8d63b50fa105bb66892e

-- 
Denys


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-12-22 18:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 23:41 [PATCH 0/4] Misc improvements 2 from Mentor Christopher Larson
2015-11-12 23:41 ` [PATCH 1/4] linux-dtb.inc: use absolute upd-alt paths Christopher Larson
2016-12-21 19:10   ` Denys Dmytriyenko
2016-12-21 20:18     ` Christopher Larson
2016-12-22 18:34       ` Denys Dmytriyenko
2015-11-12 23:41 ` [PATCH 2/4] opkg-utils: add update-alternatives PACKAGECONFIG Christopher Larson
2016-01-15  9:23   ` Robert Yang
2016-01-15 20:07     ` Christopher Larson
2016-01-16  5:57       ` Robert Yang
2015-11-12 23:41 ` [PATCH 3/4] systemd: add myhostname to nsswitch.conf Christopher Larson
2015-11-17  7:25   ` Andreas Müller
2015-11-17 13:55     ` Christopher Larson
2015-11-18  3:49   ` Dan McGregor
2015-12-07 19:49     ` Christopher Larson
2015-12-10 18:33       ` Dan McGregor
2015-11-12 23:41 ` [PATCH 4/4] systemd: arrange for volatile /etc/resolv.conf Christopher Larson
2016-01-05 19:08 ` [PATCH 0/4] Misc improvements 2 from Mentor Christopher Larson
2016-01-05 20:26   ` Burton, Ross

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.