Skip to content

Conversation

@wentywenty
Copy link

@wentywenty wentywenty commented Oct 21, 2025

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • New Features
    • Added gperf package support with multi-architecture downloads for 64-bit and 32-bit.
    • Enabled automated version detection and templated updates to simplify package maintenance.

@wentywenty
Copy link
Author

#16425

@coderabbitai
Copy link

coderabbitai bot commented Oct 21, 2025

Walkthrough

Adds a new manifest bucket/gperf.json describing gperf v3.1-6 with metadata, architecture-specific download URLs and checksums, and configurations for automated version checking and autoupdate.

Changes

Cohort / File(s) Summary
New manifest addition
bucket/gperf.json
Adds gperf package manifest (v3.1-6) with description, homepage, license, 64-bit and 32-bit architecture blocks (download URLs and SHA-256), binary name, checkver regex/normalize, and autoupdate templates for both architectures.

Sequence Diagram(s)

sequenceDiagram
  participant Maintainer
  participant Bucket as "bucket/gperf.json"
  participant CI as "Auto-update/Checkver"
  participant Mirror as "Download URL"

  rect rgb(230, 245, 255)
  Maintainer->>Bucket: Add manifest (v3.1-6, metadata, arch blocks)
  end

  rect rgb(245, 255, 230)
  CI->>Bucket: Run checkver (parse PKGBUILD via regex)
  CI-->>Maintainer: Report normalized version
  CI->>Bucket: Use autoupdate template
  CI->>Mirror: Construct arch-specific download URL
  Mirror-->>CI: Serve artifact + SHA-256
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hopped a path to JSON land,

fetched checksums with careful hand,
two builds tucked in tidy rows,
version-checked where river flows,
gperf now ready — here it stands.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "gperf: add version 3.1-6" follows the conventional format specified in the description template (<manifest-name[@version]>: <general summary>). The title is concise, clear, and directly related to the main change in the changeset—adding a new manifest file for the gperf package version 3.1-6. The title effectively communicates the primary purpose of the PR without unnecessary noise or vagueness.
Linked Issues Check ✅ Passed The code changes fulfill the requirements from linked issue #16425. The PR adds a manifest file (bucket/gperf.json) for the gperf package version 3.1-6, which meets the stated criteria: correct package name (gperf), version handling (3.1-6), architecture-specific downloads for both 64-bit and 32-bit builds with SHA-256 hashes, appropriate binary naming (gperf.exe), and automated version checking and update capabilities through checkver and autoupdate sections. The changeset implements all necessary coding requirements specified in the issue.
Out of Scope Changes Check ✅ Passed The changeset adds only one file—bucket/gperf.json—which is a manifest file directly addressing the requirement in linked issue #16425 to package gperf. There are no modifications to unrelated files, no additional changes beyond the scope of the request, and no extraneous updates that deviate from the stated objective of adding the gperf package manifest. All changes are properly scoped to fulfill the linked issue.
Description Check ✅ Passed The PR description includes all required sections from the template: it closes issue #16425, confirms the use of conventional PR title format, and indicates the author has read the Contributing Guide. While the description is minimal and doesn't include extensive implementation details, it fulfills the essential requirements outlined in the template. The checked boxes and issue reference provide sufficient context for reviewers.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e1b0747 and 72bc49b.

📒 Files selected for processing (1)
  • bucket/gperf.json (1 hunks)
🔇 Additional comments (4)
bucket/gperf.json (4)

2-5: Metadata looks correct.

Version format "3.1-6", license "GPL-3.0-or-later", homepage, and description are all properly aligned with the upstream package and PR objectives.


22-31: Autoupdate section is properly templated.

The architecture-specific URLs correctly use the $version placeholder, which will be substituted during autoupdate.


6-15: URLs verified as accessible; SHA-256 hashes require manual confirmation.

Both 64-bit and 32-bit MSYS2 repository URLs are confirmed accessible. However, SHA-256 hash matching was not verified by the script (validating hashes would require downloading packages and computing checksums). Manually confirm that the provided hashes match the actual package files before merging.


17-21: Disregard this review comment—the original regex is correct.

The original checkver regex pattern pkgver\\s*=\\s*([\\d.]+)[\\s\\S]*?pkgrel\\s*=\\s*([0-9]+) is valid for .NET regular expressions. The [\s\S] character class explicitly matches any character including newlines, independent of multiline mode, so it correctly captures both variables across line boundaries.

The suggested fix is incomplete: it replaces the regex with ^pkgver=([\\d.]+) (one capture group) but keeps the replace clause as $1-$2 (two group references), which would fail to capture the pkgrel number and produce an incorrect version string. The original pattern is the correct implementation.

Likely an incorrect or invalid review comment.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

gperf

  • Lint
  • Description
  • License
  • Hashes

Check the full log for details.

@aliesbelik
Copy link
Collaborator

Duplicates ScoopInstaller/Main#6888.

@wentywenty
Copy link
Author

wentywenty commented Oct 21, 2025

Duplicates ScoopInstaller/Main#6888.

I close it

@wentywenty
Copy link
Author

/verify

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

gperf

  • Lint
  • Description
  • License
  • Hashes

Check the full log for details.

@wentywenty wentywenty changed the title gperf: add version 3.1 gperf: add version 3.1-6 Oct 22, 2025
@wentywenty
Copy link
Author

/verify

@github-actions
Copy link
Contributor

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

gperf

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c9d12eb and e1b0747.

📒 Files selected for processing (1)
  • bucket/gperf.json (1 hunks)
🔇 Additional comments (3)
bucket/gperf.json (3)

1-31: Clarify the status of the duplicate PR issue before merging.

The PR objectives note that reviewer aliesbelik flagged this as a duplicate of ScoopInstaller/Main#6888, and you acknowledged this. Verify whether:

  1. The Main repository PR has been closed/abandoned
  2. This PR in Extras is the intended location (and the Main PR should be closed)
  3. Whether this PR should proceed or be consolidated with the Main PR

This should be resolved before approval to prevent duplicate package entries across repositories.


5-5: GNU gperf 3.1 is released under GPL-3 or later, and the SPDX identifier "GPL-3.0-or-later" correctly represents this license. The specified license in the code is accurate and properly aligned with the GNU gperf project's actual licensing.


17-21: Regex pattern verified and working correctly.

The checkver regex successfully extracts version 3.1 and package release 6 from the MSYS2 PKGBUILD file, producing the expected combined format 3.1-6. No issues detected.

