https://bugs.kde.org/show_bug.cgi?id=443532

            Bug ID: 443532
           Summary: [PATCH] kde_package_app_templates makes tarballs
                    non-reproducible with GNU tar.
           Product: extra-cmake-modules
           Version: 5.86.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: ecm-bugs-n...@kde.org
          Reporter: m...@brendan.scot
  Target Milestone: ---

Created attachment 142288
  --> https://bugs.kde.org/attachment.cgi?id=142288&action=edit
Patch to make kde_package_app_templates reproducible.

SUMMARY
kde_package_app_templates embeds timestamps and GID's in tarballs with GNU tar. 

The attached patch fixes this in all the cases I observed.
Timestamp embedding should be fixed my the use of --mtime
GID, UID should be set to 0 with --owner=0 --group=0

STEPS TO REPRODUCE
1. Build any of the packages with templates such as below in Guix, or in some
build environment where the root GID can differ.
 - kio
 - akonadi
 - plasma-framework
 - krunner
 - kparts
 - ktexteditor
 - kirigami

OBSERVED RESULT
diffoscope output from building kio:


│ │ │ │   ---
/gnu/store/j83x88sa4967i4yndf6r7zwm2vz3xvnp-kio-5.86.0/share/kdevappwizard/templates/ioslave.tar.bz2
│ │ │ ├── +++
/gnu/store/j83x88sa4967i4yndf6r7zwm2vz3xvnp-kio-5.86.0-check/share/kdevappwizard/templates/ioslave.tar.bz2
│ │ │ │ ├── ioslave.tar
│ │ │ │ │ ├── file list
│ │ │ │ │ │ @@ -1,16 +1,16 @@
│ │ │ │ │ │ -drwxr-xr-x   0      999    30000        0 2021-10-08
19:25:03.199470 ./
│ │ │ │ │ │ --rw-r--r--   0      999    30000      651 1970-01-01
00:00:01.000000 ./CMakeLists.txt
│ │ │ │ │ │ -drwxr-xr-x   0      999    30000        0 1970-01-01
00:00:01.000000 ./LICENSES/
│ │ │ │ │ │ --rw-r--r--   0      999    30000    25906 1970-01-01
00:00:01.000000 ./LICENSES/LGPL-2.1-or-later.txt
│ │ │ │ │ │ --rwxr-xr-x   0      999    30000      121 1970-01-01
00:00:01.000000 ./Messages.sh
│ │ │ │ │ │ --rw-r--r--   0      999    30000     1498 1970-01-01
00:00:01.000000 ./README.md
│ │ │ │ │ │ --rwxr-xr-x   0      999    30000      487 1970-01-01
00:00:01.000000 ./install.sh
│ │ │ │ │ │ --rw-r--r--   0      999    30000       65 1970-01-01
00:00:01.000000 ./ioslave.kdevtemplate
│ │ │ │ │ │ -drwxr-xr-x   0      999    30000        0 1970-01-01
00:00:01.000000 ./src/
│ │ │ │ │ │ --rw-r--r--   0      999    30000     4630 1970-01-01
00:00:01.000000 ./src/%{APPNAMELC}.cpp
│ │ │ │ │ │ --rw-r--r--   0      999    30000      636 1970-01-01
00:00:01.000000 ./src/%{APPNAMELC}.h
│ │ │ │ │ │ --rw-r--r--   0      999    30000      905 1970-01-01
00:00:01.000000 ./src/CMakeLists.txt
│ │ │ │ │ │ --rw-r--r--   0      999    30000     2025 1970-01-01
00:00:01.000000 ./src/mydatasystem.cpp
│ │ │ │ │ │ --rw-r--r--   0      999    30000     1252 1970-01-01
00:00:01.000000 ./src/mydatasystem.h
│ │ │ │ │ │ --rw-r--r--   0      999    30000      415 1970-01-01
00:00:01.000000 ./src/myproto.json
│ │ │ │ │ │ --rwxr-xr-x   0      999    30000      138 1970-01-01
00:00:01.000000 ./uninstall.sh
│ │ │ │ │ │ +drwxr-xr-x   0      997    30000        0 2021-10-09
02:23:54.861213 ./
│ │ │ │ │ │ +-rw-r--r--   0      997    30000      651 1970-01-01
00:00:01.000000 ./CMakeLists.txt
│ │ │ │ │ │ +drwxr-xr-x   0      997    30000        0 1970-01-01
00:00:01.000000 ./LICENSES/
│ │ │ │ │ │ +-rw-r--r--   0      997    30000    25906 1970-01-01
00:00:01.000000 ./LICENSES/LGPL-2.1-or-later.txt
│ │ │ │ │ │ +-rwxr-xr-x   0      997    30000      121 1970-01-01
00:00:01.000000 ./Messages.sh
│ │ │ │ │ │ +-rw-r--r--   0      997    30000     1498 1970-01-01
00:00:01.000000 ./README.md
│ │ │ │ │ │ +-rwxr-xr-x   0      997    30000      487 1970-01-01
00:00:01.000000 ./install.sh
│ │ │ │ │ │ +-rw-r--r--   0      997    30000       65 1970-01-01
00:00:01.000000 ./ioslave.kdevtemplate
│ │ │ │ │ │ +drwxr-xr-x   0      997    30000        0 1970-01-01
00:00:01.000000 ./src/
│ │ │ │ │ │ +-rw-r--r--   0      997    30000     4630 1970-01-01
00:00:01.000000 ./src/%{APPNAMELC}.cpp
│ │ │ │ │ │ +-rw-r--r--   0      997    30000      636 1970-01-01
00:00:01.000000 ./src/%{APPNAMELC}.h
│ │ │ │ │ │ +-rw-r--r--   0      997    30000      905 1970-01-01
00:00:01.000000 ./src/CMakeLists.txt
│ │ │ │ │ │ +-rw-r--r--   0      997    30000     2025 1970-01-01
00:00:01.000000 ./src/mydatasystem.cpp
│ │ │ │ │ │ +-rw-r--r--   0      997    30000     1252 1970-01-01
00:00:01.000000 ./src/mydatasystem.h
│ │ │ │ │ │ +-rw-r--r--   0      997    30000      415 1970-01-01
00:00:01.000000 ./src/myproto.json
│ │ │ │ │ │ +-rwxr-xr-x   0      997    30000      138 1970-01-01
00:00:01.000000 ./uninstall.sh
│ │ │ │ ├── stat {}
│ │ │ │ │ @@ -1,8 +1,8 @@
│ │ │ │ │  
│ │ │ │ │ -  Size: 13047        Blocks: 32         IO Block: 4096   regular
file
│ │ │ │ │ -Links: 3
│ │ │ │ │ +  Size: 13069        Blocks: 32         IO Block: 4096   regular
file
│ │ │ │ │ +Links: 1
│ │ │ │ │  Access: (0444/-r--r--r--)  Uid: (    0/    root)   Gid: (    0/   
root)
│ │ │ │ │  
│ │ │ │ │  Modify: 1970-01-01 00:00:01.000000000 +0000


EXPECTED RESULT
Identical tarballs.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Guix
(available in About System)
KDE Plasma Version: 21.08.1
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to