summaryrefslogtreecommitdiff
path: root/scripts/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
2013-07-26Dpkg::Control::Fields: Detangle Dpkg::VendorGuillem Jover1-0/+2
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
2013-07-18Dpkg::Util: Add new moduleGuillem Jover1-0/+2
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.
2013-06-22Dpkg::Source::Package: Capitalize variant module namesGuillem Jover1-5/+5
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.
2013-06-22Dpkg: Deprecate lowercase exported by default variablesGuillem Jover1-4/+4
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.
2013-06-21scripts: Use a new Dpkg::CONFDIR variable instead of literal stringsGuillem Jover1-0/+1
This will make life easier for downstreams using different paths. Allow overriding pkgconfdir at configure time.
2013-05-04Do not use double-quotes on strings that do not need interpolationGuillem Jover1-4/+4
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
2013-04-23Dpkg::Arch: Add new test suiteGuillem Jover1-0/+1
2013-04-19build: Move generic perl test to the top level directoryGuillem Jover1-1/+0
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.
2013-04-19build: Set a default TEST_VERBOSE to 0Guillem Jover1-1/+0
2013-03-18Dpkg::Control::Hash: Do not accept Armor Header Lines inside a paragraphGuillem Jover1-0/+1
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.
2013-03-18Dpkg::Control::Hash: Check for presence of OpenPGP signaturesGuillem Jover1-0/+1
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.
2013-03-18Dpkg: Fix OpenPGP armored signature parsingGuillem Jover1-0/+5
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>
2012-06-30Dpkg::BuildEnv: New module to track build environment variablesGuillem Jover1-0/+1
2012-06-29Extract Dpkg::Source::Quilt out of Dpkg::Source::Package::V3::quiltRaphaël Hertzog1-0/+1
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.
2012-06-06Dpkg::File: Refactor file locking logic into this new moduleGuillem Jover1-0/+1
Move libfile-fcntllock-perl dependency from dpkg-dev to libdpkg-perl.
2012-05-23Dpkg::Package: Add new perl moduleGuillem Jover1-0/+2
This includes a public function to validate package names.
2012-05-04build: Use MKDIR_P instead of obsolete mkdir_pGuillem Jover1-3/+3
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.
2012-01-31build: Add missing files to test_data variableCyril Brulebois1-0/+4
Regression introduced in commit fc372437a25080989c6ab788fe0382ef508739a4. Signed-off-by: Guillem Jover <guillem@debian.org>
2011-12-13build: Reintroduce objdump pattern and tag test case data filesGuillem Jover1-21/+27
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>
2011-12-13build: Unroll shared library building for objdump testsGuillem Jover1-2/+10
2011-12-13build: Do not normalize library name for symbol file testsGuillem Jover1-4/+2
2011-12-13scripts: Move single space objdump test case into a new data fileGuillem Jover1-0/+1
This will allow to regenerate the objdump.ls file.
2011-10-13build: Use the detected pod2man instead of hardcoding the program nameGuillem Jover1-1/+1
2011-10-13build: Add missing square brackets on character class in sed expressionAnders F Björklund1-1/+1
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>
2011-09-18build: Ignore perl test programs for coverage reportGuillem Jover1-1/+3
2011-08-01Revert "dpkg-buildpackage: support for Build-Features: build-arch"Raphaël Hertzog1-1/+0
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
2011-07-22dpkg-dev: add some common makefile snippets for use in rules filesRaphaël Hertzog1-1/+1
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
2011-06-06dpkg-buildpackage: support for Build-Features: build-archBill Allombert1-0/+1
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>
2010-07-11build: Add optional code coverage supportGuillem Jover1-1/+8
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.
2010-07-11build: Move dpkg_divert test case from scripts to srcGuillem Jover1-2/+1
2010-07-11build: Refactor perl test-suite support into a new Makecheck.am fileGuillem Jover1-14/+8
2010-07-11build: Rename overriding check targets to check-localGuillem Jover1-1/+1
This allows to have the local targets and be able to use the native automake targets in the future.
2010-07-03dpkg-divert: Rewrite in CGuillem Jover1-2/+0
2010-07-03dpkg-divert: Add new test-caseMikhail Gusarov1-1/+2
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>
2010-06-15Fix ”make distcheck“ errorsSven Joachim1-2/+4
Reflect the rewrite of update-alternatives in commit cab5af04fadcd939a7becd5fcb25dcfb7bc121dd and the addition of scripts/t/origin in commit 2d4fd627d4286dc42006fb486040209d4e021b9f.
2010-06-09update-alternatives: rewritten in CRaphaël Hertzog1-12/+0
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.
2010-05-21Add tests for Ubuntu changelog parsingColin Watson1-0/+2
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.
2010-05-17Makefile.am: fix do_shell_subst to update a shell variable instead of a perl ↵Raphaël Hertzog1-1/+1
variable The copy & paste was too quick, I forgot to update the sed expression.
2010-05-17Rename /usr/lib/dpkg/maintscript-helper in /usr/bin/dpkg-maintscript-helperRaphaël Hertzog1-2/+9
It is a public interface even if working around known limitations.
2010-04-21build: Distribute maintscript-helperGuillem Jover1-1/+1
By default _SCRIPTS variables do not distribute the files.
2010-04-19dpkg-mergechangelogs: add non-regression testsRaphaël Hertzog1-2/+10
2010-04-19dpkg-mergechangelogs: new script doing 3-way merge of Debian changelogsRaphaël Hertzog1-0/+2
2010-04-18Move maintscript-helper from lib/ to scripts/Raphaël Hertzog1-0/+2
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.
2010-04-11dpkg-buildflags: new script to retrieve compilation flags during package buildRaphaël Hertzog1-0/+2
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.
2010-04-11Dpkg::BuildFlags: new module to query/manage build flagsRaphaël Hertzog1-0/+1
2010-03-12build: Replace all / with :: on perl module man pages filenamesGuillem Jover1-1/+1
The current sed expression was only replacing the first one, which didn't take into account nested modules.
2010-02-26Generate manual pages for perl modules with pod2manRaphaël Hertzog1-1/+24
2010-02-25build: Add new --without-update-alternativesGuillem Jover1-2/+7
Some distributions already ship their own reimplementation of update-alternatives, so we allow them to disable our own.
2010-02-25build: Move <sbindir>/install-info uninstallation to utils/Guillem Jover1-1/+0
Put it where install-info is being handled.
2010-02-25build: Move <admindir>/alternatives directory creation to scripts/Guillem Jover1-0/+1
Put it close to the other alternatives file and directory handling.