Closed elpiel closed 1 year ago
what makes you think that the file exists?
Otherwise you cannot build the application+ the quickstart app also has this line for the build-commands:
cargo --offline fetch --manifest-path Cargo.toml --verbose
@elpiel The quickstart example has the Cargo.toml
file inside the directory with the manifest, thus the source with path: "."
works fine. Without having a hint of what your source tree structure looks like, we can only guess what's wrong.
Hello again,
Thank you for spending time to answer my issue! Here are more details, I hope this is enough.
I'm starting to think that there is a problem with either the project (and the git submodules) or my flatpak installation,
Here's the structure of the project:
python3
(version 3.8) as a command $ python3 flatpak/flatpak-builder-tools/cargo/flatpak-cargo-generator.py Cargo.lock
$ flatpak-builder --repo=flatpak/stremio-flatpak-repo --force-clean flatpak/flatpak-build com.stremio.Service.json
- this is the place where I get the error
$ flatpak build-bundle flatpak/stremio-flatpak-repo flatpak/com.stremio.Service.flatpak com.stremio.Service master
.gitmodules
file:
[submodule "flatpak/flatpak-builder-tools"]
path = flatpak/flatpak-builder-tools
url = https://github.com/flatpak/flatpak-builder-tools
[submodule "flatpak/shared-modules"] path = flatpak/shared-modules url = https://github.com/flathub/shared-modules
`flatpak-builder-tools` was on `33e4e62` now I've updated it to `900a165` - same result.
`share-module` was on `4046709` and now is on `348c4fd` - same result.
I still get a warning when `flatpack-builder` is ran, which is for the `generated-sources.json` file:
(flatpak-builder:20233): flatpak-builder-WARNING **: 09:30:53.495: Unknown source type inline
(flatpak-builder:20233): Json-WARNING **: 09:30:53.496: Failed to deserialize "sources" property of type "gpointer" for an object of type "BuilderModule"
![Screenshot from 2023-01-17 09-22-28](https://user-images.githubusercontent.com/8925621/212834805-a4c4733a-ee9c-4dd9-bd82-76047211132c.png)
#### Update on quickstart
I tried running the quickstart example in this repo and I get the same issue:
.../service/flatpak/flatpak-builder-tools/cargo/quickstart$ flatpak-builder --force-clean flatpak/flatpak-build com.flatpak.quickstart.json
(flatpak-builder:22144): flatpak-builder-WARNING **: 09:37:16.909: Unknown source type inline
Running: cargo --offline fetch --manifest-path Cargo.toml --verbose
error: manifest path Cargo.toml
does not exist
Error: module quickstart: Child process exited with code 101
Mind you that I've updated the quickstart application manifest:
"runtime": "org.gnome.Platform",
"runtime-version": "43",
"sdk": "org.gnome.Sdk",
"sdk-extensions": ["org.freedesktop.Sdk.Extension.rust-stable"],
you should use the flatpak-builder available as a flatpak org.flatpak.Builder
. The one in your 3 year old Ubuntu is likely too old.
Using org.flatpak.Builder
got me further :tada: but I did get to yet another issue using the flatpak version of the builder.
Our build script needs access to internet as it has to download some binaries but the build script fails. It seems building in the sandboxed environment of the flatpak builder can't access the internet.
error: failed to run custom build command for `stremio-service v0.1.0 (/run/build/service)`
Caused by:
process didn't exit successfully: `/run/build/service/target/release/build/stremio-service-47e7e7633688b4e4/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-changed=src/
--- stderr
Error: reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("dl.strem.io")), port: None, path: "/four/master/server.js", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: Temporary failure in name resolution" })) }
warning: build failed, waiting for other jobs to finish...
Error: module service: Child process exited with code 101
build must be offline. if a crate tries to unconditionaly download something, it has to be fixed.
Closing as the initial problem is solved. Not a bug.
Thank you!
@elpiel The build-options.env
block in your manifest looks wrong. It should be an object, not an array.
Good catch! We actually use a json file, however, for the sake of testing and comments I rewrote it in yaml.
flatpak-builder version
1.0.10
Linux distribution and version
Ubuntu 20.04
Affected flatpak-builder tool
cargo/flatpak-cargo-generator.py
flatpak-builder tool cli args
No response
Source repository URL
No response
Flatpak-builder manifest URL
No response
Description
Based on the quickstart template I'm trying to build an app using a
buildsystem: simple
, the problem, however, is that every time it gets to thebuild-commands
it returns an error that theCargo.toml
file is not found...My manifest looks like this: