Skip to content
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

Extra data sources don't work #1830

Closed
agolybev opened this issue Jun 27, 2018 · 4 comments
Closed

Extra data sources don't work #1830

agolybev opened this issue Jun 27, 2018 · 4 comments

Comments

@agolybev
Copy link

Linux distribution and version

Ubuntu 16.04 (Same behavior on Ubuntu 18.04)

Flatpak version

Flatpak 0.99.1

Description of the problem

Extra data sources don't work. It seems to extra-data source isn't downloaded while building flatpak manifest. Download procedure is passed very quickly and an error occur when trying to access a downloaded resource. In the same time 'archive' source works properly with the same URL.
Flatpak project using extra data source can't be built:

Steps to reproduce

Store following manifest to com.example.Example.json

{
    "app-id": "com.example.Example",
    "runtime": "org.freedesktop.Platform",
    "runtime-version": "1.6",
    "sdk": "org.freedesktop.Sdk",
    "modules": [
        {
            "name": "example",
            "buildsystem": "simple",
            "build-commands": [
                "ls -l documentbuilder-x64.zip"
            ],
            "sources" : [
                {
                    "type": "extra-data",
                    "filename": "documentbuilder-x64.zip",
                    "url": "http://download.onlyoffice.com/install/desktop/docbuilder/documentbuilder-x64.zip",
                    "sha256": "c1eeb21e29308157acb89c7aaff73061aab239bb0fdda9a603e845f1185074d9",
                    "size": 174156507
                }
            ]
        }
    ]
}

build it with

flatpak-builder build-dir/ com.example.Example.json

My output

$ flatpak-builder build-dir/ com.example.Example.json
Downloading sources
Starting build of com.example.Example
Cache miss, checking out last cache hit
========================================================================
Building module example in /home/ubuntu/git/flatpak-desktopeditors/.flatpak-builder/build/example-7
========================================================================
Running: ls -l documentbuilder-x64.zip
ls: cannot access 'documentbuilder-x64.zip': No such file or directory
Error: module example: Child process exited with code 2
@hadess
Copy link
Contributor

hadess commented Jun 28, 2018

That's expected, extra-data is only downloaded when the Flatpak gets installed, not when it gets built. Use an archive type.

@agolybev
Copy link
Author

agolybev commented Jul 5, 2018

Hi @hadess, thank you for your response. Unfortunately archive type doesn't support deb package us an archive which I was going to use.

@barthalion
Copy link
Member

Use file type and then extract it manually in build-commands:

"ar -x file.deb",
"rm -f gitter.deb",
"tar -xf data.tar.gz",

@agolybev
Copy link
Author

agolybev commented Jul 6, 2018

Hi @barthalion, thank you for your suggestion. I didn't notice that file type source could be remote as an archive type. Thanks a lot.

@agolybev agolybev closed this as completed Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants