[Rpm-maint] [rpm-software-management/rpm] fix rpmbuild failure because of wrong symlink length on some filesystems (#1740)

skysley notifications at github.com
Wed Jun 30 12:29:59 UTC 2021


#### Reference Issues

#1682

#### What does this fix?

The man page of `stat()` mentions that for symbolic links the length of the pointed-to path is stored in `stat.st_size`.  However, as reported [here](https://github.com/rpm-software-management/rpm/issues/1682) and [here](https://github.com/google/fscrypt/issues/305) on some filesystems `stat.st_size` does not equal the length of the path that the symbolic link points to (e.g., in an fscrypt-encrypted directory).

Although this is not strictly a bug in rpmbuild, it would be nice to circumvent this problem in general. To this end, this patch tests for symbolic links and explicitly retrieves the length of the pointed-to path. This value is then stored in `stat.st_size`.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/1740

-- Commit Summary --

  * fix rpmbuild failure because of wrong symlink length on some filesystems

-- File Changes --

    M build/files.c (16)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/1740.patch
https://github.com/rpm-software-management/rpm/pull/1740.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1740
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210630/17a04daa/attachment.html>


More information about the Rpm-maint mailing list