Browse Source

samba4: add libreadline dep, cleanup old patches

* add missing libreadline dep
* remove old patches

Signed-off-by: Andy Walsh <andy.walsh44+github@gmail.com>
lilik-openwrt-22.03
Andy Walsh 5 years ago
parent
commit
c37eda5f28
5 changed files with 2 additions and 79 deletions
  1. +2
    -2
      net/samba4/Makefile
  2. +0
    -56
      net/samba4/patches/100-do-not-import-target-module-while-cross-compile.patch
  3. +0
    -21
      net/samba4/patches/102-samba-4.8.2-unbundle-libreadline.patch
  4. +0
    -0
      net/samba4/patches/102-samba-4.8.5-unbundle-libbsd.patch
  5. +0
    -0
      net/samba4/patches/103-tmsize-overflow-fix.patch

+ 2
- 2
net/samba4/Makefile View File

@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=samba
PKG_VERSION:=4.10.6
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-3.0-only
@ -58,7 +58,7 @@ endef
define Package/samba4-libs
$(call Package/samba4/Default)
TITLE+= libs
DEPENDS:= +zlib +libtirpc +libpopt +libcomerr +libtasn1 +libopenssl \
DEPENDS:= +zlib +libtirpc +libpopt +libcomerr +libtasn1 +libopenssl +libreadline \
+PACKAGE_libcap:libcap +PACKAGE_libpthread:libpthread +PACKAGE_libnettle:libnettle \
+PACKAGE_libgcrypt:libgcrypt +PACKAGE_libpam:libpam +PACKAGE_dbus:dbus +PACKAGE_libavahi-client:libavahi-client \
+SAMBA4_SERVER_VFS:attr \


+ 0
- 56
net/samba4/patches/100-do-not-import-target-module-while-cross-compile.patch View File

@ -1,56 +0,0 @@
Some modules such as dynamic library maybe cann't be imported while cross compile,
we just check whether does the module exist.
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -2,6 +2,7 @@
import sys
from waflib import Build, Options, Logs
+import imp, os
from waflib.Configure import conf
from wafsamba import samba_utils
@@ -249,17 +250,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, li
# versions
minversion = minimum_library_version(conf, libname, minversion)
- try:
- m = __import__(modulename)
- except ImportError:
- found = False
- else:
+ # Find module in PYTHONPATH
+ stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]])
+ if stuff:
try:
- version = m.__version__
- except AttributeError:
+ m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2])
+ except ImportError:
found = False
+
+ if conf.env.CROSS_COMPILE:
+ # Some modules such as dynamic library maybe cann't be imported
+ # while cross compile, we just check whether the module exist
+ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1]))
+ found = True
else:
- found = tuplize_version(version) >= tuplize_version(minversion)
+ try:
+ version = m.__version__
+ except AttributeError:
+ found = False
+ else:
+ found = tuplize_version(version) >= tuplize_version(minversion)
+ finally:
+ if stuff[0]:
+ stuff[0].close()
+ else:
+ found = False
+
if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
sys.exit(1)

+ 0
- 21
net/samba4/patches/102-samba-4.8.2-unbundle-libreadline.patch View File

@ -1,21 +0,0 @@
--- a/libcli/smbreadline/wscript_configure
+++ b/libcli/smbreadline/wscript_configure
@@ -1,11 +1,13 @@
#!/usr/bin/env python
-conf.CHECK_HEADERS('readline.h history.h readline/readline.h readline/history.h')
-for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']:
- if conf.CHECK_FUNCS_IN('tgetent', termlib):
- conf.env['READLINE_TERMLIB'] = termlib
- break
+#conf.CHECK_HEADERS('readline.h history.h readline/readline.h readline/history.h')
+#for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']:
+# if conf.CHECK_FUNCS_IN('tgetent', termlib):
+# conf.env['READLINE_TERMLIB'] = termlib
+# break
+
+conf.undefine('HAVE_READLINE_READLINE_H')
#
# Check if we need to work around readline/readline.h

net/samba4/patches/103-samba-4.8.5-unbundle-libbsd.patch → net/samba4/patches/102-samba-4.8.5-unbundle-libbsd.patch View File


net/samba4/patches/104-tmsize-overflow-fix.patch → net/samba4/patches/103-tmsize-overflow-fix.patch View File


Loading…
Cancel
Save