summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bump version to dot-paperbag aka 4.10.3.1rpm-4.10.3.1-releaserpm-4.10.xPanu Matilainen2013-02-0633-97/+97
|
* Add testcase for %ghost shared with a real filePanu Matilainen2013-02-062-1/+39
| | | | | | | | | | - Further parametrize conflicttest.spec to allow for different attributes - Verify that the real file gets created without conflicts, that it doesn't get removed when ghost is removed and gets normally removed on erase. - This is the case commit a712252392eca75443ca45c10a72873cabec7963 was supposed to fix (which it does but with, ahem, "slight" side-effects) (cherry picked from commit 0485eab2c96173d1e34e4edb3570e58a693e255e)
* Add testcase for %ghost %config behaviorPanu Matilainen2013-02-062-1/+54
| | | | | | | | | | | | | - Further parametrize configtest.spec to allow for different attributes - Verify pre-existing %ghost %config is preserved on install, that it survives upgrades and is usually left alone on erasure. - NOTE: The erasure behavior differs from rpm >= 4.11.0.1 in the strange corner-case of on-disk file content matching the non-packaged %ghost from build-time. Newer rpm never erases %ghost %config, but rpm 4.10.x preserves the exact legacy behavior of removing such "non-modified" ghost on erasure. The newer behavior is far less quirky but backporting it would require too many changes for a release like this.
* Dont skip shared file/dir create if the other one is a ghostPanu Matilainen2013-02-061-2/+7
| | | | | | | | | - Explicitly test for shared file/dir being ghost when deciding whether to skip create: we must never skip the creation of a real file/dir because of a ghost as the ghosts do not get created. - This fixes the that commit a712252392eca75443ca45c10a72873cabec7963 was supposed to fix, without side-effects that I can see. - Backported from commit 147a26c5f672ee3421fe057725f6be357031bbb5)
* Revert the severely broken FA_SKIP on %ghost "fix"Panu Matilainen2013-02-061-11/+0
| | | | | | | | | | | | - Reverts the bad half of commit a712252392eca75443ca45c10a72873cabec7963: treating files that wont be installed as skipped seems logical enough, but rpm disagrees... making %ghosts FA_SKIP on install causes upgrades on %ghost %config files to miss the necessary FA_SKIP getting set on the erase half via handleInstInstalledFile() and rpmfiDecideFate(), causing %ghost %config files to be nuked. Which isn't very nice when your /var/lib/rpm/ contents are packaged as %ghost %config... - Backported from commit 471b74bf6e218abb06bb3131a259cdfaec3f08cf
* Preparing for 4.10.3Panu Matilainen2013-01-2937-1561/+1671
| | | | - Bump package version and library revisions, update translations
* Acommodate to glibc 2.17 __secure_getenv() renamingPanu Matilainen2013-01-292-2/+4
| | | | | | - glibc 2.17 renames __secure_getenv() to secure_getenv() so now we need to test for both. Meh. (cherry picked from commit 49519f2564777fdcfb801088fb3025b3d6f5783a)
* Be more careful about skipping shared file/directory creationPanu Matilainen2013-01-291-1/+13
| | | | | | | | | | | | | | | - Only skip shared file/dir creation if its actually being created by another package. Previously we could've decided to skip an entry where the other file was also being skipped for some other reason. - Ensure %ghost entries always have FA_SKIP on install, previously they often were FA_CREATE which makes no sense for %ghost. We dont encounter %ghosts at all during install in the FSM as they dont exist in the payload, but the file disposition calculations need to take them into account now that we're avoiding redundant creates. - Fixes a regression from commit f7f5f88f9f3d6587e747b034ccb64a3f00ff4e1e which unearthed the %ghost FA_CREATE issue, reported here: http://lists.fedoraproject.org/pipermail/buildsys/2013-January/004047.html - Backported from commit a712252392eca75443ca45c10a72873cabec7963
* Adjust rpmspec -P to invoke non-build parseAlexey Tourbin2013-01-291-1/+1
| | | | | | | | | | | In the query mode, rpmspecQuery puts the parser into non-build mode by invoking rpmSpecParse with (RPMSPEC_ANYARCH|RPMSPEC_FORCE) flags. The same flags should be applied in the parse mode, so that it is possible to preprocess specfiles separately, i.e. without also installing sources and patches. Signed-off-by: Panu Matilainen <pmatilai@redhat.com> (cherry picked from commit 4eb824937ce536aeecdfdcab2d88e28083bba85b)
* Make double-quoting work for special %docPanu Matilainen2013-01-291-1/+3
| | | | | | | | - This makes special %doc consistent with the rest of %files wrt quoting/escaping special characters like spaces. Other methods have "worked" by happenstance but wont work with rpm 4.11 anymore, backporting this to keep recent versions compatible. - Backported from commit a1d9364adb556813886d91b2799217a412ac5bb0
* Disable useless empty translations, enable Ukrainian translationPanu Matilainen2013-01-291-1/+1
| | | | (cherry picked from commit 8774cb03cf78b02411cc26329a3c362d95e36fe4)
* Initial Breton (br) translationThierry Vignaud2013-01-292-1/+3494
| | | | | Signed-off-by: Panu Matilainen <pmatilai@redhat.com> (cherry picked from commit d277537bcafa65f1cb09d12e259569d6ed35e2a2)
* display the actual unknown option instead of '?'Thierry Vignaud2013-01-291-1/+1
| | | | | | | | '?' is returned by getopt when option is unknown, making hard to pinpoint the actual bogus option... Signed-off-by: Panu Matilainen <pmatilai@redhat.com> (cherry picked from commit 8192e580a0a962b8eb7f9d8fc07bd3f99ccf0ffe)
* Add missing <errno.h> includerpm-4.10.2-releasePanu Matilainen2012-12-101-0/+1
| | | | | | - Should've been in commit cbd6ef58bbc122e6adf2138679915bd3845d6756, this breaks build when selinux-support is not compiled in (cherry picked from commit ebba1c7b58ba089bb9e1ded147c789d9ca067b6c)
* Preparing for 4.10.2rpm-4.10.2Panu Matilainen2012-12-0739-1501/+1773
| | | | - Bump package version and library revisions, update translations
* Ensure correct return code on malformed signature in packagesPanu Matilainen2012-12-071-2/+6
| | | | | | | | | | | | - rpmpkgRead() starts with assumed failure, but there are a number of places assigning the return code, and by the time we get to the parsePGPSig() calls its likely to be RPMRC_OK, so the jumps to exit result in "all is well" return code on a signature we couldn't even parse. Oops. - Set the failure status explicitly to fix this fairly nasty regression introduced in commit e8bc3ff5d780f4ee6656c24464402723e5fb04f4, ie rpm >= 4.10. (cherry picked from commit 96a616c6aed4c516789a154af188f005caf23f14)
* Handle allocation failure in NSS DSA signature initializationPanu Matilainen2012-12-071-2/+4
| | | | (cherry picked from commit 2d39f13064f6e6ff1a1633b708e7ba5622a7e8eb)
* Unbreak --setperms (RhBug:881835)Panu Matilainen2012-12-071-1/+1
| | | | | | | | | | - Fixes a regression introduced in rpm >= 4.10 caused by query format simplification (loss of zero padding support), in commit 1f1e5e88a1f6c60cf2d11014d809000e97a63aad. - 'chmod' command doesn't need zero padding, just remove the formatting. In fact we shouldn't be passing the entire mode to it but just the permission bits, but fortunately chmod isn't too picky here. (cherry picked from commit 4c90c79e3f3c178189ad3bd89dfd87cd3a2290ab)
* Remove extra ',' in NSS configure checks, whoopsPanu Matilainen2012-12-071-1/+1
| | | | (cherry picked from commit e1c67173d38016a88989f5b09e0934f90094fe85)
* Use NSS-defined constants for DSA q-bits and signature length tooPanu Matilainen2012-12-071-3/+9
| | | | | | - No functional changes here (either), but using the proper constants simply makes things that little bit clearer. (cherry picked from commit 604da18bc267f89568081c1ab163c7fc45207220)
* Avoid deprecation warnings from NSS >= 3.14Panu Matilainen2012-12-071-6/+8
| | | | | | | | | | | - NSS >= 3.14 introduces support for DSA2 and marks DSA_SUBPRIME_LEN as deprecated. Use explicit DSA1_SUBPRIME_LEN (we only support DSA1 for now) instead where available, add compatibility define for older versions. - Also directly include <blapit.h> where its defined - blabit.h gets included via cryptohi.h but being explicit about it avoids having to redefine it again "just in case". (cherry picked from commit 73be0fc7d9faab9f1120e2979f2ca1feed522195)
* Avoid locale issues in rpm2cpio.sh (RhBug:878363)Panu Matilainen2012-12-071-0/+3
| | | | | | | - In gawk >= 4.0.x printf() "adjusts" things according to current locale, but we need the data as it is. Forcing C locale prevents gawk from getting funny ideas about character conversions... (cherry picked from commit c0e95f1cedefd6d7522ef2cf7a2ada7c83821596)
* Add --undefine cli switch for undefining macros (related to RhBug:876308)Panu Matilainen2012-12-072-0/+13
| | | | (cherry picked from commit 644f080a4868208bf61f28103b7b676c094129a0)
* Document --define in rpmbuild manual as well (RhBug:665536)Panu Matilainen2012-12-071-0/+3
| | | | (cherry picked from commit 3cc768e72cbd5a40cc7745c71cd8fac1164f80ae)
* Work around Fedora-specific patch to libselinux causing warningsPanu Matilainen2012-12-071-1/+1
| | | | | | | - In recent Fedora, struct selinux_opt value member is changed to an anonymous union of char * and char **. Initialize the members by name to avoid warnings in both (patched and unpatched) cases. (cherry picked from commit 249128b3f85cb1544df74c4953a65507c2aea9f6)
* Fix strncat() boundaries in Fdopen()Dominique Leuenberger2012-12-071-3/+3
| | | | | Signed-off-by: Panu Matilainen <pmatilai@redhat.com> (cherry picked from commit 34c4565d8ce656de7ccad9c098757e367916d66f)
* Update contact address in COPYING (RhBug:742362)Panu Matilainen2012-12-071-1/+1
| | | | | | - marc and ewt haven't been valid email addresses in the last 10+ years, cough... (cherry picked from commit 6359697b256dbf402a0437fe8d99b38800579eaa)
* Use private NSS context if NSS supports it (RhBug:871485)Panu Matilainen2012-12-072-1/+27
| | | | | | | | | | | - Older NSS versions operate on global context, which can cause all sorts of trouble when an API user tries to use NSS for their own purposes: eg they might want to use NSS databases which is not possible once we've initialized NSS with NSS_NoDB_Init(). Further background on the subject at https://wiki.mozilla.org/NSS_Library_Init - Use private private NSS context when possible (NSS >= 3.12.5) to avoid such clashes, but keep support for older versions for now. (cherry picked from commit 5ecfdcea4e80e58f133ffddd69130ee8df28b2ac)
* Handle EINTR in Fread() and Fwrite()Panu Matilainen2012-12-071-2/+6
| | | | | | | - Not all systems automatically restart signal-interrupted operations, handle this centrally since its so easy to do. Also related to RhBug:580974. (cherry picked from commit eb23d21b3da0789c19a2e97306745be443567d41)
* Handle partial reads and errors in package IO (RhBug:802839, RhBug:580974)Panu Matilainen2012-12-075-9/+39
| | | | | | | | | | | - There are no guarantees Fread() will return all of the requested size: it can return partial data eg on signals and pipe descriptors. Introduce a helper function to handle this centrally for all package read IO, effectively reintroducing timedRead() but without the caveats: timedRead() did not work on compressed streams, did not handle eg EINTR correctly and while really being an internal helper, was exported in the API. (cherry picked from commit cbd6ef58bbc122e6adf2138679915bd3845d6756)
* Fix missing error on --import on bogus key file (RhBug:869667)Panu Matilainen2012-12-071-4/+5
| | | | | | | - When the "BEGIN PGP" marker is not found at all, we would silently exit with success when trying to import utter garbage, such as rpmkeys --import /bin/bash (not that I consider bash as gargabe ;) (cherry picked from commit 0b9c93ed18a11818a2f3645431a338bdc3f1fc81)
* Fix noarch __isa_* macro filter in installplatform (RhBug:865436)Panu Matilainen2012-12-071-1/+1
| | | | | | | | | - The filter wasn't doing what it was supposed to due to extra single quotes getting inserted, causing "rpmbuild --target noarch foo.spec" to whine about empty macro bodies. This is a regression introduced in rpm 4.10, commit 07ec480c180e4005a629242b8f9f8ab640e3e950 to be precise. (cherry picked from commit 90dd51743200055f30d9e0e0337173118b4ae756)
* Add rpm --setperms and rpm --setugids to the man pageFlorian Festi2012-12-071-4/+9
| | | | (cherry picked from commit 5a674fba65b0988118401f3cccd12ee2bfe904e0)
* Filter out skipped files on hardlink checking (RhBug:864622)Panu Matilainen2012-10-101-2/+4
| | | | | | | - Legitimately skipped files (links) must not cause install-errors. This has always been broken, but the errors were completely ignored on install prior to rpm 4.10. - Backported from commit eeea54c76b130da3769ae10f7db2c2fcfb5c57be
* Preparing for 4.10.1rpm-4.10.1-releaserpm-4.10.1Panu Matilainen2012-10-0339-4883/+5084
| | | | - Bump package version and library revisions, update translations
* Permit key imports even if signature checking is disabled (RhBug:856225)Panu Matilainen2012-10-031-1/+7
| | | | | | | | | - Since commit 290fcbbe6b3ca2fb1d5e4a7269a32a94f8a1563a, key imports on transaction sets where signature checking is disabled would fail due to keyring not getting loaded at all. A regression of sorts, in other words. As a minimal fix, temporarily enable sigcheck vsflags during keyring loading. (cherry picked from commit 9209e6cd78a1e6814f3038734cdd300b97ddcf1b)
* Fix memleak regresssion in rpmfiDecideFateIndex()Panu Matilainen2012-10-031-32/+40
| | | | | | | | - Similar to commit 80ee39da35544253cab12abd54af8754335ac945: this started leaking at commit 3f996a588a56141df146c33583a13c0542323977 as rpmfiFNIndex() returns malloced memory. Refactor the lucky 13 return points into one, allowing cleanup at exit. - Backported from commit 273a025c504774b5dfec2429ca0d5e4f8c73a891
* Fix a massive memleak from rpmfiConfigConflictIndex() and optimize itPanu Matilainen2012-10-031-12/+25
| | | | | | | | | | | | - rpmfiFNIndex() returns a malloced string since commit 11116a67864c119e420297984bd9ec4b83fdadd7 but this wasn't taken into account in commit 3f996a588a56141df146c33583a13c0542323977, causing a massive memory leak on transaction preparations. - Optimize the entry by avoiding rpmfiFNIndex() and lstat() until really necessary, and use a central exit point beyond that so we can free fn. Besides fixing the memleak, this gives a small but measurable performance improvement on this rather busy path. - Backported from commit 80ee39da35544253cab12abd54af8754335ac945
* Add a test-case for the shared file timestamp behaviorPanu Matilainen2012-10-031-0/+29
| | | | | | | | | - Prior to commit f7f5f88f9f3d6587e747b034ccb64a3f00ff4e1e, this would've failed: removing the last package to be installed would cause timestamp failure on all others. The order is arbitrary in this testcase but it matters in real-world situations such as secondary arch packages. (cherry picked from commit bf3d65e7951aa9d98ef86db15982643a9cad79ce)
* Only create the first instance of a file shared between packagesPanu Matilainen2012-10-031-0/+6
| | | | | | | | | | | | - When packages share an identical file, we only need to create the first one we encounter and skip it for the rest (reverse already happens, and must happen, on erase). This has the benefit of getting the timestamp to match the first file, which often is also the last one to get removed. Also when lots of shared files are involved (such as in multilib installations), this can give several percents worth of speed gain as we dont unnecessarily rewrite the same contents over and over. (cherry picked from commit f7f5f88f9f3d6587e747b034ccb64a3f00ff4e1e)
* Revert "Always return NULL from fdFree()"Panu Matilainen2012-10-031-1/+1
| | | | | | | | | | | - This reverts commit 4c1f7e335de1724661ce63c53186d161ab71a63f: various things inside and outside of rpm actually do still depend on the old behavior, and leak file descriptors otherwise. As an easy backportable band-aid, revert back to the previous behavior, to which various callers are tuned to fix the regression introduced in rpm 4.10.0. The real fix would be something more like "eliminate fdFree() and make Fclose() honor refcounts". (cherry picked from commit 429b933b42d1821f6f0a2a41ae13c504ea6d0657)
* Fix bogus "unclosed %if" error when %include is used in conditionalsPanu Matilainen2012-10-031-9/+6
| | | | | | | | | | | - All rpm versions log a bogus "unclosed %if" error when %include is used inside %if-%endif (and rpm >= 4.10 actually aborts the parse): the check for unclosed if occurs before checking whether there's more to come. - Move the error check into readLine() EOF path along with the other similar check to fix, and to consolidate the error handling to a single spot. - Backported from commit e06177ee657fbb1c32e1f651c8ae4da73e87c65b
* Add test for file verification from originating packagePanu Matilainen2012-10-031-1/+23
| | | | (cherry picked from commit 4e221afaa20015de97c7ebb44769772502eb9999)
* Verify files from non-installed packages again (RhBug:826589)Panu Matilainen2012-10-031-1/+2
| | | | | | | | | | | | - Verifying files against the originating, non-installed package can be useful sometimes, eg if rpmdb is broken or cannot be trusted. Of course such verification will give false positives on files that were intentionally skipped during installation (nodocs, wrong color, netshared...), that can't be helped. - This restores the former behavior that was erroneously changed in commit adbd484372cb38aca5aca3c6dba3b2ca9cae93d1 while "fixing" an unhandled enumeration in the switch. Doh. (cherry picked from commit 227654f30c099bfb1e631fd200f10576b3f58def)
* Accept em64t architecture as an alias for x86_64 (RhBug:800489)Panu Matilainen2012-10-031-3/+4
| | | | | | | | - Some vendors insist on calling their x86_64 packages "em64t" instead of the more standard x86_64. Minimally support this naming convention as those packages aren't going away anytime soon - be liberal in what you accept and all, sigh. (cherry picked from commit d6add031f1e63cc228cc5002df06a52c76479560)
* Add tests for invalid --relocate detection and --badreloc functionalityPanu Matilainen2012-10-031-0/+33
| | | | (cherry picked from commit 72621fcf32a6fa4fdda16f6b6729e7c6fe0943ea)
* Fix RPMPROB_FILTER_FORCERELOCATE aka --badreloc (RhBug:828784)Panu Matilainen2012-10-033-2/+24
| | | | | | | | | | | | | | | - As noted (but since then blissfully forgotten) in the commit message, commit e696b409fe836bf39cbf639bac4321d658d0952d broke --badreloc so its been broken since rpm >= 4.9.x :-/ - Transaction problem filter is only available during rpmtsRun() so we have no clue whether bad relocations should be filtered or not during rpmte creation. Instead of creating the problems at rpmteNew() time, remember any bad relocations that were found and check + create the actual problems (unless filtered) along with other problems during rpmtsRun(). - Passing an "allow bad relocations" flag to rpmtsAddInstallElement() would be a saner option but this is a back-portable way of handling it. (cherry picked from commit 4fbb58c7e6ee7d1bb565b27e4f81dcf2fee93995)
* Honor RPMSENSE_MISSINGOK flag in dependency checkingPanu Matilainen2012-10-032-3/+10
| | | | | | | | - For now there's no way to set this flag from packages so it doesn't actually do anything, but it doesn't hurt anything either, allows Suse & friends to drop one patch (greetings Michael :) and there are might be some things we could use this for internally. (cherry picked from commit ecd9aceb565be9b672091cbcb5b2db408dcb1d91)
* Dont silence patch by default (RhBug:678000, RhBug:773503)Panu Matilainen2012-10-031-1/+1
| | | | | | | | | - Unfortunately patch'es idea of "interesting" output is not ideal for our purposes: "patching foo.c" is of little value, but hunks with offsets and fuzz can be important and there's no switch to patch to get exactly what we want. So let it be chatty... build logs are, anyway. (cherry picked from commit 933a3e32dd94c5d54d10c24c55394488824de1f0)
* Add --noclean and --nocheck options to rpmbuildPanu Matilainen2012-10-032-0/+15
| | | | | | | - Ability to skip %clean build stage was requested as RhBug:756531, --nocheck seems otherwise useful to have as %check can take a lot of time, time you might not want to spend for a trivial spec change or such. (cherry picked from commit 12f9b3f9e6b35e5ad2f9edd4e112d6495756a562)