Ville Skyttä [Sat, 13 Feb 2010 09:52:38 +0000 (11:52 +0200)]
Extract dependencies from some usual syntaxes of "use base qw(Foo)".
Ville Skyttä [Sat, 13 Feb 2010 09:04:17 +0000 (11:04 +0200)]
Trivial perl.req cleanups.
Drop dead code, comment fixes, weed out duplicate dependencies to perl
(done by rpm itself anyway, but does not hurt to do it already on this
level for cleaner results when testing).
Ville Skyttä [Wed, 10 Feb 2010 19:58:43 +0000 (21:58 +0200)]
Emit dependencies only to interpreters with absolute paths.
Ville Skyttä [Wed, 10 Feb 2010 19:56:33 +0000 (21:56 +0200)]
Allow whitespace between #! and the interpreter.
Ville Skyttä [Wed, 3 Feb 2010 21:15:31 +0000 (23:15 +0200)]
Avoid some unnecessary command invocations in scripts.
Ville Skyttä [Wed, 3 Feb 2010 21:14:27 +0000 (23:14 +0200)]
Avoid some stat() calls.
Ville Skyttä [Wed, 3 Feb 2010 21:13:07 +0000 (23:13 +0200)]
Fix reversed logic in getSystemBundles().
Panu Matilainen [Wed, 10 Feb 2010 09:12:54 +0000 (11:12 +0200)]
Permit requires extraction too from fontconfig and desktop files
- presently unused but...
Panu Matilainen [Wed, 10 Feb 2010 08:52:40 +0000 (10:52 +0200)]
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
Panu Matilainen [Wed, 10 Feb 2010 09:19:49 +0000 (11:19 +0200)]
Separate helper for script interpreters, split out of librpmbuild
- permit overriding/customization of script interepreter dependencies
- unlike the C-version, the interpreter.req only looks at the first line
for shebang: libmagic only looks at the first line too, so anything
else will never get classified as scripts in the first place
Panu Matilainen [Wed, 10 Feb 2010 07:24:21 +0000 (09:24 +0200)]
Make rpmfcSCRIPT() a bit easier on the eyes...
Panu Matilainen [Tue, 9 Feb 2010 09:35:47 +0000 (11:35 +0200)]
Move rpmVersionCompare() into a more logical place
- it has nothing to do with psm so no point having it there
Panu Matilainen [Tue, 9 Feb 2010 09:21:29 +0000 (11:21 +0200)]
Unify scriptlet execution calling conventions and error handling
- Split external scriptlet execution to separate function, called
identically with internal (ie lua) scriptlet run
- runScript() is now just a dispatcher which calls the lower level script
runner and decides whether the scriptlet failure is fatal or not.
- Only %prein and %preun scriptlet failures are considered fatal
regardless of the type of failure, as they prevent the install/erase
from taking place at all. Other failures might or might not be fatal
in terms of package functionality but rpm has no way of knowing whether
that is the case, so we only report what we know for a fact:
either the package was installed/erased or not, and either it had
scriptlet failures (for which callbacks are issued) or it didn't.
Panu Matilainen [Tue, 9 Feb 2010 08:17:19 +0000 (10:17 +0200)]
Lose unused stillborn psm threading stuff (didn't I already do this?)
Panu Matilainen [Tue, 9 Feb 2010 08:01:40 +0000 (10:01 +0200)]
Use a more reasonable type for rpmteHeaderSize()
- Headers must always fit into memory which is not true of rpm_loff_t,
and the real size is arbitrarily capped far below even that limit.
headerSizeof() uses unsigned int here, just use that...
- Doesn't affect the calculations, just type pedantry...
Panu Matilainen [Tue, 9 Feb 2010 07:47:35 +0000 (09:47 +0200)]
Move tsortInfo typedef into internal-only header
- this is not exposed outside librpm internals
Panu Matilainen [Tue, 9 Feb 2010 07:45:58 +0000 (09:45 +0200)]
Panu Matilainen [Tue, 9 Feb 2010 07:37:51 +0000 (09:37 +0200)]
Unbreak python(abi) requires generation (RhBug:562906)
- commit
426a7b6f44c6a0e1633693575c7bb6fcc76cf8a5 caused pythondeps.sh
to match too much, undo the damage
- patch from David Malcolm
Panu Matilainen [Mon, 8 Feb 2010 08:01:19 +0000 (10:01 +0200)]
Add macro expansion queryformat extension
- unused at the moment but doesn't hurt anything either...
Panu Matilainen [Fri, 5 Feb 2010 15:08:05 +0000 (17:08 +0200)]
Remove unused mntctl & mount related header checks
Florian Festi [Fri, 5 Feb 2010 11:43:21 +0000 (12:43 +0100)]
Remove no longer neede rpmts->filesystemCount and->filesystems
Florian Festi [Thu, 4 Feb 2010 10:02:25 +0000 (11:02 +0100)]
Clean up comments
Florian Festi [Tue, 2 Feb 2010 10:25:59 +0000 (11:25 +0100)]
Consider rpmdb growing when doing space calculations
Fix ticket #26
Florian Festi [Tue, 2 Feb 2010 10:12:07 +0000 (11:12 +0100)]
Add rpmteHeaderSize
Richard Hughes [Thu, 4 Feb 2010 10:25:28 +0000 (10:25 +0000)]
Fix compile when using a linker that defaults to --no-as-needed
Panu Matilainen [Thu, 4 Feb 2010 15:37:21 +0000 (17:37 +0200)]
Make rpm version available to python
Panu Matilainen [Thu, 4 Feb 2010 13:55:16 +0000 (15:55 +0200)]
Handle erased packages wrt disk-space problem reporting (RhBug:561160)
- erased packages in the transaction cause space needs to shrink, which
commit
2222e81e1cf74bbf78acb9969592ab06e2289929 failed to take into
account, causing false disk space errors from unaffected packages
- adjust obneeded and oineeded when the requirements shrink
- new disk space problems can only occur when the requirements grow,
change the pmtsCheckDSIProblems() check to reflect that (although not
strictly necessary)
Panu Matilainen [Wed, 3 Feb 2010 15:37:58 +0000 (17:37 +0200)]
Update translations for a change to kill the mntctl() strings there
Panu Matilainen [Wed, 3 Feb 2010 15:36:45 +0000 (17:36 +0200)]
Kill off couple of dangling lib/fs.c references
Florian Festi [Wed, 3 Feb 2010 14:41:58 +0000 (15:41 +0100)]
Kill RPMTAG_FSNAMES and RPMTAG_FSSIZES and everything implementing them
Florian Festi [Wed, 3 Feb 2010 14:42:52 +0000 (15:42 +0100)]
Fix stupid off by one error
Florian Festi [Wed, 3 Feb 2010 10:45:21 +0000 (11:45 +0100)]
Avoid loading information for all filesystems
This patch is heavily based on the "lazystatfs" patch by Michael Schroeder from
Novell/SUSE. Thanks!
Panu Matilainen [Wed, 3 Feb 2010 10:26:23 +0000 (12:26 +0200)]
brp-python-bytecompile fixes + improvements (RhBug:558997)
- fix incorrect paths (eg /site-packages/filename.py instead of
/usr/lib/pythonX.Y/site-packages/filename.py) ending up in bytecode
- add a "strict" mode where byte-compilation errors will abort the build
- when in non-strict mode, byte-compile everything we can instead of
bailing out at first error
- patch originally from Toshio Kuratomi, slightly changed to preserve
the original order of arguments to avoid unnecessary incompatibilities
Panu Matilainen [Mon, 1 Feb 2010 11:22:36 +0000 (13:22 +0200)]
Clean up rpmfcClassify() a bit more
- push variables to the local blocks they're actually needed in, sanitize
Panu Matilainen [Mon, 1 Feb 2010 11:22:26 +0000 (13:22 +0200)]
Single point of exit for rpmfcClassify()
- cleans up returns + avoids a possible memleak from fcav on failure
Panu Matilainen [Mon, 1 Feb 2010 11:21:46 +0000 (13:21 +0200)]
Clean up rpmfcHelper() a bit
- push local variables to the scope where actually needed
- use ARGV_t routines for creating av, makes allocations more obvious
Panu Matilainen [Mon, 1 Feb 2010 11:20:26 +0000 (13:20 +0200)]
rpmfc script coloring tweaks
- loosen up the perl token to catch more things, such as
"/usr/bin/perl -w script text"
- remove unnecessary /usr/bin/python token, these get caught by "python "
already
- remove what now should be unnecessary coloring by interpreter name,
both perl and python scripts should get colored by the tokens already
Panu Matilainen [Mon, 1 Feb 2010 11:19:54 +0000 (13:19 +0200)]
Remove misleading leftover comments from ocaml-dep extractors
- ocaml dependency extraction is fully automated, no need to override
anything (except perhaps options but that's different)
Panu Matilainen [Fri, 29 Jan 2010 14:45:53 +0000 (16:45 +0200)]
Eliminate unnecessary processing on scripts/macros.*
- these used to require processing for rpm config dir location
but not anymore since %{_rpmconfigdir} addition
Panu Matilainen [Thu, 28 Jan 2010 13:15:12 +0000 (15:15 +0200)]
Revert spec tag-macro concatenation changes
- Concatenating to global, non-namespaced tag macros is fundamentally
broken for specs with sub-packages, RhBug:555926 is not fixable with
tag macros tweaks.
Revert back to the old behavior where tag macros are simply "the last line
seen wins." This might not be what one expects in many cases but it
is at least consistent, and changing the behavior in any
way (such as not adding the macros for multiline-items like requires)
breaks existing packages without a good reason.
- Correctly handling the expected %{obsoletes} etc behavior in RhBug:555926
would require a new mechanism, such as permitting spec to access the
(sub-)package headers. Probably doable, unlikely to be worth the
effort as the issue can be easily avoided by writing the spec differently.
- This reverts commits
3be37d9c78fd13424880fa1fe48f341103a51194 and
e811ef56aa88588e16e0a80d48381a62631f8fc4
Panu Matilainen [Sat, 30 Jan 2010 10:12:02 +0000 (12:12 +0200)]
Support multiple parallel python versions in pythondeps.sh
- dont make assumptions about /usr/bin/python, extract the ABI version
from python libdir version
- patch from David Malcolm
Panu Matilainen [Wed, 27 Jan 2010 13:06:05 +0000 (15:06 +0200)]
Fix include path of luaext subdir
Panu Matilainen [Wed, 27 Jan 2010 12:03:10 +0000 (14:03 +0200)]
Add brp-python-hardlink script
- hardlink identical .pyc and .pyo files to same some space
- not enabled by default
- originally from Ville Skyttä for redhat-rpm-config but the functionality
is not specific to Fedora or derivates in any way
Panu Matilainen [Wed, 27 Jan 2010 07:40:15 +0000 (09:40 +0200)]
Pass %{__strip} and %{__objdump} to brp-strip* scripts
- permits easy overriding of the used tools globally
Panu Matilainen [Wed, 27 Jan 2010 07:26:36 +0000 (09:26 +0200)]
Make sure brp-compress doesn't go interactive in corner cases
- add --force to uncompressing so in corner cases it'll just overwrite
instead of stopping to ask interactively
Ville Skyttä [Sun, 24 Jan 2010 11:42:46 +0000 (13:42 +0200)]
perl.{req,prov} whitespace, backslash and paren cleanups.
Ville Skyttä [Sun, 24 Jan 2010 11:28:44 +0000 (13:28 +0200)]
Do not emit perl(#) dependencies for multiline use/require with comments.
For example:
use # comment goes here
Foo::Bar;
Panu Matilainen [Mon, 25 Jan 2010 10:19:05 +0000 (12:19 +0200)]
Updated Polish translation from Piotr Drąg
Ville Skyttä [Sat, 23 Jan 2010 12:50:17 +0000 (14:50 +0200)]
Document --conflicts in rpm(8).
Panu Matilainen [Fri, 22 Jan 2010 12:51:43 +0000 (14:51 +0200)]
Use %{__make} macro instead of "make"
- allows easy overriding of the used make version for %make_install and
%makeinstall
Panu Matilainen [Thu, 21 Jan 2010 12:14:28 +0000 (14:14 +0200)]
Really fix verification error code to not depend on verbosity (RhBug:557101)
- earlier fix from commit
6649c23cac5823d0c7415df5cfd66e5aac5eebd2 was
broken as it could reset return code to zero after detecting errors
earlier
Panu Matilainen [Thu, 21 Jan 2010 11:45:34 +0000 (13:45 +0200)]
Fix double-free segfault on url retrieve to read-only media (RhBug:557118)
Jindrich Novy [Wed, 20 Jan 2010 09:28:40 +0000 (10:28 +0100)]
Concatenate multiline tags in macros only in case of
Requires/Obsoletes/Conflicts and Provides. Preserve
older behaviour for other tags.
Jindrich Novy [Sat, 16 Jan 2010 11:43:16 +0000 (12:43 +0100)]
Correctly expand %{obsoletes}, %{requires}, etc. in spec (RhBug:555926)
- tags declared multiple times in spec were simply overwritten so
referencing it via %{} just showed contents of the last one
Panu Matilainen [Fri, 8 Jan 2010 10:23:54 +0000 (12:23 +0200)]
Bump version to appear newer than 4.8.0, update translations too
Panu Matilainen [Thu, 7 Jan 2010 15:07:50 +0000 (17:07 +0200)]
Merge branch 'master' of ssh://rpm.org/srv/projects/rpm/git/rpm
Panu Matilainen [Thu, 7 Jan 2010 10:04:53 +0000 (12:04 +0200)]
Revert "Always free locally defined macros when they go out of scope"
- the "fix" breaks seemingly legitimate use in fedora font package
macros, possibly some funky interaction with %{lua: } macros or something
- this reverts commit
f895acd285366cf58cc3c97b5f188fecbfd782a8.
Panu Matilainen [Wed, 6 Jan 2010 10:57:48 +0000 (12:57 +0200)]
Add %{__id_u} back, duh
- appears to be rather commonly used afterall
- dont bother with the former id|sed foo though
Panu Matilainen [Tue, 5 Jan 2010 14:06:02 +0000 (16:06 +0200)]
Move <stdio.h> includes out of system.h to the places that need it
Panu Matilainen [Tue, 5 Jan 2010 14:01:46 +0000 (16:01 +0200)]
Lose <sys/types.h> and <sys/stat.h> includes from system.h
- these seem to be already included where needed through rpm's public
header needs
Panu Matilainen [Tue, 5 Jan 2010 13:33:47 +0000 (15:33 +0200)]
Move <ctype.h> include out of system.h to the places that need it
Panu Matilainen [Tue, 5 Jan 2010 13:25:31 +0000 (15:25 +0200)]
Move <errno.h> include out of system.h to the places that need it
Panu Matilainen [Tue, 5 Jan 2010 13:17:34 +0000 (15:17 +0200)]
Remove <string.h> include from system.h into the few places that still need
- most of the places get it through <rpm/rpmstring.h> already
Panu Matilainen [Tue, 5 Jan 2010 13:09:08 +0000 (15:09 +0200)]
Loose string header compatibility goo
- <string.h> is required by C standard, we dont support ancient
non-conformant compilers anyway
Panu Matilainen [Tue, 5 Jan 2010 13:04:20 +0000 (15:04 +0200)]
Include <stdlib.h> as necessary instead of system.h
- also loose the related ancient compatibility goo
Panu Matilainen [Tue, 5 Jan 2010 12:37:47 +0000 (14:37 +0200)]
Shove the mount entry include voodoo where sun doesn't ... <cough> fs.c
Panu Matilainen [Tue, 5 Jan 2010 12:28:47 +0000 (14:28 +0200)]
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
Panu Matilainen [Tue, 5 Jan 2010 12:14:23 +0000 (14:14 +0200)]
Sanitize i18nTag() when NLS disabled
- if NLS is disabled, the whole thing becomes just a plain old headerGet()
Panu Matilainen [Tue, 5 Jan 2010 11:29:52 +0000 (13:29 +0200)]
Remove libcap stuff out of system.h
- just a few places need, avoid polluting everything with it
- make fsm->fcaps void * to avoid having to deal with fcap_t not defined
Panu Matilainen [Tue, 5 Jan 2010 11:09:38 +0000 (13:09 +0200)]
fts.h requires <stdint.h>, include it there explicitly
- this has been masked by system.h including <netdb.h> which apparently
brought in <stdint.h> as a side-effect
- commit
5c084f842ae21d861818a33922b5c77cb17ad8e4 broke compilation
without capability support as <sys/capability.h> also happens to bring
in <stdint.h>
Panu Matilainen [Tue, 5 Jan 2010 10:51:36 +0000 (12:51 +0200)]
Remove unused selinux dummy defines
Panu Matilainen [Tue, 5 Jan 2010 10:36:37 +0000 (12:36 +0200)]
Move <mcheck.h> include out of system.h to the couple of places that care
- only two real users inside rpm
- remove mcheck foo from rpminject and rpmsort, we're not interested...
Panu Matilainen [Tue, 5 Jan 2010 10:35:54 +0000 (12:35 +0200)]
Unconditionally include <sys/wait.h> where needed
- no point conditionalizing what we cant live without
Panu Matilainen [Tue, 5 Jan 2010 10:14:37 +0000 (12:14 +0200)]
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
Panu Matilainen [Tue, 5 Jan 2010 09:52:56 +0000 (11:52 +0200)]
Move libacl.h include out of system.h to the only place that cares
Panu Matilainen [Tue, 5 Jan 2010 09:45:28 +0000 (11:45 +0200)]
Eliminate SEEK_FOO and [RWXF]_OK definitions from system.h
- systems not defining these constants are broken beyond our caring
Panu Matilainen [Tue, 5 Jan 2010 09:33:51 +0000 (11:33 +0200)]
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
Panu Matilainen [Tue, 5 Jan 2010 09:26:14 +0000 (11:26 +0200)]
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
Panu Matilainen [Tue, 5 Jan 2010 08:56:56 +0000 (10:56 +0200)]
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
Panu Matilainen [Tue, 5 Jan 2010 08:45:23 +0000 (10:45 +0200)]
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
Panu Matilainen [Tue, 5 Jan 2010 08:19:52 +0000 (10:19 +0200)]
Oops, ftok() is really optional
Panu Matilainen [Mon, 4 Jan 2010 15:15:26 +0000 (17:15 +0200)]
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...)
Panu Matilainen [Mon, 4 Jan 2010 14:59:39 +0000 (16:59 +0200)]
Remove unused header checks from configure
- maybe these have been used at some point but not anymore...
Panu Matilainen [Mon, 4 Jan 2010 14:31:10 +0000 (16:31 +0200)]
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
Panu Matilainen [Mon, 4 Jan 2010 14:22:56 +0000 (16:22 +0200)]
Use MAP_FAILED instead of hardwired (void *)-1
Panu Matilainen [Mon, 4 Jan 2010 14:20:11 +0000 (16:20 +0200)]
Re-enable mmap test in configure & fix the code build again
- this stuff has been disabled for years, lets see what breaks...
Panu Matilainen [Mon, 4 Jan 2010 14:10:44 +0000 (16:10 +0200)]
Remove unnecessary stdint check from configure
- a leftover from pre-C99 requirement times
Panu Matilainen [Mon, 4 Jan 2010 14:07:11 +0000 (16:07 +0200)]
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
Panu Matilainen [Mon, 4 Jan 2010 13:58:55 +0000 (15:58 +0200)]
Require lchown() and remove ancient broken chown kludgery
- lchown() is POSIX 2001, we dont care about older / nonconformant stuff
Panu Matilainen [Mon, 4 Jan 2010 12:58:51 +0000 (14:58 +0200)]
Check for our POSIX 2001 requirements and abort if not found
Panu Matilainen [Mon, 4 Jan 2010 12:44:26 +0000 (14:44 +0200)]
Lose the hysterical fakefork hack
- we're not particularly interested in AmigaOS quirks from 1996
Panu Matilainen [Mon, 4 Jan 2010 13:27:05 +0000 (15:27 +0200)]
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
Panu Matilainen [Mon, 4 Jan 2010 12:21:42 +0000 (14:21 +0200)]
Remove unnecessary setenv() replacement function
- setenv() and unsetenv() are required by POSIX 2001, we dont care about
older systems
Panu Matilainen [Mon, 4 Jan 2010 12:15:20 +0000 (14:15 +0200)]
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
Panu Matilainen [Mon, 4 Jan 2010 11:46:43 +0000 (13:46 +0200)]
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
Panu Matilainen [Mon, 4 Jan 2010 11:34:39 +0000 (13:34 +0200)]
Remove unneeded strdup() replacement in misc/
- rpmio's own version is always there and portable, this is not needed
Panu Matilainen [Mon, 4 Jan 2010 11:30:14 +0000 (13:30 +0200)]
Use rpm's own strdup() clone everywhere
Panu Matilainen [Mon, 4 Jan 2010 10:20:09 +0000 (12:20 +0200)]
Always free locally defined macros when they go out of scope
- Prior to this, local defines in constructs like %{!?foo: %define foo bar}
would remain defined until a parametrized macro gets called, causing
obscure and confusing errors in specs such as RhBug:551971 and countless
others. Use of %global is now always required for such constructs.
Panu Matilainen [Mon, 4 Jan 2010 08:52:22 +0000 (10:52 +0200)]
Remove -98 vintage ifdef'ed dead code
Panu Matilainen [Mon, 4 Jan 2010 07:12:19 +0000 (09:12 +0200)]
error.c was getting translated too, duh
- should've been in commit
5741334a857a783b033c647223f206a7ca43cef3