Re: Cross-architecture package installs
--Apple-Mail=_8C6A3E66-BC58-4C99-AC56-2A77AEEB7BCE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
On Feb 5, 2013, at 10:55 PM, Baptiste Daroussin wrote:
> On Tue, Feb 05, 2013 at 10:34:18PM -0800, Tim Kientzle wrote:
>> I'm working on tools to build ARM system images.
>> Usually, these tools run on x86, which creates a problem
>> for packages.
>=20
>> 1) Pre-install/post-install scripts.
>>=20
>> These obviously don't work since the DESTDIR
>> is for a different architecture.
> This is imho the main problem, and one of the long term goal of pkgng =
is to remove as much as possible any pre-instal/post-install scripts.
Here's an approach that would handle post-install fairly
graciously in this case. I'll presume you're cross-building
from x86 to ARM in this example:
* On x86, run "pkg -c $ARMSYS install <packages>"
* During install, record the post-install scripts in
the package database but don't run them.
* When the ARM system is first booted, an rc.d script
runs "pkg finish" (or "pkg install --some-option" if you prefer)
"pkg finish" finds the post-install scripts that have not yet
been run and runs them.
This way, the post-install scripts always run on the
native architecture.
This won't work for pre-install scripts, of course.
> The second problem you
> will get into is the API that call system()/exec()/etc for example all =
the call
> the pw_mkdb from libutil :(
>=20
> We are open for all suggestions here
A "first boot fixup" as above might handle some of these
cases. (Instead of running these commands immediately,
register them to run on next boot.)
For others, I think the only feasible option is to identify
them and get people to help push the necessary
functionality into libraries.
Tim
--Apple-Mail=_8C6A3E66-BC58-4C99-AC56-2A77AEEB7BCE
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
iQEcBAEBAgAGBQJRExJVAAoJEGMNyGo0rfFB+0wH+weesTJ4K1bguEfei4OJLPCx
empmVuDoPXdRvQN7c8RSfUJVB+9mcBVeknCcQj3gISvqd3BE7uW5kJPXg5wNZfzG
wTVQAR/olntYEtDbuT36Nsa4xTlFtnpyd7QEzTjqqfnkCX+/Izs7MO4tOLkcqtK+
boa+ny2zqWIPlZszDj5c2XoTHWZBjZY8mBBh/Lami1Ee15Qivies2S5VRzD+aYCb
p9affOExpfWu0UTyRvlfCiv+c7u5kja91d1bXkDLsVZOXeMlcU+CDslz52CyFVu3
hgfVcqG+nnbI4t14ScRQ3AYPhjkwDqJ3/RO5q1S459NTHLV81pqjz/RnIyI/Gyw=
=yFPx
-----END PGP SIGNATURE-----
--Apple-Mail=_8C6A3E66-BC58-4C99-AC56-2A77AEEB7BCE--
討論串 (同標題文章)
完整討論串 (本文為第 5 之 7 篇):