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

bug: unique archive directory resulting from untar not detected when there are hidden files from aside #48

Closed
fpruvost opened this issue Jun 1, 2015 · 2 comments

Comments

@fpruvost
Copy link
Contributor

fpruvost commented Jun 1, 2015

I have a very specific problem trying to install a package on Linux.

I want to install magma from ICL http://icl.cs.utk.edu/magma/software/index.html
but it seems that the build is not done in the good directory.
Generally, when we untar a tarball, say magma-1.6.2.tar.gz, the resulting directory magma-1.6.2/ is at the same level, but in my case a folder named spack-expanded-archive/ is created and the build is done in it where the source code is actually in a lower stage in spack-expanded-archive/magma-1.6.2/.
Of course there is no Makefile in spack-expanded-archive/ but it is in spack-expanded-archive/magma-1.6.2/.

As Todd has explained, the algorithm in Spack when untaring before building is the following:

  1. download the tarball. Stage directory looks like this:
    archive.tar.gz
  2. make a spack-expanded-archive directory
    archive.tar.gz
    spack-expanded-archive/
  3. expand the archive in the new directory
    archive.tar.gz
    spack-expanded-archive/
    archive/
  4. If only ONE directory is created, move that to the top level like this, and remove the temp directory:
    archive.tar.gz
    archive/
  5. If there is more than one file created, or if the created file is not a directory, Spack just leaves the temp directory:
    archive.tar.gz
    spack-expanded-archive/
    Makefile
    src/
    etc...

In my case, the result of
tar xf http://icl.cs.utk.edu/projectsfiles/magma/downloads/magma-1.6.2.tar.gz
is a hidden file ._magma-1.6.2* and the expected directory magma-1.6.2/
so that we are not in step 4 of the algorithm anymore and Spack try to build in spack-expanded-archive/ where there is no Makefile file of course.

Maybe hidden files should be ignored when the algorithm choose whether or not it faces a crappy tarball.

tgamblin added a commit that referenced this issue Jun 1, 2015
- Expanding archvies like MAGMA 1.6.2 creates extra hidden files that
  confuse Spack's staging mechanism.

- Added a special case to ignore hidden files when checking whether
  the tarball exploded.
@tgamblin
Copy link
Member

tgamblin commented Jun 1, 2015

Florent: see if the fix I just committed works. If it does, then I'll merge this into develop

@tgamblin
Copy link
Member

tgamblin commented Jun 1, 2015

From Florent:

Yes it fixes the problem
Thanks

Le 01/06/2015 19:26, Todd Gamblin a écrit :
Florent: see if the fix I just committed works. If it does, then I'll merge this into develop

—
Reply to this email directly or view it on GitHub.

merging to develop...

@tgamblin tgamblin closed this as completed Jun 1, 2015
tgamblin pushed a commit that referenced this issue Jul 1, 2019
This was originally removed from NERSC fork but is added back. The
assumption was that darshan and cray-libsci were being unloaded but
they were not. This should fix the import errors
greenc-FNAL pushed a commit to greenc-FNAL/spack that referenced this issue Oct 25, 2022
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@c84f382...c56af95)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

2 participants