Tue, 02 Oct 2012 00:15:25 -0400
Fix a couple things about validating the gpg key of downloaded GTK+ bundle components
* Don't import the key into the global public key chain
* Use a temporary keyring in the staging directory (needs to be an absolute path)
* Fix an issue creating the temporary keyring (needs to be `touch`ed)
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
1 | #!/bin/bash |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
2 | # Script to generate zip file for GTK+ runtime to be included in Pidgin installer |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
3 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
4 | PIDGIN_BASE=$1 |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
5 | |
|
30305
00c325754ef7
Add support for the binaries built by the opensuse build service to the
Daniel Atallah <datallah@pidgin.im>
parents:
29862
diff
changeset
|
6 | if [ ! -e $PIDGIN_BASE/ChangeLog ]; then |
|
00c325754ef7
Add support for the binaries built by the opensuse build service to the
Daniel Atallah <datallah@pidgin.im>
parents:
29862
diff
changeset
|
7 | echo $(basename $0) must must have the pidgin base dir specified as a parameter. |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
8 | exit 1 |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
9 | fi |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
10 | |
|
33409
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
11 | STAGE_DIR=`readlink -f $PIDGIN_BASE/pidgin/win32/nsis/gtk_runtime_stage` |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
12 | #Subdirectory of $STAGE_DIR |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
13 | INSTALL_DIR=Gtk |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
14 | CONTENTS_FILE=$INSTALL_DIR/CONTENTS |
|
33415
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
15 | PIDGIN_VERSION=$( < $PIDGIN_BASE/VERSION ) |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
16 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
17 | #This needs to be changed every time there is any sort of change. |
|
33408
8e037a7b4ccd
Update various win32 dependencies - the new GTK+ bundle will be called 2.16.6.1
Daniel Atallah <datallah@pidgin.im>
parents:
33396
diff
changeset
|
18 | BUNDLE_VERSION=2.16.6.1 |
|
33415
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
19 | BUNDLE_SHA1SUM=5e16b7efb11943e8c80bc390f6c38df904fd36ed |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
20 | ZIP_FILE="$PIDGIN_BASE/pidgin/win32/nsis/gtk-runtime-$BUNDLE_VERSION.zip" |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
21 | |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
22 | #Download the existing file (so that we distribute the exact same file for all releases with the same bundle version) |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
23 | FILE="$ZIP_FILE" |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
24 | if [ ! -e "$FILE" ]; then |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
25 | wget "https://pidgin.im/win32/download_redir.php?version=$PIDGIN_VERSION>k_version=$BUNDLE_VERSION&dl_pkg=gtk" -O "$FILE" |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
26 | fi |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
27 | CHECK_SHA1SUM=`sha1sum $FILE` |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
28 | CHECK_SHA1SUM=${CHECK_SHA1SUM%%\ *} |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
29 | if [ "$CHECK_SHA1SUM" != "$BUNDLE_SHA1SUM" ]; then |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
30 | echo "sha1sum ($CHECK_SHA1SUM) for $FILE doesn't match expected value of $BUNDLE_SHA1SUM" |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
31 | # Allow "devel" versions to build their own bundles if the download doesn't succeed |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
32 | if [[ "$PIDGIN_VERSION" == *"devel" ]]; then |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
33 | echo "Continuing GTK+ Bundle creation for development version of Pidgin" |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
34 | else |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
35 | exit 1 |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
36 | fi |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
37 | else |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
38 | exit 0 |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
39 | fi |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
40 | |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
41 | |
|
33409
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
42 | ATK="http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32/atk_1.32.0-2_win32.zip ATK 1.32.0-2 sha1sum:3c31c9d6b19af840e2bd8ccbfef4072a6548dc4e" |
|
33408
8e037a7b4ccd
Update various win32 dependencies - the new GTK+ bundle will be called 2.16.6.1
Daniel Atallah <datallah@pidgin.im>
parents:
33396
diff
changeset
|
43 | #Cairo 1.10.2 has a bug that can be seen when selecting text |
|
33409
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
44 | #CAIRO="http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/cairo_1.10.2-2_win32.zip Cairo 1.10.2-2 sha1sum:d44cd66a9f4d7d29a8f2c28d1c1c5f9b0525ba44" |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
45 | CAIRO="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.10-1_win32.zip Cairo 1.8.10-1 sha1sum:a08476cccd807943958610977a138c4d6097c7b8" |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
46 | EXPAT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.1.0-1_win32.zip Expat 2.1.0-1 gpg:0x71D4DDE53F188CBE" |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
47 | FONTCONFIG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip Fontconfig 2.8.0-2 sha1sum:37a3117ea6cc50c8a88fba9b6018f35a04fa71ce" |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
48 | FREETYPE="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.4.10-1_win32.zip Freetype 2.4.10-1 gpg:0x71D4DDE53F188CBE" |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
49 | GETTEXT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip Gettext 0.18.1.1-2 sha1sum:a7cc1ce2b99b408d1bbea9a3b4520fcaf26783b3" |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
50 | GLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib_2.28.8-1_win32.zip Glib 2.28.8-1 sha1sum:5d158f4c77ca0b5508e1042955be573dd940b574" |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
51 | GTK="http://ftp.acc.umu.se/pub/gnome/binaries/win32/gtk+/2.16/gtk+_2.16.6-2_win32.zip GTK+ 2.16.6-2 sha1sum:012853e6de814ebda0cc4459f9eed8ae680e6d17" |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
52 | LIBPNG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.12-1_win32.zip libpng 1.4.12-1 gpg:0x71D4DDE53F188CBE" |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
53 | PANGO="http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.29/pango_1.29.4-1_win32.zip Pango 1.29.4-1 sha1sum:3959319bd04fbce513458857f334ada279b8cdd4" |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
54 | ZLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib_1.2.5-2_win32.zip zlib 1.2.5-2 sha1sum:568907188761df2d9309196e447d91bbc5555d2b" |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
55 | |
|
29862
e48ceabf7676
Increase win32 GTK+ to 2.16.6. If people have issues, it can be reverted.
Daniel Atallah <datallah@pidgin.im>
parents:
29817
diff
changeset
|
56 | ALL="ATK CAIRO EXPAT FONTCONFIG FREETYPE GETTEXT GLIB GTK LIBPNG PANGO ZLIB" |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
57 | |
|
29806
aface02b85bc
mkdir -p is better than checking for directory existence
Daniel Atallah <datallah@pidgin.im>
parents:
29798
diff
changeset
|
58 | mkdir -p $STAGE_DIR |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
59 | cd $STAGE_DIR |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
60 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
61 | rm -rf $INSTALL_DIR |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
62 | mkdir $INSTALL_DIR |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
63 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
64 | #new CONTENTS file |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
65 | echo Bundle Version $BUNDLE_VERSION > $CONTENTS_FILE |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
66 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
67 | function download_and_extract { |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
68 | URL=${1%%\ *} |
|
33409
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
69 | VALIDATION=${1##*\ } |
|
33391
e56515365c37
Add sha1sum checking to the gtk bundle components that are downloaded
Daniel Atallah <datallah@pidgin.im>
parents:
30312
diff
changeset
|
70 | NAME=${1%\ *} |
|
e56515365c37
Add sha1sum checking to the gtk bundle components that are downloaded
Daniel Atallah <datallah@pidgin.im>
parents:
30312
diff
changeset
|
71 | NAME=${NAME#*\ } |
|
30305
00c325754ef7
Add support for the binaries built by the opensuse build service to the
Daniel Atallah <datallah@pidgin.im>
parents:
29862
diff
changeset
|
72 | FILE=$(basename $URL) |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
73 | if [ ! -e $FILE ]; then |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
74 | echo Downloading $NAME |
|
33391
e56515365c37
Add sha1sum checking to the gtk bundle components that are downloaded
Daniel Atallah <datallah@pidgin.im>
parents:
30312
diff
changeset
|
75 | wget $URL || exit 1 |
|
e56515365c37
Add sha1sum checking to the gtk bundle components that are downloaded
Daniel Atallah <datallah@pidgin.im>
parents:
30312
diff
changeset
|
76 | fi |
|
33409
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
77 | VALIDATION_TYPE=${VALIDATION%%:*} |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
78 | VALIDATION_VALUE=${VALIDATION##*:} |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
79 | if [ $VALIDATION_TYPE == 'sha1sum' ]; then |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
80 | CHECK_SHA1SUM=`sha1sum $FILE` |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
81 | CHECK_SHA1SUM=${CHECK_SHA1SUM%%\ *} |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
82 | if [ "$CHECK_SHA1SUM" != "$VALIDATION_VALUE" ]; then |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
83 | echo "sha1sum ($CHECK_SHA1SUM) for $FILE doesn't match expected value of $VALIDATION_VALUE" |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
84 | exit 1 |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
85 | fi |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
86 | elif [ $VALIDATION_TYPE == 'gpg' ]; then |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
87 | if [ ! -e "$FILE.asc" ]; then |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
88 | echo Downloading GPG key for $NAME |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
89 | wget "$URL.asc" || exit 1 |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
90 | fi |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
91 | #Use our own keyring to avoid adding stuff to the main keyring |
|
33416
c259c9a6d184
Fix a couple things about validating the gpg key of downloaded GTK+ bundle components
Daniel Atallah <datallah@pidgin.im>
parents:
33415
diff
changeset
|
92 | GPG="gpg -q --keyring $STAGE_DIR/$VALIDATION_VALUE-keyring.gpg" |
|
c259c9a6d184
Fix a couple things about validating the gpg key of downloaded GTK+ bundle components
Daniel Atallah <datallah@pidgin.im>
parents:
33415
diff
changeset
|
93 | if [[ ! -e $STAGE_DIR/$VALIDATION_VALUE-keyring.gpg \ |
|
c259c9a6d184
Fix a couple things about validating the gpg key of downloaded GTK+ bundle components
Daniel Atallah <datallah@pidgin.im>
parents:
33415
diff
changeset
|
94 | || `$GPG --list-keys "$VALIDATION_VALUE" > /dev/null && echo -n "0"` -ne 0 ]]; then |
|
c259c9a6d184
Fix a couple things about validating the gpg key of downloaded GTK+ bundle components
Daniel Atallah <datallah@pidgin.im>
parents:
33415
diff
changeset
|
95 | touch $STAGE_DIR/$VALIDATION_VALUE-keyring.gpg |
|
c259c9a6d184
Fix a couple things about validating the gpg key of downloaded GTK+ bundle components
Daniel Atallah <datallah@pidgin.im>
parents:
33415
diff
changeset
|
96 | $GPG --no-default-keyring --keyserver pgp.mit.edu --recv-key "$VALIDATION_VALUE" || exit 1 |
|
33409
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
97 | fi |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
98 | $GPG --verify "$FILE.asc" || (echo "$FILE failed signature verification"; exit 1) || exit 1 |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
99 | else |
|
fb9fe934688e
Use the gpg signature, if available to validate downloaded GTK+ components
Daniel Atallah <datallah@pidgin.im>
parents:
33408
diff
changeset
|
100 | echo "Unrecognized validation type of $VALIDATION_TYPE" |
|
33391
e56515365c37
Add sha1sum checking to the gtk bundle components that are downloaded
Daniel Atallah <datallah@pidgin.im>
parents:
30312
diff
changeset
|
101 | exit 1 |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
102 | fi |
|
30305
00c325754ef7
Add support for the binaries built by the opensuse build service to the
Daniel Atallah <datallah@pidgin.im>
parents:
29862
diff
changeset
|
103 | EXTENSION=${FILE##*.} |
|
00c325754ef7
Add support for the binaries built by the opensuse build service to the
Daniel Atallah <datallah@pidgin.im>
parents:
29862
diff
changeset
|
104 | #This is an OpenSuSE build service RPM |
|
00c325754ef7
Add support for the binaries built by the opensuse build service to the
Daniel Atallah <datallah@pidgin.im>
parents:
29862
diff
changeset
|
105 | if [ $EXTENSION == 'rpm' ]; then |
|
30312
d2cb1662df79
Improve error handling
Daniel Atallah <datallah@pidgin.im>
parents:
30305
diff
changeset
|
106 | echo "Generating zip from $FILE" |
|
30305
00c325754ef7
Add support for the binaries built by the opensuse build service to the
Daniel Atallah <datallah@pidgin.im>
parents:
29862
diff
changeset
|
107 | FILE=$(../rpm2zip.sh $FILE) |
|
00c325754ef7
Add support for the binaries built by the opensuse build service to the
Daniel Atallah <datallah@pidgin.im>
parents:
29862
diff
changeset
|
108 | fi |
|
30312
d2cb1662df79
Improve error handling
Daniel Atallah <datallah@pidgin.im>
parents:
30305
diff
changeset
|
109 | unzip -q $FILE -d $INSTALL_DIR || exit 1 |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
110 | echo "$NAME" >> $CONTENTS_FILE |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
111 | } |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
112 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
113 | for VAL in $ALL |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
114 | do |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
115 | VAR=${!VAL} |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
116 | download_and_extract "$VAR" |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
117 | done |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
118 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
119 | #Default GTK+ Theme to MS-Windows |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
120 | echo gtk-theme-name = \"MS-Windows\" > $INSTALL_DIR/etc/gtk-2.0/gtkrc |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
121 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
122 | #Blow away translations that we don't have in Pidgin |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
123 | for LOCALE_DIR in $INSTALL_DIR/share/locale/* |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
124 | do |
|
30305
00c325754ef7
Add support for the binaries built by the opensuse build service to the
Daniel Atallah <datallah@pidgin.im>
parents:
29862
diff
changeset
|
125 | LOCALE=$(basename $LOCALE_DIR) |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
126 | if [ ! -e $PIDGIN_BASE/po/$LOCALE.po ]; then |
|
30305
00c325754ef7
Add support for the binaries built by the opensuse build service to the
Daniel Atallah <datallah@pidgin.im>
parents:
29862
diff
changeset
|
127 | echo Removing $LOCALE translation as it is missing from Pidgin |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
128 | rm -r $LOCALE_DIR |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
129 | fi |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
130 | done |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
131 | |
|
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
132 | #Generate zip file to be included in installer |
|
33415
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
133 | rm -f $ZIP_FILE |
|
51473787ff4f
Bake the sha1sums for the debug symbols and gtk runtime into the installer instead of downloading them.
Daniel Atallah <datallah@pidgin.im>
parents:
33409
diff
changeset
|
134 | zip -9 -r $ZIP_FILE Gtk |
|
29798
7e57f09e0b2e
The rest of the plumbing needed to build the GTK+ Runtime zip included in the installer
Daniel Atallah <datallah@pidgin.im>
parents:
diff
changeset
|
135 | |
|
30312
d2cb1662df79
Improve error handling
Daniel Atallah <datallah@pidgin.im>
parents:
30305
diff
changeset
|
136 | exit 0 |
|
d2cb1662df79
Improve error handling
Daniel Atallah <datallah@pidgin.im>
parents:
30305
diff
changeset
|
137 |