From bcdbb6a5a12cccc4501385bb598e0a5f8998558e Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Tue, 21 May 2024 13:59:07 +0800 Subject: [PATCH 1/2] update to libva-2.20.0-1.src.rpm Signed-off-by: Zhao Hang --- dist | 2 +- download | 2 +- libva-2.13.0-covscan.patch | 46 --------- libva-2.13.0-crocus.patch | 22 ----- libva-2.13.0-strong-sp.patch | 88 ------------------ libva.spec | 175 ++++++++++++++++++++++++----------- 6 files changed, 124 insertions(+), 211 deletions(-) delete mode 100644 libva-2.13.0-covscan.patch delete mode 100644 libva-2.13.0-crocus.patch delete mode 100644 libva-2.13.0-strong-sp.patch diff --git a/dist b/dist index 9c0e36e..89c1faf 100644 --- a/dist +++ b/dist @@ -1 +1 @@ -an8 +an9 diff --git a/download b/download index d8cdea7..4e39d70 100644 --- a/download +++ b/download @@ -1 +1 @@ -d8753a1ed468b5a8ac343d0ec64d0f13 libva-2.13.0.tar.gz +21ce1b9ee27fe01e3b1d4302876f18d9 libva-2.20.0.tar.gz diff --git a/libva-2.13.0-covscan.patch b/libva-2.13.0-covscan.patch deleted file mode 100644 index 3e645c0..0000000 --- a/libva-2.13.0-covscan.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/va/va.c b/va/va.c -index 115f785..62d39b4 100644 ---- a/va/va.c -+++ b/va/va.c -@@ -733,8 +733,10 @@ VAStatus vaInitialize( - } - /*load driver one by one, until load success */ - for (candidate_index = 0; candidate_index < num_candidates; candidate_index ++) { -- if (driver_name) -+ if (driver_name) { - free(driver_name); -+ driver_name = NULL; -+ } - vaStatus = va_getDriverNameByIndex(dpy, &driver_name, candidate_index); - if (vaStatus != VA_STATUS_SUCCESS) { - va_errorMessage(dpy, "vaGetDriverNameByIndex() failed with %s, driver_name = %s\n", vaErrorStr(vaStatus), driver_name); -diff --git a/va/va_trace.c b/va/va_trace.c -index b291ade..4efdf1a 100644 ---- a/va/va_trace.c -+++ b/va/va_trace.c -@@ -40,6 +40,7 @@ - #include "va_str.h" - #include "va_vpp.h" - #include -+#include - #include - #include - #include -@@ -5824,7 +5825,7 @@ void va_TraceSyncSurface2( - TRACE_FUNCNAME(idx); - - va_TraceMsg(trace_ctx, "\tsurface = 0x%08x\n", surface); -- va_TraceMsg(trace_ctx, "\ttimeout_ns = %d\n", timeout_ns); -+ va_TraceMsg(trace_ctx, "\ttimeout_ns = %" PRIu64 "\n", timeout_ns); - va_TraceMsg(trace_ctx, NULL); - - DPY2TRACE_VIRCTX_EXIT(pva_trace); -@@ -5905,7 +5906,7 @@ void va_TraceSyncBuffer( - TRACE_FUNCNAME(idx); - - va_TraceMsg(trace_ctx, "\tbuf_id = 0x%08x\n", buf_id); -- va_TraceMsg(trace_ctx, "\ttimeout_ns = %d\n", timeout_ns); -+ va_TraceMsg(trace_ctx, "\ttimeout_ns = %" PRIu64 "\n", timeout_ns); - va_TraceMsg(trace_ctx, NULL); - - DPY2TRACE_VIRCTX_EXIT(pva_trace); diff --git a/libva-2.13.0-crocus.patch b/libva-2.13.0-crocus.patch deleted file mode 100644 index b86d40e..0000000 --- a/libva-2.13.0-crocus.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 906d70e8e04a8a7f5062053a1f01fb318deb6910 Mon Sep 17 00:00:00 2001 -From: Jan Beich -Date: Sun, 31 Oct 2021 07:32:18 +0000 -Subject: [PATCH] VA/X11: VAAPI driver mapping for crocus DRI driver - -crocus supports Gen4 to Gen7.5, so only i965 can be used. ---- - va/x11/va_x11.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/va/x11/va_x11.c b/va/x11/va_x11.c -index 4d06acd2..9687afaf 100644 ---- a/va/x11/va_x11.c -+++ b/va/x11/va_x11.c -@@ -55,6 +55,7 @@ static const struct driver_name_map g_dri2_driver_name_map[] = { - { "i965", 4, "i965" }, // Intel i965 VAAPI driver with i965 DRI driver - { "iris", 4, "iHD" }, // Intel iHD VAAPI driver with iris DRI driver - { "iris", 4, "i965" }, // Intel i965 VAAPI driver with iris DRI driver -+ { "crocus", 6, "i965" }, // Intel i965 VAAPI driver with crocus DRI driver - { NULL, 0, NULL } - }; - diff --git a/libva-2.13.0-strong-sp.patch b/libva-2.13.0-strong-sp.patch deleted file mode 100644 index 672ead6..0000000 --- a/libva-2.13.0-strong-sp.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 3f43acf73403a8241fb0f35cdf645a473affa28d Mon Sep 17 00:00:00 2001 -From: Jiri Kucera -Date: Wed, 6 Apr 2022 12:39:16 +0200 -Subject: [PATCH] Use also strong stack protection if supported - -The current solution appends -fstack-protector to CFLAGS which may -override -fstack-protector-strong set by user. The proposed change -prefers -fstack-protector-strong over -fstack-protector if it is -supported and specified by the user in CFLAGS. ---- - configure.ac | 41 +++++++++++++++++++++++++++++++++-------- - va/Makefile.am | 4 +--- - 2 files changed, 34 insertions(+), 11 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 37485154..6d6acd14 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -214,21 +214,46 @@ AC_SEARCH_LIBS([dlopen], [dl], [], [ - AC_MSG_ERROR([unable to find the dlopen() function]) - ]) - --# Check for -fstack-protector --ssp_cc=yes -+# Check for -fstack-protector and -fstack-protector-strong -+SSP_CC_FLAG="" - if test "X$CC-cc" != "X"; then -- AC_MSG_CHECKING([whether ${CC-cc} accepts -fstack-protector]) -+ # Do not duplicate options in CFLAGS -+ ssp_sp_set=no -+ ssp_sps_set=no -+ for ssp_x in $CFLAGS; do -+ case "X$ssp_x" in -+ X-fstack-protector) ssp_sp_set=yes ;; -+ X-fstack-protector-strong) ssp_sps_set=yes ;; -+ esac -+ done - ssp_old_cflags="$CFLAGS" -- CFLAGS="$CFLAGS -fstack-protector" -- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])], [], [ssp_cc=no]) -+ # Prefer -fstack-protector-strong over -fstack-protector -+ if test "X$ssp_sps_set" = "Xno"; then -+ SSP_CC_FLAG="-fstack-protector-strong" -+ fi -+ AC_MSG_CHECKING([whether ${CC-cc} accepts -fstack-protector-strong]) -+ CFLAGS="$ssp_old_cflags $SSP_CC_FLAG" -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])], [ssp_cc=yes], [ssp_cc=no]) - AC_MSG_RESULT([$ssp_cc]) - if test "X$ssp_cc" = "Xno"; then -- CFLAGS="$ssp_old_cflags" -- else -+ # Fallback to -fstack-protector -+ if test "X$ssp_sp_set" = "Xno"; then -+ SSP_CC_FLAG="-fstack-protector" -+ fi -+ AC_MSG_CHECKING([whether ${CC-cc} accepts -fstack-protector]) -+ CFLAGS="$ssp_old_cflags $SSP_CC_FLAG" -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])], [ssp_cc=yes], [ssp_cc=no]) -+ AC_MSG_RESULT([$ssp_cc]) -+ if test "X$ssp_cc" = "Xno"; then -+ SSP_CC_FLAG="" -+ fi -+ fi -+ CFLAGS="$ssp_old_cflags $SSP_CC_FLAG" -+ if test "X$ssp_cc" = "Xyes"; then - AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.]) - fi - fi --AM_CONDITIONAL(USE_SSP, test "$ssp_cc" = "yes") -+AC_SUBST(SSP_CC_FLAG) - - # Check for DRM (mandatory) - LIBDRM_VERSION=libdrm_version -diff --git a/va/Makefile.am b/va/Makefile.am -index f3e61afa..3c4ba272 100644 ---- a/va/Makefile.am -+++ b/va/Makefile.am -@@ -82,9 +82,7 @@ libva_cflags = \ - -Wall \ - $(NULL) - --if USE_SSP --libva_cflags += -fstack-protector --endif -+libva_cflags += $(SSP_CC_FLAG) - - lib_LTLIBRARIES = libva.la - libvaincludedir = ${includedir}/va diff --git a/libva.spec b/libva.spec index 9ce56e3..843abdb 100644 --- a/libva.spec +++ b/libva.spec @@ -1,33 +1,33 @@ -%define anolis_release .0.1 +#global pre_release .pre1 Name: libva -Version: 2.13.0 -Release: 2%{anolis_release}%{?dist} +Version: 2.20.0 +Release: 1%{?dist} Summary: Video Acceleration (VA) API for Linux License: MIT URL: https://github.com/intel/libva -Source0: https://github.com/intel/libva/archive/%{version}/%{name}-%{version}.tar.gz -Patch0: libva-2.13.0-crocus.patch -Patch1: libva-2.13.0-strong-sp.patch -Patch2: libva-2.13.0-covscan.patch +Source0: %{url}/archive/%{version}%{?pre_release}/%{name}-%{version}%{?pre_release}.tar.gz -BuildRequires: libtool +BuildRequires: meson +BuildRequires: gcc BuildRequires: libudev-devel +%{!?_without_xorg: BuildRequires: libXext-devel BuildRequires: libXfixes-devel +} BuildRequires: libdrm-devel BuildRequires: libpciaccess-devel BuildRequires: mesa-libEGL-devel BuildRequires: mesa-libGL-devel BuildRequires: mesa-libGLES-devel %{!?_without_wayland: -BuildRequires: wayland-devel -BuildRequires: pkgconfig(wayland-client) >= 1 -BuildRequires: pkgconfig(wayland-scanner) >= 1 +BuildRequires: wayland-devel +BuildRequires: pkgconfig(wayland-client) >= 1 +BuildRequires: pkgconfig(wayland-scanner) >= 1 } # owns the %%{_libdir}/dri directory -Requires: mesa-dri-filesystem +Requires: mesa-filesystem%{_isa} %description Libva is a library providing the VA API video acceleration API. @@ -35,79 +35,148 @@ Libva is a library providing the VA API video acceleration API. %package devel Summary: Development files for %{name} Requires: %{name}%{_isa} = %{version}-%{release} -Requires: pkgconfig %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. -%package doc -Summary: Documents for %{name} -BuildArch: noarch -Requires: %{name} = %{version}-%{release} - -%description doc -Doc pages for %{name}. - %prep -%autosetup -p1 -autoreconf -vif +%autosetup -p1 -n %{name}-%{version}%{?pre_release} %build -%configure --disable-static \ - --enable-glx \ -%{?_without_wayland:--disable-wayland} +%meson \ +%{?_without_xorg: -Dwith_glx=no -Dwith_x11=no} \ +%{?_without_wayland: -Dwith_wayland=no} -# remove rpath from libtool -sed -i.rpath 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i.rpath 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool - -%make_build V=1 +%meson_build %install -%make_install INSTALL="install -p" -find %{buildroot} -regex ".*\.la$" | xargs rm -f -- +%meson_install %ldconfig_scriptlets %files +%doc NEWS %license COPYING %ghost %{_sysconfdir}/libva.conf -%{_libdir}/libva*.so.* +%{_libdir}/libva.so.2* +%{_libdir}/libva-drm.so.2* +%{!?_without_wayland: +%{_libdir}/libva-wayland.so.2* +} +%{!?_without_xorg: +%{_libdir}/libva-x11.so.2* +%{_libdir}/libva-glx.so.2* +} %files devel %{_includedir}/va %{_libdir}/libva*.so %{_libdir}/pkgconfig/libva*.pc -%files doc -%doc NEWS - %changelog -* Tue Jul 04 2023 Zhao Hang - 2.13.0-2.0.1 -- Add doc sub package +* Tue Oct 24 2023 Than Ngo - 2.20.0-1 +- RHEL-6895, rebase to 2.20.0 + +* Tue Apr 26 2022 Jiri Kucera - 2.11.0-5 +- Rebuild + Resolves: #2059006 + +* Thu Feb 17 2022 Jiri Kucera - 2.11.0-4 +- Prefer -fstack-protector-strong + Resolves: #2044878 + +* Mon Aug 09 2021 Mohan Boddu - 2.11.0-3 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Fri Apr 16 2021 Mohan Boddu - 2.11.0-2 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Wed Mar 24 2021 Nicolas Chauvet - 2.11.0-1 +- Update to 2.11.0 + +* Tue Jan 26 2021 Fedora Release Engineering - 2.10.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Dec 11 2020 Nicolas Chauvet - 2.10.0-1 +- Update to 2.10.0 + +* Sun Sep 13 2020 Nicolas Chauvet - 2.9.0-1 +- Update to 2.9.0 + +* Tue Sep 01 2020 Nicolas Chauvet - 2.9.0-0.1.pre1 +- Update to 2.9.0.pre1 -* Thu Jul 14 2022 Jiri Kucera - 2.13.0-2 -- Fix covscan issues - Related: #2099907 +* Tue Jul 28 2020 Fedora Release Engineering - 2.8.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild -* Wed Jul 13 2022 Jiri Kucera - 2.13.0-1 -- Update to 2.13.0 - Add support for crocus DRI driver - Resolves: #2099907 +* Sun Jun 28 2020 Nicolas Chauvet - 2.8.0-1 +- Update to 2.8.0 -* Sat Nov 30 2019 Jiri Kucera - 2.5.0-2 -- Fix issues found by static analysis - Related: #1728792 +* Mon Apr 20 2020 Nicolas Chauvet - 2.7.1-1 +- Update to 2.7.1 -* Tue Nov 19 2019 Jiri Kucera - 2.5.0-1 +* Tue Apr 14 2020 Frantisek Zatloukal - 2.7.0-4 +- Backport upstream fix for Intel Iris Driver (https://github.com/intel/libva/pull/406) + +* Fri Apr 10 2020 Nicolas Chauvet - 2.7.0-3 +- Drop previous patch + +* Sat Apr 04 2020 Nicolas Chauvet - 2.7.0-2 +- Update mapping for iris + +* Thu Apr 02 2020 Nicolas Chauvet - 2.7.0-1 +- Update to 2.7.0 + +* Wed Mar 18 2020 Nicolas Chauvet - 2.7.0-0.1.pre1 +- Update to 2.7.0.pre1 + +* Wed Jan 29 2020 Fedora Release Engineering - 2.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jan 17 2020 Nicolas Chauvet - 2.6.1-1 +- Update to 2.6.1 + +* Mon Dec 30 2019 Vasiliy N. Glazov - 2.6.0-1 +- Update to 2.6.0 release + +* Fri Dec 20 2019 Vasiliy N. Glazov - 2.6.0-0.2 +- Fixed missed slice parameter + +* Sun Sep 22 2019 Nicolas Chauvet - 2.6.0-0.1 +- Update to 2.6.0-pre1 + +* Thu Jul 25 2019 Fedora Release Engineering - 2.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Jul 05 2019 Nicolas Chauvet - 2.5.0-1 - Update to 2.5.0 - Resolves: #1728792 -* Fri Jun 07 2019 Jiri Kucera - 2.4.1-1 +* Mon Apr 08 2019 Nicolas Chauvet - 2.4.1-1 - Update to 2.4.1 - Resolves: #1493944 + +* Fri Feb 01 2019 Fedora Release Engineering - 2.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jan 25 2019 Nicolas Chauvet - 2.4.0-1 +- Update to 2.4.0 + +* Fri Oct 05 2018 Nicolas Chauvet - 2.3.0-1 +- Update to 2.3.0 + +* Fri Jul 13 2018 Fedora Release Engineering - 2.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jul 11 2018 Nicolas Chauvet - 2.2.0-1 +- Update to 2.2.0 + +* Sat Jun 02 2018 Nicolas Chauvet - 2.1.1-0.1.pre1 +- Update to 2.1.1.pre1-20180601 + +* Mon Mar 19 2018 Nicolas Chauvet - 2.1.0-2 +- Switch to github.com/intel URL * Mon Feb 12 2018 Nicolas Chauvet - 2.1.0-1 - Update to 2.1.0 -- Gitee From 98a46e07d3c6d8fc331ebbd57ecc8714568bbe19 Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Tue, 19 Jul 2022 14:03:48 +0800 Subject: [PATCH 2/2] spec: add doc sub package Signed-off-by: Zhao Hang --- libva.spec | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/libva.spec b/libva.spec index 843abdb..9102c26 100644 --- a/libva.spec +++ b/libva.spec @@ -1,8 +1,9 @@ +%define anolis_release .0.1 #global pre_release .pre1 Name: libva Version: 2.20.0 -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} Summary: Video Acceleration (VA) API for Linux License: MIT URL: https://github.com/intel/libva @@ -40,6 +41,14 @@ Requires: %{name}%{_isa} = %{version}-%{release} The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%package doc +Summary: Documents for %{name} +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +%description doc +Doc pages for %{name}. + %prep %autosetup -p1 -n %{name}-%{version}%{?pre_release} @@ -57,7 +66,6 @@ developing applications that use %{name}. %ldconfig_scriptlets %files -%doc NEWS %license COPYING %ghost %{_sysconfdir}/libva.conf %{_libdir}/libva.so.2* @@ -75,7 +83,13 @@ developing applications that use %{name}. %{_libdir}/libva*.so %{_libdir}/pkgconfig/libva*.pc +%files doc +%doc NEWS + %changelog +* Tue May 21 2024 Zhao Hang - 2.20.0-1.0.1 +- Add doc sub package + * Tue Oct 24 2023 Than Ngo - 2.20.0-1 - RHEL-6895, rebase to 2.20.0 -- Gitee