NVIDIA / NVIDIA/nvidia-installer
Feature request: configurable backup/state directory (currently hardcoded to `/var/lib/nvidia`)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 158
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
The backup directory path is hardcoded as #define BACKUP_DIRECTORY "/var/lib/nvidia" in backup.c. During RPM packaging in a mock chroot, the build user (mockbuild) cannot write to /var/lib/ (root-owned, 0755), causing the installer to fail.
Currently we work around this by binary-patching the installer with sed -i 's|/var/lib/nvidia|/var/tmp/nvidia|g' nvidia-installer, which is not great.
Would it be possible to add an option like --state-dir=/path or --backup-dir=/path to make this configurable? This would complement a --destdir option. But even without --destdir, having a way to relocate the state directory would help packaging use cases.
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 in backup.c at the BACKUP_DIRECTORY definition and trace how nvidia-installer uses that path during backup and state handling. Review the installer’s option handling to determine where a state or backup directory option belongs. Done means the directory is configurable without binary patching and the mockbuild RPM packaging case can use a writable path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100