NVIDIA / NVIDIA/nvidia-installer
Feature request: --destdir option to prefix all install paths
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 158
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
When using nvidia-installer for RPM packaging (i.e., installing files into a buildroot rather than the live system), every prefix option needs to be individually overridden to include the buildroot path:
nvidia-installer \
--opengl-prefix=$BUILDROOT/usr \
--x-prefix=$BUILDROOT/usr \
--utility-prefix=$BUILDROOT/usr \
--documentation-prefix=$BUILDROOT/usr \
--xdg-data-dir=$BUILDROOT/usr/share \
--kernel-install-path=$BUILDROOT/lib/modules/... \
--systemd-unit-prefix=$BUILDROOT/usr/lib/systemd/system \
--systemd-sysconf-prefix=$BUILDROOT/etc/systemd/system \
...
This is a bit complicated and fragile; if a new file type or prefix is added in a future release, packagers won't know to override it and files will be installed to the live system instead of the buildroot.
It would be very useful to have a single --destdir=/path/to/buildroot option (analogous to make install DESTDIR=...) that prepends to all installation paths. This is the standard mechanism used by autotools, CMake, Meson, etc. for staged installs.
Additionally, symlink targets created by the installer currently use the full prefixed path (e.g., the GBM backend symlink nvidia-drm_gbm.so ends up pointing to $BUILDROOT/usr/lib64/libnvidia-allocator.so.1 instead of ../libnvidia-allocator.so.1). A proper --destdir implementation would separate the install root from the runtime path and construct correct symlink targets.
Related: #20 raised the same use case (installing to a build folder for packaging). It was closed after --skip-module-load was added, which solved the module loading issue but not the lack of a single install root prefix.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how nvidia-installer handles its individual install prefixes and constructs symlink targets. Check the existing prefix options and the GBM backend symlink behavior described in the issue. Done means one --destdir option stages all installation paths while symlink targets remain valid runtime-relative paths, including packaging use cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100