projects/guix·blob kernel-updates · refs

171 lines · 6.6 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2013 Andreas Enge <[email protected]>
3;;; Copyright © 2016 Mark H Weaver <[email protected]>
4;;; Copyright © 2017, 2019 Efraim Flashner <[email protected]>
5;;; Copyright © 2018, 2021 Tobias Geerinckx-Rice <[email protected]>
6;;; Copyright © 2019, 2021 Leo Famulari <[email protected]>
7;;; Copyright © 2020 Vincent Legoll <[email protected]>
8;;; Copyright © 2026 Ian Eure <[email protected]>
9;;; Copyright © 2026 Ashish SHUKLA <[email protected]>
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages rsync)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages acl)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages digest)
32 #:use-module (gnu packages libidn)
33 #:use-module (gnu packages perl)
34 #:use-module (gnu packages python)
35 #:use-module (gnu packages popt)
36 #:use-module (gnu packages tls)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (guix packages)
39 #:use-module (guix download)
40 #:use-module (guix gexp)
41 #:use-module (guix git-download)
42 #:use-module (guix build-system cmake)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix utils))
45
46(define-public rsync
47 (package
48 (name "rsync")
49 (version "3.5.1")
50 (source (origin
51 (method url-fetch)
52 (uri (string-append "https://rsync.samba.org/ftp/rsync/src/rsync-"
53 version ".tar.gz"))
54 (sha256
55 (base32
56 "1vvvqcjlswk31nxr2273v2icjg6mvvys16dkjz1vxf0gq6frqpy5"))))
57 (build-system gnu-build-system)
58 (arguments
59 `(#:configure-flags
60 ;; The bundled copies are preferred by default.
61 (list "--without-included-zlib"
62 "--without-included-popt")
63 #:make-flags
64 ,#~(list (string-append "CC=" #$(cc-for-target)))
65 #:phases
66 ,#~(modify-phases %standard-phases
67 (add-after 'unpack 'patch-testsuite
68 (lambda _
69 (let ((sh-file (which "sh"))
70 (python-file (which "python3"))
71 (bash-file (which "bash"))
72 (cc (string-append "'"
73 #$(cc-for-target)
74 "'")))
75 (substitute* (find-files "testsuite/" "\\.py$")
76 (("'cc'") cc)
77 (("/usr/bin/env python3") python-file)
78 (("/usr/bin/env bash") bash-file)
79 (("/bin/sh") sh-file))))))))
80 (native-inputs
81 (list perl python-minimal)) ;needed for tests
82 (inputs
83 (list acl
84 libidn2
85 lz4
86 openssl
87 popt
88 xxhash
89 zlib
90 `(,zstd "lib")))
91 (synopsis "Remote (and local) file copying tool")
92 (description
93 "Rsync is a fast and versatile file copying tool. It can copy locally,
94to/from another host over any remote shell, or to/from a remote rsync daemon.
95Its delta-transfer algorithm reduces the amount of data sent over the network
96by sending only the differences between the source files and the existing
97files in the destination.")
98 (license license:gpl3+)
99 (home-page "https://rsync.samba.org/")))
100
101(define-public librsync
102 (package
103 (name "librsync")
104 (version "2.3.4")
105 (source (origin
106 (method git-fetch)
107 (uri (git-reference
108 (url "https://github.com/librsync/librsync")
109 (commit (string-append "v" version))))
110 (file-name (git-file-name name version))
111 (sha256
112 (base32
113 "07yd45r9fkgw55m47xh2aqgflagzw5kh2w764w5gv1jfrg5rn8vy"))))
114 (build-system cmake-build-system)
115 (inputs
116 (list popt))
117 (native-inputs
118 (list which perl))
119 (home-page "https://librsync.sourceforge.net/")
120 (synopsis "Implementation of the rsync remote-delta algorithm")
121 (description
122 "Librsync is a free software library that implements the rsync
123remote-delta algorithm. This algorithm allows efficient remote updates of a
124file, without requiring the old and new versions to both be present at the
125sending end. The library uses a \"streaming\" design similar to that of zlib
126with the aim of allowing it to be embedded into many different applications.")
127 (license license:lgpl2.1+)))
128
129(define-public openrsync
130 (let ((base-version "0.5.0")
131 (revision "0")
132 (commit "a257c0f495af2b5ee6b41efc6724850a445f87ed"))
133 (package
134 (name "openrsync")
135 (version (git-version base-version revision commit))
136 (source
137 (origin
138 (method git-fetch)
139 (uri (git-reference
140 (url "https://github.com/kristapsdz/openrsync/")
141 (commit commit)))
142 (file-name (git-file-name name version))
143 (sha256
144 (base32 "1jfz10psi1qw842hwip7p01sgd4ns9n53amdshzqy5brqyinbkd5"))))
145 (build-system gnu-build-system)
146 (arguments
147 (list
148 #:tests? #f ;No tests.
149 #:phases
150 #~(modify-phases %standard-phases
151 (add-after 'unpack 'patch-hurd
152 (lambda _
153 (substitute* "configure"
154 (("defined\\(__linux__\\)" all)
155 (string-append all "|| defined(__GNU__)")))))
156 (replace 'configure
157 ;; openrsync has a non-autotools ./configure script which
158 ;; errors under the gnu-build-system's 'configure phase.
159 (lambda _
160 (setenv "DESTDIR" #$output)
161 (setenv "PREFIX" "")
162 (setenv "CFLAGS" "-O2")
163 (setenv "CC" #$(cc-for-target))
164 (invoke "./configure" "PREFIX=\"\""))))))
165 (synopsis "OpenBSD implementation of @command{rsync}")
166 (description
167 "Openrsync is an alternate implementation of @command{rsync},
168originally written for OpenBSD and ported to Linux and other Unix-like
169systems. It supports a subset of @command{rsync}'s options.")
170 (license license:isc)
171 (home-page "https://github.com/kristapsdz/openrsync"))))