From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030725 Description of problem: I am submitting a patch that implements use of a subdirectory with the %files directive. It is only useful when using a single spec file to build several packages. By specifying a subdirectory of the RPM_BUILD_ROOT, we force RPM to strip that additional component from the pathname of the files loading the files into the RPM. A patch for v4.2 and v4.0.4 is attached to this feature-request. It is used in this manner. %install # do a bunch of installation stuff %{__mkdir_p} $RPM_BUILD_ROOT/{mainpkg,subpkg1,subpkg2} for i in mainpkg subpkg1 subpkg2 do generate_filelist $RPM_BUILD_ROOT/$i > filelist-$i done %files -f filelist-mainpkg -r mainpkg %defattr(-,root,root) %files subpkg1 -f filelist-subpkg1 -r subpkg1 %defattr(-,root,root) %files subpkg2 -f filelist-subpkg2 -r subpkg2 %defattr(-,root,root) We use it for two purposes. First, we build packages that contain files with the same name but different contents. This cannot be accomplished without the feature that we have added. But it is a critical feature for us to the software on our ~400 servers located around the globe. Second, we use it as an easier means of generating file-lists for the sub-packages being created by a single spec file. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.this is not a bug. 2. it is a feature request. 3. we can duplicate it by applying the patch and rebuilding the rpm RPM. Additional info:
Created attachment 97900 [details] %files subdir patch for rpm v4.2
afaik this was discussed some time ago and there was better option - make BuildRoot working per subpackage. For example: BuildRoot: /tmp/xyz %package xyz BuildRoot: /tmp/xyz/abc
Robert -- the "Version" in the bug is meant to be the Red Hat Linux version you are reporting against, not the actual package version. There hasn't been any activity here for over a year; this should probably either be closed or moved to a newer (Fedora Core or RHEL) disto version.
Modified component
User pnasrat's account has been closed
Reassigning to owner after bugzilla made a mess, sorry about the noise...
triaged
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This is quiet old request and it seems that what you want is a achievable in current rpm version (rpm-4.13) which is available in fedora since f23. The name of feature is RemovePathPostfixes and it was added upstream in this commit: https://github.com/rpm-software-management/rpm/commit/415aa42566052db9b7677163cea0366e55f72dcf So I am closing this bug as current release.