Commit Graph

343 Commits

Author SHA1 Message Date
Panu Matilainen dbea7fa32e GCC warning option tweaks
- WTH are we compiling with -Wno-char-subscripts? This appears to have
  been there since the dawn of times, and at least nowadays removing
  it causes no new warnings.
- Re-enable -Wstrict-prototypes, either NSS headers have gotten fixed
  or GCC has gotten smarter and no longer whines about broken
  system headers.
2011-09-01 20:26:13 +03:00
Panu Matilainen b37b4fbd48 Remove support for ancient bzip2 library versions
- bzip2 1.0 is over ten years old by now, anybody still using versions
  older than that get what they deserve...
2011-08-19 10:25:11 +03:00
Panu Matilainen 4b7e6cb79f zlib is mandatory, fail at configure if missing + remove conditionals
- Unlike bz2 and xz/lz, zlib compression is not tracked by any rpmlib
  feature and is part of the original package format really, zlib
  simply must be always present.
2011-07-08 10:31:34 +03:00
Panu Matilainen 5cd1e56cd2 Enable GLOB_ONLYDIR of the bundled glob() on platforms that support it 2011-06-28 08:37:41 +03:00
Ville Skyttä e254f9b9d4 Add lrzip support.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2011-04-29 08:49:05 +03:00
Ville Skyttä bcad08867d Add lzip support.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2011-04-29 08:48:56 +03:00
Panu Matilainen a81d933cc3 Only enable test-suite if fakechroot is available 2011-04-04 14:31:17 +03:00
Panu Matilainen f825911b73 Use pkg-config to find Lua + determine flags (ticket #88)
- Additionally clean up the logic a bit and dont bother building
  any lua-related bits if disabled
2011-03-28 12:54:42 +03:00
Panu Matilainen 2a8d036697 Push platform config out of main rpm macros file
- canon arch & color stuff is now calculated per each known arch in
  installplatform, and just a single place where arch name mangling
  is done
2011-03-25 14:48:49 +02:00
Panu Matilainen 2b6486a69b Replace distro/vendor autodetection with a configure switch
- it's not rpm's job, not is it possible for rpm to know about
  distribution/vendor names and preferences
- use build_vendor as the canonical vendor (affecting %{_vendor} default
  and macro + rpmrc paths) unless overridden by --with-vendor=name
2011-03-25 11:25:47 +02:00
Florian Festi a0d04112c0 Move find-provides and find-requires link to autodeps/
Implement link reaction with less copied code
2011-03-25 10:10:52 +01:00
Jindrich Novy b159519d9d Remove checks of unused things from configure.ac 2011-03-23 13:37:44 +01:00
Jindrich Novy b03685d320 Don't use mtrace(3), muntrace(3) and don't check for mcheck.h
- valgrind is good for these things without touching the code
2011-03-23 12:37:25 +01:00
Jindrich Novy c61391e647 Remove libio support to suppress timedRead() 2011-03-23 11:25:06 +01:00
Panu Matilainen 16aea81dc7 Preliminary distutils support for the python bindings
- Steps towards separating rpm-python from the main rpm tarball even
  though developed within the rpm repository.
- Having the bindings in a separate tarball makes it simpler to build
  them for different python versions, notably python 3 (RhBug:531543)
2011-03-09 15:37:07 +02:00
Panu Matilainen 584b9d4f5a Make peace with autoconf-2.68 2011-03-04 18:34:01 +02:00
Panu Matilainen 454859f3cb Only sepolicy-plugin needs linking to libsemanage 2010-12-22 14:58:11 +02:00
Panu Matilainen 4a3d7f2c73 Bump HEAD version at branch-point 2010-12-03 14:11:48 +02:00
Panu Matilainen 71c8f49ca4 Fix BDB version check in configure to work with >= 5 too 2010-10-26 11:54:55 +03:00
Panu Matilainen 9f2c1bd909 Move librpmsign to its own subdirectory in the sources 2010-10-22 15:00:49 +03:00
Panu Matilainen a4adf99b0f Add configure switch to disable plugins build
- For now this is really just to allow building statically while
  hacking, for "real world" use this has implications on collections
  support etc which is not handled by this patch.
2010-10-01 10:43:55 +03:00
Panu Matilainen 8b4ccff2e3 Handle enable/disable python to configure.ac more sanely
- Conditionalize the python subdir on toplevel make instead of
  python subdir makefile.
2010-10-01 10:34:36 +03:00
Steve Lawrence 46cdd1b507 Add SELinux policy plugin
This adds a new plugin specifically for a collection to load SELinux
policy. This implements the post_add and pre_remove plugin hooks. The
only time anything happens during the pre_remove hook is if post_add was
not called (i.e.  if the transaction only removes policies).

This plugin extracts all the policy information from packages in the
sepolicy collection during the open te hook. It then determines which
policies should be installed/removed based on if the package is being
installed/removed and the type of the policy and the system policy. It
then executes semodule (or uses libsemanage if semodule cannot be
executed or installing in a chroot) to remove and install the necessary
policies. It then reloads the selinux state, reloads the file contexts,
and if necessary, relabels the file system.
2010-09-01 09:31:03 +03:00
Steve Lawrence 34b5d67c2d Use selabel interfaces instead of matchpathcon
This replaces the old matchpathcon interfaces with the new selabel
interfaces for relabeling files, storing an selabel handle in the
transaction set.

With this change, also comes an added distinction between --nocontexts
being specified and a failure to read the load file contexts.
Previously, there was no distinction, and both cases used the
RPMTRANS_FLAG_NOCONTEXTS flag.

However, with the new policy plugin, it is necessary to make such a
distinction. This is because matchpathcon_init (now selabel interfaces)
can fail at the beginning of the transaction, but succeed later after
new policy is installed. Because of this, we may need to enable/disable
RPMTRANS_FLAG_NOCONTEXTS multiple times. However, because this flag
could also mean --nocontexts, we cannot do that. By storing the selabel
handle in the rpmts, we can easily keep track if the handle has been
successfully created, rather than overloading RPMTRANS_FLAG_NOCONTEXTS
with two meanings.
2010-09-01 09:30:51 +03:00
Panu Matilainen b6adef396b Add configure.ac check for need to -ldl
- without this the build can barf on unresolved dl* symbols with a
  linker defaulting to --no-add-needed
2010-06-23 15:59:49 +03:00
Steve Lawrence f3bcf9a18c Add a generic plugin for use by simple Collections
This patch adds a generic plugin, exec.so, that should be sufficient for the
majority of Collection actions. After all packages in a Collection have been
installed/removed, this plugin executes the arguments by calling system(3),
allowing for a very generic and powerful method to perform many actions.

This also adds two sample macros as examples of the format, using the exec.so
plugin.
2010-06-22 11:12:43 +03:00
Panu Matilainen 72a472bdcd Require BDB >= 4.5 for sanity's sake
- replace unused feature tests in configure.ac with a simple version check
2010-04-08 12:33:19 +03:00
Panu Matilainen 9791cf2ab5 Lose shmkey + shared BDB config options
- we dont want anything to do with System V IPC, really... BDB uses
  file backed mmap when it needs, this suits us just fine
2010-03-31 01:59:27 +03:00
Panu Matilainen 8c7e53ec80 First take at pluggable file attribute + dependency extraction system
- move most of the hardwired classification logic from rpmfc C-code
  to macro-based configuration, supporting drop-in addition of arbitrary
  new attributes + dependency extractors based on regex matching of
  libmagic file types and paths
- just the initial rough conversion of our built-in dependency types,
  various open questions + todo-items remain, plus likely fair amount
  of more-or-less subtle breakage
2010-03-23 16:32:46 +02:00
Panu Matilainen 87c237bebf Split elf dependency extraction out of librpmbuild to external helper
- Elf dependency extraction code code lifted from rpmfcELF() and refactored
  to saner pieces. Having it in separate executable also frees librpmbuild
  of libelf dependency, clean up the unnecessary linkage etc from
  autofoo
- This lets internal dependency generator for elf files be
  overridden without losing file coloring (which is required for
  correct multilib handling). It also permits non-native elf files
  (eg when cross-building) to be handled by providing a custom
  elf dependency helper
- On the flip side, this inevitably slows down builds somewhat as
  two fork-exec's are needed for every elf file, but unlike invoking
  something like the python interpreter, this is a slim helper...
- All dependency extractors of the internal dependency generator are now
  external helpers (how twisted is that, huh? :) and thus can be customized
  and filtered through %__foo_provides|requires macros
2010-02-10 11:20:51 +02:00
Panu Matilainen a5dbbd4065 Remove unused mntctl & mount related header checks 2010-02-05 17:09:16 +02:00
Florian Festi 51c96db046 Kill RPMTAG_FSNAMES and RPMTAG_FSSIZES and everything implementing them 2010-02-03 16:27:00 +01:00
Panu Matilainen a9483191a5 Bump version to appear newer than 4.8.0, update translations too 2010-01-08 12:23:54 +02:00
Panu Matilainen dab8a648db Loose string header compatibility goo
- <string.h> is required by C standard, we dont support ancient
  non-conformant compilers anyway
2010-01-05 15:09:08 +02:00
Panu Matilainen 53ab541984 Remove unnecessary NLS definitions from system.h
- all uses of dgettext() and friends are already protected by
  appropriate ifdef's, no need to provide dummy defines here
- setlocale() and <locale.h> are required by C89, C99 and POSIX .. assume
  its there and if not, one can disable the whole thing with --disable-nls
2010-01-05 14:29:48 +02:00
Panu Matilainen 2c6120755c Unconditionally include <sys/wait.h> where needed
- no point conditionalizing what we cant live without
2010-01-05 12:35:54 +02:00
Panu Matilainen 5085ae9923 Move sys/mman.h include out of system.h to the places that care
- just two places where needed, dont pollute system.h needlessly
- include depending on HAVE_MMAP instead of separately checking for
  sys/mman.h, if sys/mman.h doesn't exist or is broken HAVE_MMAP wont be set
2010-01-05 12:16:52 +02:00
Panu Matilainen cd174374ff Remove unnecessary and broken time.h related configure + system.h checks
- the AC_HEADER_TIME check is unnecessary for any remotely recent systems,
  and the HAVE_SYS_TIME_H conditional in system.h is just broken as we
  dont even check for <sys/time.h> header in configure
- dont include from system.h, the time.h and sys/time.h get already
  included through our public headers where necessary
2010-01-05 11:37:59 +02:00
Panu Matilainen 5c084f842a Unconditionally include <netdb.h> where needed instead of system.h
- there's no fallback for missing netdb.h so there's little point
  conditionalizing it
- avoid yet more system.h pollution
2010-01-05 11:26:14 +02:00
Panu Matilainen e9df6383be Remove pointless & unused configure checks
- vprintf(), vsnprintf() and snprintf() are in C99, no point checking
  especially as we dont have fallbacks for them
- no point testing for inline capability as we dont try to work around
2010-01-05 10:56:56 +02:00
Panu Matilainen 0edc291e50 Sanitize signature checking formatResult() a bit
- whole lotta unnecessary wankery here (what have I been thinking)
- avoid using the non-standard strndup(), we checked for it in configure
  but didn't provide an alternative so checking was just bogus
2010-01-05 10:45:23 +02:00
Panu Matilainen 423a86361b Oops, ftok() is really optional 2010-01-05 10:19:52 +02:00
Panu Matilainen 834551d246 Clean up poll() vs select() tests
- move the includes out of system.h, not commonly needed
- <poll.h> is conditional as we actually provide a fallback through select(),
  but for <sys/select.h> missing there's no fallback so doesn't make
  much sense to test for (and both poll.h and sys/select.h are posix anyway...)
2010-01-04 17:15:26 +02:00
Panu Matilainen 554f3f0cfb Remove unused header checks from configure
- maybe these have been used at some point but not anymore...
2010-01-04 16:59:39 +02:00
Panu Matilainen 1da827724c Eliminate unused id -u tests
- this was used by _fixowner and _fixgroup macros back in the day but they
  no longer exist as they're unusable without building as root
2010-01-04 16:31:10 +02:00
Panu Matilainen 4cb02aa928 Re-enable mmap test in configure & fix the code build again
- this stuff has been disabled for years, lets see what breaks...
2010-01-04 16:20:56 +02:00
Panu Matilainen 8dd92d661d Remove unnecessary stdint check from configure
- a leftover from pre-C99 requirement times
2010-01-04 16:10:44 +02:00
Panu Matilainen 190d2b4783 Remove S_IFSOCK and S_IFLNK kludgery for ancient unixes
- these are specified by POSIX 2001, it's not really rpm's job to
  provide them if the system doesn't
2010-01-04 16:07:11 +02:00
Panu Matilainen 5f0c9a3882 Require lchown() and remove ancient broken chown kludgery
- lchown() is POSIX 2001, we dont care about older / nonconformant stuff
2010-01-04 15:58:55 +02:00
Panu Matilainen 8ca9ce53be Check for our POSIX 2001 requirements and abort if not found 2010-01-04 15:27:31 +02:00