On Mon, Jun 2, 2014 at 8:25 PM, Simon Flood <S.M.Flood@uis.cam.ac.uk> wrote:
On 02/06/2014 12:18, Fajar A. Nugraha wrote:
The above might not be your main concern (since you've got it fixed), but I wonder where did you get the RPM from. The bundled suse specfile has
%config(noreplace) %{_sysconfdir}/raddb/*
which, in theory, should leave your config files alone.
If you got the RPM from suse, then you should file a bug to them.
I built the RPM using the openSUSE Build Service from the freeradius.spec file included within the freeradius-server-2.2.5.tar.bz2 file.
What I didn't spot was that files in /etc/raddb/sites-available would be overwritten when installing the later RPM courtesy of
%attr(640,root,radiusd) %{_sysconfdir}/raddb/sites-available/*
whereas files in /etc/raddb/sites-enabled/ are not
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/sites-enabled/*
The difference being the absence/presence of "%config(noreplace)".
Ouch. Sorry about that. Turned out it was partially my fault, partially suse's fault. That line was part of my pull request a long time ago to make FR's recipe closer to suse's own recipe. The problem is, turns out that even now, suse's own recipe on https://build.opensuse.org/package/view_file/network:aaa/freeradius-server/f... line 380 shows %attr(640,root,radiusd) %{_sysconfdir}/raddb/sites-available/*
Checking the latest freeradius.spec for SUSE @ https://raw.githubusercontent.com/FreeRADIUS/freeradius-server/v2.x.x/suse/f... shows this is still the case. The "%config(noreplace) %{_sysconfdir}/raddb/*" line you reference above would appear to be from the freeradius.spec for SUSE included with FreeRADIUS 3.0.x - we're using 2.2.5.
You are correct, I was looking at the wrong branch. I believe Alan just pushed a fix 12 minutes ago, so future 2.x.x builds should be OK. -- Fajar