Bug#644019: reglookup: Please package latest upstream (1.0.1)

Raphael Hertzog hertzog at debian.org
Fri Jun 5 19:13:21 UTC 2015


On Fri, 05 Jun 2015, Tim wrote:
> > * The library is not versioned, you need to have proper SONAME management
> >   for libraries packaged in Debian.
> >   https://wiki.debian.org/UpstreamGuide#Libraries
> >   (this is really important for us, only versioned libraries can be
> >   represented in the automatic library dependency mechanism)
> 
> I'll have to read up on this.  I'm somewhat fuzzy on how this stuff is
> normally handled.

I don't have a good reference either, but I just found this:
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN95

At least it gives you the command line to use to define the SONAME
of the library.

You want your library to have a SONAME of libregfi.so.1 installed in a
file of the same name (or with more digits: libregfi.so.1.0.0).
libregfi.so is a development symlink pointing to the current version of
the library (the one to use when you link with gcc -lregfi).

You can also read the Debian policy about libraries:
https://www.debian.org/doc/debian-policy/ch-sharedlibs.html

> > * SCons does not allow us to install files in a destination directory
> >   different from / (we use the DESTDIR variable for this)
> 
> I actually do have DESTDIR support.  Let me know if it isn't using the
> path appropriately.  Be sure to check the trunk version.  I'm not sure
> if the latest release has this.  In general, let's work off of the
> trunk until you're satisfied with my build script.

Hum, this was not in the 1.0.1 release. We tend to work with what's
officially released.

We'll take a look at the trunk...

> > * SCons is not standardized at all and thus debhelper has no support for
> >   it... which means that we can't benefit freely from stuff like multiarch
> >   support which requires us to install the libraries in an
> >   architecture-specific path.
> 
> What environment variables are used to specify architecture-specific
> paths?  If CC, CFLAGS, LDFLAGS and the like are all accepted properly,
> what else would you need for cross-compiling?

For multiarch support we install libraries in different path, for autoconf
packages, debhelper automatically feeds appropriate parameters. debhelper
doesn't support SCons because there's no standard parameters or target to
use...

Anyway, LIBDIR should be enough for our cases, we then have to setup
this variable to point to an architecture specific path.

/usr/lib/x86_64-linux-gnu for amd64, /usr/lib/i386-linux-gnu for i386 and
so on.

> > And also some things which could be improved:
> > 
> > * please rename "pyregfi-distutils.py" to "setup.py" so that it can be
> >   automatically detected by our build tools
> 
> Ok, I'll look into this.

That way we can rely on python packaging tools directly, but in that case,
it would be nice if we could disable the python part done by scons itself
too...

> > * don't call ldconfig (we do not run build process as root, the install
> >   step is run under fakeroot and any operation requiring real root rights
> >   will fail)
> 
> Does my uid check not work for you?

No, fakeroot lets you believe that you are root. But a good work-around is
to not call ldconfig at all when DESTDIR is non-empty.

$ fakeroot python
Python 2.7.10 (default, May 26 2015, 13:10:44) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getuid()
0

> Besides what you mentioned above, I see the guide mentions in passing
> a variety of other environment variables that should be accepted:
> 
>  "If you choose to use SCons anyway, please ensure that the usual
> environment compiler variables (CC, CFLAGS, ...) and path variables
> (DESTDIR, BINDIR, LIBDIR, ...) are honoured. There is a recipe, that
> addresses some of these."
> 
> It would be *great* of *all* environment variables were listed
> somewhere, instead of just a few and a hand wave... =P  Let me know if
> you have a more complete reference somewhere.

Possibly this:
https://www.gnu.org/software/autoconf/manual/autoconf.html#Environment-Variable-Index

There's no standard environment variable for installation directories
AFAIK. Only DESTDIR is sort of standardized...

BTW, the sample recipe linked from the guide can be found here:
https://web.archive.org/web/20141126004350/http://www.scons.org/wiki/Installer
(since the URL is currently down).

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/



More information about the forensics-devel mailing list