Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: TEZ-4531: Remove MD5 checksum generation and publishing

...

Code Block
export RELEASE_VERSION=x.y.z #e.g. 0.8.4
mvn clean
git clean -f -x -d
cd .. # assuming that you're standing in a tez git folder, 
cp -R tez-git-$RELEASE_VERSION apache-tez-$RELEASE_VERSION-src #where tez-git-$RELEASE_VERSION is the tez code directory
COPYFILE_DISABLE=1 tar --exclude=.git -zcvf apache-tez-$RELEASE_VERSION-src.tar.gz apache-tez-$RELEASE_VERSION-src

...

Code Block
shasum -a 512 apache-tez-$RELEASE_VERSION-src.tar.gz > apache-tez-$RELEASE_VERSION-src.tar.gz.sha512

or

Code Block
openssl md5  apache-tez-$RELEASE_VERSION-src.tar.gz > apache-tez-$RELEASE_VERSION-src.tar.gz.md5
openssl dgst -sha512 apache-tez-$RELEASE_VERSION-src.tar.gz > apache-tez-$RELEASE_VERSION-src.tar.gz.sha512

...

Code Block
#Define the following environment variables
export TEZ_SRC_DIR=/home/user/tez #e.g. tez-src or the absolute path
export RELEASE_VERSION=x.y.z #e.g. 0.8.4
 
cd ${TEZ_SRC_DIR};
mvn clean install -DskipTests
mvn site
cd ..


mkdir apache-tez-${RELEASE_VERSION}-bin
tar -C apache-tez-${RELEASE_VERSION}-bin -zxvf ${TEZ_SRC_DIR}/tez-dist/target/tez-${RELEASE_VERSION}-minimal.tar.gz
mkdir tmp-tez-full
tar -C tmp-tez-full -zxvf ${TEZ_SRC_DIR}/tez-dist/target/tez-${RELEASE_VERSION}.tar.gz
cp tmp-tez-full/LICENSE* apache-tez-${RELEASE_VERSION}-bin/
cp tmp-tez-full/NOTICE* apache-tez-${RELEASE_VERSION}-bin/
rm -rf tmp-tez-full


mkdir apache-tez-${RELEASE_VERSION}-bin/conf
# copy over tez templates into conf dir.
cp ${TEZ_SRC_DIR}/tez-api/target/site/apidocs/configs/tez-default-template.xml apache-tez-${RELEASE_VERSION}-bin/conf/
cp ${TEZ_SRC_DIR}/tez-runtime-library/target/site/apidocs/configs/tez-runtime-default-template.xml apache-tez-${RELEASE_VERSION}-bin/conf/


# TODO: If TEZ-3322 is not fixed, modify the config files under apache-tez-${RELEASE_VERSION}-bin/conf/ and add the Apache header, see example below


mkdir apache-tez-${RELEASE_VERSION}-bin/share
cp ${TEZ_SRC_DIR}/tez-dist/target/tez-${RELEASE_VERSION}.tar.gz apache-tez-${RELEASE_VERSION}-bin/share/tez.tar.gz
COPYFILE_DISABLE=1 tar --exclude=.git -zcvf apache-tez-${RELEASE_VERSION}-bin.tar.gz apache-tez-${RELEASE_VERSION}-bin
# Sign release and create checksums using commands similar to those called out earlier for the source tarball
gpg2  --armor --output apache-tez-${RELEASE_VERSION}-bin.tar.gz.asc --detach-sig apache-tez-${RELEASE_VERSION}-bin.tar.gz
openssl md5dgst -sha512 apache-tez-${RELEASE_VERSION}-bin.tar.gz > apache-tez-${RELEASE_VERSION}-bin.tar.gz.md5sha512

openssl# dgst -sha512 apache-tez-${RELEASE_VERSION}-bin.tar.gz > apache-tez-${RELEASE_VERSION}-bin.tar.gz.sha512

# Remove unnecessary Remove unnecessary text from checksum files
# (the commands below are supposed to work with GNU sed)
sed -i"" s/"^.*= "// apache-tez-${RELEASE_VERSION}-bin.tar.gz.md5
sed -i"" s/"^.*= "// apache-tez-${RELEASE_VERSION}-bin.tar.gz.sha512 to work with GNU sed)
sed -i"" s/"^.*= "// apache-tez-${RELEASE_VERSION}-srcbin.tar.gz.md5sha512
sed -i"" s/"^.*= "// apache-tez-${RELEASE_VERSION}-src.tar.gz.sha512
#Verify integrity of checksum files
 

...

Code Block
svn co https://dist.apache.org/repos/dist/dev/tez/ tez_svn # assuming that you want to store svn files in a folder named "svn" for clarity's sake

# copy contents to "tez_svn" directory, which is the svn working dir
export RC_VERSION=rc0 #define rc version if you haven't defined yet
mkdir tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}
cp apache-tez-${RELEASE_VERSION}-bin.tar.gzhaven't defined yet
mkdir tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}/
cp apache-tez-${RELEASE_VERSION}-bin.tar.gz.asc tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}/
cp apache-tez-${RELEASE_VERSION}-bin.tar.gz.md5asc tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}/
cp apache-tez-${RELEASE_VERSION}-bin.tar.gz.sha512 tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}/
cp apache-tez-${RELEASE_VERSION}-src.tar.gz tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}/
cp apache-tez-${RELEASE_VERSION}-src.tar.gz.asc tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}/
cp apache-tez-${RELEASE_VERSION}-src.tar.gz.md5 tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}/
cp apache-tez-${RELEASE_VERSION}-src.tar.gz.sha512 tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}/

# check contents of "tez_svn" for actual release, you should see something like:
ls tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}/


apache-tez-x.y.z-bin.tar.gz         apache-tez-x.y.z-src.tar.gz       
apache-tez-x.y.z-bin.tar.gz.asc     apache-tez-x.y.z-bin.tar.gz.sha512  apache-tez-x.y.z-src.tar.gz.asc     apache-tez-x.y.z-src.tar.gz.sha512

svn add tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}/
# if this is the first time you commit to svn, you might want to define an editor for commit messages, like: export SVN_EDITOR=vi
svn ci tez_svn/apache-tez-${RELEASE_VERSION}-${RC_VERSION}/ #specify your ASF username with --username=$USER_NAME if it's not the same as your current user

...