Red Hat Bugzilla – Bug 116448
RFE: enable use of subdirectories in the %file directive
Last modified: 2016-03-10 10:11:08 EST
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.
# do a bunch of installation stuff
for i in mainpkg subpkg1 subpkg2
generate_filelist $RPM_BUILD_ROOT/$i > filelist-$i
%files -f filelist-mainpkg -r mainpkg
%files subpkg1 -f filelist-subpkg1 -r subpkg1
%files subpkg2 -f filelist-subpkg2 -r subpkg2
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):
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.
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.
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.
User email@example.com's account has been closed
Reassigning to owner after bugzilla made a mess, sorry about the noise...
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:
So I am closing this bug as current release.