From 63cc3a9433e5b073341faf27069e497b01d9c2e8 Mon Sep 17 00:00:00 2001 From: Satadru Pramanik Date: Wed, 11 Jan 2023 17:40:13 -0500 Subject: [PATCH] crun and dependencies (#7830) --- packages/criu.rb | 56 +++++++++++++++++++++++++++++++++++++++++ packages/crun.rb | 51 +++++++++++++++++++++++++++++++++++++ packages/libmnl.rb | 26 ++++++++++--------- packages/libnftnl.rb | 27 ++++++++++---------- packages/libnl3.rb | 22 ++++++++-------- packages/nftables.rb | 60 +++++++++++++++++++++----------------------- packages/protobuf.rb | 26 +++++++++---------- packages/yajl.rb | 51 +++++++++++++++++++------------------ tools/packages.yaml | 10 ++++++++ 9 files changed, 225 insertions(+), 104 deletions(-) create mode 100644 packages/criu.rb create mode 100644 packages/crun.rb diff --git a/packages/criu.rb b/packages/criu.rb new file mode 100644 index 000000000..afc6f640a --- /dev/null +++ b/packages/criu.rb @@ -0,0 +1,56 @@ +# Adapted from Arch Linux criu PKGBUILD at: +# https://github.com/archlinux/svntogit-community/raw/packages/criu/trunk/PKGBUILD + +require 'package' + +class Criu < Package + description 'Utilities to checkpoint and restore processes in userspace' + homepage 'https://criu.org' + version '3.17.1' + license 'GPL2' + compatibility 'x86_64' + source_url 'https://github.com/checkpoint-restore/criu.git' + git_hashtag "v#{version}" + + binary_url({ + x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/criu/3.17.1_x86_64/criu-3.17.1-chromeos-x86_64.tar.zst' + }) + binary_sha256({ + x86_64: '1f2d925e397b49970d38fa034cb71d9af0f8e159b9b34c0afd0d8f93e6fadf5c' + }) + + depends_on 'glibc' # R + depends_on 'gnutls' # R + depends_on 'libbsd' # R + depends_on 'libcap' => :build + depends_on 'libnet' # R + depends_on 'libnl3' # R + depends_on 'nftables' # R + depends_on 'protobuf' => :build + depends_on 'protobuf_c' # R + depends_on 'xmlto' => :build + + def self.patch + # Fix hard coded symlink path + FileUtils.ln_sf "#{CREW_PREFIX}/include/google/protobuf/descriptor.proto", 'images/google/protobuf/descriptor.proto' + system "sed -i 's,/etc,#{CREW_PREFIX}/etc,g' criu/Makefile" + # Get this error on armv7l: + # lto-wrapper: warning: using serial compilation of 15 LTRANS jobs + # lto-wrapper: note: see the ‘-flto’ option documentation for more information + # mold: error: undefined symbol: test_and_set_bit + # >>> referenced by + # >>> /usr/local/tmp/cc7xJrLk.ltrans4.ltrans.o:(set_fds_event) + # collect2: error: ld returned 1 exit status + # make[1]: *** [criu/Makefile:88: criu/criu] Error 1 + end + + def self.build + system 'unset ARCH ; LD=ld.bfd make' + end + + def self.install + system "unset ARCH ; LD=ld.bfd make DESTDIR=#{CREW_DEST_DIR} PREFIX=#{CREW_PREFIX} SBINDIR=#{CREW_PREFIX}/bin LIBDIR=#{CREW_LIB_PREFIX} LIBEXECDIR=#{CREW_LIB_PREFIX} install" + FileUtils.rm_rf "#{CREW_DEST_PREFIX}/include/compel/common/asm" + FileUtils.rm_rf "#{CREW_DEST_DIR}/var" + end +end diff --git a/packages/crun.rb b/packages/crun.rb new file mode 100644 index 000000000..a9b145646 --- /dev/null +++ b/packages/crun.rb @@ -0,0 +1,51 @@ +# Adapted from Arch Linux crun PKGBUILD at: +# https://github.com/archlinux/svntogit-community/raw/packages/crun/trunk/PKGBUILD + +require 'package' + +class Crun < Package + description 'A fast and lightweight fully featured OCI runtime and C library for running containers' + homepage 'https://github.com/containers/crun' + version '1.7.2' + license 'LGPL' + compatibility 'aarch64 armv7l x86_64' + source_url 'https://github.com/containers/crun.git' + git_hashtag version + + binary_url({ + aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/crun/1.7.2_armv7l/crun-1.7.2-chromeos-armv7l.tar.zst', + armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/crun/1.7.2_armv7l/crun-1.7.2-chromeos-armv7l.tar.zst', + x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/crun/1.7.2_x86_64/crun-1.7.2-chromeos-x86_64.tar.zst' + }) + binary_sha256({ + aarch64: 'fe7f3f3282a8d05e76e9dd4036fa8b1761eee0cd5f7eed93c991365c9c17fc8e', + armv7l: 'fe7f3f3282a8d05e76e9dd4036fa8b1761eee0cd5f7eed93c991365c9c17fc8e', + x86_64: '49d7b8323992b044cd6a4658e7a66ce1f14f13c74ebf534870ff999819ddac4e' + }) + + depends_on 'criu' if ARCH == 'x86_64' + depends_on 'glibc' # R + depends_on 'go_md2man' => :build + depends_on 'libbpf' => :build + depends_on 'libcap' # R + depends_on 'libgcrypt' # R + depends_on 'libgpgerror' # R + depends_on 'libseccomp' # R + depends_on 'yajl' # R + + def self.build + @disable_criu = ARCH == 'x86_64' ? '' : '--disable-criu' + system './autogen.sh' + system "./configure #{CREW_OPTIONS} \ + #{@disable_criu} \ + --disable-systemd \ + --enable-shared \ + --enable-dynamic \ + --with-python-bindings" + system 'make' + end + + def self.install + system "make DESTDIR=#{CREW_DEST_DIR} install" + end +end diff --git a/packages/libmnl.rb b/packages/libmnl.rb index 71f3f0a47..3d600c4ba 100644 --- a/packages/libmnl.rb +++ b/packages/libmnl.rb @@ -3,27 +3,29 @@ require 'package' class Libmnl < Package description 'libmnl is a minimalistic user-space library oriented to Netlink developers.' homepage 'https://www.netfilter.org/projects/libmnl/' - version '1.0.4' + version '1.0.5' license 'LGPL-2.1' compatibility 'all' - source_url 'https://www.netfilter.org/projects/libmnl/files/libmnl-1.0.4.tar.bz2' - source_sha256 '171f89699f286a5854b72b91d06e8f8e3683064c5901fb09d954a9ab6f551f81' + source_url 'https://www.netfilter.org/projects/libmnl/files/libmnl-1.0.5.tar.bz2' + source_sha256 '274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525' binary_url({ - aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libmnl/1.0.4_armv7l/libmnl-1.0.4-chromeos-armv7l.tar.xz', - armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libmnl/1.0.4_armv7l/libmnl-1.0.4-chromeos-armv7l.tar.xz', - i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libmnl/1.0.4_i686/libmnl-1.0.4-chromeos-i686.tar.xz', - x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libmnl/1.0.4_x86_64/libmnl-1.0.4-chromeos-x86_64.tar.xz' + aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libmnl/1.0.5_armv7l/libmnl-1.0.5-chromeos-armv7l.tar.zst', + armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libmnl/1.0.5_armv7l/libmnl-1.0.5-chromeos-armv7l.tar.zst', + i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libmnl/1.0.5_i686/libmnl-1.0.5-chromeos-i686.tar.zst', + x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libmnl/1.0.5_x86_64/libmnl-1.0.5-chromeos-x86_64.tar.zst' }) binary_sha256({ - aarch64: 'dc5154a2d9bfcb43967639fc79097831dfb2668895c8b61ae889b8277536de0a', - armv7l: 'dc5154a2d9bfcb43967639fc79097831dfb2668895c8b61ae889b8277536de0a', - i686: 'a40aabf83e469e6e8fe8fa3a36d644f44dd23d86a83338b1c040029569b830bd', - x86_64: 'a67ed03507bb290ce861336a7cfd7f1a45a16b25b4c1a9abef1262b6ede7f0b8' + aarch64: '85718120df283f822eeadce36b6db63f972ce349f09f1ec67dd15e0d3c9212ec', + armv7l: '85718120df283f822eeadce36b6db63f972ce349f09f1ec67dd15e0d3c9212ec', + i686: '248da767b3daea5332b311c12a4e092ffbd0615c38331bc1416809042e4190c4', + x86_64: 'a791591c92ee92cb3d75ccb789e71f131395515004638eebb33664eb9ddb7e0a' }) + depends_on 'glibc' # R + def self.build - system "./configure --prefix=#{CREW_PREFIX} --libdir=#{CREW_LIB_PREFIX}" + system "./configure #{CREW_OPTIONS}" system 'make' end diff --git a/packages/libnftnl.rb b/packages/libnftnl.rb index 15291e4ab..da00f2418 100644 --- a/packages/libnftnl.rb +++ b/packages/libnftnl.rb @@ -3,26 +3,27 @@ require 'package' class Libnftnl < Package description 'libnftnl is a userspace library providing a low-level netlink programming interface (API) to the in-kernel nf_tables subsystem.' homepage 'https://netfilter.org/projects/libnftnl/' - compatibility 'all' license 'GPL-2' - version '1.1.7-1' - source_url 'https://netfilter.org/projects/libnftnl/files/libnftnl-1.1.7.tar.bz2' - source_sha256 '20dbc13f11004aea2c9e479cfb90359cb11fe3446c3140811c18e4ec1648ed8f' + version '1.2.4' + compatibility 'all' + source_url 'https://netfilter.org/projects/libnftnl/files/libnftnl-1.2.4.tar.bz2' + source_sha256 'c0fe233be4cdfd703e7d5977ef8eb63fcbf1d0052b6044e1b23d47ca3562477f' binary_url({ - aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnftnl/1.1.7-1_armv7l/libnftnl-1.1.7-1-chromeos-armv7l.tar.xz', - armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnftnl/1.1.7-1_armv7l/libnftnl-1.1.7-1-chromeos-armv7l.tar.xz', - i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnftnl/1.1.7-1_i686/libnftnl-1.1.7-1-chromeos-i686.tar.xz', - x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnftnl/1.1.7-1_x86_64/libnftnl-1.1.7-1-chromeos-x86_64.tar.xz' + aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnftnl/1.2.4_armv7l/libnftnl-1.2.4-chromeos-armv7l.tar.zst', + armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnftnl/1.2.4_armv7l/libnftnl-1.2.4-chromeos-armv7l.tar.zst', + i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnftnl/1.2.4_i686/libnftnl-1.2.4-chromeos-i686.tar.zst', + x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnftnl/1.2.4_x86_64/libnftnl-1.2.4-chromeos-x86_64.tar.zst' }) binary_sha256({ - aarch64: '6cc802f2d8a84367d34fc91c32aa8f06715a0cac91d4c6ea774fe2905be1255a', - armv7l: '6cc802f2d8a84367d34fc91c32aa8f06715a0cac91d4c6ea774fe2905be1255a', - i686: '510a3ca438c83f53457707bc89e6ddab8332fb7e5343721def87cbc9a86c34da', - x86_64: '7e72516f66aab3d3ed6d554e72c0b198ec82ee8e061a7c3941d607890de100f2' + aarch64: 'ad098ec7999d05bbe18c08c31e456e5b1fad46f0168b6f2bf16313044a403378', + armv7l: 'ad098ec7999d05bbe18c08c31e456e5b1fad46f0168b6f2bf16313044a403378', + i686: '1337220cb856de42777e6fdb1d4cc85140bd5e00dcfb5cd171ac3f316d9b590b', + x86_64: '791461abdbe8e7aea50998a783844c30ba323c2827e013c9017d555600b13b5d' }) - depends_on 'libmnl' + depends_on 'libmnl' # R + depends_on 'glibc' # R def self.build system "./configure #{CREW_OPTIONS}" diff --git a/packages/libnl3.rb b/packages/libnl3.rb index 892921394..8e321eb8d 100644 --- a/packages/libnl3.rb +++ b/packages/libnl3.rb @@ -3,7 +3,7 @@ require 'package' class Libnl3 < Package description 'libnl is a library for applications dealing with netlink sockets.' homepage 'http://www.infradead.org/~tgr/libnl/' - @_ver = '3.5.0' + @_ver = '3.7.0' version @_ver license 'LGPL-2.1' compatibility 'all' @@ -11,22 +11,24 @@ class Libnl3 < Package git_hashtag "libnl#{@_ver.gsub('.', '_')}" binary_url({ - aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnl3/3.5.0_armv7l/libnl3-3.5.0-chromeos-armv7l.tpxz', - armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnl3/3.5.0_armv7l/libnl3-3.5.0-chromeos-armv7l.tpxz', - i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnl3/3.5.0_i686/libnl3-3.5.0-chromeos-i686.tpxz', - x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnl3/3.5.0_x86_64/libnl3-3.5.0-chromeos-x86_64.tpxz' + aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnl3/3.7.0_armv7l/libnl3-3.7.0-chromeos-armv7l.tar.zst', + armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnl3/3.7.0_armv7l/libnl3-3.7.0-chromeos-armv7l.tar.zst', + i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnl3/3.7.0_i686/libnl3-3.7.0-chromeos-i686.tar.zst', + x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/libnl3/3.7.0_x86_64/libnl3-3.7.0-chromeos-x86_64.tar.zst' }) binary_sha256({ - aarch64: '265fb9c115d3d00aaa06c88d01a817467aa70cc0d4fd3e8ea62d08d22f3870cd', - armv7l: '265fb9c115d3d00aaa06c88d01a817467aa70cc0d4fd3e8ea62d08d22f3870cd', - i686: '9fe4afdea1bac12e037d95c904e9992ee07d05fdeebff33d1a0b995863611d01', - x86_64: '56ac30c301373e04884d53be9fcbdca2370868724dc870282ac15d11dfca1c93' + aarch64: '6eb8a20bc0ff41d8a61116f92eb6426e6f085ce219b2af19ab99ac3d6a9d745e', + armv7l: '6eb8a20bc0ff41d8a61116f92eb6426e6f085ce219b2af19ab99ac3d6a9d745e', + i686: '123e2b875eb3a25373ba275c79fdfacf877fa0871a522e456715049c3c0f142d', + x86_64: 'de4409d700e3335d43d63acb1d50ff29e0827a28766075704ba54170d7858967' }) + depends_on 'glibc' # R + def self.build system 'autoupdate' system './autogen.sh' - system "#{CREW_ENV_OPTIONS} ./configure #{CREW_OPTIONS} \ + system "./configure #{CREW_OPTIONS} \ --enable-cli \ --enable-pthreads \ --disable-debug" diff --git a/packages/nftables.rb b/packages/nftables.rb index 34ee5da32..b7f7f22fe 100644 --- a/packages/nftables.rb +++ b/packages/nftables.rb @@ -1,54 +1,50 @@ +# Adapted from Arch Linux nftables PKGBUILD at: +# https://github.com/archlinux/svntogit-packages/raw/packages/nftables/trunk/PKGBUILD + require 'package' class Nftables < Package - description 'nftables replaces the popular {ip,ip6,arp,eb}tables.' + description 'Netfilter tables userspace tools' homepage 'https://netfilter.org/projects/nftables/' - compatibility 'all' - version '0.9.6-1' - license 'GPL-2' - source_url 'https://netfilter.org/projects/nftables/files/nftables-0.9.6.tar.bz2' - source_sha256 '68d6fdfe8ab02303e6b1f13968a4022da5b0120110eaee3233d806857937b66e' + version '1.0.6' + license 'GPL2' + compatibility 'aarch64 armv7l x86_64' + source_url 'https://netfilter.org/projects/nftables/files/nftables-1.0.6.tar.xz' + source_sha256 '2407430ddd82987670e48dc2fda9e280baa8307abec04ab18d609df3db005e4c' binary_url({ - aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/nftables/0.9.6-1_armv7l/nftables-0.9.6-1-chromeos-armv7l.tar.xz', - armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/nftables/0.9.6-1_armv7l/nftables-0.9.6-1-chromeos-armv7l.tar.xz', - i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/nftables/0.9.6-1_i686/nftables-0.9.6-1-chromeos-i686.tar.xz', - x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/nftables/0.9.6-1_x86_64/nftables-0.9.6-1-chromeos-x86_64.tar.xz' + aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/nftables/1.0.6_armv7l/nftables-1.0.6-chromeos-armv7l.tar.zst', + armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/nftables/1.0.6_armv7l/nftables-1.0.6-chromeos-armv7l.tar.zst', + x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/nftables/1.0.6_x86_64/nftables-1.0.6-chromeos-x86_64.tar.zst' }) binary_sha256({ - aarch64: '87b2be9b1f371c684d5d21c111e8baf96f61813963ee38726c0fde7dd089eb47', - armv7l: '87b2be9b1f371c684d5d21c111e8baf96f61813963ee38726c0fde7dd089eb47', - i686: '08f6d4bd5f6f7e3a3b4dea10fd5cabd96001ac72e85c11757eff818a5eea1ea7', - x86_64: 'af2c671949dde45656db452e635af6f04e66b39c370ae0807afee0ad63a1e978' + aarch64: '729a1969245334e36de1b6a3b43284e418de245e9cd1f59bdaa5846a694584d6', + armv7l: '729a1969245334e36de1b6a3b43284e418de245e9cd1f59bdaa5846a694584d6', + x86_64: 'b9069b7d5528cf7a9f2aafc452f8d2e895e841b4a51c21769f4e336d76b915dc' }) - depends_on 'help2man' - depends_on 'jansson' - depends_on 'libmnl' - depends_on 'libnftnl' - depends_on 'readline' + depends_on 'asciidoc' => :build + depends_on 'glibc' # R + depends_on 'jansson' # R + depends_on 'libmnl' # R + depends_on 'libnftnl' # R + depends_on 'readline' # R def self.build - system "LIBS=\"-lncurses\" ./configure \ + system 'autoreconf -fiv' + system "./configure \ --prefix=#{CREW_PREFIX} \ --libdir=#{CREW_LIB_PREFIX} \ - --disable-man-doc \ + --sbindir=#{CREW_PREFIX}/bin \ + --sysconfdir=#{CREW_PREFIX}/etc \ --with-json \ - --with-mini-gmp" + --with-cli=readline \ + --with-mini-gmp \ + --disable-debug" system 'make' end def self.install - FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/man/man1" - system "touch #{CREW_DEST_PREFIX}/man/man1/nft.1.gz" system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install' end - - def self.postinstall - system "help2man -n 'userspace command line tool for nftables' -s 1 -N --no-discard-stderr '#{CREW_PREFIX}/sbin/nft -h' > nft.1" - system "sed -i 's,Usage:,nft,g' nft.1" - system "sed -i 's,USAGE:,NFT,g' nft.1" - system 'gzip -9 nft.1' - system "install -m644 nft.1.gz #{CREW_PREFIX}/man/man1/nft.1.gz" - end end diff --git a/packages/protobuf.rb b/packages/protobuf.rb index c8474b47e..1d9b04bd1 100644 --- a/packages/protobuf.rb +++ b/packages/protobuf.rb @@ -6,29 +6,29 @@ require 'package' class Protobuf < Package description 'Protocol Buffers - Googles data interchange format' homepage 'https://developers.google.com/protocol-buffers/' - @_ver = '21.5' + @_ver = '21.12' version @_ver license 'BSD' compatibility 'all' source_url "https://github.com/protocolbuffers/protobuf/archive/v#{@_ver}/protobuf-#{@_ver}.tar.gz" - source_sha256 '4a7e87e4166c358c63342dddcde6312faee06ea9d5bb4e2fa87d3478076f6639' + source_sha256 '22fdaf641b31655d4b2297f9981fa5203b2866f8332d3c6333f6b0107bb320de' binary_url({ - aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/protobuf/21.5_armv7l/protobuf-21.5-chromeos-armv7l.tar.zst', - armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/protobuf/21.5_armv7l/protobuf-21.5-chromeos-armv7l.tar.zst', - i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/protobuf/21.5_i686/protobuf-21.5-chromeos-i686.tar.zst', - x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/protobuf/21.5_x86_64/protobuf-21.5-chromeos-x86_64.tar.zst' + aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/protobuf/21.12_armv7l/protobuf-21.12-chromeos-armv7l.tar.zst', + armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/protobuf/21.12_armv7l/protobuf-21.12-chromeos-armv7l.tar.zst', + i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/protobuf/21.12_i686/protobuf-21.12-chromeos-i686.tar.zst', + x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/protobuf/21.12_x86_64/protobuf-21.12-chromeos-x86_64.tar.zst' }) binary_sha256({ - aarch64: '385f997ea44f29e57e3f09ac287e5c0916bc00bbcb37ec72c7546acbfcdaebec', - armv7l: '385f997ea44f29e57e3f09ac287e5c0916bc00bbcb37ec72c7546acbfcdaebec', - i686: '1381f344f2d10146615dc8d9344841c3df814ba6bf1701c5edcc37d5d53c840b', - x86_64: 'b5f2199cdf7ed7232475c6b745abc0a3df6e8e3a042bf19ed79fd50feaf535c3' + aarch64: '525fa6ba3fe024ceadab14380e4bd9e2b4a7e4c2e486285cf0cc2483a541b581', + armv7l: '525fa6ba3fe024ceadab14380e4bd9e2b4a7e4c2e486285cf0cc2483a541b581', + i686: '4dedac0a666c3050f7e4944bab9aa2c676a727fd448bbf6ae37cc1494ac13e5c', + x86_64: '314c9575d0a48a7a4ccada06404594452ab99183409aaec9e53abd8d1ede0dfe' }) - depends_on 'zlibpkg' - depends_on 'python3' => :build - depends_on 'cmake' => :build + depends_on 'gcc' # R + depends_on 'glibc' # R + depends_on 'zlibpkg' # R def self.build FileUtils.mkdir('builddir') diff --git a/packages/yajl.rb b/packages/yajl.rb index 8350d7fad..f9f70927e 100644 --- a/packages/yajl.rb +++ b/packages/yajl.rb @@ -3,43 +3,46 @@ require 'package' class Yajl < Package description 'A fast streaming JSON parsing library in C.' homepage 'http://lloyd.github.io/yajl/' - version '2.1.0-2' + version '2.1.0-3' license 'ISC' compatibility 'all' - source_url 'https://github.com/lloyd/yajl/archive/2.1.0.tar.gz' + source_url 'https://github.com/lloyd/yajl/archive/refs/tags/2.1.0.tar.gz' source_sha256 '3fb73364a5a30efe615046d07e6db9d09fd2b41c763c5f7d3bfb121cd5c5ac5a' binary_url({ - aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/yajl/2.1.0-2_armv7l/yajl-2.1.0-2-chromeos-armv7l.tar.xz', - armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/yajl/2.1.0-2_armv7l/yajl-2.1.0-2-chromeos-armv7l.tar.xz', - i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/yajl/2.1.0-2_i686/yajl-2.1.0-2-chromeos-i686.tar.xz', - x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/yajl/2.1.0-2_x86_64/yajl-2.1.0-2-chromeos-x86_64.tar.xz' + aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/yajl/2.1.0-3_armv7l/yajl-2.1.0-3-chromeos-armv7l.tar.zst', + armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/yajl/2.1.0-3_armv7l/yajl-2.1.0-3-chromeos-armv7l.tar.zst', + i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/yajl/2.1.0-3_i686/yajl-2.1.0-3-chromeos-i686.tar.zst', + x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/yajl/2.1.0-3_x86_64/yajl-2.1.0-3-chromeos-x86_64.tar.zst' }) binary_sha256({ - aarch64: '4afb152584a025239161684888378662bc1305adccd63b5b5246581a914b74c8', - armv7l: '4afb152584a025239161684888378662bc1305adccd63b5b5246581a914b74c8', - i686: 'fab84163e9ddd02ec0286ccbad845005d376352f392e68bd57955b003c788d89', - x86_64: 'f702d50a8e81b5fcfed7229a782aae5f03e45d85b0a386a24d152e3fac5ed595' + aarch64: 'ea5d04c8b8e356b3d2e7bfc72832da5501ea13adac7bea73f46ea84908b2eef7', + armv7l: 'ea5d04c8b8e356b3d2e7bfc72832da5501ea13adac7bea73f46ea84908b2eef7', + i686: '8cf7bea8291e23db0bccc346b5d37348c22f1be4e75bdc2210b48c2ef5f55984', + x86_64: '66ce37f06d1b48a593fd3cfb99263337c65597e12719c203641da0a0980e96f2' }) + depends_on 'glibc' # R + + def self.patch + # Fix CVE-2022-24795 + downloader 'https://patch-diff.githubusercontent.com/raw/lloyd/yajl/pull/242.patch', + '28cf573e61ad5d442dc3ea23912e1d1a3a714c6f20a647304fbd5a886b457f29' + system 'patch -Np1 -i 242.patch' + end + def self.build - Dir.mkdir 'build' - Dir.chdir 'build' do - system "cmake .. -DCMAKE_C_FLAGS=' -fPIC' -DCMAKE_INSTALL_PREFIX=#{CREW_PREFIX} -DCMAKE_BUILD_TYPE=Release" - system 'make' + FileUtils.mkdir('builddir') + Dir.chdir('builddir') do + system "cmake -G Ninja \ + #{CREW_CMAKE_LIBSUFFIX_OPTIONS} \ + -Wno-dev \ + .." end + system 'samu -C builddir' end def self.install - Dir.chdir 'build' do - system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install' - case ARCH - when 'x86_64' - Dir.chdir CREW_DEST_PREFIX.to_s do - FileUtils.mkdir 'lib64' - FileUtils.mv Dir.glob('lib/*'), 'lib64/' - end - end - end + system "DESTDIR=#{CREW_DEST_DIR} samu -C builddir install" end end diff --git a/tools/packages.yaml b/tools/packages.yaml index 7db55c2a2..0dbce149e 100644 --- a/tools/packages.yaml +++ b/tools/packages.yaml @@ -1045,6 +1045,11 @@ url: https://chromium.googlesource.com/chromiumos/third_party/adhd activity: medium --- kind: url +name: criu +url: https://github.com/checkpoint-restore/criu/tags +activity: medium +--- +kind: url name: cronie url: https://github.com/cronie-crond/cronie/releases activity: medium @@ -1070,6 +1075,11 @@ url: https://chromium.googlesource.com/crosvm/crosvm activity: high --- kind: url +name: crun +url: https://github.com/containers/crun/releases +activity: high +--- +kind: url name: cryptopp url: https://cryptopp.com/#download activity: low