packetfence icon indicating copy to clipboard operation
packetfence copied to clipboard

Create pfconfig.conf on post installation (remove pfconfig.conf.example)

Open nqb opened this issue 2 years ago • 3 comments

Description

To avoid providing a file which will generate .rpmnew at each upgrade. Related to #7182 We still create file because pfconfig will certainly failed if pfconfig.conf is not here when it starts. This empty file will be overwritten once we go through configurator.

Impacts

  • pfconfig
  • radiusd
  • upgrade
  • fresh install

Issue

fixes #7182

Delete branch after merge

YES

NEWS file entries

Enhancements

  • Manage pfconfig.conf through upgrade scripts in place of packaging

nqb avatar Sep 06 '22 18:09 nqb

I'm doing tests to have this one working. Behavior I have at the moment:

  • Debian upgrade (from 11.2): pfconfig.conf (pre-upgrade) is kept and pfconfig.conf.defaults is now installed. Works as expected.

=> Owner of pfconfig.conf.defaults was root/root in place of pf/pf at end of installation (not the case on devel)

  • EL upgrade: my upgrade is currently failing due to an issue and I'm not sure it's related to my change. Investigating. Once my issue is solved, I would like to see if pfconfig.conf is staying in place or if it is saved as .rpmsave in order to handle it properly.

nqb avatar Sep 07 '22 14:09 nqb

authentication.conf need to be adjusted also.

nqb avatar Sep 09 '22 10:09 nqb

It's important to have this PR merged for v12.1.0 because current workarounds have not been applied on current PF code. Before having this PR merged, I need to work a bit on it.

nqb avatar Oct 03 '22 13:10 nqb

PR works as expected for fresh install and upgrades on both distributions.

I will not touch workarounds added by @julsemaan on maintenance/11.X in packetfence-upgrade package to remove a possible pfconfig.conf.rpmnew or pfconfig.conf.dpkg-dist because it covers use cases to upgrade to 12.0.0 from a 11.X version. This workaround will still be used but will not do anything if you upgrade to 12.1.0 and later.

nqb avatar Oct 25 '22 20:10 nqb

Ready to review and merge if everything is good.

nqb avatar Oct 25 '22 20:10 nqb