rpmbuild

Can some specific autodetected dependency be ignored upon rpmbuild

一世执手 提交于 2019-12-30 09:41:06
问题 rpmbuild can autodetect dependencies by looking up shared libraries required by binaries included in the package and, while this is a good think almost every time, there are time when it is undesirable but only for some specific libraries. I am referring to the case where some binary file requires libraries that are not provided to the system via its rpm package management but installed directly by third party installers. Now, the question is: is there a way to keep the autodetect feature

How to run and interact with a script from within an RPM?

﹥>﹥吖頭↗ 提交于 2019-12-25 11:53:18
问题 I'm building an RPM which needs to run a bash script as root. The %install stanza of the spec file is: %install cp %{SOURCE1} %{SOURCE2} %{_tmppath}/%{name}-%{version}-%{release} cd %{_tmppath}/%{name}-%{version}-%{release} chmod u+x %{installscript} sudo ./%{installscript} Where %{installscript} is the script that runs as root with sudo. rpmbuild executes %{installscript} and creates the RPM (without problems). However, when I install the RPM: $ sudo rpm -Uvh $rpmpath Preparing... ##########

RPM build fails on install section

雨燕双飞 提交于 2019-12-24 03:48:14
问题 I am trying to build my first rpm package, which is one simple executable (mysh). My spec file: Summary: bla <br> Name: mysh <br> Version: 1.0 <br> Release: 1 <br> Group: Applications <br> Source: mysh-1.0.tar.gz <br> URL: http://www.google.com <br> Vendor: tadas sofware inc. <br> Packager: tadas <br> License: GPL %description <br> a very good program! %prep <br> rm -rf $RPM_BUILD_DIR/mysh-1.0 <br> zcat $RPM_SOURCE_DIR/mysh-1.0.tar.gz | tar -xvf - %build <br> make %install <br> cp mysh /usr

How to build subpackages defined in .spec files using CPACK

旧城冷巷雨未停 提交于 2019-12-23 22:15:56
问题 Following this tutorial on Spec File Changes For Subpackages I was able to create two RPMs with a single build doing the following: My spec file is something like: Name: @CPACK_PACKAGE_NAME@ License: the license Summary: the summary Group: Applications Version: @CPACK_PACKAGE_RELEASE_VERSION@.@CPACK_PACKAGE_MINOR_VERSION@.@CPACK_PACKAGE_SERVICE_PACK@ Release: @CPACK_PACKAGE_BUILD@ %description the description... %package utils Summary: the utils Group: Applications %description utils

Multi-architectural binary rpm and the noarch

て烟熏妆下的殇ゞ 提交于 2019-12-23 04:54:38
问题 I have two (32-bit and 64-bit) versions of a compiled software which I would like to package into ONE binary RPM. I am wondering if 'noarch' target is suitable for this purpose or there are better alternatives? The only issue with 'noarch' that I see is that having i386 and x86_64 binaries in the package doesn't make it architecture-independent which 'noarch' is supposed to be used for. 回答1: I don't think it's possible to have one binary RPM supporting two architectures. You have to generate

Conditionally include file in an RPM

守給你的承諾、 提交于 2019-12-22 09:41:02
问题 How can I conditionally include a file in an .rpm based on a define _foobar being set or not? The define _foobar would contain the absolute path inside the build root. The file is there. According to the documentation, I expected the following to work (note: there are more files in this %files section, but this is the gist): %files %if %{_foobar} %{_foobar} %endif which, however, gives me the error: error: parse error in expression error: /path/to/specfile:LINENO: parseExpressionBoolean

How to create RPM subpackages using the same paths for different envs?

a 夏天 提交于 2019-12-22 09:39:11
问题 I would like to use a rpm to build subpackages for different environments (live,testing,developer) but for the same files, so having a package called name-config-live, one called name-config-testing and one called name-config-developer and in them to have the same paths but each with the configs corresponding to the environment it's named after. as an example let's say on all environments I have a file called /etc/name.conf and on testing I want it to contain "1", on development "2" and on

How to package a .tar.gz file into rpm package

守給你的承諾、 提交于 2019-12-21 20:00:12
问题 I worked on Redhat Linux, I have a tar.gz file. I want to package this tar.gz file to a rpm package file. In the rpm package phase, I just want to extract the tar.gz file and package all of the staff into the rpm package, when I install the rpm package in linux server, it will just simply copy all of the files into the destination folder. I have tried a lot. Here goes some code for my SPEC file, but it has problems: %prep %build pwd %install rm -rf /usr/local/sample mkdir /usr/local/sample cd

Python RPM I built won't install

陌路散爱 提交于 2019-12-20 09:37:13
问题 Because I have to install multiple versions of Python on multiple Oracle Linux servers which are built via a kickstart process, I wanted to build a python rpm for our yum repository. I was able to build Python manually using 'make altinstall' which doesn't install over your default system Python installation, so I thought that would be the way to go. After much trial and error, I managed to build an rpm starting with a .bz2 python 2.7 package - but now when I try to install it, I get an error

How to abort the installation of an rpm package if some conditions are not met in specfile?

那年仲夏 提交于 2019-12-20 03:24:14
问题 There are some more things that the Requires tag does not satisfy. So i wrote a script to verify these things but where do I place them ? And if not found then i want to quit installation prompting user to do the steps before attempting to install this rpm again. writing exit 1 in %install tag fails to build the rpm using rpmbuild. says %install has a bad exit code. EDIT: let me provide you an example. What i initially wanted to test was is if Oracle Java 6 is present. If not then provide the