* [PATCH 0/1] apt-native: fix the creation of apt.conf.sample
@ 2013-01-06 8:43 Hongxu Jia
2013-01-06 8:43 ` [PATCH 1/1] " Hongxu Jia
0 siblings, 1 reply; 6+ messages in thread
From: Hongxu Jia @ 2013-01-06 8:43 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 09359e6ec00901abfe49157f1f9730117b4d284b:
freetype: update to 2.4.11 which includes fixes for CVE-2012-{5668, 5669, 5670} (2012-12-31 09:43:27 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/apt-native
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/apt-native
Hongxu Jia (1):
apt-native: fix the creation of apt.conf.sample
meta/recipes-devtools/apt/apt-native.inc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH 1/1] apt-native: fix the creation of apt.conf.sample
2013-01-06 8:43 [PATCH 0/1] apt-native: fix the creation of apt.conf.sample Hongxu Jia
@ 2013-01-06 8:43 ` Hongxu Jia
2013-01-07 21:36 ` Saul Wold
0 siblings, 1 reply; 6+ messages in thread
From: Hongxu Jia @ 2013-01-06 8:43 UTC (permalink / raw)
To: openembedded-core
The file of apt.conf.sample is kept in outdir, and outdir is assigned
by "os.path.join" with the params of ${D}, ${sysconfdir} and "apt". But
${sysconfdir} is an absolute dir and that is not allowed by "os.path.join".
The following is the help on function os.path.join(a, *p):
Join two or more pathname components, inserting '/' as needed.
If any component is an absolute path, all previous path components
will be discarded.
So remove "/" in ${sysconfdir} to create "apt.conf.sample" if it doesn't
exist, not by the existance of prefix dir.
[YOCTO #3677]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/recipes-devtools/apt/apt-native.inc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
index ab89f71..0de159a 100644
--- a/meta/recipes-devtools/apt/apt-native.inc
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -20,14 +20,17 @@ python do_install_config () {
data = d.expand(data)
- outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
+ # os.path.join does not allow sysconfdir to be a absolute dir
+ outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True)[1:], 'apt')
if not os.path.exists(outdir):
os.makedirs(outdir)
- outpath = os.path.join(outdir, 'apt.conf.sample')
+ outpath = os.path.join(outdir, 'apt.conf.sample')
+ if not os.path.exists(outpath):
outfile = file(outpath, 'w')
outfile.write(data)
outfile.close()
+ bb.note("create %s" %outpath)
}
do_install_base () {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/1] apt-native: fix the creation of apt.conf.sample
2013-01-06 8:43 ` [PATCH 1/1] " Hongxu Jia
@ 2013-01-07 21:36 ` Saul Wold
0 siblings, 0 replies; 6+ messages in thread
From: Saul Wold @ 2013-01-07 21:36 UTC (permalink / raw)
To: Hongxu Jia; +Cc: openembedded-core
On 01/06/2013 12:43 AM, Hongxu Jia wrote:
> The file of apt.conf.sample is kept in outdir, and outdir is assigned
> by "os.path.join" with the params of ${D}, ${sysconfdir} and "apt". But
> ${sysconfdir} is an absolute dir and that is not allowed by "os.path.join".
>
> The following is the help on function os.path.join(a, *p):
> Join two or more pathname components, inserting '/' as needed.
> If any component is an absolute path, all previous path components
> will be discarded.
>
> So remove "/" in ${sysconfdir} to create "apt.conf.sample" if it doesn't
> exist, not by the existance of prefix dir.
>
> [YOCTO #3677]
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
> meta/recipes-devtools/apt/apt-native.inc | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
> index ab89f71..0de159a 100644
> --- a/meta/recipes-devtools/apt/apt-native.inc
> +++ b/meta/recipes-devtools/apt/apt-native.inc
> @@ -20,14 +20,17 @@ python do_install_config () {
>
> data = d.expand(data)
>
> - outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
> + # os.path.join does not allow sysconfdir to be a absolute dir
> + outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True)[1:], 'apt')
> if not os.path.exists(outdir):
> os.makedirs(outdir)
> - outpath = os.path.join(outdir, 'apt.conf.sample')
>
> + outpath = os.path.join(outdir, 'apt.conf.sample')
> + if not os.path.exists(outpath):
> outfile = file(outpath, 'w')
> outfile.write(data)
> outfile.close()
> + bb.note("create %s" %outpath)
Do we need to keep this debug message around?
Sau!
> }
>
> do_install_base () {
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/1] apt-native: fix the creation of apt.conf.sample
@ 2013-01-08 10:23 Hongxu Jia
2013-01-08 10:23 ` [PATCH 1/1] " Hongxu Jia
0 siblings, 1 reply; 6+ messages in thread
From: Hongxu Jia @ 2013-01-08 10:23 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 7e1f8faad0c4b6f490c26f87acc698dd6e002b15:
perl: Remove bashism from perl-tests.inc (2013-01-07 22:37:37 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/apt-native
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/apt-native
Hongxu Jia (1):
apt-native: fix the creation of apt.conf.sample
meta/recipes-devtools/apt/apt-native.inc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] apt-native: fix the creation of apt.conf.sample
2013-01-08 10:23 [PATCH 0/1] " Hongxu Jia
@ 2013-01-08 10:23 ` Hongxu Jia
2013-01-08 10:47 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Hongxu Jia @ 2013-01-08 10:23 UTC (permalink / raw)
To: openembedded-core
The file of apt.conf.sample is kept in outdir, and outdir is assigned
by "os.path.join" with the params of ${D}, ${sysconfdir} and "apt". But
${sysconfdir} is an absolute dir and that is not allowed by "os.path.join".
The following is the help on function os.path.join(a, *p):
Join two or more pathname components, inserting '/' as needed.
If any component is an absolute path, all previous path components
will be discarded.
So remove "/" in ${sysconfdir} to create "apt.conf.sample" if it doesn't
exist, not by the existance of prefix dir.
[YOCTO #3677]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/recipes-devtools/apt/apt-native.inc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
index ab89f71..ae03f6e 100644
--- a/meta/recipes-devtools/apt/apt-native.inc
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -20,11 +20,13 @@ python do_install_config () {
data = d.expand(data)
- outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
+ # os.path.join does not allow sysconfdir to be a absolute dir
+ outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True)[1:], 'apt')
if not os.path.exists(outdir):
os.makedirs(outdir)
- outpath = os.path.join(outdir, 'apt.conf.sample')
+ outpath = os.path.join(outdir, 'apt.conf.sample')
+ if not os.path.exists(outpath):
outfile = file(outpath, 'w')
outfile.write(data)
outfile.close()
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/1] apt-native: fix the creation of apt.conf.sample
2013-01-08 10:23 ` [PATCH 1/1] " Hongxu Jia
@ 2013-01-08 10:47 ` Richard Purdie
0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2013-01-08 10:47 UTC (permalink / raw)
To: Hongxu Jia; +Cc: openembedded-core
On Tue, 2013-01-08 at 18:23 +0800, Hongxu Jia wrote:
> The file of apt.conf.sample is kept in outdir, and outdir is assigned
> by "os.path.join" with the params of ${D}, ${sysconfdir} and "apt". But
> ${sysconfdir} is an absolute dir and that is not allowed by "os.path.join".
>
> The following is the help on function os.path.join(a, *p):
> Join two or more pathname components, inserting '/' as needed.
> If any component is an absolute path, all previous path components
> will be discarded.
>
> So remove "/" in ${sysconfdir} to create "apt.conf.sample" if it doesn't
> exist, not by the existance of prefix dir.
Use oe.path.join() instead which doesn't have this problem iirc.
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/1] apt-native: fix the creation of apt.conf.sample
@ 2013-01-10 7:58 Hongxu Jia
2013-01-10 7:58 ` [PATCH 1/1] " Hongxu Jia
0 siblings, 1 reply; 6+ messages in thread
From: Hongxu Jia @ 2013-01-10 7:58 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 7e1f8faad0c4b6f490c26f87acc698dd6e002b15:
perl: Remove bashism from perl-tests.inc (2013-01-07 22:37:37 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/apt-native
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/apt-native
Hongxu Jia (1):
apt-native: fix the creation of apt.conf.sample
meta/recipes-devtools/apt/apt-native.inc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] apt-native: fix the creation of apt.conf.sample
2013-01-10 7:58 [PATCH 0/1] " Hongxu Jia
@ 2013-01-10 7:58 ` Hongxu Jia
0 siblings, 0 replies; 6+ messages in thread
From: Hongxu Jia @ 2013-01-10 7:58 UTC (permalink / raw)
To: openembedded-core
1.The file of "apt.conf.sample" is in the outdir, and outdir is assigned
by "os.path.join" with the params of ${D}, ${sysconfdir} and "apt". But
${sysconfdir} is an absolute dir and that let ${D} be discarded.
The following is the help on function os.path.join(a, *p):
Join two or more pathname components, inserting '/' as needed.
If any component is an absolute path, all previous path components
will be discarded.
Use oe.path.join instead which don't have this problem.
2. Create apt.conf.sample if it doesn't exist.
[YOCTO #3677]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/recipes-devtools/apt/apt-native.inc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
index ab89f71..c7e7e42 100644
--- a/meta/recipes-devtools/apt/apt-native.inc
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -14,17 +14,18 @@ python do_install () {
python do_install_config () {
indir = os.path.dirname(d.getVar('FILE',1))
- infile = file(os.path.join(indir, 'files', 'apt.conf'), 'r')
+ infile = file(oe.path.join(indir, 'files', 'apt.conf'), 'r')
data = infile.read()
infile.close()
data = d.expand(data)
- outdir = os.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
+ outdir = oe.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt')
if not os.path.exists(outdir):
os.makedirs(outdir)
- outpath = os.path.join(outdir, 'apt.conf.sample')
+ outpath = oe.path.join(outdir, 'apt.conf.sample')
+ if not os.path.exists(outpath):
outfile = file(outpath, 'w')
outfile.write(data)
outfile.close()
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-10 8:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-06 8:43 [PATCH 0/1] apt-native: fix the creation of apt.conf.sample Hongxu Jia
2013-01-06 8:43 ` [PATCH 1/1] " Hongxu Jia
2013-01-07 21:36 ` Saul Wold
-- strict thread matches above, loose matches on Subject: below --
2013-01-08 10:23 [PATCH 0/1] " Hongxu Jia
2013-01-08 10:23 ` [PATCH 1/1] " Hongxu Jia
2013-01-08 10:47 ` Richard Purdie
2013-01-10 7:58 [PATCH 0/1] " Hongxu Jia
2013-01-10 7:58 ` [PATCH 1/1] " Hongxu Jia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox