Patchwork e2fsprogs.inc - break shared libs into separate packages

login
register
mail settings
Submitter Mike Westerhof
Date Jan. 2, 2011, 3:15 p.m.
Message ID <4D20968B.4030004@mwester.net>
Download mbox | patch
Permalink /patch/154/
State Accepted
Headers show

Comments

Mike Westerhof - Jan. 2, 2011, 3:15 p.m.
Break the two shared libraries (libe2p and libext2fs) out of the general e2fsprogs
package and into their own packages.  This avoids pulling in unwanted executables
when a distro only desires the basic tools (such as e2fsck and/or mke2fs).

Signed-off-by: Mike Westerhof <mike@mwester.net>
---
Koen Kooi - Jan. 2, 2011, 5:41 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02-01-11 16:15, Mike Westerhof wrote:
> Break the two shared libraries (libe2p and libext2fs) out of the general e2fsprogs
> package and into their own packages.  This avoids pulling in unwanted executables
> when a distro only desires the basic tools (such as e2fsck and/or mke2fs).
> 
> Signed-off-by: Mike Westerhof <mike@mwester.net>

Recipes with e2fsprogs in DEPENDS will need a PR bump as well, since
they might link to these libs as well. This will result in missing
libraries when using package feeds.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFNILjgMkyGM64RGpERAl63AJ9d+oy10QAFluRD89/YB6g9ircOuwCfXljo
L2xm9I2E6/rkDke1UFvCG9c=
=Xptt
-----END PGP SIGNATURE-----
Mike Westerhof - Jan. 3, 2011, 1:03 a.m.
On 1/2/2011 11:41 AM, Koen Kooi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 02-01-11 16:15, Mike Westerhof wrote:
>> Break the two shared libraries (libe2p and libext2fs) out of the general e2fsprogs
>> package and into their own packages.  This avoids pulling in unwanted executables
>> when a distro only desires the basic tools (such as e2fsck and/or mke2fs).
>>
>> Signed-off-by: Mike Westerhof <mike@mwester.net>
> 
> Recipes with e2fsprogs in DEPENDS will need a PR bump as well, since
> they might link to these libs as well. This will result in missing
> libraries when using package feeds.

Ok, I can do that.  But I'm not sure I understand why this is the case.
 OE detects the dependencies on the shared libs, and automagically adds
the necessary dependencies to the opkg control file.  Hence, if opkg on
a device updates "e2fsprogs", it will see that the new version of
"e2fsprogs" depends on the two new libraries, and it should pull those
in from the feeds as well.

Perhaps a use-case that will fail will help me understand, and
consequently, help me put together a more-correct patch.

Thanks,
-Mike (mwester)


> regards,
> 
> Koen
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Darwin)
> 
> iD8DBQFNILjgMkyGM64RGpERAl63AJ9d+oy10QAFluRD89/YB6g9ircOuwCfXljo
> L2xm9I2E6/rkDke1UFvCG9c=
> =Xptt
> -----END PGP SIGNATURE-----
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> 
>
Koen Kooi - Jan. 3, 2011, 7:49 a.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03-01-11 02:03, Mike Westerhof wrote:
> On 1/2/2011 11:41 AM, Koen Kooi wrote:
> On 02-01-11 16:15, Mike Westerhof wrote:
>>>> Break the two shared libraries (libe2p and libext2fs) out of the general e2fsprogs
>>>> package and into their own packages.  This avoids pulling in unwanted executables
>>>> when a distro only desires the basic tools (such as e2fsck and/or mke2fs).
>>>>
>>>> Signed-off-by: Mike Westerhof <mike@mwester.net>
> 
> Recipes with e2fsprogs in DEPENDS will need a PR bump as well, since
> they might link to these libs as well. This will result in missing
> libraries when using package feeds.
> 
>> Ok, I can do that.  But I'm not sure I understand why this is the case.
>>  OE detects the dependencies on the shared libs, and automagically adds
>> the necessary dependencies to the opkg control file.  Hence, if opkg on
>> a device updates "e2fsprogs", it will see that the new version of
>> "e2fsprogs" depends on the two new libraries, and it should pull those
>> in from the feeds as well.
> 
>> Perhaps a use-case that will fail will help me understand, and
>> consequently, help me put together a more-correct patch.

Say you have built gparted which (r)depends on e2fsprogs and links to
libe2p. After this patch the "old" gparted in the feeds will only pull
in e2fsprogs and not libe2p.
If the e2fsprogs package rdepends on libe2p and friends this isn't a
problem, but if it doesn't you'll get spurious libs. This has happened a
number of times in the past and I'd like to avoid it happening in the
future :)

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFNIX+IMkyGM64RGpERAocMAKCNlUquJdgA123i1BMNnd3ujNX31QCdFEMq
MJ2FPNrTiy83dOjrCb3BtZ0=
=CJpP
-----END PGP SIGNATURE-----
Mike Westerhof - Jan. 4, 2011, 4:39 a.m.
On 1/3/2011 1:49 AM, Koen Kooi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 03-01-11 02:03, Mike Westerhof wrote:
>> On 1/2/2011 11:41 AM, Koen Kooi wrote:
>> On 02-01-11 16:15, Mike Westerhof wrote:
>>>>> Break the two shared libraries (libe2p and libext2fs) out of the general e2fsprogs
>>>>> package and into their own packages.  This avoids pulling in unwanted executables
>>>>> when a distro only desires the basic tools (such as e2fsck and/or mke2fs).
>>>>>
>>>>> Signed-off-by: Mike Westerhof <mike@mwester.net>
>>
>> Recipes with e2fsprogs in DEPENDS will need a PR bump as well, since
>> they might link to these libs as well. This will result in missing
>> libraries when using package feeds.
>>
>>> Ok, I can do that.  But I'm not sure I understand why this is the case.
>>>  OE detects the dependencies on the shared libs, and automagically adds
>>> the necessary dependencies to the opkg control file.  Hence, if opkg on
>>> a device updates "e2fsprogs", it will see that the new version of
>>> "e2fsprogs" depends on the two new libraries, and it should pull those
>>> in from the feeds as well.
>>
>>> Perhaps a use-case that will fail will help me understand, and
>>> consequently, help me put together a more-correct patch.
> 
> Say you have built gparted which (r)depends on e2fsprogs and links to
> libe2p. After this patch the "old" gparted in the feeds will only pull
> in e2fsprogs and not libe2p.
> If the e2fsprogs package rdepends on libe2p and friends this isn't a
> problem, but if it doesn't you'll get spurious libs. This has happened a
> number of times in the past and I'd like to avoid it happening in the
> future :)

Got it.  So here's the pertinent line from the control file in the
e2fsck ipk:

"Depends: util-linux-ng, e2fsprogs-badblocks, libext2fs2, libcom-err2,
libe2p2, libuuid1, libc6, libgcc1, libss2, libblkid1"

Both new library packages (libext2fs2 and libe2p2) are present and will
be pulled in by opkg, so no other packages will require PR bumps.

> regards,
> 
> Koen

-Mike (mwester)
Koen Kooi - Jan. 4, 2011, 8:18 a.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04-01-11 05:39, Mike Westerhof wrote:
> On 1/3/2011 1:49 AM, Koen Kooi wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 03-01-11 02:03, Mike Westerhof wrote:
>>> On 1/2/2011 11:41 AM, Koen Kooi wrote:
>>> On 02-01-11 16:15, Mike Westerhof wrote:
>>>>>> Break the two shared libraries (libe2p and libext2fs) out of the general e2fsprogs
>>>>>> package and into their own packages.  This avoids pulling in unwanted executables
>>>>>> when a distro only desires the basic tools (such as e2fsck and/or mke2fs).
>>>>>>
>>>>>> Signed-off-by: Mike Westerhof <mike@mwester.net>
>>>
>>> Recipes with e2fsprogs in DEPENDS will need a PR bump as well, since
>>> they might link to these libs as well. This will result in missing
>>> libraries when using package feeds.
>>>
>>>> Ok, I can do that.  But I'm not sure I understand why this is the case.
>>>>  OE detects the dependencies on the shared libs, and automagically adds
>>>> the necessary dependencies to the opkg control file.  Hence, if opkg on
>>>> a device updates "e2fsprogs", it will see that the new version of
>>>> "e2fsprogs" depends on the two new libraries, and it should pull those
>>>> in from the feeds as well.
>>>
>>>> Perhaps a use-case that will fail will help me understand, and
>>>> consequently, help me put together a more-correct patch.
>>
>> Say you have built gparted which (r)depends on e2fsprogs and links to
>> libe2p. After this patch the "old" gparted in the feeds will only pull
>> in e2fsprogs and not libe2p.
>> If the e2fsprogs package rdepends on libe2p and friends this isn't a
>> problem, but if it doesn't you'll get spurious libs. This has happened a
>> number of times in the past and I'd like to avoid it happening in the
>> future :)
> 
> Got it.  So here's the pertinent line from the control file in the
> e2fsck ipk:
> 
> "Depends: util-linux-ng, e2fsprogs-badblocks, libext2fs2, libcom-err2,
> libe2p2, libuuid1, libc6, libgcc1, libss2, libblkid1"
> 
> Both new library packages (libext2fs2 and libe2p2) are present and will
> be pulled in by opkg, so no other packages will require PR bumps.

Awesome! Thanks for checking.

Acked-by: Koen Kooi <koen@openembedded.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFNItfZMkyGM64RGpERAvCLAKC9BjKNaH7OCwb+zCLTa383UpGJ7ACgpJrR
Nm9ZRWgWzxEdXMInxccB3yE=
=TyUM
-----END PGP SIGNATURE-----

Patch

diff --git a/recipes/e2fsprogs/e2fsprogs.inc b/recipes/e2fsprogs/e2fsprogs.inc
index ae5dbc7..34b9950 100644
--- a/recipes/e2fsprogs/e2fsprogs.inc
+++ b/recipes/e2fsprogs/e2fsprogs.inc
@@ -9,7 +9,7 @@  SRC_URI = "${SOURCEFORGE_MIRROR}/e2fsprogs/e2fsprogs-${PV}.tar.gz"
 
 S = "${WORKDIR}/e2fsprogs-${PV}"
 
-INC_PR = "r27"
+INC_PR = "r28"
 
 inherit autotools
 
@@ -109,11 +109,14 @@  RDEPENDS_e2fsprogs = "util-linux-ng e2fsprogs-badblocks"
 FILES_${PN} += "${libdir}/e2initrd_helper"
 
 PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks libcomerr libss"
+PACKAGES =+ "libe2p libext2fs"
 FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck.${PN} ${base_sbindir}/fsck.ext*.${PN}"
 FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs.${PN} ${base_sbindir}/mkfs.ext*.${PN}"
 FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label ${base_sbindir}/findfs"
 FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
 FILES_libcomerr = "${libdir}/libcom_err.so.*"
 FILES_libss = "${libdir}/libss.so.*"
+FILES_libe2p = "${libdir}/libe2p.so.*"
+FILES_libext2fs = "${libdir}/e2initrd_helper ${libdir}/libext2fs.so.*"
 
 BBCLASSEXTEND = "native"