[Top][All Lists]

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

[bug#31818] [PATCH] gnu: Add restic.

From: Oleg Pykhalov
Subject: [bug#31818] [PATCH] gnu: Add restic.
Date: Thu, 14 Jun 2018 16:58:05 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello Leo,

Thank you for review.

Leo Famulari <address@hidden> writes:

> On Wed, Jun 13, 2018 at 10:18:19PM +0300, Oleg Pykhalov wrote:
>> * gnu/packages/backup.scm (restic): New variable.


>> +    (source (origin
>> +              (method url-fetch)
>> +              (uri (string-append
>> +                    "";
>> +                    "v" version "/restic-" version ".tar.gz"))
> This tarball includes bundled copies of restic's dependency graph in the
> vendor directory.
> Adding the package to Guix with the bundled libraries is not how we
> usually do things but, if they are all free software, it could be okay.


> Does anyone have opinions about the bundled ("vendored") code in this
> package?

I made some research for licenses in the bundled restic source.  It
seems there is no licenses except BSD, MIT (Expat or X11), {L,}GPL.
Could it be merged because of that or should we investigate more?

--8<---------------cut here---------------start------------->8---
licensecheck -r /tmp/guix-build-restic-0.9.1.drv-1/src &> 
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---

    for line in /tmp/.local/restic-licensecheck.txt; do
        grep -v 'Apache (v2.0)' $line\
            | grep -v 'BSD (3 clause)'\
            | grep -v 'BSD (2 clause)'\
            | grep -v 'MIT/X11 (BSD like)'\
            | grep -v GPL\
            | grep -v GENERATED\
            | cut -d ':' -f 1\
            | grep '.go$'

for file in $(input); do
    grep --files-without-match -v BSD $file;
--8<---------------cut here---------------end--------------->8---

Also, I add a completion installation phase.
--8<---------------cut here---------------start------------->8---
(add-after 'install-docs 'install-shell-completion
           (lambda* (#:key outputs #:allow-other-keys)
             (let* ((out (assoc-ref outputs "out"))
                    (bin (string-append out "/bin"))
                    (etc (string-append out "/etc"))
                    (share (string-append out "/share")))
                (lambda (shell)
                  (let* ((shell-name (symbol->string shell))
                         (dir (string-append "etc/completion/" shell-name)))
                    (mkdir-p dir)
                    (invoke (string-append bin "/restic") "generate"
                            (string-append "--" shell-name "-completion")
                            (string-append dir "/"
                                           (case shell
                                             ((bash) "restic")
                                             ((zsh) "_restic"))))))
                '(bash zsh))
               (with-directory-excursion "etc/completion"
                 (install-file "bash/restic"
                               (string-append etc "/bash_completion.d"))
                 (install-file "zsh/_restic"
                               (string-append share "/zsh/site-functions")))
--8<---------------cut here---------------end--------------->8---


Attachment: signature.asc
Description: PGP signature

reply via email to

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