freebsd-update-server findstamps() problem
Rick Miller
vmiller at hostileadmin.com
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 stampedfiles.new, resulting in the behavior is:
world|doc|/usr/share/doc/psd/13.rcs/paper.ascii.gz
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
world1/R/trees/world/doc/usr/share/doc/psd/13.rcs/paper.ascii.gz
-r--r--r-- 1 root wheel 22287 Jul 21 18:28
world0/R/trees/world/doc/usr/share/doc/psd/13.rcs/paper.ascii.gz
-r--r--r-- 1 root wheel 22290 Aug 24 2016
world1/R/trees/world/doc/usr/share/doc/psd/13.rcs/paper.ascii.gz
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 stampvalues.new 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
output).
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 stampvalues.new ===
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
?"?
r
3
I?
|?
?$??w
s=??????????x???O????<????????????z?Y??ܾ?F??,wE?o?m?7??E?????ͯ?U?]?????oW?2
...
,?C?D?????n??!sY?Xe??D???v????N?N??vz??M.?q.?%?ż?\ĕ??;????_?j~???~)+yb!??_??vU????7?X???6?3z????m??
findstamps: Files have different lengths!
=== End stampvalues.new ===
=== Begin findstamps() code snippet ===
# Find stamps!
tr '|' ' ' < ${WORKDIR}/stampedfiles.new |
while read C SC F; do
FP="R/trees/${C}/${SC}${F}"
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|" -
else
echo "binary"
${BINDIR}/findstamps \
${WORKDIR}/$1/${FP} ${WORKDIR}/$2/${FP} |
lam -s "${C}|${SC}|${F}|b|" -
fi
done > ${WORKDIR}/stamplocations.new \
2> ${WORKDIR}/stampvalues.new
=== End findstamps() code snippet ===
[1] https://svnweb.freebsd.org/base/user/cperciva/freebsd-update-build/
[2]
https://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/index.html
--
Take care
Rick Miller
More information about the freebsd-questions
mailing list