Cross-architecture package installs
kientzle at FreeBSD.org
Thu Feb 7 02:32:58 UTC 2013
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.
>> 1) Pre-install/post-install scripts.
>> 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
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 :(
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the freebsd-current