Commit 1199c4f7 authored by Boxiang Sun's avatar Boxiang Sun Committed by Thomas Gambier

component/rdiff-backup: Version up rdiff-backup

Using egg receipe to build it instead of install it manually
parent dc649be1
......@@ -2,9 +2,12 @@
extends =
../librsync/buildout.cfg
../python-2.7/buildout.cfg
../patch/buildout.cfg
parts =
rdiff-backup-1.0.5
rdiff-backup-1.3.4
rdiff-backup-2.2.4
[rdiff-backup-common]
recipe = slapos.recipe.cmmi
......@@ -24,6 +27,37 @@ python = ${python2.7:executable}
[rdiff-backup-common:python27]
python = ${buildout:executable}
[rdiff-backup-2.2.4-repository]
recipe = slapos.recipe.build:download-unpacked
url = https://src.fedoraproject.org/repo/pkgs/rdiff-backup/rdiff-backup-2.2.4.tar.gz/sha512/3777038f90a702aaf0d87737ccd79dd6a0bc9d6bd49dc8154fbcd240b9b1971f5a5f3cc0ebffb623f1eeec82cb939fbdee75a813d27ef9eb78d5700ecc2716b5/rdiff-backup-2.2.4.tar.gz
md5sum = beb1ff7e8082932c322be9bd79e84ecb
destination = ${buildout:directory}/rdiff-backup
[rdiff-backup-2.2.4-eggs]
recipe = zc.recipe.egg:custom
egg = rdiff-backup
setup-eggs =
setuptools-scm
include-dirs =
${librsync:location}/include
library-dirs =
${librsync:location}/lib
rpath =
${librsync:location}/lib
patch-binary = ${patch:location}/bin/patch
rdiff-backup-patches =
${:_profile_base_location_}/rdiff-backup-2.2.4-ignore-numerical-ids-1.0.0.patch
[rdiff-backup-2.2.4]
recipe = zc.recipe.egg:scripts
location = ${buildout:directory}
eggs = ${rdiff-backup-2.2.4-eggs:egg}
entry-points = rdiff-backup=rdiffbackup.run:main
scripts = rdiff-backup
[versions]
setuptools = 45.2.0
[rdiff-backup-1.0.5]
<= rdiff-backup-common
url = https://pkgs.fedoraproject.org/repo/pkgs/rdiff-backup/rdiff-backup-1.0.5.tar.gz/${:md5sum}/rdiff-backup-1.0.5.tar.gz
......
diff -Naur src/rdiff_backup/Globals.py src/rdiff_backup/Globals.py
--- src/rdiff_backup/Globals.py 2023-02-27 07:45:09.000000000 +0100
+++ src/rdiff_backup/Globals.py 2023-05-11 16:02:08.544025324 +0200
@@ -291,6 +291,9 @@
# Protocol 4 is understood since Python 3.4, protocol 5 since 3.8.
PICKLE_PROTOCOL = 4
+# If set, don't compare uid/gid or uname/gname when comparing
+# two RORPath
+ignore_numerical_ids = None
# @API(get, 200)
def get(name):
diff -Naur src/rdiff_backup/rpath.py src/rdiff_backup/rpath.py
--- src/rdiff_backup/rpath.py 2023-02-27 07:45:09.000000000 +0100
+++ src/rdiff_backup/rpath.py 2023-05-11 16:38:06.011273968 +0200
@@ -592,6 +592,7 @@
and (self.issym() or not compare_ownership)):
# Don't compare gid/uid for symlinks, or if told not to
pass
+ elif key in ('uid', 'gid', 'uname', 'gname') and Globals.ignore_numerical_ids: pass
elif key == 'type' and not compare_type:
pass
elif key == 'atime' and not Globals.preserve_atime:
diff -Naur src/rdiffbackup/actions/__init__.py src/rdiffbackup/actions/__init__.py
--- src/rdiffbackup/actions/__init__.py 2023-02-27 07:45:09.000000000 +0100
+++ src/rdiffbackup/actions/__init__.py 2023-05-11 16:25:36.095180254 +0200
@@ -55,6 +55,9 @@
"--api-version", type=int,
help="[opt] integer to set the API version forcefully used")
COMMON_PARSER.add_argument(
+ "--ignore-numerical-ids", type=int,
+ help="[opt] integer to set the numerical ids")
+COMMON_PARSER.add_argument(
"--current-time", type=int,
help="[opt] fake the current time in seconds (for testing)")
COMMON_PARSER.add_argument(
diff -Naur src/rdiffbackup/run.py src/rdiffbackup/run.py
--- src/rdiffbackup/run.py 2023-02-27 07:45:09.000000000 +0100
+++ src/rdiffbackup/run.py 2023-05-11 16:29:37.489784756 +0200
@@ -158,6 +158,8 @@
Globals.set("null_separator", arglist.null_separator)
Globals.set("use_compatible_timestamps", arglist.use_compatible_timestamps)
Globals.set("do_fsync", arglist.fsync)
+ if arglist.ignore_numerical_ids is not None:
+ Globals.set_integer('ignore_numerical_ids', 1)
if arglist.current_time is not None:
Globals.set_integer('current_time', arglist.current_time)
if arglist.chars_to_quote is not None:
\ No newline at end of file
......@@ -14,7 +14,7 @@
# not need these here).
[pbsready]
filename = pbsready.cfg.in
md5sum = e24d0567cda7c72e39f6c8fcb0ede7ab
md5sum = a4fd4c02766e9ef95b6eef00f7c42fb6
[pbsready-import]
filename = pbsready-import.cfg.in
......@@ -26,7 +26,7 @@ md5sum = 2ef471242ab1fe9d0998f49304bfa066
[template-pull-backup]
filename = instance-pull-backup.cfg.in
md5sum = 1b8645835f04081861266436505fd28f
md5sum = 256a06ff1ba54d50e880dfb911e4b1ff
[template-replicated]
filename = template-replicated.cfg.in
......
......@@ -112,7 +112,7 @@ feeds = $${directory:notifier-feeds}
callbacks-directory = $${directory:notifier-callbacks}
equeue-socket = $${equeue:socket}
notifier-binary = ${buildout:bin-directory}/pubsubnotifier
rdiffbackup-binary = ${rdiff-backup-1.3.4:location}/bin/rdiff-backup
rdiffbackup-binary = ${rdiff-backup-2.2.4:location}/bin/rdiff-backup
sshclient-binary = $${openssh-client:wrapper-path}
known-hosts = $${directory:dot-ssh}/known_hosts
promises-directory = $${basedirectory:promises}
......
......@@ -103,7 +103,7 @@ recipe = slapos.cookbook:pbs
client = false
path = $${directory:backup}
wrapper = $${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = ${rdiff-backup-1.3.4:location}/bin/rdiff-backup
rdiffbackup-binary = ${rdiff-backup-2.2.4:location}/bin/rdiff-backup
#----------------
......@@ -293,5 +293,5 @@ recipe = slapos.cookbook:userinfo
[resilient-publish-connection-parameter]
recipe = slapos.cookbook:publish
ssh-public-key = $${sshkeys-sshd:public-key-value}
resilient-ssh-url = ssh://$${user-info:pw-name}@[$${sshd-raw-server:host}]:$${sshd-port:port}/$${rdiff-backup-server:path}
resilient-ssh-url = ssh://$${user-info:pw-name}@[$${sshd-raw-server:host}]:$${sshd-port:port}$${rdiff-backup-server:path}
ip = $${slap-network-information:global-ipv6}
......@@ -136,6 +136,7 @@ eggs =
[versions]
setuptools = 44.1.1
# Use SlapOS patched zc.buildout
zc.buildout = 2.7.1+slapos019
# Use SlapOS patched zc.recipe.egg (zc.recipe.egg 2.x is for Buildout 2)
......@@ -292,6 +293,7 @@ PyYAML = 5.4.1
pyzmq = 22.3.0
qtconsole = 4.3.0
random2 = 1.0.1
rdiff-backup = 2.2.4
regex = 2020.9.27
requests = 2.31.0
rpdb = 0.1.5
......@@ -302,6 +304,7 @@ seaborn = 0.7.1
Send2Trash = 1.5.0
setproctitle = 1.1.10
setuptools-dso = 2.9
setuptools-scm = 7.1.0:whl
sgmllib3k = 1.0.0
simplegeneric = 0.8.1
singledispatch = 3.4.0.3
......@@ -327,6 +330,7 @@ sympy = 1.1.1
terminado = 0.9.1
testpath = 0.4.4
tinycss2 = 1.2.1:whl
tomli = 2.0.1:whl
tornado = 6.1
traitlets = 5.11.2:whl
trio = 0.22.0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment