Control: tag -1 + patch

Hi,

On Fri, 05 Jun 2015, Eriberto Mota wrote:
> I can update reglookup. However, I need 10 days, because I am
> traveling now and I can't use my GPG key.

You can now base your work on this updated package:
http://http.kali.org/pool/main/r/reglookup/reglookup_1.0.1+svn282-0kali2.dsc

On Mon, 08 Jun 2015, Raphael Hertzog wrote:
> we just tried the trunk. It's better but there are still multiple
> problems:
> - LDFLAGS is not used when you link the executables (it's only used when
>   you link libregfi)
> - the default value for LDFLAGS is wrong, "-z relro" is an option for "ld" but
>   when you pass it through gcc you need "-Wl,-z,relro" 
> - I saw you tried to hack up some code to setup the SONAME... it does set
>   the SONAME on the library but the library is still installed under the
>   wrong name (libregfi.so instead of the name set in the SONAME)
> - the SONAME must not encode the full version... it's only a simple
>   counter of API/ABI compatibility. Please use "libregfi.so.0" as
>   the first SONAME (and then bump to libregfi.so.1 when you break
>   the ABI/API, etc.) (and 99.99.99.X looks really wrong as a version number 
> :))

Tim, I hope you can fix those issues quickly now that we have identified
how to properly handle versioned libraries and that you can make a new
release.

For reference, we only have the attached two patches in use in Kali.
One to disable the build of the python module (we do it ourselves
in debian/rules) and one to use a proper versioned library.

> While lookinto in Scons support for versioned shared library I found this:
> http://stackoverflow.com/questions/2997001/how-to-get-shared-library-names-like-libhello-so-0-0-1-with-scons
> 
> http://www.scons.org/doc/production/HTML/scons-user/apb.html#b-SharedLibrary

The attached patches make use of that.

> but does not seem
> to make any difference between the version used in the filename (ideally
> libfoo.so.X.Y.Z) and the SONAME which is usually simpler (libfoo.so.X and
> which is the reason why the symlinks libfoo.so.X are needed when you
> install the library as libfoo.so.X.Y.Z). I would thus suggest to pass a
> single integer to SHLIBVERSION and not care about having a filename
> encoding the full version.
> 
> full version filename and the SONAME

That part of my last message was not supposed to be there. It's some
random text left from an initial draft that assumed that upstream support
was not working like I expected it.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/
Description: add version to shared library liregfi
 Update SConstruct file to manage the version for the shared library
 libregfi.
Author: Sophie Brun <sop...@freexian.com>
Origin: vendor
Last-Update: 2015-06-09
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/SConstruct
+++ b/SConstruct
@@ -9,10 +9,9 @@ cflags = '-std=gnu99 -pedantic -Wall -D_
 cflags += ' -DREGFI_VERSION=\'"%s"\' ' % REGFI_VERSION
 cflags += os.environ.get('CFLAGS','-fPIE -pie -fstack-protector -D_FORTIFY_SOURCE=2')
 
-linkflags = "-shared -fPIC -Wl,-soname,libregfi.so.%s " % REGFI_VERSION
+linkflags = "-shared -fPIC "
 linkflags += os.environ.get('LDFLAGS','-z relro -z now')
 
-
 lib_src = ['lib/regfi.c',
            'lib/winsec.c',
            'lib/range_list.c',
@@ -31,7 +30,7 @@ env = Environment(ENV=os.environ,
 # Libraries
 libregfi_static = env.Library(lib_src)
 libregfi = env.SharedLibrary(lib_src, LIBS=['m','pthread', 'talloc'], 
-                             LINKFLAGS=linkflags)
+                             SHLIBVERSION = '0.0.0', LINKFLAGS=linkflags)
 
 
 # Executables
@@ -64,7 +63,7 @@ install_bin = [destdir + bindir, destdir
 install_lib = [destdir + libdir, destdir + includedir + '/regfi']
 
 env.Install(destdir+bindir, [reglookup, reglookup_recover, 'bin/reglookup-timeline'])
-libinstall = env.Install(destdir+libdir, [libregfi, libregfi_static])
+libinstall = env.InstallVersionedLib(destdir+libdir, [libregfi, libregfi_static], SHLIBVERSION='0.0.0')
 env.Install(destdir+includedir+'/regfi', Glob('include/*.h'))
 env.Install(destdir+mandir+'/man1', [man_reglookup, man_reglookup_recover,
                                      man_reglookup_timeline])
Description: drop python packages build and install by scons 
 Do not use scons for the python packages build and install. Use dh-python
 (pybuild) and the setup.py provided by upstream to build automatically the
 packages python and python3
Author: Sophie Brun <sop...@freexian.com>
Origin: vendor
Last-Update: 2015-06-09
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/SConstruct
+++ b/SConstruct
@@ -72,22 +72,6 @@ env.Install(destdir+mandir+'/man1', [man
 if os.getuid() == 0 and destdir == '':
    env.AddPostAction(libinstall, 'ldconfig')
 
-install_pyregfi = []
-if sys.version_info[0] == 2:
-   install_pyregfi.append('pyregfi2-install.log')
-   env.Command('pyregfi2-install.log', ['python/pyregfi/__init__.py', 
-                                        'python/pyregfi/structures.py', 
-                                        'python/pyregfi/winsec.py'],
-               "python setup.py install --root=/%s | tee pyregfi2-install.log" % destdir)
-
-python_path = os.popen('which python3').read()
-if python_path != '':
-   install_pyregfi.append('pyregfi3-install.log')
-   env.Command('pyregfi3-install.log', ['python/pyregfi/__init__.py', 
-                                        'python/pyregfi/structures.py', 
-                                        'python/pyregfi/winsec.py'], 
-               "python3 setup.py install --root=/%s | tee pyregfi3-install.log" % destdir)
-
 
 # API documentation
 regfi_doc = env.Command('doc/devel/regfi/index.html', 
@@ -97,7 +81,7 @@ pyregfi_doc = env.Command('doc/devel/pyr
                           Glob('python/pyregfi/*.py')+['doc/devel/Doxyfile.pyregfi', regfi_doc],
                           'doxygen doc/devel/Doxyfile.pyregfi')
 
-install_items = install_bin + install_lib + install_pyregfi
+install_items = install_bin + install_lib
 
 # User Friendly Targets
 env.Alias('libregfi', libregfi)
@@ -108,7 +92,6 @@ env.Alias('doc', [man_reglookup,man_regl
 env.Alias('doc-devel', [regfi_doc, pyregfi_doc])
 env.Alias('install_bin', install_bin)
 env.Alias('install_lib', install_lib)
-env.Alias('install_pyregfi', install_pyregfi)
 env.Alias('install', install_items)
 
 Default('bin', libregfi)

Reply via email to