Bug 1768698 - hot-backup.py is no longer working
Summary: hot-backup.py is no longer working
Alias: None
Product: Fedora
Classification: Fedora
Component: subversion
Version: 32
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Joe Orton
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2019-11-05 02:46 UTC by NM
Modified: 2021-02-20 01:34 UTC (History)
3 users (show)

Fixed In Version: subversion-1.14.1-1.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-02-12 01:43:02 UTC
Type: Bug

Attachments (Terms of Use)
Patch for hot-backup.py for python3 (1.79 KB, patch)
2020-05-07 22:43 UTC, Orion Poplawski
no flags Details | Diff

Description NM 2019-11-05 02:46:05 UTC
Description of problem:
After upgrade to FC31 subversion's hot-backup.py script is no longer working. 

Version-Release number of selected component (if applicable):
svn, version 1.12.2 (r1863366)
   compiled Jul 25 2019, 00:00:00 on x86_64-redhat-linux-gnu

How reproducible:
Every time hot-backup.py is run. 

Steps to Reproduce:
1.Run hot-backup script as=>         /usr/share/doc/subversion-tools/backup/hot-backup.py --archive-type=bz2 --num-backups=4 svn /mnt/backup/svn
2.Observe error message. 

Actual results:
Traceback (most recent call last):
  File "/usr/share/doc/subversion-tools/backup/hot-backup.py", line 244, in <module>
    backup_subdir = os.path.join(backup_dir, repo + "-" + youngest)
TypeError: can only concatenate str (not "bytes") to str

Expected results:  svn backup. 

Additional info:
Used to work fine with previous version of fedora.

Comment 1 NM 2019-11-17 00:32:52 UTC
Can yo8 please confirm observing (or not) the same. Thanks.

Comment 2 NM 2019-11-17 00:34:29 UTC

Comment 3 Joe Orton 2019-11-28 12:33:29 UTC
Yes likely some or many of the scripts on the -tools directory don't work with Python 3 yet, sorry.  Work is progressing upstream on improving support for py3.

Comment 4 NM 2019-11-28 14:02:53 UTC
Understood. Thanks.

Comment 5 Ben Cotton 2020-02-11 17:43:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 6 Orion Poplawski 2020-05-07 22:11:14 UTC
This is present in F31 as well - subversion-tools-1.12.2-3.fc31

Comment 7 Orion Poplawski 2020-05-07 22:18:57 UTC
Is there an upstream issue we can track?  I'm not finding a particular one for hot-backup.

Comment 8 Orion Poplawski 2020-05-07 22:28:09 UTC
My naive fix:

diff -up subversion-1.12.2/tools/backup/hot-backup.py.in.py3 subversion-1.12.2/tools/backup/hot-backup.py.in
--- subversion-1.12.2/tools/backup/hot-backup.py.in.py3 2015-12-21 08:02:31.000000000 -0700
+++ subversion-1.12.2/tools/backup/hot-backup.py.in     2020-05-07 16:26:50.792984845 -0600
@@ -219,7 +219,7 @@ def get_youngest_revision():
     raise Exception("Unable to find the youngest revision for repository '%s'"
                     ": %s" % (repo_dir, stderr_lines[0].rstrip()))

-  return stdout_lines[0].strip()
+  return stdout_lines[0].strip().decode()

 # Main

Comment 9 Orion Poplawski 2020-05-07 22:43:58 UTC
Created attachment 1686353 [details]
Patch for hot-backup.py for python3

Sorry, that previous one was incomplete.  This seems to be working for me.

Comment 10 NM 2020-06-21 13:53:58 UTC
Just updated to FC32. Problem persists: 

Traceback (most recent call last):
  File "/usr/share/doc/subversion-tools/backup/hot-backup.py", line 244, in <module>
    backup_subdir = os.path.join(backup_dir, repo + "-" + youngest)
TypeError: can only concatenate str (not "bytes") to str

Comment 11 Joe Orton 2020-06-22 07:18:37 UTC
This is being actively discussed on the development list -


I can backport whatever is committed upstream.

Comment 12 NM 2020-10-29 14:28:16 UTC
Same error is observed in FC33. 
Would it be possible to package the solution proposed above for everyone else to enjoy it too via 'dnf install ...'?

Comment 13 Orion Poplawski 2020-11-03 16:28:32 UTC
Ping.  Just updated to F33 and had to patch this again.

Comment 15 Joe Orton 2021-02-10 14:49:30 UTC
Package: subversion-1.14.1-1.fc34
Build: https://koji.fedoraproject.org/koji/buildinfo?buildID=1705901

Comment 16 NM 2021-02-10 15:07:21 UTC
I manually patched it too following instructions above. 
It would be nice to package it into a dnf package to resolve the issue once and forever. 

Comment 17 Joe Orton 2021-02-10 15:23:15 UTC
Yup, it's fixed in 1.14.1 packages.

Comment 18 NM 2021-02-10 15:38:47 UTC
Thank you very much. Do you know when it would hit the repos?

Comment 19 Joe Orton 2021-02-10 17:15:15 UTC
Package: subversion-1.14.1-1.fc35
Build: https://koji.fedoraproject.org/koji/buildinfo?buildID=1705898

Comment 20 Joe Orton 2021-02-10 17:44:25 UTC
Package: subversion-1.14.1-1.fc33
Build: https://koji.fedoraproject.org/koji/buildinfo?buildID=1705903

Comment 21 NM 2021-02-10 17:46:16 UTC
Thank you very much.

Comment 22 Fedora Update System 2021-02-11 08:30:55 UTC
FEDORA-2021-a3a0273cb2 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a3a0273cb2

Comment 23 Fedora Update System 2021-02-11 08:31:59 UTC
FEDORA-2021-16e51e39a6 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-16e51e39a6

Comment 24 Fedora Update System 2021-02-12 01:43:02 UTC
FEDORA-2021-a3a0273cb2 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 25 Fedora Update System 2021-02-12 02:25:45 UTC
FEDORA-2021-16e51e39a6 has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-16e51e39a6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-16e51e39a6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 26 Fedora Update System 2021-02-20 01:34:16 UTC
FEDORA-2021-16e51e39a6 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.