baltix 0.1.1 → 0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -2
  3. data/README.md +136 -10
  4. data/Rakefile +8 -3
  5. data/baltix.gemspec +47 -29
  6. data/bin/console +4 -3
  7. data/data/alt-licenses/README.md +26 -0
  8. data/data/alt-licenses/licenses.json +2991 -0
  9. data/data/alt-rpm/README.md +21 -0
  10. data/data/alt-rpm/architectures.json +613 -0
  11. data/data/spdx/README.md +22 -0
  12. data/data/spdx/licenses.json +9287 -0
  13. data/docs/action-flow.md +42 -0
  14. data/docs/actor-integration.md +71 -0
  15. data/docs/alt-architectures.md +27 -0
  16. data/docs/cleanup-actors.md +14 -0
  17. data/docs/dependency-actions.md +22 -0
  18. data/docs/installation-actors.md +35 -0
  19. data/docs/pkglist.md +56 -0
  20. data/docs/plans/revision-003.md +328 -0
  21. data/docs/plans/revision-004.md +416 -0
  22. data/docs/plans/revision-005.md +431 -0
  23. data/docs/plans/revision-006.md +439 -0
  24. data/docs/plans/revision-007.md +441 -0
  25. data/docs/plans/revision-008.md +445 -0
  26. data/docs/plans/revision-009.md +450 -0
  27. data/docs/plans/revision-010.md +486 -0
  28. data/docs/plans/revision-011.md +500 -0
  29. data/docs/plans/revision-012.md +501 -0
  30. data/docs/plans/revision-013.md +501 -0
  31. data/docs/plans/revision-014.md +501 -0
  32. data/docs/plans/revision-015.md +502 -0
  33. data/docs/plans/revision-016.md +503 -0
  34. data/docs/plans/revision-017.md +504 -0
  35. data/docs/plans/revision-018.md +505 -0
  36. data/docs/plans/revision-019.md +510 -0
  37. data/docs/plans/revision-020.md +524 -0
  38. data/docs/plans/revision-021.md +542 -0
  39. data/docs/plans/revision-022.md +542 -0
  40. data/docs/plans/revision-023.md +545 -0
  41. data/docs/plans/revision-024.md +567 -0
  42. data/docs/plans/revision-025.md +583 -0
  43. data/docs/plans/revision-026.md +241 -0
  44. data/docs/plans/revision-027.md +305 -0
  45. data/docs/plans/revision-028.md +298 -0
  46. data/docs/plans/revision-029.md +288 -0
  47. data/docs/rpm-action-macros.md +52 -0
  48. data/docs/rpm-parts.md +53 -0
  49. data/docs/ruby-dependencies.md +217 -0
  50. data/docs/ruby-policy-2.1.md +28 -0
  51. data/docs/ruby-versioning.md +61 -0
  52. data/docs/space-format.md +58 -0
  53. data/exe/baltix +1 -0
  54. data/lib/baltix/action_flow/files.rb +49 -0
  55. data/lib/baltix/action_flow/inputs.rb +60 -0
  56. data/lib/baltix/action_flow/journal.rb +60 -0
  57. data/lib/baltix/action_flow/options.rb +60 -0
  58. data/lib/baltix/action_flow.rb +65 -0
  59. data/lib/baltix/actor/build/collect.rb +72 -0
  60. data/lib/baltix/actor/build/compile.rb +25 -0
  61. data/lib/baltix/actor/build/extconf.rb +14 -0
  62. data/lib/baltix/actor/build/make.rb +18 -0
  63. data/lib/baltix/actor/build/postprocess.rb +14 -0
  64. data/lib/baltix/actor/build/rake.rb +18 -0
  65. data/lib/baltix/actor/build/ronn.rb +55 -0
  66. data/lib/baltix/actor/build.rb +87 -0
  67. data/lib/baltix/actor/clean/remove.rb +45 -0
  68. data/lib/baltix/actor/clean.rb +37 -0
  69. data/lib/baltix/actor/config.rb +12 -0
  70. data/lib/baltix/actor/copy.rb +22 -7
  71. data/lib/baltix/actor/distclean.rb +20 -0
  72. data/lib/baltix/actor/doc/collect.rb +39 -0
  73. data/lib/baltix/actor/doc/generate.rb +47 -0
  74. data/lib/baltix/actor/doc/inputs.rb +25 -0
  75. data/lib/baltix/actor/doc.rb +70 -0
  76. data/lib/baltix/actor/gen.rb +19 -0
  77. data/lib/baltix/actor/install/data.rb +18 -0
  78. data/lib/baltix/actor/install/documentation.rb +48 -0
  79. data/lib/baltix/actor/install/executable.rb +27 -0
  80. data/lib/baltix/actor/install/extension.rb +44 -0
  81. data/lib/baltix/actor/install/headers.rb +10 -0
  82. data/lib/baltix/actor/install/library.rb +13 -0
  83. data/lib/baltix/actor/install/metadata.rb +21 -0
  84. data/lib/baltix/actor/install/paths.rb +73 -0
  85. data/lib/baltix/actor/install/plugin.rb +25 -0
  86. data/lib/baltix/actor/install/record.rb +48 -0
  87. data/lib/baltix/actor/install/shebang.rb +29 -0
  88. data/lib/baltix/actor/install/transfer.rb +64 -0
  89. data/lib/baltix/actor/install/trees.rb +34 -0
  90. data/lib/baltix/actor/install.rb +71 -0
  91. data/lib/baltix/actor/link.rb +15 -6
  92. data/lib/baltix/actor/make.rb +14 -0
  93. data/lib/baltix/actor/predeps/write.rb +51 -0
  94. data/lib/baltix/actor/predeps.rb +41 -0
  95. data/lib/baltix/actor/provides.rb +12 -0
  96. data/lib/baltix/actor/requires.rb +12 -0
  97. data/lib/baltix/actor/show.rb +26 -0
  98. data/lib/baltix/actor/spec.rb +6 -3
  99. data/lib/baltix/actor/test/record.rb +8 -0
  100. data/lib/baltix/actor/test/run.rb +30 -0
  101. data/lib/baltix/actor/test/select.rb +16 -0
  102. data/lib/baltix/actor/test.rb +41 -0
  103. data/lib/baltix/actor/touch.rb +14 -5
  104. data/lib/baltix/actor.rb +43 -26
  105. data/lib/baltix/cli/dependency_options.rb +63 -0
  106. data/lib/baltix/cli/options/action.rb +32 -0
  107. data/lib/baltix/cli/options.rb +280 -0
  108. data/lib/baltix/cli/output_options.rb +56 -0
  109. data/lib/baltix/cli/rake_tasks.rb +59 -0
  110. data/lib/baltix/cli/source_options.rb +52 -0
  111. data/lib/baltix/cli.rb +130 -116
  112. data/lib/baltix/concerns/command.rb +52 -0
  113. data/lib/baltix/concerns/configuration.rb +39 -0
  114. data/lib/baltix/concerns/dependency_output.rb +21 -0
  115. data/lib/baltix/concerns/extension_metadata.rb +44 -0
  116. data/lib/baltix/concerns/file_destination.rb +14 -0
  117. data/lib/baltix/concerns/inspection.rb +27 -0
  118. data/lib/baltix/concerns/parts.rb +16 -0
  119. data/lib/baltix/concerns/target_paths.rb +57 -0
  120. data/lib/baltix/concerns.rb +11 -0
  121. data/lib/baltix/core_extensions/gem_dependency.rb +24 -0
  122. data/lib/baltix/core_extensions/gem_requirement.rb +45 -0
  123. data/lib/baltix/core_extensions/open_struct_merge.rb +62 -0
  124. data/lib/baltix/deps/executables.rb +30 -0
  125. data/lib/baltix/deps/packages.rb +32 -0
  126. data/lib/baltix/deps.rb +103 -194
  127. data/lib/baltix/dsl/dependency_groups.rb +77 -0
  128. data/lib/baltix/dsl/dependency_sources.rb +100 -0
  129. data/lib/baltix/dsl/filtering.rb +26 -0
  130. data/lib/baltix/dsl/loading.rb +72 -0
  131. data/lib/baltix/dsl/merging.rb +74 -0
  132. data/lib/baltix/dsl/rendering.rb +54 -0
  133. data/lib/baltix/dsl/requirements.rb +77 -0
  134. data/lib/baltix/dsl/temporary_files.rb +36 -0
  135. data/lib/baltix/dsl.rb +66 -273
  136. data/lib/baltix/executable_dependencies/features.rb +53 -0
  137. data/lib/baltix/executable_dependencies/library.rb +21 -0
  138. data/lib/baltix/executable_dependencies/library_features.rb +34 -0
  139. data/lib/baltix/executable_dependencies/syntax.rb +102 -0
  140. data/lib/baltix/executable_dependencies.rb +102 -0
  141. data/lib/baltix/extensions/bones.rb +173 -0
  142. data/lib/baltix/extensions/echoe.rb +143 -0
  143. data/lib/baltix/extensions/hoe/metadata.rb +89 -0
  144. data/lib/baltix/extensions/hoe/options.rb +84 -0
  145. data/lib/baltix/extensions/hoe/readme.rb +29 -0
  146. data/lib/baltix/extensions/hoe.rb +146 -0
  147. data/lib/baltix/extensions/jeweler.rb +95 -0
  148. data/lib/baltix/extensions/levitate.rb +74 -0
  149. data/lib/baltix/extensions/olddoc.rb +42 -0
  150. data/lib/baltix/extensions.rb +340 -419
  151. data/lib/baltix/i18n.rb +22 -19
  152. data/lib/baltix/license/catalog/capture.rb +58 -0
  153. data/lib/baltix/license/catalog.rb +75 -0
  154. data/lib/baltix/license.rb +76 -0
  155. data/lib/baltix/loader/capture.rb +91 -0
  156. data/lib/baltix/loader/cmake.rb +6 -3
  157. data/lib/baltix/loader/evaluation.rb +49 -0
  158. data/lib/baltix/loader/extconf.rb +27 -0
  159. data/lib/baltix/loader/feature_loading.rb +54 -0
  160. data/lib/baltix/loader/git-version-gen.rb +36 -21
  161. data/lib/baltix/loader/mast/properties.rb +58 -0
  162. data/lib/baltix/loader/mast.rb +97 -109
  163. data/lib/baltix/loader/object_capture.rb +27 -0
  164. data/lib/baltix/loader/olddoc.gemspec.erb +31 -0
  165. data/lib/baltix/loader/pom.rb +36 -16
  166. data/lib/baltix/loader/rookbook.rb +19 -14
  167. data/lib/baltix/loader/yaml.rb +9 -5
  168. data/lib/baltix/loader.rb +85 -132
  169. data/lib/baltix/log.rb +26 -27
  170. data/lib/baltix/rake/metadata_adapter.rb +30 -0
  171. data/lib/baltix/rake/task_context.rb +59 -0
  172. data/lib/baltix/rake/task_libraries.rb +73 -0
  173. data/lib/baltix/rake.rb +62 -12
  174. data/lib/baltix/source/base/dependencies.rb +81 -0
  175. data/lib/baltix/source/base/file_queries.rb +67 -0
  176. data/lib/baltix/source/base/file_tree.rb +70 -0
  177. data/lib/baltix/source/base/metadata.rb +140 -0
  178. data/lib/baltix/source/base/options.rb +71 -0
  179. data/lib/baltix/source/base/roots.rb +53 -0
  180. data/lib/baltix/source/base.rb +95 -377
  181. data/lib/baltix/source/fake.rb +89 -5
  182. data/lib/baltix/source/gem/delegation.rb +32 -0
  183. data/lib/baltix/source/gem/dependencies.rb +69 -0
  184. data/lib/baltix/source/gem/discovery.rb +72 -0
  185. data/lib/baltix/source/gem/file_trees.rb +114 -0
  186. data/lib/baltix/source/gem/forwarding.rb +12 -0
  187. data/lib/baltix/source/gem/metadata.rb +104 -0
  188. data/lib/baltix/source/gem/specification.rb +65 -0
  189. data/lib/baltix/source/gem.rb +65 -312
  190. data/lib/baltix/source/gemfile.rb +55 -5
  191. data/lib/baltix/source/rakefile.rb +12 -5
  192. data/lib/baltix/source.rb +36 -24
  193. data/lib/baltix/space/configuration.rb +54 -0
  194. data/lib/baltix/space/data/collections.rb +33 -0
  195. data/lib/baltix/space/data/gem_metadata.rb +79 -0
  196. data/lib/baltix/space/data/models.rb +20 -0
  197. data/lib/baltix/space/data/values.rb +72 -0
  198. data/lib/baltix/space/data.rb +53 -0
  199. data/lib/baltix/space/dependencies.rb +53 -0
  200. data/lib/baltix/space/filters.rb +96 -0
  201. data/lib/baltix/space/initialization.rb +124 -0
  202. data/lib/baltix/space/metadata.rb +130 -0
  203. data/lib/baltix/space/source_order.rb +43 -0
  204. data/lib/baltix/space/source_selection.rb +136 -0
  205. data/lib/baltix/space/source_status.rb +114 -0
  206. data/lib/baltix/space/spec.rb +3 -0
  207. data/lib/baltix/space.rb +87 -367
  208. data/lib/baltix/spec/rpm/aliases.rb +79 -0
  209. data/lib/baltix/spec/rpm/arch.rb +119 -0
  210. data/lib/baltix/spec/rpm/available_overrides.rb +106 -0
  211. data/lib/baltix/spec/rpm/build_dependencies.rb +132 -0
  212. data/lib/baltix/spec/rpm/build_queries.rb +61 -0
  213. data/lib/baltix/spec/rpm/changelog.rb +115 -0
  214. data/lib/baltix/spec/rpm/dependency_overrides.rb +83 -0
  215. data/lib/baltix/spec/rpm/dependency_policy.rb +69 -0
  216. data/lib/baltix/spec/rpm/deps.rb +113 -0
  217. data/lib/baltix/spec/rpm/env/requirements.rb +20 -0
  218. data/lib/baltix/spec/rpm/env.rb +76 -0
  219. data/lib/baltix/spec/rpm/executable_packages.rb +49 -0
  220. data/lib/baltix/spec/rpm/file_manifest.rb +72 -0
  221. data/lib/baltix/spec/rpm/guard_compilation.rb +95 -0
  222. data/lib/baltix/spec/rpm/imported_secondaries.rb +26 -0
  223. data/lib/baltix/spec/rpm/layout.rb +14 -0
  224. data/lib/baltix/spec/rpm/manpages.rb +71 -0
  225. data/lib/baltix/spec/rpm/metadata.rb +78 -0
  226. data/lib/baltix/spec/rpm/name/equality.rb +68 -0
  227. data/lib/baltix/spec/rpm/name/formatting.rb +33 -0
  228. data/lib/baltix/spec/rpm/name/parsing.rb +58 -0
  229. data/lib/baltix/spec/rpm/name.rb +77 -108
  230. data/lib/baltix/spec/rpm/packaged_versions.rb +107 -0
  231. data/lib/baltix/spec/rpm/parser/comments.rb +35 -0
  232. data/lib/baltix/spec/rpm/parser/context.rb +50 -0
  233. data/lib/baltix/spec/rpm/parser/dependencies.rb +91 -0
  234. data/lib/baltix/spec/rpm/parser/file_sections.rb +68 -0
  235. data/lib/baltix/spec/rpm/parser/flow.rb +84 -0
  236. data/lib/baltix/spec/rpm/parser/header_dependencies.rb +36 -0
  237. data/lib/baltix/spec/rpm/parser/macros.rb +43 -0
  238. data/lib/baltix/spec/rpm/parser/metadata.rb +106 -0
  239. data/lib/baltix/spec/rpm/parser/sections.rb +88 -0
  240. data/lib/baltix/spec/rpm/parser/values.rb +85 -0
  241. data/lib/baltix/spec/rpm/parser.rb +124 -269
  242. data/lib/baltix/spec/rpm/part_files.rb +64 -0
  243. data/lib/baltix/spec/rpm/part_prelude.rb +43 -0
  244. data/lib/baltix/spec/rpm/part_scripts.rb +52 -0
  245. data/lib/baltix/spec/rpm/part_switches.rb +65 -0
  246. data/lib/baltix/spec/rpm/pkglist/header.rb +73 -0
  247. data/lib/baltix/spec/rpm/pkglist/provides.rb +57 -0
  248. data/lib/baltix/spec/rpm/pkglist.rb +116 -0
  249. data/lib/baltix/spec/rpm/preparation.rb +73 -0
  250. data/lib/baltix/spec/rpm/rendering.rb +66 -0
  251. data/lib/baltix/spec/rpm/repository_application.rb +33 -0
  252. data/lib/baltix/spec/rpm/revision.rb +58 -0
  253. data/lib/baltix/spec/rpm/root_source.rb +48 -0
  254. data/lib/baltix/spec/rpm/scripts.rb +85 -0
  255. data/lib/baltix/spec/rpm/secondaries.rb +82 -0
  256. data/lib/baltix/spec/rpm/secondary.rb +117 -64
  257. data/lib/baltix/spec/rpm/secondary_parts.rb +84 -0
  258. data/lib/baltix/spec/rpm/section_document.rb +84 -0
  259. data/lib/baltix/spec/rpm/section_guards.rb +116 -0
  260. data/lib/baltix/spec/rpm/source_selection.rb +82 -0
  261. data/lib/baltix/spec/rpm/spec_core/architecture.rb +28 -0
  262. data/lib/baltix/spec/rpm/spec_core/attributes.rb +89 -0
  263. data/lib/baltix/spec/rpm/spec_core/availability.rb +60 -0
  264. data/lib/baltix/spec/rpm/spec_core/dependency_rendering.rb +83 -0
  265. data/lib/baltix/spec/rpm/spec_core/descriptions.rb +77 -0
  266. data/lib/baltix/spec/rpm/spec_core/documentation.rb +48 -0
  267. data/lib/baltix/spec/rpm/spec_core/executable_names.rb +37 -0
  268. data/lib/baltix/spec/rpm/spec_core/host_names.rb +60 -0
  269. data/lib/baltix/spec/rpm/spec_core/interpreters.rb +103 -0
  270. data/lib/baltix/spec/rpm/spec_core/names.rb +80 -0
  271. data/lib/baltix/spec/rpm/spec_core/obsoletes.rb +38 -0
  272. data/lib/baltix/spec/rpm/spec_core/package_dependencies.rb +74 -0
  273. data/lib/baltix/spec/rpm/spec_core/plain_dependencies.rb +60 -0
  274. data/lib/baltix/spec/rpm/spec_core/pre_name.rb +23 -0
  275. data/lib/baltix/spec/rpm/spec_core/provides.rb +104 -0
  276. data/lib/baltix/spec/rpm/spec_core/readme.rb +78 -0
  277. data/lib/baltix/spec/rpm/spec_core/registration.rb +18 -0
  278. data/lib/baltix/spec/rpm/spec_core/runtime_dependencies.rb +81 -0
  279. data/lib/baltix/spec/rpm/spec_core/summaries.rb +64 -0
  280. data/lib/baltix/spec/rpm/spec_core/text_wrapping.rb +36 -0
  281. data/lib/baltix/spec/rpm/spec_core/versioning.rb +75 -0
  282. data/lib/baltix/spec/rpm/spec_core/versions.rb +94 -0
  283. data/lib/baltix/spec/rpm/spec_core.rb +75 -527
  284. data/lib/baltix/spec/{rpm.erb → rpm/template.erb} +131 -31
  285. data/lib/baltix/spec/rpm.rb +253 -644
  286. data/lib/baltix/spec.rb +16 -14
  287. data/lib/baltix/target/gem.rb +61 -0
  288. data/lib/baltix/target/site.rb +40 -0
  289. data/lib/baltix/target.rb +16 -0
  290. data/lib/baltix/version.rb +3 -1
  291. data/lib/baltix.rb +77 -5
  292. data/locale/en_US.UTF-8.yaml +4 -1
  293. data/locale/ru_RU.UTF-8.yaml +7 -1
  294. data/rpm/baltix.env +4 -0
  295. data/rpm/baltix.prov +8 -0
  296. data/rpm/baltix.prov.files +6 -0
  297. data/rpm/baltix.req +8 -0
  298. data/rpm/baltix.req.files +6 -0
  299. data/rpm/macros.baltix +24 -0
  300. data/utils/rubocop/compact_block_braces.rb +39 -0
  301. data/utils/rubocop/spacing.rb +96 -0
  302. data/utils/update_alt_architectures.rb +57 -0
  303. data/utils/update_alt_licenses.rb +19 -0
  304. data/utils/update_spdx_licenses.rb +21 -0
  305. metadata +526 -17
  306. data/.github/workflows/ci.yml +0 -44
  307. data/.gitignore +0 -10
  308. data/TODO +0 -84
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d93503758dc39c82066dfbe05b1914e3de3aa0fbfaac19d8e46e71cea566103
4
- data.tar.gz: f130603732a880d17a968ecc2b71d4bf5acf91bb98746ad0cc926e157eb05c6d
3
+ metadata.gz: fabc81ff778f24259c37188351dcd17ece344686f55e9bedff026f8b4f7a5a22
4
+ data.tar.gz: 9180560881c28bf1a4158c927a9051e3ccb5fa669cb190a30c4e6bf32228bf7a
5
5
  SHA512:
6
- metadata.gz: d950f8bdea1db9d9939111d2f6ca7a4c9d0c7386433abd932c3ddb42d75698aa495cf9b839c01dfb9998004818bfcccdd0060df0748fd7d062fe6a61d2ef8401
7
- data.tar.gz: '082e0b93a9dac99b4cd92248191132e9b64cd8a26d1e6e4881d6d48381a3114a675370b8c322ace31d5f29f380034e742547629c20640c4f8bd380d241055a80'
6
+ metadata.gz: f39e564fc882d38eeaa66ebc940d27d28cd2eeca894be7ed4b10b42def92b3415bc7ad58bde6c0253f132329db23d3ebc5a87f0de5f2959c2bc6f7de610d97be
7
+ data.tar.gz: 2e1f38618621df7246809c201dd87ea769df8263f65f175d437ef5ffa1bc290c1dfe0c1d4082b1018fd71e48267086311b7a719af31f589cb92be2b3c13e570f
data/Gemfile CHANGED
@@ -1,8 +1,10 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in baltix.gemspec
4
6
  gemspec
5
7
 
6
- gem "rake", "~> 12.0"
8
+ gem 'rake', '~> 13.0'
7
9
  gem 'simplecov', require: false, group: :test
8
10
  gem 'simplecov-lcov', require: false, group: :test
data/README.md CHANGED
@@ -4,46 +4,172 @@ Dependency detector, and spec generator and reader for projects based on the Rub
4
4
 
5
5
  ## Status
6
6
 
7
- [![GitHub](http://img.shields.io/badge/github-majioa/baltix-blue.svg)](http://github.com/majioa/baltix)
8
- [![GitHub tag](https://img.shields.io/github/tag/majioa/baltix.svg)](https://github.com/majioa/baltix/tags/)
9
- [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/majioa/baltix)
7
+ [![altlinux.space](https://img.shields.io/badge/altlinux.space-majioa/baltix-blue.svg)](https://altlinux.space/majioa/baltix)
8
+ [![Gem Version](https://img.shields.io/gem/v/baltix)](https://altlinux.space/majioa/baltix)
9
+ [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=altlinux)](https://altlinux.space/majioa/baltix)
10
10
  [![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
11
- [![Ruby Github Action](https://github.com/majioa/baltix/actions/workflows/ci.yml/badge.svg)](https://github.com/majioa/baltix/actions/workflows/ci.yml)
11
+ [![Latest Release](https://altlinux.space/majioa/baltix/badges/release.svg)](https://altlinux.space/majioa/baltix/releases)
12
+ [![Gitea Last Commit](https://img.shields.io/gitea/last-commit/majioa/baltix?gitea_url=https%3A%2F%2Faltlinux.space)](https://altlinux.space/majioa/baltix)
13
+ -[![AltLinuxTeam Action](https://altlinux.space/majioa/baltix/badges//workflows/ci.yml/badge.svg:)](https://altlinux.space/majioa/baltix/actions/workflows/ci.yml)
12
14
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4d99e63d3d7349d5adfdbc4250666ef2)](https://app.codacy.com/gh/majioa/baltix/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
13
15
  [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/4d99e63d3d7349d5adfdbc4250666ef2)](https://app.codacy.com/gh/majioa/baltix/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)
14
- [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/majioa/baltix/pulls)
16
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://altlinux.space/majioa/baltix/pulls)
15
17
 
16
18
  ## Installation
17
19
 
18
20
  Add this line to your application's Gemfile:
19
21
 
20
22
  ```ruby
21
- gem 'baltix', github: "majioa/baltix"
23
+ gem 'baltix', git: 'https://altlinux.space/majioa/baltix'
22
24
  ```
23
25
 
24
26
  And then execute:
25
27
 
26
28
  $ bundle install
27
29
 
30
+ Or install it yourself as:
31
+
32
+ $ gem install baltix
33
+
28
34
  ## Usage
29
35
 
36
+ Use `--pkglist=/path/to/noarch/pkglist.classic.xz,/path/to/arch/pkglist.classic.xz`
37
+ to derive available gem versions from ALT indexes. See [format and precedence](docs/pkglist.md).
38
+
39
+ Optional `doc`, `devel`, `exec` and `check` parts use standard RPM feature
40
+ switches with defaults derived from project files and metadata.
41
+ See [part selection and installer behavior](docs/rpm-parts.md).
42
+
43
+ ### Ruby packaging policy
44
+
45
+ [Ruby Policy 2.0](https://en.altlinux.org/Ruby/Policy_2.0) is obsolete.
46
+ Baltix is being updated for [Ruby Policy 2.1](docs/ruby-policy-2.1.md),
47
+ which is currently a draft. The policy states the rules concisely; the
48
+ [Versioning](docs/ruby-versioning.md) and [Dependencies](docs/ruby-dependencies.md)
49
+ guides provide explanations and examples.
50
+
51
+ The 2.1 draft replaces the obsolete `rpm-build-ruby` build prerequisite with:
52
+
53
+ ```spec
54
+ BuildRequires(pre): rpm-macros-ruby setup-rb rake
55
+ ```
56
+
57
+ When updating an existing spec, Baltix migrates the old prerequisite to this
58
+ replacement. Legacy prerequisites remain in test input fixtures to verify migration.
59
+
60
+ For `gem-*` packages, `%def* pkgname` and `%global pkgname` are obsolete; use
61
+ `gemname` instead. Baltix omits unused legacy definitions after rendering the
62
+ updated spec. Literal aliases matching `gemname` are migrated to that macro;
63
+ other definitions still needed by custom packaging code are retained.
64
+
65
+ Gem dependencies and their build/check/runtime assignments are always regenerated
66
+ from current source and discovery metadata. Input RPM gem tags and old dependency
67
+ macro bounds do not supply missing dependencies. The legacy
68
+ `--[no-]use-high-default-dependencies-priority` switch remains accepted for
69
+ compatibility and no longer lets old RPM tags override source groups.
70
+
71
+ ### Confguration file
72
+
73
+ Create default config file for baltix, placed it to: ~/.baltix.yaml
74
+
75
+ ```
76
+ ---
77
+ maintainer:
78
+ name: "Pavel Skrylev"
79
+ email: "majioa@altlinux.org"
80
+ packager:
81
+ name: "Baltix Maintaining Team"
82
+ email: "baltix@packages.altlinux.org"
83
+ devel_dep_baltix: :include
84
+ log_level: :debug
85
+ warn_io: 'stderr'
86
+ error_io: 'stderr'
87
+ info_io: 'stdout'
88
+ debug_io:
89
+ high_default_dependencies_priority: false
90
+ gem_dependency_mode: no-upper
91
+ autorender_name: false
92
+ skip_platforms: [:jruby, :mingw, :mswin]
93
+ ```
94
+
95
+ Project state is saved in [`.space` as ordinary YAML](docs/space-format.md).
96
+ Use `baltix config` to create it; old Ruby-object snapshots must be regenerated.
97
+
30
98
  ### From a Command Line
31
99
 
32
100
  When you are creating a spec for the space from a scratch sample call may be as follows:
33
101
 
34
- $ sudo /usr/bin/setup.rb -o $(echo $(pwd)|sed "s|.*/||").spec --maintainer-name="Pavel Skrylev" --maintainer-email="majioa@altlinux.org" -g/home/majioa/available-list.yaml spec --debug-io=- --verbose=debug --ignore-path-tokens=templates,example,examples,sample,samples,spec,test,features,fixtures,doc,docs,contrib,demo,acceptance,conformance,myapp,website,benchmarks,benchmark,gemfiles,misc,steep 2>/dev/null; sudo chown majioa:majioa . -R
102
+ $ /usr/bin/baltix -o $(echo $(pwd)|sed "s|.*/||").spec -g/home/majioa/available-list.yaml spec
35
103
 
36
104
  When you are updating the spec do something like:
37
105
 
38
- $ sudo /usr/bin/setup.rb -s $(find -name "*.spec~") -o _.spec --maintainer-name="Pavel Skrylev" --maintainer-email="majioa@altlinux.org" -g/home/majioa/available-list.yaml spec --debug-io=- --verbose=debug --ignore-path-tokens=templates,example,examples,sample,samples,spec,test,features,fixtures,doc,docs,contrib,demo,acceptance,conformance,myapp,website,benchmarks,benchmark,gemfiles,misc,steep 2>/dev/null; sudo chown majioa:majioa . -R
106
+ $ /usr/bin/baltix -s $(find -name "*.spec~") -o _.spec -g/home/majioa/available-list.yaml spec
107
+
108
+ Use `--rake-task-before=LIST` to run comma-separated Rake tasks before the
109
+ following Baltix command:
110
+
111
+ ```sh
112
+ baltix --rake-task-before=generate --output-file=generated.spec spec
113
+ ```
114
+
115
+ Options and commands are processed in order. The Rake task list is consumed
116
+ by the next command; later commands run without it unless another list is
117
+ specified. Repeated commands are executed separately. The equivalent config
118
+ option is `rake_task_before: [generate]`; an explicit CLI list replaces it.
119
+ Task failures stop the command stream. Tasks use their actual build libraries
120
+ inside the current Ruby process, including imported and plugin-defined tasks.
121
+
122
+ When updating an RPM spec, the obsolete `%ruby_build --pre=LIST` declaration
123
+ is migrated to `%ruby_on_build_rake_tasks LIST`. `--pre` is not a Baltix CLI option.
124
+
125
+ Use `--gem-dependency-mode=regular|redep|no-upper` to control gem upper bounds:
126
+
127
+ * `regular` preserves normal dependency and availability handling.
128
+ * `redep` emits only the source minimum for gems selected for a
129
+ `%ruby_use_gem_dependency` macro, including macros imported from the input spec.
130
+ Their upper-bound gem `Conflicts` and `BuildConflicts` are omitted.
131
+ * `no-upper` (default) emits source minimums and point exclusions for gem
132
+ dependencies, omitting upper-bound gem `Conflicts` and `BuildConflicts`.
133
+
134
+ Both relaxation modes preserve source minimums, individual version exclusions,
135
+ and non-gem RPM conflicts. Generated `%ruby_use_gem_dependency` declarations use
136
+ the lower bound directly in `no-upper` mode; the same bound is used in runtime and build
137
+ requirements.
138
+ The equivalent config option is `gem_dependency_mode: no-upper` (or `regular` / `redep`).
139
+ The former `all` value remains an alias for existing configurations and CLI scripts;
140
+ the CLI normalizes it to `no-upper`.
141
+ Pass the chosen mode when updating as well; selecting `regular` restores
142
+ upper bounds from the current sources. Original Gemfile/gemspec requirements
143
+ are not modified.
39
144
 
40
145
 
41
146
  ## Development
42
147
 
43
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
148
+ After checking out the repo, run `exe/baltix` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
44
149
 
45
150
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
46
151
 
152
+ ### Ruby style checks
153
+
154
+ Install development dependencies with `bundle install`, then run either
155
+ `bundle exec rubocop --parallel` or `bundle exec rake rubocop`.
156
+ Codeberg and GitHub CI run the same checks before Cucumber.
157
+
158
+ The configuration follows [Znamenica/Tiun](https://codeberg.org/znamenica/tiun)
159
+ (reference `7c4af7f2071f39bb899339e68fd795dd65606a3b`): three-space indentation,
160
+ method definitions without parentheses, compact adjacent block braces and
161
+ separate assignment/return groups. Performance, RSpec and Markdown extensions
162
+ are enabled; I18n checks are not used. Ruby syntax targets Baltix's supported
163
+ Ruby 3.0 minimum. Literal arrays, hashes and heredocs count as one expression
164
+ for length checks, so data tables do not force artificial method splitting.
165
+
166
+ Imported source fixtures, dependencies and build output are excluded; Baltix's
167
+ Ruby code, Cucumber support and executable Ruby examples remain checked.
168
+ OpenStruct state/options and YAML restoration are public APIs and keep their
169
+ specific exceptions, as Tiun's context API does. No generated offense baseline
170
+ is used. Custom checks have Cucumber regression scenarios under
171
+ `features/ruby_style.feature` and `features/rubocop_extensions.feature`.
172
+
47
173
  ## Test
48
174
 
49
175
  To run tests written in Cucumber's Gherkin just run:
@@ -56,5 +182,5 @@ or you are able to run them with rake as a default task:
56
182
 
57
183
  ## Contributing
58
184
 
59
- Bug reports and pull requests are welcome on GitHub at https://github.com/majioa/baltix.
185
+ Bug reports and pull requests are welcome on AltLinux.space at https://altlinux.space/majioa/baltix.
60
186
 
data/Rakefile CHANGED
@@ -1,8 +1,13 @@
1
- require "bundler/gem_tasks"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
2
4
  require 'cucumber/rake/task'
3
5
 
4
6
  Cucumber::Rake::Task.new do |t|
5
- t.cucumber_opts = %w{--format progress}
7
+ t.cucumber_opts = %w[--format progress]
6
8
  end
7
9
 
8
- task :default => :cucumber
10
+ task default: :cucumber
11
+
12
+ require 'rubocop/rake_task'
13
+ RuboCop::RakeTask.new(:rubocop)
data/baltix.gemspec CHANGED
@@ -1,39 +1,57 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'lib/baltix/version'
2
4
 
3
5
  Gem::Specification.new do |spec|
4
- spec.name = "baltix"
6
+ spec.name = 'baltix'
5
7
  spec.version = Baltix::VERSION
6
- spec.authors = ["Pavel Skrylev"]
7
- spec.email = ["majioa@altlinux.org"]
8
- spec.licenses = ["MIT"]
8
+ spec.authors = ['Pavel Skrylev']
9
+ spec.email = ['majioa@altlinux.org']
10
+ spec.licenses = ['MIT']
9
11
 
10
- spec.summary = %q{Baltix is setup replacement and spec control utility for RPM/local packages}
11
- spec.description = %q{Baltix is setup replacement and spec control utility for RPM/local packages}
12
- spec.homepage = "https://github.org/majioa/baltix"
13
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
12
+ spec.summary = 'Baltix is setup replacement and spec control utility for RPM/local packages'
13
+ spec.description = 'Baltix is setup replacement and spec control utility for RPM/local packages'
14
+ spec.homepage = 'https://github.org/majioa/baltix'
14
15
 
15
- spec.metadata["allowed_push_host"] = "https://rubygems.org"
16
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
16
17
 
17
- spec.metadata["homepage_uri"] = spec.homepage
18
- spec.metadata["source_code_uri"] = "https://github.org/majioa/baltix"
19
- spec.metadata["changelog_uri"] = "https://github.org/majioa/baltix/CHANGELOG.md"
18
+ spec.metadata['homepage_uri'] = spec.homepage
19
+ spec.metadata['source_code_uri'] = 'https://github.org/majioa/baltix'
20
+ spec.metadata['changelog_uri'] = 'https://github.org/majioa/baltix/CHANGELOG.md'
21
+ spec.metadata['rubygems_mfa_required'] = 'false'
20
22
 
21
- # Specify which files should be added to the gem when it is released.
22
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
24
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
- end
26
- spec.bindir = "exe"
27
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
- spec.require_paths = ["lib"]
23
+ files = Dir.glob(['{bin,data,docs,exe,lib,locale,rpm,utils}/**/*',
24
+ 'Gemfile', 'LICENSE', 'README.md', 'Rakefile', 'baltix.gemspec'], base: __dir__)
25
+ spec.files = files.select {|file| File.file?(File.join(__dir__, file)) }
26
+ spec.bindir = 'exe'
27
+ spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
28
+ spec.require_paths = ['lib']
29
29
 
30
- spec.required_ruby_version = [ '>= 3.0.0' ]
31
- spec.add_development_dependency "bundler", "~> 2.0"
32
- spec.add_development_dependency "rake", ">= 12.0"
33
- spec.add_development_dependency "pry", "~> 0.13"
34
- spec.add_development_dependency "cucumber", "~> 5.2"
35
- spec.add_development_dependency "shoulda-matchers-cucumber", "~> 1.0", ">= 1.0.1"
36
- spec.add_development_dependency "timecop"
37
- spec.add_development_dependency "simplecov"
38
- spec.add_development_dependency "simplecov-lcov"
30
+ spec.required_ruby_version = '>= 3.0.0'
31
+ spec.add_dependency('bundler', '~> 2.0')
32
+ spec.add_dependency('digest')
33
+ spec.add_dependency('erb')
34
+ spec.add_dependency('json')
35
+ spec.add_dependency('open3')
36
+ spec.add_dependency('optparse')
37
+ spec.add_dependency('ostruct')
38
+ spec.add_dependency('pathname')
39
+ spec.add_dependency('rake', '>= 13.0.6')
40
+ spec.add_dependency('rdoc')
41
+ spec.add_dependency('shellwords')
42
+ spec.add_dependency('stringio')
43
+ spec.add_dependency('tempfile')
44
+ spec.add_dependency('time')
45
+ spec.add_dependency('tmpdir')
46
+ spec.add_dependency('yaml')
47
+ spec.add_development_dependency('cucumber', '~> 5.2')
48
+ spec.add_development_dependency('pry', '~> 0.13')
49
+ spec.add_development_dependency('rubocop', '~> 1.81.7')
50
+ spec.add_development_dependency('rubocop-md', '~> 3.0.0')
51
+ spec.add_development_dependency('rubocop-performance', '~> 1.26.1')
52
+ spec.add_development_dependency('rubocop-rspec', '~> 3.9.0')
53
+ spec.add_development_dependency('shoulda-matchers-cucumber', '~> 1.0', '>= 1.0.1')
54
+ spec.add_development_dependency('simplecov')
55
+ spec.add_development_dependency('simplecov-lcov')
56
+ spec.add_development_dependency('timecop')
39
57
  end
data/bin/console CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "baltix"
4
+ require 'bundler/setup'
5
+ require 'baltix'
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
7
8
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "baltix"
10
11
  # require "pry"
11
12
  # Pry.start
12
13
 
13
- require "irb"
14
+ require 'irb'
14
15
  IRB.start(__FILE__)
@@ -0,0 +1,26 @@
1
+ # ALT common license catalog
2
+
3
+ `licenses.json` records real filenames, resolved symbolic-link targets, short
4
+ title candidates and SHA-256 hashes from `/usr/share/license` in
5
+ `common-licenses-3.28.0-alt1.noarch` (720 regular license files, 103 aliases).
6
+ Source RPM: `license-list-xml-3.28.0-alt1.src.rpm`.
7
+ Upstream: https://github.com/spdx/license-list-XML
8
+
9
+ Regenerate in ALT, with the desired common-licenses package installed:
10
+
11
+ ```sh
12
+ ruby utils/update_alt_licenses.rb
13
+ ```
14
+
15
+ A copied directory can also be supplied as the first argument. The utility
16
+ reads that directory and writes this snapshot; it changes no installed files.
17
+ Repeated generation from the same files is byte-identical. Review the source
18
+ package and catalog changes together.
19
+
20
+ Normal operation prefers the installed `/usr/share/license`. This snapshot is
21
+ used when the directory is absent, so generation also works outside ALT.
22
+ SPDX names can identify available ALT entries; they do not replace ALT's
23
+ filenames or aliases. Only complete short title paragraphs are matched, and
24
+ ambiguous titles remain unresolved. Equal GPL only/or-later texts do not imply
25
+ equal permissions; explicit links establish aliases. The snapshot contains
26
+ metadata, rather than copies of all license bodies.