guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 01/01: gnu: Add snapper.


From: Ricardo Wurmus
Subject: Re: 01/01: gnu: Add snapper.
Date: Sat, 26 Jan 2019 19:25:09 +0100
User-agent: mu4e 1.0; emacs 26.1

Hi Pierre,

address@hidden writes:

> ambrevar pushed a commit to branch snapper
> in repository guix.

Does this really need to have its own branch?  I prefer to keep the
number of public branches on Savannah low.

> commit b8413e5a3dc67eb064baf1a52fc34302c0a070c1
> Author: Pierre Neidhardt <address@hidden>
> Date:   Sat Jan 26 17:52:35 2019 +0100
>
>     gnu: Add snapper.
>     
>     * gnu/packages/linux.scm (snapper): New variable.

Here are some comments about this:

> +(define-public snapper
> +  (package
> +    (name "snapper")
> +    (version "0.8.2")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append 
> "ftp://ftp.suse.com/pub/projects/snapper/snapper-";
> +                                  version
> +                                  ".tar.bz2"))
> +              (sha256
> +               (base32
> +                "0s73x5h0fdggcxxcmjlf1q7pqlwd1ac4pngwsm6ayg8n4gxk3acy"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `( ;; TODO: 2 tests are failing:
> +       ;; unknown location(0): fatal error: in "test_byte_to_humanstring": 
> std::runtime_error: locale::facet::_S_create_c_locale name not valid
> +       ;; unknown location(0): fatal error: in "test_big_numbers": 
> std::runtime_error: locale::facet::_S_create_c_locale name not valid
> +       ;; unknown location(0): fatal error: in "test1": std::runtime_error: 
> locale::facet::_S_create_c_locale name not valid
> +       #:tests? #f

Is it feasible to just disable the two (three?) failing tests instead of
disabling the tests completely?

> +       #:configure-flags (list
> +                          (string-append "CPPFLAGS="
> +                                         "-I"
> +                                         (assoc-ref %build-inputs "libxml2")
> +                                         "/include/libxml2")
> +                          "--disable-zypp")

It would be good to add a comment here to explain what zypp is and whi
it is disabled.

> +         (add-before 'build 'patch-makefiles
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out")))
> +               (substitute* "client/Makefile.am"
> +                 (("libexecdir = /usr/lib/snapper")
> +                  (string-append "libexecdir = " out
> +                                 "/lib/snapper")))
> +               ;; TODO: Why is $(DESTDIR) not doing the right thing for 
> scripts?
> +               ;; Changing it in #:make-flags produces the wrong behaviour.
> +               (substitute* "scripts/Makefile.am"
> +                 (("\\$\\(DESTDIR\\)") out)
> +                 (("(pam_snapperdir = )/usr(/lib/pam_snapper)" _ before 
> after)
> +                  (string-append before out after)))
> +               (substitute* "data/Makefile.am"
> +                 (("\\$\\(DESTDIR\\)") out))
> +               (substitute* "pam/Makefile.am"
> +                 (("(securelibdir = )\\$\\(shell echo /`basename 
> \\$\\(libdir\\)`/security\\)" _ before)
> +                  (string-append before out "/lib/security"))))
> +             #t))

Patching “Makefile.am” means that we’ll have to bootstrap the build
system again, which pulls in autoconf and automake.  Can Makefile.in be
patched instead?

> +         (add-after 'install 'clean-up-systemd-services
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             ;; TODO: Maybe we should not remove everything, we need dbus.
> +             (delete-file-recursively
> +              (string-append (assoc-ref outputs "out") "/usr"))
> +             #t)))))

I don’t understand the TODO comment here.  Why is “/usr” being generated
in the first place?

> +    (description " Snapper is a tool for Linux filesystem snapshot
> +management.  Apart from the obvious creation and deletion of snapshots, it 
> can

There’s an extra space at the beginning of the description string.

-- 
Ricardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]