it would not be too difficult to create a script that diffs two distros.
the process:
1. mount two iso files (one for each distro)
2. md5sum every file
3. mount each sfs and md5sum each of those files
4. sort by md5 and line up matches, show differences in path/filename
5. list any other files/hashes the two isos do not have in common
6. ignore any items that have the same hash and location
this would highlight the changes to a distro that need to be made as part of the distro automation process.
it might take a while to create a script for automating puppy. a distdiff util could be done more quickly-- its not immediately useful to me unless people think it could be used to help create a distro automation script.
what, if anything, would you use a distdiff util for?
distdiff
It might be of some use in quickly checking that no inadvertent changes slipped into a new version of an existing pup (does occasionally happen). Just a thought.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.
-
- Posts: 1543
- Joined: Mon 22 Feb 2016, 19:43
I think peebee knows how to do this, by creating a delta file, which he uses sometimes for .1+ versions of LxPupSc. Never really understood how to make one or how to use them either though. lol
I think you can do something like cmp dir1 dir2 > file.txt but I usually end up doing diff -ru dir1 dir2 > file.txt more because I'm usually trying to find the exact lines that are different in code or scripts. Differences are interesting!
I think you can do something like cmp dir1 dir2 > file.txt but I usually end up doing diff -ru dir1 dir2 > file.txt more because I'm usually trying to find the exact lines that are different in code or scripts. Differences are interesting!
Hmmm....I wonder how welll this would work (no opinion as of yet).
I will add though, one distro should be designated as the primary distro in the merge. Also if each distro has the same file in different locations symbolic links could automatically be generated from the location where the secondary distro has the file pointing to the location to where the primary distro has the file and or folder.
md5 may be sufficient but I would write the script so that the person can choose the hash algorithm.
Actually though, I think maybe use md5 first and if it agrees then check again with a stronger hash because there is a chance if two files are different with the same md5 hash and file size that one version is a malicious version.
I will add though, one distro should be designated as the primary distro in the merge. Also if each distro has the same file in different locations symbolic links could automatically be generated from the location where the secondary distro has the file pointing to the location to where the primary distro has the file and or folder.
md5 may be sufficient but I would write the script so that the person can choose the hash algorithm.
Actually though, I think maybe use md5 first and if it agrees then check again with a stronger hash because there is a chance if two files are different with the same md5 hash and file size that one version is a malicious version.
md5 would be sufficient for the purpose intended, but sha256 would be better for security purposes. the hash utill used could be stored in a variable at the top of the script. are there other hashes worth considering? i believe sha1 is useless-- corrections welcome.s243a wrote:Actually though, I think maybe use md5 first and if it agrees then check again with a stronger hash because there is a chance if two files are different with the same md5 hash and file size that one version is a malicious version.
i have a script that compares folders, it doesnt care which the primary folder is; it works the same whether you do things in one order or reverse.
i do like your idea of stepping up the hash on matches, though im not sure id do that.
-
- Posts: 503
- Joined: Mon 09 Sep 2013, 00:00
- Location: Florida, USA
- Contact:
hashdeep, aka md5deep
hashdeep, aka md5deep, has an audit mode.
Possibly useful in a script for comparing distros.
http://www.murga-linux.com/puppy/viewto ... 090#911090
https://github.com/jessek/hashdeep/
Possibly useful in a script for comparing distros.
http://www.murga-linux.com/puppy/viewto ... 090#911090
https://github.com/jessek/hashdeep/
Re: hashdeep, aka md5deep
i think you are correct. once the iso is mounted and the sfs files are mounted, hashdeep most likely will do a fair amount of the work.version2013 wrote:hashdeep, aka md5deep, has an audit mode.
Possibly useful in a script for comparing distros.