Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101339 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42004 invoked from network); 12 Dec 2017 21:12:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Dec 2017 21:12:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.178 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.128.178 mail-wr0-f178.google.com Received: from [209.85.128.178] ([209.85.128.178:44613] helo=mail-wr0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/A5-53433-256403A5 for ; Tue, 12 Dec 2017 16:12:52 -0500 Received: by mail-wr0-f178.google.com with SMTP id l22so219288wrc.11 for ; Tue, 12 Dec 2017 13:12:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=gMZ8sOXgqHCCsc8cqskFCOi/4KHKgVvPhs6czLBFO2o=; b=i9kugayQzLKVGWoB3sE+s4ZPSCIvituFzY1pbmvT8jRVJqIjirR14N/t85XBIMp+Yf ygxtVfY8I9sKIibDr+Nta0GgePA4hPoCP+ilYLRyAeVWh978AVITR10cDXNIXJMjB3Se wtGJBMD6LbaiWRKbaCBNUGwfeSP9TVfPcKbM1WOY+J4cWo03qz7BnGG1TUCdpsNvVZcz v+S51WAGiN5ZFpcMfziZ9zGxgCCHb5CzpT/BBOovqp3JBeuCbpGTpWuutGHfn5ipgUHr jQtuqPsnSHsaRmV+Q17fLEcrwqPVUtrS8PfVvma/5NblZ4uHGlkaJtcrEjwznGXjTpbd y8eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=gMZ8sOXgqHCCsc8cqskFCOi/4KHKgVvPhs6czLBFO2o=; b=XJl1MI4lTHWOU3Ls7ut73gfwKGbqU8dtk9zc6tzmpNqJRrUACuC4yPGIDXGxDFRvC6 XREviAvtS7CvYqSJ2CqqIvSxooYF7mGx4pNBAypUxqFFLj05rST8/sqzhV4XpGG46687 JLwpb33JvGCebsQwT8Kk+GwiK6y1vLL5q1kfMPkxBToPdMqH8wsSHQzEIPC8MfLElEAx Ac52dyQdqG6A5zJpt+MuXOGacgEoKKebsDNjhrZe90w8/3EIU+V2wUL77fHZ3lT/u8DW 7aXHJ8nGp818pgCC5jWQsRKN72ur9pGMPeW7uF4VVrxPbY3BtgwVkAESDUSuA/TZ9T96 WQAw== X-Gm-Message-State: AKGB3mKGab9LShZ9eQ3UWx0mfU0WOOo1kjcoh4+6I0RMAwn4tuwNLuWO twYb8CS5njG7FHMrWW/uTeoR6rtYMAegvGW+jM8= X-Google-Smtp-Source: ACJfBotu/h2d2AoWnR/h1pO/j33O+vraR9BqYWc9A8Z5QQnGQ4C6i/3D9MJO9oXYM0cMXT0VvKhzypxSNgbBfJlbw5o= X-Received: by 10.223.171.85 with SMTP id r21mr182321wrc.182.1513113167991; Tue, 12 Dec 2017 13:12:47 -0800 (PST) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.28.169.197 with HTTP; Tue, 12 Dec 2017 13:12:47 -0800 (PST) In-Reply-To: <20171211211157.d7lj5vibpaaka4ji@gmail.com> References: <20171211211157.d7lj5vibpaaka4ji@gmail.com> Date: Tue, 12 Dec 2017 14:12:47 -0700 X-Google-Sender-Auth: 1fIxGOMeP1uc-Q6zmwka6AY6VXQ Message-ID: To: Jelle van der Waa Cc: PHP Internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Reproducible Builds Support From: levim@php.net (Levi Morrison) On Mon, Dec 11, 2017 at 2:11 PM, Jelle van der Waa wrote: > Hi all, > > Debian, Arch Linux and other distro's are trying to get full > reproducible builds. There are some issues in PHP's codebase which makes > builds unreproducible. Reprodicuble builds are currently reproduced in > Arch Linux by building PHP twice, and in two different env's, varying > hostname, system time, etc. [1] > > Once issue is the PHP_BUILD_DATE, which makes the build > non-reproducible. I've made a PR which uses SOURCE_DATE_EPOCH which is > set in the reprodiculbe build env. This should keep the current > functionality intact, while adding support for reproducible builds. [2] > [3] It looks good to me. > Another issue is the php_uname functions which contains the > hostname, since the hostname is varied per build this makes it > non-reproducible. This is caused by the following line: > > configure.ac:PHP_UNAME=`uname -a | xargs` required in: > ext/standard/info.c: php_uname = PHP_UNAME; > > Which is there as fallback as the php.net documentation describes: > > "On some older UNIX platforms, it may not be able to determine the > current OS information in which case it will revert to displaying the OS > PHP was built on. This will only happen if your uname() library call > either doesn't exist or doesn't work.". > > I would argue that this is strange unexpected behaviour, and maybe it > should throw an exception instead? Or can it show only "Linux" as > fallback? basically PHP_OS. Ideas? I wouldn't throw an exception here. It seems PHP_OS is under-documented; maybe PHP_OS_FAMILY is better: > The operating system family PHP was built for. Either of 'Windows', 'BSD', 'Darwin', 'Solaris', 'Linux' or 'Unknown'. Available as of PHP 7.2.0. However, I really don't think we should change this for already released PHP versions. We should our maintainers how they feel about changing it in a x.y.NEXT patch. My inclination is to do this for PHP 7.3 and beyond and accept that official PHP sources of earlier versions will not produce reproducible builds. > 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.