simp-rake-helpers 5.3.0 → 5.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +8 -2
- data/.travis.yml +54 -37
- data/CHANGELOG.md +40 -2
- data/Gemfile +1 -0
- data/README.md +70 -82
- data/lib/simp/rake/build/auto.rb +6 -0
- data/lib/simp/rake/build/pkg.rb +2 -2
- data/lib/simp/rake/build/rpmdeps.rb +6 -3
- data/lib/simp/rake/helpers/assets/rpm_spec/simpdefault.spec +284 -71
- data/lib/simp/rake/helpers/version.rb +1 -1
- data/lib/simp/rake/pkg.rb +38 -18
- data/lib/simp/rake/rubygem.rb +1 -1
- data/lib/simp/rpm.rb +49 -6
- data/spec/acceptance/00_pkg_rpm_custom_scriptlets_spec.rb +117 -0
- data/spec/acceptance/10_pkg_rpm_spec.rb +153 -0
- data/spec/acceptance/20_pkg_rpm_safely_upgrading_obsolete_modules_spec.rb +175 -0
- data/spec/acceptance/development/docker_env.sh +29 -0
- data/spec/acceptance/development/rerun_acceptance_tests.sh +15 -0
- data/spec/acceptance/development/vagrant_rsync.sh +23 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-2.1/CHANGELOG +2 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-2.1/Rakefile +3 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-2.1/build/rpm_metadata/custom/overrides +14 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-2.1/build/rpm_metadata/requires +1 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-2.1/metadata.json +33 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-3.0/CHANGELOG +2 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-3.0/Rakefile +3 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-3.0/build/rpm_metadata/custom/overrides +14 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-3.0/build/rpm_metadata/requires +1 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-3.0/metadata.json +33 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-1.0/CHANGELOG +2 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-1.0/Rakefile +3 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-1.0/build/rpm_metadata/requires +1 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-1.0/metadata.json +33 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.0/CHANGELOG +2 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.0/Rakefile +3 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.0/build/rpm_metadata/requires +1 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.0/metadata.json +33 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.2/CHANGELOG +2 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.2/Rakefile +3 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.2/build/rpm_metadata/custom/overrides +14 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.2/build/rpm_metadata/requires +1 -0
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.2/metadata.json +33 -0
- data/spec/acceptance/files/mock_packages/pupmod-puppetlabs-stdlib.spec +32 -0
- data/spec/acceptance/files/mock_packages/pupmod-simp-foo.spec +32 -0
- data/spec/acceptance/files/mock_packages/pupmod-simp-simplib.spec +32 -0
- data/spec/acceptance/files/mock_packages/rpmbuild.sh +25 -0
- data/spec/acceptance/files/mock_packages/simp-adapter/etc/simp/adapter_config.yaml +3 -0
- data/spec/acceptance/files/mock_packages/simp-adapter/usr/local/sbin/simp_rpm_helper +406 -0
- data/spec/acceptance/files/mock_packages/simp-adapter.spec +43 -0
- data/spec/acceptance/files/testpackage_custom_scriptlet/CHANGELOG +2 -0
- data/spec/acceptance/files/testpackage_custom_scriptlet/Rakefile +3 -0
- data/spec/acceptance/files/testpackage_custom_scriptlet/build/rpm_metadata/custom/overrides +18 -0
- data/spec/acceptance/files/testpackage_custom_scriptlet/build/rpm_metadata/requires +1 -0
- data/spec/acceptance/files/testpackage_custom_scriptlet/metadata.json +33 -0
- data/spec/acceptance/nodesets/default.yml +2 -4
- data/spec/acceptance/support/pkg_rpm_helpers.rb +81 -0
- data/spec/lib/simp/rake/build/files/unmanaged_mod/build/rpm_metadata/requires +2 -1
- data/spec/lib/simp/rake/build/rpmdeps_spec.rb +2 -1
- data/spec/spec_helper_acceptance.rb +20 -1
- metadata +44 -17
- data/spec/acceptance/pkg_rpm_spec.rb +0 -164
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 939e5af4addd43fd7426e30482fa751d4998d8f537d63174dcb9a8ab5130b6a0
|
4
|
+
data.tar.gz: c923022ca6e164757b00a8d87a02648277fbe4c50c912520f09211420d35ccad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36fa3a75405f59e9ea37e133ab6bdc4810d68382d51332a6495e8155dba3f3aedb2109fb1431e5bab78656fd28d9cca10e079ba3f66e15f685702e594ca19ff3
|
7
|
+
data.tar.gz: 1f3db5d207c48657ba5dc46a17d8a4b1225d671df47c8ba9e2d426cfd192bb2537fc52914c31ae2f2168247bd4852c3e2e25bc4f35125b9368812918ffb6149b
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,42 +1,59 @@
|
|
1
|
+
---
|
1
2
|
language: ruby
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
- rm Gemfile.lock || true
|
8
|
-
bundler_args: "--without development --path .vendor"
|
3
|
+
cache: bundler
|
4
|
+
sudo: false
|
5
|
+
|
6
|
+
bundler_args: --without development system_tests
|
7
|
+
|
9
8
|
notifications:
|
10
9
|
email: false
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
secure: "aoPmOZ3WgjNJ56UXmamKxaRv37iUaxKekAeS8n2fPk78X/nU2qGjdDHFH+SBrfl33PyzsGnS3WAANMKaIkAgssvKoaII/sAC+Sl6q1eyVUprZqloXrG+cHlnHY4GnziWEH3JrkHDChW0xoJq7hhpj7qTRKrEIp6nA25MjozjveoL+HH4kKy/ACJhiEdsYTFaDLYYFY50gGUL9KjIkwN6g9d+dIzG9JqcYoDbneQlO6/23yr4GiAHQ8HM1j5tUoBqJad+CWjWhSY7pbfYBy2ziwVhFy1qoOS4/bhlasRCsLTtz0AjjR0YWOhJap1vJqYhrSxtvhmVuzScmDkueAem/PfWS3XCQvbmjdmFMzPOxo0aRRJMlaeVWRsZ/aVFC7ngpRzokq1duZEKI47xZC27vJSOp3RZMmYl/7GsykoYkqHHsTvzSALEQiVtQq8sIOtN0JOTFI8H4LSMirXuqGq+SgCJiAQ3mQzSgh50TXiZaA2UPPcQaw4AzY36BRKs1cgw3cEWuL38O2cWUTAzEE4SUh499wrU5x+N0PsYL0AvMFONsRaq5epOYrlIL9UPSL/qZRLmzpcEWZRfOX4Ni5N6Aa9ZR8juenR6UmE79S2dupBxQeinkdfXuWznUZH7BcnUDoz8rErABpJGHNVY60dUO/s055WCr7Y95Gi+H75X9/I="
|
32
|
-
on:
|
33
|
-
tags: true
|
10
|
+
|
11
|
+
addons:
|
12
|
+
apt:
|
13
|
+
packages:
|
14
|
+
- rpm
|
15
|
+
# provides unbuffer
|
16
|
+
- expect-dev
|
17
|
+
|
18
|
+
before_install:
|
19
|
+
- rm -f Gemfile.lock
|
20
|
+
|
21
|
+
jobs:
|
22
|
+
include:
|
23
|
+
- stage: spec
|
24
|
+
rvm: 2.1.9
|
25
|
+
script:
|
26
|
+
- bundle exec rake spec
|
27
|
+
|
28
|
+
- stage: acceptance
|
29
|
+
sudo: required
|
34
30
|
rvm: 2.1.9
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
31
|
+
services:
|
32
|
+
- docker
|
33
|
+
script:
|
34
|
+
- bundle exec rake acceptance
|
35
|
+
|
36
|
+
- stage: deploy
|
41
37
|
rvm: 2.1.9
|
42
|
-
|
38
|
+
script:
|
39
|
+
- true
|
40
|
+
before_deploy:
|
41
|
+
- "export GEM_VERSION=`ruby -r ./lib/simp/rake/helpers/version.rb -e 'puts Simp::Rake::Helpers::VERSION'`"
|
42
|
+
- '[[ $TRAVIS_TAG =~ ^${GEM_VERSION}$ ]]'
|
43
|
+
deploy:
|
44
|
+
- provider: rubygems
|
45
|
+
gemspec: simp-rake-helpers.gemspec
|
46
|
+
gem: simp-rake-helpers
|
47
|
+
api_key:
|
48
|
+
secure: "aoPmOZ3WgjNJ56UXmamKxaRv37iUaxKekAeS8n2fPk78X/nU2qGjdDHFH+SBrfl33PyzsGnS3WAANMKaIkAgssvKoaII/sAC+Sl6q1eyVUprZqloXrG+cHlnHY4GnziWEH3JrkHDChW0xoJq7hhpj7qTRKrEIp6nA25MjozjveoL+HH4kKy/ACJhiEdsYTFaDLYYFY50gGUL9KjIkwN6g9d+dIzG9JqcYoDbneQlO6/23yr4GiAHQ8HM1j5tUoBqJad+CWjWhSY7pbfYBy2ziwVhFy1qoOS4/bhlasRCsLTtz0AjjR0YWOhJap1vJqYhrSxtvhmVuzScmDkueAem/PfWS3XCQvbmjdmFMzPOxo0aRRJMlaeVWRsZ/aVFC7ngpRzokq1duZEKI47xZC27vJSOp3RZMmYl/7GsykoYkqHHsTvzSALEQiVtQq8sIOtN0JOTFI8H4LSMirXuqGq+SgCJiAQ3mQzSgh50TXiZaA2UPPcQaw4AzY36BRKs1cgw3cEWuL38O2cWUTAzEE4SUh499wrU5x+N0PsYL0AvMFONsRaq5epOYrlIL9UPSL/qZRLmzpcEWZRfOX4Ni5N6Aa9ZR8juenR6UmE79S2dupBxQeinkdfXuWznUZH7BcnUDoz8rErABpJGHNVY60dUO/s055WCr7Y95Gi+H75X9/I="
|
49
|
+
on:
|
50
|
+
tags: true
|
51
|
+
rvm: 2.1.9
|
52
|
+
condition: '($SKIP_PUBLISH != true)'
|
53
|
+
- provider: releases
|
54
|
+
api_key:
|
55
|
+
secure: "QKvAL4yAk8u9prJT6dFzKvszJfoo5/R9jIJ/WEUwdH17jij9Q/XhNrUzJZnrdVtqq4yCK6UqGqkRMMn2YLOKthoJycLEXzH+ZeCxBwzyN6uQkLmK5Mx43H+NNCsRkYTmcOdi4wJraWaWVq7XBxz6XdNRUkV99WyIh93wVnTwZuJxvF9koDFq+lRR4qRPh5Xn8HjKEZNPY7QHaecqsyWjgdEILWaQk/32IU20dLCT7U3jDdSuk92p24gWlkvTJ/gP+IYKWEPhgMMpx+WAtGGC+djMyZUrkaKEa/ennkOcFgqJ6UtDEInEtTBFWScGL70dwHORbEVExp9AKcLP3TmMyQ/36ybu7yrgcp6L995tM4Huez3GBM6NJ8xl/hYG3D1QwwoXGnWfUjQW2we7h8gcvl2yUSx59pb2V5QW3nCbD8rAiF/kpAcgwWyBT3iLpMer2j0Ux05NCBGqsltl9J944M+pLtO+YKldUw7uGDWMQQzq8/2m5+MoE4fvTgnaJ0rv0eRLWfNH2RQ565mE95nyJC/wXz/XB2v/KKHrf8FQZRIavH4Nuo4E2+tU8u2APU/n+gP8iQrtd86Nlo5RrBTu+NoDPDrM5OBnVYTT/AUAEUggXTPgZsqwZrSDSBEt0VbExnwQ5QMGIB9ZX+ZunrEZ6NeH8hV5hm67WYZ+qRFOPvI="
|
56
|
+
on:
|
57
|
+
tags: true
|
58
|
+
rvm: 2.1.9
|
59
|
+
condition: '($SKIP_PUBLISH != true)'
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,41 @@
|
|
1
|
+
### 5.4.1 / 2018-03-04
|
2
|
+
* Fix Travis CI deployment script
|
3
|
+
|
4
|
+
### 5.4.0 / 2018-02-12
|
5
|
+
* Add support for RPM customization (e.g., scriptlets, triggers)
|
6
|
+
- Scans new location `build/rpm_metadata/custom/` to find new content to
|
7
|
+
inject into the RPM spec (e.g., scriptlets, triggers).
|
8
|
+
- There is logic to permit overriding the `%pre`/`%post`/`%preun`/`%postun`
|
9
|
+
default scriptlets.
|
10
|
+
* Enable `%triggerpostun` fix for SIMP-3895
|
11
|
+
- The custom scriptlet feature provides a means for module RPMs that obsolete
|
12
|
+
the same module name to introduce a `%triggerpostun -- <obsoleted-package>`
|
13
|
+
scriptlet as a workaround to prevent `simp_rpm_helpers` from deleting
|
14
|
+
everything.
|
15
|
+
- The acceptance tests specifically demonstrate this type of trigger
|
16
|
+
* Improve RPM build troubleshooting:
|
17
|
+
- New env var: `SIMP_RPM_verbose=yes`
|
18
|
+
- New env var: `SIMP_RAKE_PKG_verbose=yes`
|
19
|
+
* Improve `simpdefault.spec` RPM Lua code troubleshooting:
|
20
|
+
- Cleaned up header documentation
|
21
|
+
- Added optional stderr warnings
|
22
|
+
- Refactored (some) code into functions
|
23
|
+
- Improved error messages
|
24
|
+
* Improve acceptance test / development workflow
|
25
|
+
- Add `Vagrantfile` to provide a quick & pristine beaker/docker setup
|
26
|
+
* Refactor acceptance test structure
|
27
|
+
- Code formerly embedded in the `pkg_rpm` tests have been refactored into
|
28
|
+
common helpers that other tests can use.
|
29
|
+
- There are mock prereq RPMs to test installation of newly-built RPMs
|
30
|
+
- A `simp_rpm_helper` (a copy of the script in simp-adapter) for scenarios
|
31
|
+
* Update README.md
|
32
|
+
- Removed obsolete references to `mock`-based development
|
33
|
+
- Clarified RPM Generation documentation
|
34
|
+
|
35
|
+
### 5.3.1 / 2018-02-18
|
36
|
+
* Add a conditional check so simp-core can build an ISO with a
|
37
|
+
pre-existing tarball with no user input
|
38
|
+
|
1
39
|
### 5.3.0 / 2018-02-02
|
2
40
|
* Add ability to specify external, non-module, RPM dependencies for
|
3
41
|
a checked-out repo from `simp-core/build/rpm/dependencies.yaml`
|
@@ -10,13 +48,13 @@
|
|
10
48
|
- Provides more extensive validation of date strings and changelog
|
11
49
|
entry ordering.
|
12
50
|
- Stops processing at the first invalid changelog entry, to minimize
|
13
|
-
non-
|
51
|
+
non-catastrophic errors from old changelog entries.
|
14
52
|
* Create pkg:compare_latest_tag, which is a more general replacement
|
15
53
|
for the Simp::Rake::Pupmod::Helpers compare_latest_tag task.
|
16
54
|
- Now supports non-Puppet SIMP assets for which version and changelog
|
17
55
|
information is specified in an RPM spec files.
|
18
56
|
- Does the same validation as the new pkg:create_tag_changelog task.
|
19
|
-
* Fix broken acceptance tests
|
57
|
+
* Fix broken acceptance tests
|
20
58
|
- Remove logic to build SIMP 4 and SIMP 5 RPMs.
|
21
59
|
- Remove mock logic
|
22
60
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -7,36 +7,30 @@
|
|
7
7
|
|
8
8
|
#### Table of Contents
|
9
9
|
|
10
|
-
<!--
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
-
|
34
|
-
- [FIPS Enabled Systems](#fips-enabled-systems)
|
35
|
-
- [Development](#development)
|
36
|
-
- [License](#license)
|
37
|
-
- [History](#history)
|
38
|
-
|
39
|
-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
10
|
+
<!-- vim-markdown-toc GFM -->
|
11
|
+
|
12
|
+
* [Overview](#overview)
|
13
|
+
* [This gem is part of SIMP](#this-gem-is-part-of-simp)
|
14
|
+
* [Features](#features)
|
15
|
+
* [Setup](#setup)
|
16
|
+
* [Gemfile](#gemfile)
|
17
|
+
* [Usage](#usage)
|
18
|
+
* [In a Puppet module](#in-a-puppet-module)
|
19
|
+
* [In a Ruby Gem](#in-a-ruby-gem)
|
20
|
+
* [Generating RPMs](#generating-rpms)
|
21
|
+
* [RPM Changelog](#rpm-changelog)
|
22
|
+
* [RPM Dependencies](#rpm-dependencies)
|
23
|
+
* [Reference](#reference)
|
24
|
+
* [simp/rake/rpm](#simprakerpm)
|
25
|
+
* [`rake pkg:rpm`](#rake-pkgrpm)
|
26
|
+
* [`rake pkg:tar`](#rake-pkgtar)
|
27
|
+
* [Limitations](#limitations)
|
28
|
+
* [Some versions of bundler fail on FIPS-enabled Systems](#some-versions-of-bundler-fail-on-fips-enabled-systems)
|
29
|
+
* [Development](#development)
|
30
|
+
* [License](#license)
|
31
|
+
* [History](#history)
|
32
|
+
|
33
|
+
<!-- vim-markdown-toc -->
|
40
34
|
|
41
35
|
## Overview
|
42
36
|
|
@@ -49,8 +43,8 @@ This gem is part of (the build tooling for) the [System Integrity Management Pla
|
|
49
43
|
|
50
44
|
### Features
|
51
45
|
|
52
|
-
*
|
53
|
-
* RPM
|
46
|
+
* Customizable RPM packaging based on a Puppet module's [`metadata.json`][metadata.json]
|
47
|
+
* RPM signing
|
54
48
|
* Rubygem packaging
|
55
49
|
|
56
50
|
## Setup
|
@@ -124,87 +118,81 @@ To see the extra rake tasks:
|
|
124
118
|
bunde exec rake -T
|
125
119
|
```
|
126
120
|
|
127
|
-
###
|
121
|
+
### Generating RPMs
|
128
122
|
|
129
|
-
|
123
|
+
The task [`rake pkg:rpm`](#simprakerpm)) provides the ability to package an RPM
|
124
|
+
from *any* Puppet module (regardless of whether it is a SIMP module or not).
|
125
|
+
The only requirement is that the Puppet module MUST include a valid
|
126
|
+
[`metadata.json`][metadata.json] file with entries for `name`,
|
127
|
+
`version`, `license`, `summary`, and `source`.
|
130
128
|
|
131
|
-
|
132
|
-
compatible [metadata.json](https://docs.puppet.com/puppet/latest/reference/modules_metadata.html).
|
129
|
+
[metadata.json]: https://docs.puppet.com/puppet/latest/reference/modules_metadata.html
|
133
130
|
|
134
|
-
The
|
135
|
-
|
131
|
+
The RPM package may be configured by other (optional) files under the project
|
132
|
+
directory . The full list of files considered are:
|
133
|
+
|
134
|
+
```
|
135
|
+
./
|
136
|
+
├── metadata.json # REQUIRED keys: name, version, license, summary, source
|
137
|
+
├── CHANGELOG # OPTIONAL written in RPM's CHANGELOG format
|
138
|
+
└── build/ # OPTIONAL
|
139
|
+
└── rpm_metadata/ # OPTIONAL
|
140
|
+
├── release # OPTIONAL defines the RPM's "-0" release number
|
141
|
+
├── requires # OPTIONAL supplementary 'Requires','Provides','Obsoletes'
|
142
|
+
└── custom/ # OPTIONAL
|
143
|
+
└── * # OPTIONAL custom snippets in RPM .spec format
|
144
|
+
```
|
136
145
|
|
137
146
|
*NOTE*: The dependencies in `metadata.json` are *not* used to generate RPM
|
138
147
|
dependencies!
|
139
148
|
|
149
|
+
|
140
150
|
#### RPM Changelog
|
141
151
|
|
142
|
-
The Changelog
|
143
|
-
|
144
|
-
|
152
|
+
The RPM Changelog will be derived from a `CHANGELOG` file at the top
|
153
|
+
level of the project, if it exists.
|
154
|
+
|
155
|
+
* The file is expected to conform to the [RPM Changelog][RPM CHANGELOG]
|
156
|
+
format described in the Fedora packaging guidelines
|
157
|
+
* The file MUST start with a well-formatted RPM changelog string, or it will
|
158
|
+
be ignored.
|
159
|
+
* The format is *not* fully checked before attempting to build the RPM―the
|
160
|
+
RPM build will fail if the Changelog entries are not valid.
|
161
|
+
|
162
|
+
[RPM CHANGELOG]: https://fedoraproject.org/wiki/Packaging:Guidelines#Changelogs
|
145
163
|
|
146
|
-
The Changelog is *not* fully checked before attempting to build the RPM. Your
|
147
|
-
RPM build will fail if the Changelog entries are not valid per the RPM
|
148
|
-
specification.
|
149
164
|
|
150
165
|
#### RPM Dependencies
|
151
166
|
|
152
167
|
It is likely that you will want to declare your dependencies in your RPM. To do
|
153
|
-
this,
|
154
|
-
|
168
|
+
this, create a `build/rpm_metadata` directory at the root of the project.
|
169
|
+
A `requires` file in the `build/rpm_metadata` directory will be
|
155
170
|
used to declare the dependencies of the RPM. A file named `release` in the
|
156
171
|
`build/rpm_metadata` directory will be used to declare the RPM release
|
157
172
|
number.
|
158
173
|
|
159
174
|
The following directives may be declared in the `requires` file:
|
160
|
-
* Provides
|
161
|
-
* Requires
|
162
|
-
* Obsoletes
|
175
|
+
* `Provides:`
|
176
|
+
* `Requires:`
|
177
|
+
* `Obsoletes:`
|
163
178
|
|
164
179
|
## Reference
|
165
180
|
|
166
181
|
### simp/rake/rpm
|
167
182
|
|
168
|
-
#### rake pkg:rpm
|
169
|
-
Builds an RPM to package the current SIMP project.
|
170
|
-
|
171
|
-
**NOTE**: Building RPMs requires a working Mock setup (http://fedoraproject.org/wiki/Projects/Mock)
|
172
|
-
|
173
|
-
##### Parameters
|
174
|
-
|
175
|
-
* **:chroot** - The Mock chroot configuration to use. See the '--root' option in mock(1)."
|
176
|
-
* **:unique** - Whether or not to build the RPM in a unique Mock environment. This can be very useful for parallel builds of all modules.
|
177
|
-
* **:snapshot_release** - Add snapshot_release (date and time) to rpm version. Rpm spec file must have macro for this to work.
|
178
|
-
|
179
|
-
|
180
|
-
#### rake pkg:scrub[chroot,unique]
|
181
|
-
|
182
|
-
Scrub the current SIMP project's mock build directory.
|
183
|
-
|
184
|
-
|
185
|
-
#### rake pkg:srpm[chroot,unique,snapshot_release]
|
186
|
-
Build the pupmod-simp-iptables SRPM. Building RPMs requires a working Mock setup (http://fedoraproject.org/wiki/Projects/Mock)
|
187
|
-
|
188
|
-
**NOTE**: Building RPMs requires a working Mock setup (http://fedoraproject.org/wiki/Projects/Mock)
|
189
|
-
|
190
|
-
##### Parameters
|
191
|
-
|
192
|
-
* **:chroot** - The Mock chroot configuration to use. See the '--root' option in mock(1)."
|
193
|
-
* **:unique** - Whether or not to build the SRPM in a unique Mock environment. This can be very useful for parallel builds of all modules.
|
194
|
-
* **:snapshot_release** - Add snapshot_release (date and time) to rpm version. The RPM spec file must support macros for this to work.
|
183
|
+
#### `rake pkg:rpm`
|
195
184
|
|
196
|
-
|
185
|
+
Packages the current SIMP project as an RPM
|
197
186
|
|
198
|
-
|
187
|
+
#### `rake pkg:tar`
|
199
188
|
|
200
|
-
Build the
|
201
|
-
* :snapshot_release - Add snapshot_release (date and time) to rpm version, rpm spec file must have macro for this to work.
|
189
|
+
Build the tar package for the current SIMP project
|
202
190
|
|
203
191
|
## Limitations
|
204
192
|
|
205
|
-
### FIPS
|
193
|
+
### Some versions of bundler fail on FIPS-enabled Systems
|
206
194
|
|
207
|
-
This is
|
195
|
+
This is a limitation of Bundler, not the gem.
|
208
196
|
|
209
197
|
If you are running on a FIPS-enabled system, you will need to use `bundler '~> 1.14.0'`
|
210
198
|
until the FIPS support can be corrected.
|
data/lib/simp/rake/build/auto.rb
CHANGED
@@ -102,6 +102,7 @@ module Simp::Rake::Build
|
|
102
102
|
- SIMP_BUILD_staging_dir => Path to stage big build assets
|
103
103
|
[Default: './SIMP_ISO_STAGING']
|
104
104
|
- SIMP_BUILD_rm_staging_dir => 'no' do not forcibly remove the staging dir before starting
|
105
|
+
- SIMP_BUILD_overlay => 'no' uses an existing DVD overlay if found
|
105
106
|
- SIMP_BUILD_force_dirty => 'yes' tries to checks out subrepos even if dirty
|
106
107
|
- SIMP_BUILD_docs => 'yes' builds & includes documentation
|
107
108
|
- SIMP_BUILD_checkout => 'no' will skip the git repo checkouts
|
@@ -143,6 +144,7 @@ module Simp::Rake::Build
|
|
143
144
|
prompt = ENV.fetch('SIMP_BUILD_prompt', 'yes') != 'no'
|
144
145
|
method = ENV.fetch('SIMP_BUILD_puppetfile','tracking')
|
145
146
|
do_rm_staging = ENV.fetch('SIMP_BUILD_rm_staging_dir', 'yes') == 'yes'
|
147
|
+
build_overlay = ENV.fetch('SIMP_BUILD_overlay', "yes") == 'yes'
|
146
148
|
do_docs = ENV['SIMP_BUILD_docs'] == 'yes' ? 'true' : 'false'
|
147
149
|
do_merge = ENV['SIMP_BUILD_unpack_merge'] != 'no'
|
148
150
|
do_prune = ENV['SIMP_BUILD_prune'] != 'no' ? 'true' : 'false'
|
@@ -212,6 +214,10 @@ module Simp::Rake::Build
|
|
212
214
|
puts("Invalid input: '#{resp}', please try again")
|
213
215
|
end
|
214
216
|
end
|
217
|
+
else
|
218
|
+
unless (build_overlay)
|
219
|
+
tarball = tar_file
|
220
|
+
end
|
215
221
|
end
|
216
222
|
end
|
217
223
|
|
data/lib/simp/rake/build/pkg.rb
CHANGED
@@ -861,8 +861,8 @@ protect=1
|
|
861
861
|
$stderr.puts e if opts[:verbose]
|
862
862
|
end
|
863
863
|
end
|
864
|
-
|
865
|
-
$stderr.puts '>>Issue creating YUM configuration. Packages will be locally generated.'
|
864
|
+
else
|
865
|
+
$stderr.puts '>>Issue creating YUM configuration. Packages will be locally generated.' if opts[:verbose]
|
866
866
|
|
867
867
|
result = true
|
868
868
|
end
|
@@ -57,10 +57,13 @@ module Simp::Rake::Build::RpmDeps
|
|
57
57
|
|
58
58
|
# We don't want to add this if we're building an older
|
59
59
|
# version or the RPM will be malformed
|
60
|
-
|
61
|
-
|
60
|
+
main_version, release = version.split('-')
|
61
|
+
release = '0' unless release
|
62
|
+
release = release.to_i
|
62
63
|
|
63
|
-
|
64
|
+
if Gem::Version.new(module_version) > Gem::Version.new(main_version)
|
65
|
+
rpm_metadata_content << "Obsoletes: #{pkg} < #{main_version}-#{release}.obsolete"
|
66
|
+
rpm_metadata_content << "Provides: #{pkg} = #{main_version}-#{release}.obsolete"
|
64
67
|
else
|
65
68
|
puts "Ignoring 'obsoletes' for #{pkg}: module version" +
|
66
69
|
" #{module_version} from metadata.json is not >" +
|