From patchwork Mon Oct 17 16:20:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugo Osvaldo Barrera X-Patchwork-Id: 2090 Return-Path: Delivered-To: patchwork@archlinux.org Received: from mail.archlinux.org [2a01:4f9:c010:3052::1] by patchwork.archlinux.org with IMAP (fetchmail-6.4.33) for (single-drop); Mon, 17 Oct 2022 16:21:14 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id eHewBfqATWM5bgcAK+/4rw (envelope-from ) for ; Mon, 17 Oct 2022 16:21:14 +0000 Received: from lists.archlinux.org (lists.archlinux.org [95.217.236.249]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 786F5159FC5D; Mon, 17 Oct 2022 16:21:11 +0000 (UTC) Authentication-Results: mail.archlinux.org; dkim=pass header.d=whynothugo.nl header.s=fm3 header.b=VgAk6thi; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="I Sr0Dlc"; dmarc=none; spf=pass (mail.archlinux.org: domain of arch-projects-bounces@lists.archlinux.org designates 95.217.236.249 as permitted sender) smtp.mailfrom=arch-projects-bounces@lists.archlinux.org Received: from lists.archlinux.org (localhost [IPv6:::1]) by lists.archlinux.org (Postfix) with ESMTP id 07736570654; Mon, 17 Oct 2022 16:21:08 +0000 (UTC) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lists.archlinux.org (Postfix) with ESMTPS id CED4257064B for ; Mon, 17 Oct 2022 16:21:01 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 5B96E3200684 for ; Mon, 17 Oct 2022 12:20:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 17 Oct 2022 12:20:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=whynothugo.nl; h=cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t= 1666023658; x=1666110058; bh=n+1XCE7BW0TK6XhWy8TKKOvMW5RzdwdDvg5 D1/KRZmo=; b=VgAk6thi0Ggt3bYrXn/lr6xGah6vPaMZaj7Ede71vMQ5V2HOIUX WFqq/PuMj86hfUU2o/TBKc5gmyKf1rsb6nF5C3fR0IejSIhPd37ouh6x3t/YH/cn 2jpnOsCrMuOTqGdshw/W5p8eknTq/IPrlYkqxg1SF7/XippFsp1hjt2rkAy9n633 Zj4jyiU1IpjsjXprCeFr3o9I+GADnZvSLBT/A8zbfbylWY9OPwRlQg0HYYTWMpXf d5hFeyxvb/kq0Tt8KJRm000IZgSjT5eeluwf2CbM09EMp5WMfqprJk7LNhpEC6E9 odS1juKzQvqNa6+zYXgLishWOx/NnSMjeXQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1666023658; x= 1666110058; bh=n+1XCE7BW0TK6XhWy8TKKOvMW5RzdwdDvg5D1/KRZmo=; b=I Sr0Dlc8KgZaW6vv1NH1NgxqK6Md8Mr8dkzabuW5e12hOX0WMzvpNlTQcYjOl+uAq wY+jTehxcS773miwrKz21uT+qluCxf47zS/m/LFg7NjQdav1qGPhVAY/t6mQ08Fd LC5x5mOHRWCQxz9m7+d5NoUD7ja7rkyrmMGYCwet3Ie/EAkGyjz1q9ldB6D+skNj 4obEMsXy0/l79fsqJc9k1hXQ/TlZOhsOWaeOjaQtFKoJobskX9goxU/GBq0PgLfF 2KDRqU8t7HiEap0HyHiBtoYgnAhMqnmsK55PBvUZRUtkljWa6Q/bjmK3IzUsT+Sd xhihfYSmD8opthA/ped1Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeekledgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugesthdtredttd dtvdenucfhrhhomhepjfhughhoucfqshhvrghlughouceurghrrhgvrhgruceohhhughho seifhhihnhhothhhuhhgohdrnhhlqeenucggtffrrghtthgvrhhnpeetvedutdelieefke etvdelheetvdefffduuefhleetudetffdvjeelueegffelleenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhuhhgohesfihhhihnohhthhhugh hordhnlh X-ME-Proxy: Feedback-ID: i42b9468f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 17 Oct 2022 12:20:58 -0400 (EDT) Date: Mon, 17 Oct 2022 18:20:55 +0200 From: Hugo Osvaldo Barrera To: arch-projects@lists.archlinux.org Subject: Hardcoded x86_64 in makerepropkg Message-ID: <20221017162055.kpsd5yxqoua2cdag@metal> MIME-Version: 1.0 Content-Disposition: inline Message-ID-Hash: XEEW5LXYFN3XXI5YXAUY5E4LZLMKOFTL X-Message-ID-Hash: XEEW5LXYFN3XXI5YXAUY5E4LZLMKOFTL X-MailFrom: hugo@whynothugo.nl X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.5 Precedence: list List-Id: Arch Linux projects development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Rspamd-Queue-Id: 786F5159FC5D X-Rspamd-Server: mail.archlinux.org X-Spamd-Result: default: False [-2.01 / 15.00]; DWL_DNSWL_LOW(-1.00)[messagingengine.com:dkim]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; MAILLIST(-0.20)[mailman]; RCVD_IN_DNSWL_MED(-0.20)[95.217.236.249:from]; R_DKIM_ALLOW(-0.20)[whynothugo.nl:s=fm3,messagingengine.com:s=fm3]; R_SPF_ALLOW(-0.20)[+ip4:95.217.236.249]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.24:received]; HAS_LIST_UNSUB(-0.01)[]; PREVIOUSLY_DELIVERED(0.00)[arch-projects@lists.archlinux.org]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[whynothugo.nl]; NEURAL_HAM(-0.00)[-0.999]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[hugo@whynothugo.nl,arch-projects-bounces@lists.archlinux.org]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[whynothugo.nl:+,messagingengine.com:+]; TO_DN_NONE(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:95.217.0.0/16, country:DE]; FORGED_SENDER_MAILLIST(0.00)[] `makerepropkg` has a hardcoded "x86_64", so fails to run on other [unofficial] architectures, because it tries to use an x86_64-specific makepkg config, which overrides CARCH=x86_64. I tried addressing it with this simple patch: This half-works, but the arch derivates still needs to ship a custom `devtools` package with their own `makepkg-$CARCH.conf`. Usually, the only thing that really needs to be changed in the per-architecture custom makepkg.conf is CARCH and CHOST. This is still not ideal, and sounds like it could be refined further into something simpler. The .BUILDINFO file specifies the devtools version originally used, so that makerepropkg can download that specific version and use the right makepkg.conf file for the rebuild. It would be much simpler dump all variables from `makepkg.conf` into .BUILDINFO at build-time, and use these directly when rebuilding to test reproducibility. Instead of the package indicating the version of devtools contains its build configuration, the package just includes the build configuration directly. This removes one level of indirection. This approach would also allow checking the reproducibility of packages that were built with slight different settings (including those built by derivates/unofficial platforms). Any thoughts on this? Side note: the above patch might still have value if merged, at least in the short term. diff --git a/src/makerepropkg.in b/src/makerepropkg.in index b271f25..846af06 100644 --- a/src/makerepropkg.in +++ b/src/makerepropkg.in @@ -92,7 +92,7 @@ get_makepkg_conf() { return 1 fi msg2 "using makepkg.conf from ${fname}" - bsdtar xOqf "${buildtool_file/file:\/\//}" usr/share/devtools/makepkg-x86_64.conf > "${makepkg_conf}" + bsdtar xOqf "${buildtool_file/file:\/\//}" "usr/share/devtools/makepkg-$CARCH.conf" > "${makepkg_conf}" return 0 }