summaryrefslogtreecommitdiff
path: root/lib/libalpm/Makefile.am
Commit message (Collapse)AuthorAge
* Allow replacing libcrypto with libnettle in pacmanFlorian Weigelt2016-10-22
| | | | | | | | | Add a --with-nettle configure option that directs pacman to use the libnettle hashing functions. Only one of the --with-libssl and --with-nettle configure options can be specified. [Allan: rewrote configure check] Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove internal md5 and sha2 implementationsAllan McRae2016-10-10
| | | | | | | | | | | | | | | The internal implementations for md5 and sha256 checksums have not been merged from upstream sources for a long time. Instead of us carrying copies of code from other projects, we should just support building against multiple libraries that provide such functionality. This patch removes the md5 and sha2 code (originally obtained from PolarSSL) from our repository. The configure script will now error unless at least one library supporting checksum generation is present, with the only library currently supported being openssl. It will be relatively simple for other such libraries (e.g. nettle) to be supported if anyone wishes to add them. Signed-off-by: Allan McRae <allan@archlinux.org>
* run hooks during trans_commitAndrew Gregory2015-10-18
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* handle: add hookdirs optionAndrew Gregory2015-10-18
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove ts and sw from vim modeline when noet is setFlorian Pritz2014-01-28
| | | | | | | | | | | | 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>
* Fix build with --disable-gpgmeAllan McRae2014-01-10
| | | | | | | | | The alpm_decode_signature function was made available for frontends to display signature information, but this required libalpm to be build with gpgme support. As that function did not require anything from gpgme, have it build unconditionally. Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove -fgnu89-inline from compile optionsDan McGee2014-01-06
| | | | | | | | | This was a hack done by me in commit d8e88aa0175fd back in 2007 that is no longer necessary, given a sufficiently smart compiler and one that supports the inline keyword. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* inline libarchive compat wrappersDave Reisner2013-02-07
| | | | | | Suggested-by: Dan McGee <dan@archlinux.org> Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* add libarchive compatability objectDave Reisner2013-01-29
| | | | | | | | This allows us to support both libarchive 2.8.x as well as 3.x without deprecation warnings on compile. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Split common utility functions for libalpm and pacmanAllan McRae2013-01-04
| | | | | | | | | | | | 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>
* buildsys: eschew use of DEFS, prefer AM_CPPFLAGSDave Reisner2012-11-27
| | | | | | | This is redundant, and any usage of -D should belong to CPPFLAGS. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Move filelist functions into separate source fileDan McGee2012-08-02
| | | | | | | | | We have a few of these and might as well gather them together. This also cleans up the code a bit by using an enum instead of integer values, as well as makes a "search for file in filelist" function public so frontends can do better than straight linear search of the filelists. Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm: add pkg-config fileDave Reisner2012-04-25
| | | | | | | | No one seems to do this "correctly", but for the sake of having an easy method of detecting the presence and version of libalpm on a given system, we provide a straightforward .pc file. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* buildsys: define warning CFLAGS in separate varDave Reisner2012-04-08
| | | | | | | Continue the trend of not touching the environment CFLAGS, ensuring that the user always has the final say. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* buildsys: cleanup gpgme compile time checkDave Reisner2012-04-08
| | | | | | | | | | | | | | - handle gpgme libs and cflags separately rather than appending to CFLAGS and LDFLAGS - be consistent in AC_LINK_IFELSE check for gpgme 1.3.0 (though this is irrelephant since we don't actually run) - be consistent with usage of "have" and "with" variables (this actually ends up reducing SLOC) - when voluntary detection fails, unset GPGME_CFLAGS and GPGME_LIBS - when requested support fails the version check, complain about the min version. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* buildsys: use pkg-config for libcurl detectionDave Reisner2012-04-08
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* buildsys: use pkg-config for libarchive detectionDave Reisner2012-04-08
| | | | | | This also introduces a versioned dependency of >=2.8.0. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* buildsys: use pkg-config for openssl detectionDave Reisner2012-04-08
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* include config.h via MakefilesDave Reisner2011-12-21
| | | | | | | | | | | | | | | Ensures that config.h is always ordered correctly (first) in the includes. Also means that new source files get this for free without having to remember to add it. We opt for -imacros over -include as its more portable, and the added constraint by -imacros doesn't bother us for config.h. This also touches the HACKING file to remove the explicit mention of config.h as part of the includes. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Add sha2 (sha256) routines from PolarSSLDan McGee2011-08-15
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* lib/rawstr: borrow raw string functions from curlDave Reisner2011-07-05
| | | | | | | We'll need these functions to do locale agnostic and case insensitive string comparisons. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* Allow conditional compilation with GPGMEDan McGee2011-04-27
| | | | | | | | | This makes it possible to omit usage of -lgpgme, just as we can do for -lcurl and -lcrypto. Thanks to Rémy Oudompheng for an initial stab at this. Signed-off-by: Dan McGee <dan@archlinux.org>
* Move graph.h functions into graph.cDan McGee2011-04-15
| | | | | | | | | | | | | So we only need one copy in the final library, not one copy per time used. Ensure all necessary includes are in place (especially to get the right size of off_t each time it is compiled) by including "config.h" in the new graph.c. One small adjustment here makes the graph_free code more robust- ensure we don't have invalid pointers after each iteration by looking at the parents and children and adjusting accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
* buildsys: use libcurl's m4 macro for buildtime detectionDave Reisner2011-03-23
| | | | | Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Integrate GPGME into libalpmDan McGee2011-03-23
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Add base64 algorithms from PolarSSL to libalpmDan McGee2011-03-23
| | | | | | | | We will need these for GPG functionality (decoding the base64 encoded signature stored in the databases). Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add a hash table for holding packagesAllan McRae2011-02-04
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prototype disk space checking functionalityAllan McRae2010-12-12
| | | | | | | | Very basic prototyping for adding functionality to check free disk space before performing package installs. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Separate be_files into be_sync and be_localAllan McRae2010-10-14
| | | | | | | | | | | | | The file be_files.c is "split" to be_local.c and be_sync.c in order to achieve separate handling of sync and local databases. Some basic clean-up of functions that are only of use for local or sync databases has been performed and some rough function renaming in duplicated code has been performed to prevent compilation errors. However, most of the clean-up and final separation of sync and local db handling occurs in following patches. Signed-off-by: Allan McRae <allan@archlinux.org>
* Move the cache stuff where it should beDan McGee2010-10-13
| | | | | | | | Cache bullshit only has relevance to be_files, so move it there. Signed-off-by: Dan McGee <dan@archlinux.org> [Allan: BIG rebase] Signed-off-by: Allan McRae <allan@archlinux.org>
* Use OpenSSL MD5 crypto functions if availableDan McGee2010-09-02
| | | | | | | | | | | | | | | I've noticed my Atom-powered laptop is dog-slow when doing integrity checks on packages, and it turns out our MD5 implementation isn't near as good as that provided by OpenSSL. Using their routines instead provided anywhere from a 1.4x up to a 1.8x performance benefit over our built-in MD5 function. This does not remove the MD5 code from our codebase, but it does enable linking against OpenSSL to get their much faster implementation if it is available on whatever platform you are using. At configure-time, we will default to using it if it is available, but this can be easily changed by using the `--with-openssl` or `--without-openssl` arguments to configure. Signed-off-by: Dan McGee <dan@archlinux.org>
* Move vercmp code into a separate fileDan McGee2010-05-04
| | | | | | | | This will facilitate using this object file on its own in the vercmp tool which will be done in a future commit. The net impact on the generated binaries should not be noticeable after this commit. Signed-off-by: Dan McGee <dan@archlinux.org>
* Refactor pkg_load/parse_descfile into a new backend fileDan McGee2008-05-11
| | | | | | | | | | alpm_pkg_load() and parse_descfile() are specific to getting information from package files, just as other code is specific to getting information into or out of a package database. Move this code out of package.c, which should eventually only contain operators on the pmpkg_t struct that do not depend at all on where the data came from. Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2008-04-15
|\
| * More non-Linux build updates, mostly DarwinDan McGee2008-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Darwin's binary format does support symbols with differing visibilities, but it does not support the protected or internal visibilities- only hidden. For Darwin only, we should fall back to this visibility to prevent warnings from the compiler and because it is close enough for our library purposes. See http://gcc.gnu.org/viewcvs/*checkout*/trunk/gcc/config/darwin.c, search for the "darwin_assemble_visibility" function for more details. Also add pacman.static.exe to gitignore. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix gettext on non-Linux platformsDan McGee2008-04-14
| | | | | | | | | | | | | | | | | | Linux includes all the gettext stuff in glibc, so there is no need for the libintl links which we failed to include in our linker variables. Update the makefiles which should enable NLS support on all platforms, including OS X and Cygwin. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove unnecessary header file, move one macro to util.cDan McGee2008-04-06
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove pmserver_t abstractionDan McGee2008-02-24
| | | | | | | | | | | | | | | | | | | | | | Remove what was a pretty weird abstraction in the libalpm backend. Instead of parsing server URLs as we get them (of which we don't usually use more than a handful anyway), wait until they are actually used, which allows us to store them as a simple string list instead. This allows us to remove a lot of code, and will greatly simplify the continuing refactoring of the download code. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Move download code out of server.cDan McGee2008-02-24
| | | | | | | | | | | | | | | | This is the first in what will be a series of patches to clean up the current download code in libalpm. Start by moving download code out of server.c and into download.c. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Move pmgraph_t struct and functions to their own header fileDan McGee2008-02-16
|/ | | | | | | | This will allow us to utilize this helpful type and functions in places besides dependency calculations. In addition, remove the public declaration of pmgraph_t in alpm.h- there is zero need to expose this internal type. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove provide.c and provide.h .Chantry Xavier2007-11-17
| | | | | | | | | This file only contained one private function : _alpm_db_whatprovides . And the public alpm_db_whatprovides was in db.c , so I moved everything there. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> [Dan: updated POTFILES.in as well] Signed-off-by: Dan McGee <dan@archlinux.org>
* Add some more autoconf macros to filter our CFLAGS usageDan McGee2007-11-04
| | | | | | | | | | | Hopefully these new autoconf macros, with a little magic, will allow us to compile with any compiler and still choose the options we have available to us. Tested locally with gcc 4.2.2 and gcc 3.4.6; the latter doesn't support two of the items we previously had hardcoded in our CFLAGS. Signed-off-by: Dan McGee <dan@archlinux.org>
* Clean up LDADD usageDan McGee2007-10-26
| | | | | | | | We had a lot of unnecessary overstatements of libraries to include on linking, and autoconf/automake takes care of this for us. This also helps some compilation issues on other platforms. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add pmdelta_t structure and functions to libalpm.Nathan Jones2007-10-19
| | | | | Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update usage of gcc __attribute__ flagsDan McGee2007-10-08
| | | | | | | | | | | | Change the default visibility of libalpm functions to internal instead of hidden- this allows for slightly better optimization because it tells GCC that the function can never be called outside of the current module (see http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html). Also added some attributes to the pacman print functions so that they check the format strings being passed to them. Signed-off-by: Dan McGee <dan@archlinux.org>
* Clean up MD5 code.Andrew Fyfe2007-08-16
| | | | | | | | | | | | | | * Move alpm md5 functions to lib/libalpm/util.c * Remove unneeded includes for md5.h * Replace md5 implementation with one from http://www.xyssl.org Dan: clean up XySSL code by removing parts we don't use, and add a note saying what changed. Dan: fix alpm_get_md5sum, off by one error on the malloc call and other small things. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove support for SHA1 from pacman.Andrew Fyfe2007-08-16
| | | | | | | | There's no need for a second hashing algorithm. MD5 serves the purpose of verifying that a package file hasn't been corrupted during download. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove versioncmp.{c,h}, clean up selective #ifdefsDan McGee2007-07-12
| | | | | | | | | Remove versioncmp.c by moving all functions to locations that make sense. Move replacement functions (for building without glibc) into util.c where they belong, and do proper checks for them instead of using __sun__, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
* Move Doxygen manpage generation to doc/ directoryDan McGee2007-07-01
| | | | | | | Instead of doing the doxygen work in the libalpm/ dir, do it with the rest of the docs in the doc/ dir. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove lockfile configuration from frontend, make it job of libalpmDan McGee2007-06-27
| | | | | | | | | | | | I previously introduced some patches to make just about every path in pacman/libalpm configurable; doing this with the lockfile seemed a bit too far and we really should just place the lockfile where it belongs- with the DB that needs locking. More details in this thread: http://archlinux.org/pipermail/pacman-dev/2007-June/008499.html Signed-off-by: Dan McGee <dan@archlinux.org>