Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libpriv/scripts: Replace crypto-policies lua script #2136

Merged
merged 2 commits into from Jun 17, 2020

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Jun 17, 2020

The latest crypto-policies package changed recently to dynamically set
the policy at install time so that if FIPS is enabled, the selected
backend is FIPS:

https://src.fedoraproject.org/rpms/crypto-policies/c/9b9c9f7378c3fd375b9a08d5283c530a51a5de34?branch=master

This doesn't really make sense for us though since the compose server
configuration should be decoupled from the installroot. (More generally,
this also affects e.g. yum install --installroot).

Override the script for now so that we always select the DEFAULT
policy. We'll discuss with upstream to see what the right solution is
there.

This also works around the fact that rpm-ostree doesn't yet implement
Lua (#749).

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1847454
Resolves: coreos/fedora-coreos-tracker#540

The latest crypto-policies package changed recently to dynamically set
the policy at install time so that if FIPS is enabled, the selected
backend is `FIPS`:

https://src.fedoraproject.org/rpms/crypto-policies/c/9b9c9f7378c3fd375b9a08d5283c530a51a5de34?branch=master

This doesn't really make sense for us though since the compose server
configuration should be decoupled from the installroot. (More generally,
this also affects e.g. `yum install --installroot`).

Override the script for now so that we always select the `DEFAULT`
policy. We'll discuss with upstream to see what the right solution is
there.

This also works around the fact that rpm-ostree doesn't yet implement
Lua (coreos#749).

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1847454
Resolves: coreos/fedora-coreos-tracker#540
@jlebon
Copy link
Member Author

jlebon commented Jun 17, 2020

We'll discuss with upstream to see what the right solution is
there.

https://bugzilla.redhat.com/show_bug.cgi?id=1847454#c4

@jlebon
Copy link
Member Author

jlebon commented Jun 17, 2020

To be explicit: I think the main issue here is that the behaviour expressed by the scriptlet doesn't match our model. So even if we did support lua, I think we'd probably want to tweak it.

The CoreOS CI shared lib sets `HOME` to the workspace:

coreos/coreos-ci-lib@a81bfab

and there's no easy way for it to detect when `HOME` is correctly set:

coreos/coreos-ci-lib@8574f04
coreos/coreos-ci-lib@853d5fd

For now, just work around this until we have a cleaner solution. (Though
it makes sense overall to uses `$HOME` anyway instead of hardcoding
`/root`).
@cgwalters
Copy link
Member

/lgtm

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, jlebon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 8e63215 into coreos:master Jun 17, 2020
@jlebon jlebon deleted the pr/crypto-policies-script branch April 23, 2023 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crypto-policies pinned to avoid Lua script
4 participants