From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Extra files in build container Date: Mon, 19 Jun 2017 16:49:43 +0200 Message-ID: <87poe0uj5k.fsf@gnu.org> References: <20170615072917.4ogzt24ginrkgqx3@zaehlwerk.net> <87y3ssicsg.fsf@gnu.org> <20170617065848.cfevrq6bpgsa2vlt@zaehlwerk.net> <87r2ygz09e.fsf@gnu.org> <8c45d3ef-26d9-5818-69e9-c342c243c9e6@zaehlwerk.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMxzy-0004vJ-Ts for help-guix@gnu.org; Mon, 19 Jun 2017 10:49:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMxzt-00070O-VG for help-guix@gnu.org; Mon, 19 Jun 2017 10:49:50 -0400 In-Reply-To: <8c45d3ef-26d9-5818-69e9-c342c243c9e6@zaehlwerk.net> (Gregor Giesen's message of "Mon, 19 Jun 2017 13:44:40 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Gregor Giesen Cc: help-guix@gnu.org Hello, Gregor Giesen skribis: > On Mon, Jun 19, 2017 at 13:26AM +0200 Ludovic Court=C3=A8s wrote: >>> On Fri, Jun 16, 2017 at 09:58:55AM +0200, Ludovic Court=C3=A8s wrote: >>>> In cases like the one you describe, we usually end up modifying tests = to >>>> use the numerical values for services and protocols rather than their >>>> names. >>> Unfortunately, this turns out to be quite cumbersome since in my case >>> (unittests for unbound) there is a lot of test data to be modified and >>> in many cases not only plain text but also encrypted records (DNSSEC >>> tests). On the other hand the values to be looked up are mostly =E2=80= =9Cudp=E2=80=9D >>> and =E2=80=9Ctcp=E2=80=9D in /etc/protocols and =E2=80=9Cdomain=E2=80= =9D in /etc/services, so I decided >>> that using a preload library for these few glibc calls just in case of >>> the unittest should do the trick rather than no checks at all. >> >> I think it would be easier to just use =E2=80=98substitute*=E2=80=99 to = replace all the >> occurrences of =E2=80=9Ctcp=E2=80=9D, etc., wouldn=E2=80=99t it? > alas many occurences of "tcp", "udp", etc. are hidden in > encrypted/hashed records, so simple plain text substitutions would > break the signatures. Yes, I can imagine. But maybe (maybe not!), by selecting the right set of files to modify, and by adjusting the regexp (let=E2=80=99s say =E2=80= =9C\=E2=80=9D or =E2=80=9C"tcp"=E2=80=9D) to match only what matters, it could work. If that=E2=80=99s really not workable, then the LD_PRELOAD approach is fine. >>> However, it is an ugly hack and bloats the package definition. >> I agree, but it=E2=80=99s hard to improve on it without compromising >> reproducibility. > It's a good thing that the hack only affects the tests rather than any > installation files. > > I have submitted the package in a patch yesterday (27419). I wonder > whether one might want to put the source code of the preload library > in an extra file rather than the package definition? Since it=E2=80=99s small I think it=E2=80=99s OK as inline code. Thanks, Ludo=E2=80=99.