RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1476905 - Fix bundling of libostree
Summary: Fix bundling of libostree
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: flatpak
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: David King
QA Contact: Desktop QE
Tomas Capek
URL:
Whiteboard:
: 1484845 (view as bug list)
Depends On:
Blocks: 1499665
TreeView+ depends on / blocked
 
Reported: 2017-07-31 18:48 UTC by Colin Walters
Modified: 2018-04-10 12:54 UTC (History)
12 users (show)

Fixed In Version: flatpak-0.8.8-2.el7
Doc Type: Known Issue
Doc Text:
Incorrect dependency in _flatpak_ Due to a wrong dependency in the _flatpak_ package, the user can encounter the following error: flatpak: error while loading shared libraries: libostree-1.so.1: cannot open shared object file: No such file or directory To work around this problem, install the _flatpak-libs_ package. Alternatively, instead of initially installing just _flatpak_, install both of the packages by running: sudo yum -y install flatpak flatpak-libs
Clone Of:
: 1499665 (view as bug list)
Environment:
Last Closed: 2018-04-10 12:54:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
flatpak-bundling-7.4.patch (5.66 KB, patch)
2017-08-01 01:12 UTC, Colin Walters
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0767 0 None None None 2018-04-10 12:54:49 UTC

Description Colin Walters 2017-07-31 18:48:17 UTC
Right now flatpak carries
/usr/lib64/libostree-1.so.1 -> /usr/lib64/libostree-flatpak-1.so.1.0.0
which is going to break if the Extras repo is enabled.

Another consequence of this is that flatpak both Provides and Requires libostree-1.so.1(LIBOSTREE_2017.2)(64bit) etc.

We need to fix this by moving it into /usr/lib64/flatpak, set up the -rpath to point there, and using RPM provides filtering to ensure we don't provide it.  Compare with what rpm-ostree does for libdnf.

Comment 2 Colin Walters 2017-07-31 19:11:36 UTC
For anyone hitting this:

flatpak: error while loading shared libraries: libostree-1.so.1: cannot open shared object file: No such file or directory

The workaround is to:

yum -y install flatpak-libs

Or alternatively, everywhere you want to install flatpak, do instead:

sudo yum -y install flatpak flatpak-libs

I reproduced this on a Workstation install by doing:

$ sudo yum -y remove flatpak{,-libs}
$ ldconfig
$ sudo yum -y install flatpak
$ flatpak --help
flatpak: error while loading shared libraries: libostree-1.so.1: cannot open shared object file: No such file or directory
$ sudo yum -y install flatpak-libs
$ flatpak --help
  (works)

(The need to run `ldconfig` after removing it to reproduce things took
 me a while to understand, and only adds extra confusion here)

Comment 3 Colin Walters 2017-08-01 01:12:58 UTC
Created attachment 1307322 [details]
flatpak-bundling-7.4.patch

There are two patches here; one to work around an RPM build bug around versioned docdir.

The second is all of the fixes for bundling libostree.  I verified that things work both with and without ostree from Extras, and that `yum install flatpak` pulls in flatpak-libs.  I was a bit surprised to learn that /usr/bin/flatpak doesn't link against libflatpak.

Comment 5 Kalev Lember 2017-08-02 09:28:13 UTC
The patch look good to me. Thanks for the fixes, Colin! Also +1 from Alex (we're at GUADEC) who was the one who set up the libostree bundling in flatpak.

Will you take care of the builds too?

Comment 6 Jiri Koten 2017-08-25 12:36:12 UTC
*** Bug 1484845 has been marked as a duplicate of this bug. ***

Comment 10 Jeff MAURY 2017-10-23 12:47:08 UTC
It seems not be enough.
Adding flatpak-libs fixes the flatpak or flatpak --help
But I tried to run the following command:

sudo flatpak remote-add --if-not-exists eclipse https://fedorapeople.org/~mbooth/flatpak/eclipse.flatpakrepo

and got the response:
flatpak: symbol lookup error: flatpak: undefined symbol: g_strv_contains

Comment 11 Jiri Koten 2017-10-23 12:58:55 UTC
(In reply to Jeff MAURY from comment #10)
> It seems not be enough.
> Adding flatpak-libs fixes the flatpak or flatpak --help
> But I tried to run the following command:
> 
> sudo flatpak remote-add --if-not-exists eclipse
> https://fedorapeople.org/~mbooth/flatpak/eclipse.flatpakrepo
> 
> and got the response:
> flatpak: symbol lookup error: flatpak: undefined symbol: g_strv_contains

Can you please provide pkg version you have installed? The fix for bundled libsotree is in flatpak-0.8.7-2.el7_4 for rhel-7.4 ZStream and in flatpak-0.8.7-3.el7 for upcoming rhel-7.5.

Comment 12 Jeff MAURY 2017-10-23 13:26:40 UTC
I'm on RHEL 7.2 so flatpak is 0.8.7-1.el7

Comment 13 Jiri Koten 2017-10-23 13:33:21 UTC
(In reply to Jeff MAURY from comment #12)
> I'm on RHEL 7.2 so flatpak is 0.8.7-1.el7

That's strange, flatpak was a new pkg in rhel-7.4, so I'd guess that's actually the release you are using. Anyway you can wait for the ZStream update (due 2017-Nov-30) or install any of the pkgs mentioned in c#11.

To be clear there is more to the fix, than just adding hard deps. on flatpak-libs.

Comment 14 Jeff MAURY 2017-10-23 13:43:19 UTC
Only 0.8.7-1.el7 is available through rhel-7-server-rpms/7Server/x86_64

Comment 20 errata-xmlrpc 2018-04-10 12:54:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0767


Note You need to log in before you can comment on or make changes to this bug.