flatpak / flatpak-builder

Tool to build flatpaks from source
GNU Lesser General Public License v2.1
139 stars 91 forks source link

Issue with tar under flatpak #324

Open mantielero opened 6 years ago

mantielero commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

flatpak-builder issues should go here

alexlarsson commented 6 years ago

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 commented 6 years ago

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

refi64 commented 4 years ago

This seems a lot like https://github.com/coreos/bugs/issues/1095 though here I don't see what would necessarily trigger this to occur.

On Tue, Nov 19, 2019, 10:32 PM mantielero notifications@github.com wrote:

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 https://www.code-aster.org/spip.php?article303. (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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/flatpak/flatpak-builder/issues/324?email_source=notifications&email_token=AAM4YSJU3EALJNCBDBO4OBTQUS4VFA5CNFSM4JPNEBI2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H2SCIXA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM4YSMSIDEFDIHHYZWP2BDQUS4VFANCNFSM4JPNEBIQ .