[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to determine when being packaged under Debian?



Jeffrey Walton <noloader@gmail.com> writes:

> We have specific recommendations for packaging Crypto++ for distribution
> (cf., http://cryptopp.com/wiki/Config.h#Recommendations).  Soon to be
> released Crypto 5.6.3 introduces two new defines, and we feel distros
> should enable them by default. The defines are
> CRYPTOPP_NO_UNALIGNED_DATA_ACCESS and CRYPTOPP_INIT_PRIORITY.

> When being packaged for distribution, we want to fail the compile unless
> the defines are in effect. However, we only want it to apply to distros
> at this point (and not the general user community). We are not trying to
> be rude; rather we are trying to ensure the library is in the best state
> it can be to avoid problems on a mass scale.

> (In Crypto++ 6.0, they will be in effect, and this wrinkle will go
> away. But we can't make the breaking change on a patch-level revision
> bump).

> Is there a way I can detect when Debian is building the library for
> packaging and distribution? Crypto++ does not use Autotools, so we
> need to detect it in the Makefile or preprocessor.

We would really, really prefer that you not do this, and instead work with
whoever is packaging the library for Debian to add a test to the packaging
rules themselves to be sure that they're built correctly.

The reason for this is that Debian's packaging tools, by design, work
exactly the same way when run by an individual user to build a package for
their own personal purposes as when we use them to build packages for the
distribution.  This is in the spirit of open source: there shouldn't
really be anything special about Debian as a distribution that any
individual can also do.  But as a result, it's pretty hard to distinguish
between a Debian build and an individual build.

Also, I would question the assumption a bit: if this is important for
distributions, wouldn't it be important for all builds?

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: