From: Oleg Pykhalov <go.wigust@gmail.com>
To: Leo Famulari <leo@famulari.name>
Cc: 31818@debbugs.gnu.org
Subject: [bug#31818] [PATCH] gnu: Add restic.
Date: Thu, 14 Jun 2018 16:58:05 +0300 [thread overview]
Message-ID: <87k1r14gia.fsf@gmail.com> (raw)
In-Reply-To: <20180614012608.GA29167@jasmine.lan> (Leo Famulari's message of "Wed, 13 Jun 2018 21:26:08 -0400")
[-- Attachment #1: Type: text/plain, Size: 3348 bytes --]
Hello Leo,
Thank you for review.
Leo Famulari <leo@famulari.name> 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
>> + "https://github.com/restic/restic/releases/download/"
>> + "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 &> /tmp/.local/restic-licensecheck.txt
--8<---------------cut here---------------end--------------->8---
--8<---------------cut here---------------start------------->8---
#!/bin/sh
input()
{
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$'
done
}
for file in $(input); do
grep --files-without-match -v BSD $file;
done
--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")))
(for-each
(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")))
#t)))
--8<---------------cut here---------------end--------------->8---
Thanks,
Oleg.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-06-14 13:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-13 19:18 [bug#31818] [PATCH] gnu: Add restic Oleg Pykhalov
2018-06-14 1:26 ` Leo Famulari
2018-06-14 13:58 ` Oleg Pykhalov [this message]
2018-06-14 19:06 ` Leo Famulari
2018-06-16 18:54 ` Oleg Pykhalov
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1r14gia.fsf@gmail.com \
--to=go.wigust@gmail.com \
--cc=31818@debbugs.gnu.org \
--cc=leo@famulari.name \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).