From 6da95b4abe128094597879350ca966d360df65a6 Mon Sep 17 00:00:00 2001 From: Joe Bo Run Date: Fri, 17 Feb 2023 00:42:27 +0200 Subject: [PATCH] upg curl --- curl/PKGBUILD | 91 ++++++++++++++++++++++++++++++++++------------ curl/PKGBUILD-arch | 79 ++++++++++++++++++++++++++-------------- curl/clean | 2 +- curl/deps | 4 +- 4 files changed, 122 insertions(+), 54 deletions(-) diff --git a/curl/PKGBUILD b/curl/PKGBUILD index d8e27c0..e77fd96 100644 --- a/curl/PKGBUILD +++ b/curl/PKGBUILD @@ -7,8 +7,12 @@ pkgbase=curl pkgname=(curl libcurl-compat libcurl-gnutls) -pkgver=7.88.0 -pkgrel=02 +#pkgver=7.88.0 + +_tag='67c55cb8b3f5a530478201fd780a533fce92b2eb' # git rev-parse v${_tag_name} +_tag_name='7_88_0' +pkgver="${_tag_name//_/.}" +pkgrel=03 pkgdesc='An URL retrieval utility and library - w/o ipv6 & zstd' arch=('x86_64') url='https://curl.haxx.se' @@ -16,11 +20,49 @@ url='https://curl.haxx.se' depends=('ca-certificates' 'brotli' 'libbrotlidec.so' 'krb5' 'libgssapi_krb5.so' 'libidn2' 'libidn2.so' 'libnghttp2' 'libpsl' 'libpsl.so' 'libssh2' 'libssh2.so' 'openssl' 'zlib') -makedepends=('patchelf') +makedepends=('patchelf' 'git') +#makedepends=('patchelf') provides=('libcurl.so') -source=("https://curl.haxx.se/download/${pkgname}-${pkgver}.tar.gz"{,.asc} - '0001-Revert-http2-minor-buffer-and-error-path-fixes.patch') -_configure_options=( +#source=("https://curl.haxx.se/download/${pkgname}-${pkgver}.tar.gz"{,.asc} +# '0001-Revert-http2-minor-buffer-and-error-path-fixes.patch') +source=("git+https://github.com/bagder/curl.git#tag=${_tag}?signed") + +_backports=( + # git master + 'curl-7_88_0..8c939453f587b8565af33927361edf40b48544ea' +) + +_reverts=( +) + +prepare() { + cd "$pkgbase" + + local _c + for _c in "${_backports[@]}"; do + if [[ $_c == *..* ]]; then + git log --oneline --reverse "${_c}" + else + git log --oneline -1 "${_c}" + fi + git cherry-pick -n -m1 "${_c}" + done + for _c in "${_reverts[@]}"; do + git log --oneline -1 "${_c}" + git revert -n "${_c}" + done + + autoreconf -fi +} + +#prepare() { +# cd "${srcdir}/${pkgbase}-${pkgver}" +# +# patch -Np1 < ../0001-Revert-http2-minor-buffer-and-error-path-fixes.patch +#} + +build() { + local _configure_options=( --prefix='/usr' --mandir='/usr/share/man' --disable-ldap @@ -34,21 +76,15 @@ _configure_options=( --with-random='/dev/urandom' --without-zstd --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt' -) + ) -prepare() { - cd "${srcdir}/${pkgbase}-${pkgver}" - - patch -Np1 < ../0001-Revert-http2-minor-buffer-and-error-path-fixes.patch -} - -build() { mkdir build-curl{,-compat,-gnutls} # build curl cd "${srcdir}"/build-curl - "${srcdir}/${pkgbase}-${pkgver}"/configure \ +# "${srcdir}/${pkgbase}-${pkgver}"/configure \ + "${srcdir}/${pkgbase}"/configure \ "${_configure_options[@]}" \ --with-openssl \ --enable-versioned-symbols @@ -58,7 +94,8 @@ build() { # build libcurl-compat cd "${srcdir}"/build-curl-compat - "${srcdir}/${pkgbase}-${pkgver}"/configure \ +# "${srcdir}/${pkgbase}-${pkgver}"/configure \ + "${srcdir}/${pkgbase}"/configure \ "${_configure_options[@]}" \ --with-openssl \ --disable-versioned-symbols @@ -68,10 +105,12 @@ build() { # build libcurl-gnutls cd "${srcdir}"/build-curl-gnutls - "${srcdir}/${pkgbase}-${pkgver}"/configure \ +# "${srcdir}/${pkgbase}-${pkgver}"/configure \ + "${srcdir}/${pkgbase}"/configure \ "${_configure_options[@]}" \ --disable-versioned-symbols \ --without-openssl \ + --without-zstd \ --with-gnutls sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make -C lib @@ -84,7 +123,8 @@ package_curl() { make DESTDIR="${pkgdir}" install make DESTDIR="${pkgdir}" install -C scripts - cd "${srcdir}/${pkgname}-${pkgver}" +# cd "${srcdir}/${pkgname}-${pkgver}" + cd "${srcdir}/${pkgname}" # license install -Dt "${pkgdir}/usr/share/licenses/$pkgname" -m0644 COPYING @@ -93,6 +133,7 @@ package_curl() { package_libcurl-compat() { pkgdesc='An URL retrieval library (without versioned symbols)' depends=('curl' 'openssl') + provides=('libcurl-compat.so') cd "${srcdir}"/build-curl-compat @@ -111,6 +152,7 @@ package_libcurl-compat() { package_libcurl-gnutls() { pkgdesc='An URL retrieval library (without versioned symbols and linked against gnutls)' depends=('curl' 'gnutls') + provides=('libcurl-gnutls.so') cd "${srcdir}"/build-curl-gnutls @@ -133,11 +175,12 @@ license=('MIT') validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg -sha256sums=(dfb8582a05a893e305783047d791ffef5e167d295cf8d12b9eb9cfa0991ca5a9 # curl-7.88.0.tar.gz - 9c5ffc962eb4ac1fd2f29265c965512ddcfc672f86ceb39144e72edbe562e89c # curl-7.88.0.tar.gz.asc - 9e6cbc24b8575c4dcf7b4755bfcf8f2eb943670535f7c5a19226f24286110308) # 0001-Revert-http2-minor-buffer-and-error-path-fixes.patch +#sha256sums=(dfb8582a05a893e305783047d791ffef5e167d295cf8d12b9eb9cfa0991ca5a9 # curl-7.88.0.tar.gz +# 9c5ffc962eb4ac1fd2f29265c965512ddcfc672f86ceb39144e72edbe562e89c # curl-7.88.0.tar.gz.asc +# 9e6cbc24b8575c4dcf7b4755bfcf8f2eb943670535f7c5a19226f24286110308) # 0001-Revert-http2-minor-buffer-and-error-path-fixes.patch -## a0b5ebe5f8560625a93e2b62b79992767808144f9939a52d8ef76c6a29b3d9ca curl-7.88.0-02-x86_64.pkg.tar.lz -## 585cb9cff519c33bb5dee40e88918b4e76df565fd587d13613f176d4770ddc37 libcurl-compat-7.88.0-02-x86_64.pkg.tar.lz -## b5b5a81b44d2fd0d853c25110c79a71a61c0ccd00b09fc5b7b2313cc7776dc90 libcurl-gnutls-7.88.0-02-x86_64.pkg.tar.lz +sha256sums=(SKIP) +## 8d8d5adf5f5edea178199f1ab30322cf5937c2ba81ba7877bd90c4a95bff7e74 curl-7.88.0-03-x86_64.pkg.tar.lz +## c7584a5a831a434993348bc61eb7c2e3679c324c4d7c83d8303b56c9fd476f35 libcurl-compat-7.88.0-03-x86_64.pkg.tar.lz +## ce7104b946ee1dd1ac46fb0836c78276ae1b3f0a95a2dcfea5fee2535782ff61 libcurl-gnutls-7.88.0-03-x86_64.pkg.tar.lz diff --git a/curl/PKGBUILD-arch b/curl/PKGBUILD-arch index 9e7aa7c..5b0292c 100644 --- a/curl/PKGBUILD-arch +++ b/curl/PKGBUILD-arch @@ -6,51 +6,72 @@ pkgbase=curl pkgname=(curl libcurl-compat libcurl-gnutls) -pkgver=7.88.0 -pkgrel=2 +_tag='67c55cb8b3f5a530478201fd780a533fce92b2eb' # git rev-parse v${_tag_name} +_tag_name='7_88_0' +pkgver="${_tag_name//_/.}" +pkgrel=3 pkgdesc='An URL retrieval utility and library' arch=('x86_64') -url='https://curl.haxx.se' +url='https://curl.haxx.se/' license=('MIT') depends=('ca-certificates' 'brotli' 'libbrotlidec.so' 'krb5' 'libgssapi_krb5.so' 'libidn2' 'libidn2.so' 'libnghttp2' 'libpsl' 'libpsl.so' 'libssh2' 'libssh2.so' 'openssl' 'zlib' 'zstd' 'libzstd.so') -makedepends=('patchelf') +makedepends=('git' 'patchelf') provides=('libcurl.so') -source=("https://curl.haxx.se/download/${pkgname}-${pkgver}.tar.gz"{,.asc} - '0001-Revert-http2-minor-buffer-and-error-path-fixes.patch') -sha512sums=('bfaac71e97a45d884be410872a55fdb365f9d03c11620fb12e82c7f26dbbb6a417b51dd0dc2a3631e95fb36e37a72c7f73fd6cf5f796c154f1424395c03c22cb' - 'SKIP' - 'c06b5738290394e20c666fbb9d0f4b08ce5a3c668dd1ae2d6271b42235526b929c1caac1238aa05bc541a82eb6c9678a81f7d8dc2c3ad282188f934b9b036699') validpgpkeys=('27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2') # Daniel Stenberg +source=("git+https://github.com/bagder/curl.git#tag=${_tag}?signed") +sha512sums=('SKIP') -_configure_options=( - --prefix='/usr' - --mandir='/usr/share/man' - --disable-ldap - --disable-ldaps - --disable-manual - --enable-ipv6 - --enable-threaded-resolver - --with-gssapi - --with-libssh2 - --with-random='/dev/urandom' - --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt' +_backports=( + # git master + 'curl-7_88_0..8c939453f587b8565af33927361edf40b48544ea' +) + +_reverts=( ) prepare() { - cd "${srcdir}/${pkgbase}-${pkgver}" + cd "$pkgbase" - patch -Np1 < ../0001-Revert-http2-minor-buffer-and-error-path-fixes.patch + local _c + for _c in "${_backports[@]}"; do + if [[ $_c == *..* ]]; then + git log --oneline --reverse "${_c}" + else + git log --oneline -1 "${_c}" + fi + git cherry-pick -n -m1 "${_c}" + done + for _c in "${_reverts[@]}"; do + git log --oneline -1 "${_c}" + git revert -n "${_c}" + done + + autoreconf -fi } build() { + local _configure_options=( + --prefix='/usr' + --mandir='/usr/share/man' + --disable-ldap + --disable-ldaps + --disable-manual + --enable-ipv6 + --enable-threaded-resolver + --with-gssapi + --with-libssh2 + --with-random='/dev/urandom' + --with-ca-bundle='/etc/ssl/certs/ca-certificates.crt' + ) + mkdir build-curl{,-compat,-gnutls} # build curl cd "${srcdir}"/build-curl - "${srcdir}/${pkgbase}-${pkgver}"/configure \ + "${srcdir}/${pkgbase}"/configure \ "${_configure_options[@]}" \ --with-openssl \ --enable-versioned-symbols @@ -60,7 +81,7 @@ build() { # build libcurl-compat cd "${srcdir}"/build-curl-compat - "${srcdir}/${pkgbase}-${pkgver}"/configure \ + "${srcdir}/${pkgbase}"/configure \ "${_configure_options[@]}" \ --with-openssl \ --disable-versioned-symbols @@ -70,7 +91,7 @@ build() { # build libcurl-gnutls cd "${srcdir}"/build-curl-gnutls - "${srcdir}/${pkgbase}-${pkgver}"/configure \ + "${srcdir}/${pkgbase}"/configure \ "${_configure_options[@]}" \ --disable-versioned-symbols \ --without-openssl \ @@ -86,15 +107,16 @@ package_curl() { make DESTDIR="${pkgdir}" install make DESTDIR="${pkgdir}" install -C scripts - cd "${srcdir}/${pkgname}-${pkgver}" + cd "${srcdir}/${pkgname}" # license - install -Dt "${pkgdir}/usr/share/licenses/$pkgname" -m0644 COPYING + install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m0644 COPYING } package_libcurl-compat() { pkgdesc='An URL retrieval library (without versioned symbols)' depends=('curl' 'openssl') + provides=('libcurl-compat.so') cd "${srcdir}"/build-curl-compat @@ -113,6 +135,7 @@ package_libcurl-compat() { package_libcurl-gnutls() { pkgdesc='An URL retrieval library (without versioned symbols and linked against gnutls)' depends=('curl' 'gnutls') + provides=('libcurl-gnutls.so') cd "${srcdir}"/build-curl-gnutls diff --git a/curl/clean b/curl/clean index cedda8b..4fa6b99 100644 --- a/curl/clean +++ b/curl/clean @@ -1 +1 @@ -rm -rvf {*.tar.gz*,src,pkg} +rm -rvf {*.tar.gz*,src,pkg,curl} diff --git a/curl/deps b/curl/deps index 7e465a4..0534100 100644 --- a/curl/deps +++ b/curl/deps @@ -1,3 +1,5 @@ patchelf +git - +autoconf +automake