Steve Lawrence [Mon, 30 Aug 2010 20:32:27 +0000 (16:32 -0400)]
Update the plugin architecture to allow for remembering state
This moves most of the plugin logic to a new rpmplugins file with a
struct and functions for managing plugins, allowing for plugins to carry
state. This also adds init and cleanup hooks for plugins to initialize
and cleanup their state, and a new 'open te' hook allowing plugins to
read and save information from transaction elements.
This also generalizes the plugin architecture a bit so it isn't so
specific to collections.
Panu Matilainen [Thu, 26 Aug 2010 09:21:33 +0000 (12:21 +0300)]
Permit packages with no files to omit %files entirely
- Fixes the long standing obscure behavior of missing %files
section causes build to complete without errors but without producing
any packages either. Packages without files in them are perfectly
valid (eg metapackages), requiring empty %files section for those
is just unnecessary spec noise.
- Remove %files section on one of the test-suite specs to create
a test-case for this as a side-effect.
- This of course introduces a slight incompatibility with older rpm's,
if compatibility is required then just add those empty %files in the
spec, they dont hurt anything but the readers eyes.
Panu Matilainen [Thu, 26 Aug 2010 08:58:24 +0000 (11:58 +0300)]
Clean up newPackage() a bit
- No much point explicitly NULL'ing calloc()'ed memory, only initialize
the values that are something else + other cosmetics.
Panu Matilainen [Thu, 26 Aug 2010 08:41:31 +0000 (11:41 +0300)]
Split arch/os/platform adding out of parseSpec()
- Combining description /checking/ and arch/os/platform /adding/
into same for-loop (to save cycles or lines, dunno) makes no sense
whatsoever. No functional changes.
Panu Matilainen [Wed, 25 Aug 2010 12:51:45 +0000 (15:51 +0300)]
Stuff the remaining truly internal structure defs out of sight
- All these are internal implementation details that no callers
should mess with. Bury inside rpmbuild_internal.h.
- spec, package and source structures are tougher nuts as python
bindings expect to expose some of the information, we'll need
at least some api to cover walking over package headers etc before
shutting the door completely.
Panu Matilainen [Wed, 25 Aug 2010 12:41:09 +0000 (15:41 +0300)]
Mass eviction of remaining internal helpers in librpmbuild API
- Yank everything qualifying as "internal helper function" into
internal-only headers, loosely grouped as follows:
1) Everything involving spec-manipulation goes into rpmbuild_internal.h
2) All other miscellaneous helpers go into rpmbuild_misc.h
- This leaves us a rather minimal, and nearly useful API into librpmbuild:
Users need to be able to parse a spec, query or build (parts of) it
and free up the spec structure when done. This is what we have now,
various still exposed structures not counting.
Panu Matilainen [Wed, 25 Aug 2010 12:06:47 +0000 (15:06 +0300)]
Eliminate unused spec argument from addReqProv()
- addReqProv() only operates on the header, not spec
Panu Matilainen [Wed, 25 Aug 2010 11:52:58 +0000 (14:52 +0300)]
Bury OpenFileInfo inside parseSpec.c
- Nothing outside spec parsing machinery needs this nor should mess
with it, enforce with opaque pointer.
Panu Matilainen [Wed, 25 Aug 2010 11:13:10 +0000 (14:13 +0300)]
Eliminate freePackage() from librpmbuild API
- The only thing that should ever call this is freePackages() which
was already made static. As newPackage() links the package structure
with the spec, its not safe for others to call it.
Panu Matilainen [Wed, 25 Aug 2010 11:04:52 +0000 (14:04 +0300)]
Eliminate initSourceHeader() from librpmbuild API
- This is a funky little implementation detail which no caller should
have to bother with. Move it to parseSpec.c which is the only place
needing it now and make static.
Panu Matilainen [Wed, 25 Aug 2010 10:39:04 +0000 (13:39 +0300)]
Eliminate ancient leftover initSourceHeader() call
- processSourceFiles() is only ever called through buildSpec(),
and if you throw unparsed spec into that you're pretty much screwed
anyway. rpmbuild always called initSourceHeader() anyway, and now
its ensured for all successfully parsed specs.
Panu Matilainen [Wed, 25 Aug 2010 10:33:15 +0000 (13:33 +0300)]
Initialize source header from parseSpec() instead of caller(s)
- This is where it logically seems to belong to, after all parseSpec()
similarly populates all other metadata of the binaries etc too.
No point requiring callers to do this obscure extra call.
Panu Matilainen [Wed, 25 Aug 2010 10:20:15 +0000 (13:20 +0300)]
Move source+patch tag insertion into initSourceHeader()
- processSourceFiles() is more about processing the physical files
ending up in the srpm payload, source + patch tags are mostly just
informational and can be added early
Panu Matilainen [Wed, 25 Aug 2010 09:25:55 +0000 (12:25 +0300)]
Eliminate an exit point from parseSpec()
Panu Matilainen [Wed, 25 Aug 2010 08:04:51 +0000 (11:04 +0300)]
Eliminate doRmSource() from librpmbuild API again
- buildSpec() is sufficient interface for accomplishing the same,
avoid exposing internal helpers
Panu Matilainen [Wed, 25 Aug 2010 08:03:26 +0000 (11:03 +0300)]
Fix RhBug:452477 differently to avoid doRmSource()
Panu Matilainen [Tue, 24 Aug 2010 10:56:29 +0000 (13:56 +0300)]
Eliminate addChangelogEntry() from librpmbuild API
- This is just an internal helper for parseChangelog(), no point
exporting it
Panu Matilainen [Tue, 24 Aug 2010 10:54:04 +0000 (13:54 +0300)]
Eliminate buildHost() and getBuildTime() from librpmbuild API
- Neither is needed anywhere outside pack.c, bury there and make static
Panu Matilainen [Tue, 24 Aug 2010 10:39:42 +0000 (13:39 +0300)]
Eliminate checkPackages() from librpmbuild API
- No needs outside pack.c, make it static
Panu Matilainen [Tue, 24 Aug 2010 10:37:16 +0000 (13:37 +0300)]
Eliminate parseExpressionString() from librpmbuild
- This has been unused since its introduction in 1998...
Panu Matilainen [Tue, 24 Aug 2010 10:30:12 +0000 (13:30 +0300)]
Eliminate freePackages() from librpmbuild API
- This is a spec-internal cleanup task, no need outside spec.c
Panu Matilainen [Tue, 24 Aug 2010 10:23:51 +0000 (13:23 +0300)]
Eliminate now unnecessary buildio.h
- readRPM() is not used or needed by anything, shred it
- make writeRPM() static inside the only place needing it: pack.c
- move struct cpioSourceArchive_s inside pack.c
Panu Matilainen [Tue, 24 Aug 2010 10:14:48 +0000 (13:14 +0300)]
Send the mostly broken rpminject and rpmsort "test programs" to shredder
Panu Matilainen [Tue, 24 Aug 2010 09:38:50 +0000 (12:38 +0300)]
Eliminate newOpenFileInfo() from librpmbuild API
- Nothing outside parseSpec.c needs, bury it there and make static
Panu Matilainen [Tue, 24 Aug 2010 09:35:59 +0000 (12:35 +0300)]
Eliminate addSource() from librpmbuild API
- Nothing outside parsePreamble.c needs, bury it there and make static
Panu Matilainen [Tue, 24 Aug 2010 09:31:13 +0000 (12:31 +0300)]
Eliminate parseNoSource() from librpmbuild API
- Nothing outside parsePreamble.c needs, bury it there and make static
Panu Matilainen [Mon, 23 Aug 2010 10:08:23 +0000 (13:08 +0300)]
Remove ancient autohelp-handling related leftovers
Panu Matilainen [Mon, 23 Aug 2010 06:51:52 +0000 (09:51 +0300)]
Lose leftover variable, use const for s to clarify usage
Piotr Drąg [Sun, 22 Aug 2010 20:29:46 +0000 (20:29 +0000)]
l10n: Updated Polish (pl) translation to 100%
New status: 729 messages complete with 0 fuzzies and 0 untranslated.
Transmitted-via: Transifex (www.transifex.net).
Panu Matilainen [Fri, 20 Aug 2010 14:50:51 +0000 (17:50 +0300)]
Remove signing support from (lib)rpmbuild
- Signing is better done in an environment completely separated from
the process of actually building packages. This is how its generally
done anyway by distros, this change just forces the issue.
- While signing on build seems handy and saves some io-churn, this
is very insecure as your precious secret passphrase remains unencrypted
in memory for the entire duration of the build where it's accessible
to whatever happens to be building. This change doesn't
affect fix the issue of unencrypted passphrase residing in memory
and potentially getting swapped out, it only limits the exposure
to the actual signing process which isn't subject to unknown scripts
poking around.
- Minimally preserve rpmbuild's --sign functionality via popt --pipe hack
to call rpm --addsign when build completes
Panu Matilainen [Fri, 20 Aug 2010 13:00:38 +0000 (16:00 +0300)]
Yet another unused copy of identifyDepend() hiding inline
Panu Matilainen [Fri, 20 Aug 2010 12:33:59 +0000 (15:33 +0300)]
Hack to get popt working when running from build tree
- Dynamic linking with libtool causes binaries to appear as lt-foo,
which confuses the heck out of popt aliasing. Add a dumb hack to
rpmcliInit() to fixup the lt- out of popt context names.
Panu Matilainen [Fri, 20 Aug 2010 12:17:08 +0000 (15:17 +0300)]
Argh. Realize we already have equivalents of initCli() and finishCli()
- rpmcliInit() and rpmcliFini() do almost exactly the same as our
newborn cli-helpers, but they've been almost unused until now.
Use them and lose the new ones.. doh.
- The downside is that popt aliases are now broken when running commands
from the build tree due to lt-foo in argv[0], whereas initCli() took
and explicit popt context name argument. Oh well...
- rpmcliFini() was missing several necessary memory cleanup calls,
add them there while at it.
Panu Matilainen [Fri, 20 Aug 2010 11:48:44 +0000 (14:48 +0300)]
Remove unused code, hidden away from compiler warnings via inlining
Panu Matilainen [Fri, 20 Aug 2010 11:31:16 +0000 (14:31 +0300)]
Kludge to get rid of ugly lone --quiet on usage message
Panu Matilainen [Fri, 20 Aug 2010 11:27:35 +0000 (14:27 +0300)]
Update translations to pick up stuff moving around
Panu Matilainen [Fri, 20 Aug 2010 10:47:05 +0000 (13:47 +0300)]
Move --pipe handling to cliutils helpers
Panu Matilainen [Fri, 20 Aug 2010 10:42:00 +0000 (13:42 +0300)]
Panu Matilainen [Fri, 20 Aug 2010 10:16:48 +0000 (13:16 +0300)]
Lump much of the common cli-init + finish tasks into cliutils helpers
Panu Matilainen [Fri, 20 Aug 2010 09:08:10 +0000 (12:08 +0300)]
Add a convenience library for stuff common cli-bits into
Panu Matilainen [Fri, 20 Aug 2010 08:35:44 +0000 (11:35 +0300)]
If MiNT can't cope, frankly my dear, I dont give a damn
Panu Matilainen [Fri, 20 Aug 2010 08:26:28 +0000 (11:26 +0300)]
Merge build.[ch] into rpmbuild.c, doesn't make sense to separate anymore
Panu Matilainen [Fri, 20 Aug 2010 08:16:17 +0000 (11:16 +0300)]
Clean up rpmbuild's --quiet handling + honor it on --rebuild too
Panu Matilainen [Fri, 20 Aug 2010 08:06:24 +0000 (11:06 +0300)]
Cosmetics cleanup
Panu Matilainen [Fri, 20 Aug 2010 08:02:14 +0000 (11:02 +0300)]
Eliminate unnecessary sanity checks wrt --sign and fix indentation
Panu Matilainen [Fri, 20 Aug 2010 07:41:18 +0000 (10:41 +0300)]
Test argument count early, avoiding the need to re-check over and over
- Instead of bothering with different error messages for tar/spec/pkg
messages, just dump usage when no arguments present.
- Testing argument file existence for signing is meaningless on build
as we're not signing the specs or tarballs present there but the
build result.
Panu Matilainen [Fri, 20 Aug 2010 07:24:53 +0000 (10:24 +0300)]
Eliminate a bunch of now unnecessary cli-switch sanity checks
Panu Matilainen [Fri, 20 Aug 2010 07:19:26 +0000 (10:19 +0300)]
Simplify --root argument checking
- We haven't accepted url's in as root since ages, wipe out the goo
Panu Matilainen [Fri, 20 Aug 2010 06:26:10 +0000 (09:26 +0300)]
Eliminate the IAM_RPMBT ifdef's from rpmbuild.c for real
Panu Matilainen [Fri, 20 Aug 2010 06:20:16 +0000 (09:20 +0300)]
Chainsaw the now unused #ifdef'ed parts out of rpmqv.c and rpmbuild.c
Panu Matilainen [Fri, 20 Aug 2010 06:00:26 +0000 (09:00 +0300)]
Begin splitting rpmbuild to separate sources
- Make a copy of the entire rpmqv.c source to rpmbuild.c and switch
make to use the new copy. No functional changes. Making a copy first
means we get much easier to follow patch-series on the changes
that will follow.
Panu Matilainen [Wed, 18 Aug 2010 09:32:23 +0000 (12:32 +0300)]
Add a test-case for --specfile query
Panu Matilainen [Wed, 18 Aug 2010 08:55:19 +0000 (11:55 +0300)]
Add %patch usage to hello.spec testcase
Panu Matilainen [Fri, 13 Aug 2010 07:58:51 +0000 (10:58 +0300)]
Lose the now unnecessary rpmtsSELinuxEnabled() function
- it never was anything more than a cached value of is_selinux_enabled()
and caching this fairly expensive result is no longer needed as
scriptlet execution wrt selinux contexts is now conditionalized on
RPMTRANS_FLAG_NOCONTEXTS instead
Panu Matilainen [Fri, 13 Aug 2010 07:52:40 +0000 (10:52 +0300)]
Conditionalize rpm_execcon() usage on per-transaction flags
- If we aren't laying down file contexts, executing scriptlets in
contexts doesn't make much sense either as its just likely to fail.
- System-wide settings, such as is_selinux_enabled() value, are
very ambiguous when it comes to chroots, using per-transaction
controllable flags instead lets callers decide.
Giulio Eulisse [Tue, 10 Aug 2010 08:50:48 +0000 (11:50 +0300)]
Add missing libgen.h include
Roland McGrath [Mon, 9 Aug 2010 12:27:03 +0000 (15:27 +0300)]
Fix find-debuginfo.sh behavior on cross-directory hardlinks (RhBug:618426)
- The find-debuginfo.sh script makes hard links of .debug files to
correspond to hard links between install binaries. It can fail to
create one of these .debug hard links if it's in a directory that
didn't exist at that point in the script run. How this happens
depends on things like the order "find" lists files, so it can
be hard to reproduce off hand.
Tom Tromey [Mon, 9 Aug 2010 12:22:51 +0000 (15:22 +0300)]
Create GDB index from find-debuginfo if possible (RhBug:617166)
- Details in https://fedoraproject.org/wiki/Features/GdbIndex
Jindrich Novy [Tue, 13 Jul 2010 11:35:22 +0000 (13:35 +0200)]
Redirect macro stack backtrace printing to debug log.
Jindrich Novy [Tue, 13 Jul 2010 11:34:05 +0000 (13:34 +0200)]
Fix cryptic macro evaluation error message (RhBug:613010)
Yuri Chornoivan [Sat, 10 Jul 2010 04:51:43 +0000 (04:51 +0000)]
l10n: Updated Ukrainian (uk) translation to 100%
New status: 732 messages complete with 0 fuzzies and 0 untranslated.
Transmitted-via: Transifex (www.transifex.net).
Panu Matilainen [Fri, 9 Jul 2010 09:32:24 +0000 (12:32 +0300)]
Skip any initial comments when looking for pubkey start marker
Florian Festi [Thu, 8 Jul 2010 12:29:36 +0000 (14:29 +0200)]
Remove never used fsmRmdirs() function
which should have removed implicitly created directories
Florian Festi [Thu, 8 Jul 2010 12:25:48 +0000 (14:25 +0200)]
Tidy up fsmMapPath a bit
Florian Festi [Mon, 7 Jun 2010 13:56:51 +0000 (15:56 +0200)]
Make FSM_VERIFY a function
Florian Festi [Mon, 7 Jun 2010 10:10:08 +0000 (12:10 +0200)]
Make FSM_CREATE a function
Florian Festi [Fri, 4 Jun 2010 15:03:59 +0000 (17:03 +0200)]
Make FSM_READLINK a function
Florian Festi [Fri, 4 Jun 2010 12:30:16 +0000 (14:30 +0200)]
Make FSM_LSTAT and FSM_STAT one function
Florian Festi [Fri, 18 Dec 2009 08:26:05 +0000 (09:26 +0100)]
Move FSM_HREAD in place
Florian Festi [Fri, 18 Dec 2009 08:24:25 +0000 (09:24 +0100)]
Move FSM_HWRITE in place
Florian Festi [Fri, 18 Dec 2009 08:22:27 +0000 (09:22 +0100)]
Move FSM_TRAILER in place
Florian Festi [Thu, 17 Dec 2009 14:12:32 +0000 (15:12 +0100)]
Move FSM_MKNOD in place
Florian Festi [Thu, 17 Dec 2009 14:07:25 +0000 (15:07 +0100)]
Move FSM_MKFIFO in place
Florian Festi [Thu, 17 Dec 2009 14:04:18 +0000 (15:04 +0100)]
Move FSM_LINK in place
Florian Festi [Thu, 17 Dec 2009 14:00:52 +0000 (15:00 +0100)]
Move FSM_SYMLINK in place
Florian Festi [Thu, 17 Dec 2009 13:14:56 +0000 (14:14 +0100)]
Make FSM_CHOWN, FSM_LCHOWN, FSM_CHMOD, FSM_UTIME and FSM_SETCAP functions
Florian Festi [Thu, 17 Dec 2009 12:40:55 +0000 (13:40 +0100)]
Make FSM_LSETFCON a function
Florian Festi [Thu, 17 Dec 2009 12:26:21 +0000 (13:26 +0100)]
Make FSM_RMDIR a function
Florian Festi [Thu, 17 Dec 2009 12:22:35 +0000 (13:22 +0100)]
Make FSM_RENAME a function
Florian Festi [Thu, 17 Dec 2009 12:17:33 +0000 (13:17 +0100)]
Make FSM_UNLINK a function
Florian Festi [Thu, 17 Dec 2009 12:06:59 +0000 (13:06 +0100)]
remove no longer needed FSM states
Florian Festi [Thu, 17 Dec 2009 12:05:16 +0000 (13:05 +0100)]
Make FSM_MKDIR a function
Florian Festi [Thu, 17 Dec 2009 11:27:52 +0000 (12:27 +0100)]
Use fsmRmdirs and fsmMkdirs directly
Florian Festi [Thu, 17 Dec 2009 11:20:38 +0000 (12:20 +0100)]
Use fsmMapPath directly instead of FSM_MAP
Move fsmMapPath to better position in the file
Florian Festi [Thu, 17 Dec 2009 11:17:58 +0000 (12:17 +0100)]
Make FSM_INIT a function
Panu Matilainen [Sat, 3 Jul 2010 04:16:22 +0000 (07:16 +0300)]
Oops, dont hang in getOutputFrom() if we have nothing to write
Panu Matilainen [Fri, 2 Jul 2010 10:23:11 +0000 (13:23 +0300)]
Ugh, fix reversed condition on font-provide extractor
- braindamage in commit
53045d5dcdce3988e2586cb315b35e6a675a8152
Panu Matilainen [Fri, 2 Jul 2010 09:21:00 +0000 (12:21 +0300)]
Rewrite getOutputFrom() in a race-free way (supposedly ;)
- Use a self-pipe to handle signal race on select(). pselect() would work
too but this is more portable and avoids other signal hassles.
- Use non-blocking IO for communicating with the child to avoid spin-happy
timeouts, just check all fd's properly before trying to use them
- Avoid leaking memory from readBuff on errors
Héctor Daniel Cabrera [Wed, 30 Jun 2010 23:23:19 +0000 (23:23 +0000)]
l10n: Updated Spanish (Castilian) (es) translation to 100%
New status: 732 messages complete with 0 fuzzies and 0 untranslated.
Transmitted-via: Transifex (www.transifex.net).
Piotr Drąg [Wed, 30 Jun 2010 09:38:22 +0000 (09:38 +0000)]
l10n: Updated Polish (pl) translation to 100%
New status: 732 messages complete with 0 fuzzies and 0 untranslated.
Transmitted-via: Transifex (www.transifex.net).
Panu Matilainen [Wed, 30 Jun 2010 09:27:56 +0000 (12:27 +0300)]
Make the infamous getOutputFrom() error message more useful
- ...like actually saying what was the failing script, doh
- leaving the function name there for a googling hint
Panu Matilainen [Wed, 30 Jun 2010 08:57:17 +0000 (11:57 +0300)]
Fix potential getOutputFrom() error on font provide extraction (RhBug:609117)
- if fonts are detected in the package being built but fc-query isn't
present, the script exited without consuming stdin which can break
getOutputFrom()
Ville Skyttä [Sun, 23 May 2010 07:54:39 +0000 (10:54 +0300)]
Extract dependencies from "use base qw"..."" and "use base qw'...'".
Panu Matilainen [Tue, 29 Jun 2010 08:59:33 +0000 (11:59 +0300)]
Update translations to pick up some recently added strings
Panu Matilainen [Tue, 29 Jun 2010 08:34:32 +0000 (11:34 +0300)]
Add --delsign to man page
Panu Matilainen [Tue, 29 Jun 2010 07:47:18 +0000 (10:47 +0300)]
Add some sanity checks for generated signatures (related to RhBug:608599)
- GPG supports all sorts of algorithms NSS doesn't, do some basic tests
to verify the generated signature is something we can actually use.
Jiri Kastner [Tue, 29 Jun 2010 06:46:22 +0000 (09:46 +0300)]
Tell rpm about SHA-224 existence (RhBug:608599)
- Fixes "Unknown hash algorithm" message but this is cosmetic only as
NSS doesn't currently support SHA-224.
Panu Matilainen [Mon, 28 Jun 2010 12:59:23 +0000 (15:59 +0300)]
Use rpmdsThis() instead of doing the same manually
Panu Matilainen [Thu, 24 Jun 2010 10:17:08 +0000 (13:17 +0300)]
Move collections tag to "known free" number, document reserved tags
- missed during review, oh well..
Panu Matilainen [Thu, 24 Jun 2010 08:33:52 +0000 (11:33 +0300)]
Err, remove /build/ from .gitignore