Skip to content

java/apache-commons-httpclient: fix source encoding replacement - #3369

Merged
laffer1 merged 1 commit into
masterfrom
java/apache-commons-httpclient
Nov 18, 2026
Merged

laffer1 merged 1 commit into
masterfrom
java/apache-commons-httpclient

Conversation

@laffer1

@laffer1 laffer1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Fix the i386 Magus 652 build failure.

The legacy source is ISO-8859-1. Its existing post-patch sed substitution ran under UTF-8, so it could not match and replace the non-UTF-8 author-name byte before javac compiled the source. Run that substitution with LC_ALL=C for byte-wise matching.

Validation:

  • bmake patch
  • bmake
  • bmake fake package
  • bmake test
  • git diff --check

portlint -C retains an existing PLIST_FILES fatal and pre-existing warnings unrelated to this change.

Summary by Sourcery

Bug Fixes:

  • Fix source patching for the legacy ISO-8859-1 Java sources so builds succeed on i386.

Run the legacy ISO-8859-1 source substitution in the C locale so sed can replace the non-UTF-8 author name before javac runs.

AI-Assisted-by: OpenAI Codex <noreply@openai.com>
Signed-off-by: Lucas Holt <luke@foolishgames.com>
@sourcery-ai

sourcery-ai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Configuration

Run the legacy source substitution in the C locale so sed can match and replace the ISO-8859-1 author name before compilation.

  • java/apache-commons-httpclient/Makefile L36

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Claude finished @laffer1's task in 11s —— View job


Review of PR #3369

Verdict: LGTM.

The change is one line in java/apache-commons-httpclient/Makefile:36. It runs the post-patch sed substitution with LC_ALL=C.

  • Correctness: Under a UTF-8 locale, . in Gl.*ck can't match a lone ISO-8859-1 byte, because the byte is an invalid multibyte sequence. Under the C locale, sed matches byte by byte, so Gl.*ck matches Gl\xfcck and the replacement works. The LC_ALL=C assignment applies only to that one command, so nothing else in the build is affected.
  • Scope: The change is minimal and does not touch PORTREVISION, LICENSE, pkg-plist or patches. The build output is unchanged, since only the source encoding workaround is fixed. This is a build fix, so a PORTREVISION bump isn't needed unless the package contents change.
  • Security and compatibility: There are no new commands, fetch URLs or arch-specific code.

Caveats:

  • I did not run the build myself. I'm relying on the PR description for the bmake patch/build/fake/package/test results.
  • The PR notes an existing portlint -C fatal about PLIST_FILES and some warnings. They are unrelated to this change, and I did not check them.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@laffer1
laffer1 merged commit 8c85484 into master Nov 18, 2026
10 checks passed
@laffer1
laffer1 deleted the java/apache-commons-httpclient branch November 18, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant