Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apache-tika version stream and cve fix #38207

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

developer-guy
Copy link
Member

Fixes:

Related:

Pre-review Checklist

For new package PRs only

  • This PR is marked as fixing a pre-existing package request bug
    • Alternatively, the PR is marked as related to a pre-existing package request bug, such as a dependency
  • REQUIRED - The package is available under an OSI-approved or FSF-approved license
  • REQUIRED - The version of the package is still receiving security updates
  • This PR links to the upstream project's support policy (e.g. endoflife.date)

For new version streams

  • The upstream project actually supports multiple concurrent versions.
  • Any subpackages include the version string in their package name (e.g. name: ${{package.name}}-compat)
  • The package (and subpackages) provides: logical unversioned forms of the package (e.g. nodejs, nodejs-lts)
  • If non-streamed package names no longer built, open PR to withdraw them (see WITHDRAWING PACKAGES)

@developer-guy developer-guy force-pushed the apache-tika-version-stream branch from 4b74759 to 224063f Compare December 22, 2024 15:46
Copy link
Contributor

octo-sts bot commented Dec 22, 2024

Gen AI suggestions to solve the build error:

• Detected Error: git clone ... --branch=3.0.0 ... https://github.com/apache/tika
(implicit error: the clone operation failed because the tag doesn't exist in this format)

• Error Category: Version/Configuration

• Failure Point: git-checkout step in pipeline

• Root Cause Analysis: The tag format in the Apache Tika repository uses a 'v' prefix for version tags (e.g., 'v3.0.0' instead of '3.0.0')

• Suggested Fix:

  - uses: git-checkout
    with:
      repository: https://github.com/apache/tika
      tag: v${{package.version}}
      expected-commit: 9bcb38d6734ed9d5dcff617f316c535e844c68d1

• Explanation:
Apache Tika uses version tags prefixed with 'v' in their repository. The current configuration tries to checkout tag '3.0.0' but the actual tag in the repository is 'v3.0.0'. Adding the 'v' prefix will allow git to find and checkout the correct tag.

• Additional Notes:

  • The expected-commit hash appears correct for v3.0.0
  • The update.github.tag-filter should also be updated to match this pattern
  • Recommend updating the update section to:
update:
  enabled: true
  github:
    identifier: apache/tika
    use-tag: true
    tag-filter: v3.0.

• References:

Copy link
Contributor

octo-sts bot commented Dec 22, 2024

Gen AI suggestions to solve the build error:

• Detected Error: The build log doesn't show an explicit error, but appears to stop after the git checkout step without proceeding to the Maven build steps.

• Error Category: Build Configuration

• Failure Point: After git checkout, before Maven build steps

• Root Cause Analysis:
The issue appears to be with the tag format in the git-checkout step. Apache Tika uses tags prefixed with 'v' (e.g., 'v3.0.0') while the YAML is trying to checkout '3.0.0'.

• Suggested Fix:
Modify the git-checkout section to use the correct tag format:

  - uses: git-checkout
    with:
      repository: https://github.com/apache/tika
      tag: v${{package.version}}
      expected-commit: 9bcb38d6734ed9d5dcff617f316c535e844c68d1

• Explanation:
Apache Tika's repository uses version tags prefixed with 'v' (e.g., v3.0.0). The current configuration tries to checkout tag '3.0.0' which doesn't exist, causing the build to fail silently. Adding the 'v' prefix will allow the checkout to find the correct tag.

• Additional Notes:

  • The tag-filter in the update section is correct as it already includes 'v3.0.'
  • The expected-commit hash appears correct for v3.0.0
  • Consider adding error handling or verbose logging to catch checkout failures

• References:

@developer-guy developer-guy force-pushed the apache-tika-version-stream branch from 224063f to 09f8699 Compare December 22, 2024 15:57
Copy link
Contributor

octo-sts bot commented Dec 22, 2024

Gen AI suggestions to solve the build error:

• Detected Error: "Error: no dependencies or properties provides, use --dependencies/--patch-file or --properties/properties-file"

• Error Category: Configuration

• Failure Point: maven/pombump step in the pipeline

• Root Cause Analysis: The pombump command is failing because it's missing required arguments for dependencies or properties. The pombump tool is used to modify Maven POM files but requires specific configuration.

• Suggested Fix:
Modify the maven/pombump step in the pipeline to include required parameters:

  - uses: maven/pombump
    with:
      file: pom.xml
      properties:
        project.version: ${{package.version}}
    working-directory: tika-parent

• Explanation:
The pombump tool requires either dependencies or properties to modify in the POM file. Since we're building a specific version, we need to set the project version property to match the package version. This ensures the Maven build uses the correct version number.

• Additional Notes:

  • The current error occurs because pombump is called without any configuration
  • The tool needs to know what to modify in the POM file
  • Setting the project.version property is a common pattern for Maven builds
  • The working-directory is correct, but the tool needs more configuration

• References:

@developer-guy developer-guy force-pushed the apache-tika-version-stream branch from 09f8699 to b0bc5b8 Compare December 22, 2024 16:10
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Dec 22, 2024
@developer-guy developer-guy force-pushed the apache-tika-version-stream branch from b0bc5b8 to 16790f9 Compare December 22, 2024 17:09
Signed-off-by: Batuhan Apaydin <batuhan.apaydin@chainguard.dev>
@developer-guy developer-guy force-pushed the apache-tika-version-stream branch from 16790f9 to 6317649 Compare December 22, 2024 17:09
@hectorj2f hectorj2f merged commit 7bc59dd into wolfi-dev:main Dec 22, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants