I can put a backported patch here that use a configure option for disabling this, imho a simple patch, if interested. Regards -----Original Message----- From: Stew Benedict Sent: 25/02/2011, 13:44 To: rpm-devel@rpm5.org Subject: Re: enable strict parentdir checking in 5.3.8?
On 02/24/2011 08:14 PM, Jeff Johnson wrote: > On Feb 24, 2011, at 7:39 PM, Stew Benedict wrote: > > >> Hello All, >> >> Apologies if this is a FAQ. I didn't find a lot of info looking around. >> We have a user that's using rpm-5.1.9 and finding that certain packages >> we provide cannot be installed due to unowned directories. I acknowledge >> this is an issue with the packages, but as a way to test I'd like to be >> able to enable this type of strict checking on a test system. >> >> > There's --noparentdirs (and --nolinktos) disablers on the CLI. > > There's a patch to use a macro disabler used in Ark and Mandriva > (but you're gonna have to recompile). > > What I do is this: > > mkdir -p /etc/rpm/sysinfo > rpm -Va --nofiles --orphandirs > /etc/rpm/sysinfo/Dirnames > > i.e. its possible to stub out dependencies through configuration @rpm5.org. > > (aside) > To stub out Requires: its /etc/rpm/sysinfo/Providename, same (SuSE German ;-) > 1st letter capitalized, rest lower case, from RPMTAG_PROVIDENAME. > > >> Test system is cooker, rpm-5.3.8. Is there a patch or a config option I >> can apply to build rpm with this type of checking enabled? >> >> ref: http://bugs.linuxbase.org/show_bug.cgi?id=3195 >> >> > There is ... code looks like this in lib/depends.c to enable a macro > to persistently enable/disable the behavior transparently: > > #if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) /* > 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) /* > optional-dirname-and-symlink-deps */ > } > > symlink_deps = > rpmExpandNumeric("%{?_check_symlink_deps}%{?!_check_symlink_deps:1}"); > if (symlink_deps) { > #endif > > Thanks. Per Øyvind caught me on IRC and also showed me the relevant macros I can set to emulate the behavior, which seems to be giving me the desired effect. > Working on the "LSB 5.0 Package Standard", eh? ;-) > > Nothing so glorious, just trying to fix a bug :) -- Stew Benedict Linux Foundation ______________________________________________________________________ RPM Package Manager http://rpm5.org Developer Communication List rpm-devel@rpm5.org ______________________________________________________________________ RPM Package Manager http://rpm5.org Developer Communication List rpm-devel@rpm5.org