salimma pushed to rpms/python-pystemd (f37). "Rebuilt for Python 3.12"
by notificationsï¼ fedoraproject.org
Notification time stamped 2023-06-30 21:21:43 UTC
From 7eca01657a398a4f8759ab9baa60342017956d92 Mon Sep 17 00:00:00 2001
From: Python Maint <python-maint(a)redhat.com>
Date: Jun 14 2023 18:23:15 +0000
Subject: Rebuilt for Python 3.12
---
diff --git a/python-pystemd.spec b/python-pystemd.spec
index c7aafa3..08e85b7 100644
--- a/python-pystemd.spec
+++ b/python-pystemd.spec
@@ -6,7 +6,7 @@
Name: python-%{pypi_name}
Version: 0.13.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A thin Cython-based wrapper on top of libsystemd
License: LGPL-2.1-or-later
@@ -69,6 +69,9 @@ popd
%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%changelog
+* Wed Jun 14 2023 Python Maint <python-maint(a)redhat.com> - 0.13.1-2
+- Rebuilt for Python 3.12
+
* Wed May 17 2023 Davide Cavalca <dcavalca(a)fedoraproject.org> - 0.13.1-1
- Update to 0.13.1; Fixes: RHBZ#2207826
- Drop some unnecessary logic from the spec
https://src.fedoraproject.org/rpms/python-pystemd/c/7eca01657a398a4f8759a...
10Â months, 1Â week
jjames pushed to rpms/ocaml-ppx-globalize (rawhide). "Initial import"
by notificationsï¼ fedoraproject.org
Notification time stamped 2023-06-30 21:17:52 UTC
From 7024994eae92361eec882965c503c803f020d2fc Mon Sep 17 00:00:00 2001
From: Jerry James <loganjerry(a)gmail.com>
Date: Jun 30 2023 21:17:35 +0000
Subject: Initial import
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bb69939
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/ppx_globalize-*.tar.gz
diff --git a/ocaml-ppx-globalize.spec b/ocaml-ppx-globalize.spec
new file mode 100644
index 0000000..10972b6
--- /dev/null
+++ b/ocaml-ppx-globalize.spec
@@ -0,0 +1,52 @@
+%ifnarch %{ocaml_native_compiler}
+%global debug_package %{nil}
+%endif
+
+Name: ocaml-ppx-globalize
+Version: 0.16.0
+Release: 1%{?dist}
+Summary: Generate functions to copy local values to the global heap
+
+License: MIT
+URL: https://github.com/janestreet/ppx_globalize
+Source0: %{url}/archive/v%{version}/ppx_globalize-%{version}.tar.gz
+
+BuildRequires: ocaml >= 4.14.0
+BuildRequires: ocaml-dune >= 2.0.0
+BuildRequires: ocaml-base-devel
+BuildRequires: ocaml-ppxlib-devel >= 0.28.0
+
+%description
+Ppx_globalize is a ppx rewriter that generates functions to copy local
+values to the global heap.
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: ocaml-base-devel%{?_isa}
+Requires: ocaml-ppxlib-devel%{?_isa}
+
+%description devel
+The %{name}-devel package contains libraries and signature
+files for developing applications that use %{name}.
+
+%prep
+%autosetup -n ppx_globalize-%{version}
+
+%build
+%dune_build
+
+%install
+%dune_install
+
+%check
+%dune_check
+
+%files -f .ofiles
+%license LICENSE.md
+
+%files devel -f .ofiles-devel
+
+%changelog
+* Fri Jun 23 2023 Jerry James <loganjerry(a)gmail.com> - 0.16.0-1
+- Initial RPM
diff --git a/sources b/sources
new file mode 100644
index 0000000..52d0385
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (ppx_globalize-0.16.0.tar.gz) = 76618dc1cc436c437e7911a2b793233f9bdd559dc37419df6f94143548bcfe09a0f29eafc3a36e97a5f8fb886aa94ca641f10f56078a8558f642a2cf564e4c75
https://src.fedoraproject.org/rpms/ocaml-ppx-globalize/c/7024994eae92361e...
10Â months, 1Â week
jsteffan pushed to rpms/memtest86+ (rawhide). "Use kernel-install to
manage BLS (rhbz#2209779) (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2023-06-30 21:13:43 UTC
From e01efa4e1cd4604a9f59c6020440d012e6445a77 Mon Sep 17 00:00:00 2001
From: Jonathan Steffan <jsteffan(a)fedoraproject.org>
Date: Jun 30 2023 21:12:20 +0000
Subject: Use kernel-install to manage BLS (rhbz#2209779)
- Use KERNEL_INSTALL_PLUGINS to define configuration logic
- Require systemd > 252 that has support for KERNEL_INSTALL_PLUGINS
---
diff --git a/memtest86+.kernel-install-plugin b/memtest86+.kernel-install-plugin
new file mode 100644
index 0000000..9710771
--- /dev/null
+++ b/memtest86+.kernel-install-plugin
@@ -0,0 +1,98 @@
+#!/usr/bin/bash
+
+# Sanity Checks
+if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
+ exit 0
+fi
+if ! [[ $KERNEL_INSTALL_BOOT_ROOT ]]; then
+ exit 0
+fi
+
+# Setup variables
+[[ -f /etc/default/grub ]] && . /etc/default/grub
+[[ -f /etc/os-release ]] && . /etc/os-release
+
+COMMAND="$1"
+MEMTEST_VERSION="$2"
+BOOT_DIR_ABS="$3"
+MEMTEST_IMAGE="$4"
+
+IMAGE_DIR="${MEMTEST_IMAGE%/*}"
+BOOT_ROOT="${KERNEL_INSTALL_BOOT_ROOT}"
+MACHINE_ID="${KERNEL_INSTALL_MACHINE_ID}"
+BLS_DIR="${BOOT_ROOT}/loader/entries"
+BLS_ENTRY="${BLS_DIR}/${MACHINE_ID}-0-memtest86+.conf"
+
+# Setup functions
+mkbls_grub() {
+ local memtestver=$1 && shift
+ local memtestimg=$1 && shift
+
+ cat <<EOF
+title Memtest86+ (${memtestimg}-${memtestver})
+version 0-${memtestver}-memtest86+
+linux /${memtestimg}
+grub_users \$grub_users
+grub_arg --unrestricted
+grub_class ${ID}
+EOF
+}
+
+# If ${BOOT_DIR_ABS} exists, some other boot loader is active.
+[[ -d "${BOOT_DIR_ABS}" ]] && exit 0
+
+case "$COMMAND" in
+ add)
+ # Install into BOOT_ROOT, if not already there
+ if [[ "${MEMTEST_DIR}" != "${BOOT_ROOT}" ]]; then
+ for i in \
+ "$MEMTEST_IMAGE"
+ do
+ [[ -e "$i" ]] || continue
+ rm -f "${BOOT_ROOT}/${i##*/}"
+ cp -aT "$i" "${BOOT_ROOT}/${i##*/}"
+ command -v restorecon &>/dev/null && \
+ restorecon -R "${BOOT_ROOT}/${i##*/}"
+ done
+ fi
+
+ # Generate GRUB BLS, if enabled
+ if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]]; then
+ [[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR"
+ mkbls_grub "${MEMTEST_VERSION}" "${MEMTEST_IMAGE##*/}" > "${BLS_ENTRY}"
+ command -v restorecon &>/dev/null && restorecon -R "${BLS_ENTRY}"
+
+ MEMTEST_LOC="$(grep '^linux[ \t]' "${BLS_ENTRY}" | sed -e 's,^linux[ \t]*,,')"
+ if [[ "$(grub2-probe --device $(grub2-probe --target=device /) --target=fs)" == "btrfs" &&
+ "${SUSE_BTRFS_SNAPSHOT_BOOTING}" == "true" ]]; then
+ MEMTEST_RELPATH="$(grub2-mkrelpath -r ${BOOT_ROOT}${MEMTEST_LOC})"
+ else
+ MEMTEST_RELPATH="$(grub2-mkrelpath ${BOOT_ROOT}${MEMTEST_LOC})"
+ fi
+
+ BOOTPREFIX="$(dirname ${MEMTEST_RELPATH})"
+
+ if [[ "${MEMTEST_LOC}" != "${MEMTEST_RELPATH}" ]]; then
+ sed -i -e "s,^linux.*,linux ${BOOTPREFIX}${MEMTEST_LOC},g" "${BLS_ENTRY}"
+ fi
+
+ exit 77
+ fi
+ ;;
+ remove)
+ # Find MEMTEST_IMAGE location in BLS_ENTRY, delete both MEMTEST_IMAGE and BLS_ENTRY
+ if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]]; then
+ if [[ -f "${BLS_ENTRY}" ]]; then
+ MEMTEST_IMAGE="$(grep '^linux[ \t]' "${BLS_ENTRY}" | sed -e 's,^linux[ \t]*,,')"
+ if [[ -f "${BOOT_ROOT}${MEMTEST_IMAGE}" ]]; then
+ rm -f "${BOOT_ROOT}${MEMTEST_IMAGE}"
+ fi
+ rm -f "${BLS_ENTRY}"
+ fi
+
+ exit 77
+ fi
+ ;;
+ *)
+ ;;
+esac
diff --git a/memtest86+.spec b/memtest86+.spec
index a4f2d98..4e52b8d 100644
--- a/memtest86+.spec
+++ b/memtest86+.spec
@@ -15,16 +15,18 @@ Memtest86+.
%global mt_isa ia32
%endif
-Name: memtest86+
-Version: 6.20
-Release: %autorelease
-Summary: Stand-alone memory tester for x86-64 computers
-License: GPL-2.0-only
-URL: https://www.memtest.org/
-Source0: https://github.com/memtest86plus/memtest86plus/archive/v%{version}/memtes...
-
-BuildRequires: gcc, make, xorriso, dosfstools, mtools
-ExclusiveArch: x86_64 %{ix86}
+Name: memtest86+
+Version: 6.20
+Release: %autorelease
+Summary: Stand-alone memory tester for x86-64 computers
+License: GPL-2.0-only
+URL: https://www.memtest.org/
+Source0: https://github.com/memtest86plus/memtest86plus/archive/v%{version}/memtes...
+Source1: memtest86+.kernel-install-plugin
+
+BuildRequires: gcc, make, xorriso, dosfstools, mtools
+Requires(pre): systemd-udev >= 252
+ExclusiveArch: x86_64 %{ix86}
%description
%wordwrap -v common_description
@@ -49,6 +51,7 @@ pushd build%{__isa_bits}
install -m 0644 memtest.efi %{buildroot}%{_libdir}/%{name}/memtest86+%{mt_isa}.efi
install -m 0644 memtest.bin %{buildroot}%{_libdir}/%{name}/memtest86+%{mt_isa}.bin
install -m 0644 memtest.iso %{buildroot}%{_datarootdir}/%{name}/memtest86+%{mt_isa}.iso
+install -m 0755 %{SOURCE1} %{buildroot}%{_libdir}/%{name}/memtest86+.kernel-install-plugin
popd
@@ -56,27 +59,23 @@ popd
%license LICENSE
%doc README.md
%{_libdir}/%{name}/memtest86+%{mt_isa}.*
+%{_libdir}/%{name}/memtest86+.kernel-install-plugin
%{_datarootdir}/%{name}/memtest86+%{mt_isa}.iso
%posttrans
-install -m 0644 %{_libdir}/%{name}/memtest86+%{mt_isa}.* /boot/
+MEMTEST_IMAGE="memtest86+%{mt_isa}.bin"
if [ -d /sys/firmware/efi/ ]; then
-cat << EOBLSEFI > /boot/loader/entries/`cat /etc/machine-id`-0-memtest86+-%{version}-uefi.%{mt_isa}.conf
-title Memtest86+ v%{version} %{mt_isa} UEFI
-linux /memtest86+%{mt_isa}.efi
-EOBLSEFI
-else
-cat << EOBLSBIN > /boot/loader/entries/`cat /etc/machine-id`-0-memtest86+-%{version}-bios.%{mt_isa}.conf
-title Memtest86+ v%{version} %{mt_isa} BIOS
-linux /memtest86+%{mt_isa}.bin
-EOBLSBIN
+MEMTEST_IMAGE="memtest86+%{mt_isa}.efi"
fi
+KERNEL_INSTALL_PLUGINS=%{_libdir}/%{name}/memtest86+.kernel-install-plugin \
+kernel-install add %{version} %{_libdir}/%{name}/${MEMTEST_IMAGE}
exit 0
-%postun
+
+%preun
if [ $1 -eq 0 ]; then
-rm -f /boot/memtest86+%{mt_isa}.*
-rm -f /boot/loader/entries/`cat /etc/machine-id`-0-memtest86+-%{version}-*.%{mt_isa}.conf
+KERNEL_INSTALL_PLUGINS=%{_libdir}/%{name}/memtest86+.kernel-install-plugin \
+kernel-install remove %{version}
fi
exit 0
https://src.fedoraproject.org/rpms/memtest86+/c/e01efa4e1cd4604a9f59c6020...
10Â months, 1Â week
mystro256 pushed to rpms/rocclr (rawhide). "Update to 5.6 (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2023-06-30 21:15:23 UTC
From e1f24b8cde0c9b813ddbdf40a211da631404d3dd Mon Sep 17 00:00:00 2001
From: Jeremy Newton <alexjnewt(a)hotmail.com>
Date: Jun 30 2023 21:10:32 +0000
Subject: Update to 5.6
This bundles hipcc, I would like to unbundle it later
---
diff --git a/.gitignore b/.gitignore
index e791807..a05a7d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,6 @@
/ROCclr-5.5.1.tar.gz
/ROCm-OpenCL-Runtime-5.5.1.tar.gz
/hipamd-5.5.1.tar.gz
+/rocclr-5.6.0.tar.gz
+/HIP-5.6.0.tar.gz
+/HIPCC-5.6.0.tar.gz
diff --git a/0001-Improve-HIP_CLANG_INCLUDE-detection.patch b/0001-Improve-HIP_CLANG_INCLUDE-detection.patch
deleted file mode 100644
index 0d3355a..0000000
--- a/0001-Improve-HIP_CLANG_INCLUDE-detection.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From f9457302c7adab900a39f9b7d9e60e9bf7044a29 Mon Sep 17 00:00:00 2001
-From: Jeremy Newton <Jeremy.Newton(a)amd.com>
-Date: Wed, 31 May 2023 10:37:08 -0400
-Subject: [PATCH 1/2] Improve HIP_CLANG_INCLUDE detection
-
-Using:
-$HIP_CLANG_PATH."/../lib/clang/".$HIP_CLANG_VERSION;
-
-Isn't always correct, as the library and resource directory can be
-customized at build time in LLVM.
-
-E.g. Fedora, RHEL, and SLE uses "lib64/clang" instead of "lib/clang".
-
-So it's better to ask clang where its resource directory is instead.
-
-Change-Id: I026b245735af5e5310b9ee6188f3f080fac6eb51
-Signed-off-by: Jeremy Newton <Jeremy.Newton(a)amd.com>
----
- bin/hipconfig.pl | 9 +++------
- 1 file changed, 3 insertions(+), 6 deletions(-)
-
-diff --git a/bin/hipconfig.pl b/bin/hipconfig.pl
-index dd03ad67..5abdfbfb 100755
---- a/bin/hipconfig.pl
-+++ b/bin/hipconfig.pl
-@@ -64,19 +64,16 @@ GetOptions(
- );
-
- if ($HIP_COMPILER eq "clang") {
-- $HIP_CLANG_VERSION = "";
-+ $HIP_CLANG_INCLUDE = "";
- if($isWindows) {
-- $HIP_CLANG_VERSION = `\"$HIP_CLANG_PATH/clang++\" --version`;
-+ $HIP_CLANG_INCLUDE = `\"$HIP_CLANG_PATH/clang++\" --print-resource-dir`;
- } else {
-- $HIP_CLANG_VERSION = `$HIP_CLANG_PATH/clang++ --version`;
-+ $HIP_CLANG_INCLUDE = `$HIP_CLANG_PATH/clang++ --print-resource-dir`;
- }
-- $HIP_CLANG_VERSION=~/.*clang version (\S+).*/;
-- $HIP_CLANG_VERSION=$1;
-
- $CPP_CONFIG = " -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__=";
-
- $HIP_PATH_INCLUDE = $HIP_PATH."/include";
-- $HIP_CLANG_INCLUDE = $HIP_CLANG_PATH."/../lib/clang/".$HIP_CLANG_VERSION;
- if($isWindows) {
- $CPP_CONFIG .= " -I\"$HIP_PATH_INCLUDE\" -I\"$HIP_CLANG_INCLUDE\"";
- } else {
---
-2.40.1
-
diff --git a/0001-Install-.hipVersion-into-datadir-for-linux.patch b/0001-Install-.hipVersion-into-datadir-for-linux.patch
new file mode 100644
index 0000000..efdda2a
--- /dev/null
+++ b/0001-Install-.hipVersion-into-datadir-for-linux.patch
@@ -0,0 +1,54 @@
+From 6b0bf158be8d16bca097fb65474d3169a861b498 Mon Sep 17 00:00:00 2001
+From: Jeremy Newton <Jeremy.Newton(a)amd.com>
+Date: Thu, 1 Jun 2023 17:46:48 -0400
+Subject: [PATCH] Install .hipVersion into datadir for linux
+
+Starting with LLVM 16, we can put .hipVersion in datadir for better
+Linux FHS compliance:
+https://github.com/llvm/llvm-project/commit/082593ff7aff68060bd66dccfa43493d07d9c255
+
+For Windows, we can keep it status quo.
+
+Change-Id: Id15ed0dac346fabec21ee060e7576ce085b1af70
+---
+ hipamd/CMakeLists.txt | 6 +++++-
+ hipamd/packaging/CMakeLists.txt | 6 +++++-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
+index c14a9ad32..6b5d8d3c5 100755
+--- a/hipamd/CMakeLists.txt
++++ b/hipamd/CMakeLists.txt
+@@ -329,7 +329,11 @@ endif()
+ install(FILES ${PROJECT_BINARY_DIR}/.hipInfo DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ # Install .hipVersion
+-install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR})
++if(WIN32)
++ install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR})
++else()
++ install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION ${CMAKE_INSTALL_DATADIR}/hip RENAME version)
++endif()
+
+ # Install src, bin, include & cmake if necessary
+ execute_process(COMMAND test ${CMAKE_INSTALL_PREFIX} -ef ${CMAKE_CURRENT_SOURCE_DIR}
+diff --git a/hipamd/packaging/CMakeLists.txt b/hipamd/packaging/CMakeLists.txt
+index b19d59490..3eac9cf14 100644
+--- a/hipamd/packaging/CMakeLists.txt
++++ b/hipamd/packaging/CMakeLists.txt
+@@ -97,7 +97,11 @@ install(FILES ${CMAKE_BINARY_DIR}/hipamd/include/hip/amd_detail/hip_prof_str.h
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip/amd_detail COMPONENT dev)
+ install(FILES ${CMAKE_BINARY_DIR}/hipamd/include/hip/hip_version.h
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip COMPONENT dev)
+-install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT dev)
++if(WIN32)
++ install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT dev)
++else()
++ install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipVersion DESTINATION ${CMAKE_INSTALL_DATADIR}/hip RENAME version COMPONENT dev)
++endif()
+ install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT dev)
+ #End dev files install
+
+--
+2.40.1
+
diff --git a/0001-Install-.hipVersion-into-datadir.patch b/0001-Install-.hipVersion-into-datadir.patch
deleted file mode 100644
index 8b1bc8b..0000000
--- a/0001-Install-.hipVersion-into-datadir.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 3ab652b44feaeb914225b94501363d49448d35a0 Mon Sep 17 00:00:00 2001
-From: Jeremy Newton <Jeremy.Newton(a)amd.com>
-Date: Thu, 1 Jun 2023 17:46:48 -0400
-Subject: [PATCH 1/2] Install .hipVersion into datadir
-
-Starting with LLVM 16, we can put .hipVersion in datadir for better FHS
-compliance:
-https://github.com/llvm/llvm-project/commit/082593ff7aff68060bd66dccfa43493d07d9c255
-
-Change-Id: Id15ed0dac346fabec21ee060e7576ce085b1af70
----
- hipamd/CMakeLists.txt | 2 +-
- hipamd/packaging/CMakeLists.txt | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
-index 05de4d923..17d7a2e6b 100755
---- a/hipamd/CMakeLists.txt
-+++ b/hipamd/CMakeLists.txt
-@@ -323,7 +323,7 @@ endif()
- install(FILES ${PROJECT_BINARY_DIR}/.hipInfo DESTINATION ${CMAKE_INSTALL_LIBDIR})
-
- # Install .hipVersion
--install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR})
-+install(FILES ${PROJECT_BINARY_DIR}/.hipVersion DESTINATION ${CMAKE_INSTALL_DATADIR}/hip RENAME version)
-
- # Install src, bin, include & cmake if necessary
- execute_process(COMMAND test ${CMAKE_INSTALL_PREFIX} -ef ${CMAKE_CURRENT_SOURCE_DIR}
-diff --git a/hipamd/packaging/CMakeLists.txt b/hipamd/packaging/CMakeLists.txt
-index 0183b0550..324d257e5 100644
---- a/hipamd/packaging/CMakeLists.txt
-+++ b/hipamd/packaging/CMakeLists.txt
-@@ -97,7 +97,7 @@ install(FILES ${CMAKE_BINARY_DIR}/hipamd/include/hip/amd_detail/hip_prof_str.h
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip/amd_detail COMPONENT dev)
- install(FILES ${CMAKE_BINARY_DIR}/hipamd/include/hip/hip_version.h
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip COMPONENT dev)
--install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT dev)
-+install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipVersion DESTINATION ${CMAKE_INSTALL_DATADIR}/hip RENAME version COMPONENT dev)
- install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT dev)
- #End dev files install
-
---
-2.40.1
-
diff --git a/0001-Move-FindHIP-to-datadir.patch b/0001-Move-FindHIP-to-datadir.patch
new file mode 100644
index 0000000..8463ee3
--- /dev/null
+++ b/0001-Move-FindHIP-to-datadir.patch
@@ -0,0 +1,44 @@
+From 939e62c0f5f2a56ab4b03e18064b44605a2b95a5 Mon Sep 17 00:00:00 2001
+From: Jeremy Newton <Jeremy.Newton(a)amd.com>
+Date: Thu, 1 Jun 2023 17:54:13 -0400
+Subject: [PATCH] Move FindHIP to datadir
+
+For Fedora, hip-devel is a good place for FindHIP, but it's a noarch
+package so move it to datadir. We might want to propose this later if
+upstream separates HIP from hipamd.
+
+Change-Id: If368620a6c66ca93624d023153f756d8f5c992d2
+---
+ hipamd/CMakeLists.txt | 2 +-
+ hipamd/packaging/CMakeLists.txt | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
+index 6b5d8d3c5..fefab6acc 100755
+--- a/hipamd/CMakeLists.txt
++++ b/hipamd/CMakeLists.txt
+@@ -371,7 +371,7 @@ if(NOT ${INSTALL_SOURCE} EQUAL 0)
+ if(WIN32)
+ install(DIRECTORY ${HIP_COMMON_DIR}/cmake DESTINATION .)
+ else()
+- install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR})
++ install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/hip)
+ endif()
+ endif()
+
+diff --git a/hipamd/packaging/CMakeLists.txt b/hipamd/packaging/CMakeLists.txt
+index 3eac9cf14..ab8a92e10 100644
+--- a/hipamd/packaging/CMakeLists.txt
++++ b/hipamd/packaging/CMakeLists.txt
+@@ -62,7 +62,7 @@ if(HIP_PLATFORM STREQUAL "amd" )
+ #Keeping it as is for now
+ install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipInfo DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+
+-install(FILES ${CMAKE_BINARY_DIR}/hipamd/hip-config.cmake ${CMAKE_BINARY_DIR}/hipamd/hip-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT binary)
++install(FILES ${CMAKE_BINARY_DIR}/hipamd/hip-config.cmake ${CMAKE_BINARY_DIR}/hipamd/hip-config-version.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/hip COMPONENT binary)
+ install ( EXPORT hip-targets FILE hip-targets.cmake NAMESPACE hip:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT binary)
+
+ install(FILES ${CMAKE_BINARY_DIR}/hipamd/src/hip-lang-config.cmake ${CMAKE_BINARY_DIR}/hipamd/src/hip-lang-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip-lang COMPONENT binary)
+--
+2.40.1
+
diff --git a/0002-Improve-HIP_CLANG_PATH-detection.patch b/0002-Improve-HIP_CLANG_PATH-detection.patch
deleted file mode 100644
index 47870f6..0000000
--- a/0002-Improve-HIP_CLANG_PATH-detection.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 3b8d2ad4e42330562ac7490e9a996363debd7c53 Mon Sep 17 00:00:00 2001
-From: Jeremy Newton <Jeremy.Newton(a)amd.com>
-Date: Wed, 31 May 2023 10:51:27 -0400
-Subject: [PATCH 2/2] Improve HIP_CLANG_PATH detection
-
-Instead of checking for windows, it seems better to detect the location
-of the clang binary. Normally distros put clang bin in the same
-directory as hipcc, so this will improve the experience there too.
-
-Change-Id: I506faa15c8cc69500436f2dec3cdfd3f86356fab
-Signed-off-by: Jeremy Newton <Jeremy.Newton(a)amd.com>
----
- bin/hipvars.pm | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/bin/hipvars.pm b/bin/hipvars.pm
-index 0f180ca7..eceeaec4 100644
---- a/bin/hipvars.pm
-+++ b/bin/hipvars.pm
-@@ -83,8 +83,8 @@ if (-e "$HIP_PATH/bin/rocm_agent_enumerator") {
- }
- $CUDA_PATH=$ENV{'CUDA_PATH'} // '/usr/local/cuda';
-
--# Windows has a different structure, all binaries are inside hip/bin
--if ($isWindows) {
-+# Windows/Distro's have a different structure, all binaries are with hipcc
-+if (-e "$HIP_PATH/bin/clang" or -e "$HIP_PATH/bin/clang.exe") {
- $HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$HIP_PATH/bin";
- } else {
- $HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$ROCM_PATH/llvm/bin";
---
-2.40.1
-
diff --git a/0002-Move-FindHIP-to-datadir.patch b/0002-Move-FindHIP-to-datadir.patch
deleted file mode 100644
index ea76b58..0000000
--- a/0002-Move-FindHIP-to-datadir.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 3b5bc60b80a777cbb8263513739c26d213aad26b Mon Sep 17 00:00:00 2001
-From: Jeremy Newton <Jeremy.Newton(a)amd.com>
-Date: Thu, 1 Jun 2023 17:54:13 -0400
-Subject: [PATCH 2/2] Move FindHIP to datadir
-
-For Fedora, hip-devel is a good place for FindHIP, but it's a noarch
-package so move it to datadir. We might want to propose this later if
-upstream separates HIP from hipamd.
-
-Change-Id: If368620a6c66ca93624d023153f756d8f5c992d2
----
- hipamd/CMakeLists.txt | 2 +-
- hipamd/packaging/CMakeLists.txt | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
-index 17d7a2e6b..c6d76d8f0 100755
---- a/hipamd/CMakeLists.txt
-+++ b/hipamd/CMakeLists.txt
-@@ -361,7 +361,7 @@ if(NOT ${INSTALL_SOURCE} EQUAL 0)
- if(WIN32)
- install(DIRECTORY ${HIP_COMMON_DIR}/cmake DESTINATION .)
- else()
-- install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR})
-+ install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/hip)
- endif()
- endif()
-
-diff --git a/hipamd/packaging/CMakeLists.txt b/hipamd/packaging/CMakeLists.txt
-index 324d257e5..ef2296bf9 100644
---- a/hipamd/packaging/CMakeLists.txt
-+++ b/hipamd/packaging/CMakeLists.txt
-@@ -98,7 +98,7 @@ install(FILES ${CMAKE_BINARY_DIR}/hipamd/include/hip/amd_detail/hip_prof_str.h
- install(FILES ${CMAKE_BINARY_DIR}/hipamd/include/hip/hip_version.h
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip COMPONENT dev)
- install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipVersion DESTINATION ${CMAKE_INSTALL_DATADIR}/hip RENAME version COMPONENT dev)
--install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT dev)
-+install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/hip COMPONENT dev)
- #End dev files install
-
- #Begin doc files install
---
-2.40.1
-
diff --git a/158e79358c811c31adebd6e421e884c7f98b968c.patch b/158e79358c811c31adebd6e421e884c7f98b968c.patch
deleted file mode 100644
index f96c35f..0000000
--- a/158e79358c811c31adebd6e421e884c7f98b968c.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 158e79358c811c31adebd6e421e884c7f98b968c Mon Sep 17 00:00:00 2001
-From: Jeremy Newton <Jeremy.Newton(a)amd.com>
-Date: Wed, 8 Feb 2023 14:16:43 -0500
-Subject: [PATCH] SWDEV-1 - cltrace: Add missing include
-
-Newer GCC's seem to require this.
-
-Signed-off-by: Jeremy Newton <Jeremy.Newton(a)amd.com>
-Change-Id: I56ef934600729e892f1cd7ab11662760df48aed8
----
- opencl/tools/cltrace/cltrace.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/opencl/tools/cltrace/cltrace.cpp b/opencl/tools/cltrace/cltrace.cpp
-index be9629873..5ac5b6273 100644
---- a/opencl/tools/cltrace/cltrace.cpp
-+++ b/opencl/tools/cltrace/cltrace.cpp
-@@ -17,6 +17,7 @@
- #include <iostream>
- #include <cstring>
- #include <cstdlib>
-+#include <cstdint>
-
- #ifdef _MSC_VER
- #include <windows.h>
diff --git a/1bc186323fb83c6d2124a273d2d5a5c05de52bbe.patch b/1bc186323fb83c6d2124a273d2d5a5c05de52bbe.patch
deleted file mode 100644
index 3272cd6..0000000
--- a/1bc186323fb83c6d2124a273d2d5a5c05de52bbe.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From 1bc186323fb83c6d2124a273d2d5a5c05de52bbe Mon Sep 17 00:00:00 2001
-From: Maneesh Gupta <maneesh.gupta(a)amd.com>
-Date: Fri, 17 Mar 2023 12:04:46 +0000
-Subject: [PATCH] SWDEV-361630 - Enable hip build
-
-Change-Id: Icdeaeff555d46e495c3de954b614168995a82a9f
----
- CMakeLists.txt | 66 +++++++++++++++++++++++++++++++++
- hipamd/packaging/CMakeLists.txt | 14 +++----
- hipamd/src/CMakeLists.txt | 3 +-
- opencl/amdocl/CMakeLists.txt | 1 -
- rocclr/cmake/ROCclr.cmake | 2 +-
- 5 files changed, 75 insertions(+), 11 deletions(-)
- create mode 100644 CMakeLists.txt
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100644
-index 000000000..c32344fc9
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,66 @@
-+# Copyright (c) 2022 - 2023 Advanced Micro Devices, Inc. All Rights Reserved.
-+#
-+# Permission is hereby granted, free of charge, to any person obtaining a copy
-+# of this software and associated documentation files (the "Software"), to deal
-+# in the Software without restriction, including without limitation the rights
-+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-+# copies of the Software, and to permit persons to whom the Software is
-+# furnished to do so, subject to the following conditions:
-+#
-+# The above copyright notice and this permission notice shall be included in
-+# all copies or substantial portions of the Software.
-+#
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-+# THE SOFTWARE.
-+
-+project(clr)
-+cmake_minimum_required(VERSION 3.16.8)
-+include(GNUInstallDirs)
-+
-+##########
-+# Defaults
-+##########
-+if(NOT DEFINED ROCM_PATH)
-+ set(ROCM_PATH "/opt/rocm" CACHE STRING "Default ROCM installation directory.")
-+endif()
-+message(STATUS "ROCM Installation path(ROCM_PATH): ${ROCM_PATH}")
-+
-+if(UNIX)
-+ set(CLR_DEFAULT_INSTALL_PREFIX "${ROCM_PATH}")
-+endif()
-+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-+ set(CMAKE_INSTALL_PREFIX ${CLR_DEFAULT_INSTALL_PREFIX} CACHE PATH "Installation path for HIP and OCL" FORCE)
-+endif()
-+set(CPACK_INSTALL_PREFIX ${CLR_DEFAULT_INSTALL_PREFIX} CACHE PATH "Package Installation path for HIP and OCL")
-+
-+if(IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX})
-+ message(STATUS "HIP and OCL will be installed in: " ${CMAKE_INSTALL_PREFIX})
-+else()
-+ message(FATAL_ERROR "Don't know where to install HIP and OCL. Please specify absolute path using -DCMAKE_INSTALL_PREFIX")
-+endif()
-+
-+set(CPACK_SET_DESTDIR ON CACHE BOOL "Installer package will install HIP and OCL to CMAKE_INSTALL_PREFIX instead of CPACK_PACKAGING_INSTALL_PREFIX")
-+if (NOT CPACK_SET_DESTDIR)
-+ set(CPACK_PACKAGING_INSTALL_PREFIX "${ROCM_PATH}" CACHE PATH "Default installation path of HIP and OCL installer package")
-+endif()
-+
-+option(CLR_BUILD_HIP "Build HIP" ON)
-+option(CLR_BUILD_OCL "Build OCL" OFF)
-+
-+#############
-+# Build steps
-+#############
-+if(CLR_BUILD_HIP OR CLR_BUILD_OCL)
-+ add_subdirectory(rocclr)
-+endif()
-+if(CLR_BUILD_HIP)
-+ add_subdirectory(hipamd)
-+endif()
-+if(CLR_BUILD_OCL)
-+ add_subdirectory(opencl)
-+endif()
-diff --git a/hipamd/packaging/CMakeLists.txt b/hipamd/packaging/CMakeLists.txt
-index 92118aea8..114d001d3 100644
---- a/hipamd/packaging/CMakeLists.txt
-+++ b/hipamd/packaging/CMakeLists.txt
-@@ -52,15 +52,15 @@ if(HIP_PLATFORM STREQUAL "amd" )
-
- #TODO:This do not belong in BINARY package.
- #Keeping it as is for now
--install(FILES ${CMAKE_BINARY_DIR}/.hipInfo DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
-+install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipInfo DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
-
--install(FILES ${CMAKE_BINARY_DIR}/hip-config.cmake ${CMAKE_BINARY_DIR}/hip-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT binary)
-+install(FILES ${CMAKE_BINARY_DIR}/hipamd/hip-config.cmake ${CMAKE_BINARY_DIR}/hipamd/hip-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT binary)
- install ( EXPORT hip-targets FILE hip-targets.cmake NAMESPACE hip:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT binary)
-
--install(FILES ${CMAKE_BINARY_DIR}/src/hip-lang-config.cmake ${CMAKE_BINARY_DIR}/src/hip-lang-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip-lang COMPONENT binary)
-+install(FILES ${CMAKE_BINARY_DIR}/hipamd/src/hip-lang-config.cmake ${CMAKE_BINARY_DIR}/hipamd/src/hip-lang-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip-lang COMPONENT binary)
- install ( EXPORT hip-lang-targets FILE hip-lang-targets.cmake NAMESPACE hip-lang:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip-lang COMPONENT binary)
-
--install(FILES ${CMAKE_BINARY_DIR}/hiprtc-config.cmake ${CMAKE_BINARY_DIR}/hiprtc-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hiprtc COMPONENT binary)
-+install(FILES ${CMAKE_BINARY_DIR}/hipamd/hiprtc-config.cmake ${CMAKE_BINARY_DIR}/hipamd/hiprtc-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hiprtc COMPONENT binary)
- install ( EXPORT hiprtc-targets FILE hiprtc-targets.cmake NAMESPACE hiprtc:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hiprtc COMPONENT binary)
-
- endif()#End HIP_PLATFORM = "amd"
-@@ -85,11 +85,11 @@ install(DIRECTORY ${hip_SOURCE_DIR}/include/hip/amd_detail
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip COMPONENT dev)
- install(DIRECTORY ${hip_SOURCE_DIR}/include/hip/nvidia_detail
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip COMPONENT dev)
--install(FILES ${CMAKE_BINARY_DIR}/include/hip/amd_detail/hip_prof_str.h
-+install(FILES ${CMAKE_BINARY_DIR}/hipamd/include/hip/amd_detail/hip_prof_str.h
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip/amd_detail COMPONENT dev)
--install(FILES ${CMAKE_BINARY_DIR}/include/hip/hip_version.h
-+install(FILES ${CMAKE_BINARY_DIR}/hipamd/include/hip/hip_version.h
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hip COMPONENT dev)
--install(FILES ${CMAKE_BINARY_DIR}/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT dev)
-+install(FILES ${CMAKE_BINARY_DIR}/hipamd/.hipVersion DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT dev)
- install(DIRECTORY ${HIP_COMMON_DIR}/cmake/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip COMPONENT dev)
- #End dev files install
-
-diff --git a/hipamd/src/CMakeLists.txt b/hipamd/src/CMakeLists.txt
-index 619d6a0e8..07fb5d0f6 100644
---- a/hipamd/src/CMakeLists.txt
-+++ b/hipamd/src/CMakeLists.txt
-@@ -56,7 +56,6 @@ option(DISABLE_DIRECT_DISPATCH "Disable Direct Dispatch" OFF)
- option(BUILD_SHARED_LIBS "Build the shared library" ON)
-
- list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
--find_package(ROCclr)
-
- if(BUILD_SHARED_LIBS)
- add_library(amdhip64 SHARED)
-@@ -215,7 +214,7 @@ option(USE_PROF_API "Enable roctracer integration" ON)
- # Enable profiling API
- if(USE_PROF_API)
- set(PROF_API_STR "${PROJECT_BINARY_DIR}/include/hip/amd_detail/hip_prof_str.h")
-- set(PROF_API_STR_IN "${CMAKE_SOURCE_DIR}/include/hip/amd_detail/hip_prof_str.h")
-+ set(PROF_API_STR_IN "${CMAKE_SOURCE_DIR}/hipamd/include/hip/amd_detail/hip_prof_str.h")
- set(PROF_API_HDR "${HIP_COMMON_INCLUDE_DIR}/hip/hip_runtime_api.h")
- set(PROF_API_SRC "${CMAKE_CURRENT_SOURCE_DIR}")
- set(PROF_API_GEN "${CMAKE_CURRENT_SOURCE_DIR}/hip_prof_gen.py")
-diff --git a/opencl/amdocl/CMakeLists.txt b/opencl/amdocl/CMakeLists.txt
-index e720c76ab..48b3400c7 100644
---- a/opencl/amdocl/CMakeLists.txt
-+++ b/opencl/amdocl/CMakeLists.txt
-@@ -44,7 +44,6 @@ if(ADDRESS_SANITIZER)
- endif()
-
- list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
--find_package(ROCclr)
-
- if(BUILD_SHARED_LIBS)
- add_library(amdocl SHARED)
-diff --git a/rocclr/cmake/ROCclr.cmake b/rocclr/cmake/ROCclr.cmake
-index c7795ba81..3b842b7df 100644
---- a/rocclr/cmake/ROCclr.cmake
-+++ b/rocclr/cmake/ROCclr.cmake
-@@ -40,7 +40,7 @@ find_package(Threads REQUIRED)
-
- find_package(AMD_OPENCL)
-
--add_library(rocclr STATIC)
-+add_library(rocclr OBJECT)
-
- include(ROCclrCompilerOptions)
-
diff --git a/2cda949920a2ae5e88702ceaa806f5262070824c.patch b/2cda949920a2ae5e88702ceaa806f5262070824c.patch
new file mode 100644
index 0000000..59101af
--- /dev/null
+++ b/2cda949920a2ae5e88702ceaa806f5262070824c.patch
@@ -0,0 +1,49 @@
+From 2cda949920a2ae5e88702ceaa806f5262070824c Mon Sep 17 00:00:00 2001
+From: Jeremy Newton <Jeremy.Newton(a)amd.com>
+Date: Tue, 23 May 2023 14:49:50 -0400
+Subject: [PATCH] SWDEV-361988 - Fix hip library install permissions
+
+"FILES" installs files as 644, but we want libraries to be 755, which
+we can do with "PROGRAMS".
+
+Signed-off-by: Jeremy Newton <Jeremy.Newton(a)amd.com>
+Change-Id: I155ed77482839ff6d71f90239a014d239e20f4b8
+---
+ hipamd/packaging/CMakeLists.txt | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/hipamd/packaging/CMakeLists.txt b/hipamd/packaging/CMakeLists.txt
+index 1a80e7e8c..0183b0550 100644
+--- a/hipamd/packaging/CMakeLists.txt
++++ b/hipamd/packaging/CMakeLists.txt
+@@ -42,20 +42,20 @@ set(CPACK_RPM_PACKAGE_LICENSE "MIT")
+ #Begin binary files install
+ if(HIP_PLATFORM STREQUAL "amd" )
+ if(BUILD_SHARED_LIBS)
+- install(FILES ${PROJECT_BINARY_DIR}/lib/libamdhip64.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+- install(FILES ${PROJECT_BINARY_DIR}/lib/libamdhip64.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+- install(FILES ${PROJECT_BINARY_DIR}/lib/libamdhip64.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+- install(FILES ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
++ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libamdhip64.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
++ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libamdhip64.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
++ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libamdhip64.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
++ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
++ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
++ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
++ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
++ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so.${HIP_LIB_VERSION_MAJOR} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
++ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libhiprtc-builtins.so.${HIP_LIB_VERSION_STRING} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ # Add libraries to asan package
+ install(DIRECTORY ${PROJECT_BINARY_DIR}/lib/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT asan
+ PATTERN ".hipInfo" EXCLUDE)
+ else()
+- install(FILES ${PROJECT_BINARY_DIR}/lib/libamdhip64.a DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
++ install(PROGRAMS ${PROJECT_BINARY_DIR}/lib/libamdhip64.a DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
+ endif()#End BUILD_SHARED_LIBS
+
+ #TODO:This do not belong in BINARY package.
diff --git a/560bee0df3b95d9cf18d5e52d7fa99ffe6b0f488.patch b/560bee0df3b95d9cf18d5e52d7fa99ffe6b0f488.patch
new file mode 100644
index 0000000..5a3308c
--- /dev/null
+++ b/560bee0df3b95d9cf18d5e52d7fa99ffe6b0f488.patch
@@ -0,0 +1,51 @@
+From 560bee0df3b95d9cf18d5e52d7fa99ffe6b0f488 Mon Sep 17 00:00:00 2001
+From: Jeremy Newton <Jeremy.Newton(a)amd.com>
+Date: Wed, 31 May 2023 10:51:27 -0400
+Subject: [PATCH] Improve HIP_CLANG_PATH detection
+
+Instead of checking for windows, it seems better to detect the location
+of the clang binary. Normally distros put clang bin in the same
+directory as hipcc, so this will improve the experience there too.
+
+Change-Id: I506faa15c8cc69500436f2dec3cdfd3f86356fab
+Signed-off-by: Jeremy Newton <Jeremy.Newton(a)amd.com>
+---
+ bin/hipvars.pm | 4 ++--
+ src/hipBin_amd.h | 5 ++++-
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/bin/hipvars.pm b/bin/hipvars.pm
+index bea4ec7..0bf8c69 100644
+--- a/bin/hipvars.pm
++++ b/bin/hipvars.pm
+@@ -83,8 +83,8 @@ if (-e "$HIP_PATH/bin/rocm_agent_enumerator") {
+ }
+ $CUDA_PATH=$ENV{'CUDA_PATH'} // '/usr/local/cuda';
+
+-# Windows has a different structure, all binaries are inside hip/bin
+-if ($isWindows) {
++# Windows/Distro's have a different structure, all binaries are with hipcc
++if (-e "$HIP_PATH/bin/clang" or -e "$HIP_PATH/bin/clang.exe") {
+ $HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$HIP_PATH/bin";
+ } else {
+ $HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$ROCM_PATH/llvm/bin";
+diff --git a/src/hipBin_amd.h b/src/hipBin_amd.h
+index 21102bc..6401585 100644
+--- a/src/hipBin_amd.h
++++ b/src/hipBin_amd.h
+@@ -218,11 +218,14 @@ void HipBinAmd::constructCompilerPath() {
+ if (osInfo == windows) {
+ complierPath = getHipPath();
+ hipClangPath = complierPath;
+- hipClangPath /= "bin";
+ } else {
+ complierPath = getRoccmPath();
+ hipClangPath = complierPath;
++ }
++ if (fs::exists("llvm/bin/clang++")) {
+ hipClangPath /= "llvm/bin";
++ } else {
++ hipClangPath /= "bin";
+ }
+ complierPath = hipClangPath.string();
+ } else {
diff --git a/70bdb7a5970d0c518c4ed494ea8cbb129ed3c598.patch b/70bdb7a5970d0c518c4ed494ea8cbb129ed3c598.patch
deleted file mode 100644
index 3930768..0000000
--- a/70bdb7a5970d0c518c4ed494ea8cbb129ed3c598.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 70bdb7a5970d0c518c4ed494ea8cbb129ed3c598 Mon Sep 17 00:00:00 2001
-From: Jeremy Newton <Jeremy.Newton(a)amd.com>
-Date: Wed, 8 Feb 2023 14:03:58 -0500
-Subject: [PATCH] SWDEV-1 - device: Add missing include
-
-Newer GCC's seem to require this.
-
-Change-Id: I85926d4fa552b772f2eb9f8ede7863a546c47f54
-Signed-off-by: Jeremy Newton <Jeremy.Newton(a)amd.com>
----
- rocclr/device/devhcprintf.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/rocclr/device/devhcprintf.cpp b/rocclr/device/devhcprintf.cpp
-index b36f77582..a5aba4a41 100644
---- a/rocclr/device/devhcprintf.cpp
-+++ b/rocclr/device/devhcprintf.cpp
-@@ -23,6 +23,7 @@
-
- #include <assert.h>
- #include <cstdarg>
-+#include <cstdint>
- #include <cstdio>
- #include <cstring>
- #include <string>
diff --git a/802e3f439726b0c119f58de5dde8770cda75b2b0.patch b/802e3f439726b0c119f58de5dde8770cda75b2b0.patch
deleted file mode 100644
index b534a4d..0000000
--- a/802e3f439726b0c119f58de5dde8770cda75b2b0.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 802e3f439726b0c119f58de5dde8770cda75b2b0 Mon Sep 17 00:00:00 2001
-From: ROCm CI Service Account <66695075+rocm-ci(a)users.noreply.github.com>
-Date: Sat, 18 Feb 2023 01:46:00 +0530
-Subject: [PATCH] SWDEV-380145 - [GFX][CQE] Mathlibs and Blender build failed
- in both RT and CPL Jobs (#3169)
-
-Remove --hip-device-lib-path from hip-config.cmake
-and let clang determine device lib path
-
-Change-Id: I81bfec0928480ff81ad2ef0dbbfb6feac9d96068
----
- hip-lang-config.cmake.in | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/hip-lang-config.cmake.in b/hip-lang-config.cmake.in
-index cee1b0e76b..b14b550f3d 100644
---- a/hip-lang-config.cmake.in
-+++ b/hip-lang-config.cmake.in
-@@ -90,12 +90,6 @@ set_property(TARGET hip-lang::device APPEND PROPERTY
- INTERFACE_COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:HIP>:SHELL:-mllvm;-amdgpu-early-inline-all=true;-mllvm;-amdgpu-function-calls=false>"
- )
-
--if (NOT EXISTS "${AMD_DEVICE_LIBS_PREFIX}/amdgcn/bitcode")
-- set_property(TARGET hip-lang::device APPEND PROPERTY
-- INTERFACE_COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:HIP>:--hip-device-lib-path=${AMD_DEVICE_LIBS_PREFIX}/lib>"
-- )
--endif()
--
- set_property(TARGET hip-lang::device APPEND PROPERTY
- INTERFACE_LINK_OPTIONS "$<$<LINK_LANGUAGE:HIP>:--hip-link>"
- )
diff --git a/a11397e769f71227cfc44353842ea90707610236.patch b/a11397e769f71227cfc44353842ea90707610236.patch
new file mode 100644
index 0000000..ec0b0e0
--- /dev/null
+++ b/a11397e769f71227cfc44353842ea90707610236.patch
@@ -0,0 +1,48 @@
+From a11397e769f71227cfc44353842ea90707610236 Mon Sep 17 00:00:00 2001
+From: Jeremy Newton <Jeremy.Newton(a)amd.com>
+Date: Wed, 31 May 2023 10:37:08 -0400
+Subject: [PATCH] Improve HIP_CLANG_INCLUDE detection
+
+Using:
+$HIP_CLANG_PATH."/../lib/clang/".$HIP_CLANG_VERSION;
+
+Isn't always correct, as the library and resource directory can be
+customized at build time in LLVM.
+
+E.g. Fedora, RHEL, and SLE uses "lib64/clang" instead of "lib/clang".
+
+So it's better to ask clang where its resource directory is instead.
+
+Change-Id: I026b245735af5e5310b9ee6188f3f080fac6eb51
+Signed-off-by: Jeremy Newton <Jeremy.Newton(a)amd.com>
+---
+ bin/hipconfig.pl | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/bin/hipconfig.pl b/bin/hipconfig.pl
+index dd03ad6..5abdfbf 100755
+--- a/bin/hipconfig.pl
++++ b/bin/hipconfig.pl
+@@ -64,19 +64,16 @@ BEGIN
+ );
+
+ if ($HIP_COMPILER eq "clang") {
+- $HIP_CLANG_VERSION = "";
++ $HIP_CLANG_INCLUDE = "";
+ if($isWindows) {
+- $HIP_CLANG_VERSION = `\"$HIP_CLANG_PATH/clang++\" --version`;
++ $HIP_CLANG_INCLUDE = `\"$HIP_CLANG_PATH/clang++\" --print-resource-dir`;
+ } else {
+- $HIP_CLANG_VERSION = `$HIP_CLANG_PATH/clang++ --version`;
++ $HIP_CLANG_INCLUDE = `$HIP_CLANG_PATH/clang++ --print-resource-dir`;
+ }
+- $HIP_CLANG_VERSION=~/.*clang version (\S+).*/;
+- $HIP_CLANG_VERSION=$1;
+
+ $CPP_CONFIG = " -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__=";
+
+ $HIP_PATH_INCLUDE = $HIP_PATH."/include";
+- $HIP_CLANG_INCLUDE = $HIP_CLANG_PATH."/../lib/clang/".$HIP_CLANG_VERSION;
+ if($isWindows) {
+ $CPP_CONFIG .= " -I\"$HIP_PATH_INCLUDE\" -I\"$HIP_CLANG_INCLUDE\"";
+ } else {
diff --git a/cbb393719633f5ade47efbe8d2946e5f649c1f22.patch b/cbb393719633f5ade47efbe8d2946e5f649c1f22.patch
deleted file mode 100644
index dcec432..0000000
--- a/cbb393719633f5ade47efbe8d2946e5f649c1f22.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From cbb393719633f5ade47efbe8d2946e5f649c1f22 Mon Sep 17 00:00:00 2001
-From: "Yaxun (Sam) Liu" <yaxun.liu(a)amd.com>
-Date: Thu, 16 Feb 2023 17:34:12 -0500
-Subject: [PATCH] SWDEV-380145 - [GFX][CQE] Mathlibs and Blender build failed
- in both RT and CPL Jobs
-
-Remove --hip-device-lib-path from hip-config.cmake
-and let clang determine device lib path
-
-Change-Id: Ice009875624692bc2895020c9577b94ddbd6840f
----
- hipamd/hip-config.cmake.in | 10 ----------
- 1 file changed, 10 deletions(-)
-
-diff --git a/hipamd/hip-config.cmake.in b/hipamd/hip-config.cmake.in
-index 7c4fe7f93..b96803ee8 100755
---- a/hipamd/hip-config.cmake.in
-+++ b/hipamd/hip-config.cmake.in
-@@ -206,16 +206,6 @@ if(HIP_COMPILER STREQUAL "clang")
-
- if (NOT compilePropIsSet)
- hip_add_interface_compile_flags(hip::device -x hip)
-- if (NOT EXISTS ${AMD_DEVICE_LIBS_PREFIX}/amdgcn/bitcode)
-- # This path is to support an older build of the device library
-- # TODO: To be removed in the future.
-- if(WIN32)
-- hip_add_interface_compile_flags(hip::device -fms-extensions -fms-compatibility)
-- hip_add_interface_compile_flags(hip::device --hip-device-lib-path=\"${HIP_PATH}/lib/bitcode\")
-- else()
-- hip_add_interface_compile_flags(hip::device --hip-device-lib-path=\"${AMD_DEVICE_LIBS_PREFIX}/lib\")
-- endif()
-- endif()
- endif()
-
- hip_add_interface_link_flags(hip::device --hip-link)
diff --git a/d9ceb6a3a38581f72b0eb443b736a23a30bc82ec.patch b/d9ceb6a3a38581f72b0eb443b736a23a30bc82ec.patch
deleted file mode 100644
index c39708d..0000000
--- a/d9ceb6a3a38581f72b0eb443b736a23a30bc82ec.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From d9ceb6a3a38581f72b0eb443b736a23a30bc82ec Mon Sep 17 00:00:00 2001
-From: Maneesh Gupta <maneesh.gupta(a)amd.com>
-Date: Mon, 20 Mar 2023 05:34:13 +0000
-Subject: [PATCH] SWDEV-361630 - Enable opencl build
-
-Change-Id: I19f8aa2e8157b8bfa053c502dcd63c52f0b6f104
----
- CMakeLists.txt | 29 +++--------------------------
- opencl/packaging/CMakeLists.txt | 6 +++---
- opencl/tools/cltrace/CMakeLists.txt | 2 +-
- rocclr/cmake/ROCclr.cmake | 2 ++
- 4 files changed, 9 insertions(+), 30 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c32344fc9..448acedc1 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -20,36 +20,11 @@
-
- project(clr)
- cmake_minimum_required(VERSION 3.16.8)
--include(GNUInstallDirs)
-
- ##########
- # Defaults
- ##########
--if(NOT DEFINED ROCM_PATH)
-- set(ROCM_PATH "/opt/rocm" CACHE STRING "Default ROCM installation directory.")
--endif()
--message(STATUS "ROCM Installation path(ROCM_PATH): ${ROCM_PATH}")
--
--if(UNIX)
-- set(CLR_DEFAULT_INSTALL_PREFIX "${ROCM_PATH}")
--endif()
--if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-- set(CMAKE_INSTALL_PREFIX ${CLR_DEFAULT_INSTALL_PREFIX} CACHE PATH "Installation path for HIP and OCL" FORCE)
--endif()
--set(CPACK_INSTALL_PREFIX ${CLR_DEFAULT_INSTALL_PREFIX} CACHE PATH "Package Installation path for HIP and OCL")
--
--if(IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX})
-- message(STATUS "HIP and OCL will be installed in: " ${CMAKE_INSTALL_PREFIX})
--else()
-- message(FATAL_ERROR "Don't know where to install HIP and OCL. Please specify absolute path using -DCMAKE_INSTALL_PREFIX")
--endif()
--
--set(CPACK_SET_DESTDIR ON CACHE BOOL "Installer package will install HIP and OCL to CMAKE_INSTALL_PREFIX instead of CPACK_PACKAGING_INSTALL_PREFIX")
--if (NOT CPACK_SET_DESTDIR)
-- set(CPACK_PACKAGING_INSTALL_PREFIX "${ROCM_PATH}" CACHE PATH "Default installation path of HIP and OCL installer package")
--endif()
--
--option(CLR_BUILD_HIP "Build HIP" ON)
-+option(CLR_BUILD_HIP "Build HIP" OFF)
- option(CLR_BUILD_OCL "Build OCL" OFF)
-
- #############
-@@ -57,6 +32,8 @@ option(CLR_BUILD_OCL "Build OCL" OFF)
- #############
- if(CLR_BUILD_HIP OR CLR_BUILD_OCL)
- add_subdirectory(rocclr)
-+else()
-+ message(FATAL_ERROR "Please enable building of one or more of the below runtimes:\n- HIP (-DCLR_BUILD_HIP=ON)\n- OpenCL (-DCLR_BUILD_OCL-ON)")
- endif()
- if(CLR_BUILD_HIP)
- add_subdirectory(hipamd)
-diff --git a/opencl/packaging/CMakeLists.txt b/opencl/packaging/CMakeLists.txt
-index a703f58a1..2bc01bc2e 100644
---- a/opencl/packaging/CMakeLists.txt
-+++ b/opencl/packaging/CMakeLists.txt
-@@ -14,9 +14,9 @@ set(CPACK_RPM_COMPONENT_INSTALL ON)
-
- install(TARGETS clinfo DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT binary)
- install(TARGETS amdocl DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary)
--install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary)
-+install(FILES ${opencl_SOURCE_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary)
-
--install(DIRECTORY ${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2/CL
-+install(DIRECTORY ${opencl_SOURCE_DIR}/khronos/headers/opencl2.2/CL
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT dev
- USE_SOURCE_PERMISSIONS
- PATTERN cl_d3d10.h EXCLUDE
-@@ -25,7 +25,7 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2/CL
-
- if(BUILD_ICD)
- install(TARGETS OpenCL DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT icd )
-- install(FILES ${CMAKE_SOURCE_DIR}/khronos/icd/LICENSE DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/rocm-ocl-icd COMPONENT icd)
-+ install(FILES ${opencl_SOURCE_DIR}/khronos/icd/LICENSE DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/rocm-ocl-icd COMPONENT icd)
- endif()
-
-
-diff --git a/opencl/tools/cltrace/CMakeLists.txt b/opencl/tools/cltrace/CMakeLists.txt
-index 263f9ae28..b162b4fb2 100644
---- a/opencl/tools/cltrace/CMakeLists.txt
-+++ b/opencl/tools/cltrace/CMakeLists.txt
-@@ -7,7 +7,7 @@ else()
- set_target_properties(cltrace PROPERTIES LINK_DEPENDS "${CMAKE_CURRENT_LIST_DIR}/cltrace.map")
- endif()
-
--target_include_directories(cltrace PRIVATE ${CMAKE_SOURCE_DIR} ${OPENCL_ICD_LOADER_HEADERS_DIR} ${ROCCLR_INCLUDE_DIR})
-+target_include_directories(cltrace PRIVATE ${CMAKE_SOURCE_DIR}/opencl ${OPENCL_ICD_LOADER_HEADERS_DIR} ${ROCCLR_INCLUDE_DIR})
-
- INSTALL(TARGETS cltrace
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-diff --git a/rocclr/cmake/ROCclr.cmake b/rocclr/cmake/ROCclr.cmake
-index 3b842b7df..0ef537771 100644
---- a/rocclr/cmake/ROCclr.cmake
-+++ b/rocclr/cmake/ROCclr.cmake
-@@ -46,6 +46,8 @@ include(ROCclrCompilerOptions)
-
- set(ROCCLR_SRC_DIR "${CMAKE_CURRENT_LIST_DIR}/..")
- mark_as_advanced(ROCCLR_SRC_DIR)
-+set(ROCCLR_INCLUDE_DIR "${ROCCLR_SRC_DIR}/include" PARENT_SCOPE)
-+mark_as_advanced(ROCCLR_INCLUDE_DIR)
-
- set_target_properties(rocclr PROPERTIES
- CXX_STANDARD 17
diff --git a/e18cbe64c173f6f9abf1b56f78cdd9bc7d4716d2.patch b/e18cbe64c173f6f9abf1b56f78cdd9bc7d4716d2.patch
deleted file mode 100644
index 62682f7..0000000
--- a/e18cbe64c173f6f9abf1b56f78cdd9bc7d4716d2.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From e18cbe64c173f6f9abf1b56f78cdd9bc7d4716d2 Mon Sep 17 00:00:00 2001
-From: ROCm CI Service Account <66695075+rocm-ci(a)users.noreply.github.com>
-Date: Wed, 1 Feb 2023 13:15:01 +0530
-Subject: [PATCH] SWDEV-380238 - hipcc passes incorrect device lib path to
- clang on windows (#3150)
-
-hipcc should not pass --hip-device-lib-path to clang by default so that clang
-decicde device lib path by itself.
-
-hipcc only passes --hip-device-lib-path to clang if env var DEVICE_LIB_PATH
-is specified.
-
-DEVICE_LIB_PATH should be depricated in the future and users should use
---hip-device-lib-path instead.
-
-Change-Id: I1ada35fb438643cbe68da777e3881aaa935162fa
----
- bin/hipcc.pl | 17 +----------------
- 1 file changed, 1 insertion(+), 16 deletions(-)
-
-diff --git a/bin/hipcc.pl b/bin/hipcc.pl
-index 6898cd0bba..f8fef933f9 100644
---- a/bin/hipcc.pl
-+++ b/bin/hipcc.pl
-@@ -123,25 +123,10 @@ BEGIN
- $HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME;
-
- if ($HIP_PLATFORM eq "amd") {
-- # If using ROCclr runtime, need to find HIP_ROCCLR_HOME
-- if (!defined $DEVICE_LIB_PATH and -e "$HIP_ROCCLR_HOME/lib/bitcode") {
-- $DEVICE_LIB_PATH = "$HIP_ROCCLR_HOME/lib/bitcode";
-- }
- $HIP_INCLUDE_PATH = "$HIP_ROCCLR_HOME/include";
- if (!defined $HIP_LIB_PATH) {
- $HIP_LIB_PATH = "$HIP_ROCCLR_HOME/lib";
- }
--
-- if (!defined $DEVICE_LIB_PATH) {
-- if (-e "$ROCM_PATH/amdgcn/bitcode") {
-- $DEVICE_LIB_PATH = "$ROCM_PATH/amdgcn/bitcode";
-- }
-- else {
-- # This path is to support an older build of the device library
-- # TODO: To be removed in the future.
-- $DEVICE_LIB_PATH = "$ROCM_PATH/lib";
-- }
-- }
- }
-
- if ($verbose & 0x2) {
-@@ -567,7 +552,7 @@ BEGIN
- }
-
- if ($hasHIP) {
-- if ($DEVICE_LIB_PATH ne "$ROCM_PATH/amdgcn/bitcode") {
-+ if (defined $DEVICE_LIB_PATH) {
- $HIPCXXFLAGS .= " --hip-device-lib-path=\"$DEVICE_LIB_PATH\"";
- }
- }
diff --git a/rocclr.spec b/rocclr.spec
index 90c9cb6..3497dbc 100644
--- a/rocclr.spec
+++ b/rocclr.spec
@@ -4,50 +4,37 @@
# See the file "rocclr/device/comgrctx.cpp" for reference:
# https://github.com/ROCm-Developer-Tools/ROCclr/blob/develop/device/comgrc...
-%global rocm_release 5.5
-%global rocm_patch 1
+%global rocm_release 5.6
+%global rocm_patch 0
%global rocm_version %{rocm_release}.%{rocm_patch}
Name: rocclr
Version: %{rocm_version}
-Release: 9%{?dist}
+Release: 1%{?dist}
Summary: ROCm Compute Language Runtime
Url: https://github.com/ROCm-Developer-Tools/clr
License: MIT
-Source0: https://github.com/ROCm-Developer-Tools/ROCclr/archive/refs/tags/rocm-%{v...
+Source0: https://github.com/ROCm-Developer-Tools/clr/archive/refs/tags/rocm-%{vers...
# TODO: it would be nice to separate this into its own package:
Source1: https://github.com/ROCm-Developer-Tools/HIP/archive/refs/tags/rocm-%{vers...
-# ROCm 5.7 will merge these sources with rocclr, for now they are separate:
-Source2: https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/refs/tag...
-Source3: https://github.com/ROCm-Developer-Tools/hipamd/archive/refs/tags/rocm-%{v...
+# TODO introduce HIPCC package so I can delete this:
+Source2: https://github.com/ROCm-Developer-Tools/HIPCC/archive/refs/tags/rocm-%{ve...
-# Patches to allow building ocl and hip at once:
-Patch0: https://github.com/ROCm-Developer-Tools/clr/commit/1bc186323fb83c6d2124a2...
-Patch1: https://github.com/ROCm-Developer-Tools/clr/commit/d9ceb6a3a38581f72b0eb4...
-# Newer GCC fixes:
-Patch2: https://github.com/ROCm-Developer-Tools/clr/commit/158e79358c811c31adebd6...
-Patch3: https://github.com/ROCm-Developer-Tools/clr/commit/70bdb7a5970d0c518c4ed4...
+Patch0: https://github.com/ROCm-Developer-Tools/clr/commit/2cda949920a2ae5e88702c...
+# Rebased upstream patch:
+#https://github.com/ROCm-Developer-Tools/clr/commit/03bfa6168453cca9ddbc6aa1bf46324db186cbb3
+Patch1: 0001-Install-.hipVersion-into-datadir-for-linux.patch
# Revert patch: this causes some issues with upstream LLVM 16 (RHBZ#2207599)
#https://github.com/ROCm-Developer-Tools/ROCclr/commit/041c00465b7adcee78085dc42253d42d1bb1f250
Patch4: 0001-Revert-SWDEV-325538-Enable-code-object-v5-by-default.patch
-# HIPCC fixes from upstream (rebased locally):
-# https://github.com/ROCm-Developer-Tools/HIPCC/commit/a11397e769f71227cfc4...
-Patch100: 0001-Improve-HIP_CLANG_INCLUDE-detection.patch
-# https://github.com/ROCm-Developer-Tools/HIPCC/commit/560bee0df3b95d9cf18d...
-Patch101: 0002-Improve-HIP_CLANG_PATH-detection.patch
-
-# Fix FHS compliance issue (currently working on an upstream-able patch):
-Patch5: 0001-Install-.hipVersion-into-datadir.patch
+# HIPCC fixes:
+Patch100: https://github.com/ROCm-Developer-Tools/HIPCC/commit/a11397e769f71227cfc4...
+Patch101: https://github.com/ROCm-Developer-Tools/HIPCC/commit/560bee0df3b95d9cf18d...
# Moves FindHIP cmake to datadir, to fit better with hip-devel being noarch:
-Patch6: 0002-Move-FindHIP-to-datadir.patch
-
-# Upstream patches to let clang use the default hip device lib path:
-Patch7: https://github.com/ROCm-Developer-Tools/clr/commit/cbb393719633f5ade47efb...
-Patch102: https://github.com/ROCm-Developer-Tools/HIP/commit/e18cbe64c173f6f9abf1b5...
-Patch103: https://github.com/ROCm-Developer-Tools/HIP/commit/802e3f439726b0c119f58d...
+Patch6: 0001-Move-FindHIP-to-datadir.patch
# a fix for building blender
Patch8: 0001-add-uint64_t-variant-for-__ffsll.patch
@@ -110,7 +97,7 @@ device information.
%package -n rocm-hip
Summary: ROCm HIP platform and device tool
Requires: comgr(major) = %{comgr_maj_api_ver}
-Requires: hip = %{version}-%{release}
+Requires: hipcc = %{version}-%{release}
%description -n rocm-hip
ROCm HIP implementation specifically for AMD platforms.
@@ -123,26 +110,30 @@ Requires: hip-devel = %{version}-%{release}
%description -n rocm-hip-devel
ROCm HIP development package.
-%package -n hip
-Summary: C++ Runtime API and Kernel Language
+%package -n hipcc
+Summary: HIP compiler driver
BuildArch: noarch
# hipcc requirements:
Requires: rocminfo >= %{rocm_release}
# 16.2 has an important fix for hipcc to work out of the box:
Requires: rocm-device-libs >= 16.2
Requires: clang
+# Renamed hip to hipcc to prepare for hipcc package split
+Provides: hip = %{version}-%{release}
+Obsoletes: hip < 5.6.0
-%description -n hip
-HIP is a C++ Runtime API and Kernel Language that allows developers to create
-portable applications for AMD and NVIDIA GPUs from the same source code.
+%description -n hipcc
+hipcc is a compiler driver utility that will call clang or nvcc, depending on
+target, and pass the appropriate include and library options for the target
+compiler and HIP infrastructure.
%package -n hip-devel
Summary: HIP API development package
BuildArch: noarch
-Requires: hip = %{version}-%{release}
%description -n hip-devel
-HIP API development package.
+HIP is a C++ Runtime API and Kernel Language that allows developers to create
+portable applications for AMD and NVIDIA GPUs from the same source code.
%package -n hip-doc
Summary: HIP API documentation package
@@ -152,16 +143,10 @@ BuildArch: noarch
This package contains documentation for the hip package
%prep
-%autosetup -N -c -T -a 1 -n clr-rocm-%{version}
-# TODO: use this for ROCm 5.7 or newer:
-#autosetup -p1 -m 0 -M 99 -a 1 -n clr-rocm-{version}
+%autosetup -N -a 1 -n clr-rocm-%{version}
-# Extract/patch sources manually (this won't be required in ROCm 5.7 or later):
-mkdir -p rocclr opencl hipamd
-gzip -dc %{SOURCE0} | tar -C rocclr --strip-components=1 -xof -
-gzip -dc %{SOURCE2} | tar -C opencl --strip-components=1 -xof -
-gzip -dc %{SOURCE3} | tar -C hipamd --strip-components=1 -xof -
-%autopatch -p1 -m 0 -M 99
+# ROCclr patches
+%autopatch -p1 -M 99
# Enable experimental pre vega platforms
sed -i 's/\(ROC_ENABLE_PRE_VEGA.*\)false/\1true/' rocclr/utils/flags.hpp
@@ -190,20 +175,17 @@ rm -r opencl/khronos/headers/opencl2.2/tests/
# Don't change default C FLAGS and CXX FLAGS:
sed -i '/CMAKE_C.*_FLAGS/d' hipamd/src/CMakeLists.txt
-# Fix libhip permissions:
-# upstream has a fix but it's not published yet and history has diverged anyway
-sed -i 's/FILES\(.*lib.*\.so\)/PROGRAMS\1/' hipamd/packaging/CMakeLists.txt
+pushd HIP-rocm-%{version}
+
+#TODO introduce hipcc package to remove this:
+gzip -dc %{SOURCE2} | tar --strip-components=1 -xof -
# HIP patches
-pushd HIP-rocm-%{version}
%autopatch -p1 -m 100
-# Fix script permissions:
-chmod 755 bin/hipcc.pl
# Fix script shebang (Fedora doesn't allow using "env"):
sed -i 's|\(/usr/bin/\)env perl|\1perl|' bin/hipcc.pl
-# Fix incorrect lib location in hipcc.pl (Fedora uses lib64):
-# TODO: propose upstream fix
+# Drop some unnecessary includes:
sed -i '/^# Add paths to common HIP includes:/,/^$HIPCFLAGS/d' bin/hipcc.pl
# Disable doxygen timestamps:
@@ -220,6 +202,7 @@ popd
-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-z,noexecstack \
-DHIP_COMMON_DIR=$(realpath HIP-rocm-%{version}) \
-DCMAKE_INSTALL_LIBDIR=%{_lib} \
+ -DHIPCC_BIN_DIR=$(realpath HIP-rocm-%{version})/bin \
-DHIP_PLATFORM=amd \
-DROCM_PATH=%{_prefix} \
-DBUILD_ICD=OFF \
@@ -263,6 +246,9 @@ if cmp -s %{buildroot}/%{_includedir}/hip/amd_detail/hip_prof_str.h \
ln -fs hip/amd_detail/hip_prof_str.h %{buildroot}/%{_includedir}
fi
+# I have no idea why this is happening, patch0 should fix this
+chmod 755 %{buildroot}%{_libdir}/lib*.so*
+
%files -n rocm-opencl
%license opencl/LICENSE.txt
%config(noreplace) %{_sysconfdir}/OpenCL/vendors/amdocl64.icd
@@ -286,6 +272,7 @@ fi
%{_libdir}/libamdhip64.so.5{,.*}
%{_libdir}/libhiprtc.so.5{,.*}
%{_libdir}/libhiprtc-builtins.so.5{,.*}
+%{_datadir}/hip
%files -n rocm-hip-devel
%{_bindir}/roc-*
@@ -296,17 +283,16 @@ fi
# Unnecessary file and is not FHS compliant:
%exclude %{_libdir}/.hipInfo
-%files -n hip
-%doc HIP-rocm-%{version}/README.md
-%license HIP-rocm-%{version}/LICENSE.txt
+%files -n hipcc
%{_bindir}/hipcc{,.pl}
%{_bindir}/hipconfig{,.pl}
%{perl_vendorlib}/hip*.pm
-%{_datadir}/hip
-# Upstream is moving code samples to another git tree in 5.7, so exclude this:
-%exclude %{_datadir}/hip/samples
+# Don't include windows files
+%exclude %{_bindir}/*.bat
%files -n hip-devel
+%doc HIP-rocm-%{version}/README.md
+%license HIP-rocm-%{version}/LICENSE.txt
%{_bindir}/hipdemangleatp
%{_bindir}/hipcc_cmake_linker_helper
%{_includedir}/hip
@@ -318,6 +304,9 @@ fi
%{_docdir}/hip
%changelog
+* Thu Jun 29 2023 Jeremy Newton <alexjnewt at hotmail dot com> - 5.6.0-1
+- Update to 5.6
+
* Sun Jun 18 2023 Tom Rix <trix(a)redhat.com> - 5.5.1-9
- Fix building upstream blender 3.5.x
diff --git a/sources b/sources
index 06a39a5..63476cc 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,3 @@
-SHA512 (HIP-5.5.1.tar.gz) = 9d57e96ff1d3eb14300d0809049a32dd8403851c70cd6d94cab8d17206a1210fef8b6f713063b041d35de37ef0ae10319e9d9803c65493a54fb59e66d29c9c4d
-SHA512 (ROCclr-5.5.1.tar.gz) = 4c12011d22a4f14d9e93250b2a38716eb973139afa1adbbbd51c0e0ed13c0b7c1f45a37c71ef937c5fdabf09e928d7913ca3332fc61b7a2c10d21421306a228f
-SHA512 (ROCm-OpenCL-Runtime-5.5.1.tar.gz) = 06786e818002dc43f64e4b0aaae0a0a2bcdad7acdb4662e1215d43277b107d65fb9a7f7441c31e3378c380cac860b1cd2eaefb5753246beffa4d9c10efced85e
-SHA512 (hipamd-5.5.1.tar.gz) = c979edf358a87abfeddaee0fe809d65c106b188c5684a1f229af962e5c4505f4108b1d14db160485048806d69cf5811ad330711b84a6c995386adb21916851c5
+SHA512 (HIP-5.6.0.tar.gz) = 2dc4c90fee2a2b019179e8f3ac9166a18e67b0fac96af54b1e05807e1aef71d48706e205aac130ad61e4e5c52e37cef9b62a80266950500b84e58f1ad21971aa
+SHA512 (HIPCC-5.6.0.tar.gz) = c20b23fe1ff0a1e7f26319521e915e820ae80b3cf4e3a6f52da70f8cbd90a7f6f3cc1b5a8e578cbffe69f51cb35996e2fe29cdb931aa538efb5e5963f836137e
+SHA512 (rocclr-5.6.0.tar.gz) = b9a1c921cbeec1caa2ea8315fdbcb72bc3ffc2dc5cb896db6307965eacac6ff204c902a8a4190a7d0930df77d64fddf380ba7b24b249d2a69e5c97db0ca7fca1
https://src.fedoraproject.org/rpms/rocclr/c/e1f24b8cde0c9b813ddbdf40a211d...
10Â months, 1Â week
jjames pushed to rpms/ocaml-uuseg (rawhide). "Initial import"
by notificationsï¼ fedoraproject.org
Notification time stamped 2023-06-30 21:13:57 UTC
From 01cf20fe022a09db17240b4026f75b6305cebf35 Mon Sep 17 00:00:00 2001
From: Jerry James <loganjerry(a)gmail.com>
Date: Jun 30 2023 21:13:38 +0000
Subject: Initial import
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9f2f860
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/uuseg-*.tbz
diff --git a/ocaml-uuseg.spec b/ocaml-uuseg.spec
new file mode 100644
index 0000000..0ef52d9
--- /dev/null
+++ b/ocaml-uuseg.spec
@@ -0,0 +1,85 @@
+%ifnarch %{ocaml_native_compiler}
+%global debug_package %{nil}
+%endif
+
+Name: ocaml-uuseg
+Version: 15.0.0
+Release: %autorelease
+Summary: Unicode text segmentation for OCaml
+
+License: ISC
+URL: https://erratique.ch/software/uuseg
+Source0: %{url}/releases/uuseg-%{version}.tbz
+
+BuildRequires: ocaml >= 4.03.0
+BuildRequires: ocaml-cmdliner-devel >= 1.1.0
+BuildRequires: ocaml-findlib
+BuildRequires: ocaml-ocamlbuild
+BuildRequires: ocaml-topkg-devel >= 1.0.3
+BuildRequires: ocaml-uucp-devel >= 15.0.0
+BuildRequires: ocaml-uutf-devel >= 1.0.0
+BuildRequires: python3
+BuildRequires: unicode-ucd
+
+%description
+Uuseg is an OCaml library for segmenting Unicode text. It implements
+the locale-independent Unicode text segmentation algorithms
+(http://www.unicode.org/reports/tr29/) to detect grapheme cluster, word
+and sentence boundaries and the Unicode line breaking algorithm
+(http://www.unicode.org/reports/tr14/) to detect line break
+opportunities.
+
+The library is independent from any IO mechanism or Unicode text data
+structure and it can process text without a complete in-memory
+representation.
+
+Uuseg depends on Uucp and optionally on Uutf for support for OCaml UTF-X
+encoded strings. It is distributed under the ISC license.
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: ocaml-uucp-devel%{?_isa}
+Requires: ocaml-uutf-devel%{?_isa}
+
+%description devel
+The %{name}-devel package contains libraries and signature
+files for developing applications that use %{name}.
+
+%prep
+%autosetup -n uuseg-%{version}
+
+# Files needed for the tests
+cp -p %{_datadir}/unicode/ucd/auxiliary/*BreakTest.txt test
+
+%build
+# Build the library and the tests
+ocaml pkg/pkg.ml build --dev-pkg false --with-uutf true --with-cmdliner true \
+ --tests true
+
+%install
+# Install the library
+mkdir -p %{buildroot}%{ocamldir}/uuseg/string
+cp -p _build/{opam,pkg/META} %{buildroot}%{ocamldir}/uuseg
+%ifarch %{ocaml_native_compiler}
+cp -a _build/src/*.{a,cma,cmi,cmt,cmti,cmx,cmxa,cmxs,mli} \
+ %{buildroot}%{ocamldir}/uuseg
+%else
+cp -a _build/src/*.{cma,cmi,cmt,cmti,mli} %{buildroot}%{ocamldir}/uuseg
+%endif
+mv %{buildroot}%{ocamldir}/uuseg/uuseg_string.* \
+ %{buildroot}%{ocamldir}/uuseg/string
+
+%ocaml_files
+
+%check
+ocaml pkg/pkg.ml test
+
+%files -f .ofiles
+%license LICENSE.md
+%doc CHANGES.md README.md
+
+%files devel -f .ofiles-devel
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..f5b9f3d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (uuseg-15.0.0.tbz) = 37ea83b582dd779a026cfae11f08f5d67ef79fce65a2cf03f2a9aabc7eb5de60c8e812524fa7531e4ff6e22a3b18228e3438a0143ce43be95f23237cc283576f
https://src.fedoraproject.org/rpms/ocaml-uuseg/c/01cf20fe022a09db17240b40...
10Â months, 1Â week
jjames pushed to rpms/ocaml-uucp (rawhide). "Initial import"
by notificationsï¼ fedoraproject.org
Notification time stamped 2023-06-30 21:06:08 UTC
From 7b29033a1420f7a3e47a64246d553b7944b5a949 Mon Sep 17 00:00:00 2001
From: Jerry James <loganjerry(a)gmail.com>
Date: Jun 30 2023 21:05:53 +0000
Subject: Initial import
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..225d2af
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/uucp-*.tbz
diff --git a/ocaml-uucp.spec b/ocaml-uucp.spec
new file mode 100644
index 0000000..59b69d8
--- /dev/null
+++ b/ocaml-uucp.spec
@@ -0,0 +1,70 @@
+%ifnarch %{ocaml_native_compiler}
+%global debug_package %{nil}
+%endif
+
+Name: ocaml-uucp
+Version: 15.0.0
+Release: %autorelease
+Summary: Unicode character properties for OCaml
+
+License: ISC
+URL: https://erratique.ch/software/uucp
+Source0: %{url}/releases/uucp-%{version}.tbz
+
+BuildRequires: ocaml >= 4.03.0
+BuildRequires: ocaml-cmdliner-devel >= 1.1.0
+BuildRequires: ocaml-findlib
+BuildRequires: ocaml-ocamlbuild
+BuildRequires: ocaml-topkg-devel >= 1.0.3
+BuildRequires: ocaml-uucd-devel
+BuildRequires: ocaml-uunf-devel
+BuildRequires: ocaml-uutf-devel >= 1.0.1
+BuildRequires: python3
+
+%description
+Uucp is an OCaml library providing efficient access to a selection of
+character properties of the Unicode character database
+(http://www.unicode.org/reports/tr44/).
+
+Uucp is independent from any Unicode text data structure and has no
+dependencies. It is distributed under the ISC license.
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and signature
+files for developing applications that use %{name}.
+
+%prep
+%autosetup -n uucp-%{version}
+
+%build
+# Build the library and the tests
+ocaml pkg/pkg.ml build --dev-pkg false --with-uutf true --with-uunf true \
+ --with-cmdliner true --tests true
+
+%install
+# Install the library
+mkdir -p %{buildroot}%{ocamldir}/uucp
+cp -p _build/{opam,pkg/META} %{buildroot}%{ocamldir}/uucp
+%ifarch %{ocaml_native_compiler}
+cp -a _build/src/*.{a,cma,cmi,cmt,cmti,cmx,cmxa,cmxs,mli} \
+ %{buildroot}%{ocamldir}/uucp
+%else
+cp -a _build/src/*.{cma,cmi,cmt,cmti,mli} %{buildroot}%{ocamldir}/uucp
+%endif
+%ocaml_files
+
+%check
+ocaml pkg/pkg.ml test
+
+%files -f .ofiles
+%license LICENSE.md
+%doc CHANGES.md README.md
+
+%files devel -f .ofiles-devel
+
+%changelog
+%autochangelog
diff --git a/sources b/sources
new file mode 100644
index 0000000..5047279
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (uucp-15.0.0.tbz) = ee4acff5666961766321e85e287fb9d5b8d50533319f22bf6f4eceb943242df2d0e0f4e775c4a140f68ca142837938eaa5926e22362215a3365ffe7f8768923b
https://src.fedoraproject.org/rpms/ocaml-uucp/c/7b29033a1420f7a3e47a64246...
10Â months, 1Â week
jsteffan pushed to rpms/memtest86+ (f38). "Use kernel-install to
manage BLS (rhbz#2209779) (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2023-06-30 21:04:37 UTC
From 8fc12e7d5a7336f1595832af80f11e20d3845d97 Mon Sep 17 00:00:00 2001
From: Jonathan Steffan <jsteffan(a)fedoraproject.org>
Date: Jun 30 2023 21:02:18 +0000
Subject: Use kernel-install to manage BLS (rhbz#2209779)
- Use KERNEL_INSTALL_PLUGINS to define configuration logic
- Require systemd > 252 that has support for KERNEL_INSTALL_PLUGINS
---
diff --git a/memtest86+.kernel-install-plugin b/memtest86+.kernel-install-plugin
new file mode 100644
index 0000000..9710771
--- /dev/null
+++ b/memtest86+.kernel-install-plugin
@@ -0,0 +1,98 @@
+#!/usr/bin/bash
+
+# Sanity Checks
+if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
+ exit 0
+fi
+if ! [[ $KERNEL_INSTALL_BOOT_ROOT ]]; then
+ exit 0
+fi
+
+# Setup variables
+[[ -f /etc/default/grub ]] && . /etc/default/grub
+[[ -f /etc/os-release ]] && . /etc/os-release
+
+COMMAND="$1"
+MEMTEST_VERSION="$2"
+BOOT_DIR_ABS="$3"
+MEMTEST_IMAGE="$4"
+
+IMAGE_DIR="${MEMTEST_IMAGE%/*}"
+BOOT_ROOT="${KERNEL_INSTALL_BOOT_ROOT}"
+MACHINE_ID="${KERNEL_INSTALL_MACHINE_ID}"
+BLS_DIR="${BOOT_ROOT}/loader/entries"
+BLS_ENTRY="${BLS_DIR}/${MACHINE_ID}-0-memtest86+.conf"
+
+# Setup functions
+mkbls_grub() {
+ local memtestver=$1 && shift
+ local memtestimg=$1 && shift
+
+ cat <<EOF
+title Memtest86+ (${memtestimg}-${memtestver})
+version 0-${memtestver}-memtest86+
+linux /${memtestimg}
+grub_users \$grub_users
+grub_arg --unrestricted
+grub_class ${ID}
+EOF
+}
+
+# If ${BOOT_DIR_ABS} exists, some other boot loader is active.
+[[ -d "${BOOT_DIR_ABS}" ]] && exit 0
+
+case "$COMMAND" in
+ add)
+ # Install into BOOT_ROOT, if not already there
+ if [[ "${MEMTEST_DIR}" != "${BOOT_ROOT}" ]]; then
+ for i in \
+ "$MEMTEST_IMAGE"
+ do
+ [[ -e "$i" ]] || continue
+ rm -f "${BOOT_ROOT}/${i##*/}"
+ cp -aT "$i" "${BOOT_ROOT}/${i##*/}"
+ command -v restorecon &>/dev/null && \
+ restorecon -R "${BOOT_ROOT}/${i##*/}"
+ done
+ fi
+
+ # Generate GRUB BLS, if enabled
+ if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]]; then
+ [[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR"
+ mkbls_grub "${MEMTEST_VERSION}" "${MEMTEST_IMAGE##*/}" > "${BLS_ENTRY}"
+ command -v restorecon &>/dev/null && restorecon -R "${BLS_ENTRY}"
+
+ MEMTEST_LOC="$(grep '^linux[ \t]' "${BLS_ENTRY}" | sed -e 's,^linux[ \t]*,,')"
+ if [[ "$(grub2-probe --device $(grub2-probe --target=device /) --target=fs)" == "btrfs" &&
+ "${SUSE_BTRFS_SNAPSHOT_BOOTING}" == "true" ]]; then
+ MEMTEST_RELPATH="$(grub2-mkrelpath -r ${BOOT_ROOT}${MEMTEST_LOC})"
+ else
+ MEMTEST_RELPATH="$(grub2-mkrelpath ${BOOT_ROOT}${MEMTEST_LOC})"
+ fi
+
+ BOOTPREFIX="$(dirname ${MEMTEST_RELPATH})"
+
+ if [[ "${MEMTEST_LOC}" != "${MEMTEST_RELPATH}" ]]; then
+ sed -i -e "s,^linux.*,linux ${BOOTPREFIX}${MEMTEST_LOC},g" "${BLS_ENTRY}"
+ fi
+
+ exit 77
+ fi
+ ;;
+ remove)
+ # Find MEMTEST_IMAGE location in BLS_ENTRY, delete both MEMTEST_IMAGE and BLS_ENTRY
+ if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]]; then
+ if [[ -f "${BLS_ENTRY}" ]]; then
+ MEMTEST_IMAGE="$(grep '^linux[ \t]' "${BLS_ENTRY}" | sed -e 's,^linux[ \t]*,,')"
+ if [[ -f "${BOOT_ROOT}${MEMTEST_IMAGE}" ]]; then
+ rm -f "${BOOT_ROOT}${MEMTEST_IMAGE}"
+ fi
+ rm -f "${BLS_ENTRY}"
+ fi
+
+ exit 77
+ fi
+ ;;
+ *)
+ ;;
+esac
diff --git a/memtest86+.spec b/memtest86+.spec
index a4f2d98..4e52b8d 100644
--- a/memtest86+.spec
+++ b/memtest86+.spec
@@ -15,16 +15,18 @@ Memtest86+.
%global mt_isa ia32
%endif
-Name: memtest86+
-Version: 6.20
-Release: %autorelease
-Summary: Stand-alone memory tester for x86-64 computers
-License: GPL-2.0-only
-URL: https://www.memtest.org/
-Source0: https://github.com/memtest86plus/memtest86plus/archive/v%{version}/memtes...
-
-BuildRequires: gcc, make, xorriso, dosfstools, mtools
-ExclusiveArch: x86_64 %{ix86}
+Name: memtest86+
+Version: 6.20
+Release: %autorelease
+Summary: Stand-alone memory tester for x86-64 computers
+License: GPL-2.0-only
+URL: https://www.memtest.org/
+Source0: https://github.com/memtest86plus/memtest86plus/archive/v%{version}/memtes...
+Source1: memtest86+.kernel-install-plugin
+
+BuildRequires: gcc, make, xorriso, dosfstools, mtools
+Requires(pre): systemd-udev >= 252
+ExclusiveArch: x86_64 %{ix86}
%description
%wordwrap -v common_description
@@ -49,6 +51,7 @@ pushd build%{__isa_bits}
install -m 0644 memtest.efi %{buildroot}%{_libdir}/%{name}/memtest86+%{mt_isa}.efi
install -m 0644 memtest.bin %{buildroot}%{_libdir}/%{name}/memtest86+%{mt_isa}.bin
install -m 0644 memtest.iso %{buildroot}%{_datarootdir}/%{name}/memtest86+%{mt_isa}.iso
+install -m 0755 %{SOURCE1} %{buildroot}%{_libdir}/%{name}/memtest86+.kernel-install-plugin
popd
@@ -56,27 +59,23 @@ popd
%license LICENSE
%doc README.md
%{_libdir}/%{name}/memtest86+%{mt_isa}.*
+%{_libdir}/%{name}/memtest86+.kernel-install-plugin
%{_datarootdir}/%{name}/memtest86+%{mt_isa}.iso
%posttrans
-install -m 0644 %{_libdir}/%{name}/memtest86+%{mt_isa}.* /boot/
+MEMTEST_IMAGE="memtest86+%{mt_isa}.bin"
if [ -d /sys/firmware/efi/ ]; then
-cat << EOBLSEFI > /boot/loader/entries/`cat /etc/machine-id`-0-memtest86+-%{version}-uefi.%{mt_isa}.conf
-title Memtest86+ v%{version} %{mt_isa} UEFI
-linux /memtest86+%{mt_isa}.efi
-EOBLSEFI
-else
-cat << EOBLSBIN > /boot/loader/entries/`cat /etc/machine-id`-0-memtest86+-%{version}-bios.%{mt_isa}.conf
-title Memtest86+ v%{version} %{mt_isa} BIOS
-linux /memtest86+%{mt_isa}.bin
-EOBLSBIN
+MEMTEST_IMAGE="memtest86+%{mt_isa}.efi"
fi
+KERNEL_INSTALL_PLUGINS=%{_libdir}/%{name}/memtest86+.kernel-install-plugin \
+kernel-install add %{version} %{_libdir}/%{name}/${MEMTEST_IMAGE}
exit 0
-%postun
+
+%preun
if [ $1 -eq 0 ]; then
-rm -f /boot/memtest86+%{mt_isa}.*
-rm -f /boot/loader/entries/`cat /etc/machine-id`-0-memtest86+-%{version}-*.%{mt_isa}.conf
+KERNEL_INSTALL_PLUGINS=%{_libdir}/%{name}/memtest86+.kernel-install-plugin \
+kernel-install remove %{version}
fi
exit 0
https://src.fedoraproject.org/rpms/memtest86+/c/8fc12e7d5a7336f1595832af8...
10Â months, 1Â week
salimma pushed to rpms/python-pystemd (f38). "Rebuilt for Python 3.12"
by notificationsï¼ fedoraproject.org
Notification time stamped 2023-06-30 21:02:54 UTC
From 7eca01657a398a4f8759ab9baa60342017956d92 Mon Sep 17 00:00:00 2001
From: Python Maint <python-maint(a)redhat.com>
Date: Jun 14 2023 18:23:15 +0000
Subject: Rebuilt for Python 3.12
---
diff --git a/python-pystemd.spec b/python-pystemd.spec
index c7aafa3..08e85b7 100644
--- a/python-pystemd.spec
+++ b/python-pystemd.spec
@@ -6,7 +6,7 @@
Name: python-%{pypi_name}
Version: 0.13.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A thin Cython-based wrapper on top of libsystemd
License: LGPL-2.1-or-later
@@ -69,6 +69,9 @@ popd
%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%changelog
+* Wed Jun 14 2023 Python Maint <python-maint(a)redhat.com> - 0.13.1-2
+- Rebuilt for Python 3.12
+
* Wed May 17 2023 Davide Cavalca <dcavalca(a)fedoraproject.org> - 0.13.1-1
- Update to 0.13.1; Fixes: RHBZ#2207826
- Drop some unnecessary logic from the spec
https://src.fedoraproject.org/rpms/python-pystemd/c/7eca01657a398a4f8759a...
10Â months, 1Â week
salimma pushed to rpms/python-pystemd (f38). "Update to 0.13.2;
Fixes: rhbz#2210519 (..more)"
by notificationsï¼ fedoraproject.org
Notification time stamped 2023-06-30 21:02:54 UTC
From d05a4eb4e204553ea063be4b08de8fa9a31d8ffc Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <salimma(a)fedoraproject.org>
Date: Jun 30 2023 20:44:31 +0000
Subject: Update to 0.13.2; Fixes: rhbz#2210519
Signed-off-by: Michel Alexandre Salim <salimma(a)fedoraproject.org>
---
diff --git a/.gitignore b/.gitignore
index 6438e16..db6398f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
/pystemd-0.11.0.tar.gz
/pystemd-0.13.0.tar.gz
/pystemd-0.13.1.tar.gz
+/pystemd-0.13.2.tar.gz
diff --git a/python-pystemd.spec b/python-pystemd.spec
index 08e85b7..286d16e 100644
--- a/python-pystemd.spec
+++ b/python-pystemd.spec
@@ -5,8 +5,8 @@
%global pypi_name pystemd
Name: python-%{pypi_name}
-Version: 0.13.1
-Release: 2%{?dist}
+Version: 0.13.2
+Release: 1%{?dist}
Summary: A thin Cython-based wrapper on top of libsystemd
License: LGPL-2.1-or-later
@@ -69,6 +69,9 @@ popd
%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%changelog
+* Fri Jun 30 2023 Michel Alexandre Salim <salimma(a)fedoraproject.org> - 0.13.2-1
+- Update to 0.13.2; Fixes: rhbz#2210519
+
* Wed Jun 14 2023 Python Maint <python-maint(a)redhat.com> - 0.13.1-2
- Rebuilt for Python 3.12
diff --git a/sources b/sources
index 27d5d65..488306d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (pystemd-0.13.1.tar.gz) = faf168e2dfa676c5e0f1c985c79c5839b83c6e5f746e5ea1027ce09b89927fdd9cb0fd0a5b55b3601b7bfc9c8a5c3163f42b620cc5b75b14e2ec1dc964eeefe1
+SHA512 (pystemd-0.13.2.tar.gz) = 86358b1d023a0587802f327b5015947664cc0079a417dc9bd1234cae686b15efd526d6ba2374cca2463c418adedf7250e54d1e5e53e74202992cbf2eba687ba2
https://src.fedoraproject.org/rpms/python-pystemd/c/d05a4eb4e204553ea063b...
10Â months, 1Â week