Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/Makefile.am
AgeCommit message (Collapse)Author
2019-10-04autotools: distribute meson filesEli Schwartz
If we use make dist to create the official, signed release tarballs, those will not have meson build files by default since autotools doesn't know what they are. Also distribute all src/common/ files. We never strictly needed any of them to be distributed with autotools, because the dist tarball dereferences the symlinks (???), but only some of them were being distributed, and meson needs them to be in the right location as we only build libcommon from the primary files. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04allow tests for disabled features to be skippedAndrew Gregory
Previously, pacman's test suite would fail when compiled without signature support. Adds a require_capability method to pmtest objects. Currently recognized values are 'gpg', 'curl', and 'nls'; although only gpg is used presently. Missing features are indicated by running pactest with one of the --without-<feature> options. This modifies pmenv to run each case as independent tests. Previously, a single pmenv could run multiple tests, combining there output into a single TAP stream but making it impossible to properly skip an entire test case. This change does not affect running pactest.py with a single test (as both autotools and meson do), but will affect anybody manually running pactest.py with multiple tests at once. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-12-04Make `make distcheck` work when bash-completion is installed.Eli Schwartz
bash-completion uses pkg-config to determine the best installation directory, but this does not take --prefix into account (although it works fine with DESTDIR). The fallback value does attempt to set this based on --prefix. The distcheck uses --prefix, though, which means when attempting to install the results and bash-completion support for pkg-config was detected, it errors out on trying to write to, usually, /usr/share. Tell distcheck to use the prefix-based fallback location instead, as the PKG_CHECK_* override. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-14Remove all modelines from the projectEli Schwartz
Many of these are pointless (e.g. there is no need to explicitly turn on spellchecking and language dictionaries for the manpages by default). The only useful modelines are the ones enforcing the project coding standards for indentation style (and "maybe" filetype/syntax, but everything except the asciidoc manpages and makepkg.conf is already autodetected), and indent style can be applied more easily with .editorconfig Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-12-05Remove pacsortAllan McRae
Moved to the pacman-contrib project Signed-off-by: Allan McRae <allan@archlinux.org>
2016-10-22makepkg: Move parseopts from library to libmakepkgAlad Wenter
parseopts is used in makepkg and other scripts such as pacman-key as a getopt replacement. Instead of including it in those scripts via a macro, move it to libmakepkg/util/parseopts.sh and have scripts source this file where appropriate. To keep the parseopts test, a new variable was introduced: PM_LIBMAKEPKG_DIR Signed-off-by: Alad Wenter <alad@archlinux.info> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-10-10Remove contribAllan McRae
The contrib directory takes too much of the pacman developer's limited time, which could be better spent developing and reviewing patches for the primary projects. The community can pick this up in a separate repository if wanted. Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-29Create makepkg-template and system hook directories upon installAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-12Merge branch 'maint'Allan McRae
2015-02-12sync200.py.in: remove unused substitutionAndrew Gregory
LIBCURL was never set in the Makefile so XferCommand was always being set in the test file. This removes the only substitution in our test files which will prevent the TESTS file from being rebuilt every time configure is run. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01Add make rule to update copyright yearsAllan McRae
Usage: make update-copyright OLD=2014 NEW=2015 Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-11Add testrunner for makepkg-templateFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-12-28use tap.sh for bash testsAndrew Gregory
tap.sh is a reusable TAP library that handles test counting and provides useful diagnostic messages on test failures. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-13add pacman-db-upgrade testAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-13pmtest: allow tests to specify test binaryAndrew Gregory
Adds a cmd property to tests (defaults to pacman) which is resolved using directories specified with --bindir (defaults to PATH). The ability to manually specify a particular binary is preserved in order to allow running individual tests with differently named binaries such as lt-pacman. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-02-02Remove ChangeLog.proto and move important info to PKGBUILD(5)Jason St. John
The change log prototype should be distribution determined. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-02-02Add PKGBUILD-vcs.protoMaxime Gauduin
This PKGBUILD proto covers the newly introduced VCS capabilities of pacman. It serves as a replacement for the current bzr, git, hg and svn protos found in ABS. Signed-off-by: Maxime Gauduin <alucryd@gmail.com> [Allan: add to Makefile.am] Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-28Remove ts and sw from vim modeline when noet is setFlorian Pritz
Forcing vim users to view files with a tabstop of 2 seems really unnecessary when noet is set. I find it much easier to read code with ts=4 and I dislike having to override the modeline by hand. Command run: find . -type f -exec sed -i '/vim.* noet/s# ts=2 sw=2##' {} + Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-10Makefile.am: move test-suite.log into test/Andrew Gregory
Pushing down the testing .gitignore entries in commit e25afaf6 exposed test-suite.log in the root. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-21Use the 'configure'd PYTHON to run pactest.Jeremy Heiner
Use the 'configure'd PYTHON to run pactest instead of the one hard-coded (with '#!') in pactest.py. Also remove useless '#!' from non-main .py files. Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Makefile.am: fix typo in LOG_DRIVER variableAndrew Gregory
Self-executing tests were not being run through the tap log driver. This caused `make check` to ignore discrepancies between the expected number of tests and the actual number of tests. Also, fix some uncommented output from test scripts that could confuse TAP parsers. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Makefile.am: remove old targets from .PHONYAndrew Gregory
These targets were part of the old test suite and no longer exist. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-10-14Add make target for TESTSAndrew Gregory
This causes make to update TESTS when tests are added (or updated). For simplicity, this changes TESTS from a single multi-line list to individually appending each test file. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> [Allan: use C locale for sorting] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-19Fix make distcheckAndrew Gregory
* set util binary paths relative to top_builddir * set pactest.py path relative to top_srcdir * include tap.py in check_SCRIPTS Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21integrate tests with automakeAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21pactest: accept test names without a switchAndrew Gregory
This removes the --test switch, making it easier to call pactest from a test harness. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-29pmtest: set LC_ALL=C in subprocess.callAndrew Gregory
LC_ALL=C is required to force pacman's output to English for tests that rely on that output, but setting it in Makefile.am results in those tests breaking under different locales when pactest.py is run directly. This will also ease an eventual transition to python3 which LC_ALL=C causes to default to ascii encoded strings, creating problems for tests with unicode strings. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-09Quieten the build process some moreAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28Make path to ldconfig configurableAllan McRae
The FHS (2.3) says having ldconfig in /sbin is optional and it is usually located in /usr/sbin. So /sbin/ldconfig should not be hard coded in pacman. Instead, provide a configure option --with-ldconfig that defaults to the current path. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28pactest: handle non-default scriptlet shellsAllan McRae
pacman can be configured to use a different shell than /bin/sh for scriplets. Pass the cnfigured value to the pactest suite and make the necessary "copy" of the shell in the test root. Also update all copyright years in the pactest suite. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28Revert execvp and related commitsAllan McRae
This reverts commit 4a8c2852a887d2b1aaa43be3071ab586eb24b9e3. This reverts commit 993700bc6b12cd291544d2a22845f480e8a7925e. This reverts commit bb4d2b72c1d35ab9d65d632be0dcaf00cfa7d600. This reverts commit 60b192e3836a150eb6950ce52241efebbee00f11. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-17pmtest: resolve path to scriptlet shellAllan McRae
In order to support a variety of values for the --with-scriptlet-shell configure flag, pmtest has to be aware of what kind of path was passed, be it an absolute path or a fragment for a path lookup. For absolute paths, leave the path alone. For fragments, search the PATH environment var for the resolved path to the binary. In both cases, join the resultant path to the root directory defined for the test, not a pre-determined bin directory. Fixes FS#31552. With-contribution-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-04Split common utility functions for libalpm and pacmanAllan McRae
There is duplicated code in the util.c files in the libalpm and pacman source code. Split this into a separate file so that it can be shared via a symlink. This prevents code divergence between the two code bases. Also, move mbasename and mdirname from pacman/util.c into util-common.c in preparation for the following patch that uses them to add an extension to pacsave files. Signed-off-by: Allan McRae <allan@archlinux.org>
2012-06-25scripts/library: add human_to_sizeDave Reisner
This is a bash wrapper around an awk function that parses human readable sizes and returns their representative values in bytes, as a string. A small test harness is added to validate the functionality. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-24Split check steps in Makefile into multiple targetsDan McGee
This allows a `make -j4 check` invocation to actually run in parallel, even though 95% of our test suite time is currently dominated by pactest. It also allows running something like `make test-vercmp`. Also, add some targets to the .PHONY list that belong in it. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-24scripts/library: introduce parseoptsDave Reisner
This will replace our current options parser used in pacman-key, makepkg, and ideally elsewhere. It follows heuristics closer to that of GNU getopt long (and thus pacman itself), with the exception that it does not allow for options with optional arguments. Due to the way this parser will be used, this sort of functionality will not be needed. Instead of relying on eval+set, options are normalized into an array, OPTRET, which callers should expect to be populated after returning from parseopts. This avoids problems with quotes and spaces in arguments, assuming that the user quotes properly when passing into the application. A new test harness for parseopts is added in test/scripts. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-23Makefile.am: Extract "contrib/" into DIST_SUBDIRSLukas Fleischer
This implies following changes: * contrib scripts can be built and installed easily by running make(1) in "contrib/". This removes the need to pick all contrib scripts manually when packaging pacman-contrib. * contrib scripts will no longer be built when running make(1) in the top level source directory. This seems like the most natural approach. We install those separately and should act the same when building stuff. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-05Add a top-level 'update-po' make targetDan McGee
This makes the maintainer's life (read: my life) a lot easier when updating translation files to push to Transifex. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29Run pacman test-suite with LC_ALL=CAllan McRae
Running the pacman test-suite in a non-English locale results in a few failures. Force the test-suite to run with LC_ALL=C. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-08Add a test harness for new pacsort commandDan McGee
Note that this is meant to exercise pacsort more than the underlying version comparsion; that is better left to the standalone vercmptest.sh test script. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30move proto files to new subdirectory, proto/Dave Reisner
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-23po/: split into scripts/po/ and src/pacman/po/Dan McGee
This is the first step at separating the pacman message catalog and the scripts message catalog. Makefiles, configure.ac, and other such files are adjusted accordingly, as well as renaming files. The TEXTDOMAIN of scripts is also adjusted. Note that no actual pot or po files get changed here; these will get pruned in a future commit so each catalog contains only the necessary messages. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05pactest: run with root in /tmp and clean up automaticallyDan McGee
This moves the generated root/ directory into /tmp, or at least a path returned by tempfile.mkdtemp(), by default. This can make test runs significantly faster if done when /tmp is a tmpfs. If you are debugging a failed test, use the new --keep-root option to not clean up and pactest will print the location of the generated root/ test directory. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-23Update build system (automake, autoconf, libtool)Dan McGee
Unfortunately this patch is hard to split up into smaller chunks. Our build system and the associated automake/autoconf/libtool macros has been left untouched for a while, and could use a refresher. * Upgrade ltmain.sh to the latest version * Move away from a huge acinclude.m4 directory to using individual files in the m4/ subdirectory, suggested by upstream automake documentation * Update all macros to their latest available version * Adjust Makefile.am and autogen.sh to accommodate m4/ subdirectory Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-16Add test/util directory as necessary to build filesDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-02Move vercmp tests into util/ testing directoryDan McGee
Now that not everything is in 'pactest/', we can separate out the parts a bit more and leave the pacman/ directory to be just pactest. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-02Move pacman test suiteAllan McRae
Move the test suite to test/pacman in order to make a logical location for a future makepkg test suite. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-16makepkg: Add PKGBUILD-split.protoAllan McRae
Prototype PKGBUILD for package splitting in makepkg Signed-off-by: Allan McRae <allan@archlinux.org>
2008-10-12Attempt to idiot-proof making and refreshing docsDan McGee
I mess this up more often than not, and maybe this will do the trick. Remove the --enable-asciidoc option as it has been superseded by the --disable-doc option in usefulness. If you want to skip building docs, you skip building all docs which is much easier when it comes to ensuring the make 'dist' and 'distcheck' targets will always build the manpages and always build the most up to date manpages. Developers shouldn't be affected in their normal builds, nor should end users of the source tarball. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-29Add simple vercmp test scriptDan McGee
Commit 84283672853350a84d2a71b72dc06e180cad1587 updated the versioncmp code in libalpm. Unfortunately for us, it also introduced the regression that becomes apparant with the following upgrade: warning: sonata: local (1.5-2) is newer than extra (1.5.1-2) Add a vercmptest.sh test script that is run during the make check phase which now points out three regressions in the version comparison function that will need fixing. All current tests in this script pass with the old versioncmp code. Signed-off-by: Dan McGee <dan@archlinux.org>