-
Notifications
You must be signed in to change notification settings - Fork 23
build: move file installation to meson #365
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
Conversation
📝 WalkthroughWalkthroughBuild scripts (main/meson.build and cli/meson.build) add optional systemd unit installation and bash-completion installation for grout and grcli. Debian packaging: debian/control adds systemd-dev Build-Depends; debian/grout.service is removed; debian/grout.install gains service and completion paths; debian/grout.bash-completion mappings are removed; debian/rules no longer copies init/default files. RPM spec stops installing config/service/completion files and adds a telemetry exporter and telemetry data files. CI workflow apt-get step adds systemd-dev. Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (9)
💤 Files with no reviewable changes (4)
🚧 Files skipped from review as they are similar to previous changes (4)
🧰 Additional context used🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-09-05T07:06:51.554ZApplied to files:
📚 Learning: 2025-09-05T07:06:51.554ZApplied to files:
🔇 Additional comments (1)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
main/meson.build (1)
46-46: Usefiles()for consistency.Line 46 uses a plain string
'grout.init'while otherinstall_data()calls use thefiles()wrapper. For consistency with lines 38, 42, and 50, this should befiles('grout.init').Apply this diff:
- install_data('grout.init', install_dir: get_option('sysconfdir')) + install_data(files('grout.init'), install_dir: get_option('sysconfdir'))
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
cli/meson.build(1 hunks)debian/control(1 hunks)debian/grout.bash-completion(0 hunks)debian/grout.install(1 hunks)debian/grout.service(0 hunks)debian/rules(0 hunks)main/meson.build(1 hunks)rpm/grout.spec(0 hunks)
💤 Files with no reviewable changes (4)
- rpm/grout.spec
- debian/grout.bash-completion
- debian/rules
- debian/grout.service
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-05T07:06:51.554Z
Learnt from: rjarry
PR: DPDK/grout#294
File: modules/policy/cli/meson.build:4-8
Timestamp: 2025-09-05T07:06:51.554Z
Learning: The grout project uses a modular CLI build system where individual modules contribute their CLI sources to a global cli_src variable via `cli_src += files(...)`, and the top-level meson.build file builds the final grcli executable using all collected CLI sources. The grcli executable is defined in the top-level meson.build at lines 122-127.
Applied to files:
cli/meson.build
🔇 Additional comments (5)
debian/control (1)
24-24: LGTM!Adding
systemd-devas a build dependency is necessary for the systemd integration in main/meson.build, which queries systemd's pkg-config variables to determine the correct unit installation directory.cli/meson.build (1)
27-31: LGTM!The bash completion installation follows standard conventions: installing to the canonical
datadir/bash-completion/completionsdirectory and renaming the file to match the command name.main/meson.build (2)
31-40: LGTM!The optional systemd integration correctly uses pkg-config to determine the installation directory, ensuring portability across different systemd configurations. The conditional installation of systemd-specific files is appropriate.
49-53: LGTM!Installing bash completion unconditionally is correct since it's independent of systemd availability and follows the same pattern as cli/meson.build.
debian/grout.install (1)
5-5: Verify that debian/grout.install path matches meson's computed systemd unit directory for your build configuration.The concern is valid. Meson dynamically computes
systemd_system_unit_dirusing the configuredprefix, whiledebian/grout.installhardcodes/usr/lib/systemd/system/grout.service. For standard Debian builds (prefix=/usr), both resolve identically. However, if a non-standard prefix is used during the meson build, the paths will diverge and the service file won't be installed by debian packaging.Ensure your build uses
prefix=/usror manually synchronize the paths.
Previously, systemd service files, bash completions, and configuration files were installed through package-specific scripts (debian/rules and rpm/grout.spec). This approach required maintaining duplicate installation logic across different packaging systems and made it harder to support other distributions or installation methods. By moving this logic to meson.build files, the installation becomes uniform across all platforms and packaging systems. The systemd service is now installed using the canonical pkg-config method to determine the correct system unit directory. Bash completions are installed to the standard datadir location. Configuration files are installed to sysconfdir. Package-specific install files (debian/grout.install) are updated to reference the new meson-installed paths, and manual install commands are removed from packaging scripts since meson handles them now. Signed-off-by: Robin Jarry <[email protected]> Reviewed-by: Christophe Fontaine <[email protected]>
Previously, systemd service files, bash completions, and configuration files were installed through package-specific scripts (debian/rules and rpm/grout.spec). This approach required maintaining duplicate installation logic across different packaging systems and made it harder to support other distributions or installation methods.
By moving this logic to meson.build files, the installation becomes uniform across all platforms and packaging systems. The systemd service is now installed using the canonical pkg-config method to determine the correct system unit directory. Bash completions are installed to the standard datadir location. Configuration files are installed to sysconfdir.
Package-specific install files (debian/grout.install) are updated to reference the new meson-installed paths, and manual install commands are removed from packaging scripts since meson handles them now.
Summary by CodeRabbit
New Features
Chores
Packaging