Package promise & chroot

16 views
Skip to first unread message

Ansgar Esztermann-Kirchner

unread,
Jan 16, 2018, 8:54:50 AM1/16/18
to help-c...@googlegroups.com
Hello everyone,

both yum and rpm support the notion of installation inside a chroot
(via --installroot and -r, repectively). I've tried to modify a copy
of modules/packages/yum to that end, passing in the chroot path via
the options directive.
However, it seems as though at least the list-updates API call does
not receive my options (the docs only mention supports-api-version as
an exception). Is that correct?

Also, although this is just a minor annoyance,

body package_module yum_chroot(installroot)
{
default_options => { "$(installroot)" };
}

packages:
"blah"
policy => "present",
package_module => yum_chroot("/images/my_image");

does not seem to work: instead of the proper path, the literal
"$(installroot)" is passed to the module.

A.

--
Ansgar Esztermann
Sysadmin
http://www.mpibpc.mpg.de/grubmueller/esztermann

Nick Anderson

unread,
Jan 16, 2018, 3:47:12 PM1/16/18
to Ansgar Esztermann-Kirchner, help-c...@googlegroups.com

Ansgar Esztermann-Kirchner <ansgar.e...@mpibpc.mpg.de>
writes:

> Hello everyone,
>
> both yum and rpm support the notion of installation inside a
> chroot
> (via --installroot and -r, repectively). I've tried to modify a
> copy
> of modules/packages/yum to that end, passing in the chroot path
> via
> the options directive.
> However, it seems as though at least the list-updates API call
> does
> not receive my options (the docs only mention
> supports-api-version as
> an exception). Is that correct?

I think that support for options in the yum module is not yet
present. But there is a Pull Request for adding support for the
enablerepo and disable repo options.

https://github.com/cfengine/masterfiles/pull/1014

Perhaps the changes in that PR are useful for your modifications.

> Also, although this is just a minor annoyance,
>
> body package_module yum_chroot(installroot)
> {
> default_options => { "$(installroot)" };
> }
>
> packages:
> "blah"
> policy => "present",
> package_module => yum_chroot("/images/my_image");
>
> does not seem to work: instead of the proper path, the literal
> "$(installroot)" is passed to the module.

Humm, this should probably be reported to the issue tracker. It is
similar to CFE-2103 which is a feature request to add the ability
to specify a specific package module name to use from the package
module body.

https://tracker.mender.io/browse/CFE-2103

--
Nick Anderson
Doer of things, CFEngine
Reply all
Reply to author
Forward
0 new messages