Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98099 - dev-util/subversion-1.2: configuration of svn-hot-backup (num_backups)
Summary: dev-util/subversion-1.2: configuration of svn-hot-backup (num_backups)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Paul de Vrieze (RETIRED)
URL:
Whiteboard:
Keywords: Inclusion
: 94791 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-06 03:08 UTC by Urs Joss
Modified: 2005-10-17 04:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Adjust ebuild, based on subversion-1.2.0.ebuild, targetted at subversion-1.2.1 (subversion-enhance-hotbackup-and-1.2.1.patch,1.25 KB, patch)
2005-07-06 03:13 UTC, Urs Joss
Details | Diff
patch used by the ebuild to patch hot-backup.py (subversion-hotbackup-config.patch,630 bytes, patch)
2005-07-06 03:14 UTC, Urs Joss
Details | Diff
patch used by the ebuild to patch hot-backup.py (update) (subversion-hotbackup-config.patch,629 bytes, patch)
2005-07-07 12:13 UTC, Urs Joss
Details | Diff
Adjusted ebuild derived from subversion-1.2.3-r1 (subversion-1.2.3-r1.ebuild,10.83 KB, text/plain)
2005-08-29 07:41 UTC, Urs Joss
Details
Patch against the official ebuild (ebuild_hotbackup.patch,1.51 KB, patch)
2005-10-16 23:01 UTC, Urs Joss
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Urs Joss 2005-07-06 03:08:06 UTC
The script tools/backup/hot-backup.py gets installed as /usr/bin/svn-hot-backup. It contains a configurable 
parameter num_backups, defining how many copies of your backed up repositories you'd like to keep. 
Upstrems default value is 64. This tends to fill up backup partitions (at least in my case) rather quickly. It's 
ease to change the parameter, but after an upgrade of subversion, the original value of 64 is restored.

I suggest to put this configuration as an environment variable into /etc/env.d/80subversion instead. Thus 
any configuration changes survive an upgrade.

Reproducible: Always
Steps to Reproduce:
1. adjust line 37 in /usr/bin/svn-hot-backup
2. emerge subversion
3. check the changes from step 1

Actual Results:  
configuration changes disappear

Expected Results:  
configuration changes survive the upgrade

I have added a patch against the hotbackup-script (expected to be in the files directory) & a patch against 
subversion-1.2.0.ebuild to get subversion-1.2.1.ebuild.

Watch out, the latter patch also addresses the following bugs:
- Bug 98071: Update to subversion-1.2.1
- Bug 94791: Install svn-book correctly, typo.
Comment 1 Urs Joss 2005-07-06 03:13:22 UTC
Created attachment 62739 [details, diff]
Adjust ebuild, based on subversion-1.2.0.ebuild, targetted at subversion-1.2.1

Cp subversion-1.2.0.ebuild to subversion-1.2.1.ebuild. Apply patch.
Comment 2 Urs Joss 2005-07-06 03:14:21 UTC
Created attachment 62740 [details, diff]
patch used by the ebuild to patch hot-backup.py

to be placed in the filesdir
Comment 3 Urs Joss 2005-07-07 12:09:43 UTC
Comment on attachment 62740 [details, diff]
patch used by the ebuild to patch hot-backup.py

><HTML><BODY TEXT="#000000"><PRE>--- tools/backup/hot-backup.py.in.orig	2003-12-16 17:41:14.000000000 +0100
>+++ tools/backup/hot-backup.py.in	2005-07-06 10:44:55.000000000 +0200
>@@ -34,7 +34,14 @@
> svnadmin = "@SVN_BINDIR@/svnadmin"
> 
> # Number of backups to keep around (0 for "keep them all")
>-num_backups = 64
>+# Configurable in /etc/env.d/80hotbackup
>+envvar_hb_num='SVN_HOTBACKUP_NUM_BACKUPS'
>+if os.environ.has_key(envvar_hb_num):
>+	num_backups = int(os.environ[envvar_hb_num])
>+else:
>+	num_backups = 64
>+print 'Keeping up to', num_backups, 'around.'			
>+
> 
> ######################################################################
> # Command line arguments
Comment 4 Urs Joss 2005-07-07 12:13:28 UTC
Created attachment 62857 [details, diff]
patch used by the ebuild to patch hot-backup.py (update)

Sorry about that, I have initially attached a buggy version of the script. This
time it should work
Comment 5 Paul de Vrieze (RETIRED) gentoo-dev 2005-07-08 13:26:30 UTC
I'll look at this soon. I'm currently in the progress of moving. While internet
should continue to function for me, I have my arms full of paint, with only the
end of the evening to check on things like gentoo. In the meanwhile I'll submit
a 1.2.1 ebuild that is just a copy of the old one.
Comment 6 Urs Joss 2005-08-29 07:41:21 UTC
Created attachment 67175 [details]
Adjusted ebuild derived from subversion-1.2.3-r1

updated ebuild, this time not automatically writing /etc/env.d/80subversion but
referring to it in the postinstall text
Comment 7 Urs Joss 2005-08-29 07:43:48 UTC
*** Bug 94791 has been marked as a duplicate of this bug. ***
Comment 8 Urs Joss 2005-10-16 23:01:17 UTC
Created attachment 70829 [details, diff]
Patch against the official ebuild 

This patch introduces the changes discussed above against the current ebuild
subversion-1.2.3-r2.ebuild.
Comment 9 Paul de Vrieze (RETIRED) gentoo-dev 2005-10-17 04:26:22 UTC
I've just committed -r3 that implements the patches. Thanks for the patience.