Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] apt-native: Install apt-ftparchive
@ 2014-03-13 13:27 Ricardo Ribalda Delgado
  2014-03-13 13:27 ` [PATCH 2/2] package_deb: Use apt-ftparchive Ricardo Ribalda Delgado
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2014-03-13 13:27 UTC (permalink / raw)
  To: openembedded-core

apt-ftparchive is needed to create a Release file compatible with
SecureApt.

It is also a more efficient replacement of dpkg-scanpackages.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
 meta/recipes-devtools/apt/apt-native.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc
index 294ca94..36035b0 100644
--- a/meta/recipes-devtools/apt/apt-native.inc
+++ b/meta/recipes-devtools/apt/apt-native.inc
@@ -39,6 +39,7 @@ do_install_base () {
 	install -m 0755 bin/apt-cache ${D}${bindir}/
 	install -m 0755 bin/apt-sortpkgs ${D}${bindir}/
 	install -m 0755 bin/apt-extracttemplates ${D}${bindir}/
+	install -m 0755 bin/apt-ftparchive ${D}${bindir}/
 
 	eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'`
 	eval `cat environment.mak | grep ^LIBSTDCPP_VER | sed -e's, = ,=,'`
-- 
1.9.0



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

* [PATCH 2/2] package_deb: Use apt-ftparchive
  2014-03-13 13:27 [PATCH 1/2] apt-native: Install apt-ftparchive Ricardo Ribalda Delgado
@ 2014-03-13 13:27 ` Ricardo Ribalda Delgado
  2014-03-16 23:01   ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2014-03-13 13:27 UTC (permalink / raw)
  To: openembedded-core

Use apt-ftparchive to create a Release file compatible with SecureApt.

apt-ftparchive is not compatible with libpseudo. The calls to ftw()
returns the path in absolute format instead of relative. This produces
wrong Packages and Release files.

ie:
MD5Sum:
d20227a958f6870137ce0e41b7b84307             1453
/home/ricardo/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/all/Release

This is why it is called with PSEUDO_UNLOAD.

apt-ftparchive is also a more efficient replacement of dpkg-scanpackages:

root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
_64# time PSEUDO_UNLOAD=1 apt-ftparchive packages . >/tmp/kkk
real 0m26.873s
user 0m20.968s
sys 0m1.212s

root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
_64# time PSEUDO_UNLOAD=1 dpkg-scanpackages . >/tmp/kkk
dpkg-scanpackages: info: Wrote 6022 entries to output Packages file.
real 0m59.721s
user 0m16.668s
sys 0m11.164s

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
 meta/classes/package_deb.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index b391e5c..2ac1aed 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -37,8 +37,10 @@ package_update_index_deb () {
 			continue;
 		fi
 		cd ${DEPLOY_DIR_DEB}/$arch
-		dpkg-scanpackages . | gzip > Packages.gz
+		PSEUDO_UNLOAD=1 apt-ftparchive packages . > Packages
+		gzip Packages -c > Packages.gz
 		echo "Label: $arch" > Release
+		PSEUDO_UNLOAD=1 apt-ftparchive release . >> Release
 		found=1
 	done
 	if [ "$found" != "1" ]; then
-- 
1.9.0



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

* Re: [PATCH 2/2] package_deb: Use apt-ftparchive
  2014-03-13 13:27 ` [PATCH 2/2] package_deb: Use apt-ftparchive Ricardo Ribalda Delgado
@ 2014-03-16 23:01   ` Richard Purdie
  2014-03-17  7:59     ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2014-03-16 23:01 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado; +Cc: openembedded-core

On Thu, 2014-03-13 at 14:27 +0100, Ricardo Ribalda Delgado wrote:
> Use apt-ftparchive to create a Release file compatible with SecureApt.
> 
> apt-ftparchive is not compatible with libpseudo. The calls to ftw()
> returns the path in absolute format instead of relative. This produces
> wrong Packages and Release files.
> 
> ie:
> MD5Sum:
> d20227a958f6870137ce0e41b7b84307             1453
> /home/ricardo/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/all/Release
> 
> This is why it is called with PSEUDO_UNLOAD.
> 
> apt-ftparchive is also a more efficient replacement of dpkg-scanpackages:
> 
> root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
> _64# time PSEUDO_UNLOAD=1 apt-ftparchive packages . >/tmp/kkk
> real 0m26.873s
> user 0m20.968s
> sys 0m1.212s
> 
> root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
> _64# time PSEUDO_UNLOAD=1 dpkg-scanpackages . >/tmp/kkk
> dpkg-scanpackages: info: Wrote 6022 entries to output Packages file.
> real 0m59.721s
> user 0m16.668s
> sys 0m11.164s
> 
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> ---
>  meta/classes/package_deb.bbclass | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

This doesn't apply against master? What was this tested against?

Cheers,

Richard



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

* Re: [PATCH 2/2] package_deb: Use apt-ftparchive
  2014-03-16 23:01   ` Richard Purdie
@ 2014-03-17  7:59     ` Ricardo Ribalda Delgado
  2014-03-17  8:30       ` Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2014-03-17  7:59 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

Hello Richard.

I have tested it with dora. I can rebase it.

Shall I rebase it over git://git.yoctoproject.org/poky or over
git://git.openembedded.org/openembedded-core

Thanks!

On Mon, Mar 17, 2014 at 12:01 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Thu, 2014-03-13 at 14:27 +0100, Ricardo Ribalda Delgado wrote:
>> Use apt-ftparchive to create a Release file compatible with SecureApt.
>>
>> apt-ftparchive is not compatible with libpseudo. The calls to ftw()
>> returns the path in absolute format instead of relative. This produces
>> wrong Packages and Release files.
>>
>> ie:
>> MD5Sum:
>> d20227a958f6870137ce0e41b7b84307             1453
>> /home/ricardo/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/all/Release
>>
>> This is why it is called with PSEUDO_UNLOAD.
>>
>> apt-ftparchive is also a more efficient replacement of dpkg-scanpackages:
>>
>> root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
>> _64# time PSEUDO_UNLOAD=1 apt-ftparchive packages . >/tmp/kkk
>> real 0m26.873s
>> user 0m20.968s
>> sys 0m1.212s
>>
>> root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
>> _64# time PSEUDO_UNLOAD=1 dpkg-scanpackages . >/tmp/kkk
>> dpkg-scanpackages: info: Wrote 6022 entries to output Packages file.
>> real 0m59.721s
>> user 0m16.668s
>> sys 0m11.164s
>>
>> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>> ---
>>  meta/classes/package_deb.bbclass | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> This doesn't apply against master? What was this tested against?
>
> Cheers,
>
> Richard
>



-- 
Ricardo Ribalda


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

* Re: [PATCH 2/2] package_deb: Use apt-ftparchive
  2014-03-17  7:59     ` Ricardo Ribalda Delgado
@ 2014-03-17  8:30       ` Robert Yang
  2014-03-17 12:28         ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2014-03-17  8:30 UTC (permalink / raw)
  To: Ricardo Ribalda Delgado, Richard Purdie; +Cc: openembedded-core


Hi Ricardo,

On 03/17/2014 03:59 PM, Ricardo Ribalda Delgado wrote:
> Hello Richard.
>
> I have tested it with dora. I can rebase it.
>

If it is for dora, then the Subject should in include [dora]

> Shall I rebase it over git://git.yoctoproject.org/poky or over
> git://git.openembedded.org/openembedded-core
>

I think that openembedded-core is preferred.

// Robert

> Thanks!
>
> On Mon, Mar 17, 2014 at 12:01 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
>> On Thu, 2014-03-13 at 14:27 +0100, Ricardo Ribalda Delgado wrote:
>>> Use apt-ftparchive to create a Release file compatible with SecureApt.
>>>
>>> apt-ftparchive is not compatible with libpseudo. The calls to ftw()
>>> returns the path in absolute format instead of relative. This produces
>>> wrong Packages and Release files.
>>>
>>> ie:
>>> MD5Sum:
>>> d20227a958f6870137ce0e41b7b84307             1453
>>> /home/ricardo/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/all/Release
>>>
>>> This is why it is called with PSEUDO_UNLOAD.
>>>
>>> apt-ftparchive is also a more efficient replacement of dpkg-scanpackages:
>>>
>>> root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
>>> _64# time PSEUDO_UNLOAD=1 apt-ftparchive packages . >/tmp/kkk
>>> real 0m26.873s
>>> user 0m20.968s
>>> sys 0m1.212s
>>>
>>> root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
>>> _64# time PSEUDO_UNLOAD=1 dpkg-scanpackages . >/tmp/kkk
>>> dpkg-scanpackages: info: Wrote 6022 entries to output Packages file.
>>> real 0m59.721s
>>> user 0m16.668s
>>> sys 0m11.164s
>>>
>>> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>>> ---
>>>   meta/classes/package_deb.bbclass | 4 +++-
>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> This doesn't apply against master? What was this tested against?
>>
>> Cheers,
>>
>> Richard
>>
>
>
>


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

