Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-62511

rcc embeds time in output

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.9.1
    • Build tools: rcc
    • None

    Description

      When building packages on openSUSE twice, I found that results always differed for ~15 packages:

      umbrello syntax-highlighting wireshark qmmp spectator qbittorrent bitcoin libqt5-qtwebkit gpxsee boomaga gammaray mathgl goldendict gcompris-qt breeze5-icons

       

      See https://reproducible-builds.org/ for why this matters.

       

      This is because src/tools/rcc/rcc.cpp has RCCFileInfo::writeDataInfo that calls lastModified.toMSecsSinceEpoch

       

      and input files are generated during build, and thus carry the build time.

      e.g. umbrello-17.04.2/umbrello/CMakeLists.txt has

      configure_file(umbrelloui.rc.cmake ${CMAKE_CURRENT_BINARY_DIR}/umbrelloui.rc @ONLY)

       

      I tested that the attached simple patch helps, but for a proper fix, we probably want to clamp timestamps to be lower or equal to SOURCE_DATE_EPOCH similar to

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

      https://github.com/michaelrsweet/mxml/commit/b79d3e0f07495b4a113f1ad95ae08c19664ea5ac

      Attachments

        Activity

          People

            hjk hjk
            bmwiedemann Bernhard M. Wiedemann
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: