Patchwork [RFC,4/6] auto-packager: mkpackage.sh to handle the released tarball

login
register
mail settings
Submitter Keng-Yu Lin
Date July 26, 2012, 9:34 a.m.
Message ID <1343295300-17440-5-git-send-email-kengyu@canonical.com>
Download mbox | patch
Permalink /patch/173383/
State Accepted
Headers show

Comments

Keng-Yu Lin - July 26, 2012, 9:34 a.m.
Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
---
 auto-packager/mkpackage.sh |   25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
Colin King - July 27, 2012, 8:40 a.m.
On 26/07/12 10:34, Keng-Yu Lin wrote:
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
> ---
>   auto-packager/mkpackage.sh |   25 +++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)
>
> diff --git a/auto-packager/mkpackage.sh b/auto-packager/mkpackage.sh
> index 8fe1f23..cd5e0ff 100755
> --- a/auto-packager/mkpackage.sh
> +++ b/auto-packager/mkpackage.sh
> @@ -25,6 +25,7 @@
>   #
>   RELEASES="lucid natty oneiric precise quantal"
>   REPO=git://kernel.ubuntu.com/hwe/fwts.git
> +RELEASE_TAR_URL=http://kernel.ubuntu.com/~lexical/fwts
>   FWTS=fwts
>
>   #
> @@ -74,6 +75,27 @@ rm_source()
>   }
>
>   #
> +#  Prepare the orig tarball
> +#
> +
> +prepare_tarball()
> +{
> +	mkdir $version
> +	pushd $version >& /dev/null
> +	wget -N $RELEASE_TAR_URL/fwts-$version.tar.gz
> +	wget -N $RELEASE_TAR_URL/SHA256SUMS
> +	sha256sum -c SHA256SUMS
> +
> +	if [ $? -ne 0 ]; then
> +		echo "Checksum unmatched. Abort"
> +		exit
> +	fi
> +
> +	mv fwts-$version.tar.gz fwts_`echo $version|cut -b 2-`.orig.tar.gz
> +	popd >& /dev/null
> +}
> +
> +#
>   #  Create source package ready for upload and build
>   #
>   mk_package()
> @@ -83,6 +105,7 @@ mk_package()
>   	rm -rf $version/$rel
>     	mkdir -p $version/$rel
>   	cp -r $FWTS $version/$rel
> +	cp $version/fwts_`echo $version|cut -b 2-`.orig.tar.gz $version/$rel
>
>   	pushd $version/$rel/$FWTS >& /dev/null
>
> @@ -121,6 +144,8 @@ fi
>   checkout_version $version
>   rm_git
>
> +prepare_tarball
> +
>   for I in $RELEASES
>   do
>   	echo Building package for release $I with version $version
>

Acked-by: Colin Ian King <colin.king@canonical.com>
Ivan Hu - July 30, 2012, 2:45 a.m.
On 07/26/2012 05:34 PM, Keng-Yu Lin wrote:
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
> ---
>   auto-packager/mkpackage.sh |   25 +++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)
>
> diff --git a/auto-packager/mkpackage.sh b/auto-packager/mkpackage.sh
> index 8fe1f23..cd5e0ff 100755
> --- a/auto-packager/mkpackage.sh
> +++ b/auto-packager/mkpackage.sh
> @@ -25,6 +25,7 @@
>   #
>   RELEASES="lucid natty oneiric precise quantal"
>   REPO=git://kernel.ubuntu.com/hwe/fwts.git
> +RELEASE_TAR_URL=http://kernel.ubuntu.com/~lexical/fwts
>   FWTS=fwts
>
>   #
> @@ -74,6 +75,27 @@ rm_source()
>   }
>
>   #
> +#  Prepare the orig tarball
> +#
> +
> +prepare_tarball()
> +{
> +	mkdir $version
> +	pushd $version >& /dev/null
> +	wget -N $RELEASE_TAR_URL/fwts-$version.tar.gz
> +	wget -N $RELEASE_TAR_URL/SHA256SUMS
> +	sha256sum -c SHA256SUMS
> +
> +	if [ $? -ne 0 ]; then
> +		echo "Checksum unmatched. Abort"
> +		exit
> +	fi
> +
> +	mv fwts-$version.tar.gz fwts_`echo $version|cut -b 2-`.orig.tar.gz
> +	popd >& /dev/null
> +}
> +
> +#
>   #  Create source package ready for upload and build
>   #
>   mk_package()
> @@ -83,6 +105,7 @@ mk_package()
>   	rm -rf $version/$rel
>     	mkdir -p $version/$rel
>   	cp -r $FWTS $version/$rel
> +	cp $version/fwts_`echo $version|cut -b 2-`.orig.tar.gz $version/$rel
>
>   	pushd $version/$rel/$FWTS >& /dev/null
>
> @@ -121,6 +144,8 @@ fi
>   checkout_version $version
>   rm_git
>
> +prepare_tarball
> +
>   for I in $RELEASES
>   do
>   	echo Building package for release $I with version $version
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/auto-packager/mkpackage.sh b/auto-packager/mkpackage.sh
index 8fe1f23..cd5e0ff 100755
--- a/auto-packager/mkpackage.sh
+++ b/auto-packager/mkpackage.sh
@@ -25,6 +25,7 @@ 
 #
 RELEASES="lucid natty oneiric precise quantal"
 REPO=git://kernel.ubuntu.com/hwe/fwts.git
+RELEASE_TAR_URL=http://kernel.ubuntu.com/~lexical/fwts
 FWTS=fwts
 
 #
@@ -74,6 +75,27 @@  rm_source()
 }
 
 #
+#  Prepare the orig tarball
+#
+
+prepare_tarball()
+{
+	mkdir $version
+	pushd $version >& /dev/null
+	wget -N $RELEASE_TAR_URL/fwts-$version.tar.gz
+	wget -N $RELEASE_TAR_URL/SHA256SUMS
+	sha256sum -c SHA256SUMS
+
+	if [ $? -ne 0 ]; then
+		echo "Checksum unmatched. Abort"
+		exit
+	fi
+
+	mv fwts-$version.tar.gz fwts_`echo $version|cut -b 2-`.orig.tar.gz
+	popd >& /dev/null
+}
+
+#
 #  Create source package ready for upload and build
 #
 mk_package()
@@ -83,6 +105,7 @@  mk_package()
 	rm -rf $version/$rel
   	mkdir -p $version/$rel
 	cp -r $FWTS $version/$rel
+	cp $version/fwts_`echo $version|cut -b 2-`.orig.tar.gz $version/$rel
 
 	pushd $version/$rel/$FWTS >& /dev/null
 
@@ -121,6 +144,8 @@  fi
 checkout_version $version
 rm_git
 
+prepare_tarball
+
 for I in $RELEASES 
 do
 	echo Building package for release $I with version $version