services/createrepo_c.git
8 years agoMore explicit string type checking.
Ralph Bean [Mon, 16 Nov 2015 14:19:29 +0000 (09:19 -0500)]
More explicit string type checking.

8 years agoMore fixes to the tests.
Ralph Bean [Mon, 16 Nov 2015 04:30:04 +0000 (23:30 -0500)]
More fixes to the tests.

8 years agoActually, let's go with unicode everywhere over bytes.
Ralph Bean [Mon, 16 Nov 2015 04:29:50 +0000 (23:29 -0500)]
Actually, let's go with unicode everywhere over bytes.

8 years agoFix module initialization.
Ralph Bean [Mon, 16 Nov 2015 04:27:17 +0000 (23:27 -0500)]
Fix module initialization.

8 years agoFix PyTypeObject initialization.
Ralph Bean [Mon, 16 Nov 2015 03:51:39 +0000 (22:51 -0500)]
Fix PyTypeObject initialization.

8 years agoTreat strings as explicit byte strings.
Ralph Bean [Mon, 16 Nov 2015 03:51:02 +0000 (22:51 -0500)]
Treat strings as explicit byte strings.

8 years agoMore relative imports.
Ralph Bean [Sun, 15 Nov 2015 23:02:25 +0000 (18:02 -0500)]
More relative imports.

8 years agoHandle floats and ints.
Ralph Bean [Sun, 15 Nov 2015 23:01:49 +0000 (18:01 -0500)]
Handle floats and ints.

8 years agoFix py2/3 compat issues in the acceptance tests.
Ralph Bean [Sun, 15 Nov 2015 22:57:53 +0000 (17:57 -0500)]
Fix py2/3 compat issues in the acceptance tests.

8 years agopy3 syntax error in the test suite.
Ralph Bean [Sat, 14 Nov 2015 15:21:14 +0000 (10:21 -0500)]
py3 syntax error in the test suite.

8 years agoAdjust the build process to be py2/py3 compatible.
Ralph Bean [Sat, 14 Nov 2015 15:21:03 +0000 (10:21 -0500)]
Adjust the build process to be py2/py3 compatible.

8 years agoFix a typo.
Ralph Bean [Sat, 14 Nov 2015 14:30:50 +0000 (09:30 -0500)]
Fix a typo.

8 years agoBump to 0.9.1
Tomas Mlcoch [Tue, 20 Oct 2015 11:56:20 +0000 (13:56 +0200)]
Bump to 0.9.1

8 years agoRefactoring: Make parse_period_of_time() function static
Tomas Mlcoch [Tue, 20 Oct 2015 11:46:05 +0000 (13:46 +0200)]
Refactoring: Make parse_period_of_time() function static

8 years agoRefactoring: Add cr_ prefix to function hascontrollchars()
Tomas Mlcoch [Tue, 20 Oct 2015 11:24:39 +0000 (13:24 +0200)]
Refactoring: Add cr_ prefix to function hascontrollchars()

hascontrollchars -> cr_hascontrollchars

The prefix was added because the function is exported as a symbol
from libcreaterepo_c shared library.

8 years agoFix double free during parsing broken XML metadata (Issue #33)
Tomas Mlcoch [Thu, 8 Oct 2015 11:30:58 +0000 (13:30 +0200)]
Fix double free during parsing broken XML metadata (Issue #33)

The issue was reported by Rohan McGovern including excelent
reproducer and detail problem analysis.

Rohan's theory that was absolutely right:

When running in single chunk mode, there is one GStringChunk
which belongs to the cr_Metadata. It's temporarily
assigned/unassigned to/from cr_Package objects in newpkgcb/pkgcb
in load_metadata.c.

If XML parsing stops in the middle of a package element,
pkgcb is not called for the last cr_Package, so the chunk
remains assigned to that object.

The chunk is then freed twice, once when the hash table of
packages is destroyed (end of cr_metadata_load_xml function)
and again when the cr_Metadata object is destroyed.

8 years agoTests: Add acceptance test for --general-compress-type option
Tomas Mlcoch [Thu, 8 Oct 2015 09:43:12 +0000 (11:43 +0200)]
Tests: Add acceptance test for --general-compress-type option

Added test_13_createrepo_general_compress_type test

8 years agoFix 'CR_CW_UNKNOWN_COMPRESSION cannot be used' error
Tomas Mlcoch [Thu, 8 Oct 2015 09:34:01 +0000 (11:34 +0200)]
Fix 'CR_CW_UNKNOWN_COMPRESSION cannot be used' error

This is a bug introduced while implementing
--general-compress-type option.

cmd_options->general_compression_type value was used everytime
without regards if it was set or not.

8 years agoRefactoring: Fix compiler warnings
Tomas Mlcoch [Thu, 8 Oct 2015 09:23:57 +0000 (11:23 +0200)]
Refactoring: Fix compiler warnings

1. Fix usage of "const" modifiers to prevent compiler warnings.
2. In cr_prestodelta_thread() use return value from g_slist_append()
   to be sure that we have correct start of the list stored in
   the hash table.
3. Add another comment to cr_dumper_thread() to explicitly
   tell that stuff we are doing there are modifing package
   strucutres and that it's intentional.

8 years agoAdd --general-compress-type option (RhBug 1253850)
Tomas Mlcoch [Wed, 7 Oct 2015 14:45:01 +0000 (16:45 +0200)]
Add --general-compress-type option (RhBug 1253850)

Createrepo_c behaviour is (in most cases) backward compatible
with classical createrepo.
Classical createrepo doesn't provide a possibility to compress
primary, filelists and other xml metadata by different compress
algorithm than GZ.

To be able to enable this feature in createrepo_c, a new option
--general-compress-type was added.

Behaviour of this option is basically same as --compress-type
except that the specified compress type is used also for
the main xml files (primary, filelists, other).

This option has priority over the existing options --compress-type
and --xz.

8 years agoAdd new contriutors into AUTHORS file
Tomas Mlcoch [Tue, 29 Sep 2015 12:54:41 +0000 (14:54 +0200)]
Add new contriutors into AUTHORS file

8 years agoMerge pull request #34 from lmacken/master
Tomas Mlcoch [Tue, 29 Sep 2015 12:43:52 +0000 (14:43 +0200)]
Merge pull request #34 from lmacken/master

updateinfo: Fix a typo in the package release attribute

8 years agoMerge pull request #35 from jaroslawp/master
Tomas Mlcoch [Tue, 29 Sep 2015 12:42:50 +0000 (14:42 +0200)]
Merge pull request #35 from jaroslawp/master

fix traceback on non-complete datetime information (python)

8 years agoEnable drpm support when drpm library is detected on system (RhBug: 1261031) (Issue...
Tomas Mlcoch [Tue, 29 Sep 2015 12:38:05 +0000 (14:38 +0200)]
Enable drpm support when drpm library is detected on system (RhBug: 1261031) (Issue #37)

8 years agofix traceback on non-complete datetime information
Jarek Polok [Thu, 17 Sep 2015 11:37:02 +0000 (13:37 +0200)]
fix traceback on non-complete datetime information

8 years agoparsehdr: Skip broken dependency with bad (non-numerical) epoch and print warning...
Tomas Mlcoch [Fri, 4 Sep 2015 08:12:06 +0000 (10:12 +0200)]
parsehdr: Skip broken dependency with bad (non-numerical) epoch and print warning about that

Epoch should be always an integer number.
If epoch is undefined, then we expect the epoch to be 0.
If epoch is a string (non-numerical) then it's obviously a bad
dependency and createrepo_c should print a warning and skip
the dep.

We don't want to abort whole generation of repodata and end with error
becuase createrepo_c is used in critical systems which provide software
updates and we don't want to block an update of dozens of packages just
because of one random package that has one broken dep.
Moreover not all deps are always necessary (for example SUGGESTS or ENHANCES, etc.).
Also, the broken package may be a package that is not used by general
audience, for example a devel or debug package and we definitely
don't want to block update because of such package.

See:
https://lists.fedoraproject.org/pipermail/devel/2015-August/213882.html

8 years agomisc: cr_str_to_evr(): Return NULL instead of "0" for bad (non-numerical) epoch
Tomas Mlcoch [Fri, 4 Sep 2015 07:50:41 +0000 (09:50 +0200)]
misc: cr_str_to_evr(): Return NULL instead of "0" for bad (non-numerical) epoch

Epoch which is defined and isn't an integer number is obviously a bad
epoch and cr_str_to_evr should let us know about such epoch.

See: https://lists.fedoraproject.org/pipermail/devel/2015-September/214019.html

Whole thread:
https://lists.fedoraproject.org/pipermail/devel/2015-August/213132.html

8 years agoupdateinfo: Fix a typo in the package release attribute
Luke Macken [Thu, 20 Aug 2015 21:54:50 +0000 (15:54 -0600)]
updateinfo: Fix a typo in the package release attribute

9 years agoCMake: Don't require CXX compiler
Tomas Mlcoch [Tue, 7 Jul 2015 11:29:15 +0000 (13:29 +0200)]
CMake: Don't require CXX compiler

9 years agoTests for different checksum type for RPMs and repodata files (#31)
Tomas Mlcoch [Tue, 30 Jun 2015 08:45:23 +0000 (10:45 +0200)]
Tests for different checksum type for RPMs and repodata files (#31)

9 years agoSupport different checksum type for RPMs and repodata files (#31)
Tomas Mlcoch [Tue, 30 Jun 2015 08:36:24 +0000 (10:36 +0200)]
Support different checksum type for RPMs and repodata files (#31)

9 years agoBump version to 0.9.0
Tomas Mlcoch [Thu, 28 May 2015 10:54:10 +0000 (12:54 +0200)]
Bump version to 0.9.0

9 years agomergerepo_c: Prepend protocol (file://) for URLs in pkgorigins (if --koji is used)
Tomas Mlcoch [Tue, 26 May 2015 11:54:44 +0000 (13:54 +0200)]
mergerepo_c: Prepend protocol (file://) for URLs in pkgorigins (if --koji is used)

9 years agoRefactoring: Better handling of gint64 type
Tomas Mlcoch [Tue, 26 May 2015 11:25:49 +0000 (13:25 +0200)]
Refactoring: Better handling of gint64 type

9 years agoUpdate bash completion
Tomas Mlcoch [Mon, 25 May 2015 06:56:55 +0000 (08:56 +0200)]
Update bash completion

9 years agodoc: Update manpages
Tomas Mlcoch [Mon, 25 May 2015 06:54:19 +0000 (08:54 +0200)]
doc: Update manpages

9 years agomergerepo: Fix NVR merging method
Tomas Mlcoch [Mon, 25 May 2015 06:03:23 +0000 (08:03 +0200)]
mergerepo: Fix NVR merging method

9 years agomergerepo: Fix behavior of --all param
Tomas Mlcoch [Mon, 25 May 2015 05:55:57 +0000 (07:55 +0200)]
mergerepo: Fix behavior of --all param

9 years agocreaterepo: Add --cut-dirs and --location-prefix options
Tomas Mlcoch [Fri, 22 May 2015 13:34:33 +0000 (15:34 +0200)]
createrepo: Add --cut-dirs and --location-prefix options

9 years agomisc: Add cr_cut_dirs()
Tomas Mlcoch [Fri, 22 May 2015 13:26:21 +0000 (15:26 +0200)]
misc: Add cr_cut_dirs()

9 years agocreaterepo: refactorization
Tomas Mlcoch [Fri, 22 May 2015 11:51:21 +0000 (13:51 +0200)]
createrepo: refactorization

9 years agomergerepo_c: Use better version comparison algorithm
Tomas Mlcoch [Fri, 22 May 2015 11:34:59 +0000 (13:34 +0200)]
mergerepo_c: Use better version comparison algorithm

9 years agoutils: Port cr_cmp_version_str() to rpm's algorithm (rpmvercmp)
Tomas Mlcoch [Fri, 22 May 2015 11:17:33 +0000 (13:17 +0200)]
utils: Port cr_cmp_version_str() to rpm's algorithm (rpmvercmp)

9 years agomisc: Rename elements in cr_Version structure
Tomas Mlcoch [Fri, 22 May 2015 10:31:24 +0000 (12:31 +0200)]
misc: Rename elements in cr_Version structure

9 years agomergerepo_c: Fix version-release comparison for packages when --all is used
Tomas Mlcoch [Fri, 22 May 2015 10:20:51 +0000 (12:20 +0200)]
mergerepo_c: Fix version-release comparison for packages when --all is used

9 years agomergerepo: Show warnings if some groupfile cannot be automatically used
Tomas Mlcoch [Thu, 21 May 2015 13:30:32 +0000 (15:30 +0200)]
mergerepo: Show warnings if some groupfile cannot be automatically used

9 years agomergerepo: Fix bug in group file copying
Tomas Mlcoch [Thu, 21 May 2015 13:22:14 +0000 (15:22 +0200)]
mergerepo: Fix bug in group file copying

9 years agomergerepo: Exit with error code when a groupfile cannot be copied
Tomas Mlcoch [Thu, 21 May 2015 13:16:12 +0000 (15:16 +0200)]
mergerepo: Exit with error code when a groupfile cannot be copied

9 years agoBump to 0.8.3
Tomas Mlcoch [Fri, 15 May 2015 06:00:01 +0000 (08:00 +0200)]
Bump to 0.8.3

9 years agomergerepo: Do not prepend file:// if protocol is already specified
Tomas Mlcoch [Fri, 15 May 2015 05:59:38 +0000 (07:59 +0200)]
mergerepo: Do not prepend file:// if protocol is already specified

9 years agoBump to 0.8.2
Tomas Mlcoch [Thu, 14 May 2015 11:27:27 +0000 (13:27 +0200)]
Bump to 0.8.2

9 years agodoc: Add man pages for sqliterepo and update manpages for other tools
Tomas Mlcoch [Thu, 14 May 2015 11:25:57 +0000 (13:25 +0200)]
doc: Add man pages for sqliterepo and update manpages for other tools

9 years agoutils: Update script for man page generation
Tomas Mlcoch [Thu, 14 May 2015 11:25:24 +0000 (13:25 +0200)]
utils: Update script for man page generation

9 years agomergerepo: Work only with noarch packages if --koji and no archlist specified
Tomas Mlcoch [Thu, 14 May 2015 11:09:30 +0000 (13:09 +0200)]
mergerepo: Work only with noarch packages if --koji and no archlist specified

9 years agomergerepo: Use file:// protocol in local baseurl
Tomas Mlcoch [Thu, 14 May 2015 11:00:58 +0000 (13:00 +0200)]
mergerepo: Use file:// protocol in local baseurl

9 years agomergerepo: Do not include baseurl for first repo if --koji is specified (RhBug: 1220082)
Tomas Mlcoch [Thu, 14 May 2015 10:55:24 +0000 (12:55 +0200)]
mergerepo: Do not include baseurl for first repo if --koji is specified (RhBug: 1220082)

9 years agomergerepo_c: Refactoring - append_arch
Tomas Mlcoch [Thu, 14 May 2015 06:04:49 +0000 (08:04 +0200)]
mergerepo_c: Refactoring - append_arch

9 years agomergerepo_c: Support multilib arch for --koji repos
Tomas Mlcoch [Thu, 14 May 2015 06:03:54 +0000 (08:03 +0200)]
mergerepo_c: Support multilib arch for --koji repos

9 years agomergerepo_c: Refactoring
Tomas Mlcoch [Thu, 14 May 2015 05:53:00 +0000 (07:53 +0200)]
mergerepo_c: Refactoring

9 years agoPrint debug message with version in each tool when --verbose is used
Tomas Mlcoch [Tue, 12 May 2015 07:43:17 +0000 (09:43 +0200)]
Print debug message with version in each tool when --verbose is used

9 years agomodifyrepo: Don't override file with itself (RhBug: 1215229)
Tomas Mlcoch [Mon, 11 May 2015 10:35:51 +0000 (12:35 +0200)]
modifyrepo: Don't override file with itself (RhBug: 1215229)

9 years agomodifyrepo: Remove all obsolete metadata that should be removed
Tomas Mlcoch [Mon, 11 May 2015 08:45:09 +0000 (10:45 +0200)]
modifyrepo: Remove all obsolete metadata that should be removed

9 years agomodifyrepo_c: Use cr_identical_files() function
Tomas Mlcoch [Mon, 11 May 2015 08:43:58 +0000 (10:43 +0200)]
modifyrepo_c: Use cr_identical_files() function

9 years agosqliterepo: Use cr_identical_files()
Tomas Mlcoch [Mon, 11 May 2015 07:54:28 +0000 (09:54 +0200)]
sqliterepo: Use cr_identical_files()

9 years agomisc: Add cr_identical_files() function
Tomas Mlcoch [Mon, 11 May 2015 07:54:03 +0000 (09:54 +0200)]
misc: Add cr_identical_files() function

9 years agocleanup: Add missing include of stdio.h
Tomas Mlcoch [Mon, 11 May 2015 07:27:25 +0000 (09:27 +0200)]
cleanup: Add missing include of stdio.h

9 years agoBump to 0.8.1
Tomas Mlcoch [Wed, 6 May 2015 14:52:56 +0000 (16:52 +0200)]
Bump to 0.8.1

9 years agoCMake: Add bash completion for sqliterepo_c into Makefile
Tomas Mlcoch [Wed, 6 May 2015 13:29:16 +0000 (15:29 +0200)]
CMake: Add bash completion for sqliterepo_c into Makefile

9 years agoUpdate bash completion
Tomas Mlcoch [Wed, 6 May 2015 13:24:27 +0000 (15:24 +0200)]
Update bash completion

9 years agomodifyrepo: Update --help output
Tomas Mlcoch [Wed, 6 May 2015 13:15:26 +0000 (15:15 +0200)]
modifyrepo: Update --help output

9 years agoBump to 0.8.0
Tomas Mlcoch [Tue, 5 May 2015 16:13:37 +0000 (18:13 +0200)]
Bump to 0.8.0

9 years agosqliterepo: Add checksum autodetection
Tomas Mlcoch [Tue, 5 May 2015 16:03:15 +0000 (18:03 +0200)]
sqliterepo: Add checksum autodetection

9 years agosqliterepo: Remove few exit() calls
Tomas Mlcoch [Tue, 5 May 2015 14:37:05 +0000 (16:37 +0200)]
sqliterepo: Remove few exit() calls

9 years agoReplace CR_UNUSED with G_GNUC_UNUSED
Tomas Mlcoch [Tue, 5 May 2015 13:14:51 +0000 (15:14 +0200)]
Replace CR_UNUSED with G_GNUC_UNUSED

9 years agoReplace strerror() by g_strerror()
Tomas Mlcoch [Tue, 5 May 2015 12:21:58 +0000 (14:21 +0200)]
Replace strerror() by g_strerror()

9 years agoacceptance tests: Update run_nosetests.sh
Tomas Mlcoch [Tue, 5 May 2015 11:08:52 +0000 (13:08 +0200)]
acceptance tests: Update run_nosetests.sh

9 years agoacceptance tests: Add base set of acceptance tests for sqliterepo_c
Tomas Mlcoch [Tue, 5 May 2015 11:07:35 +0000 (13:07 +0200)]
acceptance tests: Add base set of acceptance tests for sqliterepo_c

9 years agosqliterepo: Proper support for --checksum
Tomas Mlcoch [Tue, 5 May 2015 11:01:40 +0000 (13:01 +0200)]
sqliterepo: Proper support for --checksum

9 years agoacceptance tests: Add tdir_makedirs into BaseTestCase class
Tomas Mlcoch [Tue, 5 May 2015 08:50:59 +0000 (10:50 +0200)]
acceptance tests: Add tdir_makedirs into BaseTestCase class

9 years agosqliterepo: Fix inproper location_real values in records after rename
Tomas Mlcoch [Tue, 5 May 2015 08:50:21 +0000 (10:50 +0200)]
sqliterepo: Fix inproper location_real values in records after rename

9 years agosqliterepo: Fix path building
Tomas Mlcoch [Tue, 5 May 2015 08:13:30 +0000 (10:13 +0200)]
sqliterepo: Fix path building

9 years agoacceptance tests: Update doc string
Tomas Mlcoch [Tue, 5 May 2015 07:46:28 +0000 (09:46 +0200)]
acceptance tests: Update doc string

9 years agoacceptance_tests: Add run_sqlr() method
Tomas Mlcoch [Tue, 5 May 2015 07:45:56 +0000 (09:45 +0200)]
acceptance_tests: Add run_sqlr() method

9 years agotests: Update doc strings
Tomas Mlcoch [Tue, 5 May 2015 06:42:01 +0000 (08:42 +0200)]
tests: Update doc strings

9 years agoRemove old todo comment
Tomas Mlcoch [Tue, 5 May 2015 06:41:48 +0000 (08:41 +0200)]
Remove old todo comment

9 years agoAdd --keep-old option
Tomas Mlcoch [Mon, 4 May 2015 14:59:47 +0000 (16:59 +0200)]
Add --keep-old option

9 years agosqliterepo: Check for existing DBs first (also implement --force)
Tomas Mlcoch [Wed, 29 Apr 2015 14:09:31 +0000 (16:09 +0200)]
sqliterepo: Check for existing DBs first (also implement --force)

9 years agorepomd: Add cr_repomd_copy()
Tomas Mlcoch [Wed, 29 Apr 2015 14:07:13 +0000 (16:07 +0200)]
repomd: Add cr_repomd_copy()

9 years agorepomd: Add cr_repomd_remove_record()
Tomas Mlcoch [Wed, 29 Apr 2015 13:45:34 +0000 (15:45 +0200)]
repomd: Add cr_repomd_remove_record()

9 years agocreaterepo: Update help
Tomas Mlcoch [Tue, 28 Apr 2015 14:44:51 +0000 (16:44 +0200)]
createrepo: Update help

9 years agosqliterepo: First draft
Tomas Mlcoch [Tue, 28 Apr 2015 14:23:46 +0000 (16:23 +0200)]
sqliterepo: First draft

9 years agoxml_dumpers: Return GError when no obj to dump is passed
Tomas Mlcoch [Tue, 28 Apr 2015 13:19:43 +0000 (15:19 +0200)]
xml_dumpers: Return GError when no obj to dump is passed

9 years agoerror: Remove unused quark functions
Tomas Mlcoch [Tue, 28 Apr 2015 13:18:49 +0000 (15:18 +0200)]
error: Remove unused quark functions

9 years agoload_metadata: Insert pkgKey with item index during XML parsing
Tomas Mlcoch [Tue, 21 Apr 2015 13:48:05 +0000 (15:48 +0200)]
load_metadata: Insert pkgKey with item index during XML parsing

9 years agocreaterepo_c: Use _cleanup_file_close_ for sqlite generation
Tomas Mlcoch [Wed, 1 Apr 2015 13:13:53 +0000 (15:13 +0200)]
createrepo_c: Use _cleanup_file_close_ for sqlite generation

9 years agocleanup: More sane _cleanup_file_close_
Tomas Mlcoch [Wed, 1 Apr 2015 12:47:18 +0000 (14:47 +0200)]
cleanup: More sane _cleanup_file_close_

9 years agolocate_metadata: cr_locate_metadata() now takes gboolean instead of int
Tomas Mlcoch [Wed, 1 Apr 2015 11:38:22 +0000 (13:38 +0200)]
locate_metadata: cr_locate_metadata() now takes gboolean instead of int

9 years agocreaterepo_shared: Avoid double removal of the same directory by the failure_exit_cle...
Tomas Mlcoch [Wed, 1 Apr 2015 10:59:09 +0000 (12:59 +0200)]
createrepo_shared: Avoid double removal of the same directory by the failure_exit_cleanup()

9 years agosqliterepo_c: Use cr_setup_logging()
Tomas Mlcoch [Tue, 31 Mar 2015 14:22:43 +0000 (16:22 +0200)]
sqliterepo_c: Use cr_setup_logging()

9 years agomodifyrepo_c: Use cr_setup_logging()
Tomas Mlcoch [Tue, 31 Mar 2015 14:21:03 +0000 (16:21 +0200)]
modifyrepo_c: Use cr_setup_logging()