##// END OF EJS Templates
inno: remove w9xpopen.exe...
inno: remove w9xpopen.exe w9xpopen.exe is a utility program shipped with Python <3.4 (https://bugs.python.org/issue14470 tracked its removal). The program was used by subprocess to wrap invoked processes on Windows 95 and 98 or when command.com was used in order to work around a redirect bug. The workaround is only used on ancient Windows versions - versions that we shouldn't see in 2019. While Python 2.7's subprocess module still references w9xpopen.exe, not shipping it shouldn't matter unless we're running an ancient version of Windows. Python will raise an exception if w9xpopen.exe can't be found. It's highly unlikely anyone is using current Mercurial releases on these ancient Windows versions. So remove w9xpopen.exe from the Inno installer. .. bc:: The 32-bit Windows Inno installers no longer distribute w9xpopen.exe. This should only impact people running Mercurial on Windows 95, 98, or ME. Differential Revision: https://phab.mercurial-scm.org/D6068

File last commit:

r40143:212a52d8 default
r42021:2dbdb9ab default
Show More
builddeb
115 lines | 2.6 KiB | text/plain | TextLexer
#!/bin/sh -e
#
# Build a Mercurial debian package from the current repo
#
# Tested on Jessie (stable as of original script authoring.)
. $(dirname $0)/packagelib.sh
ROOTDIR=$(cd $(dirname $0)/../.. > /dev/null; pwd)
BUILD=1
CLEANUP=1
DISTID=`(lsb_release -is 2> /dev/null | tr '[:upper:]' '[:lower:]') || echo debian`
CODENAME=`lsb_release -cs 2> /dev/null || echo unknown`
DEBFLAGS=-b
cleanup() {
if [ "$CLEANUP" ]; then
rm -r "$ROOTDIR/debian";
fi
}
while [ "$1" ]; do
case "$1" in
--distid )
shift
DISTID="$1"
shift
;;
--codename )
shift
CODENAME="$1"
shift
;;
--cleanup )
shift
BUILD=
;;
--build )
shift
CLEANUP=
;;
--source-only )
shift
DEBFLAGS=-S
;;
* )
echo "Invalid parameter $1!" 1>&2
exit 1
;;
esac
done
cd "$ROOTDIR"
trap 'cleanup' EXIT
set -u
if [ ! -d .hg ]; then
printf "You are inside %s, which is not the root of a Mercurial repository\n" $(pwd) 1>&2
exit 1
fi
gethgversion
debver="$version"
if [ -n "$type" ] ; then
debver="$debver~$type"
fi
if [ -n "$distance" ] ; then
debver="$debver+$distance-$CODENAME-$node"
elif [ "$DEBFLAGS" = "-S" ] ; then
# for building a ppa (--source-only) for a release (distance == 0), we need
# to version the distroseries so that we can upload to launchpad
debver="$debver~${CODENAME}1"
fi
control=debian/control
changelog=debian/changelog
if [ "$BUILD" ]; then
if [ -d debian ] ; then
printf "Error! debian control directory already exists at %s/debian\n" $(pwd)
exit 1
fi
cp -r "$ROOTDIR"/contrib/packaging/debian debian
sed -i.tmp "s/__VERSION__/$debver/" $changelog
sed -i.tmp "s/__DATE__/$(date --rfc-2822)/" $changelog
sed -i.tmp "s/__CODENAME__/$CODENAME/" $changelog
rm $changelog.tmp
# remove the node from the version string
SRCFILE="mercurial_$(echo $debver | sed "s,-$node,,").orig.tar.gz"
"$ROOTDIR/hg" archive $SRCFILE
mv $SRCFILE ..
debuild -us -uc -i -I $DEBFLAGS
if [ $? != 0 ]; then
echo 'debuild failed!'
exit 1
fi
fi
if [ "$CLEANUP" ] ; then
echo
OUTPUTDIR=${OUTPUTDIR:=packages/$DISTID-$CODENAME}
mkdir -p "$OUTPUTDIR"
find ../mercurial*.deb ../mercurial_*.build ../mercurial_*.changes \
../mercurial*.dsc ../mercurial*.gz \
-type f -newer $control -print0 2>/dev/null | \
xargs -Inarf -0 mv narf "$OUTPUTDIR"
echo "Built packages for $debver:"
find "$PWD"/"$OUTPUTDIR" -type f -newer $control -name '*.deb'
fi