Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging for puppet-foreman_scap_client [rpm] #1325

Merged

Conversation

shlomizadok
Copy link
Member

For plugin updates, please indicate which repos this should be built into:

  • Nightly
  • 1.13
  • 1.12
  • 1.11

See Foreman's plugin maintainer documentation for more information.


@ares
Copy link
Member

ares commented Sep 12, 2016

This is weird, when I try to download the module directly, I'm getting the following output with no redirection

*   Trying 52.10.130.237...
* Connected to forgeapi.puppetlabs.com (52.10.130.237) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* ALPN/NPN, server did not agree to a protocol
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
*       subject: CN=*.puppetlabs.com
*       start date: čen 24 00:00:00 2016 GMT
*       expire date: srp 29 23:59:59 2019 GMT
*       common name: *.puppetlabs.com
*       issuer: CN=RapidSSL SHA256 CA,O=GeoTrust Inc.,C=US
> GET /v3/files/theforeman-foreman_scap_client-0.3.11.tar.gz HTTP/1.1
> Host: forgeapi.puppetlabs.com
> User-Agent: curl/7.43.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: nginx
< Date: Mon, 12 Sep 2016 07:25:47 GMT
< Content-Type: application/octet-stream
< Transfer-Encoding: chunked
< Status: 200 OK
< Cache-Control: public
< content-disposition: attachment; filename=theforeman-foreman_scap_client-0.3.11.tar.gz
< ETag: "664dddcc163b39ceffea70bfc2208ce1"
< X-Node: forgenext-app06-prod
< X-Revision: 66c9f4d
< Vary: Origin
< X-Content-Type-Options: nosniff
< X-App-Server: forgeapi/forgeapi-i-75aa79ae_forgenext-app06-prod.ops.puppetlabs.net
< X-Lb-Server: forgenext-lb02-prod.ops.puppetl
< X-UUID: D5AF250A:2129_0AE00633:01BB_57D6587A_44310FE:4768

the tarball has 12K, could we make an exception and maybe put this file into packaging repo?

@ares
Copy link
Member

ares commented Sep 12, 2016

what's even more weird, following jenkins steps locally lead to working build in koji, I just had to modify tito.props

@ares
Copy link
Member

ares commented Sep 12, 2016

btw Shlomi, you might want to add this to this PR

diff --git a/rel-eng/tito.props b/rel-eng/tito.props
index ba5bf1e..f76f2e5 100644
--- a/rel-eng/tito.props
+++ b/rel-eng/tito.props
@@ -362,6 +362,7 @@ whitelist = rubygem-algebrick
 [foreman-plugins-nightly-nonscl-rhel7]
 disttag = .el7
 whitelist = rubygem-algebrick
+  puppet-foreman_scap_client
   rubygem-apipie-params
   rubygem-chef-api
   rubygem-concurrent-ruby
@@ -397,6 +398,7 @@ whitelist = rubygem-algebrick
 [foreman-plugins-nightly-fedora24]
 disttag = .fc24
 whitelist = rubygem-algebrick
+  puppet-foreman_scap_client
   rubygem-angular-rails-templates
   rubygem-apipie-params
   rubygem-azure

@shlomizadok
Copy link
Member Author

@ares - thanks, I have added the changes to tito.props
Got no clue why this is failing :/

@ares
Copy link
Member

ares commented Sep 13, 2016

could someone from @theforeman/packaging please take a look? would it be possible to avoid using annex for this package? or does anyone have some idea why it reports redirects?

@domcleal
Copy link
Contributor

git-annex 3.x doesn't support HTTPS sources, only HTTP sources, but Puppet Forge is only accessible over HTTPS. We now have enough EL7 slaves that I can switch these tests over to run on EL7 with 5.x which should fix the problem. I'll re-test it when I've updated Jenkins.

Source0: https://forgeapi.puppetlabs.com/v3/files/%{puppet_full_name}-%{version}.tar.gz
BuildArch: noarch
Requires: puppet >= 2.7.0
Requires: puppetlabs-stdlib >= 4.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What provides this?

@domcleal
Copy link
Contributor

[test] - packaging PR test slave updated to EL7, ought to fix git-annex HTTPS handling.

@domcleal domcleal changed the title packaging for puppet-foreman_scap_client packaging for puppet-foreman_scap_client [rpm] Sep 14, 2016
@shlomizadok
Copy link
Member Author

@domcleal - I kinda got lost here... am I doing this right?

Copy link
Contributor

@domcleal domcleal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check it builds correctly with the provided mock configs, it seems to be failing tests.

Also needs adding to comps/plugins.

Source0: https://forgeapi.puppetlabs.com/v3/files/%{puppet_full_name}-%{version}.tar.gz
BuildArch: noarch
Requires: puppet >= 2.7.0
Requires: puppetlabs-stdlib >= 4.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What provides this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

%{puppet_modules_dir}/%{puppet_module}/checksums.json
%{puppet_modules_dir}/%{puppet_module}/Gemfile
%{puppet_modules_dir}/%{puppet_module}/Rakefile
%{puppet_modules_dir}/%{puppet_module}/lib/facter/rh_certificates.rb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just list %{puppet_modules_dir}/%{puppet_module}/lib so it includes everything below lib/. Ditto with manifests, templates.

%{puppet_modules_dir}/%{puppet_module}/manifests/params.pp
%{puppet_modules_dir}/%{puppet_module}/templates/config.yaml.erb
%{puppet_modules_dir}/%{puppet_module}/templates/cron.erb
%dir %{puppet_modules_dir}/%{puppet_module}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this between the %doc and files within this dir, it should be first.

@@ -362,6 +362,7 @@ whitelist = rubygem-algebrick
[foreman-plugins-nightly-nonscl-rhel7]
disttag = .el7
whitelist = rubygem-algebrick
puppet-foreman_scap_client
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this up a line, it's not alphabetical.

@@ -397,6 +398,7 @@ whitelist = rubygem-algebrick
[foreman-plugins-nightly-fedora24]
disttag = .fc24
whitelist = rubygem-algebrick
puppet-foreman_scap_client
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


%files
%doc NEWS COPYING README.md
%{puppet_modules_dir}/%{puppet_module}/metadata.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider defining %{puppet_module_dir} to make this less repetitive.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I define this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


%install
mkdir -p %{buildroot}/%{puppet_modules_dir}/%{puppet_module}
cp -rp %{puppet_modules_dir}/%{puppet_module} %{buildroot}/%{puppet_modules_dir}/%{puppet_module}/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is failing, check the source exists (probably cp -rp . %{buildroot}/%{puppet_modules_dir}/%{puppet_module} or similar), you need to be copying from the unpacked source, not the installation dir.

@shlomizadok
Copy link
Member Author

shlomizadok commented Sep 15, 2016

@domcleal, thanks for the help.
I have removed the "Requires puppetlabs-stdlib >= 4.2.0" as I am assume we do not provide this (and it could be installed via puppet forge)

@domcleal
Copy link
Contributor

I don't think removing the dependency is correct, it's specified as a dep within the metadata.json - so to use this package shouldn't require the user to install a package locally (else, why not just do it with this module too?). The package is available in Fedora, but not EPEL7.

@shlomizadok
Copy link
Member Author

Got it. Will return it. How do I make the package available in EPEL7?

@domcleal
Copy link
Contributor

I suggest filing a bug against the package first, else request the branch (https://fedoraproject.org/wiki/EPEL/FAQ#How_do_I_request_a_EPEL_branch_for_an_existing_Fedora_package.3F).

@shlomizadok
Copy link
Member Author

@domcleal - thanks, filed a bug and requested for EPEL7 branch.

@ares
Copy link
Member

ares commented Sep 16, 2016

meanwhile we could package stdlib too I guess, it does not have any other deps

@shlomizadok
Copy link
Member Author

@domcleal
Copy link
Contributor

Yes, only the branch though - the build hasn't even moved into epel-testing yet: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-0c2c4e4800

@@ -364,7 +364,8 @@ scl = tfm

[foreman-nightly-fedora24]
disttag = .fc24
whitelist = foreman
whitelist = puppet-foreman_scap_client
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove it from here, it should only be in the plugin sections.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added by mistake. Removed.

@domcleal domcleal merged commit 68848d4 into theforeman:rpm/develop Oct 13, 2016
@domcleal
Copy link
Contributor

Merged and will build, thanks @shlomizadok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants