Sisyphus
: 19 2019 | : 17513 | : 15808305
en ru br
ALT
S:1.8.28-alt1
5.1: 1.6.8p12-alt7
4.1: 1.6.8p12-alt5.M41.1
4.0: 1.6.8p12-alt5
+updates:1.6.8p12-alt5
3.0: 1.6.7p5-alt5
www.altlinux.org/Changes

:: /
: sudo

             Sources      Gear   Bugs and FR  Repocop 

Name: sudo
Version: 1.8.27
Release: alt1
Epoch: 1

Summary: Allows command execution as another user
License: BSD-style
Group: System/Base
Url: http://www.courtesan.com/sudo/

# ftp://ftp.courtesan.com/pub/sudo/sudo-%version.tar.gz

Source: sudo-%version.tar

Patch: sudo-%version-alt.patch

PreReq: control
Requires: vitmp
Provides: %_sysconfdir/sudoers.d

# Automatically added by buildreq on Wed Apr 09 2003

BuildRequires: flex libpam-devel perl-podlators
# Due check of man pages type
BuildRequires: /usr/bin/nroff

%define _libexecdir %_prefix/libexec/sudo

Summary(ru_RU.UTF-8): Запускает команды в контексте другого пользователя

%description
Sudo is a program designed to allow a sysadmin to give limited root
privileges to users and log root activity.  The basic philosophy is
to give as few privileges as possible but still allow people to get
their work done.

%description -l ru_RU.UTF-8
Sudo - программа, разработанная в помощь системному администратору
делегировать те или иные привилегированные ресурсы пользователям,
с ведением протокола их деятельности.  Основная идея - делегировать
как можно меньше прав, но ровно столько, сколько необходимо для
решения поставленных задач.

%package devel
Summary: Development files for %name
Group: Development/C
Requires: %name = %epoch:%version-%release
BuildArch: noarch

%description devel
The %name-devel package contains header files developing sudo
plugins that use %name.

%description devel -l ru_RU.UTF-8
Пакет %name-devel содержит заголовочные файлы для разработки расширений
для програмы %name.

%prep
%setup
%patch -p1

%build
./autogen.sh
export ac_cv_prog_NROFFPROG=nroff
configure_options='
--with-logging=syslog
--with-logfac=authpriv
--enable-shell-sets-home
--enable-log-host
--disable-rpath
--with-pam
--with-ignore-dot
--with-env-editor
--with-tty-tickets
--with-sudoers-mode=0400
--with-editor=/bin/vitmp
--with-sendmail=/usr/sbin/sendmail
--with-sssd
--docdir=%_datadir/doc/%name-%version
--with-plugindir=%_libdir/sudo
--libexecdir=%_libdir
--with-secure-path=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin'

%configure $configure_options --with-passprompt='[sudo] password for %%u:'
%make_build

%install
%makeinstall_std INSTALL_OWNER=
install -pD -m600 examples/pam.conf %buildroot%_sysconfdir/pam.d/sudo
mkdir -p %buildroot%_sysconfdir/sudoers.d
chmod u+rwx %buildroot%prefix/*bin/*
install -pD -m755 sudo.control %buildroot/etc/control.d/facilities/sudo
install -pD -m755 sudoers.control %buildroot/etc/control.d/facilities/sudoers
install -pD -m755 sudoreplay.control %buildroot/etc/control.d/facilities/sudoreplay
install -pD -m755 sudowheel.control %buildroot/etc/control.d/facilities/sudowheel
bzip2 -9 %buildroot%_datadir/doc/%name-%version/ChangeLog

%find_lang sudo
%find_lang sudoers

cat sudo.lang sudoers.lang > sudo_all.lang
rm sudo.lang sudoers.lang
rm -f %buildroot%_libdir/sudo/*.la %buildroot%_libdir/*.so

mv %buildroot%_sysconfdir/sudoers.dist %buildroot%_datadir/doc/%name-%version/

%pre
%pre_control sudo
%pre_control sudoers
if [ -f "%_controldir/sudoreplay" ]; then
   %pre_control sudoreplay
fi
if [ -f "%_controldir/sudowheel" ]; then
   %pre_control sudowheel
fi

%post
%post_control -s wheelonly sudo
%post_control -s strict sudoers
if [ ! -f "/var/run/control/sudoreplay" ]; then
   echo wheelonly > "/var/run/control/sudoreplay"
fi
%post_control -s wheelonly sudoreplay
if [ $1 -gt 1 -a ! -f "/var/run/control/sudowheel" ]; then
   echo disabled > "/var/run/control/sudowheel"
fi
%post_control -s disabled sudowheel

%triggerpostun -- %name < 1:1.8.0
cp -a %_sysconfdir/sudoers %_sysconfdir/sudoers.rpmsave
if ! grep -q '^#includedir %_sysconfdir/sudoers.d$' %_sysconfdir/sudoers; then
   if [ -d %_sysconfdir/sudoers.d ]; then
       echo "WARNING: %_sysconfdir/sudoers.d directory no longer supported indirectly"
       echo "Update %_sysconfdir/sudoers with next line:"
       echo "#includedir %_sysconfdir/sudoers.d"
       echo

       echo >>%_sysconfdir/sudoers
       echo "# Automatically updates by rpm:" >>%_sysconfdir/sudoers
       echo "#includedir %_sysconfdir/sudoers.d" >>%_sysconfdir/sudoers
   fi
fi
if ! grep -q '^#includedir %_sysconfdir/sudo.d$' %_sysconfdir/sudoers; then
   if [ -d %_sysconfdir/sudo.d ]; then
       echo "WARNING: %_sysconfdir/sudo.d compat directory no longer supported indirectly"

       if [ "$(ls -A %_sysconfdir/sudo.d)" ]; then
           echo "Update %_sysconfdir/sudoers with next line:"
           echo "#includedir %_sysconfdir/sudo.d"

           echo >>%_sysconfdir/sudoers
           echo "# Automatically updates by rpm:" >>%_sysconfdir/sudoers
           echo "#includedir %_sysconfdir/sudo.d" >>%_sysconfdir/sudoers
       fi

       echo
   fi
fi

%files -f sudo_all.lang
%config %_controldir/sudo*
%attr(400,root,root) %config(noreplace) %_sysconfdir/sudoers
%attr(600,root,root) %config(noreplace) %_sysconfdir/pam.d/sudo
%_bindir/sudoedit
%dir %_libdir/sudo
%_libdir/*.so.*
%_libdir/sudo/*.so*
%attr(700,root,root) %_bindir/sudo
%attr(700,root,root) %_bindir/sudoreplay
%attr(755,root,root) %_sbindir/visudo
%attr(700,root,root) %_sysconfdir/sudoers.d
%_bindir/cvtsudoers
%_mandir/man?/*
%exclude %_man8dir/sudo_plugin.8*
%_datadir/doc/%name-%version/

%files devel
%doc plugins/sample/sample_plugin.c
%_includedir/sudo_plugin.h
%_man8dir/sudo_plugin.8*

%changelog

changelog

 
: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
: Michael Shigorin