rpm/rpm-4.7.1-abs-filelist.patch
Panu Matilainen 62b4055709 - fix duplicate dependency filtering on build (#490378)
- permit absolute paths in file lists again (#521760)
- use permissions 444 for all .debug files (#522194)
- add support for optional bugurl tag (#512774)
2009-09-15 08:22:57 +00:00

31 lines
1.1 KiB
Diff

commit 4018bbd08e84fd0cc227dcb8d2dc20693ce2296a
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Tue Sep 15 10:56:58 2009 +0300
Allow absolute paths in file lists again (SuseBug:535594, RhBug:521760)
- patch from OpenSUSE / Michael Schroeder
- build-time generated file lists should be placed in the build directory,
but at least one valid use case for this is things like %files -f %{SOURCE10}
diff --git a/build/files.c b/build/files.c
index b5c5437..061494d 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1755,9 +1755,13 @@ static rpmRC processPackageFiles(rpmSpec spec, Package pkg,
argvSplit(&filelists, getStringBuf(pkg->fileFile), "\n");
for (fp = filelists; *fp != NULL; fp++) {
- ffn = rpmGetPath("%{_builddir}/",
- (spec->buildSubdir ? spec->buildSubdir : "") ,
- "/", *fp, NULL);
+ if (**fp == '/') {
+ ffn = rpmGetPath(*fp, NULL);
+ } else {
+ ffn = rpmGetPath("%{_builddir}/",
+ (spec->buildSubdir ? spec->buildSubdir : "") ,
+ "/", *fp, NULL);
+ }
fd = fopen(ffn, "r");
if (fd == NULL || ferror(fd)) {