Skip to content

fix: resolve product archive generation failures caused by bad p2.inf chmod and spurious pom.xml execution#20

Merged
peterkir merged 1 commit intomainfrom
copilot/validate-p2-repository-structure
Mar 9, 2026
Merged

fix: resolve product archive generation failures caused by bad p2.inf chmod and spurious pom.xml execution#20
peterkir merged 1 commit intomainfrom
copilot/validate-p2-repository-structure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 2, 2026

Two separate issues prevented all product archives from being generated, causing all CI artifact upload steps to report "No files were found".

Root causes & fixes

1. p2.inf chmod failed on Linux/macOS (features/example.rcp.feature.touchpoint/p2.inf)

The install touchpoint tried to chmod both script.bat and script.sh on every platform. Since script.bat is only installed on Windows (via per-OS rootfiles in build.properties), the ChmodAction threw on Linux/macOS:

The action chmod failed - file script.bat does not exist

Fix: Scope the install instruction to Unix platforms only and drop the script.bat chmod (Windows .bat files don't need execute bits):

# before
instructions.install = \
    chmod(targetDir:${installFolder},targetFile:script.bat,permissions:755);\
    chmod(targetDir:${installFolder},targetFile:script.sh,permissions:755);

# after
instructions.install.filter = (|(osgi.os=linux)(osgi.os=macosx))
instructions.install = \
    chmod(targetDir:${installFolder},targetFile:script.sh,permissions:755);

2. Spurious archive-products execution in root pom.xml

A prior change added an archive-products execution to the tycho-p2-director-plugin in the root pom.xml. Because the root project (packaging: pom) has no .product files, Tycho failed immediately:

Product with id 'example.rcp.app.ui.feature.product' does not exist in the project

Fix: Removed the <executions> block. The root pom.xml entry for tycho-p2-director-plugin is configuration-only (product IDs, archive names, root folders); Tycho's pomless build automatically runs archive-products in the releng/products submodule where the .product files live.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Review and validate p2 repository setup and configurations Add mixed/headless products, multiple p2 categories, installation docs, and per-artifact CI uploads Mar 2, 2026
@peterkir
Copy link
Copy Markdown
Collaborator

peterkir commented Mar 2, 2026

@copilot check the validation build ...
https://github.com/klibio/example.pde.rcp/actions/runs/22570692714/job/65378954625?pr=20
no artifacts are uploaded

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 2, 2026

@copilot check the validation build ...
https://github.com/klibio/example.pde.rcp/actions/runs/22570692714/job/65378954625?pr=20
no artifacts are uploaded

The build was failing due to a broken p2.inf in the touchpoint feature — the chmod action used the old targetFile:${installFolder}/script.sh syntax, but Tycho 5.x's ChmodAction requires targetDir and targetFile as separate parameters. That failure prevented any products from being materialized, so there was nothing to upload.

Fixed in commit 106be3d:

  • features/example.rcp.feature.touchpoint/p2.inf: changed chmod(targetFile:${installFolder}/script.sh,...)chmod(targetDir:${installFolder},targetFile:script.sh,...)
  • features/example.rcp.feature.touchpoint/build.properties: uncommented the linux and macosx rootfile entries so script.sh is actually included in those platform products

Copilot AI changed the title Add mixed/headless products, multiple p2 categories, installation docs, and per-artifact CI uploads fix: scope p2.inf chmod to Linux/macOS to unblock product archive generation Mar 2, 2026
Copilot AI changed the title fix: scope p2.inf chmod to Linux/macOS to unblock product archive generation Fix missing per-platform product archives in CI artifact uploads Mar 2, 2026
Copilot AI changed the title Fix missing per-platform product archives in CI artifact uploads fix: resolve product archive generation failures caused by bad p2.inf chmod and spurious pom.xml execution Mar 2, 2026
@peterkir peterkir marked this pull request as ready for review March 9, 2026 10:57
Signed-off-by: Peter Kirschner <peter@klib.io>
@peterkir peterkir force-pushed the copilot/validate-p2-repository-structure branch from c2b080f to 77a09cb Compare March 9, 2026 10:58
@peterkir peterkir merged commit 20dc320 into main Mar 9, 2026
1 check passed
@peterkir peterkir deleted the copilot/validate-p2-repository-structure branch March 9, 2026 10:59
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.

2 participants