From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sa-prd-fep-042.btinternet.com (mailomta6-sa.btinternet.com [213.120.69.12]) by sourceware.org (Postfix) with ESMTPS id 2FCE43857428 for ; Tue, 10 Aug 2021 17:03:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2FCE43857428 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Received: from sa-prd-rgout-002.btmx-prd.synchronoss.net ([10.2.38.5]) by sa-prd-fep-042.btinternet.com with ESMTP id <20210810170351.IOCO7927.sa-prd-fep-042.btinternet.com@sa-prd-rgout-002.btmx-prd.synchronoss.net>; Tue, 10 Aug 2021 18:03:51 +0100 Authentication-Results: btinternet.com; auth=pass (LOGIN) smtp.auth=jonturney@btinternet.com X-SNCR-Rigid: 60FF56FA02420A5E X-Originating-IP: [86.140.112.60] X-OWM-Source-IP: 86.140.112.60 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvtddrjeelgddutdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecunecujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeetteeijeeuuddtiefhhffhlefhffeuveekhedvhfefudeghedtheegveefhfeifeenucffohhmrghinheptgihghifihhnrdgtohhmnecukfhppeekiedrudegtddrudduvddriedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplhhotggrlhhhohhsthdrlhhotggrlhguohhmrghinhdpihhnvghtpeekiedrudegtddrudduvddriedtpdhmrghilhhfrhhomhepoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqedprhgtphhtthhopeeotgihghifihhnqdgrphhpshestgihghifihhnrdgtohhmqedprhgtphhtthhopeeojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheq X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from localhost.localdomain (86.140.112.60) by sa-prd-rgout-002.btmx-prd.synchronoss.net (5.8.340) (authenticated as jonturney@btinternet.com) id 60FF56FA02420A5E; Tue, 10 Aug 2021 18:03:51 +0100 From: Jon Turney To: cygwin-apps@cygwin.com Cc: Jon Turney Subject: [PATCH setup 00/11] Add options to choose symlink type (v2) Date: Tue, 10 Aug 2021 18:02:17 +0100 Message-Id: <20210810170228.1690-1-jon.turney@dronecode.org.uk> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3571.2 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Aug 2021 17:04:02 -0000 Revised from [1], this adds an '--symlink-type {sys, native, wsl}' option, which controls the type of symlinks created by setup and the post-install scripts it invokes [2]. If creating the symlink using the selected method fails, setup falls back to using a sys symlink. '--symlink-type lnk' is not (yet) implemented, because I'm lazy. If the CYGWIN env var contains a 'winsymlinks' setting, the default is controlled by that, otherwise, the default behaviour is '--syslink-type sys', which matches setup's current behaviour (and Cygwin prior to 3.1.5). [1] https://cygwin.com/pipermail/cygwin-apps/2021-May/041327.html [2] requires as yet unreleased Cygwin for 'winsymlinks:sys' support for the '--symlink-type sys' case. Jon Turney (11): Add support for creating WSL symlinks Add support for creating native symlinks Factor out the iteration over archive files to install Add seek() method to archive and compress file classes Add separate symlink-creation phase when extracting archive Enable SeCreateSymbolicLink privilege Add symlink capabilities to user-agent telemetry Factor out StringChoiceOption Add a command line option to choose symlink type used Propagate --symlink-type setting to post-install scripts Default symlink mode from CYGWIN env var archive.cc | 52 ---- archive.h | 14 +- archive_tar.cc | 14 +- compress_bz.cc | 12 + compress_bz.h | 1 + compress_gz.cc | 65 +++-- compress_gz.h | 3 +- compress_xz.cc | 34 ++- compress_xz.h | 3 +- compress_zstd.cc | 19 +- compress_zstd.h | 3 +- filemanip.cc | 27 ++ filemanip.h | 1 + inilintmain.cc | 7 + install.cc | 66 +++-- io_stream_cygfile.cc | 52 +--- libgetopt++/Makefile.am | 3 +- .../include/getopt++/StringChoiceOption.h | 41 +++ libgetopt++/src/StringChoiceOption.cc | 54 ++++ main.cc | 84 +++++- mklink2.cc | 256 +++++++++++++++++- mklink2.h | 10 + nio-ie5.cc | 12 +- script.cc | 36 +++ win32.cc | 76 ++++++ win32.h | 3 + 26 files changed, 775 insertions(+), 173 deletions(-) create mode 100644 libgetopt++/include/getopt++/StringChoiceOption.h create mode 100644 libgetopt++/src/StringChoiceOption.cc -- 2.32.0