all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Adam Faiz via Guix-patches via <guix-patches@gnu.org>
To: 60250@debbugs.gnu.org
Cc: hako@ultrarare.space
Subject: [bug#60250] [PATCH] gnu: Add bees.
Date: Thu, 22 Dec 2022 18:52:38 +0000	[thread overview]
Message-ID: <21e09616-e1cc-05bc-5b9b-6b833198945b@disroot.org> (raw)
In-Reply-To: <87k02j4zq8.wl-hako@ultrarare.space>

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 <city.h>"))
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?




  reply	other threads:[~2022-12-22 18:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22  8:19 [bug#60250] [PATCH] gnu: Add bees Hilton Chain via Guix-patches via
2022-12-22 18:52 ` Adam Faiz via Guix-patches via [this message]
2022-12-23  6:25   ` Hilton Chain via Guix-patches via
2022-12-23  6:35     ` [bug#60250] [PATCH v2] " Hilton Chain via Guix-patches via
2023-01-17 15:02       ` bug#60250: [PATCH] " Ludovic Courtès
2022-12-23  7:57     ` [bug#60250] " Adam Faiz via Guix-patches via
2022-12-24 11:34       ` Hilton Chain via Guix-patches via
2022-12-24 16:31         ` Adam Faiz via Guix-patches via
2022-12-22 19:22 ` Adam Faiz via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21e09616-e1cc-05bc-5b9b-6b833198945b@disroot.org \
    --to=guix-patches@gnu.org \
    --cc=60250@debbugs.gnu.org \
    --cc=adam.faiz@disroot.org \
    --cc=hako@ultrarare.space \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.