From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120011 invoked by alias); 18 Oct 2015 18:47:54 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 119998 invoked by uid 89); 18 Oct 2015 18:47:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-in-08.arcor-online.net Received: from mail-in-08.arcor-online.net (HELO mail-in-08.arcor-online.net) (151.189.21.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Sun, 18 Oct 2015 18:47:51 +0000 Received: from mail-in-20-z2.arcor-online.net (mail-in-20-z2.arcor-online.net [151.189.8.85]) by mx.arcor.de (Postfix) with ESMTP id 3nf9Fc0GJtzGVdT for ; Sun, 18 Oct 2015 20:47:48 +0200 (CEST) Received: from mail-in-17.arcor-online.net (mail-in-17.arcor-online.net [151.189.21.57]) by mail-in-20-z2.arcor-online.net (Postfix) with ESMTP id 060017014DD for ; Sun, 18 Oct 2015 20:47:48 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-17.arcor-online.net 3nf9Fb6LTrzXXM Received: from Gertrud (p54B7FC46.dip0.t-ipconnect.de [84.183.252.70]) (Authenticated sender: stromeko@arcor.de) by mail-in-17.arcor-online.net (Postfix) with ESMTPSA id 3nf9Fb6LTrzXXM for ; Sun, 18 Oct 2015 20:47:47 +0200 (CEST) From: Achim Gratz To: cygwin-apps@cygwin.com Subject: [PATCH] setup 2.872 Date: Sun, 18 Oct 2015 18:47:00 -0000 Message-ID: <87mvvg10a4.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2015-10/txt/msg00018.txt.bz2 Setup needs a patch to get back in order: http://repo.or.cz/cygwin-setup/local.git/commitdiff/530f3d7284c14c0222d2f7b9ab39abcd514d2996 >From 530f3d7284c14c0222d2f7b9ab39abcd514d2996 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sun, 18 Oct 2015 19:27:42 +0200 Subject: [PATCH] Fix signature check for local directory installation and record names of local mirror directories * ini.cc (check_ini_sig): Do not complain about a missing signature file when installing from localdir. If it is present it still must be checked, however. The "download only" mode should pull down both the (compressed) setup file and the corresponding signature (not yet implemented). (do_local_ini): The builder needs to know the (unescaped) mirror name it's associated with in order for the file validation to work. The found_ini_list should directly provide the constituent parts so that we don't need to extract them (not yet implemented). * fromcwd.cc (FindVisitor): Remove superfluous path separator and simply use SetupArch (which has previously compared equal to aDir->cFileName) when constructing the setup file name. * Makefile.am (GITVER): Do not use an explicit HEAD parameter and add the "--dirty" option so that builds with uncommitted changes get marked appropriately. --- ChangeLog | 24 ++++++++++++++++++++++-- Makefile.am | 2 +- fromcwd.cc | 2 +- ini.cc | 24 ++++++++++++++++-------- 4 files changed, 40 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0117c42..9aa79d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2015-10-18 Achim Gratz + + * ini.cc (check_ini_sig): Do not complain about a missing + signature file when installing from localdir. If it is present it + still must be checked, however. The "download only" mode should + pull down both the (compressed) setup file and the corresponding + signature (not yet implemented). + (do_local_ini): The builder needs to know the (unescaped) mirror + name it's associated with in order for the file validation to + work. The found_ini_list should directly provide the constituent + parts so that we don't need to extract them (not yet implemented). + + * fromcwd.cc (FindVisitor): Remove superfluous path separator and + simply use SetupArch (which has previously compared equal to + aDir->cFileName) when constructing the setup file name. + + * Makefile.am (GITVER): Do not use an explicit HEAD parameter and + add the "--dirty" option so that builds with uncommitted changes + get marked appropriately. + 2015-10-12 Ken Brown * mkdir.cc (mkdir_p): Remove special treatment of colon in path @@ -106,7 +126,7 @@ to record the search result. (SetupFindVisitor): Make setup.{ini,bz2,xz} known and provide bool private variables to record whether we found them. Another bool - inidir to indicate whether we are currently inside a drectory + inidir to indicate whether we are currently inside a directory where setup.ini files should exist. (SetupFindVisitor::visitFile): When inidir is true, check if a setup file with one of the known extensions was found and set the @@ -119,7 +139,7 @@ (SetupFindVisitor::operator bool): Return true when found_ini_list is non-empty. (do_from_local_dir): Restrict search to either a single mirror - hierarchy or multiple mirror hierarchy; setup files directly in + hierarchy or multiple mirrors hierarchy; setup files directly in local directory or mixed hierarchies are no longer recognized. The setup files must be present in an architecture dependent directory of "x86/" or "x86_64/", either in the local directory diff --git a/Makefile.am b/Makefile.am index e9263cc..248db8d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -274,7 +274,7 @@ inilint_SOURCES = \ csu_util/version_compare.h \ regex/regex.c -GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 HEAD || "N/A") +GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || "N/A") VER := $(subst release_,,$(GITVER)) setup_version.c : $(srcdir)/ChangeLog Makefile diff --git a/fromcwd.cc b/fromcwd.cc index d571b02..c5f2b79 100644 --- a/fromcwd.cc +++ b/fromcwd.cc @@ -74,7 +74,7 @@ public: ext++, fi++) { if (*fi) - found_ini_list.push_back (basePath + "/" + aDir->cFileName + "/" + found_ini_list.push_back (basePath + SetupArch + "/" + SetupBaseName + "." + *ext); } found_ini.assign (setup_ext_list.size (), false); diff --git a/ini.cc b/ini.cc index f933c5b..456eb6e 100644 --- a/ini.cc +++ b/ini.cc @@ -179,13 +179,18 @@ check_ini_sig (io_stream* ini_file, io_stream* ini_sig_file, setup anyway there's be nothing to parse. */ if (!NoVerifyOption && ini_file) { - if (!ini_sig_file) - { - note (owner, IDS_SETUPINI_MISSING, sig_name, site); - delete ini_file; - ini_file = NULL; - sig_fail = true; - } + if (!ini_sig_file) { + // don't complain if the user installs from localdir and no + // signature file is present + // TODO: download the ini + signature file instead + if (casecompare (site, "localdir")) + { + note (owner, IDS_SETUPINI_MISSING, sig_name, site); + delete ini_file; + ini_file = NULL; + sig_fail = true; + } + } else if (!verify_ini_file_sig (ini_file, ini_sig_file, owner)) { note (owner, IDS_SIG_INVALID, sig_name, site); @@ -233,7 +238,10 @@ do_local_ini (HWND owner) // grok information from setup myFeedback.babble ("Found ini file - " + current_ini_name); myFeedback.iniName (current_ini_name); - aBuilder.parse_mirror = ""; + int ldl = local_dir.length () + 1; + int cap = current_ini_name.rfind ("/" + SetupArch); + aBuilder.parse_mirror = + rfc1738_unescape (current_ini_name.substr (ldl, cap - ldl)); ini_init (ini_file, &aBuilder, myFeedback); /*yydebug = 1; */ -- 2.3.10.GIT Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada