Blame keycloak-httpd-client-install.spec

6b59cac
%global srcname keycloak-httpd-client-install
6b59cac
%global summary Tools to configure Apache HTTPD as Keycloak client
6b59cac
dcc94d3
%if (0%{?fedora} > 0 && 0%{?fedora} < 30) || (0%{?rhel} > 0 && 0%{?rhel} <= 7)
48bfbb4
  %bcond_without python2
48bfbb4
  %bcond_without python3
8b32852
%endif
8b32852
dcc94d3
%if 0%{?fedora} >= 30 || 0%{?rhel} >= 8
48bfbb4
  %bcond_with python2
48bfbb4
  %bcond_without python3
6b59cac
%endif
6b59cac
6b59cac
Name:           %{srcname}
0d4a47a
Version:        1.1
f240529
Release:        6%{?dist}
6b59cac
Summary:        %{summary}
6b59cac
6b59cac
%global git_tag RELEASE_%(r=%{version}; echo $r | tr '.' '_')
6b59cac
6b59cac
License:        GPLv3
6b59cac
URL:            https://github.com/jdennis/keycloak-httpd-client-install
0d4a47a
Source0:        https://github.com/jdennis/keycloak-httpd-client-install/archive/%{git_tag}.tar.gz
6b59cac
6b59cac
BuildArch:      noarch
6b59cac
48bfbb4
%if %{with python2}
6b59cac
BuildRequires:  python2-devel
8b32852
%endif # with_python2
8b32852
6b59cac
%if 0%{?with_python3}
6b59cac
BuildRequires:  python3-devel
6b59cac
%endif
6b59cac
6b59cac
Requires:       %{_bindir}/keycloak-httpd-client-install
6b59cac
6b59cac
%description
6b59cac
Keycloak is a federated Identity Provider (IdP). Apache HTTPD supports
6b59cac
a variety of authentication modules which can be configured to utilize
6b59cac
a Keycloak IdP to perform authentication. This package contains
6b59cac
libraries and tools which can automate and simplify configuring an
6b59cac
Apache HTTPD authentication module and registering as a client of a
6b59cac
Keycloak IdP.
6b59cac
48bfbb4
%if %{with python2}
6b59cac
%package -n python2-%{srcname}
6b59cac
Summary:        %{summary}
6b59cac
6b59cac
%{?python_provide:%python_provide python2-%{srcname}}
6b59cac
6b59cac
Requires:       %{name} = %{version}-%{release}
d7b2d0c
Requires:       python2-requests
d7b2d0c
Requires:       python2-requests-oauthlib
d7b2d0c
Requires:       python2-jinja2
6b59cac
Requires:       %{_bindir}/keycloak-httpd-client-install
6b59cac
6b59cac
%description -n python2-%{srcname}
6b59cac
Keycloak is an authentication server. This package contains libraries and
6b59cac
programs which can invoke the Keycloak REST API and configure clients
6b59cac
of a Keycloak server.
8b32852
%endif # with_python2
6b59cac
6b59cac
%if 0%{?with_python3}
6b59cac
%package -n python3-%{srcname}
6b59cac
Summary:        %{summary}
6b59cac
6b59cac
%{?python_provide:%python_provide python3-%{srcname}}
6b59cac
6b59cac
Requires:       %{name} = %{version}-%{release}
6b59cac
Requires:       python3-requests
6b59cac
Requires:       python3-requests-oauthlib
6b59cac
Requires:       python3-jinja2
6b59cac
6b59cac
%description -n python3-%{srcname}
6b59cac
Keycloak is an authentication server. This package contains libraries and
6b59cac
programs which can invoke the Keycloak REST API and configure clients
6b59cac
of a Keycloak server.
6b59cac
6b59cac
%endif
6b59cac
6b59cac
%prep
0d4a47a
%autosetup -n %{srcname}-%{git_tag} -p1
6b59cac
6b59cac
%build
48bfbb4
%if %{with python2}
6b59cac
%py2_build
8b32852
%endif # with_python2
8b32852
6b59cac
%if 0%{?with_python3}
6b59cac
%py3_build
6b59cac
%endif
6b59cac
6b59cac
%install
48bfbb4
%if %{with python2}
6b59cac
# Must do the python2 install first because the scripts in /usr/bin are
6b59cac
# overwritten with every setup.py install, and in general we want the
6b59cac
# python3 version to be the default.
6b59cac
%py2_install
8b32852
%endif # with_python2
8b32852
6b59cac
%if 0%{?with_python3}
6b59cac
# py3_install won't overwrite files if they have a timestamp greater-than
6b59cac
# or equal to the py2 installed files. If both the py2 and py3 builds execute
6b59cac
# quickly the files end up with the same timestamps thus leaving the py2
6b59cac
# version in the py3 install. Therefore remove any files susceptible to this.
48bfbb4
%if %{with python2}
6b59cac
rm %{buildroot}%{_bindir}/keycloak-httpd-client-install
8b32852
%endif # with_python2
6b59cac
%py3_install
6b59cac
%endif
6b59cac
6b59cac
install -d -m 755 %{buildroot}/%{_mandir}/man8
6b59cac
install -c -m 644 doc/keycloak-httpd-client-install.8 %{buildroot}/%{_mandir}/man8
6b59cac
6b59cac
%files
6b59cac
%license LICENSE.txt
6b59cac
%doc README.md doc/ChangeLog
6b59cac
%{_datadir}/%{srcname}/
6b59cac
48bfbb4
%if %{with python2}
6b59cac
# Note that there is no %%files section for the unversioned python module if we are building for several python runtimes
6b59cac
%files -n python2-%{srcname}
6b59cac
%{python2_sitelib}/*
8b32852
6b59cac
%if ! 0%{?with_python3}
6b59cac
%{_bindir}/keycloak-httpd-client-install
0d4a47a
%{_bindir}/keycloak-rest
6b59cac
%{_mandir}/man8/*
6b59cac
%endif
8b32852
%endif # with_python2
6b59cac
6b59cac
%if 0%{?with_python3}
6b59cac
%files -n python3-%{srcname}
6b59cac
%{python3_sitelib}/*
6b59cac
%{_bindir}/keycloak-httpd-client-install
0d4a47a
%{_bindir}/keycloak-rest
6b59cac
%{_mandir}/man8/*
6b59cac
%endif
6b59cac
6b59cac
%changelog
f240529
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.1-6
f240529
- Rebuilt for Python 3.9
f240529
45015bb
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-5
45015bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
45015bb
3e65d58
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.1-4
3e65d58
- Rebuilt for Python 3.8.0rc1 (#1748018)
3e65d58
d38cf9e
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.1-3
d38cf9e
- Rebuilt for Python 3.8
d38cf9e
01b8d8b
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
01b8d8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
01b8d8b
0d4a47a
* Fri Jun 28 2019 Jakub Hrozek <jhrozek@redhat.com> - 1.1-1
0d4a47a
- New upstream release 1.1
0d4a47a
225f4f1
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8-9
225f4f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
225f4f1
dcc94d3
* Thu Nov 29 2018 Miro Hrončok <mhroncok@redhat.com> - 0.8-8
dcc94d3
- Remove python2 subpackage from Fedora 30+ (#1627398)
dcc94d3
ce775a6
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8-7
ce775a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ce775a6
48bfbb4
* Tue Jul 10 2018  <jdennis@redhat.com> - 0.8-6
48bfbb4
- Restore use of bcond for python conditionals
48bfbb4
8b32852
* Mon Jul  9 2018  <jdennis@redhat.com> - 0.8-5
8b32852
- Share same spec file with RHEL
8b32852
17fa282
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.8-4
17fa282
- Rebuilt for Python 3.7
17fa282
d51c920
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8-3
d51c920
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d51c920
d7b2d0c
* Mon Jan 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.8-2
d7b2d0c
- Update Python 2 dependency declarations to new packaging standards
d7b2d0c
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
d7b2d0c
02895a4
* Wed Jan 10 2018 John Dennis <jdennis@redhat.com> - 0.8-1
02895a4
- Upgrade to upstream 0,8, includes:
02895a4
- CVE-2017-15112 unsafe use of -p/--admin-password on command line
02895a4
- CVE-2017-15111 unsafe /tmp log file in --log-file option in keycloak_cli.py
02895a4
e870080
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-2
e870080
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e870080
8715772
* Wed Mar  1 2017 John Dennis <jdennis@redhat.com> - 0.6-1
8715772
- Resolves: rhbz#1427720, if --mellon-root is not supplied and defaults to /
8715772
  you end up with double slashes in entityId and endpoints
8715772
- add --tls-verify option to control python-requests behavor when
8715772
  using tls to connect. With this option you can use a self-signed
8715772
  cert or point to a CA bundle.
8715772
- Fix warnings and checks when using client originate method
8715772
  'registration' with 'anonymous' authentication.
8715772
5f5c166
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-2
5f5c166
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
5f5c166
7dd1aa9
* Fri Jan  6 2017 John Dennis <jdennis@redhat.com> - 0.5-1
7dd1aa9
- Fix default port bug
7dd1aa9
  Strip the port from the URL if it matches the scheme (e.g. 80 for
7dd1aa9
  http and 443 for https)
7dd1aa9
29fa952
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.4-3
29fa952
- Rebuild for Python 3.6
29fa952
f7d02ae
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-2
f7d02ae
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
f7d02ae
a3050f2
* Mon Jun 27 2016 John Dennis <jdennis@redhat.com> - 0.4-1
a3050f2
- new upstream
a3050f2
  See ChangeLog for details
a3050f2
6b59cac
* Fri May 20 2016 John Dennis <jdennis@redhat.com> - 0.3-1
6b59cac
- new upstream
6b59cac
  See ChangeLog for details
6b59cac
6b59cac
* Tue May 17 2016 John Dennis <jdennis@redhat.com> - 0.2-1
6b59cac
- new upstream
6b59cac
- Add keycloak-httpd-client-install.8 man page
6b59cac
6b59cac
* Fri May 13 2016 John Dennis <jdennis@redhat.com> - 0.1-1
6b59cac
- Initial version