From de2e4aad989fff9bdd232b7f68b5e619198f5ef6 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mar 06 2019 14:44:10 +0000 Subject: Switch to explicit byte compilation to override invalidation mode --- diff --git a/glib2.spec b/glib2.spec index fb8ddda..4e5fa61 100644 --- a/glib2.spec +++ b/glib2.spec @@ -1,12 +1,5 @@ -# This package depends on automagic byte compilation -# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 -%global _python_bytecompile_extra 1 - %global _changelog_trimtime %(date +%s -d "1 year ago") -# See https://fedoraproject.org/wiki/Packaging:Python_Appendix#Manual_byte_compilation -%global __python %{__python3} - Name: glib2 Version: 2.60.0 Release: 2%{?dist} @@ -106,14 +99,19 @@ rm glib/pcre/*.[ch] %install %meson_install -# Since this is a generated .py file, set it to a known timestamp, -# otherwise it will vary by build time, and thus break multilib -devel -# installs. -# Also copy the timestamp for other .py files, because meson doesn't do -# this, see https://github.com/mesonbuild/meson/issues/5027. +# Since this is a generated .py file, set it to a known timestamp for +# better reproducibility. +# Also copy the timestamp for other .py files, because meson doesn't +# do this, see https://github.com/mesonbuild/meson/issues/5027. touch -r gio/gdbus-2.0/codegen/config.py.in $RPM_BUILD_ROOT/%{_datadir}/glib-2.0/codegen/*.py chrpath --delete $RPM_BUILD_ROOT%{_libdir}/*.so +# Perform byte compilation manually to avoid issues with +# irreproducibility of the default invalidation mode, see +# https://www.python.org/dev/peps/pep-0552/. +export SOURCE_DATE_EPOCH=0 +%py_byte_compile %{__python3} %{buildroot}%{_datadir} + mv $RPM_BUILD_ROOT%{_bindir}/gio-querymodules $RPM_BUILD_ROOT%{_bindir}/gio-querymodules-%{__isa_bits} touch $RPM_BUILD_ROOT%{_libdir}/gio/modules/giomodule.cache @@ -223,6 +221,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : * Wed Mar 6 2019 Zbigniew Jędrzejewski-Szmek - 2.60.0-2 - Make sure all .py files have fixed timestamps (fixes issue with parallel installability of i686 and amd64 -devel packages) +- Switch to explicit byte compilation to override invalidation mode * Mon Mar 04 2019 Kalev Lember - 2.60.0-1 - Update to 2.60.0