* [PATCH 0/1] netbase/base-files: move /etc/hosts from netbase to base-files
@ 2019-01-08 9:12 Chen Qi
2019-01-08 9:12 ` [PATCH 1/1] " Chen Qi
2019-01-08 9:33 ` ✗ patchtest: failure for " Patchwork
0 siblings, 2 replies; 10+ messages in thread
From: Chen Qi @ 2019-01-08 9:12 UTC (permalink / raw)
To: openembedded-core
The following changes since commit fd045373e01409e273479c9e0e2e69bd1b7815f9:
python-native: fix one do_populate_sysroot warning (2019-01-07 14:38:39 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/etc-hosts
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/etc-hosts
Chen Qi (1):
netbase/base-files: move /etc/hosts from netbase to base-files
meta/recipes-core/{netbase/netbase => base-files/base-files}/hosts | 0
meta/recipes-core/base-files/base-files_3.0.14.bb | 5 ++++-
meta/recipes-core/netbase/netbase_5.5.bb | 6 +-----
3 files changed, 5 insertions(+), 6 deletions(-)
rename meta/recipes-core/{netbase/netbase => base-files/base-files}/hosts (100%)
--
1.9.1
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 1/1] netbase/base-files: move /etc/hosts from netbase to base-files 2019-01-08 9:12 [PATCH 0/1] netbase/base-files: move /etc/hosts from netbase to base-files Chen Qi @ 2019-01-08 9:12 ` Chen Qi 2019-01-08 12:40 ` Burton, Ross 2019-01-09 11:34 ` Peter Kjellerstedt 2019-01-08 9:33 ` ✗ patchtest: failure for " Patchwork 1 sibling, 2 replies; 10+ messages in thread From: Chen Qi @ 2019-01-08 9:12 UTC (permalink / raw) To: openembedded-core Move /etc/hosts to base-files, and also add entry to it according to hostname setting. This fixes the problem of commands like `hostname -f' failing due to lack of such entry. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- meta/recipes-core/{netbase/netbase => base-files/base-files}/hosts | 0 meta/recipes-core/base-files/base-files_3.0.14.bb | 5 ++++- meta/recipes-core/netbase/netbase_5.5.bb | 6 +----- 3 files changed, 5 insertions(+), 6 deletions(-) rename meta/recipes-core/{netbase/netbase => base-files/base-files}/hosts (100%) diff --git a/meta/recipes-core/netbase/netbase/hosts b/meta/recipes-core/base-files/base-files/hosts similarity index 100% rename from meta/recipes-core/netbase/netbase/hosts rename to meta/recipes-core/base-files/base-files/hosts diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 6e75652..6e30c14 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f" SRC_URI = "file://rotation \ file://nsswitch.conf \ file://motd \ + file://hosts \ file://host.conf \ file://profile \ file://shells \ @@ -113,6 +114,7 @@ do_install () { ln -snf ../run ${D}${localstatedir}/run ln -snf ../run/lock ${D}${localstatedir}/lock + install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts ${BASEFILESISSUEINSTALL} rotation=`cat ${WORKDIR}/rotation` @@ -140,6 +142,7 @@ DISTRO_VERSION[vardepsexclude] += "DATE" do_install_basefilesissue () { if [ "${hostname}" ]; then echo ${hostname} > ${D}${sysconfdir}/hostname + echo "127.0.1.1 ${hostname}" >> ${D}${sysconfdir}/hosts fi install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} @@ -177,5 +180,5 @@ FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses" PACKAGE_ARCH = "${MACHINE_ARCH}" -CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname') != '')]} ${sysconfdir}/shells" +CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname ${sysconfdir}/hosts'][(d.getVar('hostname') != '')]} ${sysconfdir}/shells" CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile" diff --git a/meta/recipes-core/netbase/netbase_5.5.bb b/meta/recipes-core/netbase/netbase_5.5.bb index 2061f86..eb53add 100644 --- a/meta/recipes-core/netbase/netbase_5.5.bb +++ b/meta/recipes-core/netbase/netbase_5.5.bb @@ -7,8 +7,7 @@ LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab PE = "1" SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.tar.xz \ - file://netbase-add-rpcbind-as-an-alias-to-sunrpc.patch \ - file://hosts" + file://netbase-add-rpcbind-as-an-alias-to-sunrpc.patch" SRC_URI[md5sum] = "15f2d9b3783802f7f48f6734b6540ac4" SRC_URI[sha256sum] = "309bddc69a43b98e5a450992b70cdfc0e3d1afb9107bc631d04b0714be98f88b" @@ -16,10 +15,7 @@ SRC_URI[sha256sum] = "309bddc69a43b98e5a450992b70cdfc0e3d1afb9107bc631d04b0714be UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netbase/" do_install () { install -d ${D}/${mandir}/man8 ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts install -m 0644 etc-rpc ${D}${sysconfdir}/rpc install -m 0644 etc-protocols ${D}${sysconfdir}/protocols install -m 0644 etc-services ${D}${sysconfdir}/services } - -CONFFILES_${PN} = "${sysconfdir}/hosts" -- 1.9.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/1] netbase/base-files: move /etc/hosts from netbase to base-files 2019-01-08 9:12 ` [PATCH 1/1] " Chen Qi @ 2019-01-08 12:40 ` Burton, Ross 2019-01-08 12:44 ` Richard Purdie 2019-01-09 11:34 ` Peter Kjellerstedt 1 sibling, 1 reply; 10+ messages in thread From: Burton, Ross @ 2019-01-08 12:40 UTC (permalink / raw) To: Chen Qi; +Cc: OE-core On Tue, 8 Jan 2019 at 09:06, Chen Qi <Qi.Chen@windriver.com> wrote: > if [ "${hostname}" ]; then > echo ${hostname} > ${D}${sysconfdir}/hostname > + echo "127.0.1.1 ${hostname}" >> ${D}${sysconfdir}/hosts > fi Instead of appending to the file, can you put a marker on the 127.0.0.1 line and replace it inline? Ross ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/1] netbase/base-files: move /etc/hosts from netbase to base-files 2019-01-08 12:40 ` Burton, Ross @ 2019-01-08 12:44 ` Richard Purdie 2019-01-08 12:45 ` Burton, Ross 0 siblings, 1 reply; 10+ messages in thread From: Richard Purdie @ 2019-01-08 12:44 UTC (permalink / raw) To: Burton, Ross, Chen Qi; +Cc: OE-core On Tue, 2019-01-08 at 12:40 +0000, Burton, Ross wrote: > On Tue, 8 Jan 2019 at 09:06, Chen Qi <Qi.Chen@windriver.com> wrote: > > if [ "${hostname}" ]; then > > echo ${hostname} > ${D}${sysconfdir}/hostname > > + echo "127.0.1.1 ${hostname}" >> > > ${D}${sysconfdir}/hosts > > fi > > Instead of appending to the file, can you put a marker on the > 127.0.0.1 line and replace it inline? Not so good if hostname isn't set? Cheers, Richard ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/1] netbase/base-files: move /etc/hosts from netbase to base-files 2019-01-08 12:44 ` Richard Purdie @ 2019-01-08 12:45 ` Burton, Ross 2019-01-08 12:47 ` richard.purdie 0 siblings, 1 reply; 10+ messages in thread From: Burton, Ross @ 2019-01-08 12:45 UTC (permalink / raw) To: Richard Purdie; +Cc: OE-core On Tue, 8 Jan 2019 at 12:45, Richard Purdie <richard.purdie@linuxfoundation.org> wrote: > On Tue, 2019-01-08 at 12:40 +0000, Burton, Ross wrote: > > On Tue, 8 Jan 2019 at 09:06, Chen Qi <Qi.Chen@windriver.com> wrote: > > > if [ "${hostname}" ]; then > > > echo ${hostname} > ${D}${sysconfdir}/hostname > > > + echo "127.0.1.1 ${hostname}" >> > > > ${D}${sysconfdir}/hosts > > > fi > > > > Instead of appending to the file, can you put a marker on the > > 127.0.0.1 line and replace it inline? > > Not so good if hostname isn't set? hostname = "${MACHINE}" Hostname is always set. :) Ross ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/1] netbase/base-files: move /etc/hosts from netbase to base-files 2019-01-08 12:45 ` Burton, Ross @ 2019-01-08 12:47 ` richard.purdie 2019-01-08 13:00 ` Burton, Ross 0 siblings, 1 reply; 10+ messages in thread From: richard.purdie @ 2019-01-08 12:47 UTC (permalink / raw) To: Burton, Ross; +Cc: OE-core On Tue, 2019-01-08 at 12:45 +0000, Burton, Ross wrote: > On Tue, 8 Jan 2019 at 12:45, Richard Purdie > <richard.purdie@linuxfoundation.org> wrote: > > On Tue, 2019-01-08 at 12:40 +0000, Burton, Ross wrote: > > > On Tue, 8 Jan 2019 at 09:06, Chen Qi <Qi.Chen@windriver.com> > > > wrote: > > > > if [ "${hostname}" ]; then > > > > echo ${hostname} > ${D}${sysconfdir}/hostname > > > > + echo "127.0.1.1 ${hostname}" >> > > > > ${D}${sysconfdir}/hosts > > > > fi > > > > > > Instead of appending to the file, can you put a marker on the > > > 127.0.0.1 line and replace it inline? > > > > Not so good if hostname isn't set? > > hostname = "${MACHINE}" > > Hostname is always set. :) Its the kind of thing people likely bbappend and change, or set from overrides. Which was one of the reasons I'm nervous about moving hosts to a different package in the first place... Cheers, RIchard ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/1] netbase/base-files: move /etc/hosts from netbase to base-files 2019-01-08 12:47 ` richard.purdie @ 2019-01-08 13:00 ` Burton, Ross 2019-01-09 1:47 ` ChenQi 0 siblings, 1 reply; 10+ messages in thread From: Burton, Ross @ 2019-01-08 13:00 UTC (permalink / raw) To: Purdie, Richard; +Cc: OE-core On Tue, 8 Jan 2019 at 12:47, <richard.purdie@linuxfoundation.org> wrote: > > > Not so good if hostname isn't set? > > > > hostname = "${MACHINE}" > > > > Hostname is always set. :) > > Its the kind of thing people likely bbappend and change, or set from > overrides. Which was one of the reasons I'm nervous about moving hosts > to a different package in the first place... In all those situation the hostname will be set, right? Is anyone actually going to bbappend/override the value to ""? Ross ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/1] netbase/base-files: move /etc/hosts from netbase to base-files 2019-01-08 13:00 ` Burton, Ross @ 2019-01-09 1:47 ` ChenQi 0 siblings, 0 replies; 10+ messages in thread From: ChenQi @ 2019-01-09 1:47 UTC (permalink / raw) To: Burton, Ross, Purdie, Richard; +Cc: OE-core On 01/08/2019 09:00 PM, Burton, Ross wrote: > On Tue, 8 Jan 2019 at 12:47, <richard.purdie@linuxfoundation.org> wrote: >>>> Not so good if hostname isn't set? >>> hostname = "${MACHINE}" >>> >>> Hostname is always set. :) >> Its the kind of thing people likely bbappend and change, or set from >> overrides. Which was one of the reasons I'm nervous about moving hosts >> to a different package in the first place... > In all those situation the hostname will be set, right? Is anyone > actually going to bbappend/override the value to ""? > > Ross > We did so maybe two or three years ago, via a distro configuration file. We later removed this override. Also, the original codes in base-files are: if [ "${hostname}" ]; then echo ${hostname} > ${D}${sysconfdir}/hostname fi So I just put the line in the check. Best Regards, Chen Qi ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/1] netbase/base-files: move /etc/hosts from netbase to base-files 2019-01-08 9:12 ` [PATCH 1/1] " Chen Qi 2019-01-08 12:40 ` Burton, Ross @ 2019-01-09 11:34 ` Peter Kjellerstedt 1 sibling, 0 replies; 10+ messages in thread From: Peter Kjellerstedt @ 2019-01-09 11:34 UTC (permalink / raw) To: Chen Qi, openembedded-core@lists.openembedded.org > -----Original Message----- > From: openembedded-core-bounces@lists.openembedded.org <openembedded- > core-bounces@lists.openembedded.org> On Behalf Of Chen Qi > Sent: den 8 januari 2019 10:13 > To: openembedded-core@lists.openembedded.org > Subject: [OE-core] [PATCH 1/1] netbase/base-files: move /etc/hosts from > netbase to base-files > > Move /etc/hosts to base-files, and also add entry to it according > to hostname setting. This fixes the problem of commands like > `hostname -f' failing due to lack of such entry. > > Signed-off-by: Chen Qi <Qi.Chen@windriver.com> > --- > meta/recipes-core/{netbase/netbase => base-files/base-files}/hosts | 0 > meta/recipes-core/base-files/base-files_3.0.14.bb | 5 ++++- > meta/recipes-core/netbase/netbase_5.5.bb | 6 +----- > 3 files changed, 5 insertions(+), 6 deletions(-) > rename meta/recipes-core/{netbase/netbase => base-files/base-files}/hosts (100%) > > diff --git a/meta/recipes-core/netbase/netbase/hosts b/meta/recipes-core/base-files/base-files/hosts > similarity index 100% > rename from meta/recipes-core/netbase/netbase/hosts > rename to meta/recipes-core/base-files/base-files/hosts > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb > index 6e75652..6e30c14 100644 > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb > @@ -13,6 +13,7 @@ LIC_FILES_CHKSUM = "file://licenses/GPL- > 2;md5=94d55d512a9ba36caa9b7df079bae19f" > SRC_URI = "file://rotation \ > file://nsswitch.conf \ > file://motd \ > + file://hosts \ > file://host.conf \ > file://profile \ > file://shells \ > @@ -113,6 +114,7 @@ do_install () { > ln -snf ../run ${D}${localstatedir}/run > ln -snf ../run/lock ${D}${localstatedir}/lock > > + install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts > ${BASEFILESISSUEINSTALL} > > rotation=`cat ${WORKDIR}/rotation` > @@ -140,6 +142,7 @@ DISTRO_VERSION[vardepsexclude] += "DATE" > do_install_basefilesissue () { > if [ "${hostname}" ]; then > echo ${hostname} > ${D}${sysconfdir}/hostname > + echo "127.0.1.1 ${hostname}" >> ${D}${sysconfdir}/hosts Should this check the ipv4 DISTRO_FEATURE? What about IPv6? > fi > > install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} > @@ -177,5 +180,5 @@ FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses" > > PACKAGE_ARCH = "${MACHINE_ARCH}" > > -CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname') != '')]} ${sysconfdir}/shells" > +CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname ${sysconfdir}/hosts'][(d.getVar('hostname') != '')]} ${sysconfdir}/shells" A bit more readable: CONFFILES_${PN} = "${sysconfdir}/fstab ${@'${sysconfdir}/hostname ${sysconfdir}/hosts' if d.getVar('hostname') else ''} ${sysconfdir}/shells" > CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile" > diff --git a/meta/recipes-core/netbase/netbase_5.5.bb b/meta/recipes- > core/netbase/netbase_5.5.bb > index 2061f86..eb53add 100644 > --- a/meta/recipes-core/netbase/netbase_5.5.bb > +++ b/meta/recipes-core/netbase/netbase_5.5.bb > @@ -7,8 +7,7 @@ LIC_FILES_CHKSUM = > "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab > PE = "1" > > SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.tar.xz \ > - file://netbase-add-rpcbind-as-an-alias-to-sunrpc.patch \ > - file://hosts" > + file://netbase-add-rpcbind-as-an-alias-to-sunrpc.patch" > > SRC_URI[md5sum] = "15f2d9b3783802f7f48f6734b6540ac4" > SRC_URI[sha256sum] = "309bddc69a43b98e5a450992b70cdfc0e3d1afb9107bc631d04b0714be98f88b" > @@ -16,10 +15,7 @@ SRC_URI[sha256sum] = "309bddc69a43b98e5a450992b70cdfc0e3d1afb9107bc631d04b0714be > UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/n/netbase/" > do_install () { > install -d ${D}/${mandir}/man8 ${D}${sysconfdir} > - install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts > install -m 0644 etc-rpc ${D}${sysconfdir}/rpc > install -m 0644 etc-protocols ${D}${sysconfdir}/protocols > install -m 0644 etc-services ${D}${sysconfdir}/services > } > - > -CONFFILES_${PN} = "${sysconfdir}/hosts" > -- > 1.9.1 //Peter ^ permalink raw reply [flat|nested] 10+ messages in thread
* ✗ patchtest: failure for netbase/base-files: move /etc/hosts from netbase to base-files 2019-01-08 9:12 [PATCH 0/1] netbase/base-files: move /etc/hosts from netbase to base-files Chen Qi 2019-01-08 9:12 ` [PATCH 1/1] " Chen Qi @ 2019-01-08 9:33 ` Patchwork 1 sibling, 0 replies; 10+ messages in thread From: Patchwork @ 2019-01-08 9:33 UTC (permalink / raw) To: Qi.Chen; +Cc: openembedded-core == Series Details == Series: netbase/base-files: move /etc/hosts from netbase to base-files Revision: 1 URL : https://patchwork.openembedded.org/series/15565/ State : failure == Summary == Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures: * Issue Series does not apply on top of target branch [test_series_merge_on_head] Suggested fix Rebase your series on top of targeted branch Targeted branch master (currently at 65c419b8c4) If you believe any of these test results are incorrect, please reply to the mailing list (openembedded-core@lists.openembedded.org) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...). --- Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-01-09 11:34 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-01-08 9:12 [PATCH 0/1] netbase/base-files: move /etc/hosts from netbase to base-files Chen Qi 2019-01-08 9:12 ` [PATCH 1/1] " Chen Qi 2019-01-08 12:40 ` Burton, Ross 2019-01-08 12:44 ` Richard Purdie 2019-01-08 12:45 ` Burton, Ross 2019-01-08 12:47 ` richard.purdie 2019-01-08 13:00 ` Burton, Ross 2019-01-09 1:47 ` ChenQi 2019-01-09 11:34 ` Peter Kjellerstedt 2019-01-08 9:33 ` ✗ patchtest: failure for " Patchwork
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox