Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101354 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33886 invoked from network); 14 Dec 2017 09:02:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Dec 2017 09:02:17 -0000 Authentication-Results: pb1.pair.com header.from=jelle@vdwaa.nl; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=jelle@vdwaa.nl; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain vdwaa.nl from 74.125.82.42 cause and error) X-PHP-List-Original-Sender: jelle@vdwaa.nl X-Host-Fingerprint: 74.125.82.42 mail-wm0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:45700] helo=mail-wm0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/B0-18007-61E323A5 for ; Thu, 14 Dec 2017 04:02:16 -0500 Received: by mail-wm0-f42.google.com with SMTP id 9so9779535wme.4 for ; Thu, 14 Dec 2017 01:02:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vdwaa-nl.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=WZPsf4qgcBem9KD2NZhtE2CLshqm/08poQH0CgDne3g=; b=tmJpt2bFTCcC5EJVmLWynk7YbJcDpLtekajOMnYOrhQ3YUQ7OY0ENDN5nwK+9fnbKm vvEDa0zDLF68zZvReddM7YI2B9OZZNeOIrERrff+X6UMJJeH8dQc6WoZOMuY+3mQfydO 8/T+3nhG2Zg4kUw5/8h0nTxwCZqG9P1AadG7n1NkXDqezGFKZO9mfJD9VS0sME98Lhk5 JndKgSC+/RNjbtBvKXb8+7sgvLNE0wgkqTi9lJCPuloeVq/z+8dOO95+VfUszRvQp7bR mJOr4FZSDeDz7s/s8yXONFNHHlei9ZuWQLjeFJ7fsdw5Zx8gJOlAI2lDEJjc+INhlKU8 Mm7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=WZPsf4qgcBem9KD2NZhtE2CLshqm/08poQH0CgDne3g=; b=fJSxqTL11Mn6izCutcVO5ZICuHUTGpviY8xvlDzDMUo0DLPcLqAOUxc9NK62tQCWON CF027FkkRDCOuUFqmdQOfm8rw1yRdJWert83qA9/bVSW1FJ/d5jPd0m0WkaEDqjMlyt4 CG4s54r/wtAxDsAmhQAd2ntTU1DtFAGQOF0KdN8MCdP/abTbB3AgGhiSP0apPixLkEYM JpZzsPjDz9ohx1Zm1GwomSSxFsFrqeRxKH7LUSXv84VccAqKyYJGmM5sGWKOC44iV1VT ztF73PaTI1TUVathdR/lzs0srcIYhv0N36eNRjJ1LBp3t3tfkWvoG+gzKr8oxGr30PsC r0Hg== X-Gm-Message-State: AKGB3mIeMGz8xmx3Q3rDXGaue2sfZLHYmJSotIawadzdWbohfjkxOfoD bXrFU64rTs/foPJj/7q/3u8GeA== X-Google-Smtp-Source: ACJfBov2sr7WGSnX+0TiJYAex/QTD5DY2iMmo1HCqi+dYUMgAqwFeZfWZiB1aVNbqPMEkdhfKDcSUA== X-Received: by 10.80.164.144 with SMTP id w16mr11055235edb.130.1513242131619; Thu, 14 Dec 2017 01:02:11 -0800 (PST) Received: from gmail.com (D57D69B5.static.ziggozakelijk.nl. [213.125.105.181]) by smtp.gmail.com with ESMTPSA id x5sm2782789eda.8.2017.12.14.01.02.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Dec 2017 01:02:10 -0800 (PST) Date: Thu, 14 Dec 2017 10:02:10 +0100 To: Levi Morrison Cc: PHP Internals Message-ID: <20171214090209.7in22vsbrjaxvsxe@gmail.com> References:<20171211211157.d7lj5vibpaaka4ji@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171208 Subject: Re: [PHP-DEV] [RFC] Reproducible Builds Support From: jelle@vdwaa.nl (Jelle van der Waa) On 12/12/17 at 02:12pm, Levi Morrison wrote: > 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: PHP_OS and PHP_OS_FAMILY is a strange difference indeed. I'll have to do some further digging. > > > 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. Indeed, as an Arch Linux developer I'm fine with these changes adding up in the next release and no backporting. > > 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. -- Jelle van der Waa