createrepo_c-vl.spec 17 KB

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