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
|
|
|
#
|
2016-03-21 11:14:29 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX 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
|
2016-03-18 11:09:27 +01:00
|
|
|
Version: 1.8.16
|
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
|
2016-03-18 11:09:27 +01:00
|
|
|
Url: https://www.sudo.ws/
|
|
|
|
Source0: https://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
|
2014-02-02 19:13:19 +01:00
|
|
|
Source3: fate_313276_test.sh
|
|
|
|
Source4: README_313276.test
|
2016-03-21 11:14:29 +01:00
|
|
|
Source5: https://sudo.ws/sudo/dist/%{name}-%{version}.tar.gz.sig
|
|
|
|
Source6: %{name}.keyring
|
2013-07-02 18:30:47 +02:00
|
|
|
Patch0: sudoers2ldif-env.patch
|
2013-07-02 18:37:53 +02:00
|
|
|
# PATCH-OPENSUSE: the "SUSE" branding of the default sudo config
|
2013-07-02 18:30:47 +02:00
|
|
|
Patch1: sudo-sudoers.patch
|
2016-04-29 20:42:40 +02:00
|
|
|
Patch2: sudo-1.8.16-pam_groups.patch
|
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
|
2015-08-14 12:55:19 +02:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2015-07-23 10:10:43 +02:00
|
|
|
BuildRequires: zlib-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.
|
2015-11-06 13:38:32 +01:00
|
|
|
The %{_sysconfdir}/sudoers file (edited with 'visudo') specifies which users have
|
2007-01-16 00:38:14 +01:00
|
|
|
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++
|
2014-10-16 08:00:36 +02:00
|
|
|
Requires: %{name} = %{version}
|
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
|
|
|
|
2014-02-02 19:13:19 +01:00
|
|
|
%package test
|
|
|
|
Summary: Tests for the package
|
2016-03-21 11:14:29 +01:00
|
|
|
Group: Development/Tools/Other
|
2014-02-02 19:13:19 +01:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description test
|
|
|
|
Tests for fate#313276
|
|
|
|
|
2007-01-16 00:38:14 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2015-11-06 13:38:32 +01:00
|
|
|
%patch0 -p1
|
2013-07-02 18:30:47 +02:00
|
|
|
%patch1 -p1
|
2016-04-29 20:42:40 +02:00
|
|
|
%patch2 -p1
|
2007-01-16 00:38:14 +01:00
|
|
|
|
|
|
|
%build
|
2016-03-21 11:14:29 +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 \
|
2015-08-14 12:55:19 +02:00
|
|
|
--enable-tmpfiles.d=%{_tmpfilesdir} \
|
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:' \
|
2014-03-15 07:41:25 +01:00
|
|
|
--with-rundir=%{_localstatedir}/lib/sudo \
|
2015-11-06 13:38:32 +01:00
|
|
|
--with-sssd
|
2010-07-30 15:55:28 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-01-16 00:38:14 +01:00
|
|
|
|
|
|
|
%install
|
2014-10-16 08:00:36 +02:00
|
|
|
%make_install install_uid=`id -u` install_gid=`id -g`
|
2011-03-23 13:45:03 +01:00
|
|
|
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
|
2014-10-16 08:00:36 +02:00
|
|
|
|
2011-10-13 15:29:20 +02:00
|
|
|
%find_lang %{name}
|
|
|
|
%find_lang sudoers
|
|
|
|
cat sudoers.lang >> %{name}.lang
|
2014-02-02 19:13:19 +01:00
|
|
|
# tests
|
2015-11-06 13:38:32 +01:00
|
|
|
install -d -m 755 %{buildroot}%{_localstatedir}/lib/tests/sudo
|
|
|
|
install -m 755 %{SOURCE3} %{buildroot}%{_localstatedir}/lib/tests/sudo
|
|
|
|
install -m 755 %{SOURCE4} %{buildroot}%{_localstatedir}/lib/tests/sudo
|
2014-02-02 19:13:19 +01:00
|
|
|
install -d %{buildroot}%{_docdir}/%{name}-test
|
2014-05-15 19:33:09 +02:00
|
|
|
install -m 644 %{buildroot}%{_docdir}/%{name}/LICENSE %{buildroot}%{_docdir}/%{name}-test/LICENSE
|
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
|
2015-11-06 13:38:32 +01:00
|
|
|
%set_permissions %{_bindir}/sudo
|
2011-03-23 13:45:03 +01:00
|
|
|
%endif
|
2015-08-14 12:55:19 +02:00
|
|
|
%tmpfiles_create %{_tmpfilesdir}/sudo.conf
|
2011-03-23 13:45:03 +01:00
|
|
|
|
|
|
|
%verifyscript
|
2015-11-06 13:38:32 +01:00
|
|
|
%verify_permissions -e %{_bindir}/sudo
|
2007-01-26 23:12:53 +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}
|
2015-11-06 13:38:32 +01:00
|
|
|
%{_mandir}/man5/sudoers.5*
|
|
|
|
%{_mandir}/man5/sudo.conf.5*
|
|
|
|
%{_mandir}/man5/sudoers.ldap.5*
|
|
|
|
%{_mandir}/man8/sudo.8*
|
|
|
|
%{_mandir}/man8/sudoedit.8*
|
|
|
|
%{_mandir}/man8/sudoreplay.8*
|
|
|
|
%{_mandir}/man8/visudo.8*
|
2014-10-16 08:00:36 +02:00
|
|
|
|
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
|
2014-10-16 08:00:36 +02:00
|
|
|
%dir %{_libexecdir}/%{name}
|
|
|
|
%{_libexecdir}/%{name}/sesh
|
|
|
|
%{_libexecdir}/%{name}/sudo_noexec.so
|
|
|
|
%{_libexecdir}/%{name}/sudoers.so
|
|
|
|
%{_libexecdir}/%{name}/group_file.so
|
|
|
|
%{_libexecdir}/%{name}/system_group.so
|
|
|
|
%{_libexecdir}/%{name}/libsudo_util.so.*
|
|
|
|
%attr(0700,root,root) %dir %ghost %{_localstatedir}/lib/%{name}
|
2015-08-14 12:55:19 +02:00
|
|
|
%{_tmpfilesdir}/sudo.conf
|
|
|
|
%ghost %{_localstatedir}/lib/sudo/ts
|
2011-03-23 13:45:03 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2014-10-16 08:00:36 +02:00
|
|
|
%doc plugins/sample/sample_plugin.c
|
2011-03-23 13:45:03 +01:00
|
|
|
%{_includedir}/sudo_plugin.h
|
2014-10-16 08:00:36 +02:00
|
|
|
%{_mandir}/man8/sudo_plugin.8*
|
|
|
|
%attr(0644,root,root) %{_libexecdir}/%{name}/libsudo_util.so
|
|
|
|
%{_libexecdir}/%{name}/*.la
|
2007-12-06 01:36:36 +01:00
|
|
|
|
2014-02-02 19:13:19 +01:00
|
|
|
%files test
|
|
|
|
%defattr(-,root, root)
|
2015-11-06 13:38:32 +01:00
|
|
|
%{_localstatedir}/lib/tests
|
2014-02-02 19:13:19 +01:00
|
|
|
%{_docdir}/%{name}-test/
|
|
|
|
|
2007-07-18 23:01:14 +02:00
|
|
|
%changelog
|