Commit Graph

331 Commits

Author SHA1 Message Date
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
Panu Matilainen 3125bac65f Lose the hysterical fakefork hack
- we're not particularly interested in AmigaOS quirks from 1996
2010-01-04 15:27:25 +02:00
Panu Matilainen 33404070cd Remove further replacement functions for POSIX 2001 required bits
- getwd(), getcwd(), basename() and realpath() are all POSIX 2001
  defined, we dont care about older stuff
2010-01-04 15:27:05 +02:00
Panu Matilainen bb803d630c Remove unnecessary setenv() replacement function
- setenv() and unsetenv() are required by POSIX 2001, we dont care about
  older systems
2010-01-04 14:21:42 +02:00
Panu Matilainen 580f9625e1 Remove largely unnecessary putenv() replacement
- only the lua posix extension "uses" this by providing putenv()
  to Lua, make it conditional and return error if not supported by
  the underlying operating system
2010-01-04 14:15:20 +02:00
Panu Matilainen 60dc809db1 Eliminate myrealloc() replacement function
- realloc(NULL, size) is defined as equal to malloc(size) in C99 and
  POSIX 2001, we dont care about anything older than that
2010-01-04 13:46:43 +02:00
Panu Matilainen 7c62eb237f Remove replacements for C99 mandated functions
- rpm requires C99 compiler anyway, no point in carrying these around
2009-12-23 14:52:49 +02:00
Panu Matilainen 2753a5e934 Dont include <pwd.h> from system.h, dont bother checking for it either
- no much point conditionalizing something we can't live without
- just three places need, no point polluting include space everywhere
2009-12-23 13:40:10 +02:00
Panu Matilainen 68a5dd5803 Dont bother including <sys/socket.h>, we dont use anything from there 2009-12-23 13:36:29 +02:00
Panu Matilainen a39dc445fc Dont include grp.h from system.h, dont bother checking in configure either
- no much point conditionalizing something we can't live without
- just two places need, no point polluting include space everywhere
2009-12-23 13:15:59 +02:00
Panu Matilainen 0fbf88d34c Dont bother checking and including a header we dont use or need 2009-12-23 12:58:17 +02:00
Panu Matilainen c47b96630c Dont bother checking for a header we dont use 2009-12-23 12:37:37 +02:00
Panu Matilainen 5c31864598 Dont bother checking for functions we dont use
- some of this stuff was used in 4.4.x but not anymore
- additionally we dont even use getdomainnname(), check for gethostname()
  instead
2009-12-23 12:25:32 +02:00