2007-01-16 00:38:14 +01:00
|
|
|
#
|
2011-03-23 13:45:03 +01:00
|
|
|
# spec file for package sudo
|
2007-01-16 00:38:14 +01:00
|
|
|
#
|
2013-03-01 13:07:40 +01:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-16 00:38:14 +01:00
|
|
|
#
|
2008-08-07 12:00:06 +02: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-16 00:38:14 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-01-31 13:34:31 +01:00
|
|
|
|
2007-01-16 00:38:14 +01:00
|
|
|
Name: sudo
|
2013-06-28 14:03:03 +02:00
|
|
|
Version: 1.8.7
|
2012-01-04 18:06:35 +01:00
|
|
|
Release: 0
|
2007-01-16 00:38:14 +01:00
|
|
|
Summary: Execute some commands as root
|
2012-12-03 15:39:41 +01:00
|
|
|
License: ISC
|
2011-03-23 13:45:03 +01:00
|
|
|
Group: System/Base
|
2012-01-04 18:06:35 +01:00
|
|
|
Url: http://www.sudo.ws/
|
2011-10-13 15:29:20 +02:00
|
|
|
Source0: http://sudo.ws/sudo/dist/%{name}-%{version}.tar.gz
|
2011-03-23 13:45:03 +01:00
|
|
|
Source1: sudo.pamd
|
2007-01-16 00:38:14 +01:00
|
|
|
Source2: README.SUSE
|
2011-03-23 13:45:03 +01:00
|
|
|
BuildRequires: audit-devel
|
2012-10-26 17:57:42 +02:00
|
|
|
BuildRequires: groff
|
2011-03-23 13:45:03 +01:00
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
BuildRequires: openldap2-devel
|
|
|
|
BuildRequires: pam-devel
|
2011-10-24 13:08:52 +02:00
|
|
|
Requires(pre): coreutils
|
|
|
|
Requires(pre): permissions
|
2007-01-16 00:38:14 +01: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 13:45:03 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Header files needed for sudo plugin development
|
|
|
|
Group: Development/Libraries/C and C++
|
2007-01-16 00:38:14 +01:00
|
|
|
|
2011-03-23 13:45:03 +01:00
|
|
|
%description devel
|
|
|
|
These header files are needed for building of sudo plugins.
|
2007-01-16 00:38:14 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2010-02-11 19:37:57 +01:00
|
|
|
%ifarch s390 s390x %sparc
|
2007-01-16 00:38:14 +01:00
|
|
|
F_PIE=-fPIE
|
|
|
|
%else
|
|
|
|
F_PIE=-fpie
|
|
|
|
%endif
|
2011-03-23 13:45:03 +01:00
|
|
|
export CFLAGS="%{optflags} -Wall $F_PIE -DLDAP_DEPRECATED"
|
2007-07-27 02:11:20 +02:00
|
|
|
export LDFLAGS="-pie"
|
|
|
|
%configure \
|
|
|
|
--libexecdir=%{_libexecdir}/sudo \
|
2011-03-23 13:45:03 +01:00
|
|
|
--docdir=%{_docdir}/%{name} \
|
2007-07-27 02:11:20 +02:00
|
|
|
--with-noexec=%{_libexecdir}/sudo/sudo_noexec.so \
|
2011-03-23 13:45:03 +01:00
|
|
|
--with-pam \
|
|
|
|
--with-ldap \
|
2008-08-22 22:03:52 +02:00
|
|
|
--with-selinux \
|
2011-03-23 13:45:03 +01:00
|
|
|
--with-linux-audit \
|
2007-07-27 02:11:20 +02:00
|
|
|
--with-logfac=auth \
|
|
|
|
--with-insults \
|
|
|
|
--with-all-insults \
|
|
|
|
--with-ignore-dot \
|
|
|
|
--with-tty-tickets \
|
|
|
|
--enable-shell-sets-home \
|
2011-03-23 13:45:03 +01:00
|
|
|
--enable-warnings \
|
|
|
|
--with-sendmail=%{_sbindir}/sendmail \
|
2007-07-27 02:11:20 +02:00
|
|
|
--with-sudoers-mode=0440 \
|
|
|
|
--with-env-editor \
|
2007-08-15 20:37:18 +02:00
|
|
|
--without-secure-path \
|
2011-12-28 20:07:41 +01:00
|
|
|
--with-passprompt='%%p\x27s password:' \
|
|
|
|
--with-timedir=%{_localstatedir}/lib/sudo
|
2010-07-30 15:55:28 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-01-16 00:38:14 +01:00
|
|
|
|
|
|
|
%install
|
2011-03-23 13:45:03 +01: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 15:29:20 +02:00
|
|
|
%find_lang %{name}
|
|
|
|
%find_lang sudoers
|
|
|
|
cat sudoers.lang >> %{name}.lang
|
2007-01-16 00:38:14 +01:00
|
|
|
|
2007-01-26 23:12:53 +01:00
|
|
|
%post
|
|
|
|
chmod 0440 %{_sysconfdir}/sudoers
|
2011-03-23 13:45:03 +01: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 23:12:53 +01:00
|
|
|
|
2007-01-16 00:38:14 +01:00
|
|
|
%clean
|
2011-03-23 13:45:03 +01:00
|
|
|
rm -rf %{buildroot}
|
2007-01-16 00:38:14 +01:00
|
|
|
|
2011-10-13 15:29:20 +02:00
|
|
|
%files -f %{name}.lang
|
2007-01-16 00:38:14 +01:00
|
|
|
%defattr(-,root,root)
|
2011-03-23 13:45:03 +01:00
|
|
|
%doc %{_docdir}/%{name}
|
2007-01-16 00:38:14 +01:00
|
|
|
%doc %{_mandir}/man?/*
|
2007-07-27 02:11:20 +02:00
|
|
|
%config(noreplace) %attr(0440,root,root) %{_sysconfdir}/sudoers
|
2011-03-23 13:45:03 +01:00
|
|
|
%dir %{_sysconfdir}/sudoers.d
|
2007-07-27 02:11:20 +02:00
|
|
|
%config %{_sysconfdir}/pam.d/sudo
|
2007-01-16 00:38:14 +01:00
|
|
|
%attr(4755,root,root) %{_bindir}/sudo
|
2011-01-28 12:22:22 +01:00
|
|
|
%dir %{_sysconfdir}/openldap
|
|
|
|
%dir %{_sysconfdir}/openldap/schema
|
|
|
|
%attr(0444,root,root) %config %{_sysconfdir}/openldap/schema/sudo.schema
|
2007-01-16 00:38:14 +01:00
|
|
|
%{_bindir}/sudoedit
|
2011-03-23 13:45:03 +01:00
|
|
|
%{_bindir}/sudoreplay
|
|
|
|
%{_sbindir}/visudo
|
|
|
|
%attr(0755,root,root) %{_sbindir}/sudoers2ldif
|
2007-07-27 02:11:20 +02:00
|
|
|
%{_libexecdir}/sudo
|
2011-03-23 13:45:03 +01:00
|
|
|
%attr(0700,root,root) %dir %ghost %{_localstatedir}/lib/sudo
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/sudo_plugin.h
|
2007-12-06 01:36:36 +01:00
|
|
|
|
2007-07-18 23:01:14 +02:00
|
|
|
%changelog
|