From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 KH/BAKWnpGP0+wAAbAwnHQ (envelope-from ) for ; Thu, 22 Dec 2022 19:53:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MHFpO6SnpGMoMgAAG6o9tA (envelope-from ) for ; Thu, 22 Dec 2022 19:53:24 +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 C2430B56F for ; Thu, 22 Dec 2022 19:53:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8Qgi-0003Ho-IQ; Thu, 22 Dec 2022 13:53:04 -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 1p8Qgg-0003He-By for guix-patches@gnu.org; Thu, 22 Dec 2022 13:53:02 -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 1p8Qgg-0002PO-3q for guix-patches@gnu.org; Thu, 22 Dec 2022 13:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p8Qgf-00026t-LM for guix-patches@gnu.org; Thu, 22 Dec 2022 13:53:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60250] [PATCH] gnu: Add bees. References: <87k02j4zq8.wl-hako@ultrarare.space> In-Reply-To: <87k02j4zq8.wl-hako@ultrarare.space> Resent-From: Adam Faiz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Dec 2022 18:53:01 +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: 60250@debbugs.gnu.org Cc: hako@ultrarare.space Received: via spool by 60250-submit@debbugs.gnu.org id=B60250.16717351778103 (code B ref 60250); Thu, 22 Dec 2022 18:53:01 +0000 Received: (at 60250) by debbugs.gnu.org; 22 Dec 2022 18:52:57 +0000 Received: from localhost ([127.0.0.1]:36197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8Qgb-00026c-9R for submit@debbugs.gnu.org; Thu, 22 Dec 2022 13:52:57 -0500 Received: from knopi.disroot.org ([178.21.23.139]:53136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p8QgY-00026S-GC for 60250@debbugs.gnu.org; Thu, 22 Dec 2022 13:52:55 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id E8D2640DDF; Thu, 22 Dec 2022 19:52:52 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8phF1vpUZnAd; Thu, 22 Dec 2022 19:52:50 +0100 (CET) Message-ID: <21e09616-e1cc-05bc-5b9b-6b833198945b@disroot.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1671735170; bh=ylPWts6WCflIzBNuDPe3XeyAnrJEVuC5GdhjnVFu6wc=; h=Date:To:Subject:Cc:From; b=jCfq1Dk9YJas6IjMKIi8D2f8qrzg6WqeDStvlfKL5GEzB6+6WyYnOmK6jhSqGcy4e KejM8aBYZ7Bik0uyevTErz8jApszTfjbKi2VMdnRXPHbtB99AaeVzuoQrhf6Xeo98S Z1zI5hBo2zC9z9lUOKf6gz+oKgpVuc4I/mZWDgzS2hj2hl329LEa5/OYIIGWS2G4Dy LzBB585tSZ5O3KJwkmO7yAXE1fcWv5NKAUwHS7pqKVwsgW+jVlg1Ya2VHU0oJvr1F7 F9S3K6D55w+2lfA1dFCv44MBGxp7mCVQyTLbneURtLYbdBJHTFb2MrpaCiZn/kBxPJ 5mV1rTL5A7IOg== Date: Thu, 22 Dec 2022 18:52:38 +0000 MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Adam Faiz X-ACL-Warn: , Adam Faiz via Guix-patches From: Adam Faiz 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=1671735204; a=rsa-sha256; cv=none; b=bWORDlrypmHVfELtbjgfUCZxdVJW/0phwSngrNQIwkCY+rF3gJYN472/bjRLXBVAlZpaWg ZRvzGhmH27dJM3BEFNjmvZuR2TOg0fhUrcUwk8JXW78zJHhJqYQr2rzzXtOlfDuurJQoRX KXh5aR+Vp/MNbX7tDY6ViX6CLFN5t549JMHMjTRFa8EfIcOY1gu1Q11NamXEXQ4tg/hMnM 3m+WgMWIiRRd1EXcUAENUR/sBOvp7DuXOxPSlsS3S/ChpASPkuBNo+/XgkE3aCaHcX5fr5 mz3x/ip9EmWPeZqpjOLJWRTqra6mgoLsof1MvA9fQkarP/wJQEP7/pXo1MVUbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=jCfq1Dk9; 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=1671735204; 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: content-transfer-encoding:content-transfer-encoding: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=Bf+Gb213m9OyAktbk3GzGyL0J6whx5PKlOgMvAhKY9w=; b=WvEf+HTHDOuKJAJN77Lc3GgiINefnimVx4U5HV2SveMeOpYvyb4yaPYz3GkwbT4BkLr7co 2eg6anEooVb6bydgZNH/6EtNBW8q/xALykj+3rrvEPRgtzvDljIuZX8wl0XOmJt1O55P+b MSy0NpfFjf0nJjT4ItProaP1uO89hrbfA1233TvENjvqgXSpFc3xO4bcWbIAOdfd2ZJlQQ 5t3ORG4gYfBq4/PNCFSn8pgj8ik9XKw1Dd5ZawdAI4M/npetiEvgVUnkgzUIQwqaNjECQP cvJaPvaVlDnWS5WdKQalz6xOeosvOD42HwTQaaTUwiQW6EzBKjNxdyPVfePmZg== X-Spam-Score: -4.00 X-Migadu-Queue-Id: C2430B56F Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=jCfq1Dk9; 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: -4.00 X-TUID: b/Smq1FgxR5+ 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?