Commit Graph

422 Commits

Author SHA1 Message Date
Panu Matilainen a761daa2f8 Use correct tag for NOPATCH
- dumb copy-paste error from commit a317eaadc3
2010-04-13 08:35:45 +03:00
Michael Schroeder 64e7f2aeb4 Seems like a change was made to make %attr(-) go back to the
defattr setting. Unfortunatelly this broke %defattr(-).
2010-04-12 12:07:01 +02:00
Panu Matilainen ad43e72d70 Bury FTS inside librpmbuild and eliminate from public ABI 2010-03-19 18:23:52 +02:00
Panu Matilainen c3c5eae10b Remove now unused inFtw from file lists 2010-03-01 15:55:57 +02:00
Panu Matilainen d46f752c39 Lose ancient prefix remnants from build code
- since commit 840599e3d9 in 1998, nothing
  has set RPMTAG_DEFAULTPREFIX meaning fl.prefix is always NULL...
2010-03-01 15:52:46 +02:00
Panu Matilainen f3ca4fb481 Plug a silly memleak in processPackageFiles() 2010-02-17 12:58:40 +02:00
Panu Matilainen dd58384ede Move <errno.h> include out of system.h to the places that need it 2010-01-05 15:25:31 +02:00
Panu Matilainen 6109d6388e Remove libcap stuff out of system.h
- just a few places need, avoid polluting everything with it
- make fsm->fcaps void * to avoid having to deal with fcap_t not defined
2010-01-05 13:29:52 +02:00
Panu Matilainen 4d328c0b69 Use %{__mkdir_p} macro in build instead of hardwired RPM_MKDIR_P 2009-12-22 15:32:17 +02:00
Panu Matilainen 1adb46a9f8 Back out overly strict file type check on %ghost files
- we currently only support creating regular files for %ghosts which
  dont exist in the buildroot, but for files that do exist in the buildroot
  there's no reason to place such limits (eg its perfectly ok to have
  symlinks marked as %ghosts)
2009-12-02 13:35:53 +02:00
Panu Matilainen 4018bbd08e 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}
2009-09-15 10:56:58 +03:00
Panu Matilainen 154462928e Oops, accessing the wrong header in processBinaryFiles()
- dumb mistakes from commit 4177fdffd6
2009-09-10 17:16:12 +03:00
Panu Matilainen e6b01b8f70 Eliminate headerGetColor() uses everywhere 2009-09-02 13:58:52 +03:00
Panu Matilainen 5deb850f37 Take advantage of new header string getters 2009-09-02 12:38:20 +03:00
Panu Matilainen 4177fdffd6 Eliminate uses of headerNVR() and friends in librpmbuild code 2009-09-02 11:55:42 +03:00
Panu Matilainen 0c4e48de79 Replace equal/not equal uses of str[n]cmp() with rstreq[n] in build code 2009-08-31 11:08:05 +03:00
Panu Matilainen 634a67d055 Copy BUGURL to source rpm's too
- should've been in commit 86032bfbb6, duh
2009-08-18 11:46:12 +03:00
Jindrich Novy f6982a403b Correctly inherit default %attr(-,-,-) attributes from %defattr (rhbz#515685) 2009-08-06 14:16:02 +02:00
Panu Matilainen edbc9ead96 Base64-encode %policy files to ensure it can be presented as strings
- RPMTAG_POLICIES is a string array but there's no guarantee that
  something marked %policy is a plaintext file that can be represented
  as \0-terminated string, base64-encoding them fixes that. Baby steps
  towards making %policy remotely usable, related to RhBug:505066.
- Also remove unnecessary failure code setting, processMetadataFile()
  assumes failure already, and dont try to insert NULL strings in case
  b64encode() or pgpArmorWrap() fails
2009-06-26 12:31:57 +03:00
Jindrich Novy b028930925 Teach %files to accept multiple filelists (ticket #70, rhbz#475359) 2009-06-23 11:05:06 +02:00
Panu Matilainen cdfd093484 Fix calculation of hardlinked files (RhBug:503020)
- regression from commit 899dfb5892,
  size of hardlinked file set is the size of one file of the set
- add isHardLink() internal helper to avoid a copy-paste code
2009-05-29 09:02:44 +03:00
Jindrich Novy c7523b4c52 Require file attributes in spec if %ghost files are missing from build root 2009-04-20 13:23:30 +02:00
Jindrich Novy 07524b67b6 Don't require %ghost file presence in build root (rhbz#495040) 2009-04-10 11:27:49 +02:00
Jindrich Novy 2566a70b0a Remove file flags that have never been enabled 2009-04-09 14:48:02 +02:00
Panu Matilainen 23d202e928 Plug a memleak in genCpioListAndHeader() 2009-03-11 21:43:44 +02:00
Jindrich Novy 7acdfded4a Add md5->filedigest aliases (rhbz#487597)
- add %verify(nofiledigest) as %verify(nomd5) file attribute alias
- reference digests as digests not checksums
- make old md5 related symbols obsolete and use newer reference
- update man page accordingly
2009-02-27 14:34:39 +01:00
Panu Matilainen 750802fd5f Bump FileDigests rpmlib dependency version
- should've really been in commit 1f6ad324db,
  the tag adjustment is an incompatible change from what was in
  rpm 4.6.0-rc's, ugh
2009-02-06 09:10:23 +02:00
Panu Matilainen 0611b59a4a Check for binaries in noarch packages at build-time
- this will only catch elf files for now, but better than nothing
- default to terminating build (as binaries in noarch package is pretty
  nasty thing to do), permit macro override just in case though
- only works for internal dep generator
2009-01-23 14:34:08 +02:00
Panu Matilainen e1474f4b1d Don't bother calculating string sizes manually
- ...and one less strcpy() to grep for
2009-01-09 17:07:17 +02:00
Panu Matilainen 00d48deffe Fix buffer overflow on oversized filelist entries (susebz#397006)
- original fix by Dirk Mueller
2009-01-09 17:07:17 +02:00
Panu Matilainen 0b5e0fb58c Remove unnecessary rpmfi_internal.h include 2008-11-27 10:59:14 +02:00
Panu Matilainen 219ba34736 Add control bits for all (relevant) parts of rpmfi data
- permit fine grained control over what's loaded into fi for what operations,
  non-trivial memory savings are possible
- future possibilities - these reflect closely to rpm verify control
  bits, all we need is RPMFI_DISK or similar operation to pull the
  information from disk instead of header and then verify can simply
  compare two rpmfi's
2008-11-18 17:38:53 +02:00
Panu Matilainen ff9733b6fd Generate and insert SOURCERPM tag earlier
- needed to make checking for source/binary package in rpmfiNew() reliable
  at build time
2008-11-18 11:22:26 +02:00
Panu Matilainen 899dfb5892 Calculate total file size correctly in build (mdvbz#45820, rhbz#247374)
- delay total size calculation until the real file list is known, ie
  in genCpioListAndHeaders() where duplicates and excludes have been
  weeded out
2008-11-17 13:39:22 +02:00
Panu Matilainen 170f5bf7d6 Eliminate bogus const from fi->apath 2008-11-15 17:20:13 +02:00
Panu Matilainen 53ee682a49 Avoid having to reconstruct half of rpmfi manually in genCpioListAndHeader()
- We need the on-disk paths for the cpio list in here, so instead of
  creating an rpmfi with wrong paths (for build purposes) and then
  painfully reconstructing half the fileinfo structures by hand, pass
  the on-disk path into rpmfiNew() to begin with and then switch the
  intended cpio path back into header.
- Duplicates and excludes are already filtered out from the header filelist
  so walk that instead of spec filelist to avoid having to filter out
  duplicates and excludes, again.
2008-11-15 14:22:47 +02:00
Panu Matilainen 2d5b4e3bac Lose useless fsm/rpmfi astriplen field
- only "used" for debugging output, duh...
2008-11-15 13:22:19 +02:00
Panu Matilainen 21c34a30eb Don't bother creating a dummy transaction element for rpmfi in build
- nothing in the build path requires fi->te to be present, so don't
  muck with rpmte internals needlessly
2008-11-15 12:07:44 +02:00
Panu Matilainen 3632ad454b Minor genCpioListAndHeader() cleanups
- rpmfiNew() only cares about ts for install-time relocations, nothing
  to "fix" wrt that
- we know fip is never NULL (this is a static function with whopping two
  callers), don't try to cover up for potential programmer errors
2008-11-15 11:50:09 +02:00
Panu Matilainen 2eb2569d46 Don't have to free what's not allocated to begin with... 2008-11-14 22:45:42 +02:00
Panu Matilainen a4e345455d Move file action calculations to rpmfiNew() where possible
- for build operations and src.rpm install this is known
2008-11-11 21:01:02 +02:00
Panu Matilainen 0d168d173a Figure out cpio mapflags in rpmfiNew()
- all the necessary info is there, no need to litter the logic all over
  the place
2008-11-11 18:16:22 +02:00
Panu Matilainen f553d2f0cd Adjust rpmfi directory count while messing with it in build
- otherwise we can miss some entries in rpmfiFN() max calculation and
  blow up in entertaining ways
2008-11-11 17:35:42 +02:00
Panu Matilainen a9169c46ab Calculate filename buffer len lazily in rpmfiFN() as needed
- avoids having to separately calculate in genCpioListAndHeader()
- avoids unnecessary fnlen field in rpmfi struct
- avoids having to calculate it at all if rpmfiFN() is never called
2008-11-05 15:44:35 +02:00
Panu Matilainen ed412a0e2f Kill off per-file cpio map flags
- nothing uses/needs them, one less murky fi->foo allocation less
- apparently a leftover from initial multilib attempts long long ago
2008-11-05 13:17:50 +02:00
Panu Matilainen f01ed5459d Convert in-tree users of rpmfiNew() to use flag names
- easier to grep for than scareMem, preparing for further flags
2008-10-30 13:47:40 +02:00
Panu Matilainen a792c55ffa Start adding POSIX 1.e draft file capability support for real
- Parse %caps() from spec filelists, making best-guess verification of
  capability string sanity by passing to cap_from_text()
- The posix draft specifies capability export presentation through
  cap_copy_ext() which would be fine, except that we don't have support for
  arrays of binary data. So we simply store the textual representation
  of the capabilities in a string array which we do have.
- Only add capability tag on packages which actually have capabilities to
  avoid unnecessary header bloat.
- Add a new rpmlib() dependency for file capabilities, packages relying
  on file capabilities wont work correctly unless the capabilities are set.
  To be fully correct, support for on-filesystem file capabilities should
  be checked at runtime, as this depends on kernel versions and such...
2008-10-29 10:49:25 +02:00
Panu Matilainen 770a0f34c9 Beginnings of file capability (POSIX.1e draft 15) verification support
- add minimal bits and pieces to check for capabilities in files on verify
- for now, any capability set is a verification failure as the capability
  cannot have been set by rpm itself
- patch from Andreas Gruenbacher, modified to use libcap instead of raw
  xattrs for portability
2008-10-26 14:17:16 +02:00
Panu Matilainen 54f8c5891f Convert in-tree users to headerConvert() 2008-10-10 15:54:53 +03:00
Panu Matilainen ea9ef92189 Kick out useless and ancient junk genCpioListAndHeader()
- scareMem is not used for anything here
- xmalloc() + xcalloc() cannot return NULL, don't bother checking
2008-09-22 14:30:37 +03:00