The Samba-Bugzilla – Attachment 8894 Details for
Bug 9774
Shared library conventions are not respected on OpenBSD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix issue
openbsd-shared-libs.patch (text/plain), 4.34 KB, created by
Vadim Zhukov
on 2013-05-16 14:35:11 UTC
(
hide
)
Description:
Patch to fix issue
Filename:
MIME Type:
Creator:
Vadim Zhukov
Created:
2013-05-16 14:35:11 UTC
Size:
4.34 KB
patch
obsolete
>Make Samba4 WAF respect OpenBSD shared libraries versioning conventions. >--- buildtools/wafsamba/samba_install.py.orig Tue May 14 15:17:30 2013 >+++ buildtools/wafsamba/samba_install.py Tue May 14 20:17:22 2013 >@@ -67,17 +67,20 @@ def install_library(self): > self.env.RPATH = build_ldflags > return > >+ target_name = self.target >+ >+ # OpenBSD-like library handling >+ osvnum = os.getenv('LIB' + target_name.replace('-', '_') + '_VERSION') >+ > # setup the install path, expanding variables > install_path = getattr(self, 'samba_inst_path', None) > if install_path is None: >- if getattr(self, 'private_library', False): >+ if getattr(self, 'private_library', False) and not osvnum: > install_path = '${PRIVATELIBDIR}' > else: > install_path = '${LIBDIR}' > install_path = bld.EXPAND_VARIABLES(install_path) > >- target_name = self.target >- > if install_ldflags != build_ldflags: > # we will be creating a new target name, and using that for the > # install link. That stops us from overwriting the existing build >@@ -103,23 +106,37 @@ def install_library(self): > if getattr(self, 'samba_realname', None): > install_name = self.samba_realname > install_link = None >- if getattr(self, 'soname', ''): >+ if osvnum: >+ if getattr(self, 'soname', ''): >+ osname = self.soname >+ else: >+ osname = install_name >+ osname = re.sub(r'(\.[0-9]+)+$', '', osname) + '.' + osvnum >+ # OpenBSD requires "lib" prefix for all versioned shared libraries >+ osname = re.sub(r'^(.*/|)(?:lib)?(([^l]|l[^i]|li[^b])[^/]+)$', r'\1lib\2', osname) >+ install_name = osname >+ if getattr(self, 'soname', ''): >+ self.soname = osname >+ elif getattr(self, 'soname', ''): > install_link = self.soname > if getattr(self, 'samba_type', None) == 'PYTHON': > inst_name = bld.make_libname(t.target, nolibprefix=True, python=True) > else: > inst_name = bld.make_libname(t.target) > elif self.vnum: >- vnum_base = self.vnum.split('.')[0] >- install_name = bld.make_libname(target_name, version=self.vnum) >- install_link = bld.make_libname(target_name, version=vnum_base) >+ install_link = None >+ if osvnum: >+ install_name = bld.make_libname(target_name, version=osvnum) >+ else: >+ install_name = bld.make_libname(target_name, version=self.vnum) >+ vnum_base = self.vnum.split('.')[0] > inst_name = bld.make_libname(t.target) >- if not self.private_library: >+ if not self.private_library and not osvnum: > # only generate the dev link for non-bundled libs > dev_link = bld.make_libname(target_name) > elif getattr(self, 'soname', ''): > install_name = bld.make_libname(target_name) >- install_link = self.soname >+ install_link = None > inst_name = bld.make_libname(t.target) > else: > install_name = bld.make_libname(target_name) >--- buildtools/wafsamba/wafsamba.py.orig Tue May 14 15:17:30 2013 >+++ buildtools/wafsamba/wafsamba.py Tue May 14 20:16:50 2013 >@@ -192,6 +192,13 @@ def SAMBA_LIBRARY(bld, libname, source, > deps = TO_LIST(deps) > deps.append(obj_target) > >+ osvnum = os.getenv('LIB' + libname.replace('-', '_') + '_VERSION') >+ if osvnum: >+ vnum = osvnum >+ if realname: realname = re.sub(r'(\.[0-9]+)+$', '.' + osvnum, realname) >+ if link_name: link_name = re.sub(r'(\.[0-9]+)+$', '.' + osvnum, link_name) >+ if soname: soname = re.sub(r'(\.[0-9]+)+$', '.' + osvnum, soname) >+ > realname = bld.map_shlib_extension(realname, python=(target_type=='PYTHON')) > link_name = bld.map_shlib_extension(link_name, python=(target_type=='PYTHON')) > >--- source4/heimdal_build/wscript_build.orig Tue May 14 15:17:46 2013 >+++ source4/heimdal_build/wscript_build Tue May 14 20:17:58 2013 >@@ -243,6 +243,11 @@ def HEIMDAL_LIBRARY(libname, source, deps, vnum, versi > > features = 'cc cshlib symlink_lib install_lib' > >+ # OpenBSD-like error handling >+ osvnum = os.getenv('LIB' + bundled_name.replace('-', '_') + '_VERSION') >+ if osvnum: >+ vnum = osvnum >+ > bld.set_group('libraries') > t = bld( > features = features,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9774
:
8894
|
8902