From e0b8a94f39f3f9881b97620c8393f2be34c35ebd Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:27:21 -0500 Subject: [PATCH 01/16] user/ruby3.0: remove for ruby3.2 --- user/ruby3.0/APKBUILD | 232 ------------------ user/ruby3.0/dont-install-bundled-gems.patch | 20 -- user/ruby3.0/fix-get_main_stack.patch | 70 ------ user/ruby3.0/ruby3.0.post-upgrade | 17 -- .../test_insns-lower-recursion-depth.patch | 47 ---- 5 files changed, 386 deletions(-) delete mode 100644 user/ruby3.0/APKBUILD delete mode 100644 user/ruby3.0/dont-install-bundled-gems.patch delete mode 100644 user/ruby3.0/fix-get_main_stack.patch delete mode 100644 user/ruby3.0/ruby3.0.post-upgrade delete mode 100644 user/ruby3.0/test_insns-lower-recursion-depth.patch diff --git a/user/ruby3.0/APKBUILD b/user/ruby3.0/APKBUILD deleted file mode 100644 index 35844b6..0000000 --- a/user/ruby3.0/APKBUILD +++ /dev/null @@ -1,232 +0,0 @@ -# Maintainer: Antoine Martin (ayakael) -# Contributor: Antoine Martin (ayakael) -# Contributor: Carlo Landmeter -# Contributor: Jakub Jirutka -# Contributor: Nulo -# -# secfixes: -# 3.0.6-r0: -# - CVE-2023-28755 -# - CVE-2023-28756 -# 3.0.5-r0: -# - CVE-2021-33621 -# 3.0.4-r0: -# - CVE-2022-28738 -# - CVE-2022-28739 -# 3.0.3-r0: -# - CVE-2021-41817 -# - CVE-2021-41816 -# - CVE-2021-41819 -# 2.7.4-r0: -# - CVE-2021-31799 -# - CVE-2021-31810 -# - CVE-2021-32066 -# 2.7.3-r0: -# - CVE-2021-28965 -# - CVE-2021-28966 -# 2.7.2-r0: -# - CVE-2020-25613 -# 2.6.6-r0: -# - CVE-2020-10663 -# - CVE-2020-10933 -# 2.6.5-r0: -# - CVE-2019-16255 -# - CVE-2019-16254 -# - CVE-2019-15845 -# - CVE-2019-16201 -# 2.5.2-r0: -# - CVE-2018-16395 -# - CVE-2018-16396 -# 2.5.1-r0: -# - CVE-2017-17742 -# - CVE-2018-6914 -# - CVE-2018-8777 -# - CVE-2018-8778 -# - CVE-2018-8779 -# - CVE-2018-8780 -# 2.4.2-r0: -# - CVE-2017-0898 -# - CVE-2017-10784 -# - CVE-2017-14033 -# - CVE-2017-14064 -# - CVE-2017-0899 -# - CVE-2017-0900 -# - CVE-2017-0901 -# - CVE-2017-0902 -# 2.4.3-r0: -# - CVE-2017-17405 -# -pkgname=ruby3.0 -_pkgname=ruby -# When upgrading, upgrade also each ruby- aport listed in file -# gems/bundled_gems. If some aport is missing or not in the main repo, -# create/move it. -pkgver=3.0.6 -_abiver="${pkgver%.*}.0" -pkgrel=0 -pkgdesc="An object-oriented language for quick and easy programming" -url="https://www.ruby-lang.org/" -arch="all" -license="Ruby AND BSD-2-Clause AND MIT" -depends="ca-certificates" -depends_dev=" - $pkgname=$pkgver-r$pkgrel - $pkgname-rdoc=$pkgver-r$pkgrel - gmp-dev - libucontext-dev - " -makedepends="$depends_dev zlib-dev openssl1.1-compat-dev gdbm-dev readline-dev - libffi-dev coreutils yaml-dev linux-headers autoconf" -install="$pkgname.post-upgrade" -subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev - $pkgname-rdoc::noarch - $pkgname-libs - $pkgname-full::noarch - " -source="https://cache.ruby-lang.org/pub/ruby/${pkgver%.*}/ruby-$pkgver.tar.gz - test_insns-lower-recursion-depth.patch - fix-get_main_stack.patch - dont-install-bundled-gems.patch - " -replaces="ruby-gems" -builddir="$srcdir/$_pkgname-$pkgver" - -# For backward compatibility (pre 3.x). -for _i in bigdecimal etc fiddle gdbm io-console irb json; do - provides="$provides ruby3.0-$_i=$pkgver-r$pkgrel" -done - -_gemdir="/usr/lib/ruby/gems/$_abiver" -_rubydir="/usr/lib/ruby/$_abiver" -_chost="${CHOST/-alpine-/-}" -_depends_full='' # see prepare() - -case "$CARCH" in - x86) _arch="i386";; - *) _arch="$CARCH";; -esac - -prepare() { - default_prepare - autoconf - - # v2.7.1 - Of all the bootstraptest only test_fiber fails on s390x: - # test_fiber.rb bootstraptest.tmp.rb:8: [BUG] vm_call_cfunc: cfp consistency error (0x000003ffb63fefb0, 0x000003ffb42f5f58) - case "$CARCH" in - s390x) rm bootstraptest/test_fiber.rb;; - esac - - local name ver; while read -r name ver _; do - case "$name=$ver" in - [a-z]*=[0-9]*.[0-9]*) - if ! apk add -qs "ruby-$name>=$ver" >/dev/null 2>&1; then - warning "bump package ruby-$name to version $ver" - fi - _depends_full="$_depends_full ruby-$name>=$ver" - esac - done < "$builddir"/gems/bundled_gems -} - -build() { - # -fomit-frame-pointer makes ruby segfault, see gentoo bug #150413 - # In many places aliasing rules are broken; play it safe - # as it's risky with newer compilers to leave it as it is. - export CFLAGS="$CFLAGS -fno-omit-frame-pointer -fno-strict-aliasing" - export CPPFLAGS="$CPPFLAGS -fno-omit-frame-pointer -fno-strict-aliasing" - - # Needed for coroutine stuff - export LIBS="-lucontext" - - # ruby saves path to install. we want use $PATH - export INSTALL=install - - # the configure script does not detect isnan/isinf as macros - export ac_cv_func_isnan=yes - export ac_cv_func_isinf=yes - - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --with-sitedir=/usr/local/lib/site_ruby \ - --with-search-path="/usr/lib/site_ruby/\$(ruby_ver)/$_arch-linux" \ - --enable-pthread \ - --disable-rpath \ - --enable-shared \ - --with-mantype=man - make -} - -check() { - make test -} - -package() { - make DESTDIR="$pkgdir" SUDO="" install - - install -m 644 -D COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING - - cd "$pkgdir" - - # Remove bundled gem bundler; it's provided by a separate aport/package - # ruby-bundler. - rm -rf ./$_rubydir/bundler - rm ./$_rubydir/bundler.rb - rm -rf ./$_gemdir/gems/bundler-* - rm ./$_gemdir/specifications/default/bundler-*.gemspec - rm usr/bin/bundle usr/bin/bundler - - # Remove bundled CA certificates; they are provided by ca-certificates. - rm ./$_rubydir/rubygems/ssl_certs/*/*.pem - rmdir ./$_rubydir/rubygems/ssl_certs/* || true - - rm -Rf ./$_gemdir/cache/* - - if [ -d usr/local ]; then - local f=$(find usr/local -type f) - if [ -n "$f" ]; then - error "Found files in /usr/local:" - echo "$f" - return 1 - fi - rm -r usr/local - fi -} - -rdoc() { - pkgdesc="Ruby documentation tool" - license="Ruby" - depends="$pkgname" - - amove $_rubydir/rdoc - amove $_gemdir/gems/rdoc-* - amove $_gemdir/specifications/default/rdoc-* - amove usr/bin/ri - amove usr/bin/rdoc -} - -libs() { - pkgdesc="Libraries necessary to run Ruby" - depends="" - - amove usr/lib -} - -full() { - pkgdesc="Ruby with all bundled gems" - # bundler is bundled since Ruby 2.6, so include it in ruby-full despite - # that it's provided by a seprate aport/package. - depends="ruby ruby-rdoc ruby-bundler $_depends_full" - - mkdir -p "$subpkgdir" -} - -sha512sums=" -d596bfd374ae777717379b409afe8ee1655ade0c0539ada7a10af4780b818efe25a28aa50a2a7226741d1776d744e10ad916641f9d12fb31c7444b0a01d0e0cc ruby-3.0.6.tar.gz -2ee66e841f841ad6e7c8877ec20b548d23b50d6a888a0d2d16f9062892c5d1c64efb59385f6723bae6cd1591824278787eefc0180768619c653243756d1300ab test_insns-lower-recursion-depth.patch -8e0a75899a3855f85441dabb6571569f13cf3472c2ccb2ec5c8e0e5cc9026af3c9951ebed4a754d9723dfd1c8ece32862802f20e18b7e5de4875125d92ef146b fix-get_main_stack.patch -10bda0462feaec73a7522ef622ffc18815b1d4302e771013ab78ef88d1d9f76277b1d24401eff054e031ca0fbc1ac80486d58282378cbdaf695786b212e6524d dont-install-bundled-gems.patch -" diff --git a/user/ruby3.0/dont-install-bundled-gems.patch b/user/ruby3.0/dont-install-bundled-gems.patch deleted file mode 100644 index 5710923..0000000 --- a/user/ruby3.0/dont-install-bundled-gems.patch +++ /dev/null @@ -1,20 +0,0 @@ -Don't install bundled gems - we package them separately. - ---- a/tool/rbinstall.rb -+++ b/tool/rbinstall.rb -@@ -947,6 +947,7 @@ - end - end - -+=begin XXX-Patched - install?(:ext, :comm, :gem, :'bundled-gems') do - gem_dir = Gem.default_dir - install_dir = with_destdir(gem_dir) -@@ -1026,6 +1027,7 @@ - puts "skip installing bundled gems because of lacking zlib" - end - end -+=end - - parse_args() - diff --git a/user/ruby3.0/fix-get_main_stack.patch b/user/ruby3.0/fix-get_main_stack.patch deleted file mode 100644 index ef369bc..0000000 --- a/user/ruby3.0/fix-get_main_stack.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/thread_pthread.c b/thread_pthread.c -index 951885ffa0..cf90321d1d 100644 ---- a/thread_pthread.c -+++ b/thread_pthread.c -@@ -681,9 +689,6 @@ hpux_attr_getstackaddr(const pthread_attr_t *attr, void **addr) - # define MAINSTACKADDR_AVAILABLE 0 - # endif - #endif --#if MAINSTACKADDR_AVAILABLE && !defined(get_main_stack) --# define get_main_stack(addr, size) get_stack(addr, size) --#endif - - #ifdef STACKADDR_AVAILABLE - /* -@@ -765,6 +762,55 @@ get_stack(void **addr, size_t *size) - return 0; - #undef CHECK_ERR - } -+ -+#if defined(__linux__) && !defined(__GLIBC__) && defined(HAVE_GETRLIMIT) -+ -+#ifndef PAGE_SIZE -+#include -+#define PAGE_SIZE sysconf(_SC_PAGE_SIZE) -+#endif -+ -+static int -+get_main_stack(void **addr, size_t *size) -+{ -+ size_t start, end, limit, prevend = 0; -+ struct rlimit r; -+ FILE *f; -+ char buf[PATH_MAX+80], s[8]; -+ int n; -+ STACK_GROW_DIR_DETECTION; -+ -+ f = fopen("/proc/self/maps", "re"); -+ if (!f) -+ return -1; -+ n = 0; -+ while (fgets(buf, sizeof buf, f)) { -+ n = sscanf(buf, "%zx-%zx %*s %*s %*s %*s %7s", &start, &end, s); -+ if (n >= 2) { -+ if (n == 3 && strcmp(s, "[stack]") == 0) -+ break; -+ prevend = end; -+ } -+ n = 0; -+ } -+ fclose(f); -+ if (n == 0) -+ return -1; -+ -+ limit = 100 << 20; /* 100MB stack limit */ -+ if (getrlimit(RLIMIT_STACK, &r)==0 && r.rlim_cur < limit) -+ limit = r.rlim_cur & -PAGE_SIZE; -+ if (limit > end) limit = end; -+ if (prevend < end - limit) prevend = end - limit; -+ if (start > prevend) start = prevend; -+ *addr = IS_STACK_DIR_UPPER() ? (void *)start : (void *)end; -+ *size = end - start; -+ return 0; -+} -+#else -+# define get_main_stack(addr, size) get_stack(addr, size) -+#endif -+ - #endif - - static struct { diff --git a/user/ruby3.0/ruby3.0.post-upgrade b/user/ruby3.0/ruby3.0.post-upgrade deleted file mode 100644 index 6cba787..0000000 --- a/user/ruby3.0/ruby3.0.post-upgrade +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -ver_new="$1" -ver_old="$2" - -if [ "$(apk version -t "$ver_old" "2.5.0-r0")" = "<" ]; then - cat >&2 <<-EOF - * - * In Ruby 2.5 more parts of the stdlib has been splitted into standalone - * gems, yet still installed with Ruby by default. We have moved some of - * them into separate subpackages. If you don't know which subpackages you - * need, you may install meta-package "ruby-full". - * - EOF -fi - -exit 0 diff --git a/user/ruby3.0/test_insns-lower-recursion-depth.patch b/user/ruby3.0/test_insns-lower-recursion-depth.patch deleted file mode 100644 index a775efb..0000000 --- a/user/ruby3.0/test_insns-lower-recursion-depth.patch +++ /dev/null @@ -1,47 +0,0 @@ -The patched test is a recursion function. We have lower stack size, -so we hit SystemStackError sooner than on other platforms. - - #361 test_insns.rb:389:in `block in ': - # recursive once - def once n - return %r/#{ - if n == 0 - true - else - once(n-1) # here - end - }/ox - end - x = once(128); x = once(7); x = once(16); - x =~ "true" && $~ - #=> "" (expected "true") once - Stderr output is not empty - bootstraptest.tmp.rb:3:in `once': stack level too deep (SystemStackError) - from bootstraptest.tmp.rb:7:in `block in once' - from bootstraptest.tmp.rb:3:in `once' - from bootstraptest.tmp.rb:7:in `block in once' - from bootstraptest.tmp.rb:3:in `once' - from bootstraptest.tmp.rb:7:in `block in once' - from bootstraptest.tmp.rb:3:in `once' - from bootstraptest.tmp.rb:7:in `block in once' - from bootstraptest.tmp.rb:3:in `once' - ... 125 levels... - from bootstraptest.tmp.rb:3:in `once' - from bootstraptest.tmp.rb:7:in `block in once' - from bootstraptest.tmp.rb:3:in `once' - from bootstraptest.tmp.rb:11:in `
' - Test_insns.rb FAIL 1/187 - FAIL 1/1197 tests failed - Make: *** [uncommon.mk:666: yes-btest-ruby] Error 1 - ---- a/bootstraptest/test_insns.rb -+++ b/bootstraptest/test_insns.rb -@@ -273,7 +273,7 @@ - end - }/ox - end -- x = once(128); x = once(7); x = once(16); -+ x = once(32); x = once(7); x = once(16); - x =~ "true" && $~ - }, - [ 'once', <<-'},', ], # { -- 2.45.2 From 87c6a5eca646032af96f2ab410c5530d1c67550e Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:27:32 -0500 Subject: [PATCH 02/16] user/ruby3.0-minitest: remove for ruby3.2 --- user/ruby3.0-minitest/APKBUILD | 68 ----------------------------- user/ruby3.0-minitest/gemspec.patch | 15 ------- 2 files changed, 83 deletions(-) delete mode 100644 user/ruby3.0-minitest/APKBUILD delete mode 100644 user/ruby3.0-minitest/gemspec.patch diff --git a/user/ruby3.0-minitest/APKBUILD b/user/ruby3.0-minitest/APKBUILD deleted file mode 100644 index 78eb953..0000000 --- a/user/ruby3.0-minitest/APKBUILD +++ /dev/null @@ -1,68 +0,0 @@ -# Maintainer: Antoine Martin (ayakael) -# Contributor: Antoine Martin (ayakael) -# Contributor: Jakub Jirutka - -pkgname=ruby3.0-minitest -_gemname=minitest -# Keep version in sync with "Bundled gems" (https://stdgems.org) for the -# packaged Ruby version. -pkgver=5.14.4 -pkgrel=1 -pkgdesc="Suite of testing facilities supporting TDD, BDD, mocking, and benchmarking for Ruby" -url="https://github.com/seattlerb/minitest" -arch="noarch" -license="MIT" -depends="ruby3.0" -makedepends="ruby3.0-rdoc" -subpackages="$pkgname-doc" -source="https://github.com/seattlerb/minitest/archive/v$pkgver/$_gemname-$pkgver.tar.gz - https://rubygems.org/downloads/$_gemname-$pkgver.gem - " -builddir="$srcdir/$_gemname-$pkgver" - -prepare() { - default_prepare - - # Generate gemspec (there's no gemspec in the source). - gem specification -l --ruby "$srcdir"/$_gemname-$pkgver.gem \ - > "$builddir"/$_gemname.gemspec -} - -build() { - gem build $_gemname.gemspec -} - -check() { - ruby -Ilib -Itest -e "Dir.glob('./test/**/test_*.rb', &method(:require))" -} - -package() { - local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" - local geminstdir="$gemdir/gems/$_gemname-$pkgver" - - gem install \ - --local \ - --install-dir "$gemdir" \ - --ignore-dependencies \ - --document ri \ - --verbose \ - $_gemname - - # Remove unnessecary files - cd "$gemdir" - rm -rf build_info cache extensions plugins - - cd "$geminstdir" - rm -rf History.* Manifest.* README.* Rakefile test/ -} - -doc() { - pkgdesc="$pkgdesc (ri docs)" - - amove "$(ruby -e 'puts Gem.default_dir')"/doc -} - -sha512sums=" -e0b780d47e79adcfb68c2d521aa002ad00caefb5820d41d157cfcf34e2c9f987c76e4d31ba1a46b62b18a51c1e84c0add2637f30ab89899e511f3db7b2cea3e3 minitest-5.14.4.tar.gz -f967a11cfce82e167879905082859273b270e8d8e663a0c1c553964a345fb8564547627b8cf97418ac5bda544bb76c1385438ad74ec8e846666dc2952d55c9e9 minitest-5.14.4.gem -" diff --git a/user/ruby3.0-minitest/gemspec.patch b/user/ruby3.0-minitest/gemspec.patch deleted file mode 100644 index a21a0c5..0000000 --- a/user/ruby3.0-minitest/gemspec.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/webrick.gemspec -+++ b/webrick.gemspec -@@ -14,12 +14,6 @@ - - s.require_path = %w{lib} - s.files = [ -- "Gemfile", -- "LICENSE.txt", -- "README.md", -- "Rakefile", -- "bin/console", -- "bin/setup", - "lib/webrick.rb", - "lib/webrick/accesslog.rb", - "lib/webrick/cgi.rb", -- 2.45.2 From 017303dac4237026561bcfa6660c3908c3a13efb Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:27:44 -0500 Subject: [PATCH 03/16] user/ruby3.0-bundler: remove for ruby3.2 --- user/ruby3.0-bundler/APKBUILD | 54 ----------------------------- user/ruby3.0-bundler/manpages.patch | 37 -------------------- 2 files changed, 91 deletions(-) delete mode 100644 user/ruby3.0-bundler/APKBUILD delete mode 100644 user/ruby3.0-bundler/manpages.patch diff --git a/user/ruby3.0-bundler/APKBUILD b/user/ruby3.0-bundler/APKBUILD deleted file mode 100644 index 1339c6a..0000000 --- a/user/ruby3.0-bundler/APKBUILD +++ /dev/null @@ -1,54 +0,0 @@ -# Maintainer: Antoine Martin (ayakael) -# Contributor: Antoine Martin (ayakael) -# Contributor: Jakub Jirutka - -pkgname=ruby3.0-bundler -_gemname=bundler -pkgver=2.3.26 -pkgrel=1 -pkgdesc="Manage an application's gem dependencies" -url="https://bundler.io/" -arch="noarch" -license="MIT" -depends="ruby3.0" -makedepends="ruby3.0-rake" -subpackages="$pkgname-doc" -source="https://github.com/rubygems/rubygems/archive/bundler-v$pkgver.tar.gz - manpages.patch - " -builddir="$srcdir/rubygems-bundler-v$pkgver/bundler" -options="!check" # tests require deps not available in main repo - -build() { - rake build_metadata - gem build $_gemname.gemspec -} - -package() { - local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" - - gem install \ - --local \ - --install-dir "$gemdir" \ - --bindir "$pkgdir/usr/bin" \ - --ignore-dependencies \ - --no-document \ - --verbose \ - $_gemname - - local n; for n in 1 5; do - mkdir -p "$pkgdir"/usr/share/man/man$n - mv "$gemdir"/gems/$_gemname-$pkgver/lib/bundler/man/*.$n "$pkgdir"/usr/share/man/man$n/ - done - - rm -rf "$gemdir"/cache \ - "$gemdir"/build_info \ - "$gemdir"/doc \ - "$gemdir"/gems/$_gemname-$pkgver/man \ - "$gemdir"/gems/$_gemname-$pkgver/*.md -} - -sha512sums=" -0a02d5130ecb8ca96e1850fc409a55d9f07481bbb8ec9b20554cdc6f3b3d3aada67717ab17dd30835615e4c228f39f895bd9b6f55bc22d4dbd88caef9cc105ba bundler-v2.3.26.tar.gz -77a36e61ed205aeea6114b1039dfbe29fcaf916eeae3f91785aa53b3ac534e004aa257e218534d927f39e3673eebbfb3ef9ee17f04ed81f74117799b88e53cf4 manpages.patch -" diff --git a/user/ruby3.0-bundler/manpages.patch b/user/ruby3.0-bundler/manpages.patch deleted file mode 100644 index cc11b02..0000000 --- a/user/ruby3.0-bundler/manpages.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Jakub Jirutka -Date: Fri, 26 Mar 2021 23:17:29 +0100 -Subject: [PATCH] Fix --help when man pages are moved out - -* Allow to move man pages from the gem's directory to the standard - system location (/usr/share/man) without breaking `bundler --help`. -* Fallback to the bundled ronn pages when the man command is available, - but the bundler man pages are not (i.e. ruby-bundler-doc is not - installed). -* Execute man with '-c' option to print the man page to the terminal - instead of using pager. - ---- a/lib/bundler/cli.rb -+++ b/lib/bundler/cli.rb -@@ -118,16 +118,17 @@ - end - - man_path = File.expand_path("man", __dir__) -- man_pages = Hash[Dir.glob(File.join(man_path, "**", "*")).grep(/.*\.\d*\Z/).collect do |f| -- [File.basename(f, ".*"), f] -+ man_pages = Hash[Dir.glob(File.join(man_path, "**", "*")).grep(/.*\.\d*\.ronn\Z/).collect do |f| -+ man_name = File.basename(f, ".ronn") -+ [File.basename(man_name, ".*"), man_name] - end] - - if man_pages.include?(command) - man_page = man_pages[command] -- if Bundler.which("man") && man_path !~ %r{^file:/.+!/META-INF/jruby.home/.+} -- Kernel.exec "man #{man_page}" -+ if Bundler.which("man") && Kernel.system("man -w #{command} >/dev/null 2>&1") && man_path !~ %r{^file:/.+!/META-INF/jruby.home/.+} -+ Kernel.exec "man -c #{command}" - else -- puts File.read("#{man_path}/#{File.basename(man_page)}.ronn") -+ puts File.read("#{man_path}/#{man_page}.ronn") - end - elsif command_path = Bundler.which("bundler-#{cli}") - Kernel.exec(command_path, "--help") -- 2.45.2 From 36b9607f8938cec0da519a0d6392f502407157d6 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:27:58 -0500 Subject: [PATCH 04/16] user/ruby3.0-rake: remove for ruby3.2 --- user/ruby3.0-rake/APKBUILD | 60 -------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 user/ruby3.0-rake/APKBUILD diff --git a/user/ruby3.0-rake/APKBUILD b/user/ruby3.0-rake/APKBUILD deleted file mode 100644 index 974f449..0000000 --- a/user/ruby3.0-rake/APKBUILD +++ /dev/null @@ -1,60 +0,0 @@ -# Maintainer: Antoine Martin (ayakael) -# Contributor: Antoine Martin (ayakael) -# Contributor: Jakub Jirutka - -pkgname=ruby3.0-rake -_gemname=rake -# Keep version in sync with "Bundled gems" (https://stdgems.org) for the -# packaged Ruby version. -pkgver=13.0.6 -pkgrel=1 -pkgdesc="A Ruby task runner, inspired by make" -url="https://github.com/ruby/rake" -arch="noarch" -license="MIT" -depends="ruby3.0" -checkdepends="ruby3.0-minitest" -makedepends="ruby3.0-rdoc" -subpackages="$pkgname-doc" -source="https://github.com/ruby/rake/archive/v$pkgver/$_gemname-$pkgver.tar.gz" -builddir="$srcdir/$_gemname-$pkgver" - -build() { - gem build $_gemname.gemspec -} - -check() { - # FIXME: Fix test_signal_propagation_in_tests - ruby -Ilib -Itest -e "Dir.glob('./test/**/test_*.rb', &method(:require))" -- \ - --exclude=test_signal_propagation_in_tests -} - -package() { - local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" - - gem install \ - --local \ - --install-dir "$gemdir" \ - --bindir "$pkgdir/usr/bin" \ - --ignore-dependencies \ - --document ri \ - --verbose \ - $_gemname - - # Remove unnessecary files - cd "$gemdir" - rm -rf build_info cache extensions plugins - - cd gems/rake-* - rm -rf doc ./*.rdoc MIT-LICENSE -} - -doc() { - pkgdesc="$pkgdesc (ri docs)" - - amove "$(ruby -e 'puts Gem.default_dir')"/doc -} - -sha512sums=" -1b438be96d8cedaf70e961b0bbd2217692b0b5537b2e1d5f599158e7da3e300cf6ab0c5f0c52fea89be0beb675effbbf563d24e55c84fb673b4982013355e03c rake-13.0.6.tar.gz -" -- 2.45.2 From 0cc62b6d4f1786e9598dd34e4dc1290d3ff2c4e6 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:30:40 -0500 Subject: [PATCH 05/16] user/ruby3.0-power_assert: remove for ruby3.2 --- user/ruby3.0-power_assert/APKBUILD | 64 ------------------------- user/ruby3.0-power_assert/gemspec.patch | 23 --------- 2 files changed, 87 deletions(-) delete mode 100644 user/ruby3.0-power_assert/APKBUILD delete mode 100644 user/ruby3.0-power_assert/gemspec.patch diff --git a/user/ruby3.0-power_assert/APKBUILD b/user/ruby3.0-power_assert/APKBUILD deleted file mode 100644 index bf81915..0000000 --- a/user/ruby3.0-power_assert/APKBUILD +++ /dev/null @@ -1,64 +0,0 @@ -# Maintainer: Antoine Martin (ayakael) -# Contributor: Antoine Martin (ayakael) -# Contributor: Jakub Jirutka - -pkgname=ruby3.0-power_assert -_gemname=power_assert -# Keep version in sync with "Bundled gems" (https://stdgems.org) for the -# packaged Ruby version. -pkgver=1.2.0 -pkgrel=1 -pkgdesc="Debug tool for Ruby that displays intermediate results of a method chain" -url="https://github.com/ruby/power_assert" -arch="noarch" -license="BSD-2-Clause AND Ruby" -depends="ruby3.0" -checkdepends="ruby3.0-pry ruby3.0-rake ruby3.0-test-unit" -makedepends="ruby3.0-rdoc" -subpackages="$pkgname-doc" -source="https://github.com/ruby/power_assert/archive/v$pkgver/$_gemname-$pkgver.tar.gz - gemspec.patch - " -builddir="$srcdir/$_gemname-$pkgver" -# Avoid circular dependency with ruby-test-unit. -options="!check" - -prepare() { - default_prepare - sed -i '/require .bundler/d' Rakefile -} - -build() { - gem build $_gemname.gemspec -} - -check() { - rake test -} - -package() { - local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" - - gem install \ - --local \ - --install-dir "$gemdir" \ - --ignore-dependencies \ - --document ri \ - --verbose \ - $_gemname - - # Remove unnessecary files - cd "$gemdir" - rm -rf build_info cache extensions plugins -} - -doc() { - pkgdesc="$pkgdesc (ri docs)" - - amove "$(ruby -e 'puts Gem.default_dir')"/doc -} - -sha512sums=" -2f001f6223fc3fb586c7b0457f775379040e11eb83b5bdda51c02b2b24e531aecd6e12e6ec80bf9407a768ab1a10b0a6b4c8f1a92ca69ea702faf56202bb635c power_assert-1.2.0.tar.gz -ae0ca6ad2990d01d57f95cdce11dc3004b2ace9e79b90bf9eb181bf604bed5992436cb319f923075af951b8e2d31d59f13e15af94c534885d18e033338302524 gemspec.patch -" diff --git a/user/ruby3.0-power_assert/gemspec.patch b/user/ruby3.0-power_assert/gemspec.patch deleted file mode 100644 index 81fa904..0000000 --- a/user/ruby3.0-power_assert/gemspec.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/power_assert.gemspec -+++ b/power_assert.gemspec -@@ -12,11 +12,7 @@ - s.summary = "Power Assert for Ruby" - s.description = "Power Assert for Ruby. Power Assert shows each value of variables and method calls in the expression. It is useful for testing, providing which value wasn't correct when the condition is not satisfied." - -- s.files = `git ls-files -z`.split("\x0").reject do |f| -- f.match(%r{^(test|spec|features|benchmark)/}) -- end -- s.bindir = 'exe' -- s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) } -+ s.files = Dir['lib/**/*.rb'] - s.require_paths = ['lib'] - s.add_development_dependency 'test-unit' - s.add_development_dependency 'rake' -@@ -25,7 +21,6 @@ - s.add_development_dependency 'pry' - s.add_development_dependency 'byebug' - s.add_development_dependency 'benchmark-ips' -- s.extra_rdoc_files = ['README.rdoc'] - s.rdoc_options = ['--main', 'README.rdoc'] - s.licenses = ['2-clause BSDL', "Ruby's"] - end -- 2.45.2 From 313ac34de8cffd0252f6eb00aaf75a2c0d3d03e7 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:30:51 -0500 Subject: [PATCH 06/16] user/ruby3.0-rugged: remove for ruby3.2 --- user/ruby3.0-rugged/APKBUILD | 75 ---------------- .../fix-extconf-version-check.patch | 13 --- user/ruby3.0-rugged/libgit2-1.7.patch | 90 ------------------- user/ruby3.0-rugged/libgit2-fixture-dir.patch | 12 --- user/ruby3.0-rugged/skip-online-tests.patch | 15 ---- .../skip-test_discover_false.patch | 27 ------ .../skip-test_read_global_config_file.patch | 13 --- 7 files changed, 245 deletions(-) delete mode 100644 user/ruby3.0-rugged/APKBUILD delete mode 100644 user/ruby3.0-rugged/fix-extconf-version-check.patch delete mode 100644 user/ruby3.0-rugged/libgit2-1.7.patch delete mode 100644 user/ruby3.0-rugged/libgit2-fixture-dir.patch delete mode 100644 user/ruby3.0-rugged/skip-online-tests.patch delete mode 100644 user/ruby3.0-rugged/skip-test_discover_false.patch delete mode 100644 user/ruby3.0-rugged/skip-test_read_global_config_file.patch diff --git a/user/ruby3.0-rugged/APKBUILD b/user/ruby3.0-rugged/APKBUILD deleted file mode 100644 index 5721fd0..0000000 --- a/user/ruby3.0-rugged/APKBUILD +++ /dev/null @@ -1,75 +0,0 @@ -# Contributor: Jakub Jirutka -# Maintainer: Jakub Jirutka -pkgname=ruby3.0-rugged -_gemname=rugged -pkgver=1.6.3 -pkgrel=1 -pkgdesc="Ruby bindings to libgit2" -url="https://github.com/libgit2/rugged" -arch="all" -license="MIT" -checkdepends=" - git - libgit2-tests - ruby3.0-minitest - ruby3.0-rake - ruby3.0-rake-compiler - " -makedepends=" - libgit2-dev>=${pkgver%.*} - ruby3.0 - ruby3.0-dev - " -source="$_gemname-$pkgver.tar.gz::https://github.com/libgit2/$_gemname/archive/v$pkgver.tar.gz - fix-extconf-version-check.patch - libgit2-fixture-dir.patch - libgit2-1.7.patch - skip-test_discover_false.patch - skip-test_read_global_config_file.patch - skip-online-tests.patch - " -builddir="$srcdir/$_gemname-$pkgver" -# Rugged::ConfigError: repository path '/tmp/' is not owned by current user -# requires tmp persmissions on host -options="!check" - -build() { - gem build $_gemname.gemspec - - RUGGED_USE_SYSTEM_LIBRARIES=1 gem install --local \ - --install-dir dist \ - --ignore-dependencies \ - --no-document \ - --verbose \ - $_gemname - - # Needed for tests. - cp -l dist/extensions/*/*/$_gemname-*/$_gemname/*.so lib/$_gemname/ -} - -check() { - rake test LIBGIT2_FIXTURE_DIR="/usr/src/libgit2/tests/resources" -} - -package() { - local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" - cd "$builddir"/dist - - mkdir -p "$gemdir" - cp -r extensions gems specifications "$gemdir"/ - - # Remove unnecessary and duplicated files. - rm -f "$gemdir"/extensions/*/*/$_gemname-*/mkmf.log - cd "$gemdir"/gems/$_gemname-$pkgver - rm -rf ext/ lib/$_gemname/*.so LICENSE* README* -} - -sha512sums=" -4d54b5df04382628aff7e1abbf5fbd9730564c9bcb4e17da34ac59578b306db567b15151629a10c4a6d8174a31cd8be03c27ff0d1514cb19de237e773f4b64ce rugged-1.6.3.tar.gz -0e55aff667175496e9df1920c6d49042077196aa992a729323628224e7930a6f976bcbfae70d2af733a043c173e8cd5f571606f0b898b008472b40fcefe6b425 fix-extconf-version-check.patch -0c749aeb8d6a29aed51737bab09c7b0a6669ac691461758c856ede5d8510ad6edfa284cddd1b54982bf614a45ba817b70e838e071889a9b05e1b0580111ec826 libgit2-fixture-dir.patch -bcf7b554390fb2b1ef9043f8c934ae51a299f223ec1d7826dcb8eed078961cd084c05148c84142d60cc0a3213653bd416af1fbb09bfa5b26c9ce87fca79f6a18 libgit2-1.7.patch -33464eeefc7669fe3bf5f47c4016cacdcba4f7455ed22b441383b49721870072b5095dbb68832cdb933a7659a415476db64b579a98c888b83900d092bb8b54be skip-test_discover_false.patch -b9e028f18830e447773e895046eb03489e94bb5a76fede51f93545ed67f7249ed8f37ed4bb832eb68a2db281ff3e2b84dab8b72bb21eea4b835b0f1ce23943c3 skip-test_read_global_config_file.patch -5f0ad88eb7ac8c69605c43712e046efd47b727f48e98ee4047be850da4fea48c11fc2a383c791810a1bc81c08ca00428d4906c1af02a0d0da6e1ffbd4723b8f3 skip-online-tests.patch -" diff --git a/user/ruby3.0-rugged/fix-extconf-version-check.patch b/user/ruby3.0-rugged/fix-extconf-version-check.patch deleted file mode 100644 index fc22612..0000000 --- a/user/ruby3.0-rugged/fix-extconf-version-check.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ext/rugged/extconf.rb b/ext/rugged/extconf.rb -index 7dbd2b3..92251e3 100644 ---- a/ext/rugged/extconf.rb -+++ b/ext/rugged/extconf.rb -@@ -70,7 +70,7 @@ if arg_config("--use-system-libraries", !!ENV['RUGGED_USE_SYSTEM_LIBRARIES']) - - major = minor = nil - -- File.readlines(File.join(LIBGIT2_DIR, "include", "git2", "version.h")).each do |line| -+ File.readlines(File.join("/usr", "include", "git2", "version.h")).each do |line| - if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR\s+([0-9]+)$/)) - major = matches[1] - next diff --git a/user/ruby3.0-rugged/libgit2-1.7.patch b/user/ruby3.0-rugged/libgit2-1.7.patch deleted file mode 100644 index 4fe0884..0000000 --- a/user/ruby3.0-rugged/libgit2-1.7.patch +++ /dev/null @@ -1,90 +0,0 @@ -Patch-Source: https://github.com/libgit2/rugged/pull/964 -safe as we apply the libgit2 fix to libgit. --- -From 508fbc2bcd8fdc400fcc4513b53d5205c4b7e9d4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= -Date: Tue, 18 Jul 2023 10:27:37 +0200 -Subject: [PATCH 1/3] Update libgit2 to v1.7.0 - ---- - vendor/libgit2 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/rugged/rugged_allocator.c b/ext/rugged/rugged_allocator.c -index 30ee537..0059af6 100644 ---- a/ext/rugged/rugged_allocator.c -+++ b/ext/rugged/rugged_allocator.c -@@ -13,58 +13,11 @@ static void *rugged_gmalloc(size_t n, const char *file, int line) - return xmalloc(n); - } - --static void *rugged_gcalloc(size_t nelem, size_t elsize, const char *file, int line) --{ -- return xcalloc(nelem, elsize); --} -- --static char *rugged_gstrdup(const char *str, const char *file, int line) --{ -- return ruby_strdup(str); --} -- --static char *rugged_gstrndup(const char *str, size_t n, const char *file, int line) --{ -- size_t len; -- char *newstr; -- -- len = strnlen(str, n); -- if (len < n) -- n = len; -- -- newstr = xmalloc(n+1); -- memcpy(newstr, str, n); -- newstr[n] = '\0'; -- -- return newstr; --} -- --static char *rugged_gsubstrdup(const char *str, size_t n, const char *file, int line) --{ -- char *newstr; -- -- newstr = xmalloc(n+1); -- memcpy(newstr, str, n); -- newstr[n] = '\0'; -- -- return newstr; --} -- - static void *rugged_grealloc(void *ptr, size_t size, const char *file, int line) - { - return xrealloc(ptr, size); - } - --static void *rugged_greallocarray(void *ptr, size_t nelem, size_t elsize, const char *file, int line) --{ -- return xrealloc2(ptr, nelem, elsize); --} -- --static void *rugged_gmallocarray(size_t nelem, size_t elsize, const char *file, int line) --{ -- return xmalloc2(nelem, elsize); --} -- - static void rugged_gfree(void *ptr) - { - xfree(ptr); -@@ -75,14 +28,7 @@ void rugged_set_allocator(void) - git_allocator allocator; - - allocator.gmalloc = rugged_gmalloc; -- allocator.gcalloc = rugged_gcalloc; -- allocator.gstrdup = rugged_gstrdup; -- allocator.gstrndup = rugged_gstrndup; -- allocator.gstrndup = rugged_gstrndup; -- allocator.gsubstrdup = rugged_gsubstrdup; - allocator.grealloc = rugged_grealloc; -- allocator.greallocarray = rugged_greallocarray; -- allocator.gmallocarray = rugged_gmallocarray; - allocator.gfree = rugged_gfree; - - git_libgit2_opts(GIT_OPT_SET_ALLOCATOR, &allocator); diff --git a/user/ruby3.0-rugged/libgit2-fixture-dir.patch b/user/ruby3.0-rugged/libgit2-fixture-dir.patch deleted file mode 100644 index 9d6a24d..0000000 --- a/user/ruby3.0-rugged/libgit2-fixture-dir.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/test/test_helper.rb -+++ b/test/test_helper.rb -@@ -130,7 +130,8 @@ - end - - TEST_DIR = File.dirname(File.expand_path(__FILE__)) -- LIBGIT2_FIXTURE_DIR = File.expand_path("../../vendor/libgit2/tests/resources", __FILE__) -+ LIBGIT2_FIXTURE_DIR = ENV['LIBGIT2_FIXTURE_DIR'] \ -+ || File.expand_path("../../vendor/libgit2/tests/resources", __FILE__) - end - - class OnlineTestCase < TestCase diff --git a/user/ruby3.0-rugged/skip-online-tests.patch b/user/ruby3.0-rugged/skip-online-tests.patch deleted file mode 100644 index c0cb6a6..0000000 --- a/user/ruby3.0-rugged/skip-online-tests.patch +++ /dev/null @@ -1,15 +0,0 @@ -Skip all online tests. - ---- a/test/test_helper.rb -+++ b/test/test_helper.rb -@@ -155,6 +156,10 @@ - end - - super -+ end -+ else -+ def before_setup -+ skip 'online tests have been disabled' - end - end - diff --git a/user/ruby3.0-rugged/skip-test_discover_false.patch b/user/ruby3.0-rugged/skip-test_discover_false.patch deleted file mode 100644 index e968c02..0000000 --- a/user/ruby3.0-rugged/skip-test_discover_false.patch +++ /dev/null @@ -1,27 +0,0 @@ -Skip these two tests: - - 1) Failure: -RepositoryDiscoverTest#test_discover_false [/home/jirutjak/aports/testing/ruby-rugged/src/rugged-0.26.0/test/repo_test.rb:426]: -Rugged::RepositoryError expected but nothing was raised. - - 2) Failure: -RepositoryDiscoverTest#test_discover_nested_false [/home/jirutjak/aports/testing/ruby-rugged/src/rugged-0.26.0/test/repo_test.rb:432]: -Rugged::RepositoryError expected but nothing was raised. - ---- a/test/repo_test.rb -+++ b/test/repo_test.rb -@@ -423,12 +423,14 @@ - end - - def test_discover_false -+ skip 'I have no idea why this test does not pass :(' - assert_raises Rugged::RepositoryError do - Rugged::Repository.discover(@tmpdir) - end - end - - def test_discover_nested_false -+ skip 'I have no idea why this test does not pass :(' - assert_raises Rugged::RepositoryError do - Rugged::Repository.discover(File.join(@tmpdir, 'foo')) - end diff --git a/user/ruby3.0-rugged/skip-test_read_global_config_file.patch b/user/ruby3.0-rugged/skip-test_read_global_config_file.patch deleted file mode 100644 index d3a3310..0000000 --- a/user/ruby3.0-rugged/skip-test_read_global_config_file.patch +++ /dev/null @@ -1,13 +0,0 @@ -It seems that this test fails when user.name is NOT set in ~/.gitconfig -on the build system. - ---- a/test/config_test.rb -+++ b/test/config_test.rb -@@ -17,6 +17,7 @@ - end - - def test_read_global_config_file -+ skip 'This test is flawed, it runs on real FS, i.e. it is not isolated' - config = Rugged::Config.global - refute_nil config['user.name'] - assert_nil config['core.bare'] -- 2.45.2 From 3441d234c000cd874ee4460dfe0eea2f3be612ea Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:31:03 -0500 Subject: [PATCH 07/16] user/ruby3.0-test-unit: remove for ruby3.2 --- user/ruby3.0-test-unit/APKBUILD | 56 ---------------------------- user/ruby3.0-test-unit/gemspec.patch | 15 -------- 2 files changed, 71 deletions(-) delete mode 100644 user/ruby3.0-test-unit/APKBUILD delete mode 100644 user/ruby3.0-test-unit/gemspec.patch diff --git a/user/ruby3.0-test-unit/APKBUILD b/user/ruby3.0-test-unit/APKBUILD deleted file mode 100644 index 265647a..0000000 --- a/user/ruby3.0-test-unit/APKBUILD +++ /dev/null @@ -1,56 +0,0 @@ -# Maintainer: Antoine Martin (ayakael) -# Contributor: Antoine Martin (ayakael) -# Contributor: Jakub Jirutka - -pkgname=ruby3.0-test-unit -_gemname=test-unit -# Keep version in sync with "Bundled gems" (https://stdgems.org) for the -# packaged Ruby version. -pkgver=3.3.8 -pkgrel=1 -pkgdesc="An xUnit family unit testing framework for Ruby" -url="https://test-unit.github.io" -arch="noarch" -license="BSD-2-Clause AND Python-2.0 AND Ruby" -depends="ruby3.0 ruby3.0-power_assert" -makedepends="ruby3.0-rdoc" -subpackages="$pkgname-doc" -source="https://github.com/test-unit/test-unit/archive/$pkgver/$_gemname-$pkgver.tar.gz - gemspec.patch - " -builddir="$srcdir/$_gemname-$pkgver" - -build() { - gem build $_gemname.gemspec -} - -check() { - ruby test/run-test.rb -} - -package() { - local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" - - gem install \ - --local \ - --install-dir "$gemdir" \ - --ignore-dependencies \ - --document ri \ - --verbose \ - $_gemname - - # Remove unnessecary files - cd "$gemdir" - rm -rf build_info cache extensions plugins -} - -doc() { - pkgdesc="$pkgdesc (ri docs)" - - amove "$(ruby -e 'puts Gem.default_dir')"/doc -} - -sha512sums=" -91df9e76f49998239e72428f9373403f53773c69bd033dcaed5f6fddd40a014e5c70b2cee28f430089da19b73b96d8fe4687e88d807387ace41cf21c0ccc5a56 test-unit-3.3.8.tar.gz -97429f9cb86f7bc989c03531466f1443171ac3835a4738601fe4d52b81a408e1504a26c1ed7d84ae3e07b263600d12f89298af27626219df1d7fd0612b26e466 gemspec.patch -" diff --git a/user/ruby3.0-test-unit/gemspec.patch b/user/ruby3.0-test-unit/gemspec.patch deleted file mode 100644 index 263c7c6..0000000 --- a/user/ruby3.0-test-unit/gemspec.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/test-unit.gemspec -+++ b/test-unit.gemspec -@@ -24,11 +24,7 @@ - description = clean_white_space.call(entries[entries.index("Description") + 1]) - spec.summary, spec.description, = description.split(/\n\n+/, 3) - spec.licenses = ["Ruby", "BSDL", "PSFL"] # lib/test/unit/diff.rb is PSFL -- spec.files = ["README.md", "Rakefile"] -- spec.files += ["COPYING", "BSDL", "PSFL"] -- spec.files += Dir.glob("{lib,sample}/**/*.rb") -- spec.files += Dir.glob("doc/text/**/*.*") -- spec.test_files += Dir.glob("test/**/*") -+ spec.files += Dir.glob("lib/**/*.rb") - - spec.metadata = { - "source_code_uri" => "https://github.com/test-unit/test-unit" -- 2.45.2 From 89806ba46ca4ecf2bf9d572cd8ff00ef53d8cccf Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:31:20 -0500 Subject: [PATCH 08/16] user/ruby3.0-webrick: remove for ruby3.2 --- user/ruby3.0-webrick/APKBUILD | 61 ------------------------------ user/ruby3.0-webrick/gemspec.patch | 15 -------- 2 files changed, 76 deletions(-) delete mode 100644 user/ruby3.0-webrick/APKBUILD delete mode 100644 user/ruby3.0-webrick/gemspec.patch diff --git a/user/ruby3.0-webrick/APKBUILD b/user/ruby3.0-webrick/APKBUILD deleted file mode 100644 index b327a3f..0000000 --- a/user/ruby3.0-webrick/APKBUILD +++ /dev/null @@ -1,61 +0,0 @@ -# Maintainer: Antoine Martin (ayakael) -# Contributor: Antoine Martin (ayakael) -# Contributor: omni -# Contributor: Jakub Jirutka - -pkgname=ruby3.0-webrick -_gemname=webrick -pkgver=1.7.0 -pkgrel=1 -pkgdesc="HTTP server toolkit for Ruby" -url="https://github.com/ruby/webrick" -arch="noarch" -license="BSD-2-Clause" -depends="ruby3.0" -checkdepends="ruby3.0-rake ruby3.0-test-unit" -makedepends="ruby3.0-rdoc" -subpackages="$pkgname-doc" -source="https://github.com/ruby/webrick/archive/v$pkgver/ruby-webrick-$pkgver.tar.gz - gemspec.patch - " -builddir="$srcdir/$_gemname-$pkgver" - -prepare() { - default_prepare - sed -i '/require .bundler/d' Rakefile -} - -build() { - gem build $_gemname.gemspec -} - -check() { - rake test -} - -package() { - local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" - - gem install \ - --local \ - --install-dir "$gemdir" \ - --ignore-dependencies \ - --document ri \ - --verbose \ - $_gemname - - # Remove unnessecary files - cd "$gemdir" - rm -rf build_info cache extensions plugins -} - -doc() { - pkgdesc="$pkgdesc (ri docs)" - - amove "$(ruby -e 'puts Gem.default_dir')"/doc -} - -sha512sums=" -785e8c6af6e2f8ac497bab6d0ad0e9383fa4c4ac8dee6ceee38e20c5e9b631b805ec3c8f5438ebea651ee4113698de1a370ae506927bdc04e512ea6cac433cd1 ruby-webrick-1.7.0.tar.gz -ddfd7ec0b7b4c7b2dea9d3ed45f8a8353bbbb7c61f5c11a9c52116402fcba8626a446dcf18b9fee1ac9a267ccc3b534a1dbd113d02959e612f034b15b47a786e gemspec.patch -" diff --git a/user/ruby3.0-webrick/gemspec.patch b/user/ruby3.0-webrick/gemspec.patch deleted file mode 100644 index a21a0c5..0000000 --- a/user/ruby3.0-webrick/gemspec.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/webrick.gemspec -+++ b/webrick.gemspec -@@ -14,12 +14,6 @@ - - s.require_path = %w{lib} - s.files = [ -- "Gemfile", -- "LICENSE.txt", -- "README.md", -- "Rakefile", -- "bin/console", -- "bin/setup", - "lib/webrick.rb", - "lib/webrick/accesslog.rb", - "lib/webrick/cgi.rb", -- 2.45.2 From 36da7aa7596eb0fcfc730ee84c3f85758e509f42 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:32:11 -0500 Subject: [PATCH 09/16] user/ruby3.2-power_assert: new aport --- user/ruby3.2-power_assert/APKBUILD | 62 +++++++++++++++++++++++++ user/ruby3.2-power_assert/gemspec.patch | 9 ++++ 2 files changed, 71 insertions(+) create mode 100644 user/ruby3.2-power_assert/APKBUILD create mode 100644 user/ruby3.2-power_assert/gemspec.patch diff --git a/user/ruby3.2-power_assert/APKBUILD b/user/ruby3.2-power_assert/APKBUILD new file mode 100644 index 0000000..24d62b2 --- /dev/null +++ b/user/ruby3.2-power_assert/APKBUILD @@ -0,0 +1,62 @@ +# Contributor: Jakub Jirutka +# Maintainer: Jakub Jirutka +pkgname=ruby3.2-power_assert +_gemname=power_assert +# Keep version in sync with "Bundled gems" (https://stdgems.org) for the +# packaged Ruby version. +pkgver=2.0.3 +pkgrel=0 +pkgdesc="Debug tool for Ruby that displays intermediate results of a method chain" +url="https://github.com/ruby/power_assert" +arch="noarch" +license="BSD-2-Clause AND Ruby" +depends="ruby3.2" +checkdepends="ruby3.2-pry ruby3.2-rake ruby3.2-test-unit" +makedepends="ruby3.2-rdoc" +subpackages="$pkgname-doc" +source="https://github.com/ruby/power_assert/archive/v$pkgver/$_gemname-$pkgver.tar.gz + gemspec.patch + " +builddir="$srcdir/$_gemname-$pkgver" +# Avoid circular dependency with ruby-test-unit. +options="!check" + +prepare() { + default_prepare + sed -i '/require .bundler/d' Rakefile +} + +build() { + gem build $_gemname.gemspec +} + +check() { + rake test +} + +package() { + local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" + + gem install \ + --local \ + --install-dir "$gemdir" \ + --ignore-dependencies \ + --document ri \ + --verbose \ + $_gemname + + # Remove unnessecary files + cd "$gemdir" + rm -rf build_info cache extensions plugins +} + +doc() { + pkgdesc="$pkgdesc (ri docs)" + + amove "$(ruby -e 'puts Gem.default_dir')"/doc +} + +sha512sums=" +f5658d18b3b78e7757ddfc1ccdabc011076c009a7343eaad2748ca7aeb4d112bf19c70621cb938e7dcf1582c8bb7c5512017885ea51503b3ed274980b7d7c0b1 power_assert-2.0.3.tar.gz +eb4321b8ce33476e21f0cd6da92f1f2be93e0892f5e6043d6d5f5578160f1793993b10645c0b06b3b2df3e8190a10c83e5325c367001e222d98b290222c2edfe gemspec.patch +" diff --git a/user/ruby3.2-power_assert/gemspec.patch b/user/ruby3.2-power_assert/gemspec.patch new file mode 100644 index 0000000..ace46ba --- /dev/null +++ b/user/ruby3.2-power_assert/gemspec.patch @@ -0,0 +1,9 @@ +--- a/power_assert.gemspec ++++ b/power_assert.gemspec +@@ -15,5 +15 @@ +- s.files = `git ls-files -z`.split("\x0").reject do |f| +- f.match(%r{\A(?:test|spec|features|benchmark|bin)/}) +- end +- s.bindir = 'exe' +- s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) } ++ s.files = Dir['lib/**/*.rb'] -- 2.45.2 From 304a57c1c9684dc51b75964447d0b4938b598293 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:32:42 -0500 Subject: [PATCH 10/16] user/ruby3.2-rugged: new aport --- user/ruby3.2-rugged/APKBUILD | 75 ++++++++++++++++ .../fix-extconf-version-check.patch | 13 +++ user/ruby3.2-rugged/libgit2-1.7.patch | 90 +++++++++++++++++++ user/ruby3.2-rugged/libgit2-fixture-dir.patch | 12 +++ user/ruby3.2-rugged/skip-online-tests.patch | 15 ++++ .../skip-test_discover_false.patch | 27 ++++++ .../skip-test_read_global_config_file.patch | 13 +++ 7 files changed, 245 insertions(+) create mode 100644 user/ruby3.2-rugged/APKBUILD create mode 100644 user/ruby3.2-rugged/fix-extconf-version-check.patch create mode 100644 user/ruby3.2-rugged/libgit2-1.7.patch create mode 100644 user/ruby3.2-rugged/libgit2-fixture-dir.patch create mode 100644 user/ruby3.2-rugged/skip-online-tests.patch create mode 100644 user/ruby3.2-rugged/skip-test_discover_false.patch create mode 100644 user/ruby3.2-rugged/skip-test_read_global_config_file.patch diff --git a/user/ruby3.2-rugged/APKBUILD b/user/ruby3.2-rugged/APKBUILD new file mode 100644 index 0000000..42f7818 --- /dev/null +++ b/user/ruby3.2-rugged/APKBUILD @@ -0,0 +1,75 @@ +# Contributor: Jakub Jirutka +# Maintainer: Jakub Jirutka +pkgname=ruby3.2-rugged +_gemname=rugged +pkgver=1.6.3 +pkgrel=1 +pkgdesc="Ruby bindings to libgit2" +url="https://github.com/libgit2/rugged" +arch="all" +license="MIT" +checkdepends=" + git + libgit2-tests + ruby3.2-minitest + ruby3.2-rake + ruby3.2-rake-compiler + " +makedepends=" + libgit2-dev>=${pkgver%.*} + ruby3.2 + ruby3.2-dev + " +source="$_gemname-$pkgver.tar.gz::https://github.com/libgit2/$_gemname/archive/v$pkgver.tar.gz + fix-extconf-version-check.patch + libgit2-fixture-dir.patch + libgit2-1.7.patch + skip-test_discover_false.patch + skip-test_read_global_config_file.patch + skip-online-tests.patch + " +builddir="$srcdir/$_gemname-$pkgver" +# Rugged::ConfigError: repository path '/tmp/' is not owned by current user +# requires tmp persmissions on host +options="!check" + +build() { + gem build $_gemname.gemspec + + RUGGED_USE_SYSTEM_LIBRARIES=1 gem install --local \ + --install-dir dist \ + --ignore-dependencies \ + --no-document \ + --verbose \ + $_gemname + + # Needed for tests. + cp -l dist/extensions/*/*/$_gemname-*/$_gemname/*.so lib/$_gemname/ +} + +check() { + rake test LIBGIT2_FIXTURE_DIR="/usr/src/libgit2/tests/resources" +} + +package() { + local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" + cd "$builddir"/dist + + mkdir -p "$gemdir" + cp -r extensions gems specifications "$gemdir"/ + + # Remove unnecessary and duplicated files. + rm -f "$gemdir"/extensions/*/*/$_gemname-*/mkmf.log + cd "$gemdir"/gems/$_gemname-$pkgver + rm -rf ext/ lib/$_gemname/*.so LICENSE* README* +} + +sha512sums=" +4d54b5df04382628aff7e1abbf5fbd9730564c9bcb4e17da34ac59578b306db567b15151629a10c4a6d8174a31cd8be03c27ff0d1514cb19de237e773f4b64ce rugged-1.6.3.tar.gz +0e55aff667175496e9df1920c6d49042077196aa992a729323628224e7930a6f976bcbfae70d2af733a043c173e8cd5f571606f0b898b008472b40fcefe6b425 fix-extconf-version-check.patch +0c749aeb8d6a29aed51737bab09c7b0a6669ac691461758c856ede5d8510ad6edfa284cddd1b54982bf614a45ba817b70e838e071889a9b05e1b0580111ec826 libgit2-fixture-dir.patch +bcf7b554390fb2b1ef9043f8c934ae51a299f223ec1d7826dcb8eed078961cd084c05148c84142d60cc0a3213653bd416af1fbb09bfa5b26c9ce87fca79f6a18 libgit2-1.7.patch +33464eeefc7669fe3bf5f47c4016cacdcba4f7455ed22b441383b49721870072b5095dbb68832cdb933a7659a415476db64b579a98c888b83900d092bb8b54be skip-test_discover_false.patch +b9e028f18830e447773e895046eb03489e94bb5a76fede51f93545ed67f7249ed8f37ed4bb832eb68a2db281ff3e2b84dab8b72bb21eea4b835b0f1ce23943c3 skip-test_read_global_config_file.patch +5f0ad88eb7ac8c69605c43712e046efd47b727f48e98ee4047be850da4fea48c11fc2a383c791810a1bc81c08ca00428d4906c1af02a0d0da6e1ffbd4723b8f3 skip-online-tests.patch +" diff --git a/user/ruby3.2-rugged/fix-extconf-version-check.patch b/user/ruby3.2-rugged/fix-extconf-version-check.patch new file mode 100644 index 0000000..fc22612 --- /dev/null +++ b/user/ruby3.2-rugged/fix-extconf-version-check.patch @@ -0,0 +1,13 @@ +diff --git a/ext/rugged/extconf.rb b/ext/rugged/extconf.rb +index 7dbd2b3..92251e3 100644 +--- a/ext/rugged/extconf.rb ++++ b/ext/rugged/extconf.rb +@@ -70,7 +70,7 @@ if arg_config("--use-system-libraries", !!ENV['RUGGED_USE_SYSTEM_LIBRARIES']) + + major = minor = nil + +- File.readlines(File.join(LIBGIT2_DIR, "include", "git2", "version.h")).each do |line| ++ File.readlines(File.join("/usr", "include", "git2", "version.h")).each do |line| + if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR\s+([0-9]+)$/)) + major = matches[1] + next diff --git a/user/ruby3.2-rugged/libgit2-1.7.patch b/user/ruby3.2-rugged/libgit2-1.7.patch new file mode 100644 index 0000000..4fe0884 --- /dev/null +++ b/user/ruby3.2-rugged/libgit2-1.7.patch @@ -0,0 +1,90 @@ +Patch-Source: https://github.com/libgit2/rugged/pull/964 +safe as we apply the libgit2 fix to libgit. +-- +From 508fbc2bcd8fdc400fcc4513b53d5205c4b7e9d4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= +Date: Tue, 18 Jul 2023 10:27:37 +0200 +Subject: [PATCH 1/3] Update libgit2 to v1.7.0 + +--- + vendor/libgit2 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/rugged/rugged_allocator.c b/ext/rugged/rugged_allocator.c +index 30ee537..0059af6 100644 +--- a/ext/rugged/rugged_allocator.c ++++ b/ext/rugged/rugged_allocator.c +@@ -13,58 +13,11 @@ static void *rugged_gmalloc(size_t n, const char *file, int line) + return xmalloc(n); + } + +-static void *rugged_gcalloc(size_t nelem, size_t elsize, const char *file, int line) +-{ +- return xcalloc(nelem, elsize); +-} +- +-static char *rugged_gstrdup(const char *str, const char *file, int line) +-{ +- return ruby_strdup(str); +-} +- +-static char *rugged_gstrndup(const char *str, size_t n, const char *file, int line) +-{ +- size_t len; +- char *newstr; +- +- len = strnlen(str, n); +- if (len < n) +- n = len; +- +- newstr = xmalloc(n+1); +- memcpy(newstr, str, n); +- newstr[n] = '\0'; +- +- return newstr; +-} +- +-static char *rugged_gsubstrdup(const char *str, size_t n, const char *file, int line) +-{ +- char *newstr; +- +- newstr = xmalloc(n+1); +- memcpy(newstr, str, n); +- newstr[n] = '\0'; +- +- return newstr; +-} +- + static void *rugged_grealloc(void *ptr, size_t size, const char *file, int line) + { + return xrealloc(ptr, size); + } + +-static void *rugged_greallocarray(void *ptr, size_t nelem, size_t elsize, const char *file, int line) +-{ +- return xrealloc2(ptr, nelem, elsize); +-} +- +-static void *rugged_gmallocarray(size_t nelem, size_t elsize, const char *file, int line) +-{ +- return xmalloc2(nelem, elsize); +-} +- + static void rugged_gfree(void *ptr) + { + xfree(ptr); +@@ -75,14 +28,7 @@ void rugged_set_allocator(void) + git_allocator allocator; + + allocator.gmalloc = rugged_gmalloc; +- allocator.gcalloc = rugged_gcalloc; +- allocator.gstrdup = rugged_gstrdup; +- allocator.gstrndup = rugged_gstrndup; +- allocator.gstrndup = rugged_gstrndup; +- allocator.gsubstrdup = rugged_gsubstrdup; + allocator.grealloc = rugged_grealloc; +- allocator.greallocarray = rugged_greallocarray; +- allocator.gmallocarray = rugged_gmallocarray; + allocator.gfree = rugged_gfree; + + git_libgit2_opts(GIT_OPT_SET_ALLOCATOR, &allocator); diff --git a/user/ruby3.2-rugged/libgit2-fixture-dir.patch b/user/ruby3.2-rugged/libgit2-fixture-dir.patch new file mode 100644 index 0000000..9d6a24d --- /dev/null +++ b/user/ruby3.2-rugged/libgit2-fixture-dir.patch @@ -0,0 +1,12 @@ +--- a/test/test_helper.rb ++++ b/test/test_helper.rb +@@ -130,7 +130,8 @@ + end + + TEST_DIR = File.dirname(File.expand_path(__FILE__)) +- LIBGIT2_FIXTURE_DIR = File.expand_path("../../vendor/libgit2/tests/resources", __FILE__) ++ LIBGIT2_FIXTURE_DIR = ENV['LIBGIT2_FIXTURE_DIR'] \ ++ || File.expand_path("../../vendor/libgit2/tests/resources", __FILE__) + end + + class OnlineTestCase < TestCase diff --git a/user/ruby3.2-rugged/skip-online-tests.patch b/user/ruby3.2-rugged/skip-online-tests.patch new file mode 100644 index 0000000..c0cb6a6 --- /dev/null +++ b/user/ruby3.2-rugged/skip-online-tests.patch @@ -0,0 +1,15 @@ +Skip all online tests. + +--- a/test/test_helper.rb ++++ b/test/test_helper.rb +@@ -155,6 +156,10 @@ + end + + super ++ end ++ else ++ def before_setup ++ skip 'online tests have been disabled' + end + end + diff --git a/user/ruby3.2-rugged/skip-test_discover_false.patch b/user/ruby3.2-rugged/skip-test_discover_false.patch new file mode 100644 index 0000000..e968c02 --- /dev/null +++ b/user/ruby3.2-rugged/skip-test_discover_false.patch @@ -0,0 +1,27 @@ +Skip these two tests: + + 1) Failure: +RepositoryDiscoverTest#test_discover_false [/home/jirutjak/aports/testing/ruby-rugged/src/rugged-0.26.0/test/repo_test.rb:426]: +Rugged::RepositoryError expected but nothing was raised. + + 2) Failure: +RepositoryDiscoverTest#test_discover_nested_false [/home/jirutjak/aports/testing/ruby-rugged/src/rugged-0.26.0/test/repo_test.rb:432]: +Rugged::RepositoryError expected but nothing was raised. + +--- a/test/repo_test.rb ++++ b/test/repo_test.rb +@@ -423,12 +423,14 @@ + end + + def test_discover_false ++ skip 'I have no idea why this test does not pass :(' + assert_raises Rugged::RepositoryError do + Rugged::Repository.discover(@tmpdir) + end + end + + def test_discover_nested_false ++ skip 'I have no idea why this test does not pass :(' + assert_raises Rugged::RepositoryError do + Rugged::Repository.discover(File.join(@tmpdir, 'foo')) + end diff --git a/user/ruby3.2-rugged/skip-test_read_global_config_file.patch b/user/ruby3.2-rugged/skip-test_read_global_config_file.patch new file mode 100644 index 0000000..d3a3310 --- /dev/null +++ b/user/ruby3.2-rugged/skip-test_read_global_config_file.patch @@ -0,0 +1,13 @@ +It seems that this test fails when user.name is NOT set in ~/.gitconfig +on the build system. + +--- a/test/config_test.rb ++++ b/test/config_test.rb +@@ -17,6 +17,7 @@ + end + + def test_read_global_config_file ++ skip 'This test is flawed, it runs on real FS, i.e. it is not isolated' + config = Rugged::Config.global + refute_nil config['user.name'] + assert_nil config['core.bare'] -- 2.45.2 From 325c159bf0881a1aa334a2ba540da37dac34e987 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:33:20 -0500 Subject: [PATCH 11/16] user/ruby3.2-webrick: new aport --- user/ruby3.2-webrick/APKBUILD | 58 ++++++++++++++++++++++++++++++ user/ruby3.2-webrick/gemspec.patch | 13 +++++++ 2 files changed, 71 insertions(+) create mode 100644 user/ruby3.2-webrick/APKBUILD create mode 100644 user/ruby3.2-webrick/gemspec.patch diff --git a/user/ruby3.2-webrick/APKBUILD b/user/ruby3.2-webrick/APKBUILD new file mode 100644 index 0000000..a0c0b1e --- /dev/null +++ b/user/ruby3.2-webrick/APKBUILD @@ -0,0 +1,58 @@ +# Contributor: omni +# Maintainer: Jakub Jirutka +pkgname=ruby3.2-webrick +_gemname=webrick +pkgver=1.8.1 +pkgrel=0 +pkgdesc="HTTP server toolkit for Ruby" +url="https://github.com/ruby/webrick" +arch="noarch" +license="BSD-2-Clause" +depends="ruby3.2" +checkdepends="ruby3.2-rake ruby3.2-test-unit" +makedepends="ruby3.2-rdoc" +subpackages="$pkgname-doc" +source="https://github.com/ruby/webrick/archive/v$pkgver/ruby-webrick-$pkgver.tar.gz + gemspec.patch + " +builddir="$srcdir/$_gemname-$pkgver" + +prepare() { + default_prepare + sed -i '/require .bundler/d' Rakefile +} + +build() { + gem build $_gemname.gemspec +} + +check() { + rake test +} + +package() { + local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" + + gem install \ + --local \ + --install-dir "$gemdir" \ + --ignore-dependencies \ + --document ri \ + --verbose \ + $_gemname + + # Remove unnessecary files + cd "$gemdir" + rm -rf build_info cache extensions plugins +} + +doc() { + pkgdesc="$pkgdesc (ri docs)" + + amove "$(ruby -e 'puts Gem.default_dir')"/doc +} + +sha512sums=" +21cb396887025f85cfe04868e7fa7ef039809ca42a3acadfe1decb4dcd02eeeb3c9163e970324b56a9e0eb6202d971370af56e200c69de2d224c1941f866400c ruby-webrick-1.8.1.tar.gz +5c657602228ba5aef4c272b75bc5d7c42855876811a49a7736bfa72b00d65a2bb550ea76ffcc2bc1e2ef9575796f5981eadd97cc92b1f3bf06c0105b8d166222 gemspec.patch +" diff --git a/user/ruby3.2-webrick/gemspec.patch b/user/ruby3.2-webrick/gemspec.patch new file mode 100644 index 0000000..db18f02 --- /dev/null +++ b/user/ruby3.2-webrick/gemspec.patch @@ -0,0 +1,13 @@ +--- a/webrick.gemspec ++++ b/webrick.gemspec +@@ -14,10 +14,6 @@ + + s.require_path = %w{lib} + s.files = [ +- "Gemfile", +- "LICENSE.txt", +- "README.md", +- "Rakefile", + "lib/webrick.rb", + "lib/webrick/accesslog.rb", + "lib/webrick/cgi.rb", -- 2.45.2 From b107c065f344da878e7fb4e6fe96fa1daa2927f5 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:33:50 -0500 Subject: [PATCH 12/16] user/ruby3.2-test-unit: new aport --- user/ruby3.2-test-unit/APKBUILD | 54 ++++++++++++++++++++++++++++ user/ruby3.2-test-unit/gemspec.patch | 8 +++++ 2 files changed, 62 insertions(+) create mode 100644 user/ruby3.2-test-unit/APKBUILD create mode 100644 user/ruby3.2-test-unit/gemspec.patch diff --git a/user/ruby3.2-test-unit/APKBUILD b/user/ruby3.2-test-unit/APKBUILD new file mode 100644 index 0000000..6e30887 --- /dev/null +++ b/user/ruby3.2-test-unit/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Jakub Jirutka +# Maintainer: Jakub Jirutka +pkgname=ruby3.2-test-unit +_gemname=test-unit +# Keep version in sync with "Bundled gems" (https://stdgems.org) for the +# packaged Ruby version. +pkgver=3.5.7 +pkgrel=0 +pkgdesc="An xUnit family unit testing framework for Ruby" +url="https://test-unit.github.io" +arch="noarch" +license="BSD-2-Clause AND Python-2.0 AND Ruby" +depends="ruby3.2 ruby3.2-power_assert" +makedepends="ruby3.2-rdoc" +subpackages="$pkgname-doc" +source="https://github.com/test-unit/test-unit/archive/$pkgver/$_gemname-$pkgver.tar.gz + gemspec.patch + " +builddir="$srcdir/$_gemname-$pkgver" + +build() { + gem build $_gemname.gemspec +} + +check() { + ruby test/run-test.rb +} + +package() { + local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" + + gem install \ + --local \ + --install-dir "$gemdir" \ + --ignore-dependencies \ + --document ri \ + --verbose \ + $_gemname + + # Remove unnessecary files + cd "$gemdir" + rm -rf build_info cache extensions plugins +} + +doc() { + pkgdesc="$pkgdesc (ri docs)" + + amove "$(ruby -e 'puts Gem.default_dir')"/doc +} + +sha512sums=" +af678a89590c9305eeac3a4e5c7e99354df5b49157de573ee3ff312dad9f12dbcaef3dfe7ffc256194e39e0438625acdd9ab3e9686d7e2c58b2cf225f7f1f74c test-unit-3.5.7.tar.gz +22f54fcf272856a9455d5a7276896ec329377b106ab47e3d376158eee72cf570f4487dd87606d730d061e7b06e5d7a0ff561cd8d279a64d8af0ac04e0f2dba92 gemspec.patch +" diff --git a/user/ruby3.2-test-unit/gemspec.patch b/user/ruby3.2-test-unit/gemspec.patch new file mode 100644 index 0000000..f2beca1 --- /dev/null +++ b/user/ruby3.2-test-unit/gemspec.patch @@ -0,0 +1,8 @@ +--- a/test-unit.gemspec ++++ b/test-unit.gemspec +@@ -27,4 +27 @@ +- spec.files = ["README.md", "Rakefile"] +- spec.files += ["COPYING", "BSDL", "PSFL"] +- spec.files += Dir.glob("{lib,sample}/**/*.rb") +- spec.files += Dir.glob("doc/text/**/*.*") ++ spec.files += Dir.glob("lib/**/*.rb") -- 2.45.2 From 331a8e92b309638db9cfe6f4062b4f2b600b45c0 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:36:06 -0500 Subject: [PATCH 13/16] user/gitlab-foss: upgrade to 16.8.0 --- user/gitlab-foss/APKBUILD | 41 ++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/user/gitlab-foss/APKBUILD b/user/gitlab-foss/APKBUILD index 4e67952..74ba6f3 100644 --- a/user/gitlab-foss/APKBUILD +++ b/user/gitlab-foss/APKBUILD @@ -3,7 +3,7 @@ # Contributor: Antoine Martin (ayakael) pkgname=gitlab-foss _pkgname=${pkgname%-foss} -pkgver=16.6.4 +pkgver=16.8.0 _gittag=v$pkgver pkgrel=0 pkgdesc="A version control for your server" @@ -17,28 +17,30 @@ depends=" cmd:dpkg-deb exiftool git>=2.42.0 - gitaly~=16.6 - gitlab-shell~=14.30 + gitaly~=16.8 + gitlab-shell~=14.33 graphicsmagick http-parser procps py-docutils python3 redis>=2.8 - ruby3.0 - ruby3.0-bigdecimal - ruby3.0-bundler - ruby3.0-fiddle - ruby3.0-io-console - ruby3.0-irb - ruby3.0-json - ruby3.0-rake - ruby3.0-rdoc - ruby3.0-webrick + ruby3.2 + ruby3.2-bigdecimal + ruby3.2-bundler + ruby3.2-fiddle + ruby3.2-io-console + ruby3.2-irb + ruby3.2-json + ruby3.2-rake + ruby3.2-rdoc + ruby3.2-webrick shared-mime-info tzdata " makedepends=" + cargo + clang-dev cmd:chrpath cmake file-dev @@ -51,13 +53,15 @@ makedepends=" libxml2-dev libxslt-dev linux-headers + llvm nodejs openssl-dev protobuf-dev re2-dev - ruby3.0-dev - ruby3.0-grpc~=1.58 - ruby3.0-rugged + ruby3.2-dev + ruby3.2-grpc~=1.58 + ruby3.2-rugged + rust yarn>=1.2.0 " pkgusers="git" @@ -83,7 +87,8 @@ _prefix="usr/lib/bundles/$_pkgname" export BUNDLE_DEPLOYMENT=true export BUNDLE_FORCE_RUBY_PLATFORM=true export BUNDLE_FROZEN=true -export BUNDLE_JOBS=${JOBS:-2} +# Should be tied to $JOBS, but rust native code fails to build +export BUNDLE_JOBS=1 prepare() { local sysgemdir=$(ruby -e 'puts Gem.default_dir') @@ -377,7 +382,7 @@ assets() { } sha512sums=" -ea6f5a6d00cc298052500617c962ddb235b4f5bc563af447e23d6af32f9e447970c4d3be0506b354802996508e8572df413a2350a603b8093f3c84f056005f55 gitlab-foss-v16.6.4.tar.gz +90711b858345f45339e5c4e0d3a365736b053233342eadb77aa0237ab3ea1edde970cf65913c852e2c78e6e55462708850cca3764f8129750f83e8ae21c3feef gitlab-foss-v16.8.0.tar.gz daa496f3d9146f9dbddff62477bf49d5c7bd2f2a4cdbadc70ee51c8230f3ef01dc950ef157154b31c7e7bef0beecc5cbac50fbac65a79d6d9099b27bcba8b2ab database-config.patch 55b0667d3969113ffd6860652ee8bdb9a534c25f413f33b2739e922c886988e7cea72c1c00c7eecf29fcff3682b1324156365605ffc6aae45d1e0ccddf96288b gitlab.initd 1f451b67a5d5e58650b0fe862a2b65cfb8bff5502b37d94ae90619c1ff9affbecf24428303a2849bebce5f94bef37078f0e5710e344bbab616134e910938384a gitlab.mailroom.initd -- 2.45.2 From 2fb5da77f9ca7cefe29e202e4693eab228d6de30 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:36:23 -0500 Subject: [PATCH 14/16] user/gitlab-pages: upgrade to 16.8.0 --- user/gitlab-pages/APKBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/gitlab-pages/APKBUILD b/user/gitlab-pages/APKBUILD index 1f3d621..af6cc79 100644 --- a/user/gitlab-pages/APKBUILD +++ b/user/gitlab-pages/APKBUILD @@ -2,7 +2,7 @@ # Contributor: Antoine Martin (ayakael) # Contributor: Jakub Jirutka pkgname=gitlab-pages -pkgver=16.6.4 +pkgver=16.8.0 _gittag="v$pkgver" pkgrel=0 pkgdesc="A daemon used to serve static websites for GitLab users" @@ -29,7 +29,7 @@ package() { } sha512sums=" -d8b6fad72afcf4c4861d2dd30149ef171154f6a7e5f6d46023bddcafc177795cbe8cf230ad427d38d86c76e89835968958dd2a17528ef0f2c75a5ad543db4a0d gitlab-pages-v16.6.4.tar.gz +c9a53a5dc76adcea2be2c321139f3dbc70629e6e3b88ca30da8fc1d824e394f1b17209effc22f1302474b0ddb88066325de4b04d69ae12be0220857f5f492756 gitlab-pages-v16.8.0.tar.gz 710a9b652327e57e620c2bdb02bf912a6f61044eaaf61d36c6612284e9b951d2ac6f5eef77dfea16a0cde328bd4c556d9e47791c560139c27cb9659076f809b1 ungit-makefile.patch 20bc66c1c3548568ed353ca8d584f9108b9688f9375f212a18efc7b8386fdaafb3b2dc9e865f21c7f8fd31ada6e91842a8bb8d397f64851d853bb0de3e0e60bb gitlab-pages.initd " -- 2.45.2 From 1363ab7df2e037187689fc39a4dffb045afa7cc8 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:36:48 -0500 Subject: [PATCH 15/16] user/gitlab-shell: upgrade to 14.33.0 --- user/gitlab-shell/APKBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/gitlab-shell/APKBUILD b/user/gitlab-shell/APKBUILD index 90bf4de..47240c9 100644 --- a/user/gitlab-shell/APKBUILD +++ b/user/gitlab-shell/APKBUILD @@ -2,7 +2,7 @@ # Contributor: Antoine Martin (ayakael) # Contributor: Jakub Jirutka pkgname=gitlab-shell -pkgver=14.30.1 +pkgver=14.33.0 pkgrel=0 pkgdesc="GitLab Shell handles git SSH sessions for GitLab" url="https://gitlab.com/gitlab-org/gitlab-shell" @@ -59,7 +59,7 @@ package() { } sha512sums=" -5cd602ffc98fa2f6c5efbc9541bb6ff234253e299b690aa43feaefab2518b63fd0f69a8c3d79a4f04624c2a6daceaefc300be90ef2a29ff0b8a2392d0ae710cf gitlab-shell-v14.30.1.tar.gz +4b6a5aa8e47b3ce90abe77e1d5f89a7a4d7fa20d9984d3bf45e3a1d140529ea6e2ee96f6e24db88a4c52315d76393379eeb7d7f24d42c90a16ba17d191b39bd6 gitlab-shell-v14.33.0.tar.gz 8cf13bf472e22b1c429bba5df98afb931c80b043ec83c8366d59f15a1e9b21daf09078f134e7aa622c87b32c774d1d5cf129878d5035102c06d0b12ead33f804 config.patch 499b3a46ea94a33a23b01f6a7509d74f5a6781b930619b3b8ae42bdeae8a052cc636578744d7992b4ae4f9b9f72b11ee3d3c0f5e50986fa3f7e35b979b08aada change-config-path.patch c53da7f145593693392d9fa880ad5a1909bfc7504fd1c93d94a468c3e0f5cc80f712f41ee1dc8bf38105b410c1165658f208bd88a70c4674104c78af33d8d09c gitconfig -- 2.45.2 From ffa0b84df5ae9d20ff3b4a78847e8e7771b288ba Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 19 Jan 2024 12:42:02 -0500 Subject: [PATCH 16/16] user/gitaly: upgrade to 16.8.0 --- user/gitaly/APKBUILD | 6 +-- user/gitaly/config.patch | 102 +++++++++++++++++++-------------------- 2 files changed, 52 insertions(+), 56 deletions(-) diff --git a/user/gitaly/APKBUILD b/user/gitaly/APKBUILD index 14d13d0..bfd1f0c 100644 --- a/user/gitaly/APKBUILD +++ b/user/gitaly/APKBUILD @@ -2,7 +2,7 @@ # Contributor: Antoine Martin (ayakael) # Contributor: Jakub Jirutka pkgname=gitaly -pkgver=16.6.4 +pkgver=16.8.0 pkgrel=0 pkgdesc="A Git RPC service for handling all the git calls made by GitLab" url="https://gitlab.com/gitlab-org/gitaly/" @@ -80,7 +80,7 @@ praefect() { } sha512sums=" -e83ad1470000700021495b61e991156bee511d7f94e3e07ec325f1cf5ce000cd8b5e3f8af574ced6499e9487ace43617fcb76dad61c871327bb693d364508d4a gitaly-v16.6.4.tar.gz -55230e587839df8fc8c6daeee1e5a5fbd91d6d28966d9977d59e6fb3d75e269c9d4d119f3a06217a4c6c55733a50ec9affcdb132e77e1694df839269dcd292aa config.patch +5867b328d0086e4a3135e8d66b778d1c7ee1a0abfaed1bbeecaa1876c7fcc5ec369baa6b0303522f3cf8c97c809a8263256e56844c9fae8583331efc2498b104 gitaly-v16.8.0.tar.gz +7685330e637c3a34db941c9e6b8776d0611ec16297e8be998a3eb4716c455d9f015d433a4d27720c24e520d489dd56bdab7c0e4264f2852b4b0bfd6ecaa7f773 config.patch c32105d921be16eaf559cf21d6840bc346cd92b5e37974cedecdb5a2d2ca1eb5e8fbb144f5fc8a1289bf9415102b313cf2d61ee510c80f08ab33a799f5ac7122 gitaly.initd " diff --git a/user/gitaly/config.patch b/user/gitaly/config.patch index 5d326ba..9df7db0 100644 --- a/user/gitaly/config.patch +++ b/user/gitaly/config.patch @@ -1,95 +1,91 @@ diff --git a/config.toml.example.orig b/config.toml.example -index 3d454fb..52457df 100644 +index 82b8502..9982087 100644 --- a/config.toml.example.orig +++ b/config.toml.example -@@ -2,15 +2,15 @@ - # Documentation lives at https://docs.gitlab.com/ee/administration/gitaly/ and - # https://docs.gitlab.com/ee//administration/gitaly/reference +@@ -2,19 +2,24 @@ + # For Gitaly documentation, see https://docs.gitlab.com/ee/administration/gitaly/. + # A path which Gitaly should open a Unix socket. -socket_path = "/home/git/gitlab/tmp/sockets/private/gitaly.socket" +socket_path = "/run/gitlab/gitaly.socket" - # The directory where Gitaly's executables are stored + # Directory containing Gitaly executables. -bin_dir = "/home/git/gitaly/_build/bin" +bin_dir = "/usr/bin" --# # Optional: The directory where Gitaly can create all files required to --# # properly operate at runtime. If not set, Gitaly will create a directory in --# # the global temporary directory. This directory must exist. + # # Optional. The directory where Gitaly can create all files required to + # # properly operate at runtime. If not set, Gitaly will create a directory in + # # the global temporary directory. This directory must exist. -# runtime_dir = "/home/git/gitaly/run" -+# Optional: The directory where Gitaly can create all files required to -+# properly operate at runtime. If not set, Gitaly will create a directory in -+# the global temporary directory. This directory must exist. +runtime_dir = "/run/gitaly" - # # Optional: listen on a TCP socket. This is insecure (no authentication) + # # Optional if socket_path is set. TCP address for Gitaly to listen on. This is insecure (unencrypted connection). # listen_addr = "localhost:9999" -@@ -22,7 +22,7 @@ bin_dir = "/home/git/gitaly/_build/bin" - # # Optional: configure where the Gitaly creates the sockets for internal connections. If unset, Gitaly will create a randomly - # # named temp directory each time it boots. - # # Non Gitaly clients should never connect to these sockets. --# internal_socket_dir = "/home/git/gitlab/tmp/sockets/private/internal" + ++# # Optional: configure where the Gitaly creates the sockets for internal connections. If unset, Gitaly will create a randomly ++# # named temp directory each time it boots. ++# # Non Gitaly clients should never connect to these sockets. +internal_socket_dir = "/run/gitaly/internal" ++ + # # Optional. TCP over TLS address for Gitaly to listen on. + # tls_listen_addr = "localhost:8888" - # # Optional: authenticate Gitaly requests using a shared secret - # [auth] -@@ -30,8 +30,8 @@ bin_dir = "/home/git/gitaly/_build/bin" - # transitioning = false # Set `transitioning` to true to temporarily allow unauthenticated while rolling out authentication. - +@@ -35,9 +40,9 @@ bin_dir = "/home/git/gitaly/_build/bin" + # # Gitaly supports TLS encryption. You must bring your own certificates because this isn’t provided automatically. # [tls] + # # Path to the certificate. -# certificate_path = '/home/git/cert.cert' --# key_path = '/home/git/key.pem' +# certificate_path = '/etc/gitlab/ssl/gitaly.crt' + # # Path to the key. +-# key_path = '/home/git/key.pem' +# key_path = '/etc/gitlab/ssl/gitaly.key' # # Git settings # [git] -@@ -44,7 +44,7 @@ bin_dir = "/home/git/gitaly/_build/bin" - - [[storage]] +@@ -58,7 +63,7 @@ bin_dir = "/home/git/gitaly/_build/bin" + # # The name of the storage name = "default" + # # The path to the storage. -path = "/home/git/repositories" +path = "/var/lib/gitlab/repositories" # # You can optionally configure more storages for this Gitaly instance to serve up # -@@ -54,15 +54,15 @@ path = "/home/git/repositories" - # - - # # You can optionally configure Gitaly to output JSON-formatted log messages to stdout --# [logging] --# # The directory where Gitaly stores extra log files +@@ -70,12 +75,12 @@ path = "/home/git/repositories" + # # Optional. Configure Gitaly to output JSON-formatted log messages to stdout. + # [logging] + # # Directory where Gitaly stores extra log files. -dir = "/home/git/gitlab/log" ++dir = "/vat/log/gitlab" + # # Log format. Either 'text' or 'json'. -# format = "json" --# # Optional: Set log level to only log entries with that severity or above --# # One of, in order: debug, info, warn, errror, fatal, panic --# # Defaults to "info" --# level = "warn" --# -+[logging] -+# The directory where Gitaly stores extra log files -+dir = "/var/log/gitlab" +format = "text" -+# Optional: Set log level to only log entries with that severity or above -+# One of, in order: debug, info, warn, errror, fatal, panic -+# Defaults to "info" + # # Optional. Set log level to only log entries with that severity or above. + # # Valid values are, in order, 'debug', 'info', 'warn', 'error', 'fatal', and 'panic'. Defaults to 'info'. +-# level = "warn" +level = "warn" -+ - # # Additionally exceptions from the Go server can be reported to Sentry + # # Additionally, exceptions from the Go server can be reported to Sentry. Sentry DSN (Data Source Name) + # # for exception monitoring. # sentry_dsn = "https://:@sentry.io/" - -@@ -71,11 +71,11 @@ dir = "/home/git/gitlab/log" - # grpc_latency_buckets = [0.001, 0.005, 0.025, 0.1, 0.5, 1.0, 10.0, 30.0, 60.0, 300.0, 1500.0] - +@@ -91,18 +96,18 @@ sentry_environment = "" + # # Custom Git hooks that are used to perform tasks based on changes performed in any repository. [hooks] + # # Directory where custom Git hooks are installed. If left unset, no custom hooks are used. -custom_hooks_dir = "/home/git/custom_hooks" +custom_hooks_dir = "/etc/gitlab/custom_hooks" + # # Gitaly must connect to the GitLab application to perform access checks when a user performs a change. [gitlab] --secret_file = "/home/git/gitlab-shell/.gitlab_shell_secret" + # # URL of the GitLab server. -url = "http+unix://%2Fhome%2Fgit%2Fgitlab%2Ftmp%2Fsockets%2Fgitlab-workhorse.socket" -+secret_file = "/etc/gitlab/gitlab_shell_secret" +url = "http+unix://%2Frun%2Fgitlab%2Fworkhorse.socket" - # Only needed if a UNIX socket is used in `url` and GitLab is configured to - # use a relative path (e.g. /gitlab). + # # 'relative_url_root' is only needed if a UNIX socket is used in 'url' and GitLab is configured to + # # use a relative path. For example, '/gitlab'. # relative_url_root = '/' + # # Path of the file containing the secret token used to authenticate with GitLab. Use either 'secret_token' or 'secret' + # # but not both. +-secret_file = "/home/git/gitlab-shell/.gitlab_shell_secret" ++secret_file = "/etc/gitlab/gitlab_shell_secret" + # # Secret token used to authenticate with GitLab. + # secret = "" + -- 2.45.2