Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: Sashank999 on November 07, 2020, 02:05:15 AM

Title: A possible solution to Version Control in TCL
Post by: Sashank999 on November 07, 2020, 02:05:15 AM
Just posting thinking that this subsection is correct. Correct me if I am not.

MD5 Salting

Yes. We could use that. What I actually try to say is that a TCL User downloads some files as part of getting the tcz. They are :
1. The tcz itself
2. The .tcz.dep file (may not exist)
3. The .tcz.md5.txt file

As we don't actually prefer modifying the tcz, I recommend to salt the md5 hash.
What we do is that add 4 (four) alphanumeric characters(which are the version numbers) to the end of the hash in the md5.txt (not to the end of the file).
While scripting or verifying, we could just remove them using command "cut -c 1-32" (MD5 hashes are 32 characters long) to get the original hash.
Well, this includes some more scripting and I am very happy to help with that. This solves the problem of version control  and also (maybe) speeds up the tce-update.

TL;DR - By adding version string to end of MD5 Hash in the .md5.txt file, we could actually get the version of a tcz and update the tcz without getting the .info file of the tcz.

And also, (I can't actuually wait for the announcement from TCL Team) when is TCL v12 released ?
Title: Re: A possible solution to Version Control in TCL
Post by: curaga on November 07, 2020, 11:08:53 AM
The md5sums are already fetched in one file, md5.db.gz.
Title: Re: A possible solution to Version Control in TCL
Post by: Sashank999 on November 07, 2020, 08:08:05 PM
And by adding the version numbers into the repo's md5.db.gz, we could check the version of all tczs in the tce dir.
Title: Re: A possible solution to Version Control in TCL
Post by: curaga on November 07, 2020, 11:44:34 PM
Why? The version number is only for the user. The md5sum is used by the update check.
Title: Re: A possible solution to Version Control in TCL
Post by: Sashank999 on November 08, 2020, 05:29:39 AM
I am saying tht we don't need to download md5.db.gz.

We actually create a version.db.gz which has only two columns - tcz name and its 4 character version string. We can have less load on the repo by replacing 32 bit hashes with the version.db.gz. It will look so tiny !
Title: Re: A possible solution to Version Control in TCL
Post by: Paul_123 on November 08, 2020, 07:18:00 AM
What’s the point, unless we keep multiple versions, and version dependency, I don’t understand any benefit.

 In a lot of cases, there is not a version change of the underlying package, but just a recompilation, or repackaging of the same extension.  So the version would just be a package version.