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