Software :: Rpmbuild A Spec File When A BuildRequires Is Not Installed
Dec 8, 2008
I'm trying to create a set of rpm files to install the requirements for a program.I found a great utility named cpanspec that will create a spec file for perl modules and have started building rpm files. I was able to create an rpm file for Business::CreditCard as a regular user. Now I'm trying to build another module that requires B::CC, and rpmbuild -ba fails saying that I am missing B::CC. I don't want to install it just to create another rpm file.Is there a way to make rpmbuild "think" that B::CC is installed in the build environment without installing it on the system?
I'm building a RPM package. In my SPEC file, in the "%pre" and "%post" sections, I need to be sure that Postgresql-server is started.I tried to add a "PreReq: /var/run/postmaster*" but the * is not interpreted ! (filename changes, depending on the linux distribution)Is this way test that this file exist (or test if the result of "pidof -s/usr/bin/postmaster" is empty, for example
I want to change some thing inside the post install script of an existing rpm.there is any way to create a nearest spec file of this rpm, in order to change a bit the post install script inside this spec and then create again the rpm with the fixed spec file? no body wrote any program that can create spec file(99% identical from the orig spec file?)?
I found that "autospec" can construct a spec file. But autospec-0.8-1 is not compatible with python 2.7.1 Moreover autospec seems to be considered as deprecated. Is there a more recent version or some other equivalent utility?
is it possible to write ksh script in the spec file? the target is after I perform rpm -i my_rpm.rpm according to the spec file , ksh script will do some installation & configuration for example run other script and edit some files
I have written a spec file for packaging my application in an rpm, but it reports a conflict when I am trying to update my service script in /etc/init.d/. This is a file that I do need to update/replace so how might I force the rpm to do that?
Code:
Summary: A program that increases WAN performance. Name: packetsqueezer Version: 0.3.05 Release: 1
is there a way to specify that I need a 32bit version of a certain library on the "Requires" line of a SPEC file?Since my software contain (a lot of) binaries from other sources (not always RPM compatible) I had to do "AutoReqProv: No" so I can do it manually.Is there a way to explicid say that I need the 32bit version of some library?
I have inherited our Linux packaging and as the number of versions increase, the number of conflicts is starting to get a bit unmanageable. I believe the easiest way would have been to keep the package names the same and just change the release in the spec file but unfortunately I am past that as a lot of these packages are rolled out to our estate. (I am told there were reasons for not keeping the package name the same and incrementing the version/release)
Is it possible to wildcard conflicts so I don't need to keep adding as new versions are created. For example, instead of using all the conflicts below, have something along the lines of AAtest45* <= 1.4 & BBtest45* <= 1.4 Meaning that all I would need to do was change this to 1.5 at the next release (the packages below version matched the release in the spec file)
I am diving into building RPM packages and I am wondering if there is an equal command in the RPM world to Debian's dpkg-depcheck. what it does is list all the packages need to build a given piece of source code when you run the command and point it to a configure or autogen.sh file. Is there something for RPMs that would do this as well?
i want to compile the vanilla kernel 2.6.37-rc3, but i want to obtain a .rpm file. I found this guide long time ago (i used it many times) but it use src.rpm package and the contained kernel.spec file have many lines for adding patches. Someone know where can i download a kernel.spec for vanilla kernel or a guide to obtain an rpm file
In my rpm I need gdbm 32b.when installing on RHEL x86_64 the Reqires section passes with no error since gdbm 64b was found.I need to distinguish between gdbm 64b to gdbm 32b in my spec file.In my spec I use the following :Requires: gdbm = 1.8.0
this is my output when I try to compile samba 4.0.0 alpha 7 in Ubuntu using the spec file provided in the samba packages:
bin/mergedobj/samba-util.o: In function `file_lines_parse': (.text+0x595c): undefined reference to `_talloc_steal' bin/mergedobj/samba-util.o: In function `data_blob_talloc_named':[code]....
kernel source cannot install using rpmbuild Dear all, here is my problemi downloaded kernel source rpm. i.e kernel-2.6.18-53.el5.src.rpm for my kernel 2.6.18-53.el5.i installed succeffully above src.rpm using command ..rpmbuild --rebuild kernel-2.6.18-53.el5.src.rpmit created a directory in /usr/src/redhatthen i manually deleted the redhat directory just because i want to rebuild the kernel source again.so i i removed the redhat directory but now i tried to excute above rpmbuild command again but it is failed.saying: error:cannot create %sourcedir /usr/src/redhat/sourceserror:kernel-2.6.18-53.el5.src.rpm cannot be installed may i know the reason why it is failing
recently i have been building my own kernels, and have been successful. however, over the last 2 days, using the proper documentation and methods i always get to the same point that rpmbuild fails at. it's very frustrating to say the least...i am somewhat new to fedora, as i tend to use debian-based systems or freeBSD, where the approach and methodology is quite different to that of redhat. the command used:
this builds the kernel with modules(needed by me) and this is where it fails:
[Code]...
if anyone has fix let me know, i can't update or upgrade rpmubuild without doing so to my whole system, so i hope this isn't a bug in rpmbuild.... i already had to upgrade yum & yum-utils because of a bug that wouldn't let "builddep" work. (come on fedora, this is a standard release, i shouldn't be having problems with yum or with rpm! this is apart of the OS's core isn't it? anyway, if someone who is in the know has a solution
I'm using rpmbuild 4.8.0 to build my rpm package on RHEL6. The spec file works just fine with any other Linux Releases, including RHEL5. But at the end, build failed with: "shell-init error retrieving current directory: getcwd: cannot access parent directories: No such file or directory" I found that rpmbuild tried to compare the BUILD directory with the root filesystem, it will delete the BUILD directory if it's not '/'. My working directory is /tmp/test, so something like this in the /var/tmp/rpm-tmp file:
i downloaded kernel source rpm. i.e kernel-2.6.18-53.el5.src.rpm for my kernel 2.6.18-53.el5. i installed succeffully above src.rpm using command .. rpmbuild --rebuild kernel-2.6.18-53.el5.src.rpm it created a directory in /usr/src/redhat
then i manually deleted the redhat directory just because i want to rebuild the kernel source again.so i i removed the redhat directory but now i tried to excute above rpmbuild command again but it is failed. saying: error:cannot create %sourcedir /usr/src/redhat/sources error:kernel-2.6.18-53.el5.src.rpm cannot be installed
I am trying to build a e1000 network card driver rpm with particular requirement to have cpio.gz inside rpm.
But after i build my rpm driver it has cpio.lzma inside. I simply build using command from the readme: rpmbuild -tb *.tar.gz.
I have googled and found that from around 5.0 RHEL includes lzma and uses it as a default setting. Is there any way to force to use cpio.gz or somehow repackage my rpm correctly?
I have searched through makefile and other files but was not able to find a clue.
I am trying to install OpenCV2.2.0 from the sources and to make it easier in the future I want to create a rpm on my OpenSuse 11.2 x86_64 platform. The instructions how to install are in the specfile The relevant parts of the specfile below:
I have managed to get it to install the files in the BUILDROOT directory correctly but when I add the directories under the file it seems to try and install the files from root. my rpmmacros is as follows:
Code:
%_topdir /home/rpmbuild # The directory where buildroots will be created. %_buildrootdir %{_topdir}/BUILDROOT
Using the rpmbuild to compile the kernel, every time the patches will be applied to the source code. So even if no changes are made to the source code and no patches are added to kernel.spec, the whole kernel will still be recompiled, wasting a lot of time
rpmbuild: ./libtool: line 1015: -e: command not foundDear Experts,As part of a solution here:[URL]I'm trying to create a binary RPM from a SRC.RPM file. I'm running Redhat 5. cat /etc/redhat-releaseEnterprise Linux Enterprise Linux Server release 5.2 (Carthage)uname -aLinux blue.gateway.2wire.net 2.6.18-92.el5PAE #1 SMP Fri May 23 22:26:05 EDT 2008 i686 i686 i386 GNU/LinuxI managed to find the source package I need:ompat-db-4.1.25-9.src.rpmBut I'm getting this error as part of the build process:./libtool: line 1015: -e: command not foundDoes anyone know the secret to getit to work?Please see more detail in the following notes
I'm trying to install radare and under the binary section for fedora it has a .spec file. It this a sort of script for the rpm command? I found a lot of info on how to make spec files but nothing on what they are or how to use them. So I have a radare.spec file, how can I use it to install the program?
I build simple spec file and build rpmI transfer the new rpm to other Linux machine in order to install the new rpmaccording to the spec file the new rpm -> test.sh-6.2-2.i386.rpm should create the /tmp/MY_RPM_TESTS directory , but this rpm not create the MY_RPM_TESTS and sub directoriesplease advice why , what I need to fix in the spec file? RPM installation:
[root@linux1 rpm -Uvh /root/rpmbuild/RPMS/i386/test.sh-6.2-2.i386.rpm Preparing... ########################################### [100%] This is preinstall script
when i try to load ubunto after a few moments i get a message on the screen saying "sync out of spec". I have looked for a fix for this problem and it is suggested that i run a X86config file. Where do i get this file and how do i run it if i cant see anything on the screen.
I am interested in package building rpms, just stumped on how packagers such as remi and atomic rocket get their spec files. Are these written from other packagers or do you need to write each spec file yourself to be considered as a "packager".
This is from Centos 5.5 so I apologize to anyone who may be offended.I installed my system and it came with kernel 2.6.18-194.el5. I installed the src.rpm of this kernel with rpm, patched, and built it. Then I did a yum -y install kernel.i686 which installed kernel-2.6.18-194.32.1.el5.centos.plus.src.rpm. Since this was a yum install, why doesn't this new kernel version show in the BUILD and SPEC directory?
Just joined the group to post this question as I can't find a good answer for it.I have an RPM that has the following in the spec:
%defattr(-,someuser,someuser) /opt/myapplication
When I go to install the RPM, the file permissions for everything in /opt/myapplication are set to root:root. This RPM installs properly in RPM based distros and maintains the correct permissions.
When I run alien -i --scripts --veryverbose myapplication.rpm as root, I can see it chmod'ing everything to 755. Has anyone else had this problem? I tried --fixperms as well and that did nothing.