#341 Issue closed
: Debian wheezy package on OBS overwrites local.conf during update¶
Labels: bug
matsimon opened issue at 2013-12-04 10:06:¶
Hi
I've found an interesting issue while updating the Debian package on a couple of our system that used the package from OBS.
Although the source suggests (packaging/debian) that local.conf should be considered as config file and thus not be overwritten - it still happens.
Is it a problem with OBS or with the packaging?
schlomo commented at 2013-12-04 10:16:¶
I noticed that already a few years back and was not able to tell the
reason
because I don't know enough about how DEB packages function internally.
Can
you please post this onto the mailing list, maybe now we have someone
with
more DEB packaging know-how.
On 4 December 2013 11:06, Mat Simon notifications@github.com wrote:
Hi
I've found an interesting issue while updating the Debian package on a
couple of our system that used the package from OBS.Although the source suggests (packaging/debian) that local.conf should be
considered as config file and thus not be overwritten - it still happens.Is it a problem with OBS or with the packaging?
—
Reply to this email directly or view it on GitHubhttps://github.com/rear/rear/issues/341
.
matsimon commented at 2013-12-04 15:39:¶
Thanks, done:
http://pikachu.3ti.be/pipermail/rear-users/2013-December/002829.html
Would great if someone comes up with an idea :-)
Currently my "workaround" that I've found is placing local.conf in an
alternate location that doesn't get touched by a rear package update and
running rear with the option for using that directory for
configurations.
(i.e. rear -c /etc/rear.local mkbackup
)
schlomo commented at 2013-12-04 16:24:¶
Btw. What about site.conf? If that is not part of the package then just
use
it. It is meant for that purpose.
Am 04.12.2013 16:39 schrieb "Mat Simon" notifications@github.com:
Thanks, done:
http://pikachu.3ti.be/pipermail/rear-users/2013-December/002829.htmlWould great if someone comes up with an idea
Currently my "workaround" that I've found is placing local.conf in an
alternate location that doesn't get touched by a the package update and
running rear with the option for using that directory for configurations.
(i.e. rear -c /etc/rear.local mkbackup)—
Reply to this email directly or view it on GitHubhttps://github.com/rear/rear/issues/341#issuecomment-29815243
.
matsimon commented at 2013-12-04 16:36:¶
Yes, that one is not part of the package, thanks for heads-up! 👍
Nonetheless, fixing this behavour would make things more consistent.
gdha commented at 2013-12-09 08:28:¶
the following page might shows us how to fix this? https://wiki.debian.org/DpkgConffileHandling
gdha commented at 2013-12-09 09:01:¶
This link is even better I think http://raphaelhertzog.com/2010/09/21/debian-conffile-configuration-file-managed-by-dpkg/
schlomo commented at 2013-12-09 13:39:¶
Thanks but both links don't tell us why OBS-built DEBs lack the
conffiles.
I tried adding it to
https://build.opensuse.org/package/show/Archiving:Backup:Rear/rear-1.15
but
it did not help (BTW, rear-1.15 builds had been lacking previously??).
According to
http://en.opensuse.org/openSUSE:Build_Service_Debian_builds
OBS
supports two modes for DEB building: DSC based and with debian.* files.
ATM
it looks like we mix both ways. I think that we should switch to
DSC-based
building as that will for sure support also conffiles.
Regards,
Schlomo
On 9 December 2013 10:01, gdha notifications@github.com wrote:
This link is even better I think
http://raphaelhertzog.com/2010/09/21/debian-conffile-configuration-file-managed-by-dpkg/—
Reply to this email directly or view it on GitHubhttps://github.com/rear/rear/issues/341#issuecomment-30115198
.
gdha commented at 2013-12-18 08:13:¶
perhaps we could use a preinst
script to assist in making a backup
copy of `local.conf``?
Reiner030 commented at 2014-10-02 11:57:¶
Hi (informational to this bug)
# cat rear/packaging/debian/conffiles
/etc/rear/local.conf
/etc/rear/templates/RESULT_mailbody.txt
/etc/rear/templates/rear.help
/etc/rear/templates/EFI_readme.txt
/etc/rear/templates/RESULT_usage_USB.txt
/etc/rear/templates/PXE_pxelinux.cfg
/etc/rear/templates/RESULT_usage_PXE.txt
/etc/rear/templates/RESULT_usage_ISO.txt
/etc/rear/templates/ISO_isolinux.cfg
looks ok for me in actual repo (but I have no much debian package
experience yet).
Sadly the build package still didn't know about these files...
# dpkg-query -W -f='${Version}\t${binary:Package}\n${Conffiles}\n' "rear"
1.16.1-1 rear
# dpkg-query -W -f='${Version}\t${binary:Package}\n${Conffiles}\n' "apt"
0.9.7.9+deb7u5 apt
/etc/logrotate.d/apt 179f2ed4f85cbaca12fa3d69c2a4a1c3
/etc/apt/apt.conf.d/01autoremove b9bbfaa2954b0499576b8d00c37d6a34
/etc/cron.daily/apt 6a9df5d143022d22b2e89fa7c1bac8aa
Reiner030 commented at 2014-10-13 16:20:¶
I searched a little for a nice compare package ... I think logrotate has there easy content to add also for rear:
debian/logrotate.install:
logrotate usr/sbin/
debian/logrotate.conf etc/
and... like rpm spec ?: logrotate.spec:
[...]
%install
rm -rf $RPM_BUILD_ROOT
make PREFIX=$RPM_BUILD_ROOT MANDIR=%{_mandir} install
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib
install -p -m 644 examples/logrotate-default $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.conf
install -p -m 755 examples/logrotate.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily/logrotate
touch $RPM_BUILD_ROOT/%{_localstatedir}/lib/logrotate.status
[...]
%files
%defattr(-,root,root)
%doc CHANGES COPYING
%attr(0755, root, root) %{_sbindir}/logrotate
%attr(0644, root, root) %{_mandir}/man8/logrotate.8*
%attr(0644, root, root) %{_mandir}/man5/logrotate.conf.5*
%attr(0755, root, root) %{_sysconfdir}/cron.daily/logrotate
%attr(0644, root, root) %config(noreplace) %{_sysconfdir}/logrotate.conf
%attr(0755, root, root) %dir %{_sysconfdir}/logrotate.d
%attr(0644, root, root) %verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/logrotate.status
[...]
Reiner030 commented at 2014-10-13 17:35:¶
ah, its much easier ... a program call was missing ;) => https://github.com/rear/rear/pull/474
# dpkg -i /usr/src/rear_1.16.1-1_all.deb
(Reading database ... 75201 files and directories currently installed.)
Preparing to replace rear 1.16.1-1 (using /usr/src/rear_1.16.1-1_all.deb) ...
Unpacking replacement rear ...
Setting up rear (1.16.1-1) ...
Configuration file `/etc/rear/local.conf'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** local.conf (Y/I/N/O/D/Z) [default=N] ?
Reiner030 commented at 2014-10-16 21:09:¶
Fix was merged by owner ... would be nice if some 3rd person could prove it ;)
gdha commented at 2016-09-07 14:43:¶
Since then no-one complained - will close it
[Export of Github issue for rear/rear.]