simp-rake-helpers 5.11.6 → 5.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -0
- data/CONTRIBUTING.md +1 -1
- data/README.md +1 -1
- data/lib/simp/command_utils.rb +21 -0
- data/lib/simp/local_gpg_signing_key.rb +128 -79
- data/lib/simp/rake.rb +3 -17
- data/lib/simp/rake/build/pkg.rb +102 -40
- data/lib/simp/rake/helpers/version.rb +1 -1
- data/lib/simp/rake/pkg.rb +5 -1
- data/lib/simp/rake/pupmod/helpers.rb +2 -0
- data/lib/simp/rake/rubygem.rb +5 -1
- data/lib/simp/rpm.rb +10 -127
- data/lib/simp/rpm_signer.rb +321 -0
- data/spec/acceptance/00_pkg_rpm_custom_scriptlets_spec.rb +18 -19
- data/spec/acceptance/10_pkg_rpm_spec.rb +46 -48
- data/spec/acceptance/50_local_gpg_signing_key_spec.rb +7 -3
- data/spec/acceptance/55_build_pkg_signing_spec.rb +293 -42
- data/spec/acceptance/files/testpackage/README +8 -0
- data/spec/acceptance/files/testpackage/spec/classes/init_spec.rb +1 -0
- data/spec/acceptance/files/testpackage/spec/files/mock_something.rb +3 -0
- data/spec/acceptance/files/testpackage/utils/convert_v1_to_v2.rb +3 -0
- data/spec/acceptance/nodesets/default.yml +15 -2
- data/spec/acceptance/support/build_project_helpers.rb +32 -8
- data/spec/lib/simp/command_utils_spec.rb +29 -0
- data/spec/lib/simp/local_gpg_signing_key_spec.rb.beaker-only +115 -18
- data/spec/lib/simp/rake/pupmod/fixtures/simpmod/README.md +2 -2
- data/spec/lib/simp/rpm_signer_spec.rb +98 -0
- data/spec/lib/simp/rpm_spec.rb +0 -6
- metadata +12 -67
- data/.travis.yml +0 -41
- data/spec/acceptance/20_pkg_rpm_upgrade_spec.rb +0 -236
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-2.1/CHANGELOG +0 -2
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-2.1/Rakefile +0 -3
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-2.1/build/rpm_metadata/custom/overrides +0 -14
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-2.1/build/rpm_metadata/requires +0 -1
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-2.1/metadata.json +0 -33
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-3.0/CHANGELOG +0 -2
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-3.0/Rakefile +0 -3
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-3.0/build/rpm_metadata/custom/overrides +0 -14
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-3.0/build/rpm_metadata/requires +0 -1
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-new-package-3.0/metadata.json +0 -33
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-1.0/CHANGELOG +0 -2
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-1.0/Rakefile +0 -3
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-1.0/build/rpm_metadata/requires +0 -1
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-1.0/metadata.json +0 -33
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.0/CHANGELOG +0 -2
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.0/Rakefile +0 -3
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.0/build/rpm_metadata/requires +0 -1
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.0/metadata.json +0 -33
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.2/CHANGELOG +0 -2
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.2/Rakefile +0 -3
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.2/build/rpm_metadata/custom/overrides +0 -14
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.2/build/rpm_metadata/requires +0 -1
- data/spec/acceptance/files/custom_scriptlet_triggers/pupmod-old-package-2.2/metadata.json +0 -33
- data/spec/acceptance/files/mock_packages/pupmod-puppetlabs-stdlib.spec +0 -32
- data/spec/acceptance/files/mock_packages/pupmod-simp-foo.spec +0 -32
- data/spec/acceptance/files/mock_packages/pupmod-simp-simplib.spec +0 -32
- data/spec/acceptance/files/mock_packages/rpmbuild.sh +0 -25
- data/spec/acceptance/files/mock_packages/simp-adapter.spec +0 -43
- data/spec/acceptance/files/mock_packages/simp-adapter/etc/simp/adapter_config.yaml +0 -3
- data/spec/acceptance/files/mock_packages/simp-adapter/usr/local/sbin/simp_rpm_helper +0 -495
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-1.0/CHANGELOG +0 -2
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-1.0/Rakefile +0 -3
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-1.0/build/rpm_metadata/requires +0 -2
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-1.0/data/os/CentOS.yaml +0 -2
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-1.0/data/os/RedHat.yaml +0 -2
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-1.0/hiera.yaml +0 -14
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-1.0/manifests/init.pp +0 -2
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-1.0/metadata.json +0 -37
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-2.0/CHANGELOG +0 -5
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-2.0/Rakefile +0 -3
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-2.0/build/rpm_metadata/requires +0 -2
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-2.0/data/os/CentOS.yaml +0 -2
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-2.0/data/os/RedHat.yaml +0 -2
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-2.0/hiera.yaml +0 -14
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-2.0/manifests/init.pp +0 -3
- data/spec/acceptance/files/package_upgrades/pupmod-simp-testpackage-2.0/metadata.json +0 -37
- data/spec/lib/simp/ci/files/job_broken_link_nodeset/spec/acceptance/suites/default/nodesets +0 -1
- data/spec/lib/simp/ci/files/job_invalid_nodeset/spec/acceptance/suites/default/nodesets +0 -1
- data/spec/lib/simp/ci/files/job_invalid_suite/spec/acceptance/suites/default/nodesets +0 -1
- data/spec/lib/simp/ci/files/job_missing_nodeset/spec/acceptance/suites/default/nodesets +0 -1
- data/spec/lib/simp/ci/files/job_missing_suite_and_nodeset/spec/acceptance/suites/default/nodesets +0 -1
- data/spec/lib/simp/ci/files/multiple_invalid_jobs/spec/acceptance/suites/default/nodesets +0 -1
- data/spec/lib/simp/ci/files/multiple_valid_jobs/spec/acceptance/suites/default/nodesets +0 -1
- data/spec/lib/simp/ci/files/no_gitlab_config_with_tests/spec/acceptance/suites/default/nodesets +0 -1
- data/spec/lib/simp/ci/files/no_gitlab_config_without_tests/spec/acceptance/suites/default/nodesets +0 -1
- data/spec/lib/simp/ci/files/suite_skeleton_only/spec/acceptance/nodesets/default.yml +0 -1
- data/spec/lib/simp/ci/files/suite_skeleton_only/spec/acceptance/suites/default/nodesets +0 -1
- data/spec/lib/simp/ci/files/valid_job_nodeset_dir_link/spec/acceptance/suites/default/nodesets +0 -1
- data/spec/lib/simp/ci/files/valid_job_nodeset_link/spec/acceptance/suites/default/nodesets/default.yml +0 -1
- data/spec/lib/simp/files/build/testpackage.spec +0 -1
- data/spec/lib/simp/rake/pupmod/fixtures/simpmod/spec/acceptance/nodesets/default.yml +0 -1
- data/spec/lib/simp/rake/pupmod/fixtures/simpmod/spec/acceptance/suites/default/nodesets +0 -1
@@ -1,14 +0,0 @@
|
|
1
|
-
%triggerpostun -- pupmod-old-package
|
2
|
-
|
3
|
-
echo
|
4
|
-
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
5
|
-
echo "@@@@@@ Executing SIMP-3895 workaround @@@@@@"
|
6
|
-
echo "@@@@@@ @@@@@@"
|
7
|
-
echo "@@@@@@ upgrading from obsoleted pkg @@@@@@"
|
8
|
-
echo "@@@@@@ 'pupmod-old-package' @@@@@@"
|
9
|
-
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
10
|
-
echo
|
11
|
-
echo "pupmod-new-package: post 1=2 (triggered by: %triggerpostun -- pupmod-old-package)"
|
12
|
-
|
13
|
-
# re-send the 'post' message
|
14
|
-
/usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/package --rpm_section='post' --rpm_status=2
|
@@ -1 +0,0 @@
|
|
1
|
-
Obsoletes: pupmod-old-package < 2.1.0
|
@@ -1,33 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "new-package",
|
3
|
-
"version": "2.1.0",
|
4
|
-
"author": "simp",
|
5
|
-
"summary": "A SIMP test module for upgrading obsoleted packages",
|
6
|
-
"license": "Apache-2.0",
|
7
|
-
"source": "https://github.com/simp/rubygem-simp-rake-helpers",
|
8
|
-
"project_page": "https://github.com/simp/rubygem-simp-rake-helpers",
|
9
|
-
"issues_url": "https://simp/project.atlassian.net",
|
10
|
-
"tags": [ "simp", "test", "package"],
|
11
|
-
"dependencies": [
|
12
|
-
{
|
13
|
-
"name": "simp/simplib",
|
14
|
-
"version_requirement": ">= 1.1.0"
|
15
|
-
}
|
16
|
-
],
|
17
|
-
"operatingsystem_support": [
|
18
|
-
{
|
19
|
-
"operatingsystem": "CentOS",
|
20
|
-
"operatingsystemrelease": [
|
21
|
-
"6",
|
22
|
-
"7"
|
23
|
-
]
|
24
|
-
},
|
25
|
-
{
|
26
|
-
"operatingsystem": "RedHat",
|
27
|
-
"operatingsystemrelease": [
|
28
|
-
"6",
|
29
|
-
"7"
|
30
|
-
]
|
31
|
-
}
|
32
|
-
]
|
33
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
%triggerpostun -- pupmod-old-package
|
2
|
-
|
3
|
-
echo
|
4
|
-
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
5
|
-
echo "@@@@@@ Executing SIMP-3895 workaround @@@@@@"
|
6
|
-
echo "@@@@@@ @@@@@@"
|
7
|
-
echo "@@@@@@ upgrading from obsoleted pkg @@@@@@"
|
8
|
-
echo "@@@@@@ 'pupmod-old-package' @@@@@@"
|
9
|
-
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
10
|
-
echo
|
11
|
-
echo "pupmod-new-package: post 1=2 (triggered by: %triggerpostun -- pupmod-old-package)"
|
12
|
-
|
13
|
-
# re-send the 'post' message
|
14
|
-
/usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/package --rpm_section='post' --rpm_status=2
|
@@ -1 +0,0 @@
|
|
1
|
-
Obsoletes: pupmod-old-package < 3.0.0
|
@@ -1,33 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "new-package",
|
3
|
-
"version": "3.0.0",
|
4
|
-
"author": "simp",
|
5
|
-
"summary": "A SIMP test module for upgrading obsoleted packages",
|
6
|
-
"license": "Apache-2.0",
|
7
|
-
"source": "https://github.com/simp/rubygem-simp-rake-helpers",
|
8
|
-
"project_page": "https://github.com/simp/rubygem-simp-rake-helpers",
|
9
|
-
"issues_url": "https://simp/project.atlassian.net",
|
10
|
-
"tags": [ "simp", "test", "package"],
|
11
|
-
"dependencies": [
|
12
|
-
{
|
13
|
-
"name": "simp/simplib",
|
14
|
-
"version_requirement": ">= 1.1.0"
|
15
|
-
}
|
16
|
-
],
|
17
|
-
"operatingsystem_support": [
|
18
|
-
{
|
19
|
-
"operatingsystem": "CentOS",
|
20
|
-
"operatingsystemrelease": [
|
21
|
-
"6",
|
22
|
-
"7"
|
23
|
-
]
|
24
|
-
},
|
25
|
-
{
|
26
|
-
"operatingsystem": "RedHat",
|
27
|
-
"operatingsystemrelease": [
|
28
|
-
"6",
|
29
|
-
"7"
|
30
|
-
]
|
31
|
-
}
|
32
|
-
]
|
33
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
Requires: pupmod-simp-foo >= 1.2.3
|
@@ -1,33 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "old-package",
|
3
|
-
"version": "1.0.0",
|
4
|
-
"author": "simp",
|
5
|
-
"summary": "A SIMP test module for upgrading obsoleted packages",
|
6
|
-
"license": "Apache-2.0",
|
7
|
-
"source": "https://github.com/simp/rubygem-simp-rake-helpers",
|
8
|
-
"project_page": "https://github.com/simp/rubygem-simp-rake-helpers",
|
9
|
-
"issues_url": "https://simp/project.atlassian.net",
|
10
|
-
"tags": [ "simp", "test", "package"],
|
11
|
-
"dependencies": [
|
12
|
-
{
|
13
|
-
"name": "simp/simplib",
|
14
|
-
"version_requirement": ">= 1.1.0"
|
15
|
-
}
|
16
|
-
],
|
17
|
-
"operatingsystem_support": [
|
18
|
-
{
|
19
|
-
"operatingsystem": "CentOS",
|
20
|
-
"operatingsystemrelease": [
|
21
|
-
"6",
|
22
|
-
"7"
|
23
|
-
]
|
24
|
-
},
|
25
|
-
{
|
26
|
-
"operatingsystem": "RedHat",
|
27
|
-
"operatingsystemrelease": [
|
28
|
-
"6",
|
29
|
-
"7"
|
30
|
-
]
|
31
|
-
}
|
32
|
-
]
|
33
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
Requires: pupmod-simp-foo >= 1.2.3
|
@@ -1,33 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "old-package",
|
3
|
-
"version": "2.0.0",
|
4
|
-
"author": "simp",
|
5
|
-
"summary": "A SIMP test module for upgrading obsoleted packages",
|
6
|
-
"license": "Apache-2.0",
|
7
|
-
"source": "https://github.com/simp/rubygem-simp-rake-helpers",
|
8
|
-
"project_page": "https://github.com/simp/rubygem-simp-rake-helpers",
|
9
|
-
"issues_url": "https://simp/project.atlassian.net",
|
10
|
-
"tags": [ "simp", "test", "package"],
|
11
|
-
"dependencies": [
|
12
|
-
{
|
13
|
-
"name": "simp/simplib",
|
14
|
-
"version_requirement": ">= 1.1.0"
|
15
|
-
}
|
16
|
-
],
|
17
|
-
"operatingsystem_support": [
|
18
|
-
{
|
19
|
-
"operatingsystem": "CentOS",
|
20
|
-
"operatingsystemrelease": [
|
21
|
-
"6",
|
22
|
-
"7"
|
23
|
-
]
|
24
|
-
},
|
25
|
-
{
|
26
|
-
"operatingsystem": "RedHat",
|
27
|
-
"operatingsystemrelease": [
|
28
|
-
"6",
|
29
|
-
"7"
|
30
|
-
]
|
31
|
-
}
|
32
|
-
]
|
33
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
%triggerpostun -- pupmod-new-package
|
2
|
-
|
3
|
-
echo
|
4
|
-
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
5
|
-
echo "@@@@@@ Executing SIMP-3895 workaround @@@@@@"
|
6
|
-
echo "@@@@@@ @@@@@@"
|
7
|
-
echo "@@@@@@ upgrading from obsoleted pkg @@@@@@"
|
8
|
-
echo "@@@@@@ 'pupmod-new-package' @@@@@@"
|
9
|
-
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
|
10
|
-
echo
|
11
|
-
echo "pupmod-old-package: post 1=2 (triggered by: %triggerpostun -- pupmod-new-package)"
|
12
|
-
|
13
|
-
# re-send the 'post' message
|
14
|
-
/usr/local/sbin/simp_rpm_helper --rpm_dir=/usr/share/simp/modules/package --rpm_section='post' --rpm_status=2
|
@@ -1 +0,0 @@
|
|
1
|
-
Obsoletes: pupmod-new-package < 2.2.0
|
@@ -1,33 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "old-package",
|
3
|
-
"version": "2.2.0",
|
4
|
-
"author": "simp",
|
5
|
-
"summary": "A SIMP test module for upgrading obsoleted packages",
|
6
|
-
"license": "Apache-2.0",
|
7
|
-
"source": "https://github.com/simp/rubygem-simp-rake-helpers",
|
8
|
-
"project_page": "https://github.com/simp/rubygem-simp-rake-helpers",
|
9
|
-
"issues_url": "https://simp/project.atlassian.net",
|
10
|
-
"tags": [ "simp", "test", "package"],
|
11
|
-
"dependencies": [
|
12
|
-
{
|
13
|
-
"name": "simp/simplib",
|
14
|
-
"version_requirement": ">= 1.1.0"
|
15
|
-
}
|
16
|
-
],
|
17
|
-
"operatingsystem_support": [
|
18
|
-
{
|
19
|
-
"operatingsystem": "CentOS",
|
20
|
-
"operatingsystemrelease": [
|
21
|
-
"6",
|
22
|
-
"7"
|
23
|
-
]
|
24
|
-
},
|
25
|
-
{
|
26
|
-
"operatingsystem": "RedHat",
|
27
|
-
"operatingsystemrelease": [
|
28
|
-
"6",
|
29
|
-
"7"
|
30
|
-
]
|
31
|
-
}
|
32
|
-
]
|
33
|
-
}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
Name: pupmod-puppetlabs-stdlib
|
2
|
-
Version: 5.9.9
|
3
|
-
Release: 9
|
4
|
-
Summary: mock simplib test package
|
5
|
-
BuildArch: noarch
|
6
|
-
|
7
|
-
License: Apache-2.0
|
8
|
-
URL: http://foo.bar
|
9
|
-
|
10
|
-
%description
|
11
|
-
A mock RPM package used for acceptance tests
|
12
|
-
|
13
|
-
%prep
|
14
|
-
exit 0
|
15
|
-
|
16
|
-
%build
|
17
|
-
exit 0
|
18
|
-
|
19
|
-
|
20
|
-
%install
|
21
|
-
exit 0
|
22
|
-
|
23
|
-
%clean
|
24
|
-
exit 0
|
25
|
-
|
26
|
-
%files
|
27
|
-
%doc
|
28
|
-
|
29
|
-
|
30
|
-
%changelog
|
31
|
-
* Fri Feb 23 2018 nobody
|
32
|
-
- some comment
|
@@ -1,32 +0,0 @@
|
|
1
|
-
Name: pupmod-simp-foo
|
2
|
-
Version: 1.9.9
|
3
|
-
Release: 9
|
4
|
-
Summary: mock foo test package
|
5
|
-
BuildArch: noarch
|
6
|
-
|
7
|
-
License: Apache-2.0
|
8
|
-
URL: http://foo.bar
|
9
|
-
|
10
|
-
%description
|
11
|
-
A mock RPM package used for acceptance tests
|
12
|
-
|
13
|
-
%prep
|
14
|
-
exit 0
|
15
|
-
|
16
|
-
%build
|
17
|
-
exit 0
|
18
|
-
|
19
|
-
|
20
|
-
%install
|
21
|
-
exit 0
|
22
|
-
|
23
|
-
%clean
|
24
|
-
exit 0
|
25
|
-
|
26
|
-
%files
|
27
|
-
%doc
|
28
|
-
|
29
|
-
|
30
|
-
%changelog
|
31
|
-
* Fri Feb 23 2018 nobody
|
32
|
-
- some comment
|
@@ -1,32 +0,0 @@
|
|
1
|
-
Name: pupmod-simp-simplib
|
2
|
-
Version: 1.9.9
|
3
|
-
Release: 9
|
4
|
-
Summary: mock simplib test package
|
5
|
-
BuildArch: noarch
|
6
|
-
|
7
|
-
License: Apache-2.0
|
8
|
-
URL: http://foo.bar
|
9
|
-
|
10
|
-
%description
|
11
|
-
A mock RPM package used for acceptance tests
|
12
|
-
|
13
|
-
%prep
|
14
|
-
exit 0
|
15
|
-
|
16
|
-
%build
|
17
|
-
exit 0
|
18
|
-
|
19
|
-
|
20
|
-
%install
|
21
|
-
exit 0
|
22
|
-
|
23
|
-
%clean
|
24
|
-
exit 0
|
25
|
-
|
26
|
-
%files
|
27
|
-
%doc
|
28
|
-
|
29
|
-
|
30
|
-
%changelog
|
31
|
-
* Fri Feb 23 2018 nobody
|
32
|
-
- some comment
|
@@ -1,25 +0,0 @@
|
|
1
|
-
spec_file=$1
|
2
|
-
|
3
|
-
FAKE_RPM_SRC_DIR=${FAKE_RPM_SRC_DIR:-${PWD}/pkg}
|
4
|
-
FAKE_RPM_BUILD_DIR=${FAKE_RPM_BUILD_DIR:-${FAKE_RPM_SRC_DIR}/rpmbuild}
|
5
|
-
|
6
|
-
# clean up old builds
|
7
|
-
rm -rf "${FAKE_RPM_BUILD_DIR}"/{BUILDROOT,BUILD,SOURCES}/** &> /dev/null :
|
8
|
-
mkdir -p "${FAKE_RPM_BUILD_DIR}"/{BUILDROOT,BUILD,SOURCES}
|
9
|
-
|
10
|
-
|
11
|
-
# if there is a directory with the same name as the spec file, build a tar ball
|
12
|
-
# from it and stage it under SOURCES
|
13
|
-
source_dir=`echo ${spec_file}| sed -e 's/.spec$//'`
|
14
|
-
if [ -d "${source_dir}" ]; then
|
15
|
-
echo "Found a directory named '${source_dir}'; building tarball"
|
16
|
-
pushd "${source_dir}" > /dev/null
|
17
|
-
tar -zcv --exclude=.*.swp -f "${FAKE_RPM_BUILD_DIR}/SOURCES/files.tar.gz" *
|
18
|
-
popd > /dev/null
|
19
|
-
else
|
20
|
-
echo "NOTE: no source directory ar '${source_dir}'"
|
21
|
-
fi
|
22
|
-
|
23
|
-
|
24
|
-
# rpmbuild
|
25
|
-
rpmbuild -D "buildroot ${FAKE_RPM_BUILD_DIR}/BUILDROOT" -D "builddir ${FAKE_RPM_BUILD_DIR}/BUILD" -D "_sourcedir ${FAKE_RPM_BUILD_DIR}/SOURCES" -D "_rpmdir ${FAKE_RPM_SRC_DIR}/dist" -D "_srcrpmdir ${FAKE_RPM_SRC_DIR}/dist" -D "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" -ba $@ "${spec_file}"
|
@@ -1,43 +0,0 @@
|
|
1
|
-
Name: simp-adapter
|
2
|
-
Version: 0.9.9
|
3
|
-
Release: 9
|
4
|
-
Summary: mock simplib test package
|
5
|
-
BuildArch: noarch
|
6
|
-
|
7
|
-
License: Apache-2.0
|
8
|
-
URL: http://foo.bar
|
9
|
-
|
10
|
-
Source0: files.tar.gz
|
11
|
-
|
12
|
-
%description
|
13
|
-
A mock RPM package used for acceptance tests
|
14
|
-
|
15
|
-
%prep
|
16
|
-
echo ================ PWD: $PWD
|
17
|
-
%setup -c
|
18
|
-
|
19
|
-
%build
|
20
|
-
|
21
|
-
|
22
|
-
%install
|
23
|
-
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
|
24
|
-
mkdir -p %{buildroot}/opt/test/puppet/code
|
25
|
-
cp -r $PWD/* %{buildroot}/
|
26
|
-
rm -rf %{buildroot}/**/.*.swp
|
27
|
-
rm -rf %{buildroot}/opt/puppetlabs
|
28
|
-
|
29
|
-
%clean
|
30
|
-
|
31
|
-
%files
|
32
|
-
%defattr(0640,root,root,0755)
|
33
|
-
|
34
|
-
%attr(0750,root,root)/usr/local/sbin/simp_rpm_helper
|
35
|
-
#%attr(0755,root,root)/opt/puppetlabs/puppet/bin/ruby
|
36
|
-
#%attr(0755,root,root)/opt/puppetlabs/bin/puppet
|
37
|
-
%attr(0644,root,root)/etc/simp/adapter_config.yaml
|
38
|
-
%dir /opt/test/puppet/code
|
39
|
-
|
40
|
-
|
41
|
-
%changelog
|
42
|
-
* Fri Feb 23 2018 nobody
|
43
|
-
- some comment
|