Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37041537
en ru br
ALT Linux repos
S:1.2-alt2
5.0: 1.0.3-alt1
4.1: 1.0.2-alt1
4.0: 1.0.2-alt1
3.0: 0.9.8.9-alt1

Group :: System/Base
RPM: tcb

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: tcb
Version: 0.9.8.9
Release: alt1

Summary: Libraries and tools implementing the %name password shadowing scheme
License: GPL or BSD
Group: System/Base
Url: http://www.openwall.com/tcb/

Source: ftp://ftp.openwall.com/pub/projects/tcb/%name-%version.tar.bz2
Source1: tcb_chkpwd.control

Patch1: %name-0.9.8.8-alt-makefile-multilib.patch

Patch11: %name-0.9.8.8-alt-makefile-pam.patch
Patch12: %name-0.9.8.8-alt-openpam.patch
Patch13: %name-0.9.8.7-alt-tcb_convert-try_auth.patch

# crypt_gensalt is necessary to build pam_tcb.

#BuildPreReq: libcrypt.so.1(GLIBC_2.2.2)

# Automatically added by buildreq on Tue Oct 07 2003

BuildRequires: libpam-devel

%description
The %name package consists of three components: %pam_name, libnss_%name, and
lib%name.  %pam_name is a PAM module which supersedes pam_unix.  It also
implements the %name password shadowing scheme (see %name(5) for details).
The %name scheme allows many core system utilities (passwd(1) being the
primary example) to operate with little privilege.  libnss_%name is the
accompanying NSS module.  lib%name contains code shared by the PAM and
NSS modules and is also used by programs from the shadow-utils package.

%package -n lib%name
Summary: %name shared library
License: GPL or BSD
Group: System/Libraries

%package -n lib%name-devel
Summary: Libraries and header files for building %name-aware applications
License: GPL or BSD
Group: Development/C
PreReq: lib%name = %version-%release

%package -n lib%name-devel-static
Summary: Static libraries for building statically linked %name-aware applications
License: GPL or BSD
Group: Development/C
Requires: lib%name-devel = %version-%release

%package -n nss_%name
Summary: %name NSS module
License: GPL or BSD
Group: System/Libraries
PreReq: lib%name = %version-%release

%set_pam_name pam_%name
%package -n %pam_name
Summary: %name PAM module
License: GPL or BSD
Group: System/Base
PreReq: nss_%name = %version-%release, libpam, control
Provides: pam_%name = %version-%release
Obsoletes: pam_%name

%package utils
Summary: %name utilities
License: GPL
Group: System/Base
Provides: /etc/tcb
PreReq: pam_%name = %version-%release, shadow-convert

%description -n lib%name
This package contains code shared by the PAM and NSS modules and is also used
by programs from the shadow-utils package.

%description -n lib%name-devel
This package contains library and header files needed for
building %name-aware applications.

%description -n lib%name-devel-static
This package contains static library needed for
building statically linked %name-aware applications.

%description -n nss_%name
This package contains nss_%name - %name NSS module.

%description -n %pam_name
This package contains %pam_name - %name PAM module which supersedes pam_unix.

%description utils
This package contains utilities to convert to and from the tcb
password shadowing scheme.

%prep
%setup -q
%patch1 -p1

%patch11 -p1
%patch12 -p1
%patch13 -p1

# /usr/libexec is hardcoded in the sources.

if [ "%_libexecdir" != "/usr/libexec" ]; then
find -type f -print0 |
xargs -r0 %__grep -FZl /usr/libexec -- |
xargs -r0 %__subst -p 's,/usr/libexec,%_libexecdir,g' --
fi

%build
CFLAGS="$RPM_OPT_FLAGS -Werror -DENABLE_SETFSUGID" make

%install
%make_install install-non-root install-pam_unix \
DESTDIR=%buildroot \
MANDIR=%_mandir \
LIBDIR=%_libdir \
SLIBDIR=/%_lib \
#
%__install -pD -m755 %_sourcedir/tcb_chkpwd.control \
%buildroot%_controldir/tcb_chkpwd
%__subst -p 's, at libexecdir at ,%_libexecdir,g' \
%buildroot%_controldir/tcb_chkpwd
%__mkdir_p %buildroot/etc/tcb

%add_findprov_lib_path /%_lib/security

%post -n lib%name -p %post_ldconfig_sys
%postun -n lib%name -p %postun_ldconfig

%post -n nss_%name -p %post_ldconfig_sys
%postun -n nss_%name -p %postun_ldconfig

%pre -n %pam_name
/usr/sbin/groupadd -r -f chkpwd >/dev/null 2>&1 ||:
/usr/sbin/groupadd -r -f shadow >/dev/null 2>&1 ||:
%pre_control tcb_chkpwd

%post -n %pam_name
%post_control -s tcb tcb_chkpwd

%triggerpostun -n %pam_name -- pam_tcb < 0:0.9.8.3-alt1
/usr/sbin/control tcb_chkpwd tcb

%pre utils
/usr/sbin/groupadd -r -f auth >/dev/null 2>&1 ||:

%post utils
if [ $1 = 1 -a ! -e /etc/tcb ]; then
/sbin/tcb_convert
fi

%files -n lib%name
/%_lib/lib%name.so.*
%doc ChangeLog LICENSE

%files -n lib%name-devel
%_libdir/lib*.so
%_includedir/*

%files -n lib%name-devel-static
%_libdir/*.a

%files -n nss_%name
/%_lib/libnss_*

%files -n %pam_name
/%_lib/security/pam_*.so*
%attr(710,root,chkpwd) %dir %_libexecdir/chkpwd
%attr(700,root,root) %verify(not mode group) %_libexecdir/chkpwd/tcb_chkpwd
%config %_controldir/tcb_chkpwd
%_man8dir/pam_*

%files utils
%attr(710,root,shadow) %ghost /etc/tcb
/sbin/%{name}_*convert
%_man5dir/%name.*
%_man8dir/tcb_*

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin