createrepo_c-vl.spec 17 KB

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