#7 flatpak-module local-build can't download remote sources
Closed 4 years ago by zlopez. Opened 4 years ago by zlopez.

When building keepassxc flatpak using flatpak-module local-build I'm getting error when using remote source that the file doesn't exist.

Snippet from keepassxc.spec:

Name:           keepassxc
Version:        2.5.0
Release:        1%{?dist}
Summary:        Cross-platform password manager
License:        Boost and BSD and CC0 and GPLv3 and LGPLv2 and LGPLv2+ and LGPLv3+ and Public Domain
URL:            http://www.keepassxc.org/
Source0:      https://github.com/keepassxreboot/keepassxc/releases/download/%{version}/keepassxc-%{version}-src.tar.xz

The error in the build is following:

DEBUG: Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/keepassxc.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '
/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG: DEBUG: Unsharing. Flags: 134217728
DEBUG: error: Bad source: /builddir/build/SOURCES/keepassxc-2.5.0-src.tar.xz: No such file or directory
DEBUG: Building target platforms: x86_64
DEBUG: Building for target x86_64
DEBUG: Child return code was: 1
INFO: EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/mockbuild/trace_decorator.py", line 95, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.7/site-packages/mockbuild/util.py", line 746, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed: 
 # bash --login -c /usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/keepassxc.spec

NOTE:
This could be worked around by downloading the source to the folder where keepassxc.spec is located and changing the Source0 to local file, but this is not a solution.


Maybe you rebased local changes on top of a new fedora dist-git and the sources file got updated but you kept the old version in the spec file? 2.5.0 isn't the current version for f30 (2.5.1), f31, or rawhide (2.5.3). I don't think this is a flatpak-module-tools or MBS issue.

I rebased the to latest master and I'm still having the same issue:

error: Bad source: /builddir/build/SOURCES/keepassxc-2.5.3-src.tar.xz: No such file or directory

The link is:

Source0:      https://github.com/keepassxreboot/keepassxc/releases/download/%{version}/keepassxc-%{version}-src.tar.xz

When trying this link I'm able to download the source, but it doesn't work in flatpak-module local-build.

Only the trailing component of Source0 is ever going to be used by rpmbuild - the source needs to be present locally. In the fedora context, 'fedpkg sources' is what will download the source from the lookaside cache. Does your repo have a line:

SHA512 (keepassxc-2.5.3-src.tar.xz) = 8b1e3360b4ae5de170be6936291f7b309de09b2462fcd5a48f239c22f1c8b6ffe721aca8d1e9b6ae3881f7b16374850d7f4b809733244fd16d45eed6ad4f60c6

In the sources file?

I don't see any line like this in the spec file, but this is maintained by someone else.

I don't see any line like this in the spec file, but this is maintained by someone else.

Not spec file, sources file. Perhaps this would be better to work through on IRC or Google Chat? A lot of packages with similar content are building fine, so I don't think flatpak-module-tools per-se is the issue.

I'm off for today, but I will contact you on IRC tomorrow.

I'm closing this one, because it was only my missing knowledge about the packaging process. I didn't knew that you need to have sources locally and they aren't download from the source link automatically.

Metadata Update from @zlopez:
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata