Solved pkg-check always found checksum mismatch, i.e. pkg-install always install package with error

Situation: because of power issues, consequent filesystem errors, pkg database corruption I ran pkg check. And after series of pkg install -f, pkg check I ended up with one file in one package, that every time not extracted fully, thus pkg-check always complains. Really, the file is not extracted fully. I delete package from cache, pkg-install fetched it again, and again the same results. If I extract file from package manually, put file in place -- all o.k. (pkg check do not complain).
Appeared on FreeBSD x64 15.0-RELEASE. Same result on 14.3-RELEASE, installed alongside on same machine. Same result on x64 15.0-RELEASE inside virtualbox. All fresh installations.
I think, it's interesting thing to debug. How to debug it?
Result of
Code:
pkg check gcc-arm-embedded

Code:
Checking gcc-arm-embedded:
gcc-arm-embedded-14.2r1_1: checksum mismatch for /usr/local/gcc-arm-embedded-14.2.rel1/share/info/dir
Checking gcc-arm-embedded... done
pkg is
Code:
pkg-2.5.1

(upd)
Considering transition to installing base system via packages I think it's worth to cope with it and maybe report it elsewhere, I just do not know where ....
 
If I extract file from package manually, put file in place -- all o.k. (pkg check do not complain).
Weird. Seems the file gets modified when it's being installed.
Code:
root@fbsd-test:~/test # pkg check gcc-arm-embedded
Checking gcc-arm-embedded:   0%
gcc-arm-embedded-14.2r1_1: checksum mismatch for /usr/local/gcc-arm-embedded-14.2.rel1/share/info/dir
Checking gcc-arm-embedded: 100%
root@fbsd-test:~/test # tar -zxvf /var/cache/pkg/gcc-arm-embedded-14.2r1_1.pkg
<snip>
root@fbsd-test:~/test # sha256sum usr/local/gcc-arm-embedded-14.2.rel1/share/info/dir
1e1d4e8f88014ff65833952b4733a2f7daa2760873536a28645ba4f7f7f4cc43  usr/local/gcc-arm-embedded-14.2.rel1/share/info/dir
root@fbsd-test:~/test # sha256sum /usr/local/gcc-arm-embedded-14.2.rel1/share/info/dir
a8acff78a151908f77bebcae5a887c2462af2d18a965614b354bbd16fffe75d0  /usr/local/gcc-arm-embedded-14.2.rel1/share/info/dir
File has different hashes.

Oh, hehe, original:
Code:
* Menu:

Individual utilities
* addr2line: (binutils)addr2line.               Convert addresses to file and
                                                  line.
* ar: (binutils)ar.                             Create, modify, and extract
                                                  from archives.
* c++filt: (binutils)c++filt.                   Filter to demangle encoded C++
                                                  symbols.
<snip>
Software development
* Annotate: (annotate).         The obsolete annotation interface.
* As: (as).                     The GNU assembler.
* Bfd: (bfd).                   The Binary File Descriptor library.
What gets installed:
Code:
* Menu:

Software development
* Cpp: (cpp).                  The GNU C preprocessor.
* As: (as).                     The GNU assembler.
* Gas: (as).                    The GNU assembler.
<snip>
Individual utilities
* addr2line: (binutils)addr2line. Convert addresses to file and line.
* ar: (binutils)ar.               Create, modify, and extract from archives.
* c++filt: (binutils)c++filt.     Filter to demangle encoded C++ symbols.

The order and the line length are different. No idea why this is happening though.
 
ups, looks like I going to understand: there are post-install and post-deinstall script. That file just regenerated by indexinfo.
As for me, weird behavior.

But at this point, i do not now, if it must be done to *info* system work. What do you think, is it worth to ask maintainer?
Moreover, there one more mistake:
/usr/local/gcc-arm-embedded symlink is a little incorrect.
 
answer myself: Yes. it worth.
Comparing to gcc14 there also .info files, and also *-install scripts, and also indexinfo work there. But no "dir" file in package, it's generated after install. So no pkg-check complains.

As I can understand, it worth generating before and after as there may be other packages putting more files into target folder.

Good, I was afraid I find a bug in pkg while FreeBSD going to use it globally.
 
Comparing to gcc14 there also .info files, and also *-install scripts, and also indexinfo work there. But no "dir" file in package, it's generated after install. So no pkg-check complains.
Right. But for some reason that dir file got included with the gcc-arm-embedded package, which then causes the pkg-check(8) issue. You should definitely report it so it can be fixed (and bring it inline with the others).
 
Back
Top