Bug 554491

Summary: /var/lib/BackupPC should be excluded from locate(1) database
Product: [Fedora] Fedora Reporter: Joel Uckelman <uckelman>
Component: BackupPCAssignee: Bernard Johnson <bjohnson>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: bjohnson, fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: BackupPC-3.2.1-1.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-09 01:37:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joel Uckelman 2010-01-11 20:27:03 UTC
Description of problem:

BackupPC keeps backups under /var/lib/BackupPC; in that directory hierarchy there will be thousands or hundreds of thousands of archived files. By default, updatedb will index /var/lib/BackupPC. There are several problems with this:

1. It makes indexing take much longer than it would otherwise, because the files under /var/lib/BackupPC far outnumber the files on the rest of the system.

2. It pollutes the it pollutes the locate database with files no one will ever want to see in locate results. For example:

[root@clio etc]# locate rpmsave
/etc/crontab.rpmsave
/var/lib/BackupPC/pc/scylla/276/f%2f/fvar/flog/fmail/fstatistics.rpmsave
/var/lib/BackupPC/pc/scylla/282/f%2f/fvar/flog/fmail/fstatistics.rpmsave
/var/lib/BackupPC/pc/scylla/287/f%2f/fvar/flog/fmail/fstatistics.rpmsave
/var/lib/BackupPC/pc/scylla/290/f%2f/fvar/flog/fmail/fstatistics.rpmsave
/var/lib/BackupPC/pc/scylla/295/f%2f/fvar/flog/fmail/fstatistics.rpmsave

In this case, 5/6 of the results are in the BackupPC archive. This is typical of the results returned by locate, for any search.

3. Running locate(1) takes significantly longer with the BackupPC files in its database than it does without them. The above query took 29 seconds. On a much slower machine which has far more non-backup data on it, but without BackupPC installed, it took less than 2 seconds.

This problem could be mitigated by adding "/var/lib/BackupPC" to PRUNEPATHS in /etc/updatedb.conf, possibly when the BackuPC RPM is installed.


Version-Release number of selected component (if applicable):

BackupPC-3.1.0-9.fc12.noarch

Comment 1 Johan Cwiklinski 2010-01-12 15:58:32 UTC
I think BackupPC rpm do not have to change any file owned by another package (maybe I'm wrong, but I'm almost sure of that).

If you do not want backup tree to be added in locate db, I think the only solution you have is to add the path yourself to the updatedb.conf file.
Another solution would be to add /var/lib/BackupPC to default updatedb.conf file, but I do not really know if it's a good idea, and how to request that.

The thing I can do for now is to add the trick in the README.fedora file.

Comment 2 Joel Uckelman 2010-01-12 19:42:07 UTC
(In reply to comment #1)
>
> Another solution would be to add /var/lib/BackupPC to default updatedb.conf
> file, but I do not really know if it's a good idea, and how to request that.

The person to ask about that would be the maintainer of the mlocate RPM, since updatedb.conf is owned by that package.

Comment 3 Joel Uckelman 2010-01-12 20:06:30 UTC
(In reply to comment #1)
> I think BackupPC rpm do not have to change any file owned by another package
> (maybe I'm wrong, but I'm almost sure of that).
>

I don't see anything in the packaging guidelines which prohibits the install script for a package from editing a config file belonging to another package:
 
https://fedoraproject.org/wiki/Packaging/Guidelines

In fact, I can think of at least one example of this: Whenever you install a new shell (e.g., bash, zsh, csh), the path to its binary is added to /etc/shells. Similarly, the path is removed when you uninstall a shell. But /etc/shells is owned by the setup package, not by any of the shell packages.

You could do

  sed -e '/PRUNEPATHS/s/"$/ \/var\/lib\/BackupPC"/' /etc/updatedb.conf

for installation, and 

  sed -e '/PRUNEPATHS/s/[ ]*\/var\/lib\/BackupPC//' /etc/updatedb.conf

for removal.

Comment 4 Joel Uckelman 2011-06-02 11:51:22 UTC
This remains broken in BackupPC-3.1.0-16.fc14.x86_64.

Comment 5 Bug Zapper 2011-06-02 16:55:46 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Joel Uckelman 2011-06-02 17:20:07 UTC
Replying to clear NEEDINFO...

Comment 7 Fedora Update System 2011-07-30 00:33:43 UTC
BackupPC-3.2.1-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/BackupPC-3.2.1-1.fc14

Comment 8 Fedora Update System 2011-07-30 00:35:22 UTC
BackupPC-3.2.1-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/BackupPC-3.2.1-1.fc15

Comment 9 Fedora Update System 2011-07-30 00:38:44 UTC
BackupPC-3.2.1-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/BackupPC-3.2.1-1.el5

Comment 10 Fedora Update System 2011-07-30 00:39:45 UTC
BackupPC-3.2.1-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/BackupPC-3.2.1-1.el6

Comment 11 Fedora Update System 2011-07-30 10:35:58 UTC
Package BackupPC-3.2.1-1.el5:
* should fix your issue,
* was pushed to the Fedora EPEL 5 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing BackupPC-3.2.1-1.el5'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/BackupPC-3.2.1-1.el5
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2011-08-09 01:37:25 UTC
BackupPC-3.2.1-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2011-08-09 01:38:53 UTC
BackupPC-3.2.1-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2011-08-16 20:55:50 UTC
BackupPC-3.2.1-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2011-08-16 21:08:09 UTC
BackupPC-3.2.1-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.