* Re: [PATCH 2/2] package_deb: Use apt-ftparchive
  2014-03-17  8:30       ` Robert Yang
@ 2014-03-17 12:28         ` Ricardo Ribalda Delgado
  0 siblings, 0 replies; 6+ messages in thread
From: Ricardo Ribalda Delgado @ 2014-03-17 12:28 UTC (permalink / raw)
  To: Robert Yang; +Cc: openembedded-core

Hello Robert.

I have just resend the patch. Is there any document describing this
conventions?


Thanks!

On Mon, Mar 17, 2014 at 9:30 AM, Robert Yang <liezhi.yang@windriver.com> wrote:
>
> Hi Ricardo,
>
>
> On 03/17/2014 03:59 PM, Ricardo Ribalda Delgado wrote:
>>
>> Hello Richard.
>>
>> I have tested it with dora. I can rebase it.
>>
>
> If it is for dora, then the Subject should in include [dora]
>
>
>> Shall I rebase it over git://git.yoctoproject.org/poky or over
>> git://git.openembedded.org/openembedded-core
>>
>
> I think that openembedded-core is preferred.
>
> // Robert
>
>
>> Thanks!
>>
>> On Mon, Mar 17, 2014 at 12:01 AM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>>>
>>> On Thu, 2014-03-13 at 14:27 +0100, Ricardo Ribalda Delgado wrote:
>>>>
>>>> Use apt-ftparchive to create a Release file compatible with SecureApt.
>>>>
>>>> apt-ftparchive is not compatible with libpseudo. The calls to ftw()
>>>> returns the path in absolute format instead of relative. This produces
>>>> wrong Packages and Release files.
>>>>
>>>> ie:
>>>> MD5Sum:
>>>> d20227a958f6870137ce0e41b7b84307             1453
>>>>
>>>> /home/ricardo/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/all/Release
>>>>
>>>> This is why it is called with PSEUDO_UNLOAD.
>>>>
>>>> apt-ftparchive is also a more efficient replacement of
>>>> dpkg-scanpackages:
>>>>
>>>>
>>>> root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
>>>> _64# time PSEUDO_UNLOAD=1 apt-ftparchive packages . >/tmp/kkk
>>>> real 0m26.873s
>>>> user 0m20.968s
>>>> sys 0m1.212s
>>>>
>>>>
>>>> root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat
>>>> _64# time PSEUDO_UNLOAD=1 dpkg-scanpackages . >/tmp/kkk
>>>> dpkg-scanpackages: info: Wrote 6022 entries to output Packages file.
>>>> real 0m59.721s
>>>> user 0m16.668s
>>>> sys 0m11.164s
>>>>
>>>> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>>>> ---
>>>>   meta/classes/package_deb.bbclass | 4 +++-
>>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>>
>>> This doesn't apply against master? What was this tested against?
>>>
>>> Cheers,
>>>
>>> Richard
>>>
>>
>>
>>
>



-- 
Ricardo Ribalda


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

end of thread, other threads:[~2014-03-17 12:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-13 13:27 [PATCH 1/2] apt-native: Install apt-ftparchive Ricardo Ribalda Delgado
2014-03-13 13:27 ` [PATCH 2/2] package_deb: Use apt-ftparchive Ricardo Ribalda Delgado
2014-03-16 23:01   ` Richard Purdie
2014-03-17  7:59     ` Ricardo Ribalda Delgado
2014-03-17  8:30       ` Robert Yang
2014-03-17 12:28         ` Ricardo Ribalda Delgado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox