Skip to content

wayland: fix Makefile path handling#967

Merged
dougsland merged 1 commit intocontainers:mainfrom
aesteve-rh:fix-qm-wayland-spec
Feb 13, 2026
Merged

wayland: fix Makefile path handling#967
dougsland merged 1 commit intocontainers:mainfrom
aesteve-rh:fix-qm-wayland-spec

Conversation

@aesteve-rh
Copy link
Copy Markdown
Collaborator

@aesteve-rh aesteve-rh commented Feb 13, 2026

The wayland Makefile is designed to be invoked from the repository root via make -f subsystems/wayland/Makefile wayland, but was using incorrect ../qm/ relative paths that failed.

Changed to use paths relative to ROOTDIR which correctly evaluates to the repo root. Also fixed the RPM existence check to use compgen -G instead of [ ! -f ... ] to properly handle glob patterns.

Summary by Sourcery

Fix Wayland packaging Makefile to work when invoked from the repository root and correctly validate the built RPM.

Bug Fixes:

  • Correct tarball contents and paths in the Wayland dist target to use repository-root-relative paths instead of invalid parent-directory references.
  • Fix RPM existence checking after rpmbuild to correctly handle glob patterns when verifying the generated package.

Enhancements:

  • Simplify Wayland packaging commands to operate from ROOTDIR without redundant directory changes and copy operations.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Feb 13, 2026

Reviewer's Guide

Adjusts the Wayland subsystem Makefile to use ROOTDIR-relative paths instead of broken ../qm/... paths and fixes the RPM build success check to correctly handle globbed RPM filenames.

File-Level Changes

Change Details Files
Use repository-root-relative paths in the Wayland dist tarball creation instead of incorrect ../qm/ prefixes.
  • Change tar --transform rule to prefix all archived paths with qm-wayland-${VERSION}/ rather than only qm/ paths.
  • Update the list of files passed to tar to use paths relative to the repository root (rpm/..., subsystems/..., SECURITY.md, LICENSE) instead of ../qm/... paths.
  • Adjust the move of the generated tarball to place it into $(ROOTDIR)/rpm without changing directories.
subsystems/wayland/Makefile
Simplify RPM build directory setup and fix RPM existence check to handle glob patterns properly.
  • Create RPM_TOPDIR subdirectories from the current Make context instead of subshelling into ROOTDIR for mkdir.
  • Copy the generated source tarball into ${RPM_TOPDIR}/SOURCES using an explicit $(ROOTDIR) path instead of cd-based relative paths.
  • Replace a [ ! -f ... ] test on a globbed RPM path with an @if ! compgen -G "...*.noarch.rpm" > /dev/null; then ... fi block so the check works with glob patterns and does not echo the command in the Make log.
subsystems/wayland/Makefile

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

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @aesteve-rh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the Wayland Makefile to resolve issues with incorrect relative paths and an unreliable RPM existence check. The changes ensure that the Makefile can be invoked correctly from the repository root, leading to a more robust and predictable build process for the Wayland package. The modifications improve the reliability of package creation and local RPM development workflows.

Highlights

  • Makefile Path Handling: Corrected relative paths in the subsystems/wayland/Makefile to properly reference files from the repository root, ensuring the dist target functions as intended.
  • RPM Existence Check: Updated the RPM existence check within the wayland target from [ ! -f ... ] to compgen -G to correctly handle glob patterns and improve robustness.
  • Directory Operations: Adjusted mv, mkdir -p, and cp commands to remove redundant cd $(ROOTDIR) calls and use $(ROOTDIR) directly for path resolution.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • subsystems/wayland/Makefile
    • Updated file paths used in the tar command for creating the distribution archive to be relative to the repository root instead of using ../qm/ prefixes.
    • Modified the mv command to move the generated tarball directly to $(ROOTDIR)/rpm without an intermediate cd command.
    • Removed cd $(ROOTDIR) from mkdir -p and cp commands, making them operate directly from the current directory while referencing $(ROOTDIR) for source paths.
    • Replaced the if [ ! -f ... ] condition with if ! compgen -G ... > /dev/null for checking the existence of the generated RPM package, improving glob pattern handling.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Now that mkdir and cp are run without cd $(ROOTDIR), consider making ${RPM_TOPDIR} explicitly rooted under $(ROOTDIR) (or otherwise clearly absolute) to avoid surprises if make is invoked from a different working directory in future.
  • The RPM existence check is now prefixed with @, which suppresses echoing the command; if that wasn’t intentional, you may want to drop the @ so debugging failed builds is easier.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Now that `mkdir` and `cp` are run without `cd $(ROOTDIR)`, consider making `${RPM_TOPDIR}` explicitly rooted under `$(ROOTDIR)` (or otherwise clearly absolute) to avoid surprises if `make` is invoked from a different working directory in future.
- The RPM existence check is now prefixed with `@`, which suppresses echoing the command; if that wasn’t intentional, you may want to drop the `@` so debugging failed builds is easier.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly addresses path handling issues in the Wayland Makefile, making it more robust and runnable from the repository root. The changes simplify commands and fix a bug in RPM existence checking with glob patterns. Overall, the changes are a significant improvement. I have one suggestion to further enhance the maintainability of the Makefile.

Comment thread subsystems/wayland/Makefile Outdated
The wayland Makefile is designed to be invoked from the
repository root via `make -f subsystems/wayland/Makefile wayland`,
but was using incorrect `../qm/` relative paths that failed.

Changed to use paths relative to ROOTDIR which correctly evaluates
to the repo root. Also fixed the RPM existence check to use
`compgen -G` instead of `[ ! -f ... ]` to properly
handle glob patterns.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
@dougsland
Copy link
Copy Markdown
Member

Resolves: #968

@dougsland dougsland merged commit 42f4a0f into containers:main Feb 13, 2026
25 checks passed
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