* [PATCH 0/1] combo-layer sanity_check fix @ 2015-05-20 11:48 Patrick Ohly 2015-05-20 11:48 ` [PATCH 1/1] combo-layer: handle unset dest_dir in sanity_check() Patrick Ohly 0 siblings, 1 reply; 4+ messages in thread From: Patrick Ohly @ 2015-05-20 11:48 UTC (permalink / raw) To: openembedded-core The following changes since commit c0f0b6e6ef1edc0a9f9e1ceffb1cdbbef2e409c6: glibc: CVE-2015-1781: resolv/nss_dns/dns-host.c buffer overflow (2015-05-16 22:37:21 +0100) are available in the git repository at: git://github.com/pohly/openembedded-core master https://github.com/pohly/openembedded-core/tree/master Patrick Ohly (1): combo-layer: handle unset dest_dir in sanity_check() scripts/combo-layer | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.1.4 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] combo-layer: handle unset dest_dir in sanity_check() 2015-05-20 11:48 [PATCH 0/1] combo-layer sanity_check fix Patrick Ohly @ 2015-05-20 11:48 ` Patrick Ohly 2015-05-21 11:08 ` Paul Eggleton 2015-08-04 16:26 ` Patrick Ohly 0 siblings, 2 replies; 4+ messages in thread From: Patrick Ohly @ 2015-05-20 11:48 UTC (permalink / raw) To: openembedded-core The previous "clean up dest_dir checking" patch (f8cdbe7497) improved handling of empty dest_dir but made handling of unset dest_dir worse: instead showing the "Option dest_dir is not defined for component ..." error, it fails with a Python exception. Avoid that by providing a sane fallback for the unset case. With that change, dest_dir is no longer strictly required, but the check for it is kept to ensure that a combo-layer.conf also works with older combo-layer versions. [Yocto #7773] Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> --- scripts/combo-layer | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/combo-layer b/scripts/combo-layer index b0b7c28..698d3e3 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer @@ -145,8 +145,10 @@ class Configuration(object): msg = "%s\nOption %s is not defined for component %s" %(msg, option, name) missing_options.append(option) # Sanitize dest_dir so that we do not have to deal with edge cases - # (empty string, double slashes) in the rest of the code. - dest_dir = os.path.normpath(self.repos[name]["dest_dir"]) + # (unset, empty string, double slashes) in the rest of the code. + # It not being set will still be flagged as error because it is + # listed as required option above; that could be changed now. + dest_dir = os.path.normpath(self.repos[name].get("dest_dir", ".")) self.repos[name]["dest_dir"] = "." if not dest_dir else dest_dir if msg != "": logger.error("configuration file %s has the following error: %s" % (self.conffile,msg)) -- 2.1.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] combo-layer: handle unset dest_dir in sanity_check() 2015-05-20 11:48 ` [PATCH 1/1] combo-layer: handle unset dest_dir in sanity_check() Patrick Ohly @ 2015-05-21 11:08 ` Paul Eggleton 2015-08-04 16:26 ` Patrick Ohly 1 sibling, 0 replies; 4+ messages in thread From: Paul Eggleton @ 2015-05-21 11:08 UTC (permalink / raw) To: openembedded-core On Wednesday 20 May 2015 13:48:20 Patrick Ohly wrote: > The previous "clean up dest_dir checking" patch (f8cdbe7497) improved > handling of empty dest_dir but made handling of unset dest_dir worse: > instead showing the "Option dest_dir is not defined for component ..." > error, it fails with a Python exception. > > Avoid that by providing a sane fallback for the unset case. With that > change, dest_dir is no longer strictly required, but the check for it > is kept to ensure that a combo-layer.conf also works with older > combo-layer versions. > > [Yocto #7773] > > Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> > --- > scripts/combo-layer | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/scripts/combo-layer b/scripts/combo-layer > index b0b7c28..698d3e3 100755 > --- a/scripts/combo-layer > +++ b/scripts/combo-layer > @@ -145,8 +145,10 @@ class Configuration(object): > msg = "%s\nOption %s is not defined for component %s" > %(msg, option, name) missing_options.append(option) > # Sanitize dest_dir so that we do not have to deal with edge > cases - # (empty string, double slashes) in the rest of the > code. - dest_dir = > os.path.normpath(self.repos[name]["dest_dir"]) + # (unset, empty > string, double slashes) in the rest of the code. + # It not > being set will still be flagged as error because it is + # > listed as required option above; that could be changed now. + > dest_dir = os.path.normpath(self.repos[name].get("dest_dir", ".")) > self.repos[name]["dest_dir"] = "." if not dest_dir else dest_dir if msg != > "": > logger.error("configuration file %s has the following error: > %s" % (self.conffile,msg)) I suppose we might now tidy up the line that follows, but that's less critical than fixing the behaviour that this patch does. Therefore: Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com> Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] combo-layer: handle unset dest_dir in sanity_check() 2015-05-20 11:48 ` [PATCH 1/1] combo-layer: handle unset dest_dir in sanity_check() Patrick Ohly 2015-05-21 11:08 ` Paul Eggleton @ 2015-08-04 16:26 ` Patrick Ohly 1 sibling, 0 replies; 4+ messages in thread From: Patrick Ohly @ 2015-08-04 16:26 UTC (permalink / raw) To: openembedded-core Please ignore, I accidentally resent this pull request. On Tue, 2015-08-04 at 18:20 +0200, Patrick Ohly wrote: > The previous "clean up dest_dir checking" patch (f8cdbe7497) improved > handling of empty dest_dir but made handling of unset dest_dir worse: > instead showing the "Option dest_dir is not defined for component ..." > error, it fails with a Python exception. ... ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-04 16:26 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-05-20 11:48 [PATCH 0/1] combo-layer sanity_check fix Patrick Ohly 2015-05-20 11:48 ` [PATCH 1/1] combo-layer: handle unset dest_dir in sanity_check() Patrick Ohly 2015-05-21 11:08 ` Paul Eggleton 2015-08-04 16:26 ` Patrick Ohly
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox