RPM Community Forums

Mailing List Message of <rpm-users>

Re: rpm-5.3.11

From: Belal Salem <belal@nothing-real.com>
Date: Sun 14 Aug 2011 - 19:15:17 CEST
Message-ID: <op.vz7rjrqumn2pqa@inferno>
Thank for the perfect details!
since I'm running RHEL-5 (as my system base and based on rpm-4.4) but  
updated from RHEL-6 (glibc and its deps and python),
and according to your explanation, I guess I would better recompile rpm  
with the --disable-dirname-and-symlink-deps
specially that adding the folders to _SOME_ will not be suitable for my  
case since I have requests for different folder whenever I'm trying to  
install packages from RHEL-5 or RHEL-6.



On Sun, 14 Aug 2011 05:23:12 +0200, Jeff Johnson <n3npq@mac.com> wrote:

>
> On May 13, 2010, at 5:46 PM, Belal Salem wrote:
>
>> So! Are there another solution by recompiling 'rpm' source code to just  
>> work as we used to!
>> means, are there any configure script options that I can use to  
>> override that?!
>>
>
> Sure you can recompile to change two control bits and their
> default setting compiled into RPM to "work as it used to" (this change
> was made 7+ years ago in like rpm-4.4.6 or something).
>
> Here are the bits (from lib/rpmts.h):
> 	RPMDEPS_FLAG_NOPARENTDIRS = (1 << 4), /*!< from --noparentdirs */
> 	RPMDEPS_FLAG_NOLINKTOS = (1 << 5),    /*!< from --nolinktos */
> Here is where the "default" values for dependency flags are set  
> (lib/poptALL.c):
> 	/*@unchecked@*/ int global_depFlags = RPMDEPS_FLAG_ADDINDEPS;
> Add those two disabler bits as you please.
>
> There are macros that can be set to change the default
> values of those two bits so that you -- like every other vendor --
> can revert to "traditional" rpm behavior from 7+ years ago without
> recompiling.
>
> The code to Rip It Out! Have it your own way! is (from lib/depends.c):
> 	#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) ||  
> defined(RPM_VENDOR_OPENMAMBA) ||  
> 	defined(RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS) /*  
> optional-dirname-and-symlink-deps */
> 	    int dirname_deps;
> 	    int symlink_deps;
> 	#endif
> …
> 	#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) ||  
> defined(RPM_VENDOR_OPENMAMBA) ||  
> defined(RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS) /*  
> optional-dirname-and-symlink-deps */
> 	    dirname_deps =  
> rpmExpandNumeric("%{?_check_dirname_deps}%{?!_check_dirname_deps:1}");
> 	    if (dirname_deps) {
> 	#endif
> …
> 	#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) ||  
> defined(RPM_VENDOR_OPENMAMBA) ||  
> 	defined(RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS) /*  
> optional-dirname-and-symlink-deps */
> 	    }
>
> 	    symlink_deps =  
> rpmExpandNumeric("%{?_check_symlink_deps}%{?!_check_symlink_deps:1}");
> 	    if (symlink_deps) {
> 	#endif
> …
> 	    }
>
> And there is AutoFu to set the "default" value in "Have it your own  
> way!" fashion
> in several ways. The RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS functionality  
> is tied to
> 	./configure --help
> 	…
> 	  --disable-dirname-and-symlink-deps
>                           permit to disable via macro the automatic  
> dirname
>                           and symlink dependecy
>
> The other way to disable -- because vendors MUST see their "branding"  
> everywhere and
> can't really figure out how to build RPM unless they can see/find their  
> name
> in the code -- is tied to
> 	
> 	  --with-vendor=VENDOR    build with a supported vendor's specific set  
> of
>                           changes: mandriva, ark, fedora, openmamba
>
> Note that per-vendor changes are _NOT_ supported through @rpm5.org. I  
> can't
> support code that is never enabled in my development versions (and that  
> is
> controversial for some reason, in this case because the issue was  
> discussed
> and decided 7+ years ago and no one has bothered to reopen discussions  
> about
> what SHOULD be done since).
>
> But the better way to "fix" instead of recompiling RPM is to add
> 	%files
> 	…
> 	%dir /etc/fonts
> 	%dir /etc/fonts/conf.d
>
> to _SOME_ package so that the driectores are actually present in _SOME_  
> package.
> (the directories can be in multiple packages too).
>
> Adding the directories to _SOME_ package ensures that the directories  
> will
> be removed by --erase, which is/was the reason for adding the "annoying"
> parent directory dependency in the first place.
>
> hth
>
> 73 de  
> Jeff______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
>


-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/
Received on Sun Aug 14 20:19:22 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.