kill a file with ambiguous distribution terms

Denys Vlasenko vda.linux at googlemail.com
Sat Jul 10 14:43:30 UTC 2010


On Saturday 10 July 2010 15:43, Douglas Mencken wrote:
> Thanks for information. Added the remove command to build system, thus
> removing it from all future srcpkg distributions.
> 
> $ cat patchcmds-busybox
> prev_wd=`pwd`
> 
> cd "${BUILD_FARM}"/busybox-git
> git_desc_version=`git describe --tags 2>/dev/null`
> [ -z "${git_desc_version}" ] && git_desc_version=`git describe
> --always 2>/dev/null`
> git_commit_number=`echo "${git_desc_version}" | cut -d'-' -f2`
> git_commit_sha=`echo "${git_desc_version}" | cut -d'-' -f3`
> if [ -z ${git_commit_number} ] || [ ${git_commit_number} =
> ${git_commit_sha} ] ; then
>   git_commit_number="0"
> fi
> git_version_string="${git_commit_number}-${git_commit_sha}"
> 
> cd "${BUILD_FARM}/${SRCPKG_DIR}"
> sed -i "s/EXTRAVERSION = .git/EXTRAVERSION = -${git_version_string}/" Makefile
> sed -i "s/NAME = Unnamed/NAME = Angry Cat/" Makefile
> bbox_version=`head -1 ./Makefile | grep "VERSION" | cut -d' ' -f3`
> bbox_patchlevel=`head -2 ./Makefile | grep "PATCHLEVEL" | cut -d' ' -f3`
> bbox_sublevel=`head -3 ./Makefile | grep "SUBLEVEL" | cut -d' ' -f3`
> 
> # replace odd version string from 'git describe' with correct version
> from Makefile
> NEW_SRCPKG_DIR="busybox-v${bbox_version}.${bbox_patchlevel}.${bbox_sublevel}-${git_version_string}.srcpkg"
> 
> # remove this file due to its questionable distribution terms
> rm -f ./archival/unzip_doc.txt.bz2
> 
> cd "${prev_wd}"
> 
> By the way, building busybox (1.18.0-14-ga48a29f) produces warinings
> about integer overflow:
> 
> In file included from archival/bbunzip.c:8:0:
> include/unarchive.h:17:48: warning: integer overflow in expression
>   CC      archival/bzip2.o

It's a signed overflow in this expression:

XZ_MAGIC1a  = ((0xfd * 256 + '7') * 256 + 'z') * 256 + 'X',

Does it go away if you add an (unsigned) cast like this?

XZ_MAGIC1a  = ((unsigned)(0xfd * 256 + '7') * 256 + 'z') * 256 + 'X',

-- 
vda


More information about the busybox mailing list