@@ -0,0 +1,32 @@
{
"version": "3.1-6",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify version format matches Scoop conventions and MSYS2 package versioning.

The version string "3.1-6" combines the upstream version (3.1) with the MSYS2 package release number (6). Confirm this follows Scoop's versioning practices for packages sourced from pre-built repositories.

Run the following script to verify the MSYS2 repository URLs and hash correctness:


🏁 Script executed:

#!/bin/bash
# Description: Verify MSYS2 URLs are accessible and validate SHA-256 hashes

echo "=== Checking 64-bit URL ===" 
if curl -sI "https://repo.msys2.org/msys/x86_64/gperf-3.1-6-x86_64.pkg.tar.zst" | head -1 | grep -q "200\|302"; then
  echo "✓ 64-bit URL is accessible"
else
  echo "✗ 64-bit URL is not accessible"
fi

echo "=== Checking 32-bit URL ===" 
if curl -sI "https://repo.msys2.org/msys/i686/gperf-3.1-6-i686.pkg.tar.zst" | head -1 | grep -q "200\|302"; then
  echo "✓ 32-bit URL is accessible"
else
  echo "✗ 32-bit URL is not accessible"
fi

echo "=== Validating checkver URL ===" 
if curl -sI "https://raw.githubusercontent.com/msys2/MSYS2-packages/master/gperf/PKGBUILD" | head -1 | grep -q "200\|302"; then
  echo "✓ checkver URL is accessible"
else
  echo "✗ checkver URL is not accessible"
fi

Length of output: 170


🏁 Script executed:

#!/bin/bash
# Display the complete bucket/gperf.json file for analysis
echo "=== Contents of bucket/gperf.json ===" 
cat bucket/gperf.json

Length of output: 1224


🌐 Web query:

gperf package license information GNU

💡 Result:

gperf is distributed under the GNU General Public License v3 (GPL‑3.0); package metadata commonly lists it as "GPL-3.0-or-later." [1][2][3]

Sources:

  • GNU gperf manual (shows GNU GPL v3). [1]
  • MSYS2 package info (License: GPL-3.0-or-later). [2]
  • Fedora package page (License(s): GPL-3.0-or-later). [3]

🏁 Script executed:

#!/bin/bash
# Fetch PKGBUILD and test the checkver regex pattern
echo "=== Fetching PKGBUILD ===" 
pkgbuild=$(curl -s "https://raw.githubusercontent.com/msys2/MSYS2-packages/master/gperf/PKGBUILD")

echo "=== PKGBUILD content (first 30 lines) ===" 
echo "$pkgbuild" | head -30

echo ""
echo "=== Testing checkver regex pattern ===" 
# The regex from the manifest
regex='pkgver\s*=\s*([\d.]+)[\s\S]*?pkgrel\s*=\s*([0-9]+)'
if echo "$pkgbuild" | grep -oP "$regex" > /dev/null; then
  echo "✓ Regex pattern matches"
  # Extract the values
  pkgver=$(echo "$pkgbuild" | grep -oP 'pkgver\s*=\s*\K[\d.]+' | head -1)
  pkgrel=$(echo "$pkgbuild" | grep -oP 'pkgrel\s*=\s*\K[0-9]+' | head -1)
  echo "Extracted pkgver: $pkgver"
  echo "Extracted pkgrel: $pkgrel"
  echo "Combined version: $pkgver-$pkgrel"
else
  echo "✗ Regex pattern does not match"
fi

Length of output: 915


🏁 Script executed:

#!/bin/bash
# More detailed regex testing with debugging
echo "=== Testing checkver regex with better debugging ===" 

pkgbuild=$(curl -s "https://raw.githubusercontent.com/msys2/MSYS2-packages/master/gperf/PKGBUILD")

# Test simple pattern first
echo "Test 1: Simple pkgver match"
if echo "$pkgbuild" | grep -P "pkgver\s*=\s*[\d.]+"; then
  echo "✓ Simple pkgver pattern works"
fi

echo ""
echo "Test 2: Simple pkgrel match"
if echo "$pkgbuild" | grep -P "pkgrel\s*=\s*[0-9]+"; then
  echo "✓ Simple pkgrel pattern works"
fi

echo ""
echo "Test 3: Full checkver regex with capture groups"
if echo "$pkgbuild" | grep -oP "pkgver\s*=\s*(\d+\.\d+)[\s\S]*?pkgrel\s*=\s*(\d+)"; then
  echo "✓ Full regex matches"
  echo "Match found:"
  echo "$pkgbuild" | grep -oP "pkgver\s*=\s*(\d+\.\d+)[\s\S]*?pkgrel\s*=\s*(\d+)"
else
  echo "✗ Full regex does not match - checkver will fail"
fi

echo ""
echo "Test 4: Extract individual values"
pkgver=$(echo "$pkgbuild" | grep -oP 'pkgver\s*=\s*\K[0-9.]+')
pkgrel=$(echo "$pkgbuild" | grep -oP 'pkgrel\s*=\s*\K[0-9]+')
echo "pkgver extracted: $pkgver"
echo "pkgrel extracted: $pkgrel"
echo "Would produce version: $pkgver-$pkgrel"

Length of output: 393


Fix checkver regex pattern - current pattern will not match PKGBUILD.

The regex in the checkver section fails to capture pkgver and pkgrel from the MSYS2 PKGBUILD file. This will prevent autoupdate functionality from working. The individual variables can be extracted with simpler patterns, so use a more reliable regex:

"checkver": {
  "url": "https://raw.githubusercontent.com/msys2/MSYS2-packages/master/gperf/PKGBUILD",
  "regex": "^pkgver=([\\d.]+).*?^pkgrel=([0-9]+)",
  "replace": "$1-$2"
}

Alternatively, if the JSON regex engine requires a different approach, verify the exact regex syntax Scoop uses for multiline matching.

🤖 Prompt for AI Agents
In bucket/gperf.json around line 2, the checkver regex is too specific and
doesn't capture pkgver/pkgrel from the MSYS2 PKGBUILD, breaking autoupdate;
replace the current pattern with a multiline-friendly regex that separately
captures pkgver and pkgrel (e.g. use a pattern matching ^pkgver=([\d.]+) and
^pkgrel=([0-9]+) with a DOTALL/multiline-aware approach) and update the replace
to "$1-$2" so checkver returns version-pkgrel; ensure the JSON/engine escaping
is correct for the project's regex flavor.

@wentywenty
Copy link
Author

/verify

@github-actions
Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

gperf

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

@wentywenty
Copy link
Author

i`m ready

@z-Fng z-Fng removed the not ready label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Request]: gperf

3 participants