From 3394408370e59a80d5f9b4265788136fc64e8fde Mon Sep 17 00:00:00 2001 From: "Satadru Pramanik, DO, MPH, MEng" Date: Fri, 3 Oct 2025 15:02:56 -0400 Subject: [PATCH] =?UTF-8?q?Escape=20anitya=20name=20passed=20via=20anitya?= =?UTF-8?q?=20search=20url;=20update=20gtk3=20mapping,=20fix=20filelist=20?= =?UTF-8?q?dot=20files.=20=E2=80=94=20docbook=5Fxml,gtk3=20=E2=86=92=203.2?= =?UTF-8?q?4.51=20(#13024)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Escape anitya name passed via anitya search url; update gtk3 mapping. Signed-off-by: Satadru Pramanik * gtk: Package File Update Run on linux/amd64 container. * gtk: Package File Update Run on linux/arm/v7 container. * Only let docbook_xml create directories if not in CI. Signed-off-by: Satadru Pramanik * Include subdirectories of CREW_PREFIX in filelists. Signed-off-by: Satadru Pramanik * Adjust gtk3 build with fixed filelist. Signed-off-by: Satadru Pramanik * gtk: Package File Update Run on linux/arm/v7 container. * revert url change Signed-off-by: Satadru Pramanik --------- Signed-off-by: Satadru Pramanik Co-authored-by: chromebrew-actions[bot] Co-authored-by: satmandu --- bin/crew | 4 +++- lib/const.rb | 3 ++- manifest/armv7l/g/gtk3.filelist | 6 +++--- manifest/x86_64/g/gtk3.filelist | 6 +++--- packages/docbook_xml.rb | 2 +- packages/gtk3.rb | 15 ++++++--------- tools/version.rb | 8 ++++++-- 7 files changed, 24 insertions(+), 20 deletions(-) diff --git a/bin/crew b/bin/crew index c0475fdb6..673d17502 100755 --- a/bin/crew +++ b/bin/crew @@ -856,7 +856,7 @@ def prepare_package(destdir) strip_dir destdir # Create file list and calculate file size - filelist = Dir[".{#{CREW_PREFIX},#{HOME}}/**/{*,.?*/**}"].select do |e| + filelist = Dir[".{#{CREW_PREFIX}/**/{*,.?*/**},#{HOME}}/**/{*,.?*/**}"].select do |e| File.file?(e) || File.symlink?(e) end.to_h do |e| # Ignore symlinks to prevent duplicating calculation. @@ -1885,7 +1885,9 @@ def download_command(args) search @pkg_name @pkg.build_from_source = true if @opt_source print_current_package extra: CREW_VERBOSE + # rubocop:disable Style/ArrayIntersectWithSingleElement if ARGV.intersect?(%w[download]) && @pkg.is_fake? + # rubocop:enable Style/ArrayIntersectWithSingleElement fake_pkg_deplist = @pkg.get_deps_list(return_attr: true).flat_map(&:keys).uniq until fake_pkg_deplist.blank? puts "Will download the following packages: #{fake_pkg_deplist.join(' ')}".orange diff --git a/lib/const.rb b/lib/const.rb index 48867d968..c33010e5e 100644 --- a/lib/const.rb +++ b/lib/const.rb @@ -4,7 +4,7 @@ require 'etc' require 'open3' OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0' -CREW_VERSION ||= '1.67.2' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION +CREW_VERSION ||= '1.67.3' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION # Kernel architecture. KERN_ARCH ||= Etc.uname[:machine] @@ -388,6 +388,7 @@ unless defined?(CREW_ANITYA_PACKAGE_NAME_MAPPINGS) { pkg_name: 'gcc_build', anitya_pkg: 'gcc', comments: '' }, { pkg_name: 'gnu_time', anitya_pkg: 'time', comments: '' }, { pkg_name: 'go_tools', anitya_pkg: 'golang-x-tools', comments: '' }, + { pkg_name: 'gtk3', anitya_pkg: 'gtk+3.0~stable', comments: '' }, { pkg_name: 'gtk4', anitya_pkg: 'gtk', comments: '' }, { pkg_name: 'gvim', anitya_pkg: 'vim', comments: '' }, { pkg_name: 'libgedit_amtk', anitya_pkg: 'libgedit-amtk', comments: 'Prefer to GitHub' }, diff --git a/manifest/armv7l/g/gtk3.filelist b/manifest/armv7l/g/gtk3.filelist index 8c8cdf74a..e11c72092 100644 --- a/manifest/armv7l/g/gtk3.filelist +++ b/manifest/armv7l/g/gtk3.filelist @@ -1,4 +1,4 @@ -# Total size: 53744292 +# Total size: 53237967 /usr/local/.config/gtk-3.0/settings.ini /usr/local/bin/broadwayd /usr/local/bin/gtk-builder-tool @@ -440,10 +440,10 @@ /usr/local/lib/libgailutil-3.so.0.0.0 /usr/local/lib/libgdk-3.so /usr/local/lib/libgdk-3.so.0 -/usr/local/lib/libgdk-3.so.0.2417.32 +/usr/local/lib/libgdk-3.so.0.2419.32 /usr/local/lib/libgtk-3.so /usr/local/lib/libgtk-3.so.0 -/usr/local/lib/libgtk-3.so.0.2417.32 +/usr/local/lib/libgtk-3.so.0.2419.32 /usr/local/lib/pkgconfig/gail-3.0.pc /usr/local/lib/pkgconfig/gdk-3.0.pc /usr/local/lib/pkgconfig/gdk-broadway-3.0.pc diff --git a/manifest/x86_64/g/gtk3.filelist b/manifest/x86_64/g/gtk3.filelist index a5073d74a..b3c140545 100644 --- a/manifest/x86_64/g/gtk3.filelist +++ b/manifest/x86_64/g/gtk3.filelist @@ -1,4 +1,4 @@ -# Total size: 56347391 +# Total size: 55753718 /usr/local/.config/gtk-3.0/settings.ini /usr/local/bin/broadwayd /usr/local/bin/gtk-builder-tool @@ -440,10 +440,10 @@ /usr/local/lib64/libgailutil-3.so.0.0.0 /usr/local/lib64/libgdk-3.so /usr/local/lib64/libgdk-3.so.0 -/usr/local/lib64/libgdk-3.so.0.2417.32 +/usr/local/lib64/libgdk-3.so.0.2419.32 /usr/local/lib64/libgtk-3.so /usr/local/lib64/libgtk-3.so.0 -/usr/local/lib64/libgtk-3.so.0.2417.32 +/usr/local/lib64/libgtk-3.so.0.2419.32 /usr/local/lib64/pkgconfig/gail-3.0.pc /usr/local/lib64/pkgconfig/gdk-3.0.pc /usr/local/lib64/pkgconfig/gdk-broadway-3.0.pc diff --git a/packages/docbook_xml.rb b/packages/docbook_xml.rb index 0b729aa90..1c3971f2d 100644 --- a/packages/docbook_xml.rb +++ b/packages/docbook_xml.rb @@ -9,7 +9,7 @@ class Docbook_xml < Package is_fake - unless File.exist?("#{CREW_PREFIX}/etc/env.d/docbook_xml") + unless File.exist?("#{CREW_PREFIX}/etc/env.d/docbook_xml") || ENV['CI'] FileUtils.mkdir_p "#{CREW_PREFIX}/etc/env.d/" @env = <<~DOCBOOK_XML_EOF # Docbook_xml configuration diff --git a/packages/gtk3.rb b/packages/gtk3.rb index 5f60fb88b..a05b4f176 100644 --- a/packages/gtk3.rb +++ b/packages/gtk3.rb @@ -3,7 +3,7 @@ require 'buildsystems/meson' class Gtk3 < Meson description 'GTK+ is a multi-platform toolkit for creating graphical user interfaces.' homepage 'https://docs.gtk.org/gtk3/' - version '3.24.49' + version '3.24.51' license 'LGPL-2.1' compatibility 'aarch64 armv7l x86_64' source_url 'https://gitlab.gnome.org/GNOME/gtk.git' @@ -11,9 +11,9 @@ class Gtk3 < Meson binary_compression 'tar.zst' binary_sha256({ - aarch64: '454e676c39fba0aac7c02e11a38f5dea95fd35992c1415d6e560a2625c8ef870', - armv7l: '454e676c39fba0aac7c02e11a38f5dea95fd35992c1415d6e560a2625c8ef870', - x86_64: 'f36ca615dd896a952ba2c71866a2d0ffece9a33e911e894e8d84ae4fbb2cf93c' + aarch64: 'c16fc1ed90b02fce49d75e37def55a1543b15e50d518f2b835f1a9e6c0f81f7f', + armv7l: 'c16fc1ed90b02fce49d75e37def55a1543b15e50d518f2b835f1a9e6c0f81f7f', + x86_64: '88dc2bc6f045d56ad578002f261682d09a6b34fd0cea09f77d9ed09e2120284b' }) # L = Logical Dependency, R = Runtime Dependency @@ -24,14 +24,12 @@ class Gtk3 < Meson depends_on 'cups' # R depends_on 'docbook' => :build depends_on 'fontconfig' # R - depends_on 'freetype' # R depends_on 'fribidi' # R depends_on 'gcc_lib' # R depends_on 'gdk_pixbuf' # R depends_on 'ghostscript' => :build - depends_on 'glibc' # R depends_on 'glib' # R - # depends_on 'gnome_icon_theme' # L + depends_on 'glibc' # R depends_on 'gobject_introspection' => :build depends_on 'graphene' => :build # Do we need this? depends_on 'graphite' => :build # Do we need this? @@ -51,11 +49,10 @@ class Gtk3 < Meson depends_on 'libxdamage' # R depends_on 'libxext' # R depends_on 'libxfixes' # R - depends_on 'libxinerama' # R depends_on 'libxi' # R + depends_on 'libxinerama' # R depends_on 'libxkbcommon' # R depends_on 'libxrandr' # R - depends_on 'libxrender' # R depends_on 'mesa' => :build depends_on 'pango' # R depends_on 'rest' => :build diff --git a/tools/version.rb b/tools/version.rb index beca64169..cd93f6ae1 100755 --- a/tools/version.rb +++ b/tools/version.rb @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -# version.rb version 3.2 (for Chromebrew) +# version.rb version 3.3 (for Chromebrew) OPTIONS = %w[-h --help -j --json -u --update-package-files -v --verbose] @@ -31,6 +31,7 @@ require File.join(crew_local_repo_root, 'lib/convenience_functions') require File.join(crew_local_repo_root, 'lib/package') require File.join(crew_local_repo_root, 'lib/package_utils') require File.join(crew_local_repo_root, 'lib/require_gem') +require_gem('cgi') require_gem 'ruby-libversion', 'ruby_libversion' require_gem('ptools') @@ -40,6 +41,7 @@ $LOAD_PATH.unshift File.join(crew_local_repo_root, 'lib') OUTPUT_JSON = ARGV.include?('-j') || ARGV.include?('--json') UPDATE_PACKAGE_FILES = ARGV.include?('-u') || ARGV.include?('--update-package-files') VERBOSE = ARGV.include?('-v') || ARGV.include?('--verbose') +VERY_VERBOSE = ARGV.include?('-vv') bc_updated = {} @pkg_names = {} updatable_pkg = {} @@ -105,9 +107,11 @@ def get_anitya_id(name, homepage) return if %w[Pip RUBY].include?(@pkg.superclass.to_s) # Find out how many packages Anitya has with the provided name. - json = JSON.parse(Net::HTTP.get(URI("https://release-monitoring.org/api/v2/projects/?name=#{name}"))) + puts "url is https://release-monitoring.org/api/v2/projects/?name=#{CGI.escape(name)}" if VERY_VERBOSE + json = JSON.parse(Net::HTTP.get(URI("https://release-monitoring.org/api/v2/projects/?name=#{CGI.escape(name)}"))) number_of_packages = json['total_items'] + puts "number_of_packages = #{number_of_packages}" if VERY_VERBOSE if number_of_packages == 1 # We assume we have the right package, take the ID and move on. return json['items'][0]['id'] elsif number_of_packages.zero? # Anitya either doesn't have this package, or has it under a different name.