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

treefile: Add exclude-packages #1980

Merged
merged 1 commit into from Feb 5, 2020

Conversation

cgwalters
Copy link
Member

In FCOS we have a kola test that basically does rpm -q python.
It's...a bit silly to spawn a whole VM for this. Ensuring that
some specific packages don't get included has come up in a few
cases.

I think FCOS/RHCOS at least will want to blacklist dnf for example.
And as noted above, FCOS could blacklist python.

One major benefit of doing this inside rpm-ostree is that one
gets the full "libsolv error message experience" when dependency
resolution fails, e.g. blacklisting glibc I get:

 Problem 79: conflicting requests
  - package coreos-installer-systemd-0.1.2-1.fc31.x86_64 requires coreos-installer = 0.1.2-1.fc31, but none of the providers can be installed
  - package coreos-installer-0.1.2-1.fc31.x86_64 requires rtld(GNU_HASH), but none of the providers can be installed
  - package glibc-2.30-10.fc31.x86_64 is filtered out by exclude filtering
  - package glibc-2.30-7.fc31.x86_64 is filtered out by exclude filtering
  - package glibc-2.30-8.fc31.x86_64 is filtered out by exclude filtering
  - package glibc-2.30-5.fc31.i686 is filtered out by exclude filtering
  - package glibc-2.30-5.fc31.x86_64 is filtered out by exclude filtering
  - package glibc-2.30-10.fc31.i686 is filtered out by exclude filtering

@cgwalters
Copy link
Member Author

Tested this locally but still WIP to add a test that a compose fails with this. And also needs docs - before I write those let's bikeshed on naming etc.

@cgwalters cgwalters changed the title WIP: treefile: Add package-blacklist treefile: Add package-blacklist Feb 5, 2020
@lucab
Copy link
Contributor

lucab commented Feb 5, 2020

I remember talking about this with @jlebon. Looking a bit around, I found these prior discussions:

If you are looking for feedback on naming, I'd personally go for something which is aligned with the underlying libdnf feature (i.e. containing exclude somewhere in the name).

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments, but LGTM overall!

tests/compose/test-blacklist.sh Outdated Show resolved Hide resolved
src/libpriv/rpmostree-core.c Show resolved Hide resolved
docs/manual/treefile.md Outdated Show resolved Hide resolved
@jlebon jlebon changed the title treefile: Add package-blacklist treefile: Add exclude-packages Feb 5, 2020
@jlebon
Copy link
Member

jlebon commented Feb 5, 2020

/lgtm

In FCOS we have a kola test that basically does `rpm -q python`.
It's...a bit silly to spawn a whole VM for this.  Ensuring that
some specific packages don't get included has come up in a few
cases.

I think FCOS/RHCOS at least will want to blacklist `dnf` for example.
And as noted above, FCOS could blacklist `python`.

One major benefit of doing this inside rpm-ostree is that one
gets the full "libsolv error message experience" when dependency
resolution fails, e.g. blacklisting `glibc` I get:

```
 Problem 79: conflicting requests
  - package coreos-installer-systemd-0.1.2-1.fc31.x86_64 requires coreos-installer = 0.1.2-1.fc31, but none of the providers can be installed
  - package coreos-installer-0.1.2-1.fc31.x86_64 requires rtld(GNU_HASH), but none of the providers can be installed
  - package glibc-2.30-10.fc31.x86_64 is filtered out by exclude filtering
  - package glibc-2.30-7.fc31.x86_64 is filtered out by exclude filtering
  - package glibc-2.30-8.fc31.x86_64 is filtered out by exclude filtering
  - package glibc-2.30-5.fc31.i686 is filtered out by exclude filtering
  - package glibc-2.30-5.fc31.x86_64 is filtered out by exclude filtering
  - package glibc-2.30-10.fc31.i686 is filtered out by exclude filtering
```
@jlebon
Copy link
Member

jlebon commented Feb 5, 2020

/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 5a0d335 into coreos:master Feb 5, 2020
cgwalters added a commit to cgwalters/fedora-coreos-config that referenced this pull request Feb 7, 2020
This makes use of the new
coreos/rpm-ostree#1980

And we can then drop the test in kola that boots a whole VM
for this.
jlebon pushed a commit to coreos/fedora-coreos-config that referenced this pull request Feb 10, 2020
This makes use of the new
coreos/rpm-ostree#1980

And we can then drop the test in kola that boots a whole VM
for this.
jlebon pushed a commit to coreos/coreos-assembler that referenced this pull request Feb 11, 2020
We want to pull in the v2020.1 version of `rpm-ostree` for the
`exclude-packages` support[0].  @jlebon was nice enough to rebuild
`rpm-ostree` with that support in F30, so blow out the cache to make
sure we pick it up.

[0] coreos/rpm-ostree#1980
miabbott added a commit to coreos/coreos-assembler that referenced this pull request Feb 20, 2020
We want to pull in the v2020.1 version of `rpm-ostree` for the
`exclude-packages` support[0].  @jlebon was nice enough to rebuild
`rpm-ostree` with that support in F30, so blow out the cache to make
sure we pick it up.

[0] coreos/rpm-ostree#1980

(cherry picked from commit 1f0f61e)
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.

None yet

5 participants