Hello community,

here is the log from the commit of package sudo for openSUSE:Factory checked in 
at 2014-02-03 11:40:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sudo (Old)
 and      /work/SRC/openSUSE:Factory/.sudo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sudo"

Changes:
--------
--- /work/SRC/openSUSE:Factory/sudo/sudo.changes        2014-01-30 
06:55:48.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.sudo.new/sudo.changes   2014-02-03 
11:40:48.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Jan 30 12:12:28 UTC 2014 - [email protected]
+
+- added subpackage with a test for fate#313276
+
+-------------------------------------------------------------------

New:
----
  README_313276.test
  fate_313276_test.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sudo.spec ++++++
--- /var/tmp/diff_new_pack.2VvTsh/_old  2014-02-03 11:40:49.000000000 +0100
+++ /var/tmp/diff_new_pack.2VvTsh/_new  2014-02-03 11:40:49.000000000 +0100
@@ -26,6 +26,8 @@
 Source0:        http://sudo.ws/sudo/dist/%{name}-%{version}.tar.gz
 Source1:        sudo.pamd
 Source2:        README.SUSE
+Source3:        fate_313276_test.sh
+Source4:        README_313276.test
 Patch0:         sudoers2ldif-env.patch
 # PATCH-OPENSUSE: the "SUSE" branding of the default sudo config
 Patch1:         sudo-sudoers.patch
@@ -56,6 +58,14 @@
 %description devel
 These header files are needed for building of sudo plugins.
 
+%package test
+Summary:        Tests for the package
+Group:          Development/Tests
+Requires:       %{name} = %{version}
+
+%description test
+Tests for fate#313276
+
 %prep
 %setup -q
 %patch0 -p1 
@@ -110,6 +120,12 @@
 %find_lang %{name}
 %find_lang sudoers
 cat sudoers.lang >> %{name}.lang
+# tests
+install -d -m 755 %{buildroot}/var/lib/tests/sudo
+install -m 755 %{SOURCE3} %{buildroot}/var/lib/tests/sudo
+install -m 755 %{SOURCE4} %{buildroot}/var/lib/tests/sudo
+install -d %{buildroot}%{_docdir}/%{name}-test
+install -m 755 %{buildroot}%{_docdir}/%{name}/LICENSE 
%{buildroot}%{_docdir}/%{name}-test/LICENSE
 
 %post
 chmod 0440 %{_sysconfdir}/sudoers
@@ -122,9 +138,6 @@
 %verifyscript
 %verify_permissions -e /usr/bin/sudo
 
-%clean
-rm -rf %{buildroot}
-
 %files -f %{name}.lang
 %defattr(-,root,root)
 %doc %{_docdir}/%{name}
@@ -147,4 +160,9 @@
 %defattr(-,root,root)
 %{_includedir}/sudo_plugin.h
 
+%files test
+%defattr(-,root, root)
+/var/lib/tests
+%{_docdir}/%{name}-test/
+
 %changelog

++++++ README_313276.test ++++++
To verify that sudo works with SSSD,
there's has to be a working LDAP server where the sudoers file
will be saved, local running SSSD and sudo configured to use
the SSSD plugin.

The sudoers file has to be stored in LDAP.
A [sudo] service has to be configured in /etc/sssd/sssd.conf
Sudo needs to be instructed to use SSSD, this is done in /etc/nsswitch.conf,
by adding a line "sudoers: files sss"

Related material:

/usr/share/doc/packages/sudo/README.LDAP provides a guide how to
make sudo work with LDAP.

man sudoers.ldap(5) describes the LDAP-based sudoers file

man sssd-ldap(5) describes the LDAP sudo options.

++++++ fate_313276_test.sh ++++++
#!/bin/sh

if [ $(id -u) -ne 0 ]; then
        printf "Please run the test as root.\n"
        exit 1
fi

if sudo -V | grep -q -- --with-sssd; then
        printf "OK: Sudo has support for SSSD compiled in.\n"
        exit 0
fi

printf "Error: SSSD support isn't compiled in.\n"
exit 1
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to