You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by GitBox <gi...@apache.org> on 2021/02/05 10:05:41 UTC

[GitHub] [buildstream] BuildStream-Migration-Bot opened a new issue #1399: Hardlinks fuse mount breaks when script links files

BuildStream-Migration-Bot opened a new issue #1399:
URL: https://github.com/apache/buildstream/issues/1399


   [See original issue on GitLab](https://gitlab.com/BuildStream/buildstream/-/issues/1399)
   In GitLab by [[Gitlab user @valentindavid]](https://gitlab.com/valentindavid) on Oct 2, 2020, 09:22
   
   ## Summary
   
   [//]: # (Summarize the bug encountered concisely)
   
   The way hardlinks copies linked files does not work when the file is not readable.
   
   This was tested with 1.6.
   
   The use case covers unpacking cpio files and install rpm files, when there are linked files. Linked files in packages are quite common, specially in toolchain packages.
   
   ## Steps to reproduce
   
   [//]: # (How one can reproduce the issue - this is very important)
   
   Consider the following:
   
   ```
   kind: script
   
   build-depends:
   - freedesktop-sdk.bst:bootstrap-import.bst
   
   config:
     commands:
     - touch /a
     - chmod 0000 /a
     - ln /a /b
     - chmod 0755 /a
   ```
   
   This fails with:
   ```
   chmod 0755 /a
   chmod: changing permissions of '/a': Permission denied
   ```
   
   The reason is that the fuse fs wants to copy `/a`. But it is not readable.
   
   At no point did hardlinks have any reason to copy `/a`, because the file is safe as it does not link to the read only file.
   
   ## Possible fixes
   
   [//]: # (If you can, link to the line of code that might be responsible for the problem)
   
   Before copying a file with multiple links, we should make sure whether this file is safe. If it is, there is no reason to copy it. One way to know if a file is safe could be to add a special extended attribute to it.
   
   ## Other relevant information
   
   [//]: # (Add the BuildStream version. Substitute below the "x" by "1", "2" or the right version. Add more than one version if necessary)
   
   * BuildStream version affected: /milestone %"BuildStream_v1.6" 
   
   ----


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [buildstream] BuildStream-Migration-Bot commented on issue #1399: Hardlinks fuse mount breaks when script links files

Posted by GitBox <gi...@apache.org>.
BuildStream-Migration-Bot commented on issue #1399:
URL: https://github.com/apache/buildstream/issues/1399#issuecomment-773065057






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org