tools/librpm-tizen.git
13 years agoRemove hysterically useless RPMSIGN_NONE + --sign popt leftovers
Panu Matilainen [Fri, 3 Sep 2010 06:28:57 +0000 (09:28 +0300)]
Remove hysterically useless RPMSIGN_NONE + --sign popt leftovers

13 years agoEliminate unused rootdir member from rpmInstallArguments
Panu Matilainen [Fri, 3 Sep 2010 06:01:29 +0000 (09:01 +0300)]
Eliminate unused rootdir member from rpmInstallArguments

13 years agoEliminate unused qva_prefix and qva_verbose from rpmQVKArguments
Panu Matilainen [Fri, 3 Sep 2010 05:59:39 +0000 (08:59 +0300)]
Eliminate unused qva_prefix and qva_verbose from rpmQVKArguments

13 years agoUse the common rpmcliQueryFlags for signature verify options in rpm cli too
Panu Matilainen [Fri, 3 Sep 2010 05:17:57 +0000 (08:17 +0300)]
Use the common rpmcliQueryFlags for signature verify options in rpm cli too
- Technically this changes the rpmcliQuery() and rpmcliVerify() API
  in the sense that we no longer honor the qva->qva_flags for the
  --nosignature and others, but we assume anybody using these (as if
  anybody was using the "cli" API) uses rpmcliInit() which takes
  care of these common bits... shrug.
- Ditch ancient and hidden --nopgp --nogpg switches along with the
  dishwater which are simply alias to --nosignature.
- Eliminate now unused qva_flags from rpmInstallArguments (along with
  a double vsflags goo from rpmgraph)

13 years agoUse the common rpmcliQueryFlags for signature verify options in rpmbuild
Panu Matilainen [Fri, 3 Sep 2010 04:49:37 +0000 (07:49 +0300)]
Use the common rpmcliQueryFlags for signature verify options in rpmbuild
- The various --nosignature etc verification switches are common to
  everything, and have been available through rpmcliQueryFlags via
  the common popt table since 2002. Might as well finally use it
  to limit the amount of duplicate popt goo.

13 years agoPermit passing spec parse flags in python too
Panu Matilainen [Thu, 2 Sep 2010 13:14:46 +0000 (16:14 +0300)]
Permit passing spec parse flags in python too
- The preferred flags default would be RPMSPEC_NONE, but it would break
  compatibility with older rpm versions where rpm.spec() doesn't accept
  flags.

13 years agoAdd an experimental low-level build method to python spec
Panu Matilainen [Thu, 2 Sep 2010 12:21:20 +0000 (15:21 +0300)]
Add an experimental low-level build method to python spec
- This is mostly just a toy for now, but serves as a kind of yardstick
  for what is missing in librpmbuild to be generally useful for
  building stuff.

13 years agoAdd the various spec + build flags to python
Panu Matilainen [Thu, 2 Sep 2010 11:51:51 +0000 (14:51 +0300)]
Add the various spec + build flags to python

13 years agoCosmetics: use an enum instead of #defines for source type bits
Panu Matilainen [Thu, 2 Sep 2010 11:47:33 +0000 (14:47 +0300)]
Cosmetics: use an enum instead of #defines for source type bits

13 years agoClarify RPMBUILD_STRINGBUF comment
Panu Matilainen [Thu, 2 Sep 2010 11:44:02 +0000 (14:44 +0300)]
Clarify RPMBUILD_STRINGBUF comment

13 years agoSwap rpmSpecBuild() arguments for consistency with other APIs
Panu Matilainen [Thu, 2 Sep 2010 11:39:11 +0000 (14:39 +0300)]
Swap rpmSpecBuild() arguments for consistency with other APIs
- What we're building comes first, /how/ we're building comes second
- Update the sole caller, doesn't matter as this is a new interface...

13 years agoUpdate translations again to pick up strings moving around etc
Panu Matilainen [Thu, 2 Sep 2010 11:31:08 +0000 (14:31 +0300)]
Update translations again to pick up strings moving around etc

13 years agoOops, forgot to update POTFILES.in on poptBT.c removal
Panu Matilainen [Thu, 2 Sep 2010 11:30:36 +0000 (14:30 +0300)]
Oops, forgot to update POTFILES.in on poptBT.c removal

13 years agoAdd a new public function for retrieving build dependencies from spec
Panu Matilainen [Thu, 2 Sep 2010 11:25:30 +0000 (14:25 +0300)]
Add a new public function for retrieving build dependencies from spec
- Not needed by rpmbuild itself currently, but permits retrieving the
  build dependency information in a format that's better suited for
  further processing than an rpm problem set.

13 years agoMove build dependency checking from cli tool to librpmbuild
Panu Matilainen [Thu, 2 Sep 2010 11:13:28 +0000 (14:13 +0300)]
Move build dependency checking from cli tool to librpmbuild
- Add new public rpmSpecCheckDeps() function which can be used for
  checking build dependencies of a spec against a transaction set.
- Change checkSpec() in rpmbuild cli to use the new interface
- rpmbuild.c is now free of direct spec structure accesses

13 years agoReturn NULL from rpmtsProblems() if no problems exist
Panu Matilainen [Thu, 2 Sep 2010 11:12:42 +0000 (14:12 +0300)]
Return NULL from rpmtsProblems() if no problems exist
- Avoids callers having to separately test for number of problems
  and freeing when no problems exist

13 years agoCosmetics: update comments + use a specific type for buildAmount
Panu Matilainen [Thu, 2 Sep 2010 11:12:25 +0000 (14:12 +0300)]
Cosmetics: update comments + use a specific type for buildAmount

13 years agoEliminate specFlags from rpmBuildArguments
Panu Matilainen [Thu, 2 Sep 2010 11:08:08 +0000 (14:08 +0300)]
Eliminate specFlags from rpmBuildArguments
- Spec parse flags are specific to parsing a spec, not building it.
  This could be relevant again if a higher level build API is added
  to the library but not ATM.

13 years agoEliminate targets from rpmBuildArguments
Panu Matilainen [Thu, 2 Sep 2010 10:31:44 +0000 (13:31 +0300)]
Eliminate targets from rpmBuildArguments
- Targets are obviously relevant for building but not in the
  context of rpmSpecBuild which expects the environment to be set up
  already. If/when we add a higher level build interface to librpmbuild
  this comes relevant again, until then bury inside the cli-tool.
- Simplify the target parsery by using argvSplit() and friends.

13 years agoEliminate buildMode and buildChar from rpmBuildArguments
Panu Matilainen [Thu, 2 Sep 2010 10:07:01 +0000 (13:07 +0300)]
Eliminate buildMode and buildChar from rpmBuildArguments
- The mode letters are only relevant for the rpmbuild cli tool. If/when
  some of the related build logic is moved from the cli tool to the
  library, we'll need a better way of expressing these combinations
  than letters.

13 years agoEliminate verify flags from rpmBuildArguments
Panu Matilainen [Thu, 2 Sep 2010 09:52:56 +0000 (12:52 +0300)]
Eliminate verify flags from rpmBuildArguments
- Transaction set verification bits are not relevant to building,
  bury inside the rpmbuild cli utility.
- Also the type was wrong, its rpmVerifyFlags, not rpmQueryFlags, duh

13 years agoEliminate noDeps and shortCircuit from rpmBuildArguments struct
Panu Matilainen [Thu, 2 Sep 2010 09:46:21 +0000 (12:46 +0300)]
Eliminate noDeps and shortCircuit from rpmBuildArguments struct
- Both of these are only relevant to the rpmbuild cli utility,
  eg checking for build-requires is up to caller, not librpmbuild.

13 years agoEliminate popt goo from librpmbuild
Panu Matilainen [Thu, 2 Sep 2010 09:26:23 +0000 (12:26 +0300)]
Eliminate popt goo from librpmbuild
- Move the cli-switch manouvering into rpmbuild.c cli utility where
  it belongs.

13 years agoEliminate _noDirTokens from librpmbuild API+ABI
Panu Matilainen [Thu, 2 Sep 2010 09:12:46 +0000 (12:12 +0300)]
Eliminate _noDirTokens from librpmbuild API+ABI
- Add another flag set to control package generation, passing around
  as necessary. Use this to implement --nodirtokens functionality
  in a cleaner manner.

13 years agoEliminate freeNames() from librpmbuild ABI
Panu Matilainen [Thu, 2 Sep 2010 08:19:46 +0000 (11:19 +0300)]
Eliminate freeNames() from librpmbuild ABI
- Call freeNames() at end of buildSpec() instead of requiring API
  users to clean up after us. This does mean losing some of the
  supposed caching advantage when building on more than one spec,
  but hardly matters, one spec at a time is the typical build usage
  anyway.

13 years agoDetect short-circuited build based on executed build steps from buildSpec()
Panu Matilainen [Thu, 2 Sep 2010 08:01:15 +0000 (11:01 +0300)]
Detect short-circuited build based on executed build steps from buildSpec()
- Avoids having to access rpmBTArgs from deep packageBinaries(),
  API changing is not an issue anymore...

13 years agoHandle --nobuild as another buildAmount flag
Panu Matilainen [Thu, 2 Sep 2010 07:23:57 +0000 (10:23 +0300)]
Handle --nobuild as another buildAmount flag

13 years agol10n: Updated Polish (pl) translation to 100%
Piotr Drąg [Wed, 1 Sep 2010 20:07:32 +0000 (20:07 +0000)]
l10n: Updated Polish (pl) translation to 100%

New status: 754 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (www.transifex.net).

13 years agoHandle spec flags parse option figuring in popt callback already
Panu Matilainen [Wed, 1 Sep 2010 15:18:10 +0000 (18:18 +0300)]
Handle spec flags parse option figuring in popt callback already

13 years agoHandle --nolang as another spec parse flag
Panu Matilainen [Wed, 1 Sep 2010 15:07:19 +0000 (18:07 +0300)]
Handle --nolang as another spec parse flag

13 years agoCombine spec parsing options into a common flag bitfield
Panu Matilainen [Wed, 1 Sep 2010 15:03:05 +0000 (18:03 +0300)]
Combine spec parsing options into a common flag bitfield

13 years agoRename freeSpec() -> rpmSpecFree() for namespacing
Panu Matilainen [Wed, 1 Sep 2010 14:29:27 +0000 (17:29 +0300)]
Rename freeSpec() -> rpmSpecFree() for namespacing
- librpmbuild actually now has what remotely resembles an API, after
  we broke every single thing there was ;)

13 years ago...and finally eliminate the spec crapola from transaction set for good
Panu Matilainen [Wed, 1 Sep 2010 14:20:22 +0000 (17:20 +0300)]
...and finally eliminate the spec crapola from transaction set for good

13 years agoEliminate transaction set from spec parsing internals
Panu Matilainen [Wed, 1 Sep 2010 14:18:11 +0000 (17:18 +0300)]
Eliminate transaction set from spec parsing internals

13 years agoPass flags directly to the lower level parseSpec() helper
Panu Matilainen [Wed, 1 Sep 2010 14:13:26 +0000 (17:13 +0300)]
Pass flags directly to the lower level parseSpec() helper

13 years agoEliminate parseSpec() from librpmbuild, trim unused arguments
Panu Matilainen [Wed, 1 Sep 2010 14:09:34 +0000 (17:09 +0300)]
Eliminate parseSpec() from librpmbuild, trim unused arguments
- We can't keep compatibility while eliminating goo like transaction set
  from the arguments so dont bother trying.

13 years agoUpdate callers to use the new rpmSpecParse() interface
Panu Matilainen [Wed, 1 Sep 2010 13:59:22 +0000 (16:59 +0300)]
Update callers to use the new rpmSpecParse() interface

13 years agoA new saner interface for parsing spec files
Panu Matilainen [Wed, 1 Sep 2010 13:49:43 +0000 (16:49 +0300)]
A new saner interface for parsing spec files
- For now just a wrapper around parseSpec() that returns *gasp*
  a pointer to a parsed spec structure.
- Limit the amount of goo that needs passing - optimally we'd only need
  the spec + parsing flags, but due to %{buildroot} macro abuse in specs
  we'll need that for now too.

13 years agoEliminate silly and unused timecheck feature from (lib)rpmbuild
Panu Matilainen [Wed, 1 Sep 2010 13:47:43 +0000 (16:47 +0300)]
Eliminate silly and unused timecheck feature from (lib)rpmbuild
- This was broken for years without anybody complaining, should
  be safe to conclude nobody will miss it later either. And if
  somebody misses it, this is a job for rpmlint really.

13 years agoSpec rootDir is only relevant for building, eliminate from parseSpec()
Panu Matilainen [Wed, 1 Sep 2010 11:31:49 +0000 (14:31 +0300)]
Spec rootDir is only relevant for building, eliminate from parseSpec()
- The whole rootDir seems dubious for build purposes, but in any case its
  only relevant during the actual build process, not for spec parsing.
  Set spec->rootDir from buildSpec() for the duration of the
  build to avoid having to refactor doScript() and all right now.

13 years agoEliminate cookie from spec structure
Panu Matilainen [Wed, 1 Sep 2010 11:00:54 +0000 (14:00 +0300)]
Eliminate cookie from spec structure
- Cookies are not a property of spec but a given build, handle this
  internally to buildSpec() except for --rebuild which passes the
  srpm identifier cookie through buildArgs

13 years agoSanitize buildSpec() arguments a bit
Panu Matilainen [Wed, 1 Sep 2010 10:46:49 +0000 (13:46 +0300)]
Sanitize buildSpec() arguments a bit

13 years agoReplace buildSpec() with a new interface in the API
Panu Matilainen [Wed, 1 Sep 2010 10:37:37 +0000 (13:37 +0300)]
Replace buildSpec() with a new interface in the API
- Accept the entire build arguments structure along with a spec, these
  contain everything that we'll need
- Just a convenience wrapper for buildSpec() for now, more things
  to follow...
- Update the sole existing caller accordingly

13 years agoLift remaining build-related stuff out of librpm over to build-side
Panu Matilainen [Wed, 1 Sep 2010 09:26:26 +0000 (12:26 +0300)]
Lift remaining build-related stuff out of librpm over to build-side
- none of this belongs to librpm headers and ABI

13 years agoEliminate useless hardwired build debug foo
Panu Matilainen [Tue, 31 Aug 2010 05:53:33 +0000 (08:53 +0300)]
Eliminate useless hardwired build debug foo

13 years agoPassed-in values are const for every headerPutType() variant
Panu Matilainen [Tue, 31 Aug 2010 11:37:51 +0000 (14:37 +0300)]
Passed-in values are const for every headerPutType() variant
- Silly oversight back then, oh well... this shouldn't affect any callers,
  just avoids dumb warnings where none should be seen

13 years agoUpdate translations to pick up new messages
Panu Matilainen [Wed, 1 Sep 2010 07:25:06 +0000 (10:25 +0300)]
Update translations to pick up new messages

13 years agoAdd newly added files to POTFILES.in too
Panu Matilainen [Wed, 1 Sep 2010 07:24:11 +0000 (10:24 +0300)]
Add newly added files to POTFILES.in too

13 years agodebugedit: fix incorrect error messages regarding -b and -d
Anssi Hannula [Mon, 16 Aug 2010 23:29:14 +0000 (02:29 +0300)]
debugedit: fix incorrect error messages regarding -b and -d

13 years agoAdd files for testing SELinux collection/plugin
Steve Lawrence [Mon, 30 Aug 2010 20:32:32 +0000 (16:32 -0400)]
Add files for testing SELinux collection/plugin

This adds two basic tarballs, one containing two minimal executables
(foo & bar), and one contain a simple policy for the two executables.
This also adds a new spec file with a policy subpackage, the new
%sepolicy section, and the sepolicy collection.

13 years agoAdd SELinux policy plugin
Steve Lawrence [Mon, 30 Aug 2010 20:32:31 +0000 (16:32 -0400)]
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.

13 years agoUse selabel interfaces instead of matchpathcon
Steve Lawrence [Mon, 30 Aug 2010 20:32:30 +0000 (16:32 -0400)]
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.

13 years agoAdd new %sepolicy section to the spec file format
Steve Lawrence [Mon, 30 Aug 2010 20:32:29 +0000 (16:32 -0400)]
Add new %sepolicy section to the spec file format

The %sepolicy section is used to describe SELinux policy to be included
in a package. It's syntax is similar to other sections (%files, %pre,
%post, etc.) in that you can provide a string and -n after the
declaration to specify policy should be added to a subpackage.

For example:

%sepolicy
 # policy in this section will be added to the main package

%sepolicy foo
 # policy in this section will be added to the '<mainpackage>-foo' subpackage

%sepolicy -n bar
 # policy in this section will be added to the 'bar' subpackage

The %sepolicy section contains zero or more %semodule directives, with the
following format:

%semodule [OPTIONS] path/to/module.pp

The available options are:

-b, --base
The module is a base module

-n, --name=NAME
The name of the module. If not given, assumes the name is the basename of
the module file with file extensions removed.

-t, --types=TYPES
One or more comma-separated strings specifying which policy types the
module can work with. To explicitly state that a module can work with any
policy type, "default" can be specified as the value. If not specified,
assumes the module can work with any policy type, and assigns the types as
"default".

Below is an example of this new format:

  %sepolicy
  %semodule -n foo -t mls policy/foo.pp
  %semodule -n bar -t strict,targeted,mls -b policy/bar.pp

This also adds new header tags to store the new information:
 RPMTAG_POLICYNAMES        (string array)
 RPMTAG_POLICYTYPES        (string array)
 RPMTAG_POLICYTYPESINDEXES (uint32 array)
 RPMTAG_POLICYFLAGS        (uint32 array)

The index of NAMES and FLAGS maps directly to the index of RPMTAG_POLICIES.
However, because a single policy can have multiple types, the mapping for
TYPES is not direct. For this, the index maps to TYPESINDEXES, which
contains the index of the policy that the type maps to. This is similar to
how DIRINDEXES is used to map DIRNAMES and BASENAMES. As an example, the
previous %sepolicy section would have the following header tags:

RPMTAG_POLICIES:
 0: <foo.pp data, base64 encoded>
 1: <bar.pp data, base64 encoded>

RPMTAG_POLICYNAMES:
 0: foo
 1: bar

RPMTAG_POLICYFLAGS:
 0: 0
 1: 1 # assumes flag 1 == BASE

RPMTAG_POILCYTYPES:        RPMTAG_POLICYTYPESINDEXES:
 0: mls                     0: 0
 1: strict                  1: 1
 2: targeted                2: 1
 3: mls                     3: 1

13 years agoRemove the existing %policy directive
Steve Lawrence [Mon, 30 Aug 2010 20:32:28 +0000 (16:32 -0400)]
Remove the existing %policy directive

Remove the existing %policy directive, to be replaced with a new
%sepolicy section with more configurable options.

13 years agoUpdate the plugin architecture to allow for remembering state
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.

13 years agoPermit packages with no files to omit %files entirely
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.

13 years agoClean up newPackage() a bit
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.

13 years agoSplit arch/os/platform adding out of parseSpec()
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.

13 years agoStuff the remaining truly internal structure defs out of sight
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.

13 years agoMass eviction of remaining internal helpers in librpmbuild API
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.

13 years agoEliminate unused spec argument from addReqProv()
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

13 years agoBury OpenFileInfo inside parseSpec.c
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.

13 years agoEliminate freePackage() from librpmbuild API
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.

13 years agoEliminate initSourceHeader() from librpmbuild API
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.

13 years agoEliminate ancient leftover initSourceHeader() call
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.

13 years agoInitialize source header from parseSpec() instead of caller(s)
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.

13 years agoMove source+patch tag insertion into initSourceHeader()
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

13 years agoEliminate an exit point from parseSpec()
Panu Matilainen [Wed, 25 Aug 2010 09:25:55 +0000 (12:25 +0300)]
Eliminate an exit point from parseSpec()

13 years agoEliminate doRmSource() from librpmbuild API again
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

13 years agoFix RhBug:452477 differently to avoid doRmSource()
Panu Matilainen [Wed, 25 Aug 2010 08:03:26 +0000 (11:03 +0300)]
Fix RhBug:452477 differently to avoid doRmSource()

13 years agoEliminate addChangelogEntry() from librpmbuild API
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

13 years agoEliminate buildHost() and getBuildTime() from librpmbuild API
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

13 years agoEliminate checkPackages() from librpmbuild API
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

13 years agoEliminate parseExpressionString() from librpmbuild
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...

13 years agoEliminate freePackages() from librpmbuild API
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

13 years agoEliminate now unnecessary buildio.h
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

13 years agoSend the mostly broken rpminject and rpmsort "test programs" to shredder
Panu Matilainen [Tue, 24 Aug 2010 10:14:48 +0000 (13:14 +0300)]
Send the mostly broken rpminject and rpmsort "test programs" to shredder

13 years agoEliminate newOpenFileInfo() from librpmbuild API
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

13 years agoEliminate addSource() from librpmbuild API
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

13 years agoEliminate parseNoSource() from librpmbuild API
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

13 years agoRemove ancient autohelp-handling related leftovers
Panu Matilainen [Mon, 23 Aug 2010 10:08:23 +0000 (13:08 +0300)]
Remove ancient autohelp-handling related leftovers

13 years agoLose leftover variable, use const for s to clarify usage
Panu Matilainen [Mon, 23 Aug 2010 06:51:52 +0000 (09:51 +0300)]
Lose leftover variable, use const for s to clarify usage

13 years agol10n: Updated Polish (pl) translation to 100%
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).

13 years agoRemove signing support from (lib)rpmbuild
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

13 years agoYet another unused copy of identifyDepend() hiding inline
Panu Matilainen [Fri, 20 Aug 2010 13:00:38 +0000 (16:00 +0300)]
Yet another unused copy of identifyDepend() hiding inline

13 years agoHack to get popt working when running from build tree
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.

13 years agoArgh. Realize we already have equivalents of initCli() and finishCli()
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.

13 years agoRemove unused code, hidden away from compiler warnings via inlining
Panu Matilainen [Fri, 20 Aug 2010 11:48:44 +0000 (14:48 +0300)]
Remove unused code, hidden away from compiler warnings via inlining

13 years agoKludge to get rid of ugly lone --quiet on usage message
Panu Matilainen [Fri, 20 Aug 2010 11:31:16 +0000 (14:31 +0300)]
Kludge to get rid of ugly lone --quiet on usage message

13 years agoUpdate translations to pick up stuff moving around
Panu Matilainen [Fri, 20 Aug 2010 11:27:35 +0000 (14:27 +0300)]
Update translations to pick up stuff moving around

13 years agoMove --pipe handling to cliutils helpers
Panu Matilainen [Fri, 20 Aug 2010 10:47:05 +0000 (13:47 +0300)]
Move --pipe handling to cliutils helpers

13 years agoOops, fallout from commit 5fe63cd8e0b552a9687666e8b5f9454cf274d69d
Panu Matilainen [Fri, 20 Aug 2010 10:42:00 +0000 (13:42 +0300)]
Oops, fallout from commit 5fe63cd8e0b552a9687666e8b5f9454cf274d69d

13 years agoLump much of the common cli-init + finish tasks into cliutils helpers
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

13 years agoAdd a convenience library for stuff common cli-bits into
Panu Matilainen [Fri, 20 Aug 2010 09:08:10 +0000 (12:08 +0300)]
Add a convenience library for stuff common cli-bits into

13 years agoIf MiNT can't cope, frankly my dear, I dont give a damn
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

13 years agoMerge build.[ch] into rpmbuild.c, doesn't make sense to separate anymore
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

13 years agoClean up rpmbuild's --quiet handling + honor it on --rebuild too
Panu Matilainen [Fri, 20 Aug 2010 08:16:17 +0000 (11:16 +0300)]
Clean up rpmbuild's --quiet handling + honor it on --rebuild too

13 years agoCosmetics cleanup
Panu Matilainen [Fri, 20 Aug 2010 08:06:24 +0000 (11:06 +0300)]
Cosmetics cleanup

13 years agoEliminate unnecessary sanity checks wrt --sign and fix indentation
Panu Matilainen [Fri, 20 Aug 2010 08:02:14 +0000 (11:02 +0300)]
Eliminate unnecessary sanity checks wrt --sign and fix indentation

13 years agoTest argument count early, avoiding the need to re-check over and over
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.