Age | Commit message (Collapse) | Author | Files | Lines |
|
Change parsing code to honour RFC4880. Handle whitespaces at EOL, and
correctly expect five trailing dashes on the Armor Header Lines.
Closes: #695919
Reported-by: Ansgar Burchardt <ansgar@debian.org>
|
|
The caller can explicitly pass both versions, but the source version
might still need to be fixed up, for example in case of legacy binNMUs
(when not using the Binary-Only changelog field), whenever the binary
version has been forced through dpkg-gencontrol, then just comparing
if they are equal will not trigger the fix up, which will produce
bogus source versions, affecting the Source field on binary packages.
Instead, always fix up the source version, regardless of the versions
matching or not.
Regression introduced in commit 094d3a7e61e6fc1f5634d880957d18ed70954a60.
Closes: #690823
|
|
This allows to mark changelog entries as being for a binary-only upload,
which implies there cannot be any source produced, and the binary
version is going to be different to the source version.
As such the version substvars will get different values, w/o needing to
hardcode a specific syntax. Although we fallback to the old syntax just
in case, for example to handle possible multiple consecutive binary-only
entries w/o needing to complicate the code too much.
Closes: #440094, #672723
|
|
This includes a public function to validate package names.
|
|
Keep the old name for backwards compatibility, but make it issue a
warning.
|
|
|
|
Add a test that ensures that dpkg-mergechangelogs deals correctly
with invalid versions.
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
|
|
Generating these at check time causes several problems. It requires a
system supporting versioned symbols and a GNU ld command line compatible
linker. Those are not available for example on Mac OS X.
Using libtool could have been an option to portably build the shared
libraries, although that still does not provide versioned symbols where
they are not available. The problem with libtool is that there's no sane
way to refer to the actual built shared library on the build tree.
Introduce a refresh-test-data target to be able to easily regenerate
those files when needed, e.g. when the test suite changes.
Reported-by: Stuart Ambler <stuart@zulazon.com>
|
|
This will allow to regenerate the objdump.ls file.
|
|
This required adding the Architecture and Multi-Arch values in
Dpkg::Deps::KnownFacts and is thus an API extension.
|
|
When evaluating implications, it's important to take into account the
arch qualifier otherwise the dependency simplification code might strip
dependencies that cannot be stripped without altering the meaning
of the dependency.
Sponsored-by: Linaro Limited
|
|
|
|
This makes dpkg-source use more appropriate default compression values
depending on the compressor used.
Prompted-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
|
|
Found by codespell.
|
|
The code merging dependencies was wrongly updating the dependency that's
not integrated in the resulting field.
Reported-by: Andreas Metzler <ametzler@downhill.at.eu.org>
|
|
In commit 5c233019cc770fb59671090d4a9462adb149921f I forgot to
update the test-suite to match for the change of conflict markers.
Doing this with this commit.
|
|
We're now ensuring that debian/control contains a source entry
and at least one entry for a binary package. And we also ensure
that the Architecture field is present. This a new restriction
but it's really in-line with the change made in dpkg where we
complain of the lack of this field.
Reported-by: Niels Thykier <niels@thykier.net>
|
|
Adapted the code to rely on the parsing done by the constructor to split
the version number properly instead of redoing similar regexes in
version_check().
Updated the test suite accordingly.
|
|
Conflicts:
debian/changelog
m4/dpkg-funcs.m4
man/dpkg.1
|
|
Fail on strict parsing, and warn otherwise.
|
|
Remove trailing spaces. Remove blank lines not separating different code
blocks. Remove blank lines at the end of the file.
|
|
dpkg treats "-0.6.5" as a version with only a revision component, so it
compares less than any version with a version component > 0.
Signed-off-by: James Vega <jamessan@debian.org>
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
|
|
|
|
|
|
|
|
Devel::Cover reports 97% coverage. Remaining branches are hard-to-test
without root privilege error handling.
[guillem@debian.org:
- Add new test into test_cases.
- Run program from builddir.
- Do not check for usage output on badusage.
- Use note() instead of diag().
- Sort database and list output.
- Skip some tests when under fakeroot. ]
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
The change of the boolean evaluation of Dpkg::Version introduced in
5b9f353b2940de751df47036608afbe71992d622 broke Dpkg::Changelog's ability
to correctly export an entry with a version of "0".
Add a non-regression test for this.
|
|
update-alternative has been rewritten as a mostly standalone C program.
It has thus been moved to utils/ instead of scripts/ together with its
README and its test suite.
This rewrite is based on some initial conversion work done by Guillem
Jover <guillem@debian.org>.
The program now logs to /var/log/alternatives.log instead of dpkg.log.
The logrotate file has been updated to deal with that file too.
|
|
Ubuntu's changelog parsing is nearly identical to Debian's, but may emit
an additional Launchpad-Bugs-Fixed header. Test that changelogs
matching the appropriate regex are parsed correctly both for Debian and
Ubuntu.
To do this, we take copies of the standard origin files and add an
internal mechanism allowing Dpkg::Vendor to be pointed at them; and we
run 600_Dpkg_Changelog.t a second time with DEB_VENDOR set, to avoid
duplicating lots of code. See the discussion in #536066 for background.
|
|
In a boolean context, the object evaluates like the version string if
the version is valid, otherwise it evaluates like undef. Document
this behaviour and add non-regression test to ensure it's kept.
This implicitly fix dpkg-shlibdeps who relies on the boolean evaluation
of the object to decide whether or not a minimal version specification
is needed or not.
|
|
|
|
|
|
Also update the test-suite and dpkg-buildpackage to match the new API.
Increase $VERSION to 1.00 since it's supposed to be a stable API now.
|
|
Add non-regression test for this interface.
|
|
To avoid confusion with the parse() function expected by objects
inheriting from Dpkg::Interface::Storable (which is supposed to restore
the object from its serialized data), the various parse() functions
have been renamed into something more explicit like analyze() for
Dpkg::Shlibs::Objdump or parse_symbolspec() for Dpkg::Shlibs::Symbol.
|
|
In the process dump() is renamed output() and save() is dropped in favor
of the version provided by Dpkg::Interface::Storable. load() is
transformed in parse().
|
|
The parse() function is replaced by load() for most users.
|
|
This implies renaming parse_fh() into parse() and parse() into load().
Update all scripts and modules using those methods.
|
|
* Make SymbolFile::lookup_*(), SymbolFile::find_matching_pattern() accept both
symbol/pattern objects AND names.
* Make SymbolFile::lookup_*(), SymbolFile::find_matching_pattern() accept both
single soname and an array of sonames.
* Make SymbolFile::lookup_*(), SymbolFile::find_matching_pattern() detect
context and return either a hash of ( soname => .., symbol => .. ) or just a
scalar symbol reference. In either case, do NOT clone symbols.
* SymbolFile::get_{new,lost}_symbols() returns an array of { soname =>
.., symbol => .. } hashes where 'symbol' is a real reference, not a clone.
* Add new abstract methods and use them everywhere:
- SymbolFile::get_arch() - architecture the file is processed under/for.
- SymbolFile::get_sonames() - names of all sonames.
- SymbolFile::get_object() - soname object reference by name or object
reference.
- SymbolFile::get_symbols($soname) - if $soname is undef, returns ALL
symbol file symbols.
- SymbolFile::get_patterns($soname) - if $soname is undef, returns ALL
symbol file patterns.
- SymbolFile::get_symbol_object(Ssym, $soname) - a convenience method
combining both SymbolFile::lookup_{symbol,pattern} methods.
* Make SymbolFile::create_symbol() more flexible. Now it can parse a dummy spec
without minver.
* Remove Symbol::sclone() as no longer used and needed. Rename Symbol::dclone()
back to Symbol::clone().
|
|
This makes order consistent with lookup_{symbol,pattern}.
|
|
This function is needed to unify how demangling of C++ symbols is done in
dpkg-dev. Passing 'auto' to cppfilt_demangle() each time is not very obvious
and error prone.
|
|
|
|
|
|
Fixes warnings due to old style function definition.
|
|
|
|
Dpkg::Compression::CompressedFile -> Dpkg::Compression::FileHandle
Dpkg::Compression::Compressor -> Dpkg::Compression::Process
The new names are more expressive and avoid repeating "Compress".
Update all scripts and modules to use the new name.
|
|
|
|
Really treat "*@version" like "(symver|optional)version" and don't care
if the diff output might not apply in that specific case. The difference
are minor anyway when you use that feature to maintain your symbols file.
|
|
Wildcards are still recognized. Their functionality is like of
(symver|optional). Also underline notations of all basic pattern names
in the man page.
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
|
|
'auto' will try to select appropriate C++ demangling type automatically. Please
note that 'auto' format is limited to C++ symbols as of binutils 2.20.
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
|