This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] setup 2.872


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  <Stromeko@NexGo.DE>
+
+	* 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  <kbrown@cornell.edu>
 
 	* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]