;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015-2020, 2022-2023 Efraim Flashner ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2021 Ludovic Courtès ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou ;;; Copyright © 2019 Clément Lassieur ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2021 Stefan Reichör ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages sync) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system meson) #:use-module (guix build-system qt) #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (gnu packages) #:use-module (gnu packages acl) #:use-module (gnu packages adns) #:use-module (gnu packages autotools) #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages crypto) #:use-module (gnu packages curl) #:use-module (gnu packages dlang) #:use-module (gnu packages documentation) #:use-module (gnu packages freedesktop) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages graphviz) #:use-module (gnu packages image) #:use-module (gnu packages kde-frameworks) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages lua) #:use-module (gnu packages ocaml) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages rsync) #:use-module (gnu packages ruby) #:use-module (gnu packages selinux) #:use-module (gnu packages shells) #:use-module (gnu packages sphinx) #:2022-01-19package: Honor '--dry-run' when target profile is already in store....Ludovic Courtès 2022-01-16 ;; ,(string-append "-DSYSCONF_INSTALL_DIR=" (assoc-ref %outputs "out") "/etc")))) (native-inputs `(("cmocka" ,cmocka) ("extra-cmake-modules" ,extra-cmake-modules) ("perl" ,perl) ("pkg-config" ,pkg-config) ("qtlinguist" ,qttools-5))) (inputs (list qtbase-5 qtkeychain sqlite zlib)) (home-page "https://owncloud.org") (synopsis "Folder synchronization with an ownCloud server") (description "The ownCloudSync system lets you always have your latest files wherever you are. Just specify one or more folders on the local machine to and a server to synchronize to. You can configure more computers to synchronize to the same server and any change to the files on one computer will silently and reliably flow across to every other.") (license license:gpl2+))) (define-public onedrive (package (name "onedrive") (version "2.4.25") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/abraunegg/onedrive") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1i93mq4r9w8cqrdfsfv8wparfd3dbrppc5z04ab056545hk0x89k")))) (build-system gnu-build-system) (arguments (list #:configure-flags #~(list "--enable-completions" "--enable-notifications" (string-append "--with-zsh-completion-dir=" #$output "/share/zsh/site-functions") (string-append "--with-fish-completion-dir=" #$output "/share/fish/vendor_completions.d")) #:make-flags #~(list (string-append "CC=" #$(cc-for-target))) #:phases #~(modify-phases %standard-phases (add-after 'configure 'adjust-makefile (lambda _ (substitute* "Makefile" (("-O ") "-O2 ")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "./onedrive" "--version"))))))) (native-inputs (list pkg-config)) (inputs (list bash-minimal curl ldc libnotify sqlite)) (home-page "https://abraunegg.github.io") (synopsis "Client for OneDrive") (description "OneDrive Client which supports OneDrive Personal, OneDrive for Business, OneDrive for Office365 and SharePoint and fully supports Azure National Cloud Deployments. It supports one-way and two-way sync capabilities and securely connects to Microsoft OneDrive services.") (license license:gpl3))) (define-public lsyncd (package (name "lsyncd") (version "2.2.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/axkibe/lsyncd") (commit (string-append "release-" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1q2ixp52r96ckghgmxdbms6xrq8dbziimp8gmgzqfq4lk1v1w80y")))) (build-system cmake-build-system) (arguments `(;; The "tests" target is broken and assumes that tests are run in the ;; root directory. #:tests? #f #:test-target "tests" #:phases (modify-phases %standard-phases (add-after 'unpack 'search-$PATH-for-binaries ;; lsyncd requires and hard-codes absolute file names to binaries. ;; Make it fall back to searching $PATH for relative file names. (lambda _ (substitute* "lsyncd.c" (("execv\\(") "execvp(")) (substitute* (list "lsyncd.lua" "default-direct.lua" "default-rsync.lua" "default-rsyncssh.lua") (("(|/usr)/bin/") "")) #t)) (replace 'install ;; No install target. (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) (man (string-append out "/share/man/man1"))) (install-file "lsyncd" bin) (install-file "../source/doc/manpage/lsyncd.1" man) #t)))))) (native-inputs (list lua-5.2)) (home-page "https://github.com/axkibe/lsyncd") (synopsis "Synchronize local directories with remote targets") (description "Lsyncd watches a local directory trees event monitor interface (inotify or fsevents). It aggregates and combines events for a few seconds and then spawns one (or more) process(es) to synchronize the changes. By default this is rsync, which must be installed on all source and target machines. Lsyncd is thus a light-weight live mirror solution that is comparatively easy to install not requiring new file systems or block devices and does not hamper local file system performance.") (license license:gpl2+))) (define-public usync (let ((revision "1") (commit "09a8059a1adc22666d3ecf7872e22e6846c3ac9e")) (package (name "usync") (version (git-version "0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/ebzzry/usync") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "16i1q8f0jmfd43rb8d70l2b383vr5ib4kh7iq3yd345q7xjz9c2j")))) (build-system copy-build-system) (inputs (list scsh)) (propagated-inputs (list rsync unison)) (arguments `(#:install-plan '(("usync" "bin/usync")) #:phases (modify-phases %standard-phases (add-before 'install 'patch-usync-shebang (lambda _ (substitute* "usync" (("/usr/bin/env scsh") (which "scsh")))))))) (home-page "https://github.com/ebzzry/usync") (synopsis "Command line site-to-site synchronization tool") (description "@command{usync} is a simple site-to-site synchronization program written in @command{scsh}. It makes use of @command{unison} and @command{rsync} for bi- and uni-directional synchronizations.") (license license:expat)))) (define-public casync (let ((commit "99559cd1d8cea69b30022261b5ed0b8021415654") (revision "0")) (package (name "casync") (version (git-version "2" revision commit)) (home-page "https://github.com/systemd/casync/") (source (origin (method git-fetch) (uri (git-reference (url home-page) (commit commit))) (sha256 (base32 "139g82rkwv1kzss6crfmw3p01xnyjzz66b1ckprpbfncxb24047w")) (file-name (string-append name "-" version "-checkout")))) (build-system meson-build-system) (arguments `(#:configure-flags (let ((out (assoc-ref %outputs "out"))) (list (string-append "-Dudevrulesdir=" out "/lib/udev/rules.d"))))) (native-inputs (list pkg-config python python-sphinx rsync)) ;for tests (inputs (list xz ;for liblzma `(,zstd "lib") curl acl libselinux eudev fuse-2 openssl zlib)) (synopsis "File synchronization and backup system") (description "casync is a @dfn{content-addressable data synchronizer} that can be used as the basis of a backup system. It is: @itemize @item A combination of the rsync algorithm and content-addressable storage; @item An efficient way to store and retrieve multiple related versions of large file systems or directory trees; @item An efficient way to deliver and update OS, VM, IoT and container images over the Internet in an HTTP and CDN friendly way; @item An efficient backup system. @end itemize\n") (license license:lgpl2.1+)))) (define-public rclone (package (name "rclone") (version "1.52.3") (source (origin (method url-fetch) (uri (string-append "https://github.com/rclone/rclone/releases/download/" "v" version "/rclone-v" version ".tar.gz")) (sha256 (base32 "1pdhsxzc5ch2brfylghc602h9ba3x5dshxm3vcaldrgfac0rx0zl")))) ;; FIXME: Rclone bundles some libraries Guix already provides. Need to ;; un-bundle them. (build-system go-build-system) (arguments '(#:import-path "github.com/rclone/rclone" #:install-source? #f)) (synopsis "@code{rsync} for cloud storage") (description "@code{Rclone} is a command line program to sync files and directories to and from different cloud storage providers. Features include: @itemize @item MD5/SHA1 hashes checked at all times for file integrity @item Timestamps preserved on files @item Partial syncs supported on a whole file basis @item Copy mode to just copy new/changed files @item Sync (one way) mode to make a directory identical @item Check mode to check for file hash equality @item Can sync to and from network, e.g., two different cloud accounts @item Optional encryption (Crypt) @item Optional cache (Cache) @item Optional FUSE mount (rclone mount) @end itemize") (home-page "https://rclone.org/") (license license:expat)))