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

Issue with tar under flatpak #324

Open
mantielero opened this issue Jun 15, 2018 · 5 comments
Open

Issue with tar under flatpak #324

mantielero opened this issue Jun 15, 2018 · 5 comments

Comments

@mantielero
Copy link

ArchLinux 4.16.13-2-ARCH
Flatpak 0.11.8.2

Description of the problem

The build process using flatpak-builder fails while doing untar.

Steps to reproduce

I am trying to flatpak the software salome-meca. (This is my first time, so it might be my bad)

I am using the org.freedesktop.SalomeMeca.json:

{
   "app-id": "org.freedesktop.SalomeMeca",
   "runtime": "org.freedesktop.Platform",
   "runtime-version": "1.6",
   "sdk": "org.freedesktop.Sdk",
   "no-debuginfo" : true,
   "no-debuginfo-compression" : true,
   "finish-args": [
      "--share=ipc", "--socket=x11",
      "--socket=pulseaudio",
      "--share=network",
      "--device=all",
      "--filesystem=home"
   ],
   "modules": [
      {
         "name": "salome_meca",
         "no-autogen": true,
         "buildsystem": "simple",
         "build-commands": [
            "mkdir -p /app/bin",
            "tar xvf Salome-Meca-2017.0.2-LGPL-2.tgz",
            "rm -f Salome-Meca-2017.0.2-LGPL-2.tgz",
            "tail -n+748 Salome-Meca-2017.0.2-LGPL-2.run | tar xzv -C /app/bin --strip-components=1",
            "rm Salome-Meca-2017.0.2-LGPL-2.run"
         ],
         "sources": [
            {
               "type": "file",
               "url": "https://www.code-aster.org/FICHIERS/Salome-Meca-2017.0.2-LGPL-2.tgz",
               "sha256": "ed4a147b39269a08ae76bd4e2029fcf7330736715a2834003f5ddfccbe2b802f"
            }
         ]
      }
   ]
}

When I execute:

$ flatpak-builder --force-clean --build-only --extra-sources=~/src/flatpak/ --repo=repo build_dir org.freedesktop.SalomeMeca.json

It looks like the untar takes place properly, and then fails with the message:

[...]
V2017.0.2/prerequisites/Qwt-612/features/
V2017.0.2/prerequisites/Qwt-612/features/qwtconfig.pri
V2017.0.2/prerequisites/Qwt-612/features/qwtfunctions.pri
V2017.0.2/prerequisites/Qwt-612/features/.qwtconfig.pri.template
V2017.0.2/prerequisites/Qwt-612/features/qwt.prf
tar: prerequisites/Metis-40/lib: Directory renamed before its status could be extracted
tar: prerequisites/Metis-40: Directory renamed before its status could be extracted
tar: modules/YACS_V8_3_0/bin/salome/test/yacsloader: Directory renamed before its status could be extracted
tar: modules/YACS_V8_3_0/bin/salome/test/yacsloader_swig: Directory renamed before its status could be extracted
tar: modules/YACS_V8_3_0/bin/salome/test: Directory renamed before its status could be extracted
tar: modules/YACS_V8_3_0/bin/salome: Directory renamed before its status could be extracted
tar: modules/YACS_V8_3_0/bin: Directory renamed before its status could be extracted
tar: modules/YACS_V8_3_0: Directory renamed before its status could be extracted
tar: modules/ASTERSTUDY_201702/lib: Directory renamed before its status could be extracted
tar: modules/ASTERSTUDY_201702: Directory renamed before its status could be extracted
tar: modules: Directory renamed before its status could be extracted
tar: Exiting with failure status due to previous errors
Error: module salome_meca: El proceso hijo terminó con el código 2
@mantielero
Copy link
Author

It looks like this can be avoided using bsdtar. But I don't know this is would be a problem in flatpak, tar or somewhere else.
Just a though, including bsdtar in the Sdk might be a good idea.

@mwleeds
Copy link
Collaborator

mwleeds commented Jun 18, 2018

flatpak-builder issues should go here

@alexlarsson
Copy link
Member

flatpak-builder uses "tar" from the host to uncompress. You can maybe work around this by specifying the tgz as a "file" source instead and manually extracting it with bsdtar instead.

@alexlarsson
Copy link
Member

I believe this is caused by flatpak-builder using rofiles-fuse.

@matthiasclasen matthiasclasen transferred this issue from flatpak/flatpak Nov 20, 2019
@refi64
Copy link
Contributor

refi64 commented Nov 20, 2019 via email

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

4 participants