This is it, guys. Exiv2 v0.27.3 RC2 Preview. I hope this is the code and documentation that ships in v0.27.3.

v0.27.3
Robin Mills 5 years ago
parent 0c206d1d63
commit 4eeb5e2c21

5
.gitignore vendored

@ -11,11 +11,14 @@
cmake-* cmake-*
build* build*
asan_build* asan_build*
xcode_build*
msvc_build*
cygwin_build*
mingw_build*
po/POTFILES po/POTFILES
po/remove-potcdate.sed po/remove-potcdate.sed
po/stamp-po po/stamp-po
src/doxygen.hpp src/doxygen.hpp
test/tmp/* test/tmp/*
doc/html doc/html
contrib/vms/.vagrant contrib/vms/.vagrant

@ -11,6 +11,15 @@ Release Notes:
https://github.com/Exiv2/exiv2/issues/1018#issuecomment-604539346 https://github.com/Exiv2/exiv2/issues/1018#issuecomment-604539346
Bugs/Fixes Bugs/Fixes
#1213 | Cleanup
#1209 | fix_1208_NikonLens_0.27 #1208
#1197 | Add c++11 support 0.27
#1193 | geotag changes
#1190 | Bump Revision Number to 0.27.3.1
#1189 | Manpage Makeover
#1188 | Update ChangeLog for v0.27.3 RC1
#1187 | Taglist command parsing correction
#1185 | Update release notes v0.27.3 RC1 #1185 | Update release notes v0.27.3 RC1
#1183 | fix_1180_date_separator #1183 | fix_1180_date_separator
#1178 | Reduce system calls in FileIo::eof() #1178 | Reduce system calls in FileIo::eof()
@ -45,6 +54,7 @@ Bugs/Fixes
#927 | Translation Exiv2 in Dutch (nl) Translation #927 | Translation Exiv2 in Dutch (nl) Translation
Security Security
#1210 | Insufficient verification (cycle) in Image::printIFDStructure()
#1141 | fix 1091 Fix unbounded recursion in bigtiffimage.cpp #1141 | fix 1091 Fix unbounded recursion in bigtiffimage.cpp
#1116 | fix_1099_0.27 exiv2 aborts with registerNs #1116 | fix_1099_0.27 exiv2 aborts with registerNs
#1115 | fix_1097_0.27 Segfault of exiv2 with pr flag #1115 | fix_1097_0.27 Segfault of exiv2 with pr flag
@ -55,6 +65,11 @@ Security
#1125 | fix_984_0.27 NULL-pointer read in XMPMeta.cpp #1125 | fix_984_0.27 NULL-pointer read in XMPMeta.cpp
Build Infrastructure Build Infrastructure
#1218 | CMake issues concerning install and uninstall
#1213 | Setting LD_LIBRARY_PATH during tests
#1211 | http.cpp fails to compile on mingw/cygwin
#1201 | Cannon link prebuilt MinGW binaries in Qt project
#1200 | Numerous improvements to Appveyor and GitLib CI builds
#1184 | fix_1121_CODEOWNERS_0.27 #1184 | fix_1121_CODEOWNERS_0.27
#1181 | GCC 9.3.0 broken on MinGW/msys2 and CYGWIN #1181 | GCC 9.3.0 broken on MinGW/msys2 and CYGWIN
#1175 | fix_1102_msysGCC93_0.27 #1175 | fix_1102_msysGCC93_0.27
@ -66,6 +81,7 @@ Build Infrastructure
#1121 | Add CODEOWNERS #1121 | Add CODEOWNERS
Test Infrastructure Test Infrastructure
#1207 | Extensive changes and clarifications in README.md
#1174 | add http test to iotest.sh #1174 | add http test to iotest.sh
#1172 | Fix 1164 unit tests 0.27 #1172 | Fix 1164 unit tests 0.27
#1173 | enhanced_test6_0.27 #1173 | enhanced_test6_0.27

@ -6,27 +6,32 @@ Headline Features of Exiv2 v0.27.3
Thank you to Phil, Sridhar, Luis, Kevin, and Andreas S for working with me on the release. Thank you to Phil, Sridhar, Luis, Kevin, and Andreas S for working with me on the release.
As always, thanks to my wife Alison and our cat Lizzie for their support. As always, thanks to my wife Alison and our cat Lizzie for their support.
1) Bug and security fixes 1) Bug and security fixes:
- Security fixes
- Improved Unicode/charset handling in comments
- Improved lens recognition - Improved lens recognition
- Updated Catalan and Dutch localisation - Updated Catalan and Dutch localisation
2) Changes to downloadable build bundles:
- Revised documentation and man page
- Replace license.txt with COPYING - Replace license.txt with COPYING
- Removed contrib/ directory from bundle - Removed contrib/ directory from bundle
- share/locale has localisation files - share/locale has localisation files
- Security fixes - msvc bundle built with vs2019
2) Build, test and documentation 3) Build and Test:
- Improved documentation and man page - Support for C++11 and C++14
- Improved test harness and documentation - Improved test harness and documentation
- Visual Studio test support - Test support for Visual Studio
- Cross compiling support - Cross compiling support
- UNIX support (Solaris, FreeBSD and NetBSD) - UNIX support (Solaris, FreeBSD and NetBSD)
- http test support (WIP) - Http test support
3) New Additions 4) Additions:
- contrib/vs2019 Visual Studio support - contrib/vs2019 Visual Studio support
- contrib/Qt Qt sample project
- .github/CONTRIBUTORS file - .github/CONTRIBUTORS file
- Defined security process (TBD) - Defined security process (TBD)
- Exif 2.32 support (TBD)
Detailed Change List since 0.27.2 Detailed Change List since 0.27.2
--------------------------------- ---------------------------------
@ -39,11 +44,11 @@ Future Releases
I returned from retirement to undertake the 0.27.3 project. I returned from retirement to undertake the 0.27.3 project.
It's likely that I will work on 0.27.4 in Spring 2021. It's likely that I will work on 0.27.4 in Spring 2021.
Team Exiv2 are looking for contributors to work on Exiv2 v0.28 Team Exiv2 is looking for contributors to work on Exiv2 v0.28
Robin Mills Robin Mills
robin@clanmills.com robin@clanmills.com
2020-04-27 2020-05-23
------------------------- -------------------------
Release Notes for v0.27.2 Release Notes for v0.27.2

@ -2,6 +2,7 @@
# Library of bash functions use by test/*.sh # Library of bash functions use by test/*.sh
# The scripts begin "source functions.source" # The scripts begin "source functions.source"
# Don't detab this file! removeTest() addModTest() need them!
## ##
# run a test # run a test
@ -25,7 +26,7 @@ echoTest()
{ {
local count=1 local count=1
for i in $@ ; do for i in $@ ; do
echo $((count++)): $i echo $((count++)): $i
done done
echo ----------------------- echo -----------------------
} }
@ -83,197 +84,197 @@ copyTestFiles()
# result analysis # result analysis
reportTest() reportTest()
{ {
cat $results | tr '\\' '/' > ${results}-new cat $results | tr '\\' '/' > ${results}-new
mv -f ${results}-new $results mv -f ${results}-new $results
if [ ! -z `which dos2unix` ]; then if [ ! -z `which dos2unix` ]; then
dos2unix $results >/dev/null 2>&1 dos2unix $results >/dev/null 2>&1
fi fi
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
lhs=$results lhs=$results
rhs=$good rhs=$good
else else
if [ $# -eq 3 ] ; then if [ $# -eq 3 ] ; then
diffargs=$1 diffargs=$1
lhs=$2 lhs=$2
rhs=$3 rhs=$3
else else
lhs=$1 lhs=$1
rhs=$2 rhs=$2
fi fi
fi fi
if [ "$PLATFORM" == "cygwin" ]; then if [ "$PLATFORM" == "cygwin" ]; then
diff $diffargs $(cygpath -aw $lhs) $(cygpath -aw $rhs) diff $diffargs $(cygpath -aw $lhs) $(cygpath -aw $rhs)
else else
diff $diffargs $lhs $rhs diff $diffargs $lhs $rhs
fi fi
rc=$? rc=$?
if [ $rc -eq 0 ] ; then if [ $rc -eq 0 ] ; then
echo "all testcases passed." echo "all testcases passed."
else else
diff $diffargs $lhs $rhs diff $diffargs $lhs $rhs
exit 3 exit 3
fi fi
} }
## ##
# moved here from write-test.sh # moved here from write-test.sh
# Function: # Function:
# runTestCase number file # runTestCase number file
# Params: # Params:
# number: Test case number # number: Test case number
# file : Input file # file : Input file
# Abstract: # Abstract:
# Run the requested test case number with the given file # Run the requested test case number with the given file
runTestCase() runTestCase()
{ {
rtc_number=$1 rtc_number=$1
rtc_infile=$2 rtc_infile=$2
rtc_outfile=test${rtc_number}.jpg rtc_outfile=test${rtc_number}.jpg
rtc_jpgthumb=thumb${rtc_number}.jpg rtc_jpgthumb=thumb${rtc_number}.jpg
rtc_tifthumb=thumb${rtc_number}.tif rtc_tifthumb=thumb${rtc_number}.tif
rm -f $rtc_outfile $rtc_jpgthumb $rtc_tifthumb rm -f $rtc_outfile $rtc_jpgthumb $rtc_tifthumb
rm -f iii ttt; rm -f iii ttt;
echo "------------------------------------------------------------" echo "------------------------------------------------------------"
runTest exifprint $rtc_infile > iii; runTest exifprint $rtc_infile > iii;
cp $rtc_infile $rtc_outfile; cp $rtc_infile $rtc_outfile;
runTest write-test $rtc_infile $rtc_number > ttt; runTest write-test $rtc_infile $rtc_number > ttt;
diff $diffargs iii ttt diff $diffargs iii ttt
} }
## ##
# moved here from imagetest.sh # moved here from imagetest.sh
eraseTest() eraseTest()
{ {
src=$1 src=$1
test=${src}.etst test=${src}.etst
good=$datapath/${src}.egd good=$datapath/${src}.egd
#setup #setup
cp $datapath/$src $test cp $datapath/$src $test
#run tests #run tests
${bin}metacopy $test $test ${bin}metacopy $test $test
#check results #check results
diffCheck $test $good diffCheck $test $good
printf "." printf "."
} }
copyTest() copyTest()
{ {
num=$1 # case number num=$1 # case number
src=$2 # input file src=$2 # input file
dst=$3 # copy to hear dst=$3 # copy to hear
test=${dst}.c${num}tst test=${dst}.c${num}tst
good=$datapath/${dst}.c${num}gd good=$datapath/${dst}.c${num}gd
#setup #setup
cp $datapath/$dst $test cp $datapath/$dst $test
#run tests #run tests
${bin}metacopy -a $datapath/$src $test ${bin}metacopy -a $datapath/$src $test
#check results #check results
diffCheck $test $good diffCheck $test $good
printf "." printf "."
} }
iptcTest() iptcTest()
{ {
num=$1 # case number num=$1 # case number
src=$2 # input file src=$2 # input file
dst=$3 # copy to hear dst=$3 # copy to hear
test=${dst}.i${num}tst test=${dst}.i${num}tst
good=$datapath/${dst}.i${num}gd good=$datapath/${dst}.i${num}gd
#setup #setup
cp $datapath/$dst $test cp $datapath/$dst $test
#run tests #run tests
runTest metacopy -ip $datapath/$src $test runTest metacopy -ip $datapath/$src $test
#check results #check results
diffCheck $test $good diffCheck $test $good
printf "." printf "."
} }
## ##
# Make sure to pass the test file first and the known good file second # Make sure to pass the test file first and the known good file second
diffCheck() diffCheck()
{ {
test=$(real_path $1) test=$(real_path $1)
good=$(real_path $2) good=$(real_path $2)
if [ -z "$errors" ]; then let -a errors=0; fi if [ -z "$errors" ]; then let -a errors=0; fi
#run diff and check results #run diff and check results
if [ $PLATFORM == SunOS ]; then if [ $PLATFORM == SunOS ]; then
bdiff $diffargs "$test" "$good" bdiff $diffargs "$test" "$good"
elif [ $PLATFORM == FreeBSD -o $PLATFORM == NetBSD ]; then elif [ $PLATFORM == FreeBSD -o $PLATFORM == NetBSD ]; then
diff $diffargs "$test" "$good" diff $diffargs "$test" "$good"
else else
diff --binary $diffargs "$test" "$good" diff --binary $diffargs "$test" "$good"
fi fi
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
errors=$(expr $errors + 1) errors=$(expr $errors + 1)
else else
rm $test rm $test
fi fi
} }
## ##
# moved here from iotest.sh # moved here from iotest.sh
ioTest() ioTest()
{ {
src=$datapath/$1 src=$datapath/$1
out1=${1}.1 out1=${1}.1
out2=${1}.2 out2=${1}.2
#run tests #run tests
runTest iotest $src $out1 $out2 runTest iotest $src $out1 $out2
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
errors=`expr $errors + 1` errors=`expr $errors + 1`
return return
fi fi
#check results #check results
diffCheck $out1 $src diffCheck $out1 $src
diffCheck $out2 $src diffCheck $out2 $src
printf "." printf "."
} }
## ##
# moved here from iptctest.sh # moved here from iptctest.sh
printTest() printTest()
{ {
src=$1 src=$1
test=${src}.iptst test=${src}.iptst
good=$datapath/${src}.ipgd good=$datapath/${src}.ipgd
#run tests #run tests
runTest iptcprint $datapath/$src > $test runTest iptcprint $datapath/$src > $test
#check results #check results
diffCheck $test $good diffCheck $test $good
printf "." printf "."
} }
removeTest() removeTest()
{ {
src=$1 src=$1
tmp="temp" tmp="temp"
test=${src}.irtst test=${src}.irtst
good=$datapath/${src}.irgd good=$datapath/${src}.irgd
#setup #setup
cp $datapath/$src $tmp cp $datapath/$src $tmp
#run tests #run tests
runTest iptctest $tmp <<-eoc runTest iptctest $tmp <<-eoc
r Iptc.Application2.Byline r Iptc.Application2.Byline
r Iptc.Application2.Caption r Iptc.Application2.Caption
r Iptc.Application2.Keywords r Iptc.Application2.Keywords
@ -281,61 +282,61 @@ removeTest()
r Iptc.Application2.Keywords r Iptc.Application2.Keywords
r Iptc.Application2.CountryName r Iptc.Application2.CountryName
eoc eoc
runTest iptcprint $tmp > $test runTest iptcprint $tmp > $test
#check results #check results
diffCheck $test $good diffCheck $test $good
printf "." printf "."
rm $tmp rm $tmp
} }
addModTest() addModTest()
{ {
src=$1 src=$1
tmp="temp" tmp="temp"
test=${src}.iatst test=${src}.iatst
good=$datapath/${src}.iagd good=$datapath/${src}.iagd
#setup #setup
cp $datapath/$src $tmp cp $datapath/$src $tmp
#run tests #run tests
runTest iptctest $tmp <<-eoc runTest iptctest $tmp <<-eoc
a Iptc.Application2.Headline The headline I am a Iptc.Application2.Headline The headline I am
a Iptc.Application2.Keywords Yet another keyword a Iptc.Application2.Keywords Yet another keyword
m Iptc.Application2.DateCreated 2004-8-3 m Iptc.Application2.DateCreated 2004-8-3
a Iptc.Application2.Urgency 3 a Iptc.Application2.Urgency 3
m Iptc.Application2.SuppCategory "bla bla ba" m Iptc.Application2.SuppCategory "bla bla ba"
a Iptc.Envelope.ModelVersion 2 a Iptc.Envelope.ModelVersion 2
a Iptc.Envelope.TimeSent 14:41:0-05:00 a Iptc.Envelope.TimeSent 14:41:0-05:00
a Iptc.Application2.RasterizedCaption 230 42 34 2 90 84 23 146 a Iptc.Application2.RasterizedCaption 230 42 34 2 90 84 23 146
eoc eoc
runTest iptcprint $tmp > $test runTest iptcprint $tmp > $test
#check results #check results
diffCheck $test $good diffCheck $test $good
printf "." printf "."
rm $tmp rm $tmp
} }
extendedTest() extendedTest()
{ {
src=$1 src=$1
tmp="temp" tmp="temp"
test=${src}.ixtst test=${src}.ixtst
good=$datapath/${src}.ixgd good=$datapath/${src}.ixgd
#setup #setup
cp $datapath/$src $tmp cp $datapath/$src $tmp
#run tests #run tests
runTest iptctest $tmp < $datapath/ext.dat runTest iptctest $tmp < $datapath/ext.dat
runTest iptcprint $tmp > $test runTest iptcprint $tmp > $test
#check results #check results
diffCheck $test $good diffCheck $test $good
printf "." printf "."
rm $tmp rm $tmp
} }
## ##
@ -369,54 +370,54 @@ real_path ()
else else
readlink -f "$1" readlink -f "$1"
fi fi
fi fi
} }
## ##
# print checksum for one file # print checksum for one file
checkSum() checkSum()
{ {
if [ "$PLATFORM" == 'NetBSD' -o "$PLATFORM" == 'FreeBSD' -o "$PLATFORM" == 'Darwin' ]; then if [ "$PLATFORM" == 'NetBSD' -o "$PLATFORM" == 'FreeBSD' -o "$PLATFORM" == 'Darwin' ]; then
md5 -q $1 md5 -q $1
else else
md5sum $1 | cut -d' ' -f 1 md5sum $1 | cut -d' ' -f 1
fi fi
} }
## ##
# startHttpServer - power up the python web server # startHttpServer - power up the python web server
startHttpServer() { startHttpServer() {
cd "${testdir}/.." # testdir is the tmp output directory cd "${testdir}/.." # testdir is the tmp output directory
# PLATFORM = the scripting host (eg mingw) # PLATFORM = the scripting host (eg mingw)
# host = the build host (eg windows for msvc) # host = the build host (eg windows for msvc)
if [ $PLATFORM == 'cygwin' -o $PLATFORM == 'mingw' ]; then if [ $PLATFORM == 'cygwin' -o $PLATFORM == 'mingw' ]; then
host=$(runTest exiv2 -vVg platform | tail -1 | cut -d= -f 2) # windows host=$(runTest exiv2 -vVg platform | tail -1 | cut -d= -f 2) # windows
fi fi
if [ "$host" != windows ]; then host="$PLATFORM" ; fi if [ "$host" != windows ]; then host="$PLATFORM" ; fi
if [ "$host" == "cygwin" ]; then dport=12762 if [ "$host" == "cygwin" ]; then dport=12762
elif [ "$host" == "mingw" ]; then dport=12761 elif [ "$host" == "mingw" ]; then dport=12761
else dport=12760 else dport=12760
fi fi
if [ ! -z $EXIV2_PORT ]; then port=$EXIV2_PORT ; else port=$dport ; fi if [ ! -z $EXIV2_PORT ]; then port=$EXIV2_PORT ; else port=$dport ; fi
if [ ! -z $EXIV2_HTTP ]; then http=$EXIV2_HTTP ; else http=http://localhost; fi if [ ! -z $EXIV2_HTTP ]; then http=$EXIV2_HTTP ; else http=http://localhost; fi
exiv2_url=$http:$port exiv2_url=$http:$port
python3 -m http.server $port & # start a background local HTTP server in the "real" test directory python3 -m http.server $port & # start a background local HTTP server in the "real" test directory
sleep 2 # wait for it to init or die! sleep 2 # wait for it to init or die!
exiv2_httpServer=$! exiv2_httpServer=$!
# ask the server to reply # ask the server to reply
echo $exiv2_url status = $(python3 -c "import urllib.request;print(urllib.request.urlopen('$exiv2_url/').status)") echo $exiv2_url status = $(python3 -c "import urllib.request;print(urllib.request.urlopen('$exiv2_url/').status)")
} }
## ##
# closeHttpServer - power down the python web server # closeHttpServer - power down the python web server
closeHttpServer() { closeHttpServer() {
if [ ! -z $exiv2_httpServer ]; then if [ ! -z $exiv2_httpServer ]; then
echo kill exiv2_httpServer $exiv2_httpServer echo kill exiv2_httpServer $exiv2_httpServer
kill $exiv2_httpServer # kill the server kill $exiv2_httpServer # kill the server
fi fi
} }
## ##
@ -454,22 +455,22 @@ prepareTest()
datadir="../data" datadir="../data"
if [ -z "$EXIV2_BINDIR" ] ; then if [ -z "$EXIV2_BINDIR" ] ; then
bin="$here/../build/bin/" bin="$here/../build/bin/"
else else
bin="$EXIV2_BINDIR/" bin="$EXIV2_BINDIR/"
fi fi
# update PATHs to ensure we load the the correct dynamlic library # update PATHs to ensure we load the the correct dynamlic library
if [ $PLATFORM == 'mingw' -a $PLATFORM == 'cygwin' ]; then if [ $PLATFORM == 'mingw' -a $PLATFORM == 'cygwin' ]; then
export PATH="$bin:$PATH" export PATH="$bin:$PATH"
elif [ 'PLATFORM' == 'Darwin' ]; then elif [ 'PLATFORM' == 'Darwin' ]; then
export DYLD_LIBRARY_PATH="$bin/../lib:$DYLD_LIBRARY_PATH" export DYLD_LIBRARY_PATH="$bin/../lib:$DYLD_LIBRARY_PATH"
else else
export LD_LIBRARY_PATH="$bin/../lib:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$bin/../lib:$LD_LIBRARY_PATH"
fi fi
## ##
# figure out arguments for diff # figure out arguments for diff
good="$here/data/${this}.out" good="$here/data/${this}.out"
results="$here/tmp/${this}.out" results="$here/tmp/${this}.out"
mkdir -p $here/tmp mkdir -p $here/tmp
@ -477,8 +478,8 @@ prepareTest()
echo '' >> $tmpfile echo '' >> $tmpfile
if [ "$PLATFORM" == SunOS -o "$PLATFORM" == FreeBSD -o "$PLATFORM" == NetBSD ] ; then if [ "$PLATFORM" == SunOS -o "$PLATFORM" == FreeBSD -o "$PLATFORM" == NetBSD ] ; then
da1="" da1=""
da2="" da2=""
else else
diffargs="--strip-trailing-cr" diffargs="--strip-trailing-cr"
diff -q $diffargs $tmpfile $tmpfile 2>/dev/null diff -q $diffargs $tmpfile $tmpfile 2>/dev/null
@ -498,9 +499,9 @@ prepareTest()
fi fi
diffargs="$da1 $da2" diffargs="$da1 $da2"
## ##
# test that exiv2 and some sample apps are in the bin! # test that exiv2 and some sample apps are in the bin!
for e in exiv2 exifprint easyaccess-test metacopy ; do for e in exiv2 exifprint easyaccess-test metacopy ; do
e="${bin}${e}${exe}" e="${bin}${e}${exe}"
if [ ! -e "$e" ]; then if [ ! -e "$e" ]; then
echo '******************************************' echo '******************************************'
@ -508,7 +509,7 @@ prepareTest()
echo '******************************************' echo '******************************************'
exit 42 exit 42
fi fi
done done
} }
prepareTest prepareTest

Loading…
Cancel
Save