From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 6DnpK6wqRGfdjwAAe85BDQ:P1 (envelope-from ) for ; Mon, 25 Nov 2024 07:43:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 6DnpK6wqRGfdjwAAe85BDQ (envelope-from ) for ; Mon, 25 Nov 2024 08:43:40 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=r2iWLaWX; dkim=fail ("headers rsa verify failed") header.d=ngraves.fr header.s=ovhmo4487190-selector1 header.b="5RJbLb/V"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1732520620; a=rsa-sha256; cv=none; b=d2hcoh1o5dgs9+GymiN0eYKIy6+xc9Ssc+JPvYbuzxGwSF3+aMuHsxR+C11UD9gPaunAdy 6fyUDUUHa/+bvshhoa3xNqG6s2Zj2MpC3hbF/Qzi/qYkZor9ky1wjDRahFqX4nQJ9WRFZm 0GXSj3t1d5/NbXzLr2OUsODJkmeCW+V62PC+r0FsWNVB8FRJXAFv+MVNifikaNuXNw6ink BrBgn8Op+ZlsAiSRnbOl0Mho9eQsoPDQN9uvoQQ2bfk4T08uRHDgu0Mynyd5VueeemutJX DxOnZgxb694/yTyQPMeGjtJ4JzoJK4kIi4iDk/4P1B3BxvolpNu9K1RQgNLFjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=r2iWLaWX; dkim=fail ("headers rsa verify failed") header.d=ngraves.fr header.s=ovhmo4487190-selector1 header.b="5RJbLb/V"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1732520620; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=mMQ0PdOGooPS1e4QErQAtJ/olVDgReX/z3+L9whLYuE=; b=X3CD+TOmdW5SyXEc8S/DjdAzHzmxuoBrO8FAjbOxr9jqXrZwejgIv1O/DJGv9pVGLSYnhv W8cLAAWhRuCmHYUL/jH0UpeSTTH6CVbhMN5hwQ/UQsZm8LCVgAIIgJNiGbUw5K85CiGsbn mGzNGJhHqULzUe7IkjD98Gg3QniGwFpoN7SC0l6tCED0dtzAk3dxw5qJEFQghUb1mF+4v+ 6ua6vZ/FFCc/7hw4jwRJdp3SQGteK9/kQ+nwb9XeYyVCYNgXUwWjRe0FHzrMD6uNSO+68m jbQ3fOdgYonjl1+8Vln7+qXmxXQ7DNCPx6PowIJBsbQcAhQWUo32YQmiOE8SEA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 30303258C for ; Mon, 25 Nov 2024 08:43:40 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFTka-0002Ck-I3; Mon, 25 Nov 2024 02:43:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFTkM-0002C5-6K for guix-patches@gnu.org; Mon, 25 Nov 2024 02:43:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFTkL-0003v2-SJ for guix-patches@gnu.org; Mon, 25 Nov 2024 02:43:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=mMQ0PdOGooPS1e4QErQAtJ/olVDgReX/z3+L9whLYuE=; b=r2iWLaWXA1jhbIQcw4/P9Xxm+U/FKiRfSubbftSCLhOMYTaP2HFOKOtWLSiTH88ioV4Qo8RE0iFQeyf8+aonAyaD5NOKSVqLestY9Ase1AA8UZ3usr1nlasMijasiXnO7z6ZVpWYbQn54yJ0Sd+sCCN6PBL3XpYlFc71OrrsJ+qKi2OAlics2UhJa/2vxBLilpG835ecWnvlXq5W/ATFEdhJf30Vc7lDPd1FduLcYlglXltH6FZI1p1lVvxNjkrYJmKTqovCaiabPSkCNRBPX0r3tQBHm+HKxNwS8SdEw4FZ/NlqdD1xVct0aC81Q+q/OUH2jk/N9fsn9Tj7NeQ9cw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFTkL-0000Np-Md for guix-patches@gnu.org; Mon, 25 Nov 2024 02:43:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74517] [PATCH 2/8] gnu: zbar: Split outputs. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Nov 2024 07:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74517 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 74517@debbugs.gnu.org Received: via spool by 74517-submit@debbugs.gnu.org id=B74517.17325205731453 (code B ref 74517); Mon, 25 Nov 2024 07:43:01 +0000 Received: (at 74517) by debbugs.gnu.org; 25 Nov 2024 07:42:53 +0000 Received: from localhost ([127.0.0.1]:37698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFTkC-0000NN-Lw for submit@debbugs.gnu.org; Mon, 25 Nov 2024 02:42:53 -0500 Received: from 5.mo550.mail-out.ovh.net ([178.33.45.107]:46161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFTk7-0000N8-SL for 74517@debbugs.gnu.org; Mon, 25 Nov 2024 02:42:50 -0500 Received: from director7.ghost.mail-out.ovh.net (unknown [10.109.148.106]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id 4Xxd390vrRz1RjT for <74517@debbugs.gnu.org>; Mon, 25 Nov 2024 07:42:44 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-jkq5c (unknown [10.110.188.21]) by director7.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 8D5501FE43; Mon, 25 Nov 2024 07:42:44 +0000 (UTC) Received: from ngraves.fr ([37.59.142.114]) by ghost-submission-5b5ff79f4f-jkq5c with ESMTPSA id svtAE3QqRGcogQ0AoT5xcg (envelope-from ); Mon, 25 Nov 2024 07:42:44 +0000 X-OVh-ClientIp: 90.92.117.144 In-Reply-To: <87bjy4m2t4.fsf@gmail.com> References: <20241124222934.524-1-ngraves@ngraves.fr> <20241124222934.524-2-ngraves@ngraves.fr> <87bjy4m2t4.fsf@gmail.com> Date: Mon, 25 Nov 2024 08:42:43 +0100 Message-ID: <87wmgrsqrw.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain X-Ovh-Tracer-Id: 3059070051154387561 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeefuddrgeeggddutdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepveekleeujedthefgffekleekhffhffetgfdvheekleeuhfehueeljedtjefhvdfgnecukfhppeduvdejrddtrddtrddupdeltddrledvrdduudejrddugeegpdefjedrheelrddugedvrdduudegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejgeehudejseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehhedtmgdpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=mMQ0PdOGooPS1e4QErQAtJ/olVDgReX/z3+L9whLYuE=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1732520565; v=1; b=5RJbLb/VWceVysDT1XN2BJubrr15IUjstVJYyYME/0PcvCF658ef7/wJ10mChniadA4v2Td+ cGEclAL6Vy0KrQW1VfCjLBjP2wMoofnYYtFep4J2ge67gW320nJqLBBH7xQgUTEYmwRCtgjWmfV nm4uQtYN+EdQRnEjVEz9gKl07ztipnAg7coEKTVXifLzk/XI/+Ko+bW1/AIOnKjIsuL6c3PSRB2 /Dz/3DNEZsDazImpH3PWcil0Wsnq4BsH3P6GCAuMOs28uaEB6rmZN4uzhFSCtzsq2W5xWTC3TNG i9mhYwPnbbGZgBHgxaN7OvVwYYCjOIE4+qijxF4tfTzDg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 0.37 X-Spam-Score: 0.37 X-Migadu-Queue-Id: 30303258C X-Migadu-Scanner: mx12.migadu.com X-TUID: LOQs/IEz0su+ On 2024-11-25 12:04, Maxim Cournoyer wrote: > Hi, > > Nicolas Graves writes: > >> * gnu/packages/aidc.scm (zbar): Split outputs. >> [build-system]: Switch to glib-or-gtk-build-system. >> [arguments]<#:configure-flags>: Add --disable-static. >> <#:modules>: Use srfi-26 and gremlin's file-runpath. >> <#:phases>: Add phase 'split-outputs. >> [native-inputs]: Improve style. >> [inputs]: Improve style. Replace v4l-utils by v4l-utils-minimal. >> --- >> gnu/packages/aidc.scm | 94 +++++++++++++++++++++++++++++++++---------- >> 1 file changed, 73 insertions(+), 21 deletions(-) > > [...] > >> (define-public zxing-cpp >> ;; Use the master branch as it includes unreleased build system improvements >> @@ -184,32 +187,81 @@ (define-public zbar >> (commit version))) >> (file-name (git-file-name name version)) >> (sha256 >> - (base32 >> - "0rf3i7lx0fqzxsngird6l4d4dnl612nr32rm8sib699qqx67px8n")))) >> - (build-system gnu-build-system) >> + (base32 "0rf3i7lx0fqzxsngird6l4d4dnl612nr32rm8sib699qqx67px8n")))) >> + (build-system glib-or-gtk-build-system) >> + ;; XXX: qt output is broken: zbarcam-qt fails with segmentation fault, but >> + ;; this error happened before the output split. > > As an alternative to packaging broken outputs, perhaps we could simply > tell the build system to not build with Qt, or wholly remove it from the > inputs? > >> + (outputs '("out" "gtk" "qt")) >> (arguments >> - '(#:configure-flags (list "--with-gtk=auto" >> + (list >> + #:configure-flags '(list "--disable-static" >> + "--with-gtk=auto" >> "--with-python=auto" >> (string-append "--with-dbusconfdir=" >> (assoc-ref %outputs "out") >> - "/etc")))) >> + "/etc")) >> + #:modules `(((guix build gremlin) #:select (file-runpath)) >> + (srfi srfi-26) >> + ,@%glib-or-gtk-build-system-modules) >> + #:phases >> + #~(modify-phases %standard-phases >> + (add-after 'install 'split-outputs >> + (lambda* (#:key outputs #:allow-other-keys) >> + (let ((out (assoc-ref outputs "out")) >> + (gtk (assoc-ref outputs "gtk"))) > > This can be rewritten using the gexp variabls #$output and #$output:gtk. >> + >> + ;; XXX: Using set-file-runpath leads to runpath-too-long-error >> + (define (prepend-to-runpath path file) >> + (invoke "patchelf" "--set-rpath" >> + (string-join (cons* path (file-runpath file)) ":") >> + file)) >> + >> + (define (move-output-file target file) >> + (let* ((source (string-append out file)) >> + (destination (string-append target file))) >> + (mkdir-p (dirname destination)) >> + (rename-file source destination) >> + (when (and (eq? (stat:type (lstat destination)) 'regular) >> + (elf-file? destination)) >> + (prepend-to-runpath >> + (string-append out "/lib:" target "/lib") >> + destination)))) >> + >> + (for-each >> + (lambda (kind) >> + (for-each >> + (cut move-output-file (assoc-ref outputs kind) <>) >> + (cons* >> + (string-append "/lib/pkgconfig/zbar-" kind ".pc") >> + (string-append "/bin/zbarcam-" kind) >> + (map (cut string-drop <> 1) >> + (with-directory-excursion out >> + (find-files >> + "./lib" >> + (string-append "lib.*" kind "\\.so.*"))))))) >> + '("gtk" "qt")) >> + >> + (for-each >> + (cut move-output-file gtk <>) >> + '("/share/gir-1.0" "/lib/girepository-1.0")))))))) > > That is clever, perhaps too clever (in comparison to the simple brute > force approach of using a distinct minimal package variant built without > the extra inputs) :-). Yes, but I think the output split is desirable independently of the minimal variant (for when we won't have to carry the propagated-inputs anymore), and thus it makes sense to keep it. WDYT? I could also try to package : - one minimal version - one gtk version in its own package, trying not to rebuild but to link if not too complex - not try to package a qt version (I'm not able to debug this). -- Best regards, Nicolas Graves