commit 1ae58df9d89ae98ac1378aca9774d27724c70a9b Author: MSVSphere Packaging Team Date: Fri Oct 25 18:24:25 2024 +0300 import pixman-0.43.4-1.el10 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..87819a5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/pixman-0.43.4.tar.xz diff --git a/.pixman.metadata b/.pixman.metadata new file mode 100644 index 0000000..c9e9eb0 --- /dev/null +++ b/.pixman.metadata @@ -0,0 +1 @@ +678cdf71b2e48f773c5bdaa18555b4ca5eac5091 SOURCES/pixman-0.43.4.tar.xz diff --git a/SOURCES/0001-arm-add-include-guards-on-header.patch b/SOURCES/0001-arm-add-include-guards-on-header.patch new file mode 100644 index 0000000..201cdb6 --- /dev/null +++ b/SOURCES/0001-arm-add-include-guards-on-header.patch @@ -0,0 +1,34 @@ +From 3a32506877f925f9c27f72558f7f07fdb3092fc2 Mon Sep 17 00:00:00 2001 +From: Bill Roberts +Date: Wed, 10 Jul 2024 12:18:02 -0500 +Subject: [PATCH 1/2] arm: add include guards on header + +Prevent double inclusion of header file. + +Signed-off-by: Bill Roberts +--- + pixman/pixman-arm-asm.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/pixman/pixman-arm-asm.h b/pixman/pixman-arm-asm.h +index edf8e82..1fe40b3 100644 +--- a/pixman/pixman-arm-asm.h ++++ b/pixman/pixman-arm-asm.h +@@ -25,6 +25,8 @@ + * + */ + ++#ifndef PIXMAN_ARM_ASM_H ++#define PIXMAN_ARM_ASM_H + + #include "pixman-config.h" + +@@ -61,3 +63,5 @@ + .endfunc + #endif + .endm ++ ++#endif /* PIXMAN_ARM_ASM_H */ +-- +2.46.0 + diff --git a/SOURCES/0002-aarch64-support-PAC-and-BTI.patch b/SOURCES/0002-aarch64-support-PAC-and-BTI.patch new file mode 100644 index 0000000..efbef9e --- /dev/null +++ b/SOURCES/0002-aarch64-support-PAC-and-BTI.patch @@ -0,0 +1,280 @@ +From 7ed0f8d04d56320b034f2e15ef7867c5724947e0 Mon Sep 17 00:00:00 2001 +From: Bill Roberts +Date: Thu, 18 Jul 2024 10:13:07 -0500 +Subject: [PATCH 2/2] aarch64: support PAC and BTI + +Enable Pointer Authentication Codes (PAC) and Branch Target +Identification (BTI) support for ARM 64 targets. + +PAC works by signing the LR with either an A key or B key and verifying +the return address. There are quite a few instructions capable of doing +this, however, the Linux ARM ABI is to use hint compatible instructions +that can be safely NOP'd on older hardware and can be assembled and +linked with older binutils. This limits the instruction set to paciasp, +pacibsp, autiasp and autibsp. Instructions prefixed with pac are for +signing and instructions prefixed with aut are for signing. Both +instructions are then followed with an a or b to indicate which signing +key they are using. The keys can be controlled using +-mbranch-protection=pac-ret for the A key and +-mbranch-protection=pac-ret+b-key for the B key. + +BTI works by marking all call and jump positions with bti c and bti +j instructions. If execution control transfers to an instruction other +than a BTI instruction, the execution is killed via SIGILL. Note that +to remove one instruction, the aforementioned pac instructions will +also work as a BTI landing pad for bti c usages. + +For BTI to work, all object files linked for a unit of execution, +whether an executable or a library must have the GNU Notes section of +the ELF file marked to indicate BTI support. This is so loader/linkers +can apply the proper permission bits (PROT_BRI) on the memory region. + +PAC can also be annotated in the GNU ELF notes section, but it's not +required for enablement, as interleaved PAC and non-pac code works as +expected since it's the callee that performs all the checking. The +linker follows the same rules as BTI for discarding the PAC flag from +the GNU Notes section. + +Testing was done under the following CFLAGS and CXXFLAGS for all +combinations: +1. -mbranch-protection=none +2. -mbranch-protection=standard +3. -mbranch-protection=pac-ret +4. -mbranch-protection=pac-ret+b-key +5. -mbranch-protection=bti + +Signed-off-by: Bill Roberts +--- + pixman/pixman-arm-asm.h | 43 ++++++++++++++++++++++++ + pixman/pixman-arma64-neon-asm-bilinear.S | 1 + + pixman/pixman-arma64-neon-asm.S | 1 + + pixman/pixman-arma64-neon-asm.h | 32 +++++++++++++----- + 4 files changed, 69 insertions(+), 8 deletions(-) + +diff --git a/pixman/pixman-arm-asm.h b/pixman/pixman-arm-asm.h +index 1fe40b3..c13837c 100644 +--- a/pixman/pixman-arm-asm.h ++++ b/pixman/pixman-arm-asm.h +@@ -30,6 +30,48 @@ + + #include "pixman-config.h" + ++/* ++ * References: ++ * - https://developer.arm.com/documentation/101028/0012/5--Feature-test-macros ++ * - https://github.com/ARM-software/abi-aa/blob/main/aaelf64/aaelf64.rst ++ */ ++#if defined(__ARM_FEATURE_BTI_DEFAULT) && __ARM_FEATURE_BTI_DEFAULT == 1 ++ #define BTI_C hint 34 /* bti c: for calls, IE bl instructions */ ++ #define GNU_PROPERTY_AARCH64_BTI 1 /* bit 0 GNU Notes is for BTI support */ ++#else ++ #define BTI_C ++ #define GNU_PROPERTY_AARCH64_BTI 0 ++#endif ++ ++#if defined(__ARM_FEATURE_PAC_DEFAULT) ++ #if __ARM_FEATURE_PAC_DEFAULT & 1 ++ #define SIGN_LR hint 25 /* paciasp: sign with the A key */ ++ #define VERIFY_LR hint 29 /* autiasp: verify with the b key */ ++ #elif __ARM_FEATURE_PAC_DEFAULT & 2 ++ #define SIGN_LR hint 27 /* pacibsp: sign with the b key */ ++ #define VERIFY_LR hint 31 /* autibsp: verify with the b key */ ++ #endif ++ #define GNU_PROPERTY_AARCH64_POINTER_AUTH 2 /* bit 1 GNU Notes is for PAC support */ ++#else ++ #define SIGN_LR BTI_C ++ #define VERIFY_LR ++ #define GNU_PROPERTY_AARCH64_POINTER_AUTH 0 ++#endif ++ ++/* Add the BTI support to GNU Notes section for ASM files */ ++#if GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_POINTER_AUTH != 0 ++ .pushsection .note.gnu.property, "a"; /* Start a new allocatable section */ ++ .balign 8; /* align it on a byte boundry */ ++ .long 4; /* size of "GNU\0" */ ++ .long 0x10; /* size of descriptor */ ++ .long 0x5; /* NT_GNU_PROPERTY_TYPE_0 */ ++ .asciz "GNU"; ++ .long 0xc0000000; /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */ ++ .long 4; /* Four bytes of data */ ++ .long (GNU_PROPERTY_AARCH64_BTI|GNU_PROPERTY_AARCH64_POINTER_AUTH); /* BTI or PAC is enabled */ ++ .long 0; /* padding for 8 byte alignment */ ++ .popsection; /* end the section */ ++#endif + + /* Supplementary macro for setting function attributes */ + .macro pixman_asm_function_impl fname +@@ -42,6 +84,7 @@ + .type \fname, %function + #endif + \fname: ++ SIGN_LR + .endm + + .macro pixman_asm_function fname +diff --git a/pixman/pixman-arma64-neon-asm-bilinear.S b/pixman/pixman-arma64-neon-asm-bilinear.S +index 7303bdc..f11f8c8 100644 +--- a/pixman/pixman-arma64-neon-asm-bilinear.S ++++ b/pixman/pixman-arma64-neon-asm-bilinear.S +@@ -812,6 +812,7 @@ pixman_asm_function \fname + mov sp, x29 + ldp x29, x30, [sp], 16 + .endif ++ VERIFY_LR + ret + + .unreq OUT +diff --git a/pixman/pixman-arma64-neon-asm.S b/pixman/pixman-arma64-neon-asm.S +index 107c133..7329d4b 100644 +--- a/pixman/pixman-arma64-neon-asm.S ++++ b/pixman/pixman-arma64-neon-asm.S +@@ -3541,6 +3541,7 @@ pixman_asm_function \fname + ldp x12, x13, [x29, -104] + mov sp, x29 + ldp x29, x30, [sp], 16 ++ VERIFY_LR + ret + + .unreq OUT +diff --git a/pixman/pixman-arma64-neon-asm.h b/pixman/pixman-arma64-neon-asm.h +index 6aa6838..ec3d76f 100644 +--- a/pixman/pixman-arma64-neon-asm.h ++++ b/pixman/pixman-arma64-neon-asm.h +@@ -47,6 +47,8 @@ + * - maybe add an option to do reverse scanline processing + */ + ++#include "pixman-arm-asm.h" ++ + /* + * Bit flags for 'generate_composite_function' macro which are used + * to tune generated functions behavior. +@@ -232,14 +234,16 @@ + asr TMP1, VX, #16 + adds VX, VX, UNIT_X + bmi 55f +-5: subs VX, VX, SRC_WIDTH_FIXED ++5: ++ subs VX, VX, SRC_WIDTH_FIXED + bpl 5b + 55: + add TMP1, \mem_operand, TMP1, lsl #1 + asr TMP2, VX, #16 + adds VX, VX, UNIT_X + bmi 55f +-5: subs VX, VX, SRC_WIDTH_FIXED ++5: ++ subs VX, VX, SRC_WIDTH_FIXED + bpl 5b + 55: + add TMP2, \mem_operand, TMP2, lsl #1 +@@ -247,7 +251,8 @@ + asr TMP1, VX, #16 + adds VX, VX, UNIT_X + bmi 55f +-5: subs VX, VX, SRC_WIDTH_FIXED ++5: ++ subs VX, VX, SRC_WIDTH_FIXED + bpl 5b + 55: + add TMP1, \mem_operand, TMP1, lsl #1 +@@ -255,7 +260,8 @@ + asr TMP2, VX, #16 + adds VX, VX, UNIT_X + bmi 55f +-5: subs VX, VX, SRC_WIDTH_FIXED ++5: ++ subs VX, VX, SRC_WIDTH_FIXED + bpl 5b + 55: + add TMP2, \mem_operand, TMP2, lsl #1 +@@ -265,14 +271,16 @@ + asr TMP1, VX, #16 + adds VX, VX, UNIT_X + bmi 55f +-5: subs VX, VX, SRC_WIDTH_FIXED ++5: ++ subs VX, VX, SRC_WIDTH_FIXED + bpl 5b + 55: + add TMP1, \mem_operand, TMP1, lsl #2 + asr TMP2, VX, #16 + adds VX, VX, UNIT_X + bmi 55f +-5: subs VX, VX, SRC_WIDTH_FIXED ++5: ++ subs VX, VX, SRC_WIDTH_FIXED + bpl 5b + 55: + add TMP2, \mem_operand, TMP2, lsl #2 +@@ -312,7 +320,8 @@ + asr TMP1, VX, #16 + adds VX, VX, UNIT_X + bmi 55f +-5: subs VX, VX, SRC_WIDTH_FIXED ++5: ++ subs VX, VX, SRC_WIDTH_FIXED + bpl 5b + 55: + add TMP1, \mem_operand, TMP1, lsl #1 +@@ -322,7 +331,8 @@ + mov TMP1, DUMMY + adds VX, VX, UNIT_X + bmi 55f +-5: subs VX, VX, SRC_WIDTH_FIXED ++5: ++ subs VX, VX, SRC_WIDTH_FIXED + bpl 5b + 55: + add TMP1, \mem_operand, TMP1, lsl #2 +@@ -917,6 +927,7 @@ + ldr x28, [x29, -232] + mov sp, x29 + ldp x29, x30, [sp], 16 ++ VERIFY_LR + ret /* exit */ + /* + * This is the start of the loop, designed to process images with small width +@@ -974,6 +985,7 @@ + ldr x28, [x29, -232] + mov sp, x29 + ldp x29, x30, [sp], 16 ++ VERIFY_LR + ret /* exit */ + + .purgem fetch_src_pixblock +@@ -1155,6 +1167,7 @@ + ldr x10, [x29, -96] + mov sp, x29 + ldp x29, x30, [sp], 16 ++ VERIFY_LR + ret /* exit */ + .else + sub x29, x29, 64 +@@ -1162,6 +1175,7 @@ + ld1 {v12.8b, v13.8b, v14.8b, v15.8b}, [x29], 32 + mov sp, x29 + ldp x29, x30, [sp], 16 ++ VERIFY_LR + ret /* exit */ + .endif + 800: +@@ -1180,6 +1194,7 @@ + ldr x10, [x29, -88] + mov sp, x29 + ldp x29, x30, [sp], 16 ++ VERIFY_LR + ret /* exit */ + + .unreq DUMMY +@@ -1200,6 +1215,7 @@ + ld1 {v12.8b, v13.8b, v14.8b, v15.8b}, [x29], 32 + mov sp, x29 + ldp x29, x30, [sp], 16 ++ VERIFY_LR + ret /* exit */ + + .unreq DUMMY +-- +2.46.0 + diff --git a/SOURCES/make-pixman-snapshot.sh b/SOURCES/make-pixman-snapshot.sh new file mode 100755 index 0000000..0cd65a3 --- /dev/null +++ b/SOURCES/make-pixman-snapshot.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +DIRNAME=pixman-$( date +%Y%m%d ) + +rm -rf $DIRNAME +git clone git://git.freedesktop.org/git/pixman $DIRNAME +cd $DIRNAME +if [ -z "$1" ]; then + git log | head -1 +else + git checkout $1 +fi +rm -rf .git +cd .. +tar jcf $DIRNAME.tar.bz2 $DIRNAME +rm -rf $DIRNAME diff --git a/SPECS/pixman.spec b/SPECS/pixman.spec new file mode 100644 index 0000000..dbfee0a --- /dev/null +++ b/SPECS/pixman.spec @@ -0,0 +1,221 @@ +%define gitdate 20070827 +%define gitrev 8ff7213f39edc1b2b8b60d6b0cc5d5f14ca1928d + +Name: pixman +Version: 0.43.4 +Release: 1%{?dist} +Summary: Pixel manipulation library + +# SPDX +License: MIT +URL: https://gitlab.freedesktop.org/pixman/pixman +#VCS: git:git://git.freedesktop.org/git/pixman +# To make git snapshots: +# ./make-pixman-snapshot.sh %{\?gitrev} +# if no revision specified, makes a new one from HEAD. +Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.xz +Source1: make-pixman-snapshot.sh + +Patch00: 0001-arm-add-include-guards-on-header.patch +Patch01: 0002-aarch64-support-PAC-and-BTI.patch + +BuildRequires: gcc +BuildRequires: meson + +%description +Pixman is a pixel manipulation library for X and Cairo. + +%package devel +Summary: Pixel manipulation library development package +Requires: %{name}%{?isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +Pixel manipulation library for X and Cairo development package. + +%prep +%autosetup -p1 +# bump up the test suite timeout because arm +sed -i 's/120/600/' test/meson.build + +%build +%meson --auto-features=auto \ +%ifarch %{arm} + -Diwmmxt=disabled -Diwmmxt2=false \ +%endif + %nil + +%meson_build + +%install +%meson_install + +%check +%meson_test + +%ldconfig_post +%ldconfig_postun + +%files +%doc COPYING +%{_libdir}/libpixman-1*.so.* + +%files devel +%dir %{_includedir}/pixman-1 +%{_includedir}/pixman-1/pixman.h +%{_includedir}/pixman-1/pixman-version.h +%{_libdir}/libpixman-1*.so +%{_libdir}/pkgconfig/pixman-1.pc + +%changelog +* Fri Oct 25 2024 MSVSphere Packaging Team - 0.43.4-1 +- Rebuilt for MSVSphere 10 + +* Wed Sep 18 2024 José Expósito - 0.43.4-1 +- Update to 0.43.4 +- Resolves: https://issues.redhat.com/browse/RHEL-45709 + +* Mon Jun 24 2024 Troy Dawson - 0.43.0-4 +- Bump release for June 2024 mass rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 0.43.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 0.43.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Jan 09 2024 José Expósito - 0.43.0-1 +- Update to 0.43.0 + +* Thu Sep 07 2023 José Expósito +- SPDX migration: license is already SPDX compatible + +* Fri Jul 21 2023 Fedora Release Engineering - 0.42.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Feb 21 2023 Petter Abrahamsson - 0.42.2-1 +- Update to 0.42.2 + +* Fri Jan 20 2023 Fedora Release Engineering - 0.40.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 0.40.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 0.40.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.40.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 0.40.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 0.40.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Apr 20 2020 Kalev Lember - 0.40.0-1 +- Update to 0.40.0 + +* Thu Jan 30 2020 Fedora Release Engineering - 0.38.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Sep 09 2019 Kalev Lember - 0.38.4-1 +- Update to 0.38.4 + +* Fri Jul 26 2019 Fedora Release Engineering - 0.38.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Feb 12 2019 Kalev Lember - 0.38.0-1 +- Update to 0.38.0 +- Switch to the meson build system + +* Sat Feb 02 2019 Fedora Release Engineering - 0.36.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Nov 29 2018 Adam Jackson - 0.36.0-1 +- pixman 0.36.0 + +* Fri Jul 13 2018 Fedora Release Engineering - 0.34.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Jun 29 2018 Adam Jackson - 0.34.0-9 +- Use ldconfig scriptlet macros + +* Fri May 04 2018 Dan Horák - 0.34.0-8 +- fix vector loads in VMX (ppc64le) (#1572540) + +* Thu Apr 26 2018 Adam Jackson - 0.34.0-7 +- Enable %%check +- --disable-vmx to fix %%check failures with gcc8 +- Remove stray --disable-ssse3 + +* Fri Feb 09 2018 Fedora Release Engineering - 0.34.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 0.34.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.34.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 0.34.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 0.34.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Feb 01 2016 - 0.34.0-1 +- Update to 0.34.0 (#1249357) + +* Tue Dec 22 2015 Oded Gabbay 0.33.6-1 +- pixman 0.33.6 + +* Fri Oct 23 2015 Oded Gabbay 0.33.4-1 +- pixman 0.33.4 + +* Sun Aug 09 2015 Oded Gabbay 0.33.2-1 +- pixman 0.33.2 +- Enable VMX fast paths on ppc64le now that they are fixed + +* Tue Jun 16 2015 Peter Robinson 0.32.6-6 +- revert cflag option added in -5 the broke building + +* Mon May 11 2015 Adam Jackson 0.32.6-5 +- Fix devel's requirement on the base package to include %%{?isa} + +* Mon Nov 10 2014 Adam Jackson 0.32.6-4 +- Disable (broken) VMX fast paths on ppc64le for now. + +* Sun Aug 17 2014 Fedora Release Engineering - 0.32.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Jul 11 2014 Peter Robinson 0.32.6-2 +- Enable make check but don't (currently) fail the build on failure +- Include COPYING as per packaging guidelines +- Minor spec cleanups + +* Sun Jul 06 2014 Soren Sandmann 0.32.6-1 +- pixman 0.32.6 +- drop SSSE3 patch + +* Sat Jun 07 2014 Fedora Release Engineering - 0.32.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Nov 14 2013 Soren Sandmann 0.32.0-2 +- Add patch to fix SSSE3 detection + +* Sun Nov 10 2013 Soren Sandmann 0.32.0-1 +- pixman 0.32.0 + +* Sat Nov 2 2013 Soren Sandmann 0.31.2-1 +- pixman 0.31.2 + +* Sun Aug 04 2013 Fedora Release Engineering - 0.30.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Jul 04 2013 Karsten Hopp 0.30.0-2 +- bump release and rebuild to fix dependencies on PPC + +* Wed May 8 2013 Soren Sandmann 0.30.0-1 +- pixman 0.30.0