Dear Koji Development Team,


I hope this email finds you well. I have a couple of questions regarding the packaging of CMake-based open-source software.

Question 1:  Can Koji's buildroot be deployed to access the Internet?

For some open-source software projects, dependencies are downloaded during the CMake configuration phase. However, Koji's buildroot access towards internet(GitHub) is restricted. I attempted to pre-download these dependencies by cmake or set them as 'BuildRequires', but it appears that the intricate CMake system are inflexible and do not provide room for such customization.

In the context of packaging such software for compilation on Koji, aside from modifying the CMake scripts, I would like to know if there are any other more straightforward methods that have been recommended based on the experience of previous packagers.


Question 2: Handling Hardcoded Paths in CMake

When packaging certain open-source software using CMake, I noticed that during the CMake configuration phase, if I set "-DCMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT/opt/oss/", CMake tends to hardcode this path with $RPM_BUILD_ROOT into various places, such as the RPATH of binary libraries or CMake configuration files. Clearly, this is incorrect for the files that end up in /opt/oss/.

As a workaround, I've experimented with running the command "find $RPM_BUILD_ROOT -type f -exec sed -i 's/${RPM_BUILD_ROOT}//g' {} \;" at the end of the %install section, which successfully passes the /usr/lib/rpm/check-buildroot check. However, I'm curious to know if this approach  will introduce potential issues or concerns?

Your expertise and guidance on these matters would be highly valuable to me. Thank you for your time and assistance.


Best Regards,
Junyan CHEN


This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.