Can't figure out how to build flatpaks


I've noticed that someone created a flatpak build for one of my packages (feedreader), but it's horribly out of date: flatpak has 2.5.1 vs rpm has 2.7.0. I've been trying to update the flatpak build, but not much luck here. The documentation is pretty verbose, but seems to miss some crucial steps and nothing really works.

I've been following <a href="" title=""></a>

Specifically, I've typed the following commands:

# dnf install flatpak-module-tools fedmod

$ fedpkg clone modules/feedreader
$ cd feedreader
$ fedmod fetch-metadata

Up until here everything seems to check out and download correctly, but then when I do:

$ flatpak-module local-build --install
2019-01-31 17:11:52,388 - MainThread - moksha.hub - WARNING - Cannot find qpid python module. Make sure you have python-qpid installed.
Traceback (most recent call last):
File "/usr/bin/mbs-manager", line 11, in <module>
load_entry_point('module-build-service==2.12.2', 'console_scripts', 'mbs-manager')()
File "/usr/lib/python3.7/site-packages/module_build_service/", line 189, in manager_wrapper
File "/usr/lib/python3.7/site-packages/flask_script/", line 417, in run
result = self.handle(argv[0], argv[1:])
File "/usr/lib/python3.7/site-packages/flask_script/", line 386, in handle
res = handle(*args, **config)
File "/usr/lib/python3.7/site-packages/flask_script/", line 216, in __call__
return*args, **kwargs)
File "/usr/lib/python3.7/site-packages/module_build_service/", line 154, in build_module_locally
username, handle, str(stream), skiptests, optional_params)
File "/usr/lib/python3.7/site-packages/module_build_service/utils/", line 386, in submit_module_build_from_yaml
return submit_module_build(username, None, mmd, optional_params)
File "/usr/lib/python3.7/site-packages/module_build_service/utils/", line 486, in submit_module_build
mmds = generate_expanded_mmds(db.session, mmd, raise_if_stream_ambigous, default_streams)
File "/usr/lib/python3.7/site-packages/module_build_service/utils/", line 345, in generate_expanded_mmds
current_mmd, default_streams, raise_if_stream_ambigous)
File "/usr/lib/python3.7/site-packages/module_build_service/utils/", line 276, in get_mmds_required_by_module_recursively
module_build_service.errors.UnprocessableEntity: None of the base module (platform) streams in the buildrequires section could be found

error: mbs-manager build_module_locally failed
error: log: None

From this error message, it's unclear to me what I need to install. feedreader.yaml has:

- buildrequires:
flatpak-runtime: [f29]
flatpak-runtime: [f29]

so I've tried to do 'dnf install flatpak-runtime' but the package doesn't seem to be available.

Next, I thought I'd try building it in koji. Not sure how to do that, the docs are fairly vague, mentioning 'git push origin master' but I don't have anything really to push, the existing git doesn't seem to refer to package versions or anything. I figured that maybe it somehow magically connects it to dist-git rpms/feedreader and gets the sources there so I've tried just 'fedpkg module-build' without pushing anything to modules/flatpak, but that fails again with the familiar missing buildrequires error:

$ fedpkg module-build
Submitting the module build...
Could not execute module_build: The build failed with:
None of the base module (platform or bootstrap) streams in the buildrequires section could be found

Is the flatpak building actually working for anyone? What am I doing wrong? How do I specify what version to actually build?



Re: Can't figure out how to build flatpaks

By Owen Taylor at 02/01/2019 - 00:05

On Thu, Jan 31, 2019 at 12:23 PM Pete Walter <walter. ... at yandex dot com> wrote:
Thanks for trying it out, and sorry that you are having problems!

This is a poor error message. What it means is that your buildrequires
is missing:

platform: [f29]

(for other modules, you may want platform: [] to build against all
streams, but that doesn't make so much sense for Flatpaks, where a
single build will work on multiple Fedora versions.)

Requiring all modules to depend directly on platform instead of just
indirectly through (in this case, flatpak-runtime) is a change in MBS
as aof a few months ago, 'fedmod rpm2flatpak' will now add this
dependency automatically but the feedreader.yaml modulemd file is old.
You can run
'fedmod rpm2flatpak --force --flatpak-common --flathub=feedreader
feedreader' to update the files in modules/feedreader, and commit the
changes if they look good. (I've turned over modules/feedreader to you

These are module buildrequires, not package buildrequires. But as
above, it's just a really confusing error message.

If you look at feedreader.yaml, the different components have 'ref:
f29' - this means "use the f29 branch of dist-git/rpms/<foo>". The way
that the module-build-service works however, the *first time* a
particular git commit of modules/<foo> is done, the
module-build-service code freezes the versions of all components
remembers them if you try to build the same commit again. So building
again without a change would have built 2.5.1 again. A useful thing to
know is:

git commit --allow-empty -m "Rebuild for newer feedreader" ; git push origin

Note that you do need to fix up the platform dependency of
feedreader.yaml, so it's not important here.

Yes, that's the same error.

It is currently working, yes. And rebuilding it (with fixes) will
automatically use the latest versions of the branch. I'm trying to
work now on a small application to show a status page for the Flatpaks
in Fedora that will highlight cases where the RPMs are newer than
what's in the Flatpaks.


Re: Can't figure out how to build flatpaks

By Pete Walter at 02/01/2019 - 09:11

01.02.2019, 04:06, "Owen Taylor" < ... at redhat dot com>:
Thanks Owen! That was super helpful. Got it to build now and submitted the update to bodhi: <a href="" title=""></a>