Differences in the python byte code fails in a build validation
(rpmdiff) done on difference architecture of the same package.
This patch:
1) Ensures that timestamps of generated *.pyo and *.pyc files match
2) Python integer literals greater or equal 2^32 and lower than 2^64
are converted to long right away to prevent different type of
the integer on architectures with different size of int
https://fedorahosted.org/freeipa/ticket/3858
From 55a5b9c5ffaf6c0139db697cd5487ecf1e9130ae Mon Sep 17 00:00:00 2001
From: Martin Kosek mko...@redhat.com
Date: Tue, 13 Aug 2013 02:10:01 -0400
Subject: [PATCH] Prevent *.pyo and *.pyc multilib problems
Differences in the python byte code fails in a build validation
(rpmdiff) done on difference architecture of the same package.
This patch:
1) Ensures that timestamps of generated *.pyo and *.pyc files match
2) Python integer literals greater or equal 2^32 and lower than 2^64
are converted to long right away to prevent different type of
the integer on architectures with different size of int
https://fedorahosted.org/freeipa/ticket/3858
---
Makefile| 2 ++
daemons/configure.ac| 1 +
install/configure.ac| 1 +
ipa-client/configure.ac | 1 +
ipalib/plugins/trust.py | 2 +-
ipapython/certmonger.py | 4 ++--
ipaserver/install/certs.py | 2 +-
ipaserver/install/ipa_backup.py | 2 +-
ipaserver/install/ipa_restore.py| 2 +-
ipatests/test_xmlrpc/test_dns_plugin.py | 2 +-
10 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 484144fd6f2dfb905abfc96621fc03b306d2f230..674143b8df14e93833d87fcea5740efbb28a9374 100644
--- a/Makefile
+++ b/Makefile
@@ -122,6 +122,7 @@ version-update: release-update
ipatests/setup.py
perl -pi -e s:__NUM_VERSION__:$(IPA_NUM_VERSION): ipapython/version.py
perl -pi -e s:__API_VERSION__:$(IPA_API_VERSION_MAJOR).$(IPA_API_VERSION_MINOR): ipapython/version.py
+ touch -r ipapython/version.py.in ipapython/version.py
sed -e s/__VERSION__/$(IPA_VERSION)/ daemons/ipa-version.h.in \
daemons/ipa-version.h
perl -pi -e s:__NUM_VERSION__:$(IPA_NUM_VERSION): daemons/ipa-version.h
@@ -135,6 +136,7 @@ version-update: release-update
if [ $(SUPPORTED_PLATFORM) != ]; then \
sed -e s/SUPPORTED_PLATFORM/$(SUPPORTED_PLATFORM)/ ipapython/services.py.in \
ipapython/services.py; \
+ touch -r ipapython/services.py.in ipapython/services.py; \
fi
if [ $(SKIP_API_VERSION_CHECK) != yes ]; then \
diff --git a/daemons/configure.ac b/daemons/configure.ac
index 835d0b368ab016713f903e59fa857c433d467605..e57dad27614f268d3e5bbafc99b739a5cfa2589b 100644
--- a/daemons/configure.ac
+++ b/daemons/configure.ac
@@ -20,6 +20,7 @@ AC_HEADER_STDC
AM_CONDITIONAL([HAVE_GCC], [test $ac_cv_prog_gcc = yes])
AC_SUBST(VERSION)
+AC_SUBST([INSTALL_DATA], ['$(INSTALL) -m 644 -p'])
dnl ---
dnl - Check for NSPR/NSS
diff --git a/install/configure.ac b/install/configure.ac
index 29254e6edfb9874ead9b37cc2d310a86fbfa0060..09ed9f1b4c9779a6b1e23b7ea7ea4eac3110d2c1 100644
--- a/install/configure.ac
+++ b/install/configure.ac
@@ -18,6 +18,7 @@ AM_MAINTAINER_MODE
#AC_HEADER_STDC
AC_SUBST(VERSION)
+AC_SUBST([INSTALL_DATA], ['$(INSTALL) -m 644 -p'])
AC_PROG_MKDIR_P
AC_PROG_AWK
diff --git a/ipa-client/configure.ac b/ipa-client/configure.ac
index 880e9289f3ec92bf195b3330d121567aa27e5a73..bb4ac854b0952a42329587f566125b9976281cd2 100644
--- a/ipa-client/configure.ac
+++ b/ipa-client/configure.ac
@@ -22,6 +22,7 @@ AC_HEADER_STDC
AM_CONDITIONAL([HAVE_GCC], [test $ac_cv_prog_gcc = yes])
AC_SUBST(VERSION)
+AC_SUBST([INSTALL_DATA], ['$(INSTALL) -m 644 -p'])
dnl ---
dnl - Check for KRB5
diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py
index 8790dcd2a5d026c728c6468d5fb7c50f58d0908b..6c7ea560eedd441b5fa46fc97b342b41010fd9f8 100644
--- a/ipalib/plugins/trust.py
+++ b/ipalib/plugins/trust.py
@@ -561,7 +561,7 @@ def add_range(self, range_name, dom_sid, *keys, **options):
base_id = DEFAULT_RANGE_SIZE + (
pysss_murmur.murmurhash3(
dom_sid,
-len(dom_sid), 0xdeadbeef
+len(dom_sid), 0xdeadbeefL
) % 1
) * DEFAULT_RANGE_SIZE
diff --git a/ipapython/certmonger.py b/ipapython/certmonger.py
index d347c2aeb92a852e51da77557598ebf039bed0e7..03f4b23738197905f6891c0bfe842328723afd5a 100644
--- a/ipapython/certmonger.py
+++ b/ipapython/certmonger.py
@@ -398,7 +398,7 @@ def dogtag_start_tracking(ca, nickname, pin, pinfile, secdir, pre_command,
if pre_command is not None:
if not os.path.isabs(pre_command):
-if sys.maxsize 2**32:
+if sys.maxsize 2**32L: