createrepo_c-vl.spec 17 KB

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