[poppler] 2 uid/gid in source tarball since 0.60.0.

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Wed Dec 27 04:47:02 UTC 2017


Hi,

This is not a harmful issue. Since 0.60.0, the tarball
includes 2 uid/gid, like this.

...
-rw-rw-r-- root/root      1165 2017-10-03 06:29 poppler-0.60.0/utils/pdfunite.1
-rw-rw-r-- root/root     15943 2017-10-03 06:29 poppler-0.60.0/utils/pdfunite.cc
-rw-rw-r-- root/root      1167 2017-10-03 06:29
poppler-0.60.0/utils/printencodings.cc
-rw-rw-r-- root/root       854 2017-10-03 06:29
poppler-0.60.0/utils/printencodings.h
-rw-rw-r-- tsdgeos/tsdgeos 2089691 2017-10-03 06:45 poppler-0.60.0/ChangeLog
drwxrwxr-x tsdgeos/tsdgeos       0 2017-10-03 06:42
poppler-0.60.0/glib/reference/html/
-rw-rw-r-- tsdgeos/tsdgeos    9625 2017-10-03 06:42
poppler-0.60.0/glib/reference/html/PopplerColor.html
-rw-r--r-- tsdgeos/tsdgeos     186 2017-10-03 06:42
poppler-0.60.0/glib/reference/html/up.png
...

I found that this is because git-archive generates a
tarball with root:root, always.

# for detail, see
https://github.com/git/git/blob/936d1b989416a95f593bf81ccae8ac62cd83f279/archive-tar.c#L207

CMakeLists.txt's "dist" target appends some files
to the tarball generated by git-archive, like this.

...
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${POPPLER_VERSION})
add_custom_target(dist
    COMMAND
        COMMAND git log --stat | fmt --split-only > ${CMAKE_BINARY_DIR}/ChangeLog
        COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD >
${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar
        COMMAND tar -C ${CMAKE_BINARY_DIR} -rf
${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar ChangeLog --transform='s,,${ARCHIVE_NAME}/,'
        COMMAND tar -C ${CMAKE_BINARY_DIR} -rf
${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar glib/reference/html
--transform='s,,${ARCHIVE_NAME}/,'
        COMMAND xz -9 ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})

Usually "tar" would retain the original owner & group,
so the concatenated tarball would have 2 sections,
root:root and others.

Should git have some options to change the owner/group
from root:root? Or, the appended contents should be root:root?

For GNU tar, it is easy to set the owner/group manually
via command line option (maybe --owner root:0 --group root:0
would work), but other tar have different options, or
lack such features.

Considering that current CMakeLists.txt already uses an
option specific to GNU tar, --transform, addition of
more options specific to GNU tar would not be so harmful.

How do you think of?

1) git-archive should be improved.

2) CMakeLists.txt should be improved to harmonize owner/group
between the initial part and appendix, by using GNU tar
specific option.

3) Just keep as it is now, but the availability of GNU tar
should be checked, to avoid unexpected error by non-GNU tar.

4) CMakeLists.txt should be improved to work with other
variants of tar. It is important that owner/group issue.

Regards,
mpsuzuki



More information about the poppler mailing list