-
Notifications
You must be signed in to change notification settings - Fork 197
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
packaging/rpm-ostree.spec: Update to sync with rawhide #5047
Conversation
@@ -132,12 +138,11 @@ Requires: librepo%{?_isa} >= %{librepo_version} | |||
# rpm-ostree wraps more of ostree (such as `ostree admin unlock` etc.) | |||
Requires: ostree | |||
Requires: bubblewrap | |||
Requires: fuse | |||
Requires: fuse3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to come from https://src.fedoraproject.org/rpms/rpm-ostree/c/3c602a23787fd2df873c0b18df3133c9fec4b66a, but the reasoning there is not sufficient.
OSTree already lists its fuse dependencies as needed. git archeology shows the fuse here is because we call fusermount -u
: #443.
fuse3
ships fusermount3
and I'm not sure if they're supposed to be interchangeable for unmount purposes (though I would assume it mostly boils down to a umount()
syscall) but clearly using fusermount -u
to unmount a FUSE mount from rofiles-fuse (compiled with libfuse3) has been working for a while, ever since we started compiling ostree in Fedora against libfuse3.
Hmm, wonder if this is the root cause of coreos/coreos-assembler#3848 somehow; maybe that mismatch stopped working recently?
Anyway, I think ideally there'd be an rofiles-fuse -u
which would just proxy to the right fusermount
vs fusermount3
based on compiled options. Barring that, in practice I think this is fine, but we should probably change our code to use fusermount3 -u
also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, wonder if this is the root cause of coreos/coreos-assembler#3848 somehow; maybe that mismatch stopped working recently?
At least testing locally with latest fuse bits, it seems to work fine to unmount with fusermount -u
an rofiles-fuse mount, so maybe not.
But still, we need the Requires here to agree with the actual binary we use in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, definitely a mess here...a perfect example of the pitfalls of trying to maintain spec files upstream.
A larger fix of course is for us to just stop using rofiles-fuse (and go with overlayfs, but...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this break if we explicitly call fusermount
as the fuse3
package does not provide such a binary?
We should likely revert that change until we've moved the logic in rpm-ostree to try both fuse2 and fuse3 (or add a wrapper).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this break if we explicitly call
fusermount
as thefuse3
package does not provide such a binary?
Yup, this is what I meant higher up with:
we need the Requires here to agree with the actual binary we use in the code.
I think rather than reverting, it makes more sense to just plow forward and move over to the v3 version. Pushed a commit for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, definitely a mess here...a perfect example of the pitfalls of trying to maintain spec files upstream.
Yeah, I'd be OK revisiting that. Historically, the canonical version lived here because it often required changes along with upstream changes (e.g. bundled libdnf deps). Since now things are calmer, it might make sense to just move it back to dist-git.
rofiles-fuse is now built against libfuse3 on all the platforms we care about in rpm-ostree. Accordingly also switch over the fusermount utility we use to the v3 version to match. This also allows composes to drop out libfuse2 if nothing else pulls it in. See also: coreos#5047 (comment)
rofiles-fuse is now built against libfuse3 on all the platforms we care about in rpm-ostree. Accordingly also switch over the fusermount utility we use to the v3 version to match. This also allows composes to drop out libfuse2 if nothing else pulls it in. See also: coreos#5047 (comment)
@@ -268,5 +273,4 @@ fi | |||
%files devel -f files.devel | |||
|
|||
%changelog | |||
* Thu Nov 17 2022 Colin Walters <walters@verbum.org> - 2022.15-3 | |||
- Dummy change to satisfy rpm timestamp clamping | |||
%autochangelog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vaguely remember that breaking some things with copr repos. Might have to look if this works with our continuous copr builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this comment:
https://fedoramagazine.org/use-rpmautospec-in-fedora-linux/#comment-550158
from a year ago hopefully now it's good 🤞
I think this is actually needed now to unbreak CI: #5069 (comment) |
I just changed it back to |
Ohhh I finally see now:
OK and we're actually explicitly turning off network. Now I understand this isn't just a flake. Hmm, we should clearly make that a hard error instead, at least for the cosa case. Adding |
I'm so confused by this though still...we still Anyways yes I see: So I guess yes we just need to update to fuse3 here. |
Yup, I had pushed a commit to do that. I'm saying we should match the libfuse version that rofiles-fuse uses. |
I don't see an updated commit? |
OK though what really needs to be done here is to upstream make the spec use distribution conditionals, which is what we should have done from the start to help us maintain a single spec |
Hmm do we really even need this dependency at all? Today the ostree package has |
OK my MRs-for-dist-git aren't set up, any objections to me pushing this to fedora and here?
|
lgtm, I'll update it here. |
Had a chat with @jmarrero and @cgwalters on this. There was agreement that ideally, there'd be an
|
Maybe...but hold up, I think this may just be Fedora packaging fuse in a broken way. At least looking at e.g. ubuntu, they have a lib fuse for each of 2 and 3 but only a single |
We have been building with fuse but changed to fuse3 on: https://src.fedoraproject.org/rpms/rpm-ostree/c/3c602a23787fd2df873c0b18df3133c9fec4b66a However our code is just calling fuse's fusermount. We are updating our spec and code based on the discusion on: coreos#5047 Co-authored-by: Colin Walters <walters@verbum.org>
I am confused why the CI failed with can not download
|
packaging/rpm-ostree.spec
Outdated
# However our code is just calling fuse's fusermount. | ||
# We are updating our spec and code based on the discusion on: | ||
# https://github.com/coreos/rpm-ostree/pull/5047 | ||
%if 0%{?el} <= 9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this conditional is right...I suspect it's evaluating to true on fedora too and that's why we're hitting this bug still.
I think it may need to be e.g.
%if 0%{?rhel} && 0%{?el} <= 9
or so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/search?q=+0%25%7B%3Fel%7D&type=code
I see people doing:
%if 0%{?el} >= 6 || 0%{?rhel} >= 6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, trying your conditional in this push.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something is still weird with the conditional:
https://gitlab.com/redhat/centos-stream/rpms/rpm-ostree/-/merge_requests/57#note_2093239477
I don't get why... maybe switching this around to:
%if 0%{?fedora} || 0%{?rhel} > 9 || 0%{?el} > 9
Requires: fuse3
%else
Requires: fuse
%endif
Would work... I am trying to find another rpm with an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently 0%{?rhel} should match the family of distros based on this: https://docs.fedoraproject.org/en-US/packaging-guidelines/DistTag/#_conditionals I wonder if the el
conditional is throwing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%if 0%{?fedora} || 0%{?rhel} > 9 || 0%{?el} > 9
Check on centos stream 9
, get %{?rhel}
-> 9, but get %{?el}
null. IMU, the condition LGTM.
$ podman run --rm -it quay.io/centos/centos:stream9 bash
[root@b7210efdfe5a /]# rpm --eval %{?rhel}
9
[root@b7210efdfe5a /]# rpm --eval %{?el}
We have been building with fuse but changed to fuse3 on: https://src.fedoraproject.org/rpms/rpm-ostree/c/3c602a23787fd2df873c0b18df3133c9fec4b66a However our code is just calling fuse's fusermount. We are updating our spec and code based on the discusion on: coreos#5047 Co-authored-by: Colin Walters <walters@verbum.org>
The specs between upstream, fedora and centos are out of sync. This attempts to sync it to restart using it as the source of truth.
We have been building with fuse but changed to fuse3 on: https://src.fedoraproject.org/rpms/rpm-ostree/c/3c602a23787fd2df873c0b18df3133c9fec4b66a However our code is just calling fuse's fusermount. We are updating our spec and code based on the discusion on: coreos#5047 Co-authored-by: Colin Walters <walters@verbum.org>
The specs between upstream, fedora and centos are out of sync. This attempts to sync it to restart using it as the source of truth.