summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debsrcrecords.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove obsolete RCS keywordsGuillem Jover2018-05-071-1/+0
| | | | Prompted-by: Jakub Wilk <jwilk@debian.org>
* deprecate the single-line deprecation ignoring macroDavid Kalnischkies2017-12-131-1/+5
| | | | | | | | | | gcc has problems understanding this construct and additionally thinks it would produce multiple lines and stuff, so to keep using it isn't really worth it for the few instances we have: We can just write the long form there which works better. Reported-By: gcc Gbp-Dch: Ignore
* use pkgTagSection::Key in srcRecords parserDavid Kalnischkies2017-09-261-32/+34
| | | | | | | | | Using hardcoded array-indexes in the build-dependency parsing is efficient, but less discoverable and easier to break. We can avoid this by making it even more efficient (not that it would be noticeable) allowing us to do explicitly named comparisons instead. Gbp-Dch: Ignore
* allow empty build-dependency fields in the parserDavid Kalnischkies2017-09-261-1/+4
| | | | | | | | | | | APT used to parse only wellformed files produced by repository creation tools which removed empty files as pointless before apt would see them. Now that apt can be told to parse e.g. debian/control files directly, it needs to be a little more accepting through: We had this with comments already, now let it deal with the far more trivial empty fields. Closes: #875363
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-7/+7
| | | | | | | | | | | | | This makes it easier to see which headers includes what. The changes were done by running git grep -l '#\s*include' \ | grep -E '.(cc|h)$' \ | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/' To modify all include lines by adding a space, and then running ./git-clang-format.sh.
* Fix parsing of or groups in build-deps with ignored packagesJulian Andres Klode2017-05-311-1/+11
| | | | | | | | | | | | | | | | | | | | | | | If the last alternative(s) of an Or group is ignored, because it does not match an architecture list, we would end up keeping the or flag, effectively making the next AND an OR. For example, when parsing (on amd64): debhelper (>= 9), libnacl-dev [amd64] | libnacl-dev [i386] => debhelper (>= 9), libnacl-dev | Which can cause python-apt to crash. Even worse: debhelper (>= 9), libnacl-dev [amd64] | libnacl-dev [i386], foobar => debhelper (>= 9), libnacl-dev [amd64] | foobar By setting the previous alternatives Or flag to the current Or flag if the current alternative is ignored, we solve the issue. LP: #1694697
* add support for Build-Depends/Conflicts-ArchJohannes Schauer2016-11-091-3/+5
| | | | | | | | | | | | | | These new enum values might cause "interesting" behaviour in tools not expecting them – like an old apt would think a Build-Conflicts-Arch is some sort of Build-Depends – but that can't reasonably be avoided and effects only packages using B-D/C-A so if there is any breakage the tools can easily be adapted. The APT_PKG_RELEASE number is increased so that libapt users can detect the availability of these new enum fields via: #if APT_PKG_ABI > 500 || (APT_PKG_ABI == 500 && APT_PKG_RELEASE >= 1) Closes: #837395
* Fix segfault and out-of-bounds read in Binary fieldsJulian Andres Klode2016-08-311-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a Binary field contains one or more spaces before a comma, the code produced a segmentation fault, as it accidentally set a pointer to 0 instead of the value of the pointer. If the comma is at the beginning of the field, the code would create a binStartNext that points one element before the start of the string, which is undefined behavior. We also need to check that we do not exit the string during the replacement of spaces before commas: A string of the form " ," would normally exit the boundary of the Buffer: binStartNext = offset 1 ',' binEnd = offset 0 ' ' isspace_ascii(*binEnd) = true => --binEnd => binEnd = - 1 We get rid of the problem by only allowing spaces to be eliminated if they are not the first character of the buffer: binStartNext = offset 1 ',' binEnd = offset 0 ' ' binEnd > buffer = false, isspace_ascii(*binEnd) = true => exit loop => binEnd remains 0
* support "install ./foo.changes"David Kalnischkies2016-07-221-1/+18
| | | | | | | | | | | | We support installing ./foo.deb (and ./foo.dsc for source) for a while now, but it can be a bit clunky to work with those directly if you e.g. build packages locally in a 'central' build-area. The changes files also include hashsums and can be signed, so this can also be considered an enhancement in terms of security as a user "just" has to verify the signature on the changes file then rather than checking all deb files individually in these manual installation procedures.
* enforce verify of filesize in 'apt-get source'David Kalnischkies2016-03-141-0/+1
| | | | | The structure we parse the data into has a dedicated size field, but it tends to be easier to handle it as a (very weak) checksum.
* support comments in debian/control parsingDavid Kalnischkies2016-01-021-4/+10
| | | | | | | | | Now (55153bf94ff28a23318e79aa48242244c4d82b3c) that pkgTagFile can be told to deal with all sorts of comments we can use this mode to parse dsc (as by catch) and debian/control files properly even in the wake of multiline fields spliced with comments like Build-Depends. Closes: 806775
* Convert most callers of isspace() to isspace_ascii()Julian Andres Klode2015-12-271-3/+3
| | | | | This converts all callers that read machine-generated data, callers that might work with user input are not converted.
* make all d-pointer * const pointersDavid Kalnischkies2015-08-101-1/+1
| | | | | | | | | | | | | | Doing this disables the implicit copy assignment operator (among others) which would cause hovac if used on the classes as it would just copy the pointer, not the data the d-pointer points to. For most of the classes we don't need a copy assignment operator anyway and in many classes it was broken before as many contain a pointer of some sort. Only for our Cacheset Container interfaces we define an explicit copy assignment operator which could later be implemented to copy the data from one d-pointer to the other if we need it. Git-Dch: Ignore
* add d-pointer, virtual destructors and de-inline de/constructorsDavid Kalnischkies2015-06-161-0/+4
| | | | | | | | To have a chance to keep the ABI for a while we need all three to team up. One of them missing and we might loose, so ensuring that they are available is a very tedious but needed task once in a while. Git-Dch: Ignore
* merge debian/sid into debian/experimentalDavid Kalnischkies2015-03-161-6/+32
|\
| * use 'best' hash for source authenticationDavid Kalnischkies2014-11-101-44/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collect all hashes we can get from the source record and put them into a HashStringList so that 'apt-get source' can use it instead of using always the MD5sum. We therefore also deprecate the MD5 struct member in favor of the list. While at it, the parsing of the Files is enhanced so that records which miss "Files" (aka MD5 checksums) are still searched for other checksums as they include just as much data, just not with a nice and catchy name. This is a cherry-pick of 1262d35 with some dirty tricks to preserve ABI. LP: 1098738
* | replace ignore-deprecated #pragma dance with _PragmaDavid Kalnischkies2014-11-081-18/+2
| | | | | | | | | | | | | | | | | | For compatibility we use/provide and fill quiet some deprecated methods and fields, which subsequently earns us a warning for using them. These warnings therefore have to be disabled for these codeparts and that is what this change does now in a slightly more elegant way. Git-Dch: Ignore
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-06-181-1/+2
|\| | | | | | | | | Conflicts: debian/changelog
| * use free() instead of delete[] in debSrcRecordParser::~debSrcRecordParserMichael Vogt2014-05-271-1/+2
| | | | | | | | | | The Buffer was allocated using strndup() so we need to free it using free() instead of delete[]
* | Fix more warnings from clangMichael Vogt2014-05-291-2/+3
| | | | | | | | | | | | | | | | | | Reported-By: clang++ -Werror Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h apt-pkg/deb/debmetaindex.h
* | use 'best' hash for source authenticationDavid Kalnischkies2014-05-091-71/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Collect all hashes we can get from the source record and put them into a HashStringList so that 'apt-get source' can use it instead of using always the MD5sum. We therefore also deprecate the MD5 struct member in favor of the list. While at it, the parsing of the Files is enhanced so that records which miss "Files" (aka MD5 checksums) are still searched for other checksums as they include just as much data, just not with a nice and catchy name. LP: 1098738
* | Merge remote-tracking branch 'mvo/feature/build-dep-dsc2' into ↵Michael Vogt2014-05-081-0/+19
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | debian/experimental Conflicts: apt-pkg/deb/debindexfile.cc apt-pkg/deb/debindexfile.h apt-pkg/deb/debsrcrecords.cc
| * | create debIFTypeDscFile typeMichael Vogt2014-04-241-2/+2
| | |
| * | add support for apt-get build-dep foo.dscMichael Vogt2014-04-221-0/+19
| |/
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-05-071-5/+12
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: apt-pkg/cachefilter.h apt-pkg/contrib/fileutl.cc apt-pkg/contrib/netrc.h apt-pkg/deb/debsrcrecords.cc apt-pkg/init.h apt-pkg/pkgcache.cc debian/apt.install.in debian/changelog
| * cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-2/+9
| | | | | | | | | | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
| * warning: useless cast to type A [-Wuseless-cast]David Kalnischkies2014-03-131-1/+1
| | | | | | | | | | Git-Dch: Ignore Reported-By: gcc -Wuseless-cast
| * implement BuildProfileSpec support as dpkg has in 1.17.2Johannes Schauer2014-03-131-1/+1
| | | | | | | | | | | | | | | | Build-dependencies are now able to include a <profile.foo …> specification limiting usage similar to already supported [arch …]. More details: https://wiki.debian.org/BuildProfileSpec Closes: 661537
* | re-add compat pkgSrcRecords::File::MD5HashMichael Vogt2013-02-281-0/+3
| |
* | cleanup the hash iteration. unfortunately there is no 1:1 mapping from ↵Michael Vogt2013-01-311-21/+15
| | | | | | | | Hashes::SupporedHashes to the tag name
* | fix skipping of already downloaded files and add some FIXMEsMichael Vogt2013-01-141-4/+9
| |
* | first iteration that adds support for checksums-{sha512,sha256}Michael Vogt2013-01-141-54/+75
|/
* * apt-pkg/deb/debsrcrecords.cc:David Kalnischkies2011-09-211-17/+24
| | | - remove the limit of 400 Binaries for a source package (Closes: #622110)
* do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies2011-09-191-2/+4
|
* reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-0/+2
|
* support every compression we have a compressor configuredDavid Kalnischkies2011-02-271-3/+6
|
* * apt-pkg/deb/debsrcrecords.cc:David Kalnischkies2011-02-221-1/+2
| | | - support xz-compressed source v3 debian.tar files
* Ignore :qualifiers after package name in build dependenciesDavid Kalnischkies2009-11-291-2/+3
| | | | for now as long we don't understand them (Closes: #558103)
* use "diff" filetype for .debian.tar.* files (Closes: #554898) inDavid Kalnischkies2009-11-271-1/+7
| | | | | apt-pkg/deb/debsrcrecords.cc as source format v3 uses this name scheme for their "diff" files.
* merged r1811..1815 from lp:~donkult/apt/experimentalMichael Vogt2009-06-301-0/+8
|
* * Applied patch from Guillem Jover <guillem.jover@nokia.com> to addOtavio Salvador2007-07-281-1/+1
| | | support to add lzma support (closes: #408201)
* * Removed the more leftover #pragma interface/implementationMichael Vogt2007-06-081-4/+0
|\ | | | | closes: #306937 (thanks to Andreas Henriksson for the patch)
| * * remove all the remaining #pragma implementationMichael Vogt2007-06-081-4/+0
| |
* | * apt-pkg/deb/debsrcrecords.{cc,h}:Michael Vogt2006-12-011-1/+1
| | | | | | | | - cast correct
* | * apt-pkg/deb/debsrcrecords.cc:Michael Vogt2006-12-011-1/+1
| | | | | | | | - fix off-by-one problem
* | * apt-pkg/deb/debsrcrecords.{cc,h}:Michael Vogt2006-11-301-19/+9
|/ | | | - make the buffer dynmaic
* * Implement an ugly workaround for the 10000-character ...Arch Librarian2004-09-201-4/+25
| | | | | | | | | | Author: mdz Date: 2004-03-17 05:58:54 GMT * Implement an ugly workaround for the 10000-character limit on the Binaries field in debSrcRecordParser, until such time as some things can be converted over to use STL data types (ABI change) (Closes: #236688) * Increase default tagfile buffer from 32k to 128k; this arbitrary limit should also be removed someday (Closes: #174945)
* Add --arch-only option for apt-get build-dep only only ...Arch Librarian2004-09-201-2/+5
| | | | | | | | | Author: tausq Date: 2001-11-04 17:09:18 GMT Add --arch-only option for apt-get build-dep only only process arch-dependent build-dependencies. Small change to srcrecord class; bumped minor so number to 3.3
* Join with aliencodeArch Librarian2004-09-201-28/+69
| | | | | | Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode
* working apt-get sourceArch Librarian2004-09-201-3/+3
| | | | | | Author: jgg Date: 1999-04-07 05:30:17 GMT working apt-get source