createrepo_c-vl.spec 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. %{!?_licensedir:%global license %%doc}
  2. %global bash_completion %config%{_sysconfdir}/bash_completion.d/createrepo_c.bash
  3. %{!?python2_sitearch:%global python2_sitearch %{python_sitearch}}
  4. %bcond_without python3
  5. %bcond_with drpm
  6. Summary: Creates a common metadata repository
  7. Name: createrepo_c
  8. Version: 0.17.0
  9. Release: 1%{?_dist_release}
  10. Group: admin-tools
  11. Vendor: Project Vine
  12. Distribution: Vine Linux
  13. License: GPLv2+
  14. URL: https://github.com/rpm-software-management/createrepo_c
  15. Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
  16. BuildRequires: cmake
  17. BuildRequires: gcc
  18. BuildRequires: bzip2-devel
  19. BuildRequires: doxygen
  20. BuildRequires: expat-devel
  21. BuildRequires: file-devel
  22. BuildRequires: glib2-devel >= 2.22.0
  23. BuildRequires: curl-devel
  24. BuildRequires: libxml2-devel
  25. BuildRequires: openssl-devel
  26. BuildRequires: rpm-devel >= 4.8.0-28
  27. BuildRequires: sqlite3-devel
  28. BuildRequires: xz-devel
  29. BuildRequires: zlib-devel
  30. Requires: %{name}-libs = %{version}-%{release}
  31. BuildRequires: bash-completion
  32. %if %{with drpm}
  33. BuildRequires: drpm-devel >= 0.1.3
  34. %endif
  35. Requires: rpm >= 4.16.0
  36. %description
  37. C implementation of Createrepo.
  38. A set of utilities (createrepo_c, mergerepo_c, modifyrepo_c)
  39. for generating a common metadata repository from a directory of
  40. rpm packages and maintaining it.
  41. %package libs
  42. Summary: Library for repodata manipulation
  43. Group: system
  44. %description libs
  45. Libraries for applications using the createrepo_c library
  46. for easy manipulation with a repodata.
  47. %package devel
  48. Summary: Library for repodata manipulation
  49. Group: programming
  50. Requires: %{name}-libs%{?_isa} = %{version}-%{release}
  51. %description devel
  52. This package contains the createrepo_c C library and header files.
  53. These development files are for easy manipulation with a repodata.
  54. %if %{with python3}
  55. %package -n python3-%{name}
  56. Summary: Python 3 bindings for the createrepo_c library
  57. Group: programming
  58. %{?python_provide:%python_provide python3-%{name}}
  59. BuildRequires: python3-rpm-macros
  60. BuildRequires: python3-devel
  61. BuildRequires: python3-nose
  62. BuildRequires: python3-sphinx
  63. Requires: %{name}-libs = %{version}-%{release}
  64. %description -n python3-%{name}
  65. Python 3 bindings for the createrepo_c library.
  66. %endif
  67. %debug_package
  68. %prep
  69. %setup -q
  70. mkdir build
  71. %build
  72. # Build createrepo_c with Python
  73. pushd build
  74. %cmake ../ \
  75. -DPYTHON_DESIRED:FILEPATH=%{__python3} \
  76. -DWITH_ZCHUNK=OFF \
  77. -DWITH_LIBMODULEMD=OFF \
  78. -DENABLE_DRPM=OFF
  79. make %{?_smp_mflags} RPM_OPT_FLAGS="%{optflags}"
  80. # Build C documentation
  81. make doc-c
  82. popd
  83. %install
  84. rm -rf %{buildroot}
  85. pushd build
  86. make install DESTDIR=%{buildroot}
  87. popd
  88. ln -sr %{buildroot}%{_bindir}/createrepo_c %{buildroot}%{_bindir}/createrepo
  89. ln -sr %{buildroot}%{_bindir}/mergerepo_c %{buildroot}%{_bindir}/mergerepo
  90. ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo
  91. %check
  92. pushd build
  93. # Compile C tests
  94. make tests
  95. # Run Python3 tests
  96. make ARGS="-V" test
  97. popd
  98. %post libs -p /sbin/ldconfig
  99. %postun libs -p /sbin/ldconfig
  100. %files
  101. %license COPYING
  102. %doc README.md
  103. %{_mandir}/man8/createrepo_c.8*
  104. %{_mandir}/man8/mergerepo_c.8*
  105. %{_mandir}/man8/modifyrepo_c.8*
  106. %{_mandir}/man8/sqliterepo_c.8*
  107. #%{bash_completion}
  108. %{_bindir}/createrepo_c
  109. %{_bindir}/mergerepo_c
  110. %{_bindir}/modifyrepo_c
  111. %{_bindir}/sqliterepo_c
  112. %{_bindir}/createrepo
  113. %{_bindir}/mergerepo
  114. %{_bindir}/modifyrepo
  115. %dir %{_datadir}/bash-completion
  116. %dir %{_datadir}/bash-completion/completions
  117. %{_datadir}/bash-completion/completions/*
  118. %files libs
  119. %license COPYING
  120. %{_libdir}/lib%{name}.so.*
  121. %files devel
  122. %doc build/doc/html
  123. %{_libdir}/lib%{name}.so
  124. %{_libdir}/pkgconfig/%{name}.pc
  125. %{_includedir}/%{name}/
  126. %if %{with python3}
  127. %files -n python3-%{name}
  128. %{python3_sitearch}/*
  129. %endif
  130. %changelog
  131. * Mon Feb 22 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.17.0-1
  132. - new upstream release.
  133. * Mon Aug 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.16.0-1
  134. - new upstream release.
  135. * Mon May 20 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.13.2-1
  136. - new upstream release.
  137. * Mon Dec 10 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.11.1-1
  138. - new upstream release.
  139. * Sun Jul 17 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.10.0-6
  140. - initial build for Vine Linux.
  141. * Tue Apr 12 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.10.0-5
  142. - Make drpm builds conditional
  143. * Sun Apr 10 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.10.0-4
  144. - Don't own python3_sitearch dir in python3 subpkg
  145. - Use %%license macro
  146. - Follow modern packaging guidelines
  147. - Cleanups in spec file
  148. - Follow packaging guidelines about SourceURL
  149. - Fix license
  150. * Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-3
  151. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  152. * Fri Jan 8 2016 Orion Poplawski <orion@cora.nwra.com> - 0.10.0-2
  153. - Remove comments causing trouble with post/postun scriptlets
  154. * Tue Jan 5 2016 Tomas Mlcoch <tmlcoch at redhat.com> - 0.10.0-1
  155. - Python 3 support (made by Ralph Bean)
  156. - Modify gen_rst.py to indicate --sqliterepo is an option too (Neal Gompa)
  157. - Do not compress manpages at generation time (Neal Gompa)
  158. * Tue Oct 20 2015 Tomas Mlcoch <tmlcoch at redhat.com> - 0.9.1-1
  159. - Fix double free during parsing broken XML metadata (Issue #33)
  160. - Tests: Add acceptance test for --general-compress-type option
  161. - Fix 'CR_CW_UNKNOWN_COMPRESSION cannot be used' error
  162. - Refactoring: Fix compiler warnings
  163. - Add --general-compress-type option (RhBug 1253850)
  164. - Enable drpm support when drpm library is detected on system (RhBug: 1261031) (Issue #37)
  165. - fix traceback on non-complete datetime information (Jarek Polok)
  166. - parsehdr: Skip broken dependency with bad (non-numerical) epoch and print warning about that
  167. (https://lists.fedoraproject.org/pipermail/devel/2015-August/213882.html)
  168. - misc: cr_str_to_evr(): Return NULL instead of "0" for bad (non-numerical) epoch
  169. - updateinfo: Fix a typo in the package release attribute (Luke Macken)
  170. - CMake: Don't require CXX compiler
  171. - Tests for different checksum type for RPMs and repodata files (#31)
  172. - Support different checksum type for RPMs and repodata files (#31)
  173. * Tue Jul 7 2015 Tomas Mlcoch <tmlcoch at redhat.com> - 0.9.0-2
  174. - Add drpm as a BuildRequire
  175. * Thu May 28 2015 Tomas Mlcoch <tmlcoch at redhat.com> - 0.9.0-1
  176. - mergerepo_c: Prepend protocol (file://) for URLs in pkgorigins (if --koji is used)
  177. - Update bash completion
  178. - doc: Update manpages
  179. - mergerepo: Fix NVR merging method
  180. - mergerepo: Fix behavior of --all param
  181. - createrepo: Add --cut-dirs and --location-prefix options
  182. - misc: Add cr_cut_dirs()
  183. - mergerepo: Use better version comparison algorithm
  184. - utils: Port cr_cmp_version_str() to rpm's algorithm (rpmvercmp)
  185. - misc: Rename elements in cr_Version structure
  186. - mergerepo: Fix version-release comparison for packages when --all is used
  187. - mergerepo: Show warnings if some groupfile cannot be automatically used
  188. - mergerepo: Exit with error code when a groupfile cannot be copied
  189. * Fri May 15 2015 Tomas Mlcoch <tmlcoch at redhat.com> - 0.8.3-1
  190. - mergerepo: Do not prepend file:// if protocol is already specified
  191. * Thu May 14 2015 Tomas Mlcoch <tmlcoch at redhat.com> - 0.8.2-1
  192. - doc: Add man pages for sqliterepo and update manpages for other tools
  193. - mergerepo: Work only with noarch packages if --koji is used and
  194. no archlist is specified
  195. - mergerepo: Use file:// protocol in local baseurl
  196. - mergerepo: Do not include baseurl for first repo if --koji is specified (RhBug: 1220082)
  197. - mergerepo_c: Support multilib arch for --koji repos
  198. - mergerepo_c: Refactoring
  199. - Print debug message with version in each tool when --verbose is used
  200. - modifyrepo: Don't override file with itself (RhBug: 1215229)
  201. * Wed May 6 2015 Tomas Mlcoch <tmlcoch at redhat.com> - 0.8.1-1
  202. - Fix bash completion for RHEL 6
  203. * Tue May 5 2015 Tomas Mlcoch <tmlcoch at redhat.com> - 0.8.0-1
  204. - New tool Sqliterepo_c - It generates sqlite databases into repos
  205. where the sqlite is missing.
  206. - Internal refactoring and code cleanup
  207. * Fri Feb 20 2015 Tomas Mlcoch <tmlcoch at redhat.com> - 0.7.7-1
  208. - Proper directory for temporary files when --local-sqlite is used (Issue #12)
  209. - Bring bash completion install dir and filenames up to date with current bash-completion
  210. * Thu Jan 8 2015 Tomas Mlcoch <tmlcoch at redhat.com> - 0.7.6-1
  211. - Python: Add __contains__ method to Repomd() class
  212. * Sun Dec 28 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.7.5-1
  213. - Python repomd: Support for iteration and indexing by type - e.g. record = repomd['primary']
  214. - Show warning if an XML parser probably parsed a bad type of medata (New XML parser warning type CR_XML_WARNING_BADMDTYPE)
  215. - drpm library: Explicitly try to locate libdrpm.so.0
  216. - deltarpms: Don't show options for delta rpms if support is not available
  217. * Tue Nov 11 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.7.4-1
  218. - createrepo_c, mergerepo_c: Follow redirs by default while downloading remote repos
  219. - mergerepo_c: Fix segfault when a package without sourcerpm is part of metadata and --koji option is used
  220. * Mon Nov 10 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.7.3-1
  221. - xml_parser: Add file path into error messages
  222. - Refactor: Replace g_error() with g_critical() (RhBug: 1162102)
  223. * Thu Nov 06 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.7.2-1
  224. - createrepo_c: New option --local-sqlite
  225. * Fri Oct 31 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.7.1-1
  226. - Mergerepo: Fix mergerepo
  227. - Mergerepo: Add some debugging of metadata read.
  228. * Mon Oct 20 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.7.0-1
  229. - deltarpms: Update module to work with current version of drpm
  230. - mergerepo_c: Add --omit-baseurl option
  231. - craterepo_c: Gen empty repo if empty pkglist is used
  232. - Docs: Output python docs to separate directory
  233. - Several small fixes
  234. * Tue Aug 12 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.6.1-1
  235. - updateinfo: Use Python datetime objects in python bindings
  236. * Tue Aug 5 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.6.0-1
  237. - Support for updateinfo.xml manipulation (including Python bindings)
  238. * Fri Jul 18 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.5.0-1
  239. - Experimental delta rpm (DRPM) support (Disabled in Fedora build).
  240. * Thu Jun 26 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.4.1-1
  241. - Initialize threads correctly on old versions of GLib2 (RhBug: 1108787)
  242. - Do not print log domain (get rid off C_CREATEREPOLIB prefix in log messages)
  243. - Implements support for --cachedir
  244. - New option --retain-old-md-by-age
  245. - Few small API changes
  246. * Tue May 6 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.4.0-1
  247. - Change default behavior of repodata files handling. (RhBug: 1094539)
  248. See: https://github.com/Tojaj/createrepo_c/wiki/New-File-Handling
  249. By default, createrepo leaves old groupfiles (comps files)
  250. in the repodata/ directory during update.
  251. Createrepo_c did the same thing but the version 0.4.0 changes this behaviour.
  252. * Thu Apr 10 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.3.1-2
  253. - Support for weak and rich dependecies
  254. * Mon Mar 10 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.3.0-1
  255. - Relevant only for developers using createrepo_c library: New approach for
  256. metadata loading in case of internal high-level parser functions (see commit
  257. messages for more information: d6ed327595, 0b0e75203e, ad1e8450f5)
  258. - Support for changelog limit value == -1 (include all changelogs)
  259. - Update debug compilation flags
  260. - Update man pages (Add synompsis with usage)
  261. - Update usage examples in help
  262. * Thu Feb 20 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.2.2-1
  263. - Temporary remove deltarepo subpackages
  264. - cmake: Do not install deltarepo stuff yet
  265. - helper: Removed cr_remove_metadata() and cr_get_list_of_md_locations()
  266. - Add module helpers
  267. - Sanitize strings before writting them to XML or sqlitedb (ISSUE #3)
  268. * Mon Jan 27 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.2.1-3
  269. - New expert option: --ignore-lock
  270. * Mon Jan 20 2014 Tomas Mlcoch <tmlcoch at redhat.com> - 0.2.1-2
  271. - More effort to avoid residual .repodata/ directory on error
  272. - Add deltarepo and python-deltarepo subpackages
  273. - Add modifyrepo_c
  274. - Add documentation for python bindings
  275. - Refactored code & a lot of little bug fixes
  276. * Wed Aug 14 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.2.1-1
  277. - checksum: Set SHA to be the same as SHA1 (For compatibility with original
  278. Createrepo)
  279. * Mon Aug 5 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.2.0-1
  280. - Speedup (More parallelization)
  281. - Changed C API
  282. - Add python bindings
  283. - A lot of bugfixes
  284. - Add new make targets: tests (make tests - builds c tests) and test
  285. (make test - runs c and python test suits).
  286. - Changed interface of most of C modules - Better error reporting
  287. (Add GError ** param).
  288. - Experimental Python bindings (Beware: The interface is not final yet!).
  289. - package: Add cr_package_copy method.
  290. - sqlite: Do not recreate tables and triggers while opening existing db.
  291. - mergerepo_c: Implicitly use --all with --koji.
  292. - Man page update.
  293. * Thu Apr 11 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.17-3
  294. - mergerepo_c: Add --simple-md-filenames and --unique-md-filenames
  295. options. (RhBug: 950994)
  296. - mergerepo_c: Always include noarch while mimic koji
  297. mergerepos. (RhBug: 950991)
  298. - Rename cr_package_parser_shutdown to cr_package_parser_cleanup()
  299. - cr_db_info_update is now safe from sqlinjection.
  300. * Mon Mar 25 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.17-1
  301. - Fix double free() when old metadata parsing failed. (related to RhBug: 920795)
  302. - Convert all strings to UTF-8 while dumping XML. (related RhBug: 920795)
  303. * Mon Mar 11 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.16-2
  304. - Remove creation of own empty rpm keyring for a transaction set.
  305. This is not necessary since rpm-4.8.0-28 (rpm commit
  306. cad147070e5513312d851f44998012e8f0cdf1e3). Moreover, own rpm keyring
  307. causes a race condition in threads (causing double free()) which use
  308. rpmReadPackageFile() called from cr_package_from_rpm().
  309. * Thu Mar 07 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.16-1
  310. - Fix usage of rpm keyring (RhBug:918645)
  311. - More generic interface of repomd module
  312. - Code refactoring
  313. - Add some usage examples into the doxygen documentation and .h files
  314. - Rename version constants in version.h
  315. - New function cr_package_nevra (returns package nevra string)
  316. * Mon Feb 11 2013 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.15-1
  317. - Fix bug in final move from .repodata/ -> repodata/
  318. - Fix warnings from RPM library. RPM library is thread-unsafe. This
  319. includes also reading headers. Use of empty keyring for rpm transaction
  320. should work around the problem.
  321. * Tue Nov 27 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.14-1
  322. - Fix filelists database generation (use '.' instead of '' for current dir)
  323. * Tue Nov 20 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.13-1
  324. - Fix race-condition during task buffering in createrepo_c
  325. * Tue Nov 20 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.12-2
  326. - Fix removing old repomd.xml while --update
  327. * Thu Nov 15 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.12-1
  328. - Fix bug in sqlite filelists database
  329. - Fix memory leak
  330. * Fri Nov 09 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.11-1
  331. - Deterministic output! Packages in output repodata are now sorted
  332. by ASCII value
  333. - Support for Koji mergerepos behaviour in mergerepo_c
  334. (new --koji, --groupfile and --blocked params)
  335. - Better atomicity while finall move .repodata/ -> repodata/
  336. - Repomd module supports pkgorigins record
  337. - Some new functions in misc module
  338. - Small changes in library interface
  339. * Wed Oct 03 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.10-1
  340. - Another memory usage optimalization
  341. * Mon Sep 03 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.9-1
  342. - Some changes in library interface
  343. - Memory usage optimalization
  344. - Fix a segfault and a race condition
  345. - New cmd options: --read-pkgs-list and --retain-old-md param
  346. - Few other bugfixes
  347. * Wed Aug 15 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.8-1
  348. - New interface of repomd module
  349. - New cmd options: --repo --revision --distro --content --basedir
  350. - New createrepo_c specific cmd option --keep-all-metadata
  351. - Few bugfixes
  352. * Thu Jul 26 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.7-1
  353. - SQLite support
  354. - Bash completion
  355. - createrepo_c support for --compress-type param
  356. - Improved logging
  357. - Subpackages -devel and -libsi
  358. - Relicensed to GPLv2
  359. - Doxygen documentation in devel package
  360. - README update
  361. * Mon Jun 11 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.5-1
  362. - Support for .xz compression
  363. - Unversioned .so excluded from installation
  364. * Mon Jun 4 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.4-1
  365. - New mergerepo params: --all, --noarch-repo and --method
  366. - Fix segfault when more than one --excludes param used
  367. * Mon May 28 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.3-1
  368. - Set RelWithDebInfo as default cmake build type
  369. * Wed May 23 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.2-1
  370. - Add version.h header file
  371. * Wed May 23 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.1-1
  372. - Add license
  373. * Wed May 9 2012 Tomas Mlcoch <tmlcoch at redhat.com> - 0.1.0-1
  374. - First public release