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

Fixes #29737 - Put smart proxy plugin local state into /var/lib/foreman-proxy #5197

Merged
merged 4 commits into from May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions gem2rpm/smart_proxy_plugin.spec.erb
Expand Up @@ -11,15 +11,15 @@ has_cronjob = spec.files.any? { |f| f =~ %r{\Aextra/.*\.cron\z } }

%{!?_root_bindir:%global _root_bindir %{_bindir}}
%{!?_root_datadir:%global _root_datadir %{_datadir}}
%{!?_root_localstatedir:%global _root_localstatedir %{_localstatedir}}
%{!?_root_sharedstatedir:%global _root_sharedstatedir %{_sharedstatedir}}
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}

%global gem_name <%= spec.name %>
%global plugin_name <%= spec.name.sub(/\Asmart_proxy_/, '') %>

%global foreman_proxy_min_version 1.24
%global foreman_proxy_dir %{_root_datadir}/foreman-proxy
%global foreman_proxy_statedir %{_root_localstatedir}/foreman-proxy
%global foreman_proxy_statedir %{_root_sharedstatedir}/foreman-proxy
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
%global foreman_proxy_settingsd_dir %{_root_sysconfdir}/foreman-proxy/settings.d
%global smart_proxy_dynflow_bundlerd_dir %{!?scl:/opt/theforeman/tfm/root}%{_datadir}/smart_proxy_dynflow_core/bundler.d
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated, but @zjhuntin this looks like it might break on EL8

Copy link
Member

Choose a reason for hiding this comment

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

Why is that?

Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this mean it'll be prefixed with /opt/theforeman/tfm/root on EL8?

Copy link
Member

Choose a reason for hiding this comment

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

Expand Down
Expand Up @@ -6,19 +6,19 @@
%global plugin_name ansible

%{!?_root_datadir:%global _root_datadir %{_datadir}}
%{!?_root_localstatedir:%global _root_localstatedir %{_localstatedir}}
%{!?_root_sharedstatedir:%global _root_sharedstatedir %{_sharedstatedir}}
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}

%global foreman_proxy_min_version 1.25
%global foreman_proxy_dir %{_root_datadir}/foreman-proxy
%global foreman_proxy_statedir %{_root_localstatedir}/foreman-proxy
%global foreman_proxy_statedir %{_root_sharedstatedir}/foreman-proxy
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
%global foreman_proxy_settingsd_dir %{_root_sysconfdir}/foreman-proxy/settings.d
%global smart_proxy_dynflow_bundlerd_dir %{!?scl:/opt/theforeman/tfm/root}%{_datadir}/smart_proxy_dynflow_core/bundler.d

Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 3.0.1
Release: 3%{?foremandist}%{?dist}
Release: 4%{?foremandist}%{?dist}
Summary: Smart-Proxy Ansible plugin
Group: Applications/Internet
License: GPLv3
Expand Down Expand Up @@ -159,6 +159,9 @@ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
%doc %{gem_instdir}/README.md

%changelog
* Tue May 12 2020 Adam Ruzicka <aruzicka@redhat.com> 3.0.1-4
- Move local state to /var/lib

* Tue Jan 07 2020 Eric D. Helms <ericdhelms@gmail.com> - 3.0.1-3
- Build for SCL

Expand Down
Expand Up @@ -3,22 +3,22 @@
%{!?scl:%global pkg_name %{name}}

%{!?_root_datadir:%global _root_datadir %{_datadir}}
%{!?_root_localstatedir:%global _root_localstatedir %{_localstatedir}}
%{!?_root_sharedstatedir:%global _root_sharedstatedir %{_sharedstatedir}}
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}

%global gem_name smart_proxy_chef
%global plugin_name chef

%global foreman_proxy_min_version 1.25
%global foreman_proxy_dir %{_root_datadir}/foreman-proxy
%global foreman_proxy_statedir %{_root_localstatedir}/foreman-proxy
%global foreman_proxy_statedir %{_root_sharedstatedir}/foreman-proxy
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
%global foreman_proxy_settingsd_dir %{_root_sysconfdir}/foreman-proxy/settings.d
%global smart_proxy_dynflow_bundlerd_dir %{!?scl:/opt/theforeman/tfm/root}%{_datadir}/smart_proxy_dynflow_core/bundler.d

Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 0.2.0
Release: 3%{?foremandist}%{?dist}
Release: 4%{?foremandist}%{?dist}
Summary: Chef support for Foreman Smart-Proxy
Group: Applications/Internet
License: GPLv3
Expand Down Expand Up @@ -106,6 +106,9 @@ mv %{buildroot}%{gem_instdir}/settings.d/chef.yml.example \
%{gem_instdir}/Gemfile
%changelog
* Tue May 12 2020 Adam Ruzicka <aruzicka@redhat.com> 0.2.0-4
- Change localstatedir to sharedstatedir
* Tue Jan 07 2020 Eric D. Helms <ericdhelms@gmail.com> - 0.2.0-3
- Build for SCL
Expand Down
Expand Up @@ -3,22 +3,22 @@
%{!?scl:%global pkg_name %{name}}

%{!?_root_datadir:%global _root_datadir %{_datadir}}
%{!?_root_localstatedir:%global _root_localstatedir %{_localstatedir}}
%{!?_root_sharedstatedir:%global _root_sharedstatedir %{_sharedstatedir}}
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}

%global gem_name smart_proxy_dhcp_bluecat
%global plugin_name dhcp_bluecat

%global foreman_proxy_min_version 1.25
%global foreman_proxy_dir %{_root_datadir}/foreman-proxy
%global foreman_proxy_statedir %{_root_localstatedir}/foreman-proxy
%global foreman_proxy_statedir %{_root_sharedstatedir}/foreman-proxy
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
%global foreman_proxy_settingsd_dir %{_root_sysconfdir}/foreman-proxy/settings.d
%global smart_proxy_dynflow_bundlerd_dir %{!?scl:/opt/theforeman/tfm/root}%{_datadir}/smart_proxy_dynflow_core/bundler.d

Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 0.1.0
Release: 3%{?foremandist}%{?dist}
Release: 4%{?foremandist}%{?dist}
Summary: BlueCat DHCP provider plugin for Foreman's smart proxy
Group: Applications/Internet
License: GPLv3
Expand Down Expand Up @@ -111,6 +111,9 @@ mv %{buildroot}%{gem_instdir}/config/dhcp_bluecat.yml.example \
%doc %{gem_instdir}/README.md
%changelog
* Tue May 12 2020 Adam Ruzicka <aruzicka@redhat.com> 0.1.0-4
- Change localstatedir to sharedstatedir
* Tue Jan 07 2020 Eric D. Helms <ericdhelms@gmail.com> - 0.1.0-3
- Build for SCL
Expand Down
Expand Up @@ -3,22 +3,22 @@
%{!?scl:%global pkg_name %{name}}

%{!?_root_datadir:%global _root_datadir %{_datadir}}
%{!?_root_localstatedir:%global _root_localstatedir %{_localstatedir}}
%{!?_root_sharedstatedir:%global _root_sharedstatedir %{_sharedstatedir}}
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}

%global gem_name smart_proxy_dhcp_device42
%global plugin_name dhcp_device42

%global foreman_proxy_min_version 1.25
%global foreman_proxy_dir %{_root_datadir}/foreman-proxy
%global foreman_proxy_statedir %{_root_localstatedir}/foreman-proxy
%global foreman_proxy_statedir %{_root_sharedstatedir}/foreman-proxy
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
%global foreman_proxy_settingsd_dir %{_root_sysconfdir}/foreman-proxy/settings.d
%global smart_proxy_dynflow_bundlerd_dir %{!?scl:/opt/theforeman/tfm/root}%{_datadir}/smart_proxy_dynflow_core/bundler.d

Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 1.0.7
Release: 4%{?foremandist}%{?dist}
Release: 5%{?foremandist}%{?dist}
Summary: Device42 DHCP provider plugin for Foreman's smart proxy
Group: Applications/Internet
License: GPLv3
Expand Down Expand Up @@ -110,6 +110,9 @@ mv %{buildroot}%{gem_instdir}/config/dhcp_device42.yml.example \
%doc %{gem_instdir}/README.md
%changelog
* Tue May 12 2020 Adam Ruzicka <aruzicka@redhat.com> 1.0.7-5
- Change localstatedir to sharedstatedir
* Tue Jan 07 2020 Eric D. Helms <ericdhelms@gmail.com> - 1.0.7-4
- Build for SCL
Expand Down
Expand Up @@ -3,22 +3,22 @@
%{!?scl:%global pkg_name %{name}}

%{!?_root_datadir:%global _root_datadir %{_datadir}}
%{!?_root_localstatedir:%global _root_localstatedir %{_localstatedir}}
%{!?_root_sharedstatedir:%global _root_sharedstatedir %{_sharedstatedir}}
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}

%global gem_name smart_proxy_dhcp_dnsmasq
%global plugin_name dhcp_dnsmasq

%global foreman_proxy_min_version 1.25
%global foreman_proxy_dir %{_root_datadir}/foreman-proxy
%global foreman_proxy_statedir %{_root_localstatedir}/foreman-proxy
%global foreman_proxy_statedir %{_root_sharedstatedir}/foreman-proxy
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
%global foreman_proxy_settingsd_dir %{_root_sysconfdir}/foreman-proxy/settings.d
%global smart_proxy_dynflow_bundlerd_dir %{!?scl:/opt/theforeman/tfm/root}%{_datadir}/smart_proxy_dynflow_core/bundler.d

Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 0.7
Release: 3%{?foremandist}%{?dist}
Release: 4%{?foremandist}%{?dist}
Summary: dnsmasq DHCP provider plugin for Foreman's smart proxy
Group: Applications/Internet
License: GPLv3
Expand Down Expand Up @@ -109,6 +109,9 @@ mv %{buildroot}%{gem_instdir}/config/dhcp_dnsmasq.yml \
%{gem_instdir}/test
%changelog
* Tue May 12 2020 Adam Ruzicka <aruzicka@redhat.com> 0.7-4
- Change localstatedir to sharedstatedir
* Tue Jan 07 2020 Eric D. Helms <ericdhelms@gmail.com> - 0.7-3
- Build for SCL
Expand Down
Expand Up @@ -3,22 +3,22 @@
%{!?scl:%global pkg_name %{name}}

%{!?_root_datadir:%global _root_datadir %{_datadir}}
%{!?_root_localstatedir:%global _root_localstatedir %{_localstatedir}}
%{!?_root_sharedstatedir:%global _root_sharedstatedir %{_sharedstatedir}}
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}

%global gem_name smart_proxy_dhcp_infoblox
%global plugin_name dhcp_infoblox

%global foreman_proxy_min_version 1.25
%global foreman_proxy_dir %{_root_datadir}/foreman-proxy
%global foreman_proxy_statedir %{_root_localstatedir}/foreman-proxy
%global foreman_proxy_statedir %{_root_sharedstatedir}/foreman-proxy
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
%global foreman_proxy_settingsd_dir %{_root_sysconfdir}/foreman-proxy/settings.d
%global smart_proxy_dynflow_bundlerd_dir %{!?scl:/opt/theforeman/tfm/root}%{_datadir}/smart_proxy_dynflow_core/bundler.d

Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 0.0.16
Release: 1%{?foremandist}%{?dist}
Release: 2%{?foremandist}%{?dist}
Summary: Infoblox DHCP provider plugin for Foreman's smart proxy
Group: Applications/Internet
License: GPLv3
Expand Down Expand Up @@ -111,6 +111,9 @@ mv %{buildroot}%{gem_instdir}/config/dhcp_infoblox.yml.example \
%{gem_instdir}/test
%changelog
* Tue May 12 2020 Adam Ruzicka <aruzicka@redhat.com> 0.0.16-2
- Change localstatedir to sharedstatedir
* Mon May 04 2020 Lukas Zapletal <lzap+rpm@redhat.com> - 0.0.16-1
- Update to 0.0.16
Expand Down
Expand Up @@ -3,22 +3,22 @@
%{!?scl:%global pkg_name %{name}}

%{!?_root_datadir:%global _root_datadir %{_datadir}}
%{!?_root_localstatedir:%global _root_localstatedir %{_localstatedir}}
%{!?_root_sharedstatedir:%global _root_sharedstatedir %{_sharedstatedir}}
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}

%global gem_name smart_proxy_dhcp_remote_isc
%global plugin_name dhcp_remote_isc

%global foreman_proxy_min_version 1.25
%global foreman_proxy_dir %{_root_datadir}/foreman-proxy
%global foreman_proxy_statedir %{_root_localstatedir}/foreman-proxy
%global foreman_proxy_statedir %{_root_sharedstatedir}/foreman-proxy
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
%global foreman_proxy_settingsd_dir %{_root_sysconfdir}/foreman-proxy/settings.d
%global smart_proxy_dynflow_bundlerd_dir %{!?scl:/opt/theforeman/tfm/root}%{_datadir}/smart_proxy_dynflow_core/bundler.d

Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 0.0.4
Release: 3%{?foremandist}%{?dist}
Release: 4%{?foremandist}%{?dist}
Summary: Smart-Proxy dhcp module provider for NFS-accessible ISC dhcpd installations
Group: Applications/Internet
License: GPLv3
Expand Down Expand Up @@ -109,6 +109,9 @@ mv %{buildroot}%{gem_instdir}/config/dhcp_remote_isc.yml.example \
%{gem_instdir}/test
%changelog
* Tue May 12 2020 Adam Ruzicka <aruzicka@redhat.com> 0.0.4-4
- Change localstatedir to sharedstatedir
* Tue Jan 07 2020 Eric D. Helms <ericdhelms@gmail.com> - 0.0.4-3
- Build for SCL
Expand Down
Expand Up @@ -3,22 +3,22 @@
%{!?scl:%global pkg_name %{name}}

%{!?_root_datadir:%global _root_datadir %{_datadir}}
%{!?_root_localstatedir:%global _root_localstatedir %{_localstatedir}}
%{!?_root_sharedstatedir:%global _root_sharedstatedir %{_sharedstatedir}}
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}

%global gem_name smart_proxy_discovery
%global plugin_name discovery

%global foreman_proxy_min_version 1.25
%global foreman_proxy_dir %{_root_datadir}/foreman-proxy
%global foreman_proxy_statedir %{_root_localstatedir}/foreman-proxy
%global foreman_proxy_statedir %{_root_sharedstatedir}/foreman-proxy
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
%global foreman_proxy_settingsd_dir %{_root_sysconfdir}/foreman-proxy/settings.d
%global smart_proxy_dynflow_bundlerd_dir %{!?scl:/opt/theforeman/tfm/root}%{_datadir}/smart_proxy_dynflow_core/bundler.d

Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 1.0.5
Release: 3%{?foremandist}%{?dist}
Release: 4%{?foremandist}%{?dist}
Summary: Discovery plugin for Foreman's smart proxy
Group: Applications/Internet
License: GPLv3
Expand Down Expand Up @@ -110,6 +110,9 @@ mv %{buildroot}%{gem_instdir}/settings.d/discovery.yml.example \
%doc %{gem_instdir}/README.md
%changelog
* Tue May 12 2020 Adam Ruzicka <aruzicka@redhat.com> 1.0.5-4
- Change localstatedir to sharedstatedir
* Tue Jan 07 2020 Eric D. Helms <ericdhelms@gmail.com> - 1.0.5-3
- Build for SCL
Expand Down
Expand Up @@ -3,22 +3,22 @@
%{!?scl:%global pkg_name %{name}}

%{!?_root_datadir:%global _root_datadir %{_datadir}}
%{!?_root_localstatedir:%global _root_localstatedir %{_localstatedir}}
%{!?_root_sharedstatedir:%global _root_sharedstatedir %{_sharedstatedir}}
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}

%global gem_name smart_proxy_discovery_image
%global plugin_name discovery_image

%global foreman_proxy_min_version 1.25
%global foreman_proxy_dir %{_root_datadir}/foreman-proxy
%global foreman_proxy_statedir %{_root_localstatedir}/foreman-proxy
%global foreman_proxy_statedir %{_root_sharedstatedir}/foreman-proxy
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
%global foreman_proxy_settingsd_dir %{_root_sysconfdir}/foreman-proxy/settings.d
%global smart_proxy_dynflow_bundlerd_dir %{!?scl:/opt/theforeman/tfm/root}%{_datadir}/smart_proxy_dynflow_core/bundler.d

Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 1.0.9
Release: 3%{?foremandist}%{?dist}
Release: 4%{?foremandist}%{?dist}
Summary: FDI API for Foreman Smart-Proxy
Group: Applications/Internet
License: GPLv3
Expand Down Expand Up @@ -110,6 +110,9 @@ mv %{buildroot}%{gem_instdir}/settings.d/discovery_image.yml.example \
%doc %{gem_instdir}/README.md
%changelog
* Tue May 12 2020 Adam Ruzicka <aruzicka@redhat.com> 1.0.9-4
- Change localstatedir to sharedstatedir
* Tue Jan 07 2020 Eric D. Helms <ericdhelms@gmail.com> - 1.0.9-3
- Build for SCL
Expand Down
Expand Up @@ -3,22 +3,22 @@
%{!?scl:%global pkg_name %{name}}

%{!?_root_datadir:%global _root_datadir %{_datadir}}
%{!?_root_localstatedir:%global _root_localstatedir %{_localstatedir}}
%{!?_root_sharedstatedir:%global _root_sharedstatedir %{_sharedstatedir}}
%{!?_root_sysconfdir:%global _root_sysconfdir %{_sysconfdir}}

%global gem_name smart_proxy_dns_infoblox
%global plugin_name dns_infoblox

%global foreman_proxy_min_version 1.25
%global foreman_proxy_dir %{_root_datadir}/foreman-proxy
%global foreman_proxy_statedir %{_root_localstatedir}/foreman-proxy
%global foreman_proxy_statedir %{_root_sharedstatedir}/foreman-proxy
%global foreman_proxy_bundlerd_dir %{foreman_proxy_dir}/bundler.d
%global foreman_proxy_settingsd_dir %{_root_sysconfdir}/foreman-proxy/settings.d
%global smart_proxy_dynflow_bundlerd_dir %{!?scl:/opt/theforeman/tfm/root}%{_datadir}/smart_proxy_dynflow_core/bundler.d

Name: %{?scl_prefix}rubygem-%{gem_name}
Version: 1.0.0
Release: 3%{?foremandist}%{?dist}
Release: 4%{?foremandist}%{?dist}
Summary: Infoblox DNS provider plugin for Foreman's smart proxy
Group: Applications/Internet
License: GPLv3
Expand Down Expand Up @@ -109,6 +109,9 @@ mv %{buildroot}%{gem_instdir}/config/dns_infoblox.yml.example \
%{gem_instdir}/test
%changelog
* Tue May 12 2020 Adam Ruzicka <aruzicka@redhat.com> - 1.0.0-4
- Change localstatedir to sharedstatedir
* Tue Jan 07 2020 Eric D. Helms <ericdhelms@gmail.com> - 1.0.0-3
- Build for SCL
Expand Down