[packages/samba] - up to 4.1.13; use internal setproctitle replacement (+ patch from bugreport 9816). TODO: use exter
arekm
arekm at pld-linux.org
Tue Oct 28 22:38:00 CET 2014
commit cc54fa40db74a93db34566d5d5859468369eb60d
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Oct 28 22:37:53 2014 +0100
- up to 4.1.13; use internal setproctitle replacement (+ patch from bugreport 9816). TODO: use external setproctitle library (+ fix linking)
link.patch | 5 +--
samba-bug-9816.patch | 65 +++++++++++++++++++++++++++++++++++++++
samba-lprng-no-dot-printers.patch | 4 +--
samba.spec | 7 +++--
4 files changed, 75 insertions(+), 6 deletions(-)
---
diff --git a/samba.spec b/samba.spec
index 6de5061..438da11 100644
--- a/samba.spec
+++ b/samba.spec
@@ -22,13 +22,13 @@
Summary: Samba Active Directory and SMB server
Summary(pl.UTF-8): Serwer Samba Active Directory i SMB
Name: samba
-Version: 4.1.11
+Version: 4.1.13
Release: 1
Epoch: 1
License: GPL v3
Group: Networking/Daemons
Source0: http://www.samba.org/ftp/samba/samba-%{version}.tar.gz
-# Source0-md5: d7377e7247ad16f6b15363727b91b761
+# Source0-md5: 7ed2d4a181e55baa995eb8b58a9ad293
Source1: smb.init
Source2: samba.pamd
Source4: samba.sysconfig
@@ -46,6 +46,7 @@ Patch3: systemd-pid-dir.patch
Patch4: unicodePwd-nthash-values-over-LDAP.patch
Patch5: link.patch
Patch6: server-role.patch
+Patch7: %{name}-bug-9816.patch
URL: http://www.samba.org/
BuildRequires: acl-devel
%{?with_avahi:BuildRequires: avahi-devel}
@@ -497,6 +498,7 @@ Ten pakiet zawiera schemat Samby (samba.schema) dla OpenLDAP-a.
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
%{__sed} -i -e 's|#!/usr/bin/env python|#!/usr/bin/python|' source4/scripting/bin/samba*
%{__sed} -i -e 's|#!/usr/bin/env perl|#!/usr/bin/perl|' pidl/pidl
@@ -783,6 +785,7 @@ fi
%attr(755,root,root) %{_sbindir}/samba_spnupdate
%attr(755,root,root) %{_sbindir}/samba_upgradedns
%attr(755,root,root) %{_sbindir}/smbd
+%attr(755,root,root) %{_libdir}/samba/libdnsserver_common.so
%dir %{_libdir}/samba/bind9
%attr(755,root,root) %{_libdir}/samba/bind9/dlz_bind9.so
%attr(755,root,root) %{_libdir}/samba/bind9/dlz_bind9_9.so
diff --git a/link.patch b/link.patch
index 6286dcb..8ce3895 100644
--- a/link.patch
+++ b/link.patch
@@ -1,11 +1,12 @@
--- samba-4.1.8/lib/util/wscript_build.orig 2014-06-04 19:40:22.052755047 +0200
+++ samba-4.1.8/lib/util/wscript_build 2014-06-04 19:41:57.692753054 +0200
-@@ -9,7 +9,7 @@
+@@ -9,7 +9,7 @@ bld.SAMBA_LIBRARY('samba-util',
util_str.c util_str_common.c substitute.c ms_fnmatch.c
server_id.c dprintf.c parmlist.c bitmap.c pidfile.c
- tevent_debug.c util_process.c''',
+ tevent_debug.c util_process.c memcache.c''',
- deps='DYNCONFIG',
+ deps='DYNCONFIG ccan-hash',
public_deps='talloc tevent execinfo uid_wrapper pthread LIBCRYPTO charset util_setid systemd-daemon',
public_headers='debug.h attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h samba_util.h string_wrappers.h',
header_path= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ],
+
diff --git a/samba-bug-9816.patch b/samba-bug-9816.patch
new file mode 100644
index 0000000..5f674e0
--- /dev/null
+++ b/samba-bug-9816.patch
@@ -0,0 +1,65 @@
+From 4a8707f25a8825c90987ed25906d5dfd5288aaf9 Mon Sep 17 00:00:00 2001
+From: Sam Liddicott <sam at liddicott.com>
+Date: Fri, 19 Apr 2013 11:04:55 +0100
+Subject: [PATCH] Support setproctitle on linux with prctl(PR_SET_NAME
+
+Only the first 16 characters of the title are used on Linux systems
+so the most relevant data should be presented at the start of the
+title
+
+Signed-off-by: Sam Liddicott <sam at liddicott.com>
+---
+ lib/replace/replace.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/lib/replace/replace.c b/lib/replace/replace.c
+index 37edb31..00abad8 100644
+--- a/lib/replace/replace.c
++++ b/lib/replace/replace.c
+@@ -33,6 +33,11 @@
+ #include "system/locale.h"
+ #include "system/wait.h"
+
++/* Linux replacement for setproctitle */
++#if ! defined(HAVE_SETPROCTITLE) && defined(HAVE_SYS_PRCTL_H) && defined(HAVE_PRCTL)
++#include <sys/prctl.h>
++#endif
++
+ #ifdef _WIN32
+ #define mkdir(d,m) _mkdir(d)
+ #endif
+@@ -898,5 +903,19 @@ int rep_usleep(useconds_t sec)
+ #ifndef HAVE_SETPROCTITLE
+ void rep_setproctitle(const char *fmt, ...)
+ {
++#if defined (HAVE_PRCTL) && defined(PR_SET_NAME)
++ char *title = NULL;
++ va_list args;
++
++ if (fmt) {
++ va_start(args, fmt);
++ vasprintf(&title, fmt, args);
++ prctl(PR_SET_NAME, (unsigned long)title, 0, 0, 0);
++ free(title);
++ va_end(args);
++ } else {
++ prctl(PR_SET_NAME, 0, 0, 0, 0);
++ }
++#endif
+ }
+ #endif
+--
+1.7.10.4
+
+--- a/lib/replace/wscript~ 2014-09-08 11:26:14.000000000 +0200
++++ b/lib/replace/wscript 2014-10-28 22:05:54.003836383 +0100
+@@ -284,8 +284,7 @@ struct foo bar = { .y = 'X', .x = 1 };
+ checklibc=True)
+ if not conf.CHECK_FUNCS('getpeereid'):
+ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
++ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
diff --git a/samba-lprng-no-dot-printers.patch b/samba-lprng-no-dot-printers.patch
index 651b50b..5b147a7 100644
--- a/samba-lprng-no-dot-printers.patch
+++ b/samba-lprng-no-dot-printers.patch
@@ -15,10 +15,10 @@ diff -ur samba-3.0.26a/source3/param/loadparm.c samba-3.0.26a-lprng/source3/para
********************************************************************/
--- samba-3.6.0/source3/printing/print_standard.c~ 2011-08-09 13:17:47.000000000 +0200
+++ samba-3.6.0/source3/printing/print_standard.c 2011-10-17 21:15:15.693523176 +0200
-@@ -63,6 +64,7 @@
- {
+@@ -64,6 +64,7 @@ bool std_pcap_cache_reload(const char *p
XFILE *pcap_file;
char *pcap_line;
+ struct pcap_cache *pcache = NULL;
+ enum printing_types printing = lp_defaultprinting();
if ((pcap_file = x_fopen(pcap_name, O_RDONLY, 0)) == NULL) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/samba.git/commitdiff/cc54fa40db74a93db34566d5d5859468369eb60d
More information about the pld-cvs-commit
mailing list