summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2016-11-30 11:40:25 +0200
committerPanu Matilainen <pmatilai@redhat.com>2016-11-30 12:09:24 +0200
commitbde88ada3a0fbd17f9b5db9fb5426eb0f1ff5efd (patch)
tree86fcd5b1a260499ee39b7d5224c5a028e9e6009a
parent4c53e5755e3501df44029390f0b62d2a5a6a6cf9 (diff)
downloadrpm-bde88ada3a0fbd17f9b5db9fb5426eb0f1ff5efd.tar.gz
Fix special %doc and %license %defattr() dir permissions (RhBug:1399798)
Fixes regression from commit 877d5b130cbfdfd93ad39c1f0f1505790eba264e which broke directory permissions on special %doc and %license directories due to this cpe/thinko/typo: + copyFileEntry(&sd->entries[0].defEntry, &fl->def); + copyFileEntry(&sd->entries[0].defEntry, &fl->cur); However there's an added twist involved: the first special doc/license entry from which the current attrs are copied is a *file*, so if you have eg "%attr(444,-,-) %doc README.md" as the first special %doc, the directory ends up inaccessible because it inherits the file permissions. This is much much older behavior, probably about as old as rpm itself... Anyway, since we now *can*, the right thing to do seems to be just not copying the current attrs for the special doc/license *directory* at all. There's no associated %files line with the directory either, so it makes sense that only the defaults are applied..
-rw-r--r--build/files.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/build/files.c b/build/files.c
index 9ffd8aff8..f29762250 100644
--- a/build/files.c
+++ b/build/files.c
@@ -2207,7 +2207,6 @@ static void processSpecialDir(rpmSpec spec, Package pkg, FileList fl,
FileEntryFree(&fl->cur);
FileEntryFree(&fl->def);
copyFileEntry(&sd->entries[0].defEntry, &fl->def);
- copyFileEntry(&sd->entries[0].defEntry, &fl->cur);
fl->cur.isDir = 1;
(void) processBinaryFile(pkg, fl, sd->dirname);