Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F34140337
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
4 KB
Subscribers
None
View Options
diff --git a/packages/Makefile.am b/packages/Makefile.am
index fb559bfc..a3f05632 100644
--- a/packages/Makefile.am
+++ b/packages/Makefile.am
@@ -1,35 +1,36 @@
# Makefile.am - Installer for GnuPG 4 Windows Makefile.
# Copyright (C) 2005 g10 Code GmbH
#
# This file is part of GPG4Win.
#
# GPG4Win is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# GPG4Win is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-EXTRA_DIST = download.sh packages.current gen-frameworks.sh
+EXTRA_DIST = download.sh packages.current gen-frameworks.sh \
+ get-gpg-package.sh distsigkey.gpg
#upload: packages.current packages.current.sig
# set -e; \
# echo "Uploading package list to www.gpg4win.org ..."; \
# user=`svn info | sed -n '/^URL:/ s,.*svn+ssh://\\([^@]*\\).*,\\1,p'`;\
# rsync -v -W packages.current{,.sig} \
# $${user}@wald.intevation.org:/gpg4win/htdocs/
#
#
#packages.current.sig : packages.current
# @echo "packages.current.sig is expected to be a detached signature of packages.current"
# @echo "Use \"gpg -sbu YOUR_KEYID packages.current\" to create it"
# @false
#
diff --git a/packages/distsigkey.gpg b/packages/distsigkey.gpg
new file mode 100644
index 00000000..219b7edb
Binary files /dev/null and b/packages/distsigkey.gpg differ
diff --git a/packages/get-gpg-package.sh b/packages/get-gpg-package.sh
new file mode 100755
index 00000000..b3062fbe
--- /dev/null
+++ b/packages/get-gpg-package.sh
@@ -0,0 +1,96 @@
+#!/bin/bash
+# Copyright (C) 2018 Intevation GmbH
+#
+# This file is part of GPG4Win.
+#
+# GPG4Win is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# GPG4Win is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+# Check gpg packages against their distsigkey and print out the lines
+# for packages.current
+#
+# TODO: Update packages.current automatically
+set -e
+#set -x
+
+GNUPG="libgpg-error libgcrypt libksba libassuan ntbtls npth"
+GPG4WIN="gpgex gpgol"
+
+WGET=wget
+GPGV=gpgv
+
+srcdir=$(readlink -f `dirname "$0"`)
+distsigkey="$srcdir/distsigkey.gpg"
+
+if [ -z "$1" -o -z "$2" ]; then
+ echo "Usage $0 <package> <Version> [user]"
+ exit 1
+fi
+
+if [ -z "$3" ]; then
+ CHANGER="ah"
+else
+ CHANGER="$3"
+fi
+
+if ! $GPGV --version >/dev/null 2>/dev/null ; then
+ echo "command \"gpgv\" is not installed" >&2
+ exit 1
+fi
+
+function list_include_item {
+ local list="$1"
+ local item="$2"
+ if [[ $list =~ (^|[[:space:]])"$item"($|[[:space:]]) ]] ; then
+ # yes, list include item
+ result=0
+ else
+ result=1
+ fi
+ return $result
+}
+
+if `list_include_item "$GNUPG" "$1"` ; then
+ SERVER="ftp://ftp.gnupg.org/gcrypt"
+elif `list_include_item "$GPG4WIN" "$1"` ; then
+ SERVER="http://files.gpg4win.org/src"
+else
+ echo "Unknown package $1";
+ exit 1;
+fi
+
+FILE="$1-$2.tar.bz2"
+FILEPATH="$1/$FILE"
+MYTMP=$(mktemp -d)
+
+cd $MYTMP
+$WGET $SERVER/$FILEPATH
+$WGET $SERVER/$FILEPATH.sig
+
+if ! $GPGV --keyring "$distsigkey" $FILE.sig $FILE; then
+ echo "package is not valid!" >&2
+ exit 1
+fi
+
+SHASUM=$(sha256sum $FILE | cut -d " " -f 1)
+DATE=$(date +%Y-%m-%d)
+
+echo "# last changed $DATE"
+echo "# by $CHANGER"
+echo "# verified: distsigkey.gpg"
+echo "server $SERVER"
+echo "file $FILEPATH"
+echo "chk $SHASUM"
+cd -
+rm -r $MYTMP
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Dec 9, 1:15 AM (18 h, 12 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1b/a9/e56d58fe443decbbba52e81ea86f
Attached To
rW Gpg4win
Event Timeline
Log In to Comment