Age | Commit message (Collapse) | Author | Files | Lines |
|
Move the bulk of the code into two new vendor-neutral Core sub-modules
Dpkg::Control::FieldsCore and Dpkg::Control::HashCore, that get
imported by Dpkg::Control::Fields and Dpkg::Control::Hash respectively;
so that modules like Dpkg::Control::HashCore can make use of
Dpkg::Control::FieldsCore w/o getting into a circular import due
to Dpkg::Vendor previously using Dpkg::Control::Hash.
The old dependency graph would have been:
Control::Hash → Control::Fields
↑ ↓
Vendor
The new one would be:
Control::Hash → Control::Fields
↓ ↓ ↓
↓ Vendor ↓
↓ ↓ ↓
Control::HashCore → Control::FieldsCore
|
|
Add two trivial list utility functions, mimicking the ones from
List::MoreUtils, as that is not a core module and we want to avoid
the additional dependency.
|
|
Lowercase module names are reserved by convention for pragmas, and
there's really no need to diverge here from the general dpkg project
naming convention. Also make sure source package format variant names
are always in lowercase, to not allow names that would not work with
previous dpkg-source versions.
Fixes NamingConventions::Capitalization.
|
|
Rename, uppercase and do not export new variables by default, to avoid
cluttering the caller namespace, and to give them consistent names. We'll
keep the old variables for a while, to not break uses from external
modules.
Addresses Variables::ProhibitPackageVars.
|
|
This will make life easier for downstreams using different paths. Allow
overriding pkgconfdir at configure time.
|
|
Using double-quotes imposes a small performance penalty as the perl
parser needs to check if any interpolation is needed. Use double-quotes
only when the string contains single-quotes. Ideally we'd use
double-quotes too for escaped meta-characters that might otherwise be
confusing to immediately see if they need interpolation or not, but the
policy does not (currently) allow to ignore these.
Fixes ValuesAndExpressions::ProhibitInterpolationOfLiterals.
Warned-by: perlcritic
|
|
|
|
This test is useful for all perl code in the project, not just for the
scripts directory. Move it to the top level directory so that we don't
have to do strange things referencing sibling directories and similar.
|
|
|
|
Make sure that no fields are injected before a signed block.
Although the only possible attack is to add fields not present in the
signed block, as otherwise a syntax error due to duplicate field is
triggered.
|
|
Make sure the OpenGPG armor contains a signature block, even on EOF.
This should get detected and rejected by gpgv anyway, but it's better
to check the structure of the message before doing any further parsing
on it.
|
|
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>
|
|
|
|
This new Dpkg::Source::Quilt object handles all the traditional quilt
operations of applying/unapplying patches and the associated handling of
the quilt database (the .pc directory).
This commit should not introduce any user-visible changes.
|
|
Move libfile-fcntllock-perl dependency from dpkg-dev to libdpkg-perl.
|
|
This includes a public function to validate package names.
|
|
Autoconf provides an AC_PROG_MKDIR_P macro defining MKDIR_P which is
called by AM_INIT_AUTOMAKE; the obsolete mkdir_p, currently aliased to
MKDIR_P will disappear with automake 1.13.
|
|
Regression introduced in commit fc372437a25080989c6ab788fe0382ef508739a4.
Signed-off-by: Guillem Jover <guillem@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.
|
|
|
|
Although this is not currently an issue as none of the perl scripts have
spaces after the hashbang, it's still an incorrect expression.
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
|
|
This reverts commit 14d48ef9abc2ce2d394e9ae4d69d4ba68b551620. Given
that Guillem does not want this field and that the technical committee
has not yet decided on the proper approach to enable
build-arch/build-indep, it's safer to revert this change for now and allow
us to proceed with a release.
Conflicts:
man/deb-src-control.5
|
|
data/architecture.mk: variables related to dpkg-architecture
data/buildflags.mk: variables related to dpkg-builflags
data/vendor.mk: variables related to dpkg-vendor
data/default.mk: all of the above
|
|
With this flag set in debian/control, dpkg-buildpackage will use
"debian/rules build-arch" or "debian/rules build-indep" when
appropriate.
Improved-by: Raphaël Hertzog <hertzog@debian.org>
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
|
|
Enable code coverage support with 'configure --enable-coverage'. Use
gcov and lcov for C code coverage, and Devel::Cover and cover for Perl
code coverage.
|
|
|
|
|
|
This allows to have the local targets and be able to use the native
automake targets in the future.
|
|
|
|
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>
|
|
Reflect the rewrite of update-alternatives in commit
cab5af04fadcd939a7becd5fcb25dcfb7bc121dd and the addition of
scripts/t/origin in commit 2d4fd627d4286dc42006fb486040209d4e021b9f.
|
|
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.
|
|
variable
The copy & paste was too quick, I forgot to update the sed expression.
|
|
It is a public interface even if working around known limitations.
|
|
By default _SCRIPTS variables do not distribute the files.
|
|
|
|
|
|
The lib/ location was in order when the feature was proposed as a shell
library, now given it's a shell script it should be in scripts/ with
all the other scripts.
|
|
Forcing the value of compilation flags through environment variables set
by dpkg-buildpackages has not been very successful up to now and suffered
from the fact that calling debian/rules directly could lead to a different
build than what dpkg-buildpackage would have done.
This commit is the start of a new solution: dpkg-buildflags is a tool that
package maintainers are supposed to use in order to retrieve compilation
flags. It offers a way to control their default values at the distribution
level while still allowing customizations by users who recompile the
source packages.
|
|
|
|
The current sed expression was only replacing the first one, which
didn't take into account nested modules.
|
|
|
|
Some distributions already ship their own reimplementation of
update-alternatives, so we allow them to disable our own.
|
|
Put it where install-info is being handled.
|
|
Put it close to the other alternatives file and directory handling.
|