diff --git a/samba-4.2.12-smbspool_krb5_install_path.patch b/samba-4.2.12-smbspool_krb5_install_path.patch new file mode 100644 index 0000000..a24b8c7 --- /dev/null +++ b/samba-4.2.12-smbspool_krb5_install_path.patch @@ -0,0 +1,29 @@ +From b504918372df0a55585c92da445f4e1fba4af04a Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 12 Feb 2016 08:46:10 +0100 +Subject: [PATCH] s3-waf: Install smbspool_krb5_wrapper in LIBEXECDIR + +Signed-off-by: Andreas Schneider +Reviewed-by: Martin Schwenke + +Autobuild-User(master): Martin Schwenke +Autobuild-Date(master): Sat Feb 13 00:41:33 CET 2016 on sn-devel-144 +--- + source3/wscript_build | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/source3/wscript_build b/source3/wscript_build +index 0c7dfc2..6f47c35 100755 +--- a/source3/wscript_build ++++ b/source3/wscript_build +@@ -1191,6 +1191,7 @@ bld.SAMBA3_BINARY('smbspool_krb5_wrapper', + DYNCONFIG + cups + ''', ++ install_path='${LIBEXECDIR}/samba', + enabled=bld.CONFIG_SET('HAVE_CUPS')) + + bld.SAMBA3_BINARY('testparm', +-- +2.5.5 + diff --git a/samba.spec b/samba.spec index b17819f..a925b9e 100644 --- a/samba.spec +++ b/samba.spec @@ -111,6 +111,7 @@ Source201: README.downgrade Patch0: samba-4.2.10-s3-winbind-make-sure-domain-member-can-talk-to-trust.patch Patch1: samba-4.2.10-s3-parm-clean-up-defaults-when-removing-global-param.patch +Patch2: samba-4.2.12-smbspool_krb5_install_path.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -362,6 +363,20 @@ Provides: samba-glusterfs Samba VFS module for GlusterFS integration. %endif +### KRB5-PRINTING +%package krb5-printing +Summary: Samba CUPS backend for printing with Kerberos +Group: Applications/System +Requires(pre): %{name}-client + +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives + +%description krb5-printing +If you need Kerberos for print jobs to a printer connection to cups via the SMB +backend, then you need to install that package. It will allow cups to access +the Kerberos credentials cache of the user issuing the print job. + ### LIBS %package libs Summary: Samba libraries @@ -649,6 +664,7 @@ and use CTDB instead. %patch0 -p 1 -b .samba-4.2.10-s3-winbind-make-sure-domain-member-can-talk-to-trust.patch %patch1 -p 1 -b .samba-4.2.10-s3-parm-clean-up-defaults-when-removing-global-param.patch +%patch2 -p 1 -b .samba-4.2.12-smbspool_krb5_install_path.patch %build %global _talloc_lib ,talloc,pytalloc,pytalloc-util @@ -856,12 +872,32 @@ fi %postun common -p /sbin/ldconfig +%post client +%{_sbindir}/update-alternatives --install %{_libexecdir}/samba/cups_backend_smb \ + cups_backend_smb \ + %{_bindir}/smbspool 10 + +%postun client +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove cups_backend_smb %{_libexecdir}/samba/smbspool +fi + %if %with_dc %post dc-libs -p /sbin/ldconfig %postun dc-libs -p /sbin/ldconfig %endif # with_dc +%post krb5-printing +%{_sbindir}/update-alternatives --install %{_libexecdir}/samba/cups_backend_smb \ + cups_backend_smb \ + %{_libexecdir}/samba/smbspool_krb5_wrapper 50 + +%postun krb5-printing +if [ $1 -eq 0 ] ; then + %{_sbindir}/update-alternatives --remove cups_backend_smb %{_libexecdir}/samba/smbspool_krb5_wrapper +fi + %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig @@ -1650,6 +1686,12 @@ rm -rf %{buildroot} %{_mandir}/man8/vfs_glusterfs.8* %endif +### KRB5-PRINTING +%files krb5-printing +%defattr(-,root,root) +%attr(0700,root,root) %{_libexecdir}/samba/smbspool_krb5_wrapper +%{_mandir}/man8/smbspool_krb5_wrapper.8* + ### LIBS %files libs %defattr(-,root,root)