From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: Re: [PATCH v2] Core Update 165: Rename squid-accounting add-on to proxy-accounting Date: Sat, 19 Mar 2022 16:13:50 +0100 Message-ID: <6854d114-f1b7-4a7f-3a95-2cc8c0bed3fe@ipfire.org> In-Reply-To: <78c7f769-881d-1254-e93e-55b9ba24cce6@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9039422711028595404==" List-Id: --===============9039422711028595404== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi All, Just changing the filename in the cache is not sufficient. Investigating further the proxy-accounting or squid-accounting does not show = up in the Available Updates: box. The packages_list.db has squid-accounting;1.0.4;13; and proxy-accounting;1.0.4;14; in the list and the installed addon is squid-accounting with version 13 and i= s not renamed to proxy-accounting until the upgrade button is pressed. As the new addon name is different to the old addon name they are considered = different packages and therefore not listed in the Available Updates box. At the moment I still haven't been able to figure out how to get it to realis= e that squid-accounting and proxy-accounting are the same addon and needs to = be listed as available for upgrade. Regards, Adolf. On 19/03/2022 15:18, Adolf Belka wrote: > Hi Matthias and all, > > I may have found what I need to change. > > In my updated /var/cache/pakfire/ directory I have squid-accounting-1.0.4-1= 3.ipfire > > So there is not a proxy-accounting-1.0.4-14.ipfire package present, which I= would expect if this addon has been updated. > > I suspect that this package file name need to be changed to proxy-accountin= g-1.0.4-13.ipfire so that the new version will be added to be updated. > > > I will give that a try with my vm system. Have squid-accounting installed o= n a CU164 version and then manually rename that package file in the cache and= then run the CU165 Testing update. > > If that works then I know what filename change I need to add into the Core = Update 165 update.sh script. > > Regards, > > Adolf. > > On 19/03/2022 15:04, Adolf Belka wrote: >> Hi Matthias, >> >> On 19/03/2022 14:27, Matthias Fischer wrote: >>> Hi Adolf, >>> >>> I hope I get this right: >>> >>> As I see it, 'acct.en.pl' - together with the other files needed for >>> this package - is located in the directory 'src/squid-accounting/'. >> Correct >>> >>> You may want to rename this directory to 'src/proxy-accounting'!? ;-) >> Michael only wanted me to rename directories and filenames that would be s= een by people using the WUI so I left the source as it was. >>> >>> IMHO, all you have to do is to change 'acct.*.pl' as you want to and >>> bump the version number in the 'lfs'-file ('lfs/squid-accounting'). >> That is what I had already done. The PAK_VER was changed from 13 to 14. Ho= wever the filename was also changed from squid-accounting to proxy-accounting. >>> >>> The 'update.sh' file you're searching for is in >>> 'src/paks/squid-accounting/', together with 'install' and 'uninstall'. >>> But I think this won't need a change. >> Those pak files have not been changed. The update.sh script I meant is the= one in config/rootfiles/core/165/update.sh when using the current master rep= ository. This update.sh script had some lines added by Peter to ensure that p= eople who already had squid-accounting installed would have their filenames u= pdated to proxy-accounting. >> >> After that was done I realised that there were two more files that needed = to have their name changed. That was the easy bit. >> >> The problem is that if you install the proxy-accounting addon in CU165 the= n everything works perfectly. If you have squid-accounting installed in CU164= or earlier then the update fro version 13 squid-accounting to version 14 pro= xy-accounting does not install the new acct.en.pl lang file that I had update= d in my patch (even though on a new install it is correctly installed). >> >> Since I wrote the previous email I have been wondering if updated addons a= re included because the PAK_VER number is incremented for a specific addon fi= lename. This might give a problem because the filename of the addon also chan= ges in pakfire so maybe the Core Update process from 164 to 165 does not end = up running the update.sh pak file for squid-accounting because it doesn't loo= k like the PAK_VER has changed because it is for a different addon name. >> >> Thanks for the input Matthias. I probably didn't make my situation clear e= nough for someone looking at this for the first time. >> >> Looking back at the IPFire history it looks like the name of an existing a= ddon has never been changed so everyone is feeling their way to figure out ho= w to ensure people that have this addon already installed get it properly upd= ated. >> >> Regards, >> Adolf. >>> >>> HTH, >>> Matthias >>> >>> On 19.03.2022 14:09, Adolf Belka wrote: >>>> Hi All, >>>> >>>> I am trying to do an update of this patch for /core/165/update.sh relate= d to the proxy-accounting addon. >>>> >>>> I was able to fairly easily copy the approach from Peter on the earlier = lines to create mv lines for the backup file and the includes file for squid-= accounting to proxy-accounting. >>>> >>>> >>>> What I have not been able to figure out is how to get the updated acct.e= n.pl language file included in the update. >>>> >>>> I would expect that any changed addon would have its update.sh pak file = run but I can't figure out where that is defined and it doesn't look like it = happened with Core Update 165 Testing as an already installed version stays w= ith the old language names. >>>> >>>> Can anyone help me with how to get this new lang file installed for any = one who already has an existing installed squid-accounting/proxy-accounting i= nstallation. >>>> >>>> >>>> Regards, >>>> >>>> Adolf. >>>> >>>> On 18/03/2022 14:46, Adolf Belka wrote: >>>>> Hi Peter, >>>>> >>>>> I didn't notice at the time, my fault, but two additional files need to= have their names changed with this patch. I just found it out when testing a= CU from 164 to 165 Testing with squid-accounting installed as an addon in th= e CU164 version. >>>>> >>>>> >>>>> The files needing changing are:- >>>>> >>>>> /var/ipfire/backup/includes/squid-accounting to /var/ipfire/backup/incl= udes/proxy-accounting >>>>> >>>>> /var/ipfire/backup/includes/squid-accounting.ipf to /var/ipfire/backup/= includes/proxy-accounting.ipf >>>>> >>>>> Regards, >>>>> >>>>> Adolf. >>>>> >>>>> On 05/03/2022 21:40, Adolf Belka wrote: >>>>>> Hi Peter, >>>>>> >>>>>> On 05/03/2022 15:45, Peter M=C3=BCller wrote: >>>>>>> https://lists.ipfire.org/pipermail/development/2022-February/012482.h= tml >>>>>>> >>>>>>> The second version of this patch omits bogus directives for restartin= g a >>>>>>> service, which proxy-accounting is not. >>>>>> Thanks very much for figuring this out. I will note this so that when = I need to do it in future I know how to approach it. >>>>>> >>>>>> Lucky thing is that all of the packages that were in my perl renaming = patch set were all core packages with none being addons so this approach is n= ot needed for any of them. >>>>>> >>>>>> Regards, >>>>>> Adolf. >>>>>>> Cc: Michael Tremer >>>>>>> Cc: Adolf Belka >>>>>>> Signed-off-by: Peter M=C3=BCller >>>>>>> --- >>>>>>> =C2=A0=C2=A0 config/rootfiles/core/165/update.sh | 8 ++++++++ >>>>>>> =C2=A0=C2=A0 1 file changed, 8 insertions(+) >>>>>>> >>>>>>> diff --git a/config/rootfiles/core/165/update.sh b/config/rootfiles/c= ore/165/update.sh >>>>>>> index fe4449fff..f505628e4 100644 >>>>>>> --- a/config/rootfiles/core/165/update.sh >>>>>>> +++ b/config/rootfiles/core/165/update.sh >>>>>>> @@ -97,6 +97,14 @@ rm -rvf \ >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /var/ipfire/dhcpc/dhcpcd-hooks/1= 0-mtu \ >>>>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /var/ipfire/firewall/p2protocols >>>>>>> =C2=A0=C2=A0 +# Rename squid-accounting add-on to proxy-accounting, i= f installed >>>>>>> +# (see: https://lists.ipfire.org/pipermail/development/2022-February= /012482.html) >>>>>>> +if [ -e "/opt/pakfire/db/installed/meta-squid-accounting" ] && [ -e = "/opt/pakfire/db/meta/meta-squid-accounting" ]; then >>>>>>> +=C2=A0=C2=A0=C2=A0 mv -v /opt/pakfire/db/installed/meta-squid-accoun= ting /opt/pakfire/db/installed/meta-proxy-accounting >>>>>>> +=C2=A0=C2=A0=C2=A0 mv -v /opt/pakfire/db/meta/meta-squid-accounting = /opt/pakfire/db/meta/meta-proxy-accounting >>>>>>> +=C2=A0=C2=A0=C2=A0 mv -v /opt/pakfire/db/rootfiles/squid-accounting = /opt/pakfire/db/rootfiles/proxy-accounting >>>>>>> +fi >>>>>>> + >>>>>>> =C2=A0=C2=A0 # Stop services >>>>>>> =C2=A0=C2=A0 =C2=A0 # Extract files >>>>>> >>> --===============9039422711028595404==--