Bug 12772

Summary: Please pick one: Accounting vs Squid Accounting vs Proxy Accounting
Product: IPFire Reporter: Jon <jon.murphy>
Component: ---Assignee: Adolf Belka <adolf.belka>
Status: CLOSED FIXED QA Contact:
Severity: Aesthetic Issue    
Priority: Will only affect a few users CC: michael.tremer, peter.mueller
Version: 2   
Hardware: unspecified   
OS: Unspecified   
Attachments: WebGUI for proxy accounting
WUI header page for Proxy Accounting

Description Jon 2022-02-02 19:24:31 UTC
I noticed there seem to be three names/references for Accounting (accounting, squid accounting and proxy accounting).

In pakfire it is known as "squid-accounting"

In the WebGUI Log menu is it know as "Proxy Accounting"

And on the WebGUI page at accounting.cgi it is known as Accounting (actually "Accounting settings").

We need to pick one name to avoid confusion.  I am not sure of the correct name.

I'll update the Wiki.
Comment 1 Jon 2022-02-02 20:18:47 UTC
Found another on the accounting.cgi page: "Webproxy Accounting"
Comment 2 Michael Tremer 2022-02-07 10:57:47 UTC
Hey Jon,

I would prefer to use "Proxy Accounting", because that is what we do.

squid is the software that we use for the proxy, but as a technical term it is irrelevant to the user. Just accounting doesn't specify that it is only for the traffic that is flowing through the proxy.

And we call the proxy the proxy, so that is a term that people will need to understand anyways. Web Proxy would be more complete, but I think it is fine to omit the "web", because we only have the one proxy.

I would therefore vote for "Proxy Accounting".
Comment 3 Jon 2022-02-08 00:27:29 UTC
I'll update the wiki with "Proxy Accounting".  

Can you or one of the the Devs update the add-on to change the name from "squid-accounting" to "proxy-accounting"?

And the `accounting.cgi` WebGUI page from Accounting to "Proxy Accounting"

This is very low priority...
Comment 4 Michael Tremer 2022-02-08 10:31:27 UTC
@Adolf: Is this something for you?
Comment 5 Adolf Belka 2022-02-08 12:42:26 UTC
(In reply to Michael Tremer from comment #4)
> @Adolf: Is this something for you?

Sure, no problems.
Comment 6 Michael Tremer 2022-02-08 16:04:39 UTC
Great, thank you!
Comment 7 Adolf Belka 2022-02-08 17:13:25 UTC
Hi @Michael

I can see all the changes I need to make but I have a question about if an additional change is needed or not.

There is a directory just called accounting in /var/ipfire/accounting and the log file is called accounting.log
Can these stay as they are or should they also have their names changes to include proxy?
Comment 8 Michael Tremer 2022-02-09 09:44:41 UTC
I would only change the text that is shown to the user and would leave any directory names as they are.
Comment 9 Adolf Belka 2022-02-09 11:12:46 UTC
Okay, thanks. Makes it simpler anyway.
Comment 10 Adolf Belka 2022-02-16 14:39:05 UTC
Have also discovered that the existing code expects all postcodes to only be numeric and without spaces.
The Netherlands and Great Britain are at least two countries that use alphanumeric postcodes and with spaces.

Will create a patch series that fixes the original problem of this bug in one patch and the postcode issue in a second patch.
Comment 11 Michael Tremer 2022-02-16 18:15:15 UTC
(In reply to Adolf Belka from comment #10)
> Have also discovered that the existing code expects all postcodes to only be
> numeric and without spaces.
> The Netherlands and Great Britain are at least two countries that use
> alphanumeric postcodes and with spaces.

Yes, classic localisation problem :)

> Will create a patch series that fixes the original problem of this bug in
> one patch and the postcode issue in a second patch.

I would suggest to open a separate ticket for this if needed.
Comment 12 Adolf Belka 2022-02-16 22:11:46 UTC
I will raise a new bug for it as it certainly caused me a problem with my postcode.
Comment 13 Adolf Belka 2022-02-16 22:18:02 UTC
Bug raised for the postcode issue:-

https://bugzilla.ipfire.org/show_bug.cgi?id=12777
Comment 14 Adolf Belka 2022-02-18 14:55:41 UTC
Patch submitted to dev mailing list and patchwork.

https://patchwork.ipfire.org/project/ipfire/list/?series=2594
Comment 17 Adolf Belka 2022-03-17 12:08:01 UTC
Tested out on Core Update Testing. The addon is now called Proxy Accounting in the addon list, in the backup section and in any menus.

Confirmed to be working as expected for installing after Updated to 165.

I will also test out updating a Core Update 164 system with the old squid-accounting addon name to confirm that the update process works for changing the name.
Comment 18 Adolf Belka 2022-03-18 13:41:38 UTC
I just tried doing a CU from 164 to 165 Testing with squid-accounting installed on CU164.

Most changes needing to be made were except for two files.

The /var/ipfire/backup/addons/backup/squid-accounting.ipf needs to be changed to proxy-accounting.ipf

The /var/ipfire/backup/addons/includes/squid-accounting needs to be changed to proxy-accounting.
Comment 19 Jon 2022-03-19 00:19:11 UTC
Created attachment 1020 [details]
WebGUI for proxy accounting

on the menu Logs > Proxy Accounting the title of the page should change from "Webproxy Accounting" to "Proxy Accounting".

testing: IPFire 2.27 (aarch64) - Core Update 165 Development Build: master/6b10e08a
Comment 20 Adolf Belka 2022-03-19 07:55:42 UTC
Created attachment 1021 [details]
WUI header page for Proxy Accounting

Interesting. I am running version:-
IPFire 2.27 (x86_64) - Core Update 165 Development Build: master/24e7c426

This test run was done via installing proxy-accounting after the CU165 was run.

I will redo the test of CU164 with squid-accounting updated to CU165 but as far as I remember it also showed the correct title.
I would also expect it to do so as that specific change is in the Language File and that should be updated correctly when doing a Core Update.
Comment 21 Adolf Belka 2022-03-19 08:03:11 UTC
I just checked in the nightly builds and your version was from 17th March and mine was from 16th March but the changelog wording for this bug fix is the same for both date versions and for the aarch64 and x86_64 versions.

I will also look at creating another Core Update 164 clone and doing the update with that so it uses the same version of the build as done by @Jon
Comment 22 Adolf Belka 2022-03-19 09:51:12 UTC
OK, I have figured out what is happening here. If the new version is installed in CU165 then it works fine but if it is updated from an existing squid-accounting in CU164 and updated to CU165 then as well as the naming of the backup files mentioned in comment 18 the updated acct.en.pl language file has to be installed.

Later today I will have a look at figuring out an updated install patch on the lines of what @Peter created and extend it to deal with the lang file and the backup files.
Comment 23 Adolf Belka 2022-03-19 09:56:00 UTC
Have confirmed that if I copy the acct.en.pl language file into the IPFire that is having the problem and then run update-lang-cache then the expected new headings are seen.
Comment 24 Jon 2022-03-25 03:04:03 UTC
(In reply to Jon from comment #19)
> on the menu Logs > Proxy Accounting the title of the page should
> change from "Webproxy Accounting" to "Proxy Accounting".

The fix looks good!  Thank you!

tested on IPFire 2.27 (x86_64) - Core Update 165 Development Build: master/c55f5c8e