2007-01-15 23:38:14 +00:00
|
|
|
#
|
2011-03-23 12:45:03 +00:00
|
|
|
# spec file for package sudo
|
2007-01-15 23:38:14 +00:00
|
|
|
#
|
2011-03-23 12:45:03 +00:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-15 23:38:14 +00:00
|
|
|
#
|
2008-08-07 10:00:06 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-15 23:38:14 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2008-03-21 03:40:40 +00:00
|
|
|
|
2007-01-15 23:38:14 +00:00
|
|
|
Name: sudo
|
2011-10-13 13:29:20 +00:00
|
|
|
Version: 1.8.2
|
2011-05-23 08:15:21 +00:00
|
|
|
Release: 1
|
2010-02-11 18:37:57 +00:00
|
|
|
License: BSD3c(or similar)
|
2007-01-15 23:38:14 +00:00
|
|
|
Summary: Execute some commands as root
|
2011-03-23 12:45:03 +00:00
|
|
|
Url: http://www.sudo.ws/
|
|
|
|
Group: System/Base
|
2011-10-13 13:29:20 +00:00
|
|
|
Source0: http://sudo.ws/sudo/dist/%{name}-%{version}.tar.gz
|
2011-03-23 12:45:03 +00:00
|
|
|
Source1: sudo.pamd
|
2007-01-15 23:38:14 +00:00
|
|
|
Source2: README.SUSE
|
2011-10-13 13:29:20 +00:00
|
|
|
Patch0: sudoers2ldif-env.patch
|
|
|
|
Patch1: sudo-sudoers.patch
|
|
|
|
Patch2: sudo-grp-include.patch
|
2011-03-23 12:45:03 +00:00
|
|
|
BuildRequires: audit-devel
|
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
BuildRequires: openldap2-devel
|
|
|
|
BuildRequires: pam-devel
|
|
|
|
PreReq: coreutils
|
|
|
|
PreReq: permissions
|
2007-01-15 23:38:14 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
Sudo is a command that allows users to execute some commands as root.
|
|
|
|
The /etc/sudoers file (edited with 'visudo') specifies which users have
|
|
|
|
access to sudo and which commands they can run. Sudo logs all its
|
|
|
|
activities to syslogd, so the system administrator can keep an eye on
|
|
|
|
things. Sudo asks for the password for initializing a check period of a
|
|
|
|
given time N (where N is defined at installation and is set to 5
|
|
|
|
minutes by default).
|
|
|
|
|
2011-03-23 12:45:03 +00:00
|
|
|
%package devel
|
|
|
|
License: BSD3c(or similar)
|
|
|
|
Summary: Header files needed for sudo plugin development
|
|
|
|
Group: Development/Libraries/C and C++
|
2007-01-15 23:38:14 +00:00
|
|
|
|
2011-03-23 12:45:03 +00:00
|
|
|
%description devel
|
|
|
|
These header files are needed for building of sudo plugins.
|
2007-01-15 23:38:14 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2011-10-13 13:29:20 +00:00
|
|
|
%patch0 -p1
|
2011-03-23 12:45:03 +00:00
|
|
|
%patch1 -p1
|
2011-10-13 13:29:20 +00:00
|
|
|
%patch2 -p1
|
2007-01-15 23:38:14 +00:00
|
|
|
|
|
|
|
%build
|
2010-02-11 18:37:57 +00:00
|
|
|
%ifarch s390 s390x %sparc
|
2007-01-15 23:38:14 +00:00
|
|
|
F_PIE=-fPIE
|
|
|
|
%else
|
|
|
|
F_PIE=-fpie
|
|
|
|
%endif
|
2011-03-23 12:45:03 +00:00
|
|
|
export CFLAGS="%{optflags} -Wall $F_PIE -DLDAP_DEPRECATED"
|
2007-07-27 00:11:20 +00:00
|
|
|
export LDFLAGS="-pie"
|
|
|
|
%configure \
|
|
|
|
--libexecdir=%{_libexecdir}/sudo \
|
2011-03-23 12:45:03 +00:00
|
|
|
--docdir=%{_docdir}/%{name} \
|
2007-07-27 00:11:20 +00:00
|
|
|
--with-noexec=%{_libexecdir}/sudo/sudo_noexec.so \
|
2011-03-23 12:45:03 +00:00
|
|
|
--with-pam \
|
|
|
|
--with-ldap \
|
2008-08-22 20:03:52 +00:00
|
|
|
--with-selinux \
|
2011-03-23 12:45:03 +00:00
|
|
|
--with-linux-audit \
|
2007-07-27 00:11:20 +00:00
|
|
|
--with-logfac=auth \
|
|
|
|
--with-insults \
|
|
|
|
--with-all-insults \
|
|
|
|
--with-ignore-dot \
|
|
|
|
--with-tty-tickets \
|
|
|
|
--enable-shell-sets-home \
|
2011-03-23 12:45:03 +00:00
|
|
|
--enable-warnings \
|
|
|
|
--with-sendmail=%{_sbindir}/sendmail \
|
2007-07-27 00:11:20 +00:00
|
|
|
--with-sudoers-mode=0440 \
|
|
|
|
--with-env-editor \
|
2007-08-15 18:37:18 +00:00
|
|
|
--without-secure-path \
|
2007-08-12 09:46:56 +00:00
|
|
|
--with-passprompt='%%p\x27s password:'
|
2010-07-30 13:55:28 +00:00
|
|
|
make %{?_smp_mflags}
|
2007-01-15 23:38:14 +00:00
|
|
|
|
|
|
|
%install
|
2011-03-23 12:45:03 +00:00
|
|
|
%make_install
|
|
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/pam.d
|
|
|
|
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/sudo
|
|
|
|
mv %{buildroot}%{_docdir}/%{name}/sudoers2ldif %{buildroot}%{_sbindir}
|
|
|
|
rm -f %{buildroot}%{_bindir}/sudoedit
|
|
|
|
ln -sf %{_bindir}/sudo %{buildroot}%{_bindir}/sudoedit
|
|
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/openldap/schema
|
|
|
|
install -m 644 doc/schema.OpenLDAP %{buildroot}%{_sysconfdir}/openldap/schema/sudo.schema
|
|
|
|
install -m 644 %{SOURCE2} %{buildroot}%{_docdir}/%{name}/
|
|
|
|
rm -f %{buildroot}%{_docdir}/%{name}/sample.pam
|
|
|
|
rm -f %{buildroot}%{_docdir}/%{name}/sample.syslog.conf
|
|
|
|
rm -f %{buildroot}%{_docdir}/%{name}/schema.OpenLDAP
|
|
|
|
rm -f %{buildroot}%{_libexecdir}/%{name}/sudoers.la
|
2011-10-13 13:29:20 +00:00
|
|
|
%find_lang %{name}
|
|
|
|
%find_lang sudoers
|
|
|
|
cat sudoers.lang >> %{name}.lang
|
2007-01-15 23:38:14 +00:00
|
|
|
|
2007-01-26 22:12:53 +00:00
|
|
|
%post
|
|
|
|
chmod 0440 %{_sysconfdir}/sudoers
|
2011-03-23 12:45:03 +00:00
|
|
|
%if 0%{?suse_version} <= 1130
|
|
|
|
%run_permissions
|
|
|
|
%else
|
|
|
|
%set_permissions /usr/bin/sudo
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%verifyscript
|
|
|
|
%verify_permissions -e /usr/bin/sudo
|
2007-01-26 22:12:53 +00:00
|
|
|
|
2007-01-15 23:38:14 +00:00
|
|
|
%clean
|
2011-03-23 12:45:03 +00:00
|
|
|
rm -rf %{buildroot}
|
2007-01-15 23:38:14 +00:00
|
|
|
|
2011-10-13 13:29:20 +00:00
|
|
|
%files -f %{name}.lang
|
2007-01-15 23:38:14 +00:00
|
|
|
%defattr(-,root,root)
|
2011-03-23 12:45:03 +00:00
|
|
|
%doc %{_docdir}/%{name}
|
2007-01-15 23:38:14 +00:00
|
|
|
%doc %{_mandir}/man?/*
|
2007-07-27 00:11:20 +00:00
|
|
|
%config(noreplace) %attr(0440,root,root) %{_sysconfdir}/sudoers
|
2011-03-23 12:45:03 +00:00
|
|
|
%dir %{_sysconfdir}/sudoers.d
|
2007-07-27 00:11:20 +00:00
|
|
|
%config %{_sysconfdir}/pam.d/sudo
|
2007-01-15 23:38:14 +00:00
|
|
|
%attr(4755,root,root) %{_bindir}/sudo
|
2011-01-28 11:22:22 +00:00
|
|
|
%dir %{_sysconfdir}/openldap
|
|
|
|
%dir %{_sysconfdir}/openldap/schema
|
|
|
|
%attr(0444,root,root) %config %{_sysconfdir}/openldap/schema/sudo.schema
|
2007-01-15 23:38:14 +00:00
|
|
|
%{_bindir}/sudoedit
|
2011-03-23 12:45:03 +00:00
|
|
|
%{_bindir}/sudoreplay
|
|
|
|
%{_sbindir}/visudo
|
|
|
|
%attr(0755,root,root) %{_sbindir}/sudoers2ldif
|
2007-07-27 00:11:20 +00:00
|
|
|
%{_libexecdir}/sudo
|
2011-03-23 12:45:03 +00:00
|
|
|
%attr(0700,root,root) %dir %ghost %{_localstatedir}/lib/sudo
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/sudo_plugin.h
|
2007-12-06 00:36:36 +00:00
|
|
|
|
2007-07-18 21:01:14 +00:00
|
|
|
%changelog
|