A file %%SITE_PERL%%/XML/SAX/ParserDetails.ini (/usr/local/lib/perl5/site_perl/XML/SAX/ParserDetails.ini) is updated by ports that depending textproc/p5-XML-SAX. For example, I installed textproc/p5-XML-SAX-Expat, textproc/p5-XML-Simple and textproc/p5-XML-LibXML on my machine. They appended some entries for them to ParserDetails.ini. It occurs checksum mismatch when executing `pkg check -s textproc/p5-XML-SAX`. Sorry, I don't have a solution for fix it.
Auto-assigned to maintainer perl@FreeBSD.org
Is there something to fix ?
Created attachment 153574 [details] unfinished patch
Created attachment 153575 [details] test log test log of attachment 153574 [details]
echo daily_status_security_pkg_checksum_enable=\"YES\" >> /etc/periodic.conf is to enable a nice useful script.
List of ports which change ParserDetails.ini textproc/p5-XML-LibXML textproc/p5-XML-SAX-Expat textproc/p5-XML-SAX-ExpatXS
By which port is the ParserDetails.ini file used ?
(In reply to Mathieu Arnold from comment #7) textproc/p5-XML-SAX - it has a load_parsers function that reads that file.
(In reply to John Hein from comment #8) textproc/p5-XML-SAX is pretty clearly the owner of this file. Other ports can munge it by calling (ultimately) XML::SAX->save_parsers(). Is there a way in the pkg infrastructure to mark a file as expected to change (i.e., don't record a checksum - or ignore checksum mismatches)? This is not really a case of @sample.
So, it is owned by XML::SAX, and XML::LibXML, XML::SAX::Expat and XML::SAX::ExpatXS add themselves to it. Are there other ? I can grok something so that it works.
Other question, how are the other OS working with it ?
(In reply to Mathieu Arnold from comment #11) The redhat package labels it a "ghost" file. Look for the ghost directive here: http://www.rpm.org/max-rpm-snapshot/s1-rpm-inside-files-list-directives.html Basically it means not to include the file in the package but remove it on uninstall - intended for logs and other things that get generated by the package during its installed lifetime. Then they have a post install scriptlet to gen the file (using save_parsers()). And some logic to try to preserve an existing ParserDetails.ini file (cp to .backup) which doesn't look quite right, but probably works in most typical cases. And a pre-uninstall scriptlet to undo that post-install stuff. The bottom line is that the file shows up in the package listing, but is ignored for package verification. Tested on Fedora 23.
(In reply to John Hein from comment #12) RPM also has a %verify directive to guide how the package checking process should handle a particular file (e.g., don't bother with the checksum or size or mtime). Their package for perl-XML-SAX doesn't use that, but it could have.
Is this still relevant?
(In reply to w.schwarzenfeld from comment #14) Did it change anything? /usr/local/etc/periodic/security/460.pkg-checksum reports on checksum mismatch everyday :)
Sorry, I know it and don't thought on it ;-))
attachment 153574 [details] changes not to check the checksum of %%SITE_PERL%%/XML/SAX/ParserDetails.ini and to remove it when it is not referenced. ...maybe :) It can be solved temporarily. However, ParserDetails.ini is weak against unexpected changes.
Patch seems to work. Thanks!
Created attachment 191042 [details] Updated patch for textproc/p5-XML-SAX (p5-XML-SAX-1.00)
Created attachment 191043 [details] test log log of using attachment 191042 [details]
Committed, thanks.
A commit references this bug: Author: pi Date: Tue Feb 27 07:15:55 UTC 2018 New revision: 463111 URL: https://svnweb.freebsd.org/changeset/ports/463111 Log: textproc/p5-XML-SAX: fix checksum mismatch for ParserDetails.ini - The file %%SITE_PERL%%/XML/SAX/ParserDetails.ini is updated by ports that depending textproc/p5-XML-SAX. - For example, textproc/p5-XML-SAX-Expat, textproc/p5-XML-Simple and textproc/p5-XML-LibXML append something to the .ini file. - This causes checksum mismatch when executing `pkg check -s textproc/p5-XML-SAX` The fix provides a pkg-install program to handle the file in post-install. PR: 197011 Submitted by: Tatsuki Makino <tatsuki_makino@hotmail.com> Reviewed by: John Hein, mat, Walter Schwarzenfeld <w.schwarzenfeld@utanet.at> Changes: head/textproc/p5-XML-SAX/Makefile head/textproc/p5-XML-SAX/files/patch-Makefile.PL head/textproc/p5-XML-SAX/files/pkg-install.in head/textproc/p5-XML-SAX/pkg-plist