Accepting request 792641 from home:pgajdos
- version update to 1.6.1 * lot of changes, see https://github.com/gssapi/mod_auth_gssapi/releases - added patches python3 and other testsuite fixes + apache2-mod_auth_gssapi-test.patch OBS-URL: https://build.opensuse.org/request/show/792641 OBS-URL: https://build.opensuse.org/package/show/Apache:Modules/apache2-mod_auth_gssapi?expand=0&rev=4
This commit is contained in:
parent
e09221c1cc
commit
e568c74f2f
83
apache2-mod_auth_gssapi-test.patch
Normal file
83
apache2-mod_auth_gssapi-test.patch
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
Index: mod_auth_gssapi-1.6.1/tests/magtests.py
|
||||||
|
===================================================================
|
||||||
|
--- mod_auth_gssapi-1.6.1.orig/tests/magtests.py 2017-12-14 22:36:18.444067659 +0100
|
||||||
|
+++ mod_auth_gssapi-1.6.1/tests/magtests.py 2020-04-09 09:16:04.680455654 +0200
|
||||||
|
@@ -8,6 +8,7 @@ import shutil
|
||||||
|
import signal
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
+import time
|
||||||
|
|
||||||
|
# check that we can import requests (for use in test scripts)
|
||||||
|
import requests
|
||||||
|
@@ -302,7 +303,7 @@ def setup_kdc(testdir, wrapenv):
|
||||||
|
with open(kdcconf, 'w+') as f:
|
||||||
|
f.write(text)
|
||||||
|
|
||||||
|
- kdcenv = {'PATH': '/sbin:/bin:/usr/sbin:/usr/bin',
|
||||||
|
+ kdcenv = {'PATH': '/sbin:/bin:/usr/sbin:/usr/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin',
|
||||||
|
'KRB5_CONFIG': krb5conf,
|
||||||
|
'KRB5_KDC_PROFILE': kdcconf,
|
||||||
|
'KRB5_TRACE': os.path.join(testdir, 'krbtrace.log')}
|
||||||
|
@@ -391,6 +392,11 @@ def setup_http(testdir, so_dir, wrapenv)
|
||||||
|
distro = "Debian"
|
||||||
|
moddir = "/usr/lib/apache2/modules"
|
||||||
|
if not os.path.exists(moddir):
|
||||||
|
+ distro = "SUSE"
|
||||||
|
+ moddir = "/usr/lib64/apache2"
|
||||||
|
+ if not os.path.exists(moddir):
|
||||||
|
+ moddir = "/usr/lib/apache2"
|
||||||
|
+ if not os.path.exists(moddir):
|
||||||
|
raise ValueError("Could not find Apache module directory!")
|
||||||
|
os.symlink(moddir, os.path.join(httpdir, 'modules'))
|
||||||
|
|
||||||
|
@@ -414,7 +420,7 @@ def setup_http(testdir, so_dir, wrapenv)
|
||||||
|
'MALLOC_PERTURB_': str(random.randint(0, 32767) % 255 + 1)}
|
||||||
|
httpenv.update(wrapenv)
|
||||||
|
|
||||||
|
- httpd = "httpd" if distro == "Fedora" else "apache2"
|
||||||
|
+ httpd = "httpd" if (distro == "Fedora") or (distro == "SUSE") else "apache2"
|
||||||
|
httpproc = subprocess.Popen([httpd, '-DFOREGROUND', '-f', config],
|
||||||
|
env=httpenv, preexec_fn=os.setsid)
|
||||||
|
return httpproc
|
||||||
|
@@ -427,11 +433,11 @@ def kinit_user(testdir, kdcenv):
|
||||||
|
testenv.update(kdcenv)
|
||||||
|
|
||||||
|
with (open(testlog, 'a')) as logfile:
|
||||||
|
- kinit = subprocess.Popen(["kinit", USR_NAME],
|
||||||
|
+ kinit = subprocess.Popen(["kinit", "-V", USR_NAME],
|
||||||
|
stdin=subprocess.PIPE,
|
||||||
|
stdout=logfile, stderr=logfile,
|
||||||
|
env=testenv, preexec_fn=os.setsid)
|
||||||
|
- kinit.communicate('%s\n' % USR_PWD)
|
||||||
|
+ kinit.communicate(input=bytes(USR_PWD, 'utf-8'))
|
||||||
|
kinit.wait()
|
||||||
|
if kinit.returncode != 0:
|
||||||
|
raise ValueError('kinit failed')
|
||||||
|
Index: mod_auth_gssapi-1.6.1/tests/httpd.conf
|
||||||
|
===================================================================
|
||||||
|
--- mod_auth_gssapi-1.6.1.orig/tests/httpd.conf 2017-12-14 22:36:11.396207833 +0100
|
||||||
|
+++ mod_auth_gssapi-1.6.1/tests/httpd.conf 2020-04-09 09:15:13.456205265 +0200
|
||||||
|
@@ -71,7 +71,9 @@ LoadModule userdir_module modules/mod_us
|
||||||
|
LoadModule version_module modules/mod_version.so
|
||||||
|
</IfModule>
|
||||||
|
LoadModule vhost_alias_module modules/mod_vhost_alias.so
|
||||||
|
+<IfModule !prefork.c>
|
||||||
|
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
|
||||||
|
+</IfModule>
|
||||||
|
LoadModule proxy_module modules/mod_proxy.so
|
||||||
|
LoadModule proxy_http_module modules/mod_proxy_http.so
|
||||||
|
|
||||||
|
Index: mod_auth_gssapi-1.6.1/tests/t_spnego_proxy.py
|
||||||
|
===================================================================
|
||||||
|
--- mod_auth_gssapi-1.6.1.orig/tests/t_spnego_proxy.py 2017-12-14 22:36:18.444067659 +0100
|
||||||
|
+++ mod_auth_gssapi-1.6.1/tests/t_spnego_proxy.py 2020-04-09 09:15:13.456205265 +0200
|
||||||
|
@@ -17,7 +17,7 @@ def getAuthToken(target):
|
||||||
|
ctx = gssapi.SecurityContext(name=name, mech=spnego_mech)
|
||||||
|
token = ctx.step()
|
||||||
|
|
||||||
|
- return 'Negotiate %s' % b64encode(token)
|
||||||
|
+ return 'Negotiate %s' % b64encode(token).decode('utf-8')
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 8 14:44:12 UTC 2020 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- version update to 1.6.1
|
||||||
|
* lot of changes, see
|
||||||
|
https://github.com/gssapi/mod_auth_gssapi/releases
|
||||||
|
- added patches
|
||||||
|
python3 and other testsuite fixes
|
||||||
|
+ apache2-mod_auth_gssapi-test.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Feb 9 20:12:17 UTC 2020 - pgajdos@suse.com
|
Sun Feb 9 20:12:17 UTC 2020 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package apache2-mod_auth_gssapi
|
# spec file for package apache2-mod_auth_gssapi
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2020 SUSE LLC
|
||||||
# Copyright (c) 2004, 2005 NOVELL (All rights reserved)
|
# Copyright (c) 2004, 2005 NOVELL (All rights reserved)
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@ -13,97 +13,61 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# this is required to be underscore
|
Name: apache2-mod_auth_gssapi
|
||||||
%define module_name mod_auth_gssapi
|
Version: 1.6.1
|
||||||
%if ! %{?distro:1}0
|
Release: 0
|
||||||
%if %{?suse_version:1}0
|
Summary: GSSAPI Module for Apache
|
||||||
%define distro suse
|
License: MIT
|
||||||
%endif
|
URL: https://github.com/modauthgssapi/mod_auth_gssapi/
|
||||||
%if %{?fedora_version:1}0
|
Source0: https://github.com/modauthgssapi/mod_auth_gssapi/releases/download/v%{version}/mod_auth_gssapi-%{version}.tar.gz
|
||||||
%define distro redhat
|
# python3 and other testsuite fixes
|
||||||
%endif
|
Patch0: apache2-mod_auth_gssapi-test.patch
|
||||||
%endif
|
|
||||||
%if ! %{?distro:1}0
|
|
||||||
%define distro suse
|
|
||||||
%endif
|
|
||||||
%if %{distro} == "suse"
|
|
||||||
BuildRequires: apache2-devel
|
|
||||||
BuildRequires: apache-rpm-macros
|
BuildRequires: apache-rpm-macros
|
||||||
|
BuildRequires: apache2-devel
|
||||||
|
BuildRequires: krb5-devel
|
||||||
|
BuildRequires: openssl-devel
|
||||||
Requires: %{apache_mmn}
|
Requires: %{apache_mmn}
|
||||||
Requires: %{apache_suse_maintenance_mmn}
|
Requires: %{apache_suse_maintenance_mmn}
|
||||||
Requires: apache2
|
Requires: apache2
|
||||||
# FIXME: use proper Requires(pre/post/preun/...)
|
# SECTION test requirements
|
||||||
PreReq: apache2-prefork
|
BuildRequires: krb5-client
|
||||||
PreReq: apparmor-parser
|
BuildRequires: krb5-plugin-preauth-pkinit
|
||||||
%else
|
BuildRequires: krb5-server
|
||||||
%if %{distro} == "redhat" || %{distro} == "rhel4"
|
BuildRequires: nss_wrapper
|
||||||
%define apxs %{_sbindir}/apxs
|
BuildRequires: python3-gssapi
|
||||||
%define apache_libexecdir %(%{apxs} -q LIBEXECDIR)
|
BuildRequires: python3-requests-gssapi
|
||||||
%define apache_sysconfdir %(%{apxs} -q SYSCONFDIR)
|
BuildRequires: python3-requests-kerberos
|
||||||
BuildRequires: httpd-devel
|
BuildRequires: socket_wrapper
|
||||||
# FIXME: use proper Requires(pre/post/preun/...)
|
# /SECTION
|
||||||
PreReq: httpd
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
Name: apache2-mod_auth_gssapi
|
|
||||||
Version: 1.5.0
|
|
||||||
Release: 0
|
|
||||||
Summary: GSSAPI Module for Apache
|
|
||||||
License: MIT
|
|
||||||
Group: Applications/System
|
|
||||||
Url: https://github.com/modauthgssapi/mod_auth_gssapi/releases/download/v1.5.0/mod_auth_gssapi-1.5.0.tar.gz
|
|
||||||
Source0: %{module_name}-%{version}.tar.gz
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildRequires: openssl-devel
|
|
||||||
BuildRequires: krb5-devel
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
apache2-mod_apparmor adds support to apache2 to provide AppArmor confinement
|
This module has been built as a replacement for the aging
|
||||||
to individual cgi scripts handled by apache modules like mod_php and
|
mod_auth_kerb. Its aim is to use only GSSAPI calls and be
|
||||||
mod_perl.
|
as much as possible agnostic of the actual mechanism used.
|
||||||
This package is part of a suite of tools that used to be named SubDomain.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
%setup -q -n mod_auth_gssapi-%{version}
|
||||||
%setup -q -n %{module_name}-%{version}
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
make %{?_smp_mflags} APXS=%{apache_apxs}
|
%make_build APXS=%{apache_apxs}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=%{buildroot} DISTRO=%{distro} MANDIR=%{_mandir}
|
%make_install
|
||||||
|
rm %{buildroot}%{apache_libexecdir}/*.la
|
||||||
|
|
||||||
%if %{distro} == "suse"
|
%check
|
||||||
mkdir -p %{buildroot}%{_libdir}/apache2-prefork/
|
sed -i 's/env python/python3/' tests/*.py
|
||||||
ln -s %{apache_libexecdir}/%{module_name}.so %{buildroot}%{_libdir}/apache2-prefork/%{module_name}.so
|
make check
|
||||||
%else
|
|
||||||
%if %{distro} == "redhat" || %{distro} == "rhel4"
|
|
||||||
mkdir -p %{buildroot}/%{apache_sysconfdir}.d/
|
|
||||||
install -m 644 %{module_name}.conf %{buildroot}/%{apache_sysconfdir}.d/
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%license COPYING
|
||||||
%doc COPYING README
|
%doc README
|
||||||
%{apache_libexecdir}
|
%{apache_libexecdir}/*.so
|
||||||
%if %{distro} == "suse"
|
|
||||||
%{_libdir}/apache2-prefork/%{module_name}.so
|
|
||||||
%else
|
|
||||||
%if %{distro} == "redhat" || %{distro} == "rhel4"
|
|
||||||
%{apache_sysconfdir}.d/%{module_name}.conf
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%triggerpostun -- mod_change_hat mod-change-hat
|
|
||||||
|
|
||||||
%if %{distro} == "suse"
|
|
||||||
%{_sbindir}/a2enmod auth_gssapi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:99d2e1bdba964977c12a1b8ea195717f8b09ec799c61d4873905da3b1f5656ab
|
|
||||||
size 444745
|
|
3
mod_auth_gssapi-1.6.1.tar.gz
Normal file
3
mod_auth_gssapi-1.6.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a8fd06f4d46b6287796d6ccbe93290d02a9dbd76bc7db75e03d366ad34151854
|
||||||
|
size 501237
|
Loading…
Reference in New Issue
Block a user