upg pcre2 runit-service-scripts xz zstd

This commit is contained in:
joborun linux 2024-03-31 17:37:00 +03:00
parent 5b09a3d47b
commit 1f11c67446
11 changed files with 160 additions and 31 deletions

View file

@ -7,7 +7,7 @@
pkgname=pcre2
pkgver=10.43
pkgrel=01
pkgrel=02
pkgdesc='A library that implements Perl 5-style regular expressions. 2nd version'
url='https://github.com/PCRE2Project/pcre2'
depends=('bzip2' 'glibc' 'readline' 'zlib')
@ -16,7 +16,18 @@ provides=(libpcre2-{8,16,32,posix}.so)
options=(staticlibs)
#options=(debug staticlibs) ### uncomment this to have the corresponding debug pkg produced
#source=("https://github.com/PhilipHazel/pcre2/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.bz2"{,.sig})
source=("$url/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.bz2"{,.sig})
source=("$url/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.bz2"{,.sig}
fix-avx-detection.patch::"https://github.com/zherczeg/sljit/commit/56dbde07b05252f0b304b04040a86cfb9f109ae9.patch")
prepare() {
cd $pkgname-$pkgver
# Fix AVX detection
# [PATCH] Add xgetbv feature detection support on x86
patch -Np2 -i "$srcdir"/fix-avx-detection.patch -d src/sljit
}
build() {
cd $pkgname-$pkgver
@ -56,7 +67,17 @@ license=('BSD-3-Clause')
validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') # Philip Hazel <ph10@hermes.cam.ac.uk>
sha256sums=(e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb # pcre2-10.43.tar.bz2
fe7a0bcafa5f4ee6d38b0a8c76a13c994e7effa19ef985bdf2c557e7362ab411) # pcre2-10.43.tar.bz2.sig
## b04f0dd9dacca2c261f88a211ab30e62ab28bbb470de73b3e0e69eef550b6b39 pcre2-10.43-01-x86_64.pkg.tar.lz
sha512sums=('8ac1520c32e9e5672404aaf6104e23c9ee5c3c28ad28ff101435599d813cbb20e0491a3fd34e012b4411b3e0366a4c6dfa3f02d093acaa6ff0ab25478bb7ade9'
'SKIP'
'4379a06a142a9c9dc61298e86c722f1f2b6d83493acda8e472c866093b3e2192d315998c5a87dfd231739394d5c809c05415126084b18f80a002ee8861c0ed4f')
b2sums=('f87f9f36dd6a806cdba1f077f51b53da2583f1898f83e41d594622b28ac8efbc1b2d122b752a9d6cd461fe0e3c7c85ee93358443df518a336da4ee9d72cca808'
'SKIP'
'736aa7eaa2ed571117f545ae78151fda6a5ef5935bf70f132b1d20d0ff6e46543194f409a02eac727a8209fb0d25e6870705e8a95b3feb07e799d288fd852822')
sha256sums=(e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb # pcre2-10.43.tar.bz2
fe7a0bcafa5f4ee6d38b0a8c76a13c994e7effa19ef985bdf2c557e7362ab411 # pcre2-10.43.tar.bz2.sig
edda6691b7d59cce485c099b48e8fa8fef0bf3ea2676cc7278181959edbdc83a) # fix-avx-detection.patch
## d48e1dc37692f09ccb1abdf86795e2ede73e8e97c1f81fb3d022148874e2a905 pcre2-10.43-02-x86_64.pkg.tar.lz

View file

@ -7,7 +7,7 @@
pkgname=pcre2
pkgver=10.43
pkgrel=1
pkgrel=2
pkgdesc='A library that implements Perl 5-style regular expressions. 2nd version'
arch=('x86_64')
url='https://github.com/PCRE2Project/pcre2'
@ -16,15 +16,21 @@ depends=('bzip2' 'glibc' 'readline' 'zlib')
optdepends=('sh: for pcre2-config')
provides=(libpcre2-{8,16,32,posix}.so)
options=(staticlibs)
source=("$url/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.bz2"{,.sig})
source=("$url/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.bz2"{,.sig}
https://github.com/zherczeg/sljit/commit/56dbde07b05252f0b304b04040a86cfb9f109ae9.patch)
sha512sums=('8ac1520c32e9e5672404aaf6104e23c9ee5c3c28ad28ff101435599d813cbb20e0491a3fd34e012b4411b3e0366a4c6dfa3f02d093acaa6ff0ab25478bb7ade9'
'SKIP')
'SKIP'
'4379a06a142a9c9dc61298e86c722f1f2b6d83493acda8e472c866093b3e2192d315998c5a87dfd231739394d5c809c05415126084b18f80a002ee8861c0ed4f')
b2sums=('f87f9f36dd6a806cdba1f077f51b53da2583f1898f83e41d594622b28ac8efbc1b2d122b752a9d6cd461fe0e3c7c85ee93358443df518a336da4ee9d72cca808'
'SKIP')
'SKIP'
'736aa7eaa2ed571117f545ae78151fda6a5ef5935bf70f132b1d20d0ff6e46543194f409a02eac727a8209fb0d25e6870705e8a95b3feb07e799d288fd852822')
validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') # Philip Hazel <ph10@hermes.cam.ac.uk>
build() {
cd $pkgname-$pkgver
# Fix AVX detection
# [PATCH] Add xgetbv feature detection support on x86
patch -Np2 -i "$srcdir"/56dbde07b05252f0b304b04040a86cfb9f109ae9.patch -d src/sljit
# use fat LTO objects for static libraries
CFLAGS+=" -ffat-lto-objects"

View file

@ -1,3 +1,2 @@

View file

@ -0,0 +1,83 @@
From 56dbde07b05252f0b304b04040a86cfb9f109ae9 Mon Sep 17 00:00:00 2001
From: Zoltan Herczeg <hzmester@freemail.hu>
Date: Sat, 23 Mar 2024 07:51:02 +0000
Subject: [PATCH] Add xgetbv feature detection support on x86
---
sljit_src/sljitNativeX86_common.c | 42 +++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/sljit_src/sljitNativeX86_common.c b/sljit_src/sljitNativeX86_common.c
index 3d5c02b7..de519e6b 100644
--- a/sljit_src/sljitNativeX86_common.c
+++ b/sljit_src/sljitNativeX86_common.c
@@ -391,6 +391,7 @@ static const sljit_u8 freg_lmap[SLJIT_NUMBER_OF_FLOAT_REGISTERS + 2] = {
#define CPU_FEATURE_CMOV 0x020
#define CPU_FEATURE_AVX 0x040
#define CPU_FEATURE_AVX2 0x080
+#define CPU_FEATURE_OSXSAVE 0x100
static sljit_u32 cpu_feature_list = 0;
@@ -491,6 +492,42 @@ static void execute_cpu_id(sljit_u32 info[4])
#endif /* _MSC_VER && _MSC_VER >= 1400 */
}
+static sljit_u32 execute_get_xcr0_low(void)
+{
+ sljit_u32 xcr0;
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+
+ xcr0 = (sljit_u32)_xgetbv(0);
+
+#elif defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_C) || defined(__TINYC__)
+
+ /* AT&T syntax. */
+ __asm__ (
+ "xorl %%ecx, %%ecx\n"
+ "xgetbv\n"
+ : "=a" (xcr0)
+ :
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ : "ecx", "edx"
+#else /* !SLJIT_CONFIG_X86_32 */
+ : "rcx", "rdx"
+#endif /* SLJIT_CONFIG_X86_32 */
+ );
+
+#else /* _MSC_VER < 1400 */
+
+ /* Intel syntax. */
+ __asm {
+ mov ecx, 0
+ xgetbv
+ mov xcr0, eax
+ }
+
+#endif /* _MSC_VER && _MSC_VER >= 1400 */
+ return xcr0;
+}
+
static void get_cpu_features(void)
{
sljit_u32 feature_list = CPU_FEATURE_DETECTED;
@@ -518,6 +555,8 @@ static void get_cpu_features(void)
if (info[2] & 0x80000)
feature_list |= CPU_FEATURE_SSE41;
+ if (info[2] & 0x8000000)
+ feature_list |= CPU_FEATURE_OSXSAVE;
if (info[2] & 0x10000000)
feature_list |= CPU_FEATURE_AVX;
#if (defined SLJIT_DETECT_SSE2 && SLJIT_DETECT_SSE2)
@@ -535,6 +574,9 @@ static void get_cpu_features(void)
if (info[2] & 0x20)
feature_list |= CPU_FEATURE_LZCNT;
+ if ((feature_list & CPU_FEATURE_OSXSAVE) && (execute_get_xcr0_low() & 0x4) == 0)
+ feature_list &= ~(sljit_u32)(CPU_FEATURE_AVX | CPU_FEATURE_AVX2);
+
cpu_feature_list = feature_list;
}

View file

@ -6,28 +6,30 @@
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=runit-service-scripts
pkgver=20240102
pkgver=20240331
pkgrel=01
pkgdesc="A collection of services for runit"
groups=(base)
backup=("etc/runit/sv/" "etc/runit/runsvdir/default/")
makedepends=(bash)
url="https://git.disroot.org/joborun-pkg/repos/raw/branch/main"
# this url_src is where the entire content of the runit-sv*.tar.xz is kept
# so collaborators can easily submit changes to be passed to packaging
url_src="https://git.disroot.org/joborun/runit-service-scripts"
source=($url/runit-sv6.tar.xz
makedepends=(bash git)
url="https://git.disroot.org/joborun/runit-service-scripts"
#source=($url/runit-sv6.tar.xz
#_commit=8391f860112f09f2ed19750b42899e933d2e8ba3 #
#source=(git+"$url_src#commit=$_commit"
source=(git+$url
rss.install)
install=rss.install
package() {
cd $pkgname
depends=('runit' 'runit-rc')
mkdir -p $pkgdir/usr/lib/runit/sv
mkdir -p $pkgdir/etc/runit/runsvdir/default
msg 'Copying services library to /usr/lib/runit/sv/ ...'
cp -r $srcdir/usr/lib/runit/sv/* $pkgdir/usr/lib/runit/sv
cp -r $srcdir/$pkgname/usr/lib/runit/sv/* $pkgdir/usr/lib/runit/sv
msg 'Copying links to default network services /etc/runit/runsvdir/default ...'
cp -r $srcdir/etc/runit/runsvdir/default/* $pkgdir/etc/runit/runsvdir/default/
cp -r $srcdir/$pkgname/etc/runit/runsvdir/default/* $pkgdir/etc/runit/runsvdir/default/
install -D -m644 $srcdir/$pkgname/"LICENSE" -t "${pkgdir}/usr/share/licenses/$pkgname/"
}
#---- arch license gpg-key & sha256sums ----
@ -36,8 +38,8 @@ arch=(x86_64)
license=(GPL)
sha256sums=(04b51eed34d81e984d1cab3aad89a545eaf71a49a9340a73fca1c303373aa830 # runit-sv6.tar.xz
sha256sums=(SKIP # runit-service-scripts
3050f0484721a25d723cd0c50c4f4579d2d77b94965e28d734c19d3c4b9ec9ba) # rss.install
## 143b0607f5a47e0e39d2b065dc942be151e9dcbd8c34779e985026c9fb0ec445 runit-service-scripts-20240102-01-x86_64.pkg.tar.lz
## c168df5f59f3c3864e0e375cc4a8c3ca662306886e59ae657b0f8d418c124276 runit-service-scripts-20240331-01-x86_64.pkg.tar.lz

View file

@ -1 +1 @@
rm -rf {src,pkg,*.tar.xz}
rm -rf {src,pkg,*.tar.xz,runit-service-scripts}

View file

@ -1 +1,3 @@
git

@ -0,0 +1 @@
Subproject commit 8391f860112f09f2ed19750b42899e933d2e8ba3

View file

@ -84,8 +84,11 @@ arch=(x86_64)
license=('GPL' 'LGPL' 'custom')
validpgpkeys=('3690C240CE51B4670D30AD1C38EE757D69184620' # Lasse Collin <lasse.collin@tukaani.org>
'22D465F2B4C173803B20C6DE59FCF207FEA7F445') # Jia Tan <jiat0218@gmail.com>
validpgpkeys=('3690C240CE51B4670D30AD1C38EE757D69184620') # Lasse Collin <lasse.collin@tukaani.org>
## THIS WAS THE ATTACKER ###
### '22D465F2B4C173803B20C6DE59FCF207FEA7F445') # Jia Tan <jiat0218@gmail.com>
### REMOVE THIS FROM YOUR KEYRING: gpg --delete-keys 22D465F2B4C173803B20C6DE59FCF207FEA7F445
# tarball sums
sha256sums=(2398f4a8e53345325f44bdd9f0cc7401bd9025d736c6d43b372f4dea77bf75b8 # xz-5.6.1.tar.gz
@ -95,6 +98,6 @@ sha256sums=(2398f4a8e53345325f44bdd9f0cc7401bd9025d736c6d43b372f4dea77bf75b8 #
#sha512sums=('8f4ee2e5c9b46d0917d8bdf8b172a70d02a6cf2d4d78a2e99ae942e32979b72b407809ffda2885af41e2c9d801c19eab5e4fd73888fbaf042346be957df406fc')
#sha256sums=(e10fa4254d5ff033c78dcbfd2866e79a762b8a719503a7c146758e590de945dc) # xz
## Removed --- Use arch core/xz instead for now
## 8466a47ac4224181b2f56bbf17ef7afea38849abd1d1ffa2da3b5ae8b1e7f941 xz-5.6.1-02-x86_64.pkg.tar.lz
##

View file

@ -11,8 +11,20 @@ license=('GPL' 'LGPL' 'custom')
depends=('sh')
makedepends=('git' 'po4a' 'doxygen')
provides=('liblzma.so')
validpgpkeys=('3690C240CE51B4670D30AD1C38EE757D69184620' # Lasse Collin <lasse.collin@tukaani.org>
'22D465F2B4C173803B20C6DE59FCF207FEA7F445') # Jia Tan <jiat0218@gmail.com>
## THIS WAS THE ATTACKER ###
### '22D465F2B4C173803B20C6DE59FCF207FEA7F445') # Jia Tan <jiat0218@gmail.com>
### REMOVE THIS FROM YOUR KEYRING: gpg --delete-keys 22D465F2B4C173803B20C6DE59FCF207FEA7F445
validpgpkeys=('3690C240CE51B4670D30AD1C38EE757D69184620') # Lasse Collin <lasse.collin@tukaani.org>
### '22D465F2B4C173803B20C6DE59FCF207FEA7F445') # Jia Tan <jiat0218@gmail.com>
## THIS WAS THE ATTACKER ###
### '22D465F2B4C173803B20C6DE59FCF207FEA7F445') # Jia Tan <jiat0218@gmail.com>
### REMOVE THIS FROM YOUR KEYRING: gpg --delete-keys 22D465F2B4C173803B20C6DE59FCF207FEA7F445
source=("git+https://github.com/tukaani-project/xz#tag=v${pkgver}")
sha256sums=('e10fa4254d5ff033c78dcbfd2866e79a762b8a719503a7c146758e590de945dc')
sha512sums=('8f4ee2e5c9b46d0917d8bdf8b172a70d02a6cf2d4d78a2e99ae942e32979b72b407809ffda2885af41e2c9d801c19eab5e4fd73888fbaf042346be957df406fc')

View file

@ -7,10 +7,10 @@
pkgname=zstd
pkgver=1.5.5
pkgrel=01
pkgrel=02 ## rebuilding this lzma off then build cmake then rebuild this again
pkgdesc='Zstandard - not so Fast unreal-time FACEBOOK compression... - avoid as possible'
url='https://facebook.github.io/zstd/'
depends=(glibc gcc-libs zlib xz lz4)
depends=(glibc gcc-libs zlib lz4)
makedepends=(cmake gtest ninja)
provides=(libzstd.so)
# options=(debug staticlibs) ## uncomment this to produce the debug pkg
@ -32,7 +32,7 @@ build() {
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DZSTD_ZLIB_SUPPORT=ON \
-DZSTD_LZMA_SUPPORT=ON \
-DZSTD_LZMA_SUPPORT=OFF \
-DZSTD_LZ4_SUPPORT=ON \
-DZSTD_BUILD_CONTRIB=ON \
-DZSTD_BUILD_STATIC=OFF \
@ -66,5 +66,5 @@ validpgpkeys=(4EF4AC63455FC9F4545D9B7DEF8FE99528B52FFD)
sha256sums=(ce264bca60eb2f0e99e4508cffd0d4d19dd362e84244d7fc941e79fa69ccf673 # zstd-1.5.5.tar.zst
cbc7facbc7a80625b0af6f5bba912abca2c016dcc57ebb9f70302e159e605f1d) # zstd-1.5.5.tar.zst.sig
## 6e1cdf46e11d0f2c359e586b26fe0ef653ed8b8f5b882cf3b087ccd024371663 zstd-1.5.5-01-x86_64.pkg.tar.lz
## a926756e6b23d4aa9aae733d945a1d6fa525d7a38327333eaae7a571a9a22c43 zstd-1.5.5-02-x86_64.pkg.tar.lz