build: revert 64-bit time_t changes for 32-bit platforms
Related: RHEL-30198
This commit is contained in:
parent
d576b46c3c
commit
8a681b3f08
6
pcp.spec
6
pcp.spec
@ -1,6 +1,6 @@
|
||||
Name: pcp
|
||||
Version: 6.2.2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: System-level performance monitoring and performance management
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
|
||||
URL: https://pcp.io
|
||||
@ -10,6 +10,7 @@ Source0: https://github.com/performancecopilot/pcp/releases/pcp-%{version}.src.t
|
||||
# Keep xx-default-archive-version.patch for the life of RHEL9
|
||||
Patch1: redhat-issues-RHEL-2317-default-archive-version.patch
|
||||
Patch2: redhat-issues-RHEL-30198-pmcd-logdir-tmpfiles.patch
|
||||
Patch3: revert-time64_t-i386.patch
|
||||
|
||||
%if 0%{?fedora} >= 40 || 0%{?rhel} >= 10
|
||||
ExcludeArch: %{ix86}
|
||||
@ -3537,6 +3538,9 @@ fi
|
||||
%files zeroconf -f pcp-zeroconf-files.rpm
|
||||
|
||||
%changelog
|
||||
* Mon Jun 10 2024 Nathan Scott <nathans@redhat.com> - 6.2.2-3
|
||||
- Revert time64_t related changes breaking i386 (RHEL-30198)
|
||||
|
||||
* Thu May 15 2024 Nathan Scott <nathans@redhat.com> - 6.2.2-2
|
||||
- Adjust tmpfiles.d permissions for pmcd logdir (RHEL-30198)
|
||||
|
||||
|
186
revert-time64_t-i386.patch
Normal file
186
revert-time64_t-i386.patch
Normal file
@ -0,0 +1,186 @@
|
||||
diff -Naurp pcp-6.2.2.orig/configure pcp-6.2.2/configure
|
||||
--- pcp-6.2.2.orig/configure 2024-05-08 09:18:25.000000000 +1000
|
||||
+++ pcp-6.2.2/configure 2024-06-10 13:07:44.487533040 +1000
|
||||
@@ -4885,12 +4885,12 @@ then :
|
||||
PCFLAGS="$PCFLAGS -Wno-array-bounds"
|
||||
fi
|
||||
fi
|
||||
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking sizeof time_t" >&5
|
||||
-printf %s "checking sizeof time_t... " >&6; }
|
||||
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking sizeof off_t" >&5
|
||||
+printf %s "checking sizeof off_t... " >&6; }
|
||||
cat <<End-of-File >conftest.c
|
||||
#include <stdio.h>
|
||||
-#include <sys/time.h>
|
||||
-int main() { printf("%d", (int)sizeof(time_t)); return 0; }
|
||||
+#include <sys/types.h>
|
||||
+int main() { printf("%d", (int)sizeof(off_t)); return 0; }
|
||||
End-of-File
|
||||
(eval $ac_compile) 2>&5
|
||||
(eval $ac_link) 2>&5
|
||||
@@ -4900,25 +4900,7 @@ rm -rf conftest conftest.*
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
|
||||
printf "%s\n" "$ans" >&6; }
|
||||
if test "$ans" = 4; then
|
||||
- PCFLAGS="$PCFLAGS -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64"
|
||||
-else
|
||||
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking sizeof off_t" >&5
|
||||
-printf %s "checking sizeof off_t... " >&6; }
|
||||
- cat <<End-of-File >conftest.c
|
||||
-#include <stdio.h>
|
||||
-#include <sys/types.h>
|
||||
-int main() { printf("%d", (int)sizeof(off_t)); return 0; }
|
||||
-End-of-File
|
||||
- (eval $ac_compile) 2>&5
|
||||
- (eval $ac_link) 2>&5
|
||||
- ans=`./conftest`
|
||||
- echo "./conftest -> \"$ans\"" >&5
|
||||
- rm -rf conftest conftest.*
|
||||
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
|
||||
-printf "%s\n" "$ans" >&6; }
|
||||
- if test "$ans" = 4; then
|
||||
- PCFLAGS="$PCFLAGS -D_FILE_OFFSET_BITS=64"
|
||||
- fi
|
||||
+ PCFLAGS="$PCFLAGS -D_FILE_OFFSET_BITS=64"
|
||||
fi
|
||||
|
||||
|
||||
diff -Naurp pcp-6.2.2.orig/configure.ac pcp-6.2.2/configure.ac
|
||||
--- pcp-6.2.2.orig/configure.ac 2024-05-08 09:18:25.000000000 +1000
|
||||
+++ pcp-6.2.2/configure.ac 2024-06-10 13:07:42.552530243 +1000
|
||||
@@ -438,13 +438,12 @@ if ! echo "$CFLAGS" | grep -- -Wno-array
|
||||
then
|
||||
AS_IF([test "x$cc_is_gcc" = xyes ],[PCFLAGS="$PCFLAGS -Wno-array-bounds"])
|
||||
fi
|
||||
-dnl we also need to worry about time_t ... we need it to be 64-bits for Y2038;
|
||||
-dnl _FILE_OFFSET_BITS and _TIME_BITS must be set together for the 32-bit case.
|
||||
-AC_MSG_CHECKING([sizeof time_t])
|
||||
+dnl and we need to worry about off_t ... we need it to be 64-bits for V3 archives
|
||||
+AC_MSG_CHECKING([sizeof off_t])
|
||||
cat <<End-of-File >conftest.c
|
||||
#include <stdio.h>
|
||||
-#include <sys/time.h>
|
||||
-int main() { printf("%d", (int)sizeof(time_t)); return 0; }
|
||||
+#include <sys/types.h>
|
||||
+int main() { printf("%d", (int)sizeof(off_t)); return 0; }
|
||||
End-of-File
|
||||
(eval $ac_compile) 2>&5
|
||||
(eval $ac_link) 2>&5
|
||||
@@ -453,25 +452,7 @@ echo "./conftest -> \"$ans\"" >&5
|
||||
rm -rf conftest conftest.*
|
||||
AC_MSG_RESULT($ans)
|
||||
if test "$ans" = 4; then
|
||||
- PCFLAGS="$PCFLAGS -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64"
|
||||
-else
|
||||
- dnl we may need to check off_t ... we need it to be 64-bits for V3 archives
|
||||
- dnl this check is optional only because it may be set already (just prior).
|
||||
- AC_MSG_CHECKING([sizeof off_t])
|
||||
- cat <<End-of-File >conftest.c
|
||||
-#include <stdio.h>
|
||||
-#include <sys/types.h>
|
||||
-int main() { printf("%d", (int)sizeof(off_t)); return 0; }
|
||||
-End-of-File
|
||||
- (eval $ac_compile) 2>&5
|
||||
- (eval $ac_link) 2>&5
|
||||
- ans=`./conftest`
|
||||
- echo "./conftest -> \"$ans\"" >&5
|
||||
- rm -rf conftest conftest.*
|
||||
- AC_MSG_RESULT($ans)
|
||||
- if test "$ans" = 4; then
|
||||
- PCFLAGS="$PCFLAGS -D_FILE_OFFSET_BITS=64"
|
||||
- fi
|
||||
+ PCFLAGS="$PCFLAGS -D_FILE_OFFSET_BITS=64"
|
||||
fi
|
||||
AC_SUBST(PCFLAGS)
|
||||
AC_SUBST(PLDFLAGS)
|
||||
diff -Naurp pcp-6.2.2.orig/src/perl/LogImport/Makefile.PL pcp-6.2.2/src/perl/LogImport/Makefile.PL
|
||||
--- pcp-6.2.2.orig/src/perl/LogImport/Makefile.PL 2024-05-08 09:18:25.000000000 +1000
|
||||
+++ pcp-6.2.2/src/perl/LogImport/Makefile.PL 2024-06-10 13:07:42.553530244 +1000
|
||||
@@ -37,7 +37,7 @@ WriteMakefile(
|
||||
OPTIMIZE => '-g',
|
||||
XSPROTOARG => '-noprototypes',
|
||||
OBJECT => 'LogImport.o',
|
||||
- DEFINE => '-DPERLIO_NOT_STDIO=0 -DPCP_VERSION -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64',
|
||||
+ DEFINE => '-DPERLIO_NOT_STDIO=0 -DPCP_VERSION',
|
||||
LDFROM => $ldfrom,
|
||||
LDDLFLAGS => $lddlflags,
|
||||
CCCDLFLAGS => $cccdlflags,
|
||||
diff -Naurp pcp-6.2.2.orig/src/perl/MMV/Makefile.PL pcp-6.2.2/src/perl/MMV/Makefile.PL
|
||||
--- pcp-6.2.2.orig/src/perl/MMV/Makefile.PL 2024-05-08 09:18:25.000000000 +1000
|
||||
+++ pcp-6.2.2/src/perl/MMV/Makefile.PL 2024-06-10 13:07:42.553530244 +1000
|
||||
@@ -37,7 +37,7 @@ WriteMakefile(
|
||||
OPTIMIZE => '-g',
|
||||
XSPROTOARG => '-noprototypes',
|
||||
OBJECT => 'MMV.o',
|
||||
- DEFINE => '-DPERLIO_NOT_STDIO=0 -DPCP_VERSION -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64',
|
||||
+ DEFINE => '-DPERLIO_NOT_STDIO=0 -DPCP_VERSION',
|
||||
LDFROM => $ldfrom,
|
||||
LDDLFLAGS => $lddlflags,
|
||||
CCCDLFLAGS => $cccdlflags,
|
||||
diff -Naurp pcp-6.2.2.orig/src/perl/PMDA/Makefile.PL pcp-6.2.2/src/perl/PMDA/Makefile.PL
|
||||
--- pcp-6.2.2.orig/src/perl/PMDA/Makefile.PL 2024-05-08 09:18:25.000000000 +1000
|
||||
+++ pcp-6.2.2/src/perl/PMDA/Makefile.PL 2024-06-10 13:07:42.553530244 +1000
|
||||
@@ -54,7 +54,7 @@ WriteMakefile(
|
||||
OPTIMIZE => '-g',
|
||||
XSPROTOARG => '-noprototypes',
|
||||
OBJECT => 'local.o PMDA.o',
|
||||
- DEFINE => '-DPERLIO_NOT_STDIO=0 -DPCP_VERSION -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64',
|
||||
+ DEFINE => '-DPERLIO_NOT_STDIO=0 -DPCP_VERSION',
|
||||
LDFROM => $ldfrom,
|
||||
LDDLFLAGS => $lddlflags,
|
||||
CCCDLFLAGS => $cccdlflags,
|
||||
diff -Naurp pcp-6.2.2.orig/src/python/pmapi.c pcp-6.2.2/src/python/pmapi.c
|
||||
--- pcp-6.2.2.orig/src/python/pmapi.c 2024-05-08 09:18:25.000000000 +1000
|
||||
+++ pcp-6.2.2/src/python/pmapi.c 2024-06-10 13:07:42.554530246 +1000
|
||||
@@ -24,8 +24,6 @@
|
||||
** **
|
||||
\**************************************************************************/
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
-#define _FILE_OFFSET_BITS 64
|
||||
-#define _TIME_BITS 64
|
||||
#include <Python.h>
|
||||
#define PMAPI_VERSION 3
|
||||
#include <pcp/pmapi.h>
|
||||
diff -Naurp pcp-6.2.2.orig/src/python/pmda.c pcp-6.2.2/src/python/pmda.c
|
||||
--- pcp-6.2.2.orig/src/python/pmda.c 2024-05-08 09:18:25.000000000 +1000
|
||||
+++ pcp-6.2.2/src/python/pmda.c 2024-06-10 13:07:42.554530246 +1000
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright (C) 2013-2015,2017-2021,2024 Red Hat.
|
||||
+ * Copyright (C) 2013-2015,2017-2021 Red Hat.
|
||||
*
|
||||
* This file is part of the "pcp" module, the python interfaces for the
|
||||
* Performance Co-Pilot toolkit.
|
||||
@@ -21,8 +21,6 @@
|
||||
* python PMDAs via the pmda.py module, using ctypes.
|
||||
*/
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
-#define _FILE_OFFSET_BITS 64
|
||||
-#define _TIME_BITS 64
|
||||
#include <Python.h>
|
||||
#include <pcp/pmapi.h>
|
||||
#include <pcp/pmda.h>
|
||||
diff -Naurp pcp-6.2.2.orig/src/python/pmgui.c pcp-6.2.2/src/python/pmgui.c
|
||||
--- pcp-6.2.2.orig/src/python/pmgui.c 2024-05-08 09:18:25.000000000 +1000
|
||||
+++ pcp-6.2.2/src/python/pmgui.c 2024-06-10 13:07:42.554530246 +1000
|
||||
@@ -23,8 +23,6 @@
|
||||
** **
|
||||
\**************************************************************************/
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
-#define _FILE_OFFSET_BITS 64
|
||||
-#define _TIME_BITS 64
|
||||
#include <Python.h>
|
||||
#include <pcp/pmafm.h>
|
||||
#include <pcp/pmtime.h>
|
||||
diff -Naurp pcp-6.2.2.orig/src/python/pmi.c pcp-6.2.2/src/python/pmi.c
|
||||
--- pcp-6.2.2.orig/src/python/pmi.c 2024-05-08 09:18:25.000000000 +1000
|
||||
+++ pcp-6.2.2/src/python/pmi.c 2024-06-10 13:07:42.554530246 +1000
|
||||
@@ -23,8 +23,6 @@
|
||||
** **
|
||||
\**************************************************************************/
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
-#define _FILE_OFFSET_BITS 64
|
||||
-#define _TIME_BITS 64
|
||||
#include <Python.h>
|
||||
#include <pcp/pmapi.h>
|
||||
#include <pcp/import.h>
|
Loading…
Reference in New Issue
Block a user