X-Original-To: alpine-devel@lists.alpinelinux.org Received: from ms11p00im-qufo17281301.me.com (ms11p00im-qufo17281301.me.com [17.58.38.50]) by lists.alpinelinux.org (Postfix) with ESMTP id 96AB4F83168 for ; Mon, 31 Dec 2018 03:13:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=04042017; t=1546225988; bh=AkeA4xwi4r73kn+mRhXl2fguShtDYFeeWQovYCyMuIs=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=bLX/jKffYy4rpQVNAycz+SR+N3O/rTvKrTrc2u35r11sPXEbqSH/yKFoTjr66jA/n cxwUwMO+Jt20O9qp4pO78Espr8Vd9tn/0SQ/VDNMd+B5e+gbLHSBZPqIrQaGCZ10b7 3juRJ4t/kyW3h2VnhIQM9bp2KFHVr7bZR2u1FkwMSl5AgAM1WeHHMhYfB0ZS6f/0l2 2LlF2W5dLDX7ivKkxDIhAaVAvyhbrf6p8ZNT0TdC4JIZjGHyiWmxtWTjym9j85aBQR WeXXl/UsAG9e85xhjR32JiLlaJDwfQt8DV6TyNEFHTabF/QXB5ag0uhihD46UWu87n sRcEy963Lnvig== Received: from sachiel (c-76-29-2-249.hsd1.in.comcast.net [76.29.2.249]) by ms11p00im-qufo17281301.me.com (Postfix) with ESMTPSA id D7A77AC011C for ; Mon, 31 Dec 2018 03:13:07 +0000 (UTC) Date: Sun, 30 Dec 2018 22:17:56 -0500 From: Max Rees To: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] Report from Reproducible builds summit 2018 Message-ID: <20181231031754.GC9101@sachiel> Mail-Followup-To: alpine-devel@lists.alpinelinux.org References: <20181217133328.4dd1ef26@ncopa-desktop.copa.dup.pw> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-31_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1812310028 On Dec 18 08:27 AM, Oliver Smith wrote: > Hello Natanel and ML, > > I'm glad to read about this, thank you for this writeup! > > I've looked into reproducible builds myself last year, even had a proof > of concept with a few packages. The tooling can't be re-used, as it was > based on pmbootstrap from postmarketOS, not Alpine's abuild directly. > But maybe I can help with some insights or contribute otherwise. > > Natanael Copa: > > * we may need to store the exact versions and/or hashes of the > > dependencies used when a package was built. I am not sure where we > > want store this. Maybe in the APKINDEX? > > I had created a .buildinfo.json file, where I placed all dependencies > that were installed at the build time, with their versions. That file > was placed next to the main apk (so no extra buildinfo file for > subpackages) in the binary repository directory. Storing the hashes > would be even better. I chose JSON, as it's trivial to parse that with > Python, but since Alpine's build tools are lightweight and do not depend > on Python, using another format probably makes moer sense. The idea for > this file was based on Debian's buildinfo file, that is described here: > > https://wiki.debian.org/ReproducibleBuilds/BuildinfoFiles Debian buildinfo seems like a source of good ideas. However I think that, as you stated, the format should remain simple in order to remain compatible with abuild. I've been working on abuildd and I think my current rudimentary strategy would be to dump the contents of `apk info -v` or similar to a file (probably including the APKINDEX "C:" field as well) for each package origin (thus not subpackages). This'll be possible since abuildd is based on rootbld and thus only build-base + the (recursive) dependencies of the package will be installed for each build. This information will naturally be quite verbose and thus it probably shouldn't be put in the APKINDEX - perhaps in a separate git repo? > > * we embed the signature in the .apk, which means its not possible to > > re-create the exact same .apk without having access to the private > > key. I'm not sure how to deal with that. > > My cheap workaround for that was: just make all files inside the .apk > file reproducible, not the apk itself. It would be better to have the > entire apk reproducible of course, but to do that, we would need to > store the signature elsewhere (e.g. create a .sig file for each .apk). This is also the solution I arrived at - the data.tar.gz should be reproducible exactly (same datahash), and then we can compare most of the .PKGINFO modulo the builddate, datetime comment, and packager. Max --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---