# \#cpack:rpm

**URL:** https://discourse.cmake.org/tag/cpack-rpm/49.md

[Latest](https://discourse.cmake.org/latest.md) · [Categories](https://discourse.cmake.org/categories.md) · [Tags](https://discourse.cmake.org/tags.md)

---

## [Creating an RPM sets RUNPATH to build directory](https://discourse.cmake.org/t/creating-an-rpm-sets-runpath-to-build-directory/11543)

<div class="topic-metadata">

**Author:** [@JanWielemaker](https://discourse.cmake.org/u/JanWielemaker)\
**Replies:** 2\
**Last updated:** [August 30, 2024, 7:53am UTC](https://discourse.cmake.org/t/creating-an-rpm-sets-runpath-to-build-directory/11543 "2024-08-30T07:53:34Z")

</div>

I have a project that by default installs into a self-contained directory, where it also keeps its project specific .so files. Running in the build dir works fine, as well as installing it. However, if I use CPack …

---

## [RPM does not include \<exportname\>-\<config\>.cmake, results in IMPORTED\_LOCATION not set for imported target](https://discourse.cmake.org/t/rpm-does-not-include-exportname-config-cmake-results-in-imported-location-not-set-for-imported-target/11223)

<div class="topic-metadata">

**Author:** [@maxnoe](https://discourse.cmake.org/u/maxnoe)\
**Replies:** 6\
**Last updated:** [July 13, 2024, 6:20am UTC](https://discourse.cmake.org/t/rpm-does-not-include-exportname-config-cmake-results-in-imported-location-not-set-for-imported-target/11223 "2024-07-13T06:20:12Z")

</div>

I have a project where I export targets to make them findable via find\_package(ADH-APIS CONFIG). This all works fine if done via: $ cmake -S . -B build -DCMAKE\_BUILD\_TYPE=Release -DCMAKE\_INSTALL\_PREFIX=/tmp/adh-apis $ …

---

## [CPackRPM Installing Unnecessary Files](https://discourse.cmake.org/t/cpackrpm-installing-unnecessary-files/8249)

<div class="topic-metadata">

**Author:** [@krasznaa](https://discourse.cmake.org/u/krasznaa)\
**Replies:** 7\
**Last updated:** [June 20, 2023, 6:24pm UTC](https://discourse.cmake.org/t/cpackrpm-installing-unnecessary-files/8249 "2023-06-20T18:24:54Z")

</div>

Hi, I’ve been trying to understand the following issue for the last several hours, but now it’s time to call in the cavalry… :thinking: In the project that I’m working on at the moment (atlas / atlasexternals · GitLab)…

---

## [CPack produce multiple RPMs](https://discourse.cmake.org/t/cpack-produce-multiple-rpms/7542)

<div class="topic-metadata">

**Author:** [@MM77](https://discourse.cmake.org/u/MM77)\
**Replies:** 1\
**Last updated:** [February 26, 2023, 8:26pm UTC](https://discourse.cmake.org/t/cpack-produce-multiple-rpms/7542 "2023-02-26T20:26:22Z")

</div>

I have 1 CMake project. It produces a number of .so files. Those are then used by Python scripts and by C++ executables. I’m interested in generated 4 RPMs and perhaps a 5th RPM that is common. While reading the doc a…

---

## [How to add post install script to source rpm?](https://discourse.cmake.org/t/how-to-add-post-install-script-to-source-rpm/7409)

<div class="topic-metadata">

**Author:** [@bthomasz](https://discourse.cmake.org/u/bthomasz)\
**Replies:** 0\
**Last updated:** [February 6, 2023, 2:23pm UTC](https://discourse.cmake.org/t/how-to-add-post-install-script-to-source-rpm/7409 "2023-02-06T14:23:23Z")

</div>

Dear CMakers/CPackers, there is an internal legacy software at work that I am distributing via RPM-s. My problem is that both the binary and source RPMs need to do some configurations at install time. The binary one is …

---

## [cpack/rpm error when generating debuginfo with user specified](https://discourse.cmake.org/t/cpack-rpm-error-when-generating-debuginfo-with-user-specified/6719)

<div class="topic-metadata">

**Author:** [@bmagistro](https://discourse.cmake.org/u/bmagistro)\
**Replies:** 0\
**Last updated:** [October 25, 2022, 5:23pm UTC](https://discourse.cmake.org/t/cpack-rpm-error-when-generating-debuginfo-with-user-specified/6719 "2022-10-25T17:23:13Z")

</div>

I don’t have the full error message readily available but not sure it is necessary. To recreate this, specify a default user + group for the files and generate debuginfo. The %files block for the main rpm will have a d…
