From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gHCuLg5KpWOxegAAbAwnHQ (envelope-from ) for ; Fri, 23 Dec 2022 07:26:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qLKULg5KpWPujgAAauVa8A (envelope-from ) for ; Fri, 23 Dec 2022 07:26:22 +0100 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 7020025EE3 for ; Fri, 23 Dec 2022 07:26:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8bVO-0003Cm-NH; Fri, 23 Dec 2022 01:26:07 -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 1p8bVK-00039Q-Uk for guix-patches@gnu.org; Fri, 23 Dec 2022 01:26:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p8bVK-0000pK-Mx for guix-patches@gnu.org; Fri, 23 Dec 2022 01:26:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p8bVK-0003QC-7x for guix-patches@gnu.org; Fri, 23 Dec 2022 01:26:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60250] [PATCH] gnu: Add bees. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Dec 2022 06:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60250 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Adam Faiz Cc: 60250@debbugs.gnu.org Received: via spool by 60250-submit@debbugs.gnu.org id=B60250.167177676113146 (code B ref 60250); Fri, 23 Dec 2022 06:26:02 +0000 Received: (at 60250) by debbugs.gnu.org; 23 Dec 2022 06:26:01 +0000 Received: from localhost ([127.0.0.1]:36721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8bVJ-0003Py-0l for submit@debbugs.gnu.org; Fri, 23 Dec 2022 01:26:01 -0500 Received: from mail.boiledscript.com ([144.168.59.46]:47184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8bVG-0003Pr-6j for 60250@debbugs.gnu.org; Fri, 23 Dec 2022 01:26:00 -0500 Date: Fri, 23 Dec 2022 14:25:38 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1671776751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AHLTXWZJKedE3iGk776qhE0W3fPcTb74XRXGsb+uuOk=; b=PwFw01v+Yb2LUz5XMPofdS6BnH+oPlGSYrgDODyLLiTAeMmXTjWH8Dk+ZtkzOJJo/jyrcA sVyUK+ldwn/4VAOdonAnQGVqxKeZz0nnVwW9giDlkusrWhIFYqU0mpC9BCCseRF09uxee9 Ga00hI9dw13Ur8VXi3Gn3sJqu28Vd4a+L1wJk+JZPLp4wLyOXnSt/DjqMFJTY+qKHNvcRQ f+IXEKDHtV6NLQZz6c8I43o3DB5ZWrrTO5G1VKhAbb72pmbVY9B1JVjqsIWv4bzKqBK35j CZeot6KzURp3aYUJTmXRfOKqcbGrSDS+bGVoEDfCFP9fkUJKN5eXAPBj9NYpyQ== Message-ID: <875ye27i1p.wl-hako@ultrarare.space> In-Reply-To: <21e09616-e1cc-05bc-5b9b-6b833198945b@disroot.org> References: <21e09616-e1cc-05bc-5b9b-6b833198945b@disroot.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: / 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: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671776782; a=rsa-sha256; cv=none; b=M5XiRM6q/Vfw1UxvwEMk5Z0UGXSOen75yX0Ha3drxOyZ5D/SxV2RRb+/KRixQ7hXGFpTHt yPWNKw/sB5cUfazgSHVbcctndkwFueiwaNy04SiwSMbbRC4KBQ3t4fJQdOEELhJgHAEpwV 8X0Gfv4p16amrVJyeUZriSqfO+v8CVfFrC8iDp5hUBdEQQQs85RXjZJL8DUw4E5ECSx9pA +/yyxW78P//rOHCmjRVF3D1IvbY+lv0o+2esM3Plr/IOE7fOH6aFZiF+J21/xprrIeKniv nrIIJQthzIwxO7JlpGz/1tL1+jtQvm0yGVkXO5BEERtUdZ3aEwgFud+aF/YV1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=PwFw01v+; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671776782; 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=AHLTXWZJKedE3iGk776qhE0W3fPcTb74XRXGsb+uuOk=; b=rXs1MZcOiYuGVwkold1ABLkEJ++puWWs2iZJx9ltK+LyosZ7Yw7Q9eyq6zVfsZKAPDlzmO WwOXNX8Q6yKrx+iutEldlbPv7Q3psTk36j9Qtqof82CyZuFUfD+aVzY9L4FRS9vVGi60Bx VuPGeMsVtpbI4suLgFqbCt9trzALcJYasMU69OEY6DgvoOgHEM0IMBb9Uf+vzodEihu5ZE ifkqJJd75KRpw3200uAhBZhp+oQ7nYKQpH5WhoNdklypi9jMN/OoBPEWs77CopKkkdfa6O hB8KvNqc8XQMZeD1fojDjwOvEyJG55J7tYcOZas0jFQP8eCp5Fdjzf9+vSPmQA== X-Spam-Score: -3.81 X-Migadu-Queue-Id: 7020025EE3 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=PwFw01v+; 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"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.81 X-TUID: tNjwiuZufn8W Hi Adam, On Fri, 23 Dec 2022 02:52:38 +0800, Adam Faiz wrote: > > Hi, > > > #~(list (string-append "CC=" #$(cc-for-target)) > > + (string-append "DESTDIR=" #$output) > > + (string-append "BEES_VERSION=" #$version) > > + "PREFIX=''" > > + "LIBEXEC_PREFIX=/lib/bees" > The LIBEXEC_PREFIX shouldn't be set to this, this is actually a bug with beesd.in and also the sed > invocation(or $TEMPLATE_COMPILER which is what it's called in the Makefile). > > > #~(modify-phases %standard-phases > > + (delete 'configure) > > + (add-after 'install 'fix-path > > + (lambda _ > > + (substitute* (string-append #$output "/sbin/beesd") > > + (("/lib/bees/bees" all) > > + (string-append #$output all)))))))) > The 'fix-path phase isn't necessary, and the LIBEXEC_PREFIX doesn't need to be set. The snippet > below fixes the bug in bees: > > > (modules '((guix build utils))) > > (snippet > > #~(begin > > (substitute* "Defines.mk" > > (("^sed.*" all) > > (string-append all > > "\t\t-e's#@DESTDIR@#$(DESTDIR)#' \\\n"))) > > (substitute* "scripts/beesd.in" > > (("@LIBEXEC_PREFIX@") "@DESTDIR@/@LIBEXEC_PREFIX@")))))) > > The files lib/city.cc and include/crucible/city.h need to be unbundled and the cityhash included in > guix used instead. The cityhash package needs to be in the inputs, and these files need to be > deleted as part of the snippet above:> (for-each delete-file > > '("lib/city.cc" "include/crucible/city.h")) > > It appears that bees hasn't been built on a non-systemd distribution, because an optional feature > hard fails. This fixes it, the systemd unit files are installed conditionally anyways: > > (substitute* "Makefile" > > (("pkg-config systemd --variable=systemdsystemunitdir" all) > > (string-append all " || true"))) > > > (substitute* "lib/Makefile" > > (("city.o.*") "")) > > (substitute* "src/bees-hash.cc" > > (("#include .crucible/city.h.") "#include ")) > These substitutions remove references to the bundled cityhash(which is 11 years old!) > > Native inputs and inputs for bees: > > (native-inputs > > (list pkg-config markdown)) > > (inputs > > (list cityhash)) > > All the modifications made as part of the snippet should definitely be upstreamed, could you do that > for me? Thank you for the snippet and explanation! I've made a pull request (of the beesd part) to the upstream: (And it's merged before I send the mail XDDD) However I'm not sure about the systemd part, could you explain more about which optional feature hard fails? And I get same binaries whether-ever this part is used. As pkg-config is only used for systemd, and markdown for documentations that won't be installed, I'd rather remove them from native-inputs, WDYT?