Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101356 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97162 invoked from network); 15 Dec 2017 10:13:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Dec 2017 10:13:50 -0000 Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 74.125.82.52 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 74.125.82.52 mail-wm0-f52.google.com Received: from [74.125.82.52] ([74.125.82.52:41365] helo=mail-wm0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/B4-18007-C50A33A5 for ; Fri, 15 Dec 2017 05:13:50 -0500 Received: by mail-wm0-f52.google.com with SMTP id g75so16507075wme.0 for ; Fri, 15 Dec 2017 02:13:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seld-be.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=s6uddK8tp9FgHp49iYA4/urHUSu95VrDTsqq/4eE9Lc=; b=UwGgltqZNQyHJzbKqkNsnmWaYFxXYv6xHO8Xmd7QiV79m1KnOdWRLIe8Z3Oiuc2i+e oJSpWoCKNzsyaY62JvXEveftQhGvP7NBGQV5j8S0p/I9yd83suEGSdZKkX/9/L0jx88r Oh7YZt0Z4cGALBTwHTTXVVvIjjEh1mn1HxRhdtMtcgvK+c4M6PUFY153hzM21FJ8/Ws2 DDfgEShtViewEYBQ+zJrcD21EogL562GJsZ55spXQBvr+qHkgFqNB7FPDUkLbh2gD5Al jwOmldt1jsYL8k1pIi0XMLWgLqL/YE90Mb4QHotioxKNjk+W9feRig0cOdo84LZG5kmp O0IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=s6uddK8tp9FgHp49iYA4/urHUSu95VrDTsqq/4eE9Lc=; b=K0EBwGRvJSOKK0VXHEoeQgxDV3wYOt/K10Jw4Z2Cy1+ccUfz0d/Iay4AfQCjEoS+RD kl2k29PQo4mf/B7qTlftyeW1MYw4HUlsjcFrLo8k9kiyUGB9oiB895fHpYC+ojl5uGte Ltr3Mcdeyr88HCWyu8sgQyxmd/2j5Ndj3UDqq1lkGcxX+IkbVt0mInee+7a490zTYJ5q 4JjXtR+7Eato3bTpPEjgUvksxyPGYtJ9EUfA1hDBFbLL3fwlXaKmG2GL+7aZNT5PvP32 RlRVh1/qjYHcFMhgJ1XqGDwKSwCx1eF8z7IIAK0BDZL+MxkazjojcrB15/WqtkpLBgyr BsSA== X-Gm-Message-State: AKGB3mJjF7/v+IsvtznC4A9wwDkA63/ePcSbZ5UfwUedO55QoC8lhbwb 20kPx69jR4kaSNzl4yO0G8OrnbmzvTE= X-Google-Smtp-Source: ACJfBovnl4mg8w/76ot2a4Ls8/D0dtw42KjxegDHtcOQT2A9FHeSq6CVimju3Tkmjeu0XmY7P0oyzQ== X-Received: by 10.80.148.10 with SMTP id p10mr16573601eda.250.1513332825335; Fri, 15 Dec 2017 02:13:45 -0800 (PST) Received: from ?IPv6:2a02:168:4a47:0:bd8a:e483:191:658? ([2a02:168:4a47:0:bd8a:e483:191:658]) by smtp.googlemail.com with ESMTPSA id s14sm4948106eds.78.2017.12.15.02.13.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 02:13:44 -0800 (PST) To: internals@lists.php.net References: <20171211211157.d7lj5vibpaaka4ji@gmail.com> <20171214090209.7in22vsbrjaxvsxe@gmail.com> Message-ID: <0f6e70ad-0b4e-6917-963c-8fcbcca604bb@seld.be> Date: Fri, 15 Dec 2017 11:13:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171214090209.7in22vsbrjaxvsxe@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-CH Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Reproducible Builds Support From: j.boggiano@seld.be (Jordi Boggiano) On 2017-12-14 10:02 AM, Jelle van der Waa wrote: >>> The last issue is phar.phar being non-reproducible of which I am not >>> sure what the issue would be. I'm not sure how the binary data in the >>> phar.phar is generated. >> >> Phars are like `tars` that are also valid PHP files. This means there >> are probably modification times, etc, set in there. Not sure what else >> would need to be changed. > > Thanks for the information, I'll see if I can do some more digging. I have had similar issues with Phar files when I tried to make Composer builds reproducible. The cause is that the Phar extension uses the current unix timestamp as filemtime for all files in the table of content (at least when using addFromString), so every time you build the TOC is different and hence the signature at the end also is. I built a tool to fix this which just overwrites the TOC timestamps with whatever you want and then updates the signature.. If it helps, you can find it there: https://github.com/Seldaek/phar-utils Example usage in Composer: https://github.com/composer/composer/blob/84f5a1a7e8293978a718663dfac399e83f093e9e/src/Composer/Compiler.php#L161-L164 I guess an alternative fix would be for someone to actually fix the Phar extension so addFromString has a filemtime parameter you can pass the desired mtime to. I have not checked whether addFile suffers from the same issue or not, but possibly it needs to be fixed to read the mtime from the file you add. Best, Jordi -- Jordi Boggiano @seldaek - http://seld.be