freebsd-update-server findstamps() problem

Rick Miller vmiller at
Thu Jul 23 15:40:52 UTC 2015

Hi all,

Utilizing Colin Percival's freebsd-update-server[1] and instructions[2],
I'm building update server content for a customized FreeBSD distribution,
which appears to work, but exhibits unexpected behavior.  Can someone
review and provide information that may help me track this down?

The behavior manifests itself in the findstamps() function during the
while() loop that executes the findstamps binary (reference code below).
The input, as specified in, resulting in the behavior is:


The files as they exist on the disk are as follows:

$ ls -ld world0/R/trees/world/doc/usr/share/doc/psd/13.rcs/paper.ascii.gz
-r--r--r--  1 root  wheel  22287 Jul 21 18:28
-r--r--r--  1 root  wheel  22290 Aug 24  2016

The files are, obviously, binary gzip compressed files of differing sizes.
The output of the operation performed on these files (findstamps piped to
lam()) is evident within and illustrated below where the
file begins with ASCII, but where the bottom portion of the file contains
garbled characters, as if a binary were cat'd to STDOUT.  It is
subsequently followed by the error "findstamps: Files have different
lengths!" (note, the output is truncated to remove much of the binary

This suggests differences in buildworld and logs do exist, but admittedly,
the low-level details of generating releases is unfamiliar to me so I'm
unsure exactly how to interpret the log files.

=== Begin ===

scanner.po/     1437502232  0     0     100644  54784     `
reader.po/      1437502231  0     0     100644  5392      `
api.po/         1437502230  0     0     100644  38640     `
#   date: Tue Jul 21 18:29:06 2015
findstamps: Files have different lengths!

=== End ===

=== Begin findstamps() code snippet ===

        # Find stamps!
        tr '|' ' ' < ${WORKDIR}/ |
            while read C SC F; do
                echo "FP = ${FP}"
                if file -b ${WORKDIR}/$1/${FP} | grep -q "text"; then
                        echo "text"
                        ${BINDIR}/findstamps -t         \
                            ${WORKDIR}/$1/${FP} ${WORKDIR}/$2/${FP} |
                            lam -s "${C}|${SC}|${F}|t|" -
                        echo "binary"
                        ${BINDIR}/findstamps            \
                            ${WORKDIR}/$1/${FP} ${WORKDIR}/$2/${FP} |
                            lam -s "${C}|${SC}|${F}|b|" -
            done > ${WORKDIR}/        \
                2> ${WORKDIR}/

=== End findstamps() code snippet ===


Take care
Rick Miller

More information about the freebsd-questions mailing list