summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Manila2019-06-23 19:32:02 -0400
committerDaniel Manila2019-06-23 19:44:47 -0400
commit228b25a5a6817d8aad84270b300c1d881ed6c649 (patch)
tree582b853890ec7c2cc827250d43ce980f14082382
parent56d5ce14da3e870a102fa020485c1a5cd691a538 (diff)
downloadaur-228b25a5a6817d8aad84270b300c1d881ed6c649.tar.gz
Update to upstream version 1.1.5
Also add a lot of goodies to make this all work nicer.
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD28
-rw-r--r--net.manilas.weresync.service.policy23
-rw-r--r--service.patch10
-rw-r--r--setup.patch27
-rwxr-xr-xweresync-daemon-gui.sh11
-rw-r--r--weresync.1213
7 files changed, 324 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3839e54d44bf..5bd9f62dc00a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = weresync
pkgdesc = Incrementally clone linux drives
- pkgver = 1.0.7
+ pkgver = 1.1.5
pkgrel = 1
url = https://github.com/DonyorM/weresync
arch = any
@@ -11,9 +11,24 @@ pkgbase = weresync
depends = python
depends = python-parse
depends = python-yapsy
+ depends = python-dbus
+ depends = rsync
+ depends = gptfdisk
+ depends = parted
+ optdepends = polkit
options = !emptydirs
- source = https://files.pythonhosted.org/packages/source/W/WereSync/WereSync-1.0.7.tar.gz
- md5sums = e86bf6cd5a6708ae9d1ad30a5e710951
+ source = https://files.pythonhosted.org/packages/source/W/WereSync/WereSync-1.1.5.tar.gz
+ source = setup.patch
+ source = net.manilas.weresync.service.policy
+ source = weresync-daemon-gui.sh
+ source = weresync.1
+ source = service.patch
+ md5sums = dd6bb35d298f51d4f8e06a0bf2aab925
+ md5sums = 46119cd590cfe73d630a22061444278b
+ md5sums = 331aabe242015106d7d153d60a26f472
+ md5sums = a9d5b2748b5cfb26398ea27e42a49bfc
+ md5sums = 0703a7fcc6b42abdc880960005d995a8
+ md5sums = 21ae7729f0df95cec8e37ae70d8fe59d
pkgname = weresync
diff --git a/PKGBUILD b/PKGBUILD
index e9c24814215c..e0cd4db84cbe 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Daniel Manila <daniel.develop@manilas.net>
pkgname=weresync
-pkgver=1.0.7
+pkgver=1.1.5
pkgrel=1
_name=WereSync
pkgdesc='Incrementally clone linux drives'
@@ -8,16 +8,32 @@ arch=(any)
url='https://github.com/DonyorM/weresync'
license=('Apache')
groups=('any')
-depends=('python' 'python-parse' 'python-yapsy')
+depends=('python' 'python-parse' 'python-yapsy' 'python-dbus' 'rsync' 'gptfdisk' 'parted')
+optdepends=('polkit')
makedepends=('python' 'python-setuptools')
options=(!emptydirs)
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
-#WereSync v1.0.7 md5sum
-md5sums=('e86bf6cd5a6708ae9d1ad30a5e710951')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
+ 'setup.patch' 'net.manilas.weresync.service.policy' 'weresync-daemon-gui.sh'
+ 'weresync.1' 'service.patch')
+#WereSync v1.1.5 md5sum
+md5sums=('dd6bb35d298f51d4f8e06a0bf2aab925' '46119cd590cfe73d630a22061444278b'
+ '331aabe242015106d7d153d60a26f472' 'a9d5b2748b5cfb26398ea27e42a49bfc'
+ '0703a7fcc6b42abdc880960005d995a8' '21ae7729f0df95cec8e37ae70d8fe59d')
+
+prepare() {
+ cd "$srcdir/${_name}-$pkgver"
+ patch --forward --strip=1 --input="${srcdir}/setup.patch"
+ patch --forward --strip=1 --input="${srcdir}/service.patch"
+}
package() {
cd "$srcdir/${_name}-$pkgver"
python setup.py install --root="$pkgdir/" --optimize=1
+ mv "$pkgdir/usr/bin/weresync-gui" "$pkgdir/usr/bin/weresync-gui-only"
+ mkdir -p "$pkgdir/usr/share/polkit-1/actions" "$pkgdir/usr/share/man"
+ cp "$srcdir/net.manilas.weresync.service.policy" "$pkgdir/usr/share/polkit-1/actions/"
+ cp "$srcdir/weresync.1" "$pkgdir/usr/share/man/"
+ cp "$srcdir/weresync-daemon-gui.sh" "$pkgdir/usr/bin/weresync-gui"
}
-# vim:set ts=2 sw=2 et:
+# vim:set ts=2 sw=2 et
diff --git a/net.manilas.weresync.service.policy b/net.manilas.weresync.service.policy
new file mode 100644
index 000000000000..aa876e7c41b5
--- /dev/null
+++ b/net.manilas.weresync.service.policy
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+<policyconfig>
+
+ <vendor>WereSync</vendor>
+ <vendor_url>https://github.com/DonyorM/weresync</vendor_url>
+
+ <action id="net.manilas.weresync.service">
+ <description>Run the WereSync backup daemon</description>
+ <message>Authentication is required to start or stop the WereSync backup service.</message>
+ <defaults>
+ <allow_any>no</allow_any>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_self_keep</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/systemctl</annotate>
+ <annotate key="org.freedesktop.policykit.exec.argv2">weresync</annotate>
+
+ </action>
+
+</policyconfig>
diff --git a/service.patch b/service.patch
new file mode 100644
index 000000000000..d6edaa10aea0
--- /dev/null
+++ b/service.patch
@@ -0,0 +1,10 @@
+diff -u --recursive --text WereSync-1.1.5/src/weresync/resources/weresync.service WereSync-1.1.5.patch/src/weresync/resources/weresync.service
+--- WereSync-1.1.5/src/weresync/resources/weresync.service 2019-06-15 18:46:49.000000000 -0400
++++ WereSync-1.1.5.patch/src/weresync/resources/weresync.service 2019-06-23 12:10:13.270067125 -0400
+@@ -5,4 +5,4 @@
+ [Service]
+ Type=dbus
+ BusName=net.manilas.weresync.DriveCopier
+-ExecStart=/usr/local/bin/weresync-daemon
+\ No newline at end of file
++ExecStart=/usr/bin/weresync-daemon
diff --git a/setup.patch b/setup.patch
new file mode 100644
index 000000000000..5195b44b3e1c
--- /dev/null
+++ b/setup.patch
@@ -0,0 +1,27 @@
+diff --unified --recursive --text WereSync-1.1.5/setup.py WereSync-1.1.5.patched/setup.py
+--- WereSync-1.1.5/setup.py 2019-06-22 21:46:37.000000000 -0400
++++ WereSync-1.1.5.patched/setup.py 2019-06-22 22:22:47.096745960 -0400
+@@ -51,7 +51,7 @@
+ version="1.1.5",
+ package_dir={"": "src"},
+ packages=find_packages("src"),
+- install_requires=["parse==1.6.6", "yapsy==1.11.223", "pydbus==0.6.0"],
++ install_requires=["parse>=1.6.6", "yapsy>=1.11.223", "pydbus>=0.6.0"],
+ entry_points={
+ 'console_scripts': [
+ "weresync = weresync.interface.cli:main",
+@@ -63,7 +63,13 @@
+ "weresync.resources": ["*.svg", "*.png", "weresync*.*"] + create_mo_files()
+ },
+ data_files=[(target_icon_loc,
+- ["src/weresync/resources/weresync.svg"])],
++ ["src/weresync/resources/weresync.svg"]),
++ ("/etc/dbus-1/system.d/",
++ ["src/weresync/resources/weresync-dbus.conf"]),
++ ("/usr/lib/systemd/system/",
++ ["src/weresync/resources/weresync.service"]),
++ ("/usr/share/applications",
++ ["src/weresync/resources/weresync-gui.desktop"])],
+ # Metadata
+ author="Daniel Manila",
+ author_email="dmv@springwater7.org",
diff --git a/weresync-daemon-gui.sh b/weresync-daemon-gui.sh
new file mode 100755
index 000000000000..5f6eede936c3
--- /dev/null
+++ b/weresync-daemon-gui.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if command -v pkexec; then
+ pkexec systemctl start weresync
+else
+ echo "pkexec not found, just attempting to start gui."
+fi
+/usr/bin/weresync-gui-only
+if command -v pkexec; then
+ pkexec systemctl stop weresync
+fi
diff --git a/weresync.1 b/weresync.1
new file mode 100644
index 000000000000..64093c29faea
--- /dev/null
+++ b/weresync.1
@@ -0,0 +1,213 @@
+.\" Man page generated from reStructuredText.
+.
+.TH WERESYNC 1 "June 30th, 2017" "1.0" "admin"
+.SH NAME
+weresync \- clone linux drives incrementally
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.\" Manpage documentation for WereSync. This should be converted to the groff format using rst2man.py
+.
+.sp
+weresync\-gui \- GUI interface for the weresync program.
+.SH SYNOPSIS
+.INDENT 0.0
+.TP
+.B weresync [ options ] [\fB\-g\fP \fIROOT_PARTITION\fP] [\fB\-B\fP \fIBOOT_PARTITION\fP]
+[\fB\-E\fP \fIEFI_PARTITION\fP] [\fB\-L\fP \fIBOOTLOADER\fP]
+[\fB\-l\fP \fILVM_SOURCE\fP [\fILVM_TARGET\fP]]
+source target
+.UNINDENT
+.sp
+\fBweresync\-gui\fP
+.sp
+\fBweresync\-daemon\fP
+.SH DESCRIPTION
+.sp
+WereSync clones linux drives incrementally producing a bootable clone. Clones
+produced by WereSync will have different UUIDs than the original drive, but
+WereSync will update the fstab and bootloader to allow the clone to properly
+boot. Clones can be created with one command or one button click, using
+\fIweresync\fP or \fIweresync\-gui\fP respectively, after the daemon in \fIweresync\-daemon\fP
+has been started as root.
+.SH OPTIONS*
+.IP "System Message: WARNING/2 (weresync.1.rst:, line 42)"
+Title underline too short.
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+OPTIONS*
+\-\-\-\-\-\-\-
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+The \fIweresync\-gui\fP command takes no arguments. These arguments apply to the \fIweresync\fP command.
+.INDENT 0.0
+.TP
+.B \-\-h\fP,\fB \-\-help
+Displays help message.
+.TP
+.B \-C\fP,\fB \-\-check\-and\-partition
+Checks if all partitions are large enough and formatted correctly to allow drive to be copied. If the partitions are not valid, the target drive will be re\-partitioned and reformatted. If unset, no checking occurs.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-s, \-\-source\-mask \fIMASK\fP
+A string to be passed to format() that will produce a partition identifier (/dev/sda1 or such) of the source drive when passed two arguments: the identifier ("/dev/sda") and a partition number in that order. Defaults to "{0}{1}"
+.TP
+.B \-t, \-\-target\-mask \fIMASK\fP
+A string to be passed to format() that will produce a partition identifier (/dev/sda1 or such) of the source drive when passed two arguments: the identifier ("/dev/sda") and a partition number in that order. Defaults to "{0}{1}".
+.TP
+.B \-e, \-\-excluded\-partitions \fILIST\fP
+A list of comma separated partition numbers that should not be searched or copied at any time. These partitions will still be formatted if \-C is passed. Defaults to empty.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-b\fP,\fB \-\-break\-on\-error
+If passed the program will halt if there are any errors copying. This flag is not recommended because it will halt even if encountering a normal issue, like a swap partition.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-g, \-\-root\-partition \fIPART_NUM\fP
+The partition mounted on /. It is recommended to pass this always, but WereSync will attempt to find the main partition even if it is not passed.
+.TP
+.B \-B, \-\-boot\-partition \fIPART_NUM\fP
+The partition that should be mounted on /boot of the grub_partition. If you have a separate boot partition, you must use this flag.
+.TP
+.B \-E, \-\-efi\-partition \fIPART_NUM\fP
+The partition that should be mounted on /boot/efi of the grub_partition. If passed this will create the /boot/efi folder if it does not exist and pass it to grub. Required if you have an EFI partition.
+.TP
+.B \-m, \-\-source\-mount \fIDIR\fP
+The directory to mount partitions from the source drive on. Cannot be the same as \-\-target\-mount. If unset, WereSync generates a randomly named directory in the /tmp dir.
+.TP
+.B \-M, \-\-target\-mount \fIDIR\fP
+The directory to mount partitions from the target drive on. Cannot be the same as \-\-source\-mount. If unset, WereSync generates a randomly named directory in the /tmp dir.
+.TP
+.B \-r, \-\-rsync\-args \fIRSYNC_ARGS\fP
+The arguments to be passed to the rsync instance used to copy files. Defaults to "\-aAXxH \-\-delete"
+.TP
+.B \-l, \-\-lvm \fISOURCE\fP [\fITARGET\fP]
+This argument expects either one or two arguments specifying the logical volume groups to copy from and to, respectively. If no target VG is passed, WereSync will use the VG SOURCE\-copy. If the target does not exist, WereSync will create it.
+.TP
+.B \-L, \-\-bootloader \fIBOOTLOADER\fP
+The plugin to use to install the bootloader. Such plugins can be found
+at the bottom of the help message. Defaults to using the "uuid_copy"
+plugin.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-v\fP,\fB \-\-verbose
+Makes WereSync increase output and include more minor details.
+.TP
+.B \-d\fP,\fB \-\-debug
+Causes a huge amount of output, useful for debugging the program. Usually not needed for casual use.
+.UNINDENT
+.SH COPYRIGHT
+.sp
+Copyright 2016 Daniel Manila
+.sp
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+.nf
+
+.in +2
+\fI\%http://www.apache.org/licenses/LICENSE\-2.0\fP
+
+.in -2
+.fi
+.sp
+.sp
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+.SH EXAMPLES
+.sp
+To copy /dev/sda to /dev/sdb on a UEFI system use:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+sudo weresync \-C \-L grub2 \-E 1 \-g 2 /dev/sda /dev/sdb
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+This example uses grub2 as the bootloader (for most other UEFI bootloaders use
+\fB\-L uuid_copy\fP or omit the \fB\-L\fP option all together)
+with the efi partition on /dev/sda1, and the root partition on /dev/sda2.
+.sp
+Subsequent copies should omit the \fB\-C\fP option, since it could cause weresync
+to repartition /dev/sdb again, thus deleting existing data and making weresync\(aqs
+incremental abilities useless.
+.sp
+To copy /dev/sda to /dev/sdb on a BIOS/Legacy system use:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+sudo weresync \-C \-L grub2 \-g 1 /dev/sda /dev/sdb
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+This example uses grub2 as the bootloader (other bootloaders, such as syslinux,
+may be passed to the \fB\-L\fP option) and has the root partition on /dev/sda1.
+The omittance of the \fB\-E\fP option signals to WereSync that this is not a
+a UEFI drive.
+.sp
+As above, subsequent copies should be initiated without the \fB\-C\fP option.
+.sp
+The gui can simply be run with:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+sudo weresync\-gui
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.SH SEE ALSO
+.sp
+Full documentation can be found at WereSync\(aqs documentation on Read The Docs:
+\fI\%https://weresync.readthedocs.io/en/master/\fP
+.SH AUTHOR
+Daniel Manila <dmv@springwater7.org>
+.\" Generated by docutils manpage writer.
+.