Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I rebuild rpm package exclude some dependencies?

Have next kind of question. Wanna to rebuild garbage collector (gc-7.1-10.el6.src.rpm) and exclude ld-linux.so.2, ld-linux.so.2(GLIBC_2.3) & libpthread.so.0(GLIBC_2.3.2) dependencies. How can I get something similar I want? (CentOS 6)

% rpm -qp -R rpmbuild/RPMS/i386/gc-7.1-10.el6.i386.rpm
/sbin/ldconfig  
/sbin/ldconfig  
ld-linux.so.2  
ld-linux.so.2(GLIBC_2.3)  
libc.so.6  
libc.so.6(GLIBC_2.0)  
libc.so.6(GLIBC_2.1)  
libc.so.6(GLIBC_2.1.3)  
libc.so.6(GLIBC_2.2.4)  
libc.so.6(GLIBC_2.3)  
libcord.so.1  
libdl.so.2  
libdl.so.2(GLIBC_2.1)  
libgc.so.1  
libgcc_s.so.1  
libgcc_s.so.1(GCC_3.0)  
libgcc_s.so.1(GCC_3.3.1)  
libgccpp.so.1  
libm.so.6  
libpthread.so.0  
libpthread.so.0(GLIBC_2.0)  
libpthread.so.0(GLIBC_2.1)  
libpthread.so.0(GLIBC_2.2)  
libpthread.so.0(GLIBC_2.2.3)  
libpthread.so.0(GLIBC_2.3.2)  
libstdc++.so.6  
libstdc++.so.6(CXXABI_1.3)  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1
rtld(GNU_HASH)

Need I edit my spec file, or change and rebuild my tar.gz archive ?

like image 814
mart7ini Avatar asked Oct 10 '11 16:10

mart7ini


People also ask

Which portion of an RPM references the version of the package build?

Specifically, an RPM package consists of the cpio archive, which contains the files, and the RPM header, which contains metadata about the package. The rpm package manager uses this metadata to determine dependencies, where to install files, and other information. There are two types of RPM packages: source RPM (SRPM)

How do I get the list of dependencies for a specific RPM file?

It is a powerful command line package management system for installing uninstalling, verifying, querying, and updating Linux computer software packages. However RPM has in build mechanism to tell you about dependencies. Just try to install package and it will give you list of dependencies.

Does yum automatically install dependencies?

RPM can make a sysadmin's life a lot easier by presenting these dependencies – and tools relying on RPM such as the rpm utility, or yum can automatically solve these dependencies, and install all additional packages needed for a new component to run properly.


2 Answers

Just define requires you want to exclude by :

%define __requires_exclude libXXX.so.X

like image 63
مصعب الزعبي Avatar answered Nov 15 '22 10:11

مصعب الزعبي


Most of these dependencies are created by the "find-requires" feature. If you specify this in your .spec file:

AutoReq: no

None of them are created.

I'm unsure of an easy way to exclude single ones, however. It's all or nothing.

like image 35
Corey Henderson Avatar answered Nov 15 '22 11:11

Corey Henderson