Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 866209 - app-backup/backuppc-4.4.0 installation puts config files in /etc rather than /etc/BackupPC
Summary: app-backup/backuppc-4.4.0 installation puts config files in /etc rather than ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Dennis Eisele
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-08-23 19:14 UTC by pogosyan
Modified: 2022-09-09 06:20 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pogosyan 2022-08-23 19:14:10 UTC
upgrading backuppc to 4.4.0 puts all config under /etc rather than /etc/BackupPC as the previous versions. This includes /etc/Backuppc/hosts file which becomes /etc/hosts and overlaps with system /etc/hosts.  

Reproducible: Always

Steps to Reproduce:
1. intstall backuppc /etc/hosts
2.
3.
Actual Results:  
Observe etc-update trying to update system /etc/hosts to /etc/hosts from backuppc


diff of ebuilds form 3.3.1-r6 and 4.4.0 version shows

67c58
< CONFDIR="/etc/BackupPC"                < 3.3.1-r6
---
> CONFDIR="${EROOT}/etc/${EPREFIX}"      < 4.4.0
76,78d66
Comment 1 Barnoid 2022-08-24 02:09:39 UTC
Came here to report the same. If not careful during the following dispatch-conf, one would overwrite /etc/hosts with the sample hosts file provided by BackupPC, so this is quite serious.

The culprit is the the ebuild, particularly in the use of ${EPREFIX} in CONFDIR:
> CONFDIR="${EROOT}/etc/${EPREFIX}"
which should instead be
> CONFIDR="${EROOT}/etc/${PN}"
Comment 2 Barnoid 2022-08-24 02:38:20 UTC
On second thoughts, earlier versions and installations from BackupPC's source use /etc/BackupPC as the config directory, so it may be better to use

> CONFDIR="/etc/BackupPC"

to make sure upgrades from 3.3.1 go smoothly.

I have tested with a local ebuild that incorporates the change above. Installation & operation seem to work fine.
Comment 3 Dennis Eisele 2022-08-24 15:03:56 UTC
Thank you very much for the hint. I changed the ebuild accordingly :)
Comment 4 Larry the Git Cow gentoo-dev 2022-09-09 06:20:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f91bedde17217b2429ae2f9ed77060575aebe6e

commit 9f91bedde17217b2429ae2f9ed77060575aebe6e
Author:     Dennis Eisele <kernlpanic@dennis-eisele.de>
AuthorDate: 2022-08-24 14:47:56 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-09-09 06:20:49 +0000

    app-backup/backuppc: fix wrong config path from /etc to /etc/BackupPc
    
    Closes: https://bugs.gentoo.org/866209
    Signed-off-by: Dennis Eisele <kernlpanic@dennis-eisele.de>
    Closes: https://github.com/gentoo/gentoo/pull/27001
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 app-backup/backuppc/backuppc-4.4.0.ebuild | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)