Skip to content

rpmbuild executable from rpm package has insuficient permissions #369167

Open
@Gashmob

Description

Describe the bug

In a C++ project with dependencies managed with nix, I use CPack to generate a rpm package. I recently updated the pin and it seems that rpmbuild can no longer generate the package due to denied permission:

error: cannot open Packages database in /nix/store/3vnbv7x3prznh4k61lq2vdnsyfyrncq4-rpm-4.20.0/var/lib/rpm
error: Unable to open temp file: Permission denied

Steps To Reproduce

Steps to reproduce the behavior:

  1. Clone the repository https://github.com/Fil-Language/filc and checkout on branch 54-update-dependencies
  2. run nix-shell --run 'build_rpm_package'

Expected behavior

On branch master (old pin) it works when running nix-shell --run 'bin/build_rpm_package.sh'

Screenshots

Additional context

I fixed the problem by using the pin I used before, details in this commit Fil-Language/filc@cb51bf0

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.0-51-generic, Linux Mint, 22 (Wilma), nobuild`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Notify maintainers

@copumpkin


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

Edit: add details in additional context

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions