Репозиторий Sisyphus
Последнее обновление: 30 сентября 2022 | Пакетов: 17695 | Посещений: 25051552
en ru br
Репозитории ALT
5.1: 1.6.3-alt10.M50P.1
4.1: 1.6.3-alt3.M41.4
4.0: 1.5.1-alt4.M40.5
3.0: 1.4.1-alt1

Группа :: Система/Библиотеки
Пакет: krb5

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%def_without bootstrap
%def_with doc
%def_with ldap
%def_with selinux
%def_with verto
%def_with lmdb
%def_enable check

Name: krb5
Version: 1.19.3
Release: alt1.2

%if_without bootstrap
%if_with doc
%define _unpackaged_files_terminate_build 1

%define _docdir %_defaultdocdir/%name-%version

Summary: The Kerberos network authentication system
License: MIT
Group: System/Libraries
Url: http://web.mit.edu/kerberos/www/

Source0: %name-%version.tar
Source2: %name-alt.tar

# Carry this locally until it's available in a packaged form.

Source100: noport.c

# fedora patches:

Patch23: krb5-1.3.1-fedora-dns.patch
Patch39: krb5-1.12-fedora-api.patch
Patch60: krb5-1.18-fedora-pam.patch
Patch63: krb5-1.18-fedora-selinux-label.patch
Patch86: krb5-1.9-fedora-debuginfo.patch
Patch129: krb5-1.11-fedora-run_user_0.patch

# alt patches:

Patch200: krb5-1.18-alt-default_keytab_group.patch
Patch201: krb5-1.19.1-alt-fix-zero-backlog-listen.patch

BuildRequires: /dev/pts /proc
BuildRequires: flex libcom_err-devel libkeyutils-devel
BuildRequires: libncurses-devel libss-devel libssl-devel libtinfo-devel
BuildRequires: libpam-devel

%{?_with_ldap:BuildRequires: libldap-devel libsasl2-devel}
%{?_with_verto:BuildRequires: libverto-devel}
%{?_with_selinux:BuildRequires: libselinux-devel}
%{?_with_lmdb:BuildRequires: liblmdb-devel}

%if_with doc
BuildRequires: python3-module-sphinx
BuildRequires: texlive-latex-base texlive-base-bin texlive-latex-recommended latexmk

%ifarch %{ix86} x86_64
%{?!_with_bootstrap:BuildRequires: yasm}

%if_enabled check
# for tests
BuildRequires: libverto-libev python-modules gcc-c++
# dejagnu tests disabled
# BuildRequires: dejagnu tcl-devel

Kerberos V5 is a trusted-third-party network authentication system,
which can improve your network's security by eliminating the insecure
practice of cleartext passwords.

# {{{ subpackages

%package -n lib%name
Summary: The shared libraries used by Kerberos 5
Group: System/Libraries
Requires: gawk

# RH/Fedora compatibility

Provides: krb5-libs = %EVR

%package -n lib%name-ldap
Summary: The shared Kerberos 5 libraries, LDAP support
Group: System/Libraries
Requires: lib%name = %version-%release

%package -n lib%name-devel
Summary: Development files needed to compile Kerberos 5 programs
Group: System/Libraries
Requires: lib%name = %version-%release
%{?_with_ldap:Requires: lib%name-ldap = %version-%release}
Requires: libcom_err-devel
Provides: %name-services = %version-%release
Provides: %name-clients = %version-%release
Obsoletes: %name-services < %version-%release
Obsoletes: %name-clients < %version-%release

%if_without verto
%package -n libverto
Version: 0.0.%version
Summary: verto shared libraries (bootstrap build)
Group: System/Legacy libraries

%description -n libverto
This is a temporary libverto package built within krb5;
only used for bootstrap.

%package kdc
Group: System/Servers
Summary: The Kerberos 5 Key Distribution Center
Requires: %name-kadmin = %version-%release
Requires: lib%name = %version-%release
Requires: lib%name-ldap = %version-%release
Requires: libverto-libev
Provides: %name-server = %version-%release
Obsoletes: %name-server < %version-%release

%package kadmin
Group: System/Servers
Summary: The KDC admin programs for Kerberos 5
Requires: %name-kinit = %version-%release
Requires: lib%name = %version-%release

%package kinit
Summary: Kerberos 5 programs for use on workstations
Group: System/Base
Requires: lib%name = %version-%release
Provides: %name-workstation = %version-%release
Obsoletes: %name-workstation < %version-%release

%package ksu
Summary: Kerberized super-user
Group: System/Base
Requires(pre,postun): control
Requires: lib%name = %version-%release
Conflicts: %name-kinit < %version-%release

%package doc
Group: Books/Computer books
Summary: Kerberos 5 documentation
BuildArch: noarch

%description -n lib%name
Kerberos is a network authentication system.  This package contains
the shared libraries needed by Kerberos 5.  If you are using Kerberos,
you need to install this package.

%description -n lib%name-ldap
Kerberos is a network authentication system.  This package contains
the shared Kerberos 5 libraries needed for LDAP backend support.

%description -n lib%name-devel
Kerberos is a network authentication system.  This package contains the
header files and libraries needed for compiling Kerberos 5 programs.
If you want to develop Kerberos-aware programs, you need to install
this package.

%description kdc
Kerberos is a network authentication system.
This package contains the programs that must be installed
on a Kerberos 5 Key Distribution Center.

%description kadmin
Kerberos is a network authentication system.
This package contains set of programs helping to manage
a Kerberos 5 Key Distribution Center.

%description kinit
Kerberos is a network authentication system.
This package contains the basic Kerberos programs.
If your network uses Kerberos, this package should be installed
on every workstation.

%description ksu
Kerberos is a network authentication system.
This package contains ksu program, which is a Kerberized version
of the su program that has two missions: to securely change the
real and effective user ID to that of the target user, and to
create a new security context.

%description doc
Kerberos is a network authentication system.
This packages contains documentation bundled with
MIT Kerberos.

# }}}


# fedora patches:

%patch60 -p1 -b .pam
%patch63 -p1 -b .selinux-label
%patch23 -p1 -b .dns
%patch39 -p1 -b .api
%patch86 -p1 -b .debuginfo
# Apply when the hard-wired or configured default location is
# DIR:/run/user/%%{uid}/krb5cc.
%patch129 -p1 -b .run_user_0

%patch200 -p2 -b .default_keytab_group
%patch201 -p1

# Generate an FDS-compatible LDIF file.

cat > '60kerberos.ldif' << EOF
# This is a variation on kerberos.ldif which 389 Directory Server will like.
dn: cn=schema
egrep -iv '(^$|^dn:|^changetype:|^add:)' $inldif | \
sed -r 's,^ ,                ,g' | \
sed -r 's,^ ,        ,g' >> 60kerberos.ldif
touch -r $inldif 60kerberos.ldif

%ifarch %e2k
sed -r -i 's, error=(pointer-arith|uninitialized),,g' \
  src/aclocal.m4 src/configure*

# Go ahead and supply tcl info, because configure doesn't know how to find it.
# . %_libdir/tclConfig.sh

%add_optflags -I/usr/include/et
%add_optflags -DKRB5_DNS_LOOKUP

# Set this so that configure will have a value even if the current version of

# autoconf doesn't set one.
runstatedir=%_runtimedir; export runstatedir

pushd src
autoreconf --verbose --force
%configure \
--enable-shared --disable-static \
--localstatedir=%_localstatedir/kerberos \
--with-system-et \
--with-system-ss \
%{?_with_verto:--with-system-verto} \
%{subst_with ldap} \
%{subst_with selinux} \
       %{subst_with lmdb} \
--enable-dns-for-realm \
--enable-pkinit \
%if_without bootstrap
--with-pkinit-crypto-impl=openssl \
--with-tls-impl=openssl \
--with-pam \
--with-netlib=-lresolv \
--disable-rpath \

# dejagnu tests disabled

# --with-tcl=%_libdir \

# Sanity check the KDC_RUN_DIR.

configured_kdcrundir=`grep KDC_RUN_DIR src/include/osconf.h | awk '{print $NF}'`
configured_kdcrundir=`eval echo $configured_kdcrundir`
if test "$configured_kdcrundir" != %_runtimedir/krb5kdc ; then
   exit 1

%if_with doc
# Build the docs.
make -C src/doc paths.py version.py
cp src/doc/paths.py doc/
mkdir -p build-man build-html build-pdf
sphinx-build-3 -a -b man   -t pathsubs doc build-man
sphinx-build-3 -a -b html  -t pathsubs doc build-html
rm -fr build-html/_sources
sphinx-build-3 -a -b latex -t pathsubs doc build-pdf
make -C build-pdf

# We need to cut off any access to locally-running nameservers, too.

%__cc -fPIC -shared -o noport.so -Wall -Wextra %SOURCE100

# NOTE(iv at ): this test hangs for too long, look at this later
echo > src/tests/t_iprop.py

# skip this test, because getaddrinfo with flag AI_ADDRCONFIG return error in hasher

echo > src/tests/t_kprop.py

make -C src check TMPDIR=%_tmppath OFFLINE=yes PYTESTFLAGS="-v"


make -C src install \
   DESTDIR=%buildroot \
   INSTALL_SETUID='install -m0755' \

# Server init scripts, sample client config file and sample KDC config files.

tar xf %SOURCE2 -C %buildroot

mkdir -p %buildroot%_sysconfdir/krb5.conf.d

# Fix preporcessor loop

# sed -i 's,<krb5/krb5.h>,<krb5/krb5/krb5.h>,' %buildroot%_includedir/krb5/krb5.h

# Relocate *some* shared libraries

mkdir -p %buildroot/%_lib
for lib in libgssapi_krb5 libk5crypto libkrb5 libkrb5support; do
 mv %buildroot%_libdir/${lib}.so.* %buildroot/%_lib
 ln -snf ../../%_lib/`readlink %buildroot%_libdir/${lib}.so` %buildroot%_libdir/${lib}.so

# Fix binaries clashes

mv -f %buildroot%_bindir/uuclient %buildroot%_bindir/%name-uuclient
mv -f %buildroot%_sbindir/uuserver %buildroot%_sbindir/%name-uuserver

# Where per-user keytabs live by default.

mkdir -p %buildroot%_localstatedir/kerberos/krb5/user

# Parent of configuration file for list of loadable GSS mechs ("mechs").  This

# location is not relative to sysconfdir, but is hard-coded in g_initialize.c.
mkdir -m 755 -p %buildroot%_sysconfdir/gss
# Parent of groups of configuration files for a list of loadable GSS mechs
# ("mechs").  This location is not relative to sysconfdir, and is also
# hard-coded in g_initialize.c.
mkdir -m 755 -p %buildroot%_sysconfdir/gss/mech.d

%if_with doc
# Install docs
mkdir -p %buildroot%_docdir/pdf
cp build-pdf/*.pdf %buildroot%_docdir/pdf/
cp -R build-html/ %buildroot/%_docdir/
cp -p src/plugins/kdb/ldap/libkdb_ldap/kerberos.{ldif,schema} %buildroot%_docdir/

# cleanups

rm -rf %buildroot%_libdir/krb5/plugins/preauth/test.so
rm -rf %buildroot%_datadir/gnats
rm -rf %buildroot%_mandir/cat*
touch %buildroot%_sysconfdir/krb5.keytab

%find_lang mit-krb5

%if_without bootstrap
%post kdc
%post_service krb5kdc
%post_service kadmin
%post_service kprop

%preun kdc
%preun_service krb5kdc
%preun_service kadmin
%preun_service kprop

%pre -n lib%name
/usr/sbin/groupadd -r -f _keytab

%pre ksu
%pre_control ksu

%post ksu
%post_control -s wheelonly ksu

%triggerpostun -n lib%name -- lib%name < 1.14.4-alt2
if [ -f %_sysconfdir/krb5.keytab ]; then
   chown :_keytab %_sysconfdir/krb5.keytab
   chmod g+r %_sysconfdir/krb5.keytab

%files -n lib%name -f mit-krb5.lang
%config(noreplace) %_sysconfdir/krb5.conf
%ghost %config(noreplace) %attr(640,root,_keytab) %_sysconfdir/krb5.keytab
%dir %_sysconfdir/gss
%dir %_sysconfdir/gss/mech.d
%dir %_sysconfdir/krb5.conf.d
%dir %_localstatedir/kerberos
%dir %_localstatedir/kerberos/krb5
%dir %_localstatedir/kerberos/krb5/user



%dir %_libdir/%name
%dir %_libdir/%name/plugins
%dir %_libdir/%name/plugins/kdb
%dir %_libdir/%name/plugins/preauth
%dir %_libdir/%name/plugins/tls
%if_with lmdb


%if_with ldap
%files -n lib%name-ldap

%files -n lib%name-devel
%exclude %_sbindir/krb5-send-pr

%if_without verto
%files -n libverto

%if_without bootstrap
%files kdc
%dir %_localstatedir/kerberos/krb5kdc
%config(noreplace) %_localstatedir/kerberos/krb5kdc/kdc.conf
%config(noreplace) %_localstatedir/kerberos/krb5kdc/kadm5.acl

%config(noreplace) %_sysconfdir/sysconfig/kadmin
%config(noreplace) %_sysconfdir/sysconfig/krb5kdc





%files kadmin


%files kinit

# %%_man1dir/kerberos.1*

%files ksu
%config(noreplace) %_sysconfdir/pam.d/ksu

%if_with doc
%files doc
%doc %_docdir

# {{{ changelog


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin