GNU bug report logs - #60250
[PATCH] gnu: Add bees.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Thu, 22 Dec 2022 08:21:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Hilton Chain <hako <at> ultrarare.space>
To: Adam Faiz <adam.faiz <at> disroot.org>
Cc: 60250 <at> debbugs.gnu.org
Subject: [bug#60250] [PATCH] gnu: Add bees.
Date: Fri, 23 Dec 2022 14:25:38 +0800
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 <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?

Thank you for the snippet and explanation!

I've made a pull request (of the beesd part) to the upstream:
<https://github.com/Zygo/bees/pull/241>

(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?




This bug report was last modified 2 years and 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.