Commit cab5ec64 authored by satmandu's avatar satmandu Committed by GitHub

Fix segfault issue in static curl, add libcurl to break out shared libraries,...

Fix segfault issue in static curl, add libcurl to break out shared libraries, update git (built with libcurl) (#5843)

* Just curl and git static updates

* remove check file

* add version which uses hashpipe in build
parent 035394fa
This diff is collapsed.
......@@ -3,33 +3,35 @@ require 'package'
class Git < Package
description 'Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.'
homepage 'https://git-scm.com/'
@_ver = '2.31.1'
version "#{@_ver}-1"
@_ver = '2.32.0'
version @_ver
license 'GPL-2'
compatibility 'all'
source_url "https://github.com/git/git/archive/v#{@_ver}.tar.gz"
source_sha256 'b1c0e95e9861b5d1b9ad3d8deaa2d8c7f02304ffc1b5e8869dd9fb98f9a0d436'
source_sha256 '004697482b6e3b0ae9147580c32efd35869426227f1526f8eafa7950c31def94'
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/git/2.31.1-1_armv7l/git-2.31.1-1-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/git/2.31.1-1_armv7l/git-2.31.1-1-chromeos-armv7l.tpxz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/git/2.31.1-1_i686/git-2.31.1-1-chromeos-i686.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/git/2.31.1-1_x86_64/git-2.31.1-1-chromeos-x86_64.tpxz'
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/git/2.32.0_armv7l/git-2.32.0-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/git/2.32.0_armv7l/git-2.32.0-chromeos-armv7l.tpxz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/git/2.32.0_i686/git-2.32.0-chromeos-i686.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/git/2.32.0_x86_64/git-2.32.0-chromeos-x86_64.tpxz'
})
binary_sha256({
aarch64: '364b30aafa845d7950b93fd67e72fcc752008dee08ff571155ffb4239eaba2ac',
armv7l: '364b30aafa845d7950b93fd67e72fcc752008dee08ff571155ffb4239eaba2ac',
i686: 'b80054bb43df65051d37c0c8e7f83c46f97d084027d7997871be91a7731a642c',
x86_64: 'c0bf7de6181f29f73abc75793410441aabcf2b71c3bd7a4321179a59859a47e6'
aarch64: 'd72074c725dd003aec3eaacc0523c069f6f1c8462291eba04ad625d1d0b37092',
armv7l: 'd72074c725dd003aec3eaacc0523c069f6f1c8462291eba04ad625d1d0b37092',
i686: '63a71a159ba30241c984b8bbc918c0e73f10b6a890ecd6e266b67b3e14b4aed5',
x86_64: '8d08dd84e5f16a11671bd387d2b5ec33ec2474dcf1d948c5d15474fe6afc7c2c'
})
depends_on 'libcurl' => :build
def self.build
abort('Please remove libiconv before building.') if File.exist?("#{CREW_LIB_PREFIX}/libcharset.so")
@curl_static_libs = `curl-config --static-libs`.chomp.gsub('=auto', '')
@sasl2_static_libs = "#{CREW_LIB_PREFIX}/libdb.a #{CREW_LIB_PREFIX}/libsasl2.a " + `pkg-config --libs --static libsasl2`.chomp
@krb5_static_libs = "#{CREW_LIB_PREFIX}/libkrb5support.a #{CREW_LIB_PREFIX}/libgssapi_krb5.a #{CREW_LIB_PREFIX}/libkrb5.a #{CREW_LIB_PREFIX}/libk5crypto.a #{CREW_LIB_PREFIX}/libcom_err.a"
@ldflags = "-flto -static -L#{CREW_LIB_PREFIX} #{@krb5_static_libs} #{@sasl2_static_libs} -lgmp #{@curl_static_libs} -lunistring -Wl,--no-as-needed -ldl"
@ldflags = "-flto -static -L#{CREW_LIB_PREFIX} #{CREW_LIB_PREFIX}/libssl.a #{CREW_LIB_PREFIX}/libcrypto.a #{@krb5_static_libs} #{CREW_LIB_PREFIX}/libcurl.a #{@sasl2_static_libs} -lgmp #{@curl_static_libs} -lunistring -Wl,--no-as-needed -ldl"
FileUtils.mkdir 'curl'
FileUtils.ln_s "#{CREW_PREFIX}/include/curl", 'curl/include'
......
require 'package'
class Libcurl < Package
description 'Command line tool and library for transferring data with URLs.'
homepage 'https://curl.se/'
@_ver = '7.77.0'
version @_ver
license 'curl'
compatibility 'all'
source_url 'https://github.com/curl/curl.git'
git_hashtag 'curl-7_77_0'
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libcurl/7.77.0_armv7l/libcurl-7.77.0-chromeos-armv7l.tpxz',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libcurl/7.77.0_armv7l/libcurl-7.77.0-chromeos-armv7l.tpxz',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libcurl/7.77.0_i686/libcurl-7.77.0-chromeos-i686.tpxz',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libcurl/7.77.0_x86_64/libcurl-7.77.0-chromeos-x86_64.tpxz'
})
binary_sha256({
aarch64: '0acfb983b58fbffc1c94480b5b21b22013f8d853a649f3acadb1d6c41e34616c',
armv7l: '0acfb983b58fbffc1c94480b5b21b22013f8d853a649f3acadb1d6c41e34616c',
i686: '6aa358d2b91b50f758bd9908492d8b200cd3579da37056169f8edb4254d3cdf4',
x86_64: '6f94ed40fb2853d5459e6b9513483f3794630ec6e61f64951311c57a4664b85a'
})
depends_on 'brotli' => :build
depends_on 'ca_certificates' => :build
depends_on 'c_ares' # R
depends_on 'libcyrussasl' # R
depends_on 'libidn2' # R
depends_on 'libnghttp2' # R
depends_on 'libpsl' # R
depends_on 'libssh' # R
depends_on 'libunbound' # ?
depends_on 'openldap' # R
depends_on 'openssl' # R
depends_on 'py3_pip' => :build
depends_on 'rust' => :build
depends_on 'valgrind' => :build
depends_on 'zlibpkg' # R
depends_on 'zstd' # R
def self.build
# Without these downstream programs which want to statically link
# libcurl have issues.
@krb5_static_libs = '-l:libkrb5support.a -l:libgssapi_krb5.a -l:libkrb5.a -l:libk5crypto.a -l:libcom_err.a'
@libssh = '--with-libssh'
case ARCH
when 'i686'
@libssh = '--without-libssh'
end
system '[ -x configure ] || autoreconf -fvi'
system "env CFLAGS='-flto=auto -pipe -O3 -ffat-lto-objects -fipa-pta -fno-semantic-interposition -fdevirtualize-at-ltrans' \
CXXFLAGS='-flto=auto -pipe -O3 -ffat-lto-objects -fipa-pta -fno-semantic-interposition -fdevirtualize-at-ltrans' \
LDFLAGS='-flto=auto' LIBS='#{@krb5_static_libs} -lm -lbrotlicommon -lbrotlidec -lzstd -lz -lssl -lcrypto -lsasl2 -lxml2 -lpthread' \
./configure #{CREW_OPTIONS} \
--disable-maintainer-mode \
--enable-ares \
--enable-ipv6 \
--enable-ldap \
--enable-unix-sockets \
--with-ca-bundle=#{CREW_PREFIX}/etc/ssl/certs/ca-certificates.crt \
--with-ca-fallback \
--with-ca-path=#{CREW_PREFIX}/etc/ssl/certs \
--with-libmetalink \
#{@libssh} \
--with-openssl \
--without-gnutls \
--without-librtmp"
system 'make'
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
FileUtils.rm "#{CREW_DEST_PREFIX}/bin/curl"
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment