From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Re: Invalid nar signature Date: Sun, 14 Dec 2014 21:33:42 -0500 Message-ID: <87wq5tej5l.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> References: <87zjapejo3.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0LTl-0003Ps-Dx for guix-devel@gnu.org; Sun, 14 Dec 2014 21:33:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0LTk-0000z2-IX for guix-devel@gnu.org; Sun, 14 Dec 2014 21:33:45 -0500 Received: from mail.fsf.org ([208.118.235.13]:53542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0LTk-0000yy-FE for guix-devel@gnu.org; Sun, 14 Dec 2014 21:33:44 -0500 Received: from 209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.40.86]:33141 helo=izanagi) by mail.fsf.org with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1Y0LTj-0003vR-Kl for guix-devel@gnu.org; Sun, 14 Dec 2014 21:33:43 -0500 In-Reply-To: <87zjapejo3.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org David Thompson writes: > The output of the following code in the context of the > (guix serialization) module is "\r", it should be "nix-archive-1": > > (with-input-from-file "some-nar-file" > (lambda () > (read-string (current-input-port)))) Also, note that the following code *does* yield "nix-archive-1": (with-input-from-file "some-nar-file" (lambda () (read-int (current-input-port)) (read-string (current-input-port)))) So, if I remove the first 8 bytes of the file (which when read as an integer is 1), things look good. What's going on here? -- David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate