From 2a4d208b96521bce587b6d181617983392225715 Mon Sep 17 00:00:00 2001 From: ph4nt0m Date: Tue, 3 May 2016 09:18:56 +0200 Subject: [PATCH 001/101] filesystem: Add -where parameter to start_shell.cmd * Introduce parameter '-where' which must be followed by an existing directory which will be used to start the shell in (use . for the current working directory) * Use setlocal to return to the original directory after this script finished (any calls to cd will be local to this script) --- filesystem/start_shell.cmd | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/filesystem/start_shell.cmd b/filesystem/start_shell.cmd index e0a9d894c72..b5c2f64a0ed 100644 --- a/filesystem/start_shell.cmd +++ b/filesystem/start_shell.cmd @@ -1,4 +1,5 @@ @echo off +setlocal set "WD=%__CD__%" if NOT EXIST "%WD%msys-2.0.dll" set "WD=%~dp0usr\bin\" @@ -29,6 +30,15 @@ if "x%~1" == "x-conemu" shift& set MSYSCON=conemu& goto :checkparams if "x%~1" == "x-defterm" shift& set MSYSCON=defterm& goto :checkparams rem Other parameters if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams +if "x%~1" == "x-where" shift& ( + set CHERE_INVOKING=1 + rem Check if next argument is an existing directory + if not "%~2" == "" if exist "%~2\" shift& cd /d "%~2\"& goto :checkparams + + rem If not, print error and exit + echo Invalid directory specified for -where. Exiting. 1>&2 + exit /b 1 +) rem Autodetect shell type if not specified From 8f4825e69ea7d5c040e80398dcb17a2800ac3ece Mon Sep 17 00:00:00 2001 From: David Macek Date: Tue, 3 May 2016 10:49:33 +0200 Subject: [PATCH 002/101] filesystem: Update version and checksums after last merge --- filesystem/PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index d58d591b103..6f749f2f8ec 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -1,8 +1,8 @@ # Maintainer: Alexey Pavlov pkgname=filesystem -pkgver=2016.04 -pkgrel=3 +pkgver=2016.05 +pkgrel=1 pkgdesc='Base filesystem' arch=('i686' 'x86_64') license=('BSD') @@ -52,7 +52,7 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' 'b896abbbd7187184045e42e2646d4cb25f5484a27558f780137c7ec9ca9bdc47' '50c3746d621e682e3560e1b37cc1ac5d988460064a20ed15f107c203ac5ad622' '9620bdf1c82ea3f14c3553c44a2006ea61ff3f5a775a2a053130a59cc186daf5' - '161dfbd6f4f3a9b2458203c6aecaacbb095d71d73fdcf3b1dde3acbc129d9834' + 'e38c92ded3ba1cb5bedec40dc3691a4558d88bb632e07b614df7bb10fcd34cad' '73bf20b5d11a5d2e8754bd62bb8a7cbb4fd31dfe781169723b1842aa62c323ab' '71f3031066ca0824e4b494127f74a41920b15f8b6d3f573c43da080050c0e1ca' 'cc4088d418a2dbb1ec754a0e89b80b8521b04011c08b8f5c9a563f1bdd745c8f' From 810f24d9fa53fba55d54a85cf895cdd9e442accc Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 2 May 2016 14:56:27 +0200 Subject: [PATCH 003/101] openssl: new version Signed-off-by: Johannes Schindelin --- openssl/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openssl/PKGBUILD b/openssl/PKGBUILD index 945b9d2fd63..6307001918d 100644 --- a/openssl/PKGBUILD +++ b/openssl/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alexey Pavlov pkgname=('openssl' 'libopenssl' 'openssl-devel') -_ver=1.0.2g +_ver=1.0.2h # use a pacman compatible version scheme pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}} pkgrel=1 @@ -19,7 +19,7 @@ source=("https://www.openssl.org/source/${pkgname}-${_ver}.tar.gz"{,.asc} 'openssl-1.0.1e-cygwin64.patch' 'openssl-1.0.1e-msys2.patch' 'openssl-1.0.0-beta5-enginesdir.patch') -sha256sums=('b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33' +sha256sums=('1d4007e53aad94a5b2002fe045ee7bb0b3d98f1a47f8b2bc851dcd1c74332919' 'SKIP' '754d6107a306311e15a1db6a1cc031b81691c8b9865e8809ac60ca6f184c957c' '01b7d475d1aeeecdae1ca8ff90483c11f34991348418d9e98c655e1579764bb1' From e50eedc81cd858937ddab8ac9baeb27c911eeb57 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Thu, 28 Apr 2016 18:27:45 -0300 Subject: [PATCH 004/101] CI: System update fixes. * Update pacman to latest version for performing the AppVeyor core update instead of explicitly referencing the core packages. Missing references would cause the just upgraded pacman to detect a still required core update in ci-build script, where it is supposed to perform a regular update instead. * Enable downgrades in ci-build script and AppVeyor so package versions removed from pacman repositories are properly reverted. * Install git as required by ci-build script. --- appveyor.yml | 10 ++++++++-- ci-build.sh | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e33b9b98729..59f70c50d43 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,8 +6,14 @@ environment: BUILD_URL: https://ci.appveyor.com/project/$(APPVEYOR_ACCOUNT_NAME)/$(APPVEYOR_PROJECT_NAME)/build/$(APPVEYOR_BUILD_VERSION) build_script: - # TODO: implement update-core --noconfirm and replace the below command line - - C:\msys64\usr\bin\pacman --sync --refresh --refresh --needed --noconfirm msys2-runtime msys2-runtime-devel bash pacman pacman-mirrors + # TODO: remove the line below once the AppVeyor installation includes a + # newer version of pacman that can perform core updates + - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh pacman + + # Git is required but currently not part of AppVeyor installation + - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh git + + - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade - C:\msys64\usr\bin\bash --login -c "$(cygpath ${APPVEYOR_BUILD_FOLDER})/ci-build.sh" artifacts: diff --git a/ci-build.sh b/ci-build.sh index 07428270876..32b029631ac 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -22,7 +22,7 @@ define_build_order || failure 'Could not determine build order' # Build message 'Building packages' "${packages[@]}" -execute 'Upgrading the system' pacman --noconfirm --noprogressbar --sync --refresh --refresh --sysupgrade +execute 'Upgrading the system' pacman --noconfirm --noprogressbar --sync --refresh --refresh --sysupgrade --sysupgrade for package in "${packages[@]}"; do execute 'Building binary' makepkg --noconfirm --noprogressbar --skippgpcheck --nocheck --syncdeps --rmdeps --cleanbuild execute 'Building source' makepkg --noconfirm --noprogressbar --skippgpcheck --allsource From a4b1c9f254b7eedffd26497d200b9d23fdf47140 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Mon, 2 May 2016 18:40:12 -0300 Subject: [PATCH 005/101] CI: Fix detection of package installation failures. --- ci-build.sh | 2 +- ci-library.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ci-build.sh b/ci-build.sh index 32b029631ac..6c3ec4b9210 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -26,7 +26,7 @@ execute 'Upgrading the system' pacman --noconfirm --noprogressbar --sync --refre for package in "${packages[@]}"; do execute 'Building binary' makepkg --noconfirm --noprogressbar --skippgpcheck --nocheck --syncdeps --rmdeps --cleanbuild execute 'Building source' makepkg --noconfirm --noprogressbar --skippgpcheck --allsource - yes|execute 'Installing' pacman --noprogressbar --upgrade *.pkg.tar.xz + execute 'Installing' yes:pacman --noprogressbar --upgrade *.pkg.tar.xz deploy_enabled && mv "${package}"/*.pkg.tar.xz artifacts deploy_enabled && mv "${package}"/*.src.tar.gz artifacts unset package diff --git a/ci-library.sh b/ci-library.sh index 82b2ade370f..8cc83c0ae58 100644 --- a/ci-library.sh +++ b/ci-library.sh @@ -118,10 +118,14 @@ git_config() { # Run command with status execute(){ local status="${1}" - local command=("${@:2}") + local command="${2}" + local arguments=("${@:3}") cd "${package:-.}" message "${status}" - ${command[@]} || failure "${status} failed" + if [[ "${command}" != *:* ]] + then ${command} ${arguments[@]} + else ${command%%:*} | ${command#*:} ${arguments[@]} + fi || failure "${status} failed" cd - > /dev/null } From 7f110ae7a4ace2baaa3d62a7ef36d9b5a4ff1160 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Thu, 5 May 2016 17:16:06 -0300 Subject: [PATCH 006/101] CI: Set a default shell in AppVeyor. MSYSTEM is now explicitly set to MSYS, so /opt/bin is added to system path and related build failures are avoided, for example for packages using mingw-w64-cross-gcc. --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 59f70c50d43..9675b25bd19 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,5 @@ environment: + MSYSTEM: MSYS DEPLOY_PROVIDER: bintray BINTRAY_ACCOUNT: alexpux BINTRAY_REPOSITORY: msys2 From 815b58e53c407c255ff4eb039a481ab3d1c807c6 Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Sat, 7 May 2016 16:23:23 -0400 Subject: [PATCH 007/101] scons - 2.5.0 - update to new version scons - 2.5.0 - update to new version --- scons/PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scons/PKGBUILD b/scons/PKGBUILD index b1b9184a5ba..76e41acbe91 100644 --- a/scons/PKGBUILD +++ b/scons/PKGBUILD @@ -2,8 +2,8 @@ # Contributor: Renato Silva pkgname=scons -pkgver=2.4.1 -pkgrel=2 +pkgver=2.5.0 +pkgrel=1 pkgdesc="Extensible Python-based build utility" arch=('any') groups=('base-devel') @@ -14,7 +14,7 @@ source=("https://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver scons-2.3.4-cyglink-msys2.patch scons-2.3.4-msys2-plat-mingw-env.patch mingw_w64.py) -sha256sums=('8fc4f42928c69bcbb33e1be94b646f2c700b659693fabc778c192d4d22f753a7' +sha256sums=('eb296b47f23c20aec7d87d35cfa386d3508e01d1caa3040ea6f5bbab2292ace9' '01b2bd24c39057cac5f3d21fa6d469de0c9e6e3f40c438ffc7f0f64d6e760571' 'c024560dc93636d92614c17d7519080dd931f6c1471088616692a443d3cfc064' '984c55d0ca18ac594941bb6336fe994efe2f5bba20225e8cb1f5d42c80eaf651') From 0dbe37beb81abc56d274b59fe0ca4d021a6af7f4 Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Sat, 7 May 2016 16:26:24 -0400 Subject: [PATCH 008/101] python-pygments - 2.1.3 - update to latest version python-pygments - 2.1.3 - update to latest version --- python-pygments/PKGBUILD | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/python-pygments/PKGBUILD b/python-pygments/PKGBUILD index 85b6db5005c..b148c1d867d 100644 --- a/python-pygments/PKGBUILD +++ b/python-pygments/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: João Guerra +_pyname=Pygments pkgbase="python-pygments" pkgname=("python2-pygments" "python3-pygments") -pkgver=2.1.1 +pkgver=2.1.3 pkgrel=1 pkgdesc="A syntax highlighting engine written in Python" arch=("i686" "x86_64") @@ -11,20 +12,22 @@ license=('BSD') makedepends=("python2-setuptools" "python3-setuptools") source=("https://pypi.python.org/packages/source/P/Pygments/Pygments-${pkgver}.tar.gz") noextract=("Pygments-${pkgver}.tar.gz") -sha256sums=('2df7d9a85b56e54c7c021dc98fc877bd216ead652c10da170779c004fb59c01b') +sha256sums=('88e4c8a91b2af5962bfa5ea2447ec6dd357018e86e94c7d14bd8cacbc5b55d81') prepare () { # workaround for symlink issue - tar -xf Pygments-${pkgver}.tar.gz || true - cp Pygments-${pkgver}/scripts/debug_lexer.py Pygments-${pkgver}/scripts/find_error.py + tar -xf ${_pyname}-${pkgver}.tar.gz || true + cp ${_pyname}-${pkgver}/scripts/debug_lexer.py \ + ${_pyname}-${pkgver}/scripts/find_error.py + } package_python2-pygments () { depends=("python2") install="python2-pygments.install" - cd "Pygments-${pkgver}" - python2 setup.py install --root="${pkgdir}" -O1 + cd "${_pyname}-${pkgver}" + /usr/bin/python2 setup.py install --root="${pkgdir}" -O1 mv "${pkgdir}/usr/bin/pygmentize" "${pkgdir}/usr/bin/pygmentize2" install -Dm644 external/pygments.bashcomp "${pkgdir}/usr/share/bash-completion/completions/pygmentize2" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" @@ -33,8 +36,8 @@ package_python2-pygments () { package_python3-pygments () { depends=("python3") - cd "Pygments-${pkgver}" - python3 setup.py install --root="${pkgdir}" -O1 + cd "${_pyname}-${pkgver}" + /usr/bin/python3 setup.py install --root="${pkgdir}" -O1 install -Dm644 external/pygments.bashcomp "${pkgdir}/usr/share/bash-completion/completions/pygmentize" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } From 38ad84737451350f77f7982bad929e79c9df8cfb Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Sat, 7 May 2016 21:00:50 -0400 Subject: [PATCH 009/101] setconf - 0.7.2 - Update to latest version --- setconf/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setconf/PKGBUILD b/setconf/PKGBUILD index 63d5e015bf5..c59752a7cf6 100644 --- a/setconf/PKGBUILD +++ b/setconf/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alexey Pavlov pkgname=setconf -pkgver=0.6.2 +pkgver=0.7.2 pkgrel=1 pkgdesc='Utility to easily change settings in configuration files' arch=('any') @@ -9,7 +9,7 @@ url='http://setconf.roboticoverlords.org/' license=('GPL2') depends=('python2') source=("http://setconf.roboticoverlords.org/$pkgname-$pkgver.tar.xz") -sha256sums=('8f91dc5cc24cc9d4f7c34fbc657259384f99d7222b6df9375bac5436d601d0c2') +sha256sums=('9ae89ead0e8dda1b22cfc120b37328fb3f62ca86e11886ace8e514f48d13a545') prepare() { sed -i 's:usr/bin/python:usr/bin/python2:' "$pkgname-$pkgver/$pkgname.py" From 1451aad1539fc1062ad200fcfeef4c6c652f866c Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Mon, 9 May 2016 00:18:50 -0400 Subject: [PATCH 010/101] python-py: 1.4.31 - update to latest version Update to latest version and specify python path so we use the right version. --- python-py/PKGBUILD | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python-py/PKGBUILD b/python-py/PKGBUILD index b362ca18ea2..83dd3c22bb5 100644 --- a/python-py/PKGBUILD +++ b/python-py/PKGBUILD @@ -8,7 +8,7 @@ pkgbase=python-py pkgname=('python3-py' 'python2-py') -pkgver=1.4.30 +pkgver=1.4.31 pkgrel=1 pkgdesc="library with cross-python path, ini-parsing, io, code, log facilities" arch=('any') @@ -16,7 +16,7 @@ license=('MIT') url="https://pylib.readthedocs.org/" makedepends=('python3-setuptools' 'python2-setuptools') source=("https://pypi.python.org/packages/source/p/py/py-$pkgver.tar.gz") -sha512sums=('dd9d92f8eaf8e5fc61bfb7feb4b07df5ae1745ebf88bcbe9d62589caa9e1f7d8beae5b2d20b407520919e47391cd50cf2d5323556fa5bd90a37e120b1d394d7a') +sha512sums=('fd0f4f509d81beb8e5cdb5a8d5d7d40d8a74737c017c915b0630ce740868c32fbf1af4a01dec2ae998e5a9516578e8404ad2b8d966606919767ae25f27eb0b0d') prepare() { cp -a py-${pkgver}{,-py2} @@ -24,17 +24,17 @@ prepare() { build() { cd "$srcdir/py-${pkgver}" - python3 setup.py build + /usr/bin/python3 setup.py build cd "$srcdir/py-${pkgver}-py2" - python2 setup.py build + /usr/bin/python2 setup.py build } package_python3-py() { depends=('python3') cd py-${pkgver} - python3 setup.py install --root="${pkgdir}" --optimize=1 + /usr/bin/python3 setup.py install --root="${pkgdir}" --optimize=1 install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } @@ -42,7 +42,7 @@ package_python2-py() { depends=('python2') cd py-${pkgver}-py2 - python2 setup.py install --root="${pkgdir}" --optimize=1 + /usr/bin/python2 setup.py install --root="${pkgdir}" --optimize=1 install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } From a8db1609f29a3777eb28f030b007f939f7ffc169 Mon Sep 17 00:00:00 2001 From: datamuc Date: Mon, 9 May 2016 10:46:33 +0200 Subject: [PATCH 011/101] cmp is needed in the build process --- openssl/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openssl/PKGBUILD b/openssl/PKGBUILD index 6307001918d..b4f30c085ec 100644 --- a/openssl/PKGBUILD +++ b/openssl/PKGBUILD @@ -10,7 +10,7 @@ arch=('i686' 'x86_64') url='https://www.openssl.org' license=('custom:BSD') depends=('zlib') -makedepends=('gcc' 'tar' 'perl' 'zlib-devel') +makedepends=('gcc' 'tar' 'perl' 'zlib-devel' 'diffutils') options=('!makeflags' 'staticlibs') noextract=(${pkgname}-${_ver}.tar.gz) source=("https://www.openssl.org/source/${pkgname}-${_ver}.tar.gz"{,.asc} From b3c58d885551477ced967854a371488b1d99913a Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Mon, 9 May 2016 05:25:23 -0400 Subject: [PATCH 012/101] python-colorama: 0.3.7 - update to latest version and Python3 package python-colorama: 0.3.7 - update to latest version and Python3 package --- python-colorama/PKGBUILD | 58 +++++++++++++++++++++++++++++++++++++++ python2-colorama/PKGBUILD | 29 -------------------- 2 files changed, 58 insertions(+), 29 deletions(-) create mode 100644 python-colorama/PKGBUILD delete mode 100644 python2-colorama/PKGBUILD diff --git a/python-colorama/PKGBUILD b/python-colorama/PKGBUILD new file mode 100644 index 00000000000..7561b07e8ca --- /dev/null +++ b/python-colorama/PKGBUILD @@ -0,0 +1,58 @@ +# ArchLinux: +# Maintainer: Alexander Duscheleit +# MSYS2: +# Maintainer: Ray Donnelly + +_pyname=colorama +pkgname=(python2-${_pyname} python3-${_pyname}) +pkgver=0.3.7 +pkgrel=1 +pkgdesc="Python API for cross-platform colored terminal text." +arch=('any') +url="https://pypi.python.org/pypi/colorama" +license=('BSD') +makedepends=('python2' 'python3' 'git') +checkdepends=('python3-mock' 'python2-mock') +source=(https://pypi.python.org/packages/source/c/colorama/colorama-$pkgver.tar.gz) +sha256sums=('e043c8d32527607223652021ff648fbb394d5e19cba9f1a698670b338c9d782b') + + +prepare() { + for pver in {3,2}; do + rm -rf python${pver} || true + cp -r ${_pyname}-${pkgver} python${pver} + done +} + +build() { + for pver in {3,2}; do + cd "$srcdir/python${pver}" + /usr/bin/python${pver} setup.py build + done +} + +check() { + for pver in {3,2}; do + msg "Python ${pver} test" + cd "${srcdir}/python${pver}" + /usr/bin/python${pver}.exe -m unittest discover -p *_test.py || warning "test failed" + done +} + +package_python2-colorama() { + depends=('python2') + + cd ${srcdir}/python2 + /usr/bin/python2 setup.py install --root="${pkgdir}" --optimize=1 + install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt" +} + +package_python3-colorama() { + depends=('python3') + + cd ${srcdir}/python3 + /usr/bin/python3 setup.py install --root="${pkgdir}" --optimize=1 + install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt" +} + +# vim:set ts=2 sw=2 et: diff --git a/python2-colorama/PKGBUILD b/python2-colorama/PKGBUILD deleted file mode 100644 index 8ebea1e065b..00000000000 --- a/python2-colorama/PKGBUILD +++ /dev/null @@ -1,29 +0,0 @@ -# ArchLinux: -# Maintainer: Alexander Duscheleit -# MSYS2: -# Maintainer: Ray Donnelly - -pkgname=python2-colorama -pkgver=0.3.2 -pkgrel=1 -pkgdesc="Python API for cross-platform colored terminal text." -arch=('any') -url="https://pypi.python.org/pypi/colorama" -license=('BSD') -depends=('python2') -source=(https://pypi.python.org/packages/source/c/colorama/colorama-$pkgver.tar.gz) -sha256sums=('218862857d74ff781c2caf44629a7d72b88bbb8a2b0aa0f4f1eb8666f8305c11') - -build() { - cd "$srcdir/colorama-$pkgver" - - python2 setup.py build -} - -package() { - cd "$srcdir/colorama-$pkgver" - - python2 setup.py install --root=$pkgdir --optimize=1 -} - -# vim:set ts=2 sw=2 et: From fccbd55905692a7c4ed64182d07b4969cfe0ac45 Mon Sep 17 00:00:00 2001 From: mati865 Date: Sat, 14 May 2016 15:57:59 +0200 Subject: [PATCH 013/101] gdb: fix path for gcc-5.3.0 libstdcxx Fixes importError: Traceback (most recent call last): File "", line 3, in ImportError: No module named libstdcxx.v6.printers /etc/gdbinit:6: Error in sourced command file: Error while executing Python code. --- gdb/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/PKGBUILD b/gdb/PKGBUILD index 0a3b555925b..ef76311d099 100644 --- a/gdb/PKGBUILD +++ b/gdb/PKGBUILD @@ -2,8 +2,8 @@ pkgname=gdb pkgver=7.9 -pkgrel=1 -_gcc_ver=4.9.2 +pkgrel=2 +_gcc_ver=5.3.0 pkgdesc="GNU Debugger (MSYS2 version)" arch=('i686' 'x86_64') license=('GPL3') From ec5c433ede3e133a4019c686b13e3bcf59b91d2e Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Mon, 25 Apr 2016 19:28:33 -0300 Subject: [PATCH 014/101] ccache: Some improvements. * Add support for MINGW compilers. * Fix ccache option for makepkg-mingw. * Replace wrapper scripts with symlinks. * Update to 3.2.5. --- ccache/PKGBUILD | 13 ++++--------- ccache/ccache.install | 10 ++++++++++ 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 ccache/ccache.install diff --git a/ccache/PKGBUILD b/ccache/PKGBUILD index 8361c2c0b15..2abf1fea763 100644 --- a/ccache/PKGBUILD +++ b/ccache/PKGBUILD @@ -1,7 +1,8 @@ # Maintainer: Mateusz MikuÅ‚a +# Contributor: Renato Silva pkgname=ccache -pkgver=3.2.4 +pkgver=3.2.5 pkgrel=1 pkgdesc="A compiler cache (mingw-w64)" arch=('i686' 'x86_64') @@ -11,9 +12,10 @@ replaces=("${pkgname}-git") makedepends=("gcc" "pkg-config") depends=("gcc-libs" "zlib") options=('staticlibs' 'strip') +install="${pkgname}.install" source=(https://samba.org/ftp/ccache/${pkgname}-${pkgver}.tar.bz2{,.asc} "MSYS2-dont-use-symlinks.patch") -sha256sums=('ffeb967edb549e67da0bd5f44f729a2022de9fdde65dfd80d2a7204d7f75332e' +sha256sums=('7a553809e90faf9de3a23ee9c5b5f786cfd4836bf502744bedb824a24bee1097' 'SKIP' 'a0d2ea2ef1c9e59d4e5fdd659d291a4c7f4afc48ad50b1bc00f77349337d3167') @@ -38,11 +40,4 @@ build() { package() { cd "${srcdir}/build-${CHOST}" make DESTDIR="${pkgdir}" install - - install -d ${pkgdir}/usr/lib/ccache/bin - cd ${pkgdir}/usr/lib/ccache/bin - scripts=(c++ cc cpp gcc g++ ${CARCH}-pc-msys-g++ ${CARCH}-pc-msys-c++ ${CARCH}-pc-msys-gcc) - for fn in ${scripts[*]}; do - echo -e '#!/bin/bash\n\nccache /usr/bin/'$fn' "$@"' > $fn - done } diff --git a/ccache/ccache.install b/ccache/ccache.install new file mode 100644 index 00000000000..12e62880356 --- /dev/null +++ b/ccache/ccache.install @@ -0,0 +1,10 @@ +post_install() { + mkdir -p /usr/lib/ccache/bin + for compiler in c++ cc cpp gcc g++ {i686,x86_64}-{pc-msys,w64-mingw32}-{g++,c++,gcc}; do + MSYS='winsymlinks:lnk' ln -sf /usr/bin/ccache /usr/lib/ccache/bin/${compiler} + done +} + +pre_remove() { rm -rf /usr/lib/ccache; } +pre_upgrade() { pre_remove; } +post_upgrade() { post_install; } From e9fbafcc87235e2114c466ce2b0ee777d7a7f496 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Sat, 30 Apr 2016 21:08:22 -0300 Subject: [PATCH 015/101] colormake: New package. --- colormake-git/PKGBUILD | 31 +++++++++++++++++++++++++++++++ colormake-git/colormake.install | 11 +++++++++++ 2 files changed, 42 insertions(+) create mode 100644 colormake-git/PKGBUILD create mode 100644 colormake-git/colormake.install diff --git a/colormake-git/PKGBUILD b/colormake-git/PKGBUILD new file mode 100644 index 00000000000..57bcb7dc6d3 --- /dev/null +++ b/colormake-git/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Renato Silva + +_realname='colormake' +pkgname="${_realname}-git" +pkgver=r8.9c1d2e6 +pkgrel=1 +pkgdesc='Colorized build output' +url='https://github.com/renatosilva/colormake' +license=(BSD) +arch=(any) + +provides=(${_realname}) +conflicts=(${_realname}) +depends=(make) +makedepends=(git) +install="${_realname}.install" +source=("git+https://github.com/renatosilva/colormake" + "${_realname}.install") +sha256sums=('SKIP' + '77404b4ebad97738edabb6c8a1c1958cb73e28dedeed5a85a4e0ceaf1469fd73') + +pkgver() { + cd "${srcdir}/${_realname}" + printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD) +} + +package() { + cd "${srcdir}/${_realname}" + install -Dm755 colormake.sh "${pkgdir}/usr/bin/colormake" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_realname}/LICENSE" +} diff --git a/colormake-git/colormake.install b/colormake-git/colormake.install new file mode 100644 index 00000000000..ebc51c3bdeb --- /dev/null +++ b/colormake-git/colormake.install @@ -0,0 +1,11 @@ +post_install() { + # Create the make wrapper without overriding make.exe + echo '#!/bin/bash' > /usr/bin/make.sh + echo 'COLORMAKE_COMMAND=make.exe colormake "${@}"' >> /usr/bin/make.sh + /usr/bin/cmd //c "ren $(cygpath -w /usr/bin/make.sh) make" +} + +pre_remove() { + # Remove the make wrapper not make.exe + /usr/bin/cmd //c "del /q $(cygpath -w /usr/bin/make)" +} From dce436e6ec228c409e34e2d62b95571c2ba57f8c Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Sat, 30 Apr 2016 21:08:42 -0300 Subject: [PATCH 016/101] colordiff: New package. --- colordiff/001-colorize-filenames.patch | 18 +++++++++++++++ colordiff/002-build-fix.patch | 12 ++++++++++ colordiff/PKGBUILD | 31 ++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 colordiff/001-colorize-filenames.patch create mode 100644 colordiff/002-build-fix.patch create mode 100644 colordiff/PKGBUILD diff --git a/colordiff/001-colorize-filenames.patch b/colordiff/001-colorize-filenames.patch new file mode 100644 index 00000000000..f8160b58f94 --- /dev/null +++ b/colordiff/001-colorize-filenames.patch @@ -0,0 +1,18 @@ +diff -aurN 000/colordiff.pl 001/colordiff.pl +--- 000/colordiff.pl ++++ 001/colordiff.pl +@@ -503,7 +503,13 @@ + } + } + elsif ($diff_type eq 'diffu') { +- if (/^-/) { ++ if (/^--- /) { ++ print "$colour{darkyellow}"; ++ } ++ elsif (/^\+\+\+ /) { ++ print "$colour{darkyellow}"; ++ } ++ elsif (/^-/) { + print "$file_old"; + } + elsif (/^\+/) { diff --git a/colordiff/002-build-fix.patch b/colordiff/002-build-fix.patch new file mode 100644 index 00000000000..2ff62eef46f --- /dev/null +++ b/colordiff/002-build-fix.patch @@ -0,0 +1,12 @@ +diff -aurN 001/Makefile 002/Makefile +--- 001/Makefile ++++ 002/Makefile +@@ -20,7 +20,7 @@ + perl -p -i -e 's#
\ + ${DESTDIR}${INSTALL_DIR}/colordiff diff --git a/colordiff/PKGBUILD b/colordiff/PKGBUILD new file mode 100644 index 00000000000..7420e4ba860 --- /dev/null +++ b/colordiff/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Renato Silva + +pkgname='colordiff' +pkgver='1.0.16' +pkgrel=1 +pkgdesc='Diff wrapper with pretty syntax highlighting' +url='http://www.colordiff.org' +license=('GPL2') +arch=(any) + +depends=(diffutils perl) +makedepends=(w3m) +backup=(etc/colordiffrc) +source=(${pkgname}-${pkgver}.tar.gz::"https://github.com/daveewart/colordiff/archive/v${pkgver}.tar.gz" + 001-colorize-filenames.patch + 002-build-fix.patch) +sha256sums=('ccb81f4f5669bcc6a8643afe8ed2b8edd61e2906f4f7aafce009d61ee7ef63bb' + 'deb380507f19aaa2eb73d7cbff208572f4799b4e94de0cecbba2e3f5f19e2308' + '24f406f30a5fe3d67b8bbb8ffbb5fd482b44a8774c87197a5181cf16ee1db01b') + +prepare() { + cd "${pkgname}-${pkgver}" + patch -p1 -i "${srcdir}/001-colorize-filenames.patch" + patch -p1 -i "${srcdir}/002-build-fix.patch" +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" MAN_DIR='/usr/share/man/man1' INSTALL_DIR='/usr/bin' install doc + install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" +} From f6440fbde4b9df9a2ce89e45b65abda1c1f9e7f3 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Wed, 4 May 2016 18:54:50 -0300 Subject: [PATCH 017/101] winpty, winpty-git: Fix path conversion and build problem. The program arguments should now be properly converted from unix to Windows format, like done for non-MSYS programs. An indirect dependency is now referenced by makedepends for avoiding build problems when using its default provider. --- winpty-git/0002-fix-path-conversion.patch | 66 +++++++++++++++++++++++ winpty-git/PKGBUILD | 35 +++++++++--- winpty/0002-fix-path-conversion.patch | 66 +++++++++++++++++++++++ winpty/PKGBUILD | 33 ++++++++++-- 4 files changed, 189 insertions(+), 11 deletions(-) create mode 100644 winpty-git/0002-fix-path-conversion.patch create mode 100644 winpty/0002-fix-path-conversion.patch diff --git a/winpty-git/0002-fix-path-conversion.patch b/winpty-git/0002-fix-path-conversion.patch new file mode 100644 index 00000000000..2ded4dba67f --- /dev/null +++ b/winpty-git/0002-fix-path-conversion.patch @@ -0,0 +1,66 @@ +diff -aurN 0001/src/unix-adapter/main.cc 0002/src/unix-adapter/main.cc +--- 0001/src/unix-adapter/main.cc ++++ 0002/src/unix-adapter/main.cc +@@ -47,6 +47,7 @@ + #include "OutputHandler.h" + #include "Util.h" + #include "WakeupFd.h" ++#include "path_conv.h" + + #define CSI "\x1b[" + +@@ -154,7 +155,12 @@ + char *tmp; + #if defined(CYGWIN_VERSION_CYGWIN_CONV) && \ + CYGWIN_VERSION_API_MINOR >= CYGWIN_VERSION_CYGWIN_CONV +- // MSYS2 and versions of Cygwin released after 2009 or so use this API. ++#if defined(__MSYS__) ++ size_t newSize = 256 * MAX_PATH; ++ tmp = new char[newSize + 1]; ++ convert(tmp, newSize, path.c_str()); ++#else ++ // Versions of Cygwin released after 2009 or so use this API. + // The original MSYS still lacks this API. + ssize_t newSize = cygwin_conv_path(CCP_POSIX_TO_WIN_A | CCP_RELATIVE, + path.c_str(), NULL, 0); +@@ -163,6 +169,7 @@ + ssize_t success = cygwin_conv_path(CCP_POSIX_TO_WIN_A | CCP_RELATIVE, + path.c_str(), tmp, newSize + 1); + assert(success == 0); ++#endif + #else + // In the current Cygwin header file, this API is documented as deprecated + // because it's restricted to paths of MAX_PATH length. In the CVS version +@@ -173,10 +180,6 @@ + tmp = new char[MAX_PATH + path.size()]; + cygwin_conv_to_win32_path(path.c_str(), tmp); + #endif +- for (int i = 0; tmp[i] != '\0'; ++i) { +- if (tmp[i] == '/') +- tmp[i] = '\\'; +- } + std::string ret(tmp); + delete [] tmp; + return ret; +diff -aurN 0001/src/unix-adapter/path_conv.cc 0002/src/unix-adapter/path_conv.cc +--- 0001/src/unix-adapter/path_conv.cc ++++ 0002/src/unix-adapter/path_conv.cc +@@ -633,7 +633,6 @@ + one_path[to-from] = '\0'; + char win32_path1[PATH_MAX + 1]; + ssize_t result = cygwin_conv_path(CCP_POSIX_TO_WIN_A|CCP_ABSOLUTE, one_path, win32_path1, PATH_MAX+1); +- printf("called cygwin_conv_path(CCP_POSIX_TO_WIN_A,%s -> %s, in-size %d, result = %zd\n", one_path, win32_path1, PATH_MAX+1, result); + if( result !=0 ) { + copy_to_dst(one_path, NULL, dst, dstend); + } else { +diff -aurN 0001/src/unix-adapter/subdir.mk 0002/src/unix-adapter/subdir.mk +--- 0001/src/unix-adapter/subdir.mk ++++ 0002/src/unix-adapter/subdir.mk +@@ -28,6 +28,7 @@ + build/unix-adapter/unix-adapter/Util.o \ + build/unix-adapter/unix-adapter/WakeupFd.o \ + build/unix-adapter/unix-adapter/main.o \ ++ build/unix-adapter/unix-adapter/path_conv.o \ + build/unix-adapter/shared/DebugClient.o \ + build/unix-adapter/shared/WinptyAssert.o \ + build/unix-adapter/shared/WinptyVersion.o diff --git a/winpty-git/PKGBUILD b/winpty-git/PKGBUILD index df2ffa0f3ff..41bdd227646 100644 --- a/winpty-git/PKGBUILD +++ b/winpty-git/PKGBUILD @@ -1,35 +1,58 @@ # Maintainer: Martell Malone # Contributor: Alexey Pavlov # Contributor: David Macek +# Contributor: Renato Silva _realname=winpty pkgname="${_realname}-git" epoch=1 -pkgver=0.2.2.374.ccbdaf7 +pkgver=0.3.0.429.671360a pkgrel=1 pkgdesc="A Windows software package providing an interface similar to a Unix pty-master for communicating with Windows console programs" arch=('i686' 'x86_64') url="https://github.com/rprichard/winpty" license=("MIT") -makedepends=("git" "tar" "automake" "xz" - "mingw-w64-cross-gcc") + +# Explicitly reference the git version of the indirect dependency mingw-w64-cross-crt +# for avoiding problems with its default provider mingw-w64-cross-crt-clang-git +makedepends=(git tar automake xz + mingw-w64-cross-gcc + mingw-w64-cross-crt-git) + provides=("${_realname}") conflicts=("${_realname}") #depends=( "ncurses-devel" ) options=('staticlibs' 'strip') + +# TODO: Replace path_conv with arg_heuristic from MSYS2 runtime +# See https://github.com/rprichard/winpty/issues/56 source=("${_realname}"::"git+https://github.com/rprichard/winpty.git" - 0001-Apply-POSIX-to-Win-conversion-on-all-arguments-on-MSYS.patch) + path_conv.cc::'https://github.com/Alexpux/path_convert/raw/master/src/path_conv.cpp' + path_conv.h::'https://github.com/Alexpux/path_convert/raw/master/src/path_conv.h' + 0001-Apply-POSIX-to-Win-conversion-on-all-arguments-on-MSYS.patch + 0002-fix-path-conversion.patch) + sha256sums=('SKIP' - 'c9705d86feba11f1155e4259d28131afb14db3c30c17efe96bdd655afa72ee04') + '7181d260592dc193f235965f202a5509b113d8b478efae3f06176b8625b683cc' + 'c84e4edc5a1e387dc1ea06445db76a7bfe43e816f0c32558ce8d8562378d5782' + 'c9705d86feba11f1155e4259d28131afb14db3c30c17efe96bdd655afa72ee04' + '4427afccf0b648d3bc1aa7442b0f611674efd91474fee48f7bf842194d6cea4f') pkgver() { cd "${srcdir}/${_realname}" printf "%s.%s.%s" "$(cat VERSION.txt)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } +consolidate() { + cp ../path_conv.cc src/unix-adapter/path_conv.cc + cp ../path_conv.h src/unix-adapter/path_conv.h +} + prepare() { cd "${srcdir}/${_realname}" - git am ${srcdir}/0001-Apply-POSIX-to-Win-conversion-on-all-arguments-on-MSYS.patch + consolidate + patch -p1 -i ${srcdir}/0001-Apply-POSIX-to-Win-conversion-on-all-arguments-on-MSYS.patch + patch -p1 -i ${srcdir}/0002-fix-path-conversion.patch } build() { diff --git a/winpty/0002-fix-path-conversion.patch b/winpty/0002-fix-path-conversion.patch new file mode 100644 index 00000000000..19116a257d8 --- /dev/null +++ b/winpty/0002-fix-path-conversion.patch @@ -0,0 +1,66 @@ +diff -aurN 0001/src/unix-adapter/main.cc 0002/src/unix-adapter/main.cc +--- 0001/src/unix-adapter/main.cc ++++ 0002/src/unix-adapter/main.cc +@@ -47,6 +47,7 @@ + #include "OutputHandler.h" + #include "Util.h" + #include "WakeupFd.h" ++#include "path_conv.h" + + #define CSI "\x1b[" + +@@ -154,7 +155,12 @@ + char *tmp; + #if defined(CYGWIN_VERSION_CYGWIN_CONV) && \ + CYGWIN_VERSION_API_MINOR >= CYGWIN_VERSION_CYGWIN_CONV +- // MSYS2 and versions of Cygwin released after 2009 or so use this API. ++#if defined(__MSYS__) ++ size_t newSize = 256 * MAX_PATH; ++ tmp = new char[newSize + 1]; ++ convert(tmp, newSize, path.c_str()); ++#else ++ // Versions of Cygwin released after 2009 or so use this API. + // The original MSYS still lacks this API. + ssize_t newSize = cygwin_conv_path(CCP_POSIX_TO_WIN_A | CCP_RELATIVE, + path.c_str(), NULL, 0); +@@ -163,6 +169,7 @@ + ssize_t success = cygwin_conv_path(CCP_POSIX_TO_WIN_A | CCP_RELATIVE, + path.c_str(), tmp, newSize + 1); + assert(success == 0); ++#endif + #else + // In the current Cygwin header file, this API is documented as deprecated + // because it's restricted to paths of MAX_PATH length. In the CVS version +@@ -173,10 +180,6 @@ + tmp = new char[MAX_PATH + path.size()]; + cygwin_conv_to_win32_path(path.c_str(), tmp); + #endif +- for (int i = 0; tmp[i] != '\0'; ++i) { +- if (tmp[i] == '/') +- tmp[i] = '\\'; +- } + std::string ret(tmp); + delete [] tmp; + return ret; +diff -aurN 0001/src/unix-adapter/path_conv.cc 0002/src/unix-adapter/path_conv.cc +--- 0001/src/unix-adapter/path_conv.cc ++++ 0002/src/unix-adapter/path_conv.cc +@@ -633,7 +633,6 @@ + one_path[to-from] = '\0'; + char win32_path1[PATH_MAX + 1]; + ssize_t result = cygwin_conv_path(CCP_POSIX_TO_WIN_A|CCP_ABSOLUTE, one_path, win32_path1, PATH_MAX+1); +- printf("called cygwin_conv_path(CCP_POSIX_TO_WIN_A,%s -> %s, in-size %d, result = %zd\n", one_path, win32_path1, PATH_MAX+1, result); + if( result !=0 ) { + copy_to_dst(one_path, NULL, dst, dstend); + } else { +diff -aurN 0001/src/unix-adapter/subdir.mk 0002/src/unix-adapter/subdir.mk +--- 0001/src/unix-adapter/subdir.mk ++++ 0002/src/unix-adapter/subdir.mk +@@ -26,6 +26,7 @@ + build/unix/unix-adapter/Util.o \ + build/unix/unix-adapter/WakeupFd.o \ + build/unix/unix-adapter/main.o \ ++ build/unix/unix-adapter/path_conv.o \ + build/unix/shared/DebugClient.o \ + build/unix/shared/WinptyVersion.o + diff --git a/winpty/PKGBUILD b/winpty/PKGBUILD index 6d87f4b508d..299a868ae97 100644 --- a/winpty/PKGBUILD +++ b/winpty/PKGBUILD @@ -1,28 +1,51 @@ # Maintainer: Martell Malone # Contributor: Alexey Pavlov # Contributor: David Macek +# Contributor: Renato Silva _realname=winpty pkgname="${_realname}" pkgver=0.2.2 -pkgrel=1 +pkgrel=2 pkgdesc="A Windows software package providing an interface similar to a Unix pty-master for communicating with Windows console programs" arch=('i686' 'x86_64') url="https://github.com/rprichard/winpty" license=('MIT') -makedepends=("git" "tar" "automake" "xz" - "mingw-w64-cross-gcc") + +# Explicitly reference the git version of the indirect dependency mingw-w64-cross-crt +# for avoiding problems with its default provider mingw-w64-cross-crt-clang-git +makedepends=(git tar automake xz + mingw-w64-cross-gcc + mingw-w64-cross-crt-git) + #depends=( "ncurses-devel" ) replaces=("winpty-git") options=('staticlibs' 'strip') + +# TODO: Replace path_conv with arg_heuristic from MSYS2 runtime +# See https://github.com/rprichard/winpty/issues/56 source=("${_realname}-${pkgver}.tar.gz::https://github.com/rprichard/${_realname}/archive/${pkgver}.tar.gz" - 0001-Apply-POSIX-to-Win-conversion-on-all-arguments-on-MSYS.patch) + path_conv.cc::'https://github.com/Alexpux/path_convert/raw/master/src/path_conv.cpp' + path_conv.h::'https://github.com/Alexpux/path_convert/raw/master/src/path_conv.h' + 0001-Apply-POSIX-to-Win-conversion-on-all-arguments-on-MSYS.patch + 0002-fix-path-conversion.patch) + sha256sums=('93be4dd7272e72c9000dabf70c3a97bf72224f2df2833e217d6ee7b77770e517' - 'c9705d86feba11f1155e4259d28131afb14db3c30c17efe96bdd655afa72ee04') + '7181d260592dc193f235965f202a5509b113d8b478efae3f06176b8625b683cc' + 'c84e4edc5a1e387dc1ea06445db76a7bfe43e816f0c32558ce8d8562378d5782' + 'c9705d86feba11f1155e4259d28131afb14db3c30c17efe96bdd655afa72ee04' + '451c61a2fc15411c72359f3c5a4b2b6e524091b3ac910103dfa5df48f8ee8782') + +consolidate() { + cp ../path_conv.cc src/unix-adapter/path_conv.cc + cp ../path_conv.h src/unix-adapter/path_conv.h +} prepare() { cd "${srcdir}/${_realname}-${pkgver}" + consolidate patch -p1 -i ${srcdir}/0001-Apply-POSIX-to-Win-conversion-on-all-arguments-on-MSYS.patch + patch -p1 -i ${srcdir}/0002-fix-path-conversion.patch } build() { From 17aec0f602a802c08aa0e565219c8791c55a8073 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 15 May 2016 12:47:50 +0100 Subject: [PATCH 018/101] msys2-runtime: Ignore zero length exclusions Also use --committer-date-is-author-date to get sha1 consistency --- bash/PKGBUILD | 1 + ...ath.cc-Ignore-zero-length-exclusions.patch | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 msys2-runtime/0007-path.cc-Ignore-zero-length-exclusions.patch diff --git a/bash/PKGBUILD b/bash/PKGBUILD index 33a7be5f913..8c68f136e30 100644 --- a/bash/PKGBUILD +++ b/bash/PKGBUILD @@ -222,4 +222,5 @@ sha256sums=('afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4' 'SKIP' '4ec432966e4198524a7e0cd685fe222e96043769c9613e66742ac475db132c1a' 'SKIP' + 'b75a53141ab3d8fff3fa74b5f3dc76468b01eae299f50bbc2bc71ae395d690af' 'SKIP') diff --git a/msys2-runtime/0007-path.cc-Ignore-zero-length-exclusions.patch b/msys2-runtime/0007-path.cc-Ignore-zero-length-exclusions.patch new file mode 100644 index 00000000000..06aeea84c20 --- /dev/null +++ b/msys2-runtime/0007-path.cc-Ignore-zero-length-exclusions.patch @@ -0,0 +1,25 @@ +From 45b3b59cf3f3960267d31e8d446ed68fa13dd0a8 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Sun, 15 May 2016 09:31:51 +0100 +Subject: [PATCH 7/7] path.cc: Ignore zero-length exclusions + +--- + winsup/cygwin/path.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc +index 6f6f74d..fb41080 100644 +--- a/winsup/cygwin/path.cc ++++ b/winsup/cygwin/path.cc +@@ -3467,7 +3467,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, + { + /* Since we've got regex linked we should maybe switch to that, but + running regexes for every argument could be too slow. */ +- if ( strcmp (exclusions, "*") == 0 || strstr (arg, exclusions) == arg ) ++ if ( strcmp (exclusions, "*") == 0 || (strlen (exclusions) && strstr (arg, exclusions) == arg) ) + return (char*)arg; + exclusions += strlen (exclusions) + 1; + } +-- +2.8.1 + From 2e9655d8bea08a2ba4f59025614a38eb30d9b631 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 15 May 2016 13:30:13 +0100 Subject: [PATCH 019/101] msys2-runtime: Update PKGBUILD and patches --- ...cc-Untangle-allow_glob-from-winshell.patch | 4 +-- ...-Don-t-quote-literal-strings-differe.patch | 4 +-- ...0003-strace.cc-Don-t-set-MSYS-noglob.patch | 4 +-- .../0004-Add-debugging-for-build_argv.patch | 4 +-- ...bugging-for-strace-make_command_line.patch | 4 +-- ...acility-environment-variable-MSYS2_E.patch | 4 +-- msys2-runtime/PKGBUILD | 31 ++++++++++--------- 7 files changed, 29 insertions(+), 26 deletions(-) diff --git a/msys2-runtime/0001-dcrt0.cc-Untangle-allow_glob-from-winshell.patch b/msys2-runtime/0001-dcrt0.cc-Untangle-allow_glob-from-winshell.patch index 1575a288d72..272be93ac1b 100644 --- a/msys2-runtime/0001-dcrt0.cc-Untangle-allow_glob-from-winshell.patch +++ b/msys2-runtime/0001-dcrt0.cc-Untangle-allow_glob-from-winshell.patch @@ -1,7 +1,7 @@ -From 0be4b15f45fec83cc221d4c303e7e232f08e1a32 Mon Sep 17 00:00:00 2001 +From b6af22164cf18fe545b3b5d053f47f907dda2900 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 12:52:09 +0100 -Subject: [PATCH 1/6] dcrt0.cc: Untangle allow_glob from winshell +Subject: [PATCH 1/7] dcrt0.cc: Untangle allow_glob from winshell Otherwise if globbing is allowed and we get called from a Windows program, build_argv thinks we've been called from diff --git a/msys2-runtime/0002-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch b/msys2-runtime/0002-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch index ad6c09147d4..380f18b4c63 100644 --- a/msys2-runtime/0002-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch +++ b/msys2-runtime/0002-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch @@ -1,7 +1,7 @@ -From 33f2cba0a9fb80dc73b6fe90b02f54ee2752ee7c Mon Sep 17 00:00:00 2001 +From 56375c2d628499059f40a4ac6cd390818a3357d7 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 24 Aug 2015 00:48:06 +0100 -Subject: [PATCH 2/6] dcrt0.cc (globify): Don't quote literal strings +Subject: [PATCH 2/7] dcrt0.cc (globify): Don't quote literal strings differently when dos_spec Reverts 25ba8f306f3099caf8397859019e936b90510e8d. I can't figure out what diff --git a/msys2-runtime/0003-strace.cc-Don-t-set-MSYS-noglob.patch b/msys2-runtime/0003-strace.cc-Don-t-set-MSYS-noglob.patch index 75ae23f0729..ffd7c2183c6 100644 --- a/msys2-runtime/0003-strace.cc-Don-t-set-MSYS-noglob.patch +++ b/msys2-runtime/0003-strace.cc-Don-t-set-MSYS-noglob.patch @@ -1,7 +1,7 @@ -From d123b5922d6f56441ef956be4dc763498a4d66bd Mon Sep 17 00:00:00 2001 +From 912b157fb4e93ff273878d0c7f51527458d187da Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 23 Aug 2015 20:47:30 +0100 -Subject: [PATCH 3/6] strace.cc: Don't set MSYS=noglob +Subject: [PATCH 3/7] strace.cc: Don't set MSYS=noglob Commit message for this code was: diff --git a/msys2-runtime/0004-Add-debugging-for-build_argv.patch b/msys2-runtime/0004-Add-debugging-for-build_argv.patch index 957067089d8..ad802678019 100644 --- a/msys2-runtime/0004-Add-debugging-for-build_argv.patch +++ b/msys2-runtime/0004-Add-debugging-for-build_argv.patch @@ -1,7 +1,7 @@ -From a37997662880110db86a766bd9f0a4afdb32c464 Mon Sep 17 00:00:00 2001 +From 9245b876168b436422b79c6cdea633cca73878ad Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 12:18:52 +0100 -Subject: [PATCH 4/6] Add debugging for build_argv +Subject: [PATCH 4/7] Add debugging for build_argv --- winsup/cygwin/dcrt0.cc | 2 ++ diff --git a/msys2-runtime/0005-Add-debugging-for-strace-make_command_line.patch b/msys2-runtime/0005-Add-debugging-for-strace-make_command_line.patch index 42ebc21dee8..f3dd76d6b00 100644 --- a/msys2-runtime/0005-Add-debugging-for-strace-make_command_line.patch +++ b/msys2-runtime/0005-Add-debugging-for-strace-make_command_line.patch @@ -1,7 +1,7 @@ -From 4fe35b8d33cc0b9c35dd94f77ff3e5f40e9aae10 Mon Sep 17 00:00:00 2001 +From c2c8d2e21e0b1d1beb8a5489325709013a44d748 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 09:52:47 +0100 -Subject: [PATCH 5/6] Add debugging for strace make_command_line +Subject: [PATCH 5/7] Add debugging for strace make_command_line --- winsup/utils/strace.cc | 1 + diff --git a/msys2-runtime/0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch b/msys2-runtime/0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch index e0733461b4f..c70ac177f34 100644 --- a/msys2-runtime/0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch +++ b/msys2-runtime/0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch @@ -1,7 +1,7 @@ -From 8145073456ea966d932c63e3334fab481bc66a8c Mon Sep 17 00:00:00 2001 +From e88b12c382dfeeeaed6628bb8af5f4a66f3eca07 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 10 Apr 2016 21:47:41 +0100 -Subject: [PATCH 6/6] environ.cc: New facility/environment variable +Subject: [PATCH 6/7] environ.cc: New facility/environment variable MSYS2_ENV_CONV_EXCL Works very much like MSYS2_ARG_CONV_EXCL. In fact it uses the same diff --git a/msys2-runtime/PKGBUILD b/msys2-runtime/PKGBUILD index c8fb5aab9d4..2340e435914 100644 --- a/msys2-runtime/PKGBUILD +++ b/msys2-runtime/PKGBUILD @@ -4,7 +4,7 @@ pkgbase=msys2-runtime pkgname=('msys2-runtime' 'msys2-runtime-devel') _base_ver=2.5.0 -pkgver=2.5.0.17080.455984c +pkgver=2.5.0.17081.826a610 pkgrel=1 pkgdesc="Cygwin POSIX emulation engine" arch=('i686' 'x86_64') @@ -30,14 +30,16 @@ source=('msys2-runtime'::'git+https://github.com/Alexpux/Cygwin.git#branch=msys2 '0003-strace.cc-Don-t-set-MSYS-noglob.patch' '0004-Add-debugging-for-build_argv.patch' '0005-Add-debugging-for-strace-make_command_line.patch' - '0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch') + '0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch' + '0007-path.cc-Ignore-zero-length-exclusions.patch') sha256sums=('SKIP' - 'c251eb8d21ed8e58e10694054c93386d274457f9b7d4b23d38cdd220f2f6c6f1' - '912e4ce0093d7c7f0004f15268c580023099586e592d761b0f5a0dcb21cb738a' - '4a863a45930318f4652ddc0fc912acdaa63c3a6385ed94020e8b20f4cf60f50f' - '62f9c63bde5f5212f99827c6e4d9392d98a82b3654cd7328590b575f799fa72b' - '8d5b30d417deacadd2130fc4a9ed172e3e04b111d2159bef4b42f32073e0cc27' - '500757c316e51e5d71c9e4aef959ed222c9225bf59b9eb4a606ca2b73aa3df5b') + 'afd8454662eb6ea9baa816fc594c3af33f4204d364d148c243c45e556e08613e' + 'dc03861d4614c228afb000e081b46569ce7a4fe7b4082f690b00847e8063da2b' + 'b8da17a374e9fe21f2051582744fb71cdbc7eea009abeeef055ab1ed4d854c83' + '0bdf0308ddef05a3abdc3a091760f2b8e1055cc1232fd95135beb5ac6063985e' + '51894036cd0ad1f8deab4761e9876fb92e8b2ce49bceaf3bc4155c7acf2e003f' + 'acd5641aad787dbf9ac31be9d3d7d4ab32cb7b10bb071161abbe6d98df169d36' + 'ddbfcdf68e44404d161fb0cc947abf672c974ef67274f649a26de50fd798c111') pkgver() { cd "${srcdir}"/msys2-runtime @@ -48,12 +50,13 @@ pkgver() { prepare() { cd "${srcdir}"/msys2-runtime - git am "${srcdir}"/0001-dcrt0.cc-Untangle-allow_glob-from-winshell.patch - git am "${srcdir}"/0002-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch - git am "${srcdir}"/0003-strace.cc-Don-t-set-MSYS-noglob.patch - git am "${srcdir}"/0004-Add-debugging-for-build_argv.patch - git am "${srcdir}"/0005-Add-debugging-for-strace-make_command_line.patch - git am "${srcdir}"/0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch + git am --committer-date-is-author-date "${srcdir}"/0001-dcrt0.cc-Untangle-allow_glob-from-winshell.patch + git am --committer-date-is-author-date "${srcdir}"/0002-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch + git am --committer-date-is-author-date "${srcdir}"/0003-strace.cc-Don-t-set-MSYS-noglob.patch + git am --committer-date-is-author-date "${srcdir}"/0004-Add-debugging-for-build_argv.patch + git am --committer-date-is-author-date "${srcdir}"/0005-Add-debugging-for-strace-make_command_line.patch + git am --committer-date-is-author-date "${srcdir}"/0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch + git am --committer-date-is-author-date "${srcdir}"/0007-path.cc-Ignore-zero-length-exclusions.patch } build() { From a87ff6cc43853c9f8d435d916c895b2357295b9a Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Mon, 16 May 2016 10:42:41 +0300 Subject: [PATCH 020/101] msys2-runtime: Switch to use released Cygwin sources --- msys2-runtime/0001-Add-MSYS-triplets.patch | 2820 +++++++++++++++++ .../0002-Rename-DLL-from-cygwin-to-msys.patch | 1539 +++++++++ ...y-for-converting-UNIX-paths-in-argum.patch | 1068 +++++++ ...y-for-changing-OS-name-via-MSYSTEM-e.patch | 169 + ....-Change-sorting-mount-points.-Do-no.patch | 419 +++ ...gwin-symlinks.-Instead-use-deep-copy.patch | 178 ++ ...lly-rewrite-TERM-msys-to-TERM-cygwin.patch | 40 + ...o-not-convert-environment-for-strace.patch | 34 + ...re-careful-to-stay-within-the-buffer.patch | 39 + ...fely-whether-we-could-allocate-the-b.patch | 33 + ...convert-use-the-elegant-realloc-call.patch | 29 + ...2-convert-plug-potential-memory-leak.patch | 31 + ...-convert-warn-when-we-cut-off-a-path.patch | 46 + ...-better-prepared-to-handle-path-list.patch | 44 + ...rgument-looks-like-DVAR-str1-c-path1.patch | 27 + ...-converting-root-directory-to-have-t.patch | 57 + ...c-Untangle-allow_glob-from-winshell.patch} | 0 ...Don-t-quote-literal-strings-differe.patch} | 0 ...022-strace.cc-Don-t-set-MSYS-noglob.patch} | 0 ...> 0023-Add-debugging-for-build_argv.patch} | 0 ...ugging-for-strace-make_command_line.patch} | 0 ...cility-environment-variable-MSYS2_E.patch} | 0 ...th.cc-Ignore-zero-length-exclusions.patch} | 0 msys2-runtime/PKGBUILD | 92 +- 24 files changed, 6638 insertions(+), 27 deletions(-) create mode 100644 msys2-runtime/0001-Add-MSYS-triplets.patch create mode 100644 msys2-runtime/0002-Rename-DLL-from-cygwin-to-msys.patch create mode 100644 msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch create mode 100644 msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch create mode 100644 msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-Do-no.patch create mode 100644 msys2-runtime/0006-Do-not-create-cygwin-symlinks.-Instead-use-deep-copy.patch create mode 100644 msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch create mode 100644 msys2-runtime/0008-Do-not-convert-environment-for-strace.patch create mode 100644 msys2-runtime/0009-convert-be-more-careful-to-stay-within-the-buffer.patch create mode 100644 msys2-runtime/0010-convert-check-safely-whether-we-could-allocate-the-b.patch create mode 100644 msys2-runtime/0011-convert-use-the-elegant-realloc-call.patch create mode 100644 msys2-runtime/0012-convert-plug-potential-memory-leak.patch create mode 100644 msys2-runtime/0013-convert-warn-when-we-cut-off-a-path.patch create mode 100644 msys2-runtime/0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch create mode 100644 msys2-runtime/0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch create mode 100644 msys2-runtime/0016-Special-case-for-converting-root-directory-to-have-t.patch rename msys2-runtime/{0001-dcrt0.cc-Untangle-allow_glob-from-winshell.patch => 0020-dcrt0.cc-Untangle-allow_glob-from-winshell.patch} (100%) rename msys2-runtime/{0002-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch => 0021-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch} (100%) rename msys2-runtime/{0003-strace.cc-Don-t-set-MSYS-noglob.patch => 0022-strace.cc-Don-t-set-MSYS-noglob.patch} (100%) rename msys2-runtime/{0004-Add-debugging-for-build_argv.patch => 0023-Add-debugging-for-build_argv.patch} (100%) rename msys2-runtime/{0005-Add-debugging-for-strace-make_command_line.patch => 0024-Add-debugging-for-strace-make_command_line.patch} (100%) rename msys2-runtime/{0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch => 0025-environ.cc-New-facility-environment-variable-MSYS2_E.patch} (100%) rename msys2-runtime/{0007-path.cc-Ignore-zero-length-exclusions.patch => 0026-path.cc-Ignore-zero-length-exclusions.patch} (100%) diff --git a/msys2-runtime/0001-Add-MSYS-triplets.patch b/msys2-runtime/0001-Add-MSYS-triplets.patch new file mode 100644 index 00000000000..4834280800c --- /dev/null +++ b/msys2-runtime/0001-Add-MSYS-triplets.patch @@ -0,0 +1,2820 @@ +From 4f0df615d3a0bc3d44e226628d0a64d67ace6f5e Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Tue, 1 Mar 2016 08:51:16 +0300 +Subject: [PATCH 01/16] Add MSYS triplets. + +--- + compile | 4 +- + config.guess | 3 ++ + config.rpath | 8 ++-- + config/dfp.m4 | 3 +- + config/elf.m4 | 2 +- + config/lthostflags.m4 | 2 +- + config/mmap.m4 | 4 +- + config/picflag.m4 | 2 + + config/tcl.m4 | 4 +- + configure | 22 ++++----- + configure.ac | 20 ++++----- + libtool.m4 | 36 ++++++++------- + ltmain.sh | 52 +++++++++++----------- + ltoptions.m4 | 2 +- + newlib/configure | 30 ++++++++----- + newlib/configure.host | 8 ++-- + newlib/iconvdata/configure | 30 ++++++++----- + newlib/libc/configure | 30 ++++++++----- + newlib/libc/machine/configure | 30 ++++++++----- + newlib/libc/machine/i386/configure | 30 ++++++++----- + newlib/libc/sys/configure | 30 ++++++++----- + newlib/libc/sys/linux/configure | 30 ++++++++----- + newlib/libc/sys/linux/linuxthreads/configure | 30 ++++++++----- + .../libc/sys/linux/linuxthreads/machine/configure | 30 ++++++++----- + .../sys/linux/linuxthreads/machine/i386/configure | 30 ++++++++----- + newlib/libc/sys/linux/machine/configure | 30 ++++++++----- + newlib/libc/sys/linux/machine/i386/configure | 30 ++++++++----- + newlib/libm/configure | 30 ++++++++----- + newlib/libm/machine/configure | 30 ++++++++----- + newlib/libm/machine/i386/configure | 30 ++++++++----- + winsup/config.guess | 3 ++ + winsup/configure | 4 +- + winsup/configure.ac | 2 +- + winsup/cygserver/configure | 2 +- + winsup/cygserver/configure.ac | 2 +- + winsup/cygwin/configure | 2 +- + winsup/cygwin/configure.ac | 2 +- + 37 files changed, 372 insertions(+), 267 deletions(-) + +diff --git a/compile b/compile +index a85b723..a4ecdb2 100755 +--- a/compile ++++ b/compile +@@ -53,7 +53,7 @@ func_file_conv () + MINGW*) + file_conv=mingw + ;; +- CYGWIN*) ++ CYGWIN*|MSYS*) + file_conv=cygwin + ;; + *) +@@ -67,7 +67,7 @@ func_file_conv () + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; +- cygwin/*) ++ cygwin/*|msys/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) +diff --git a/config.guess b/config.guess +index dcd5149..61f2922 100755 +--- a/config.guess ++++ b/config.guess +@@ -884,6 +884,9 @@ EOF + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; ++ amd64:MSYS*:*:* | x86_64:MSYS*:*:*) ++ echo x86_64-unknown-msys ++ exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; +diff --git a/config.rpath b/config.rpath +index 4dea759..4f12c27 100755 +--- a/config.rpath ++++ b/config.rpath +@@ -109,7 +109,7 @@ hardcode_direct=no + hardcode_minus_L=no + + case "$host_os" in +- cygwin* | mingw* | pw32*) ++ cygwin* | msys* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -149,7 +149,7 @@ if test "$with_gnu_ld" = yes; then + ld_shlibs=no + fi + ;; +- cygwin* | mingw* | pw32*) ++ cygwin* | msys* | mingw* | pw32*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -268,7 +268,7 @@ else + ;; + bsdi4*) + ;; +- cygwin* | mingw* | pw32*) ++ cygwin* | msys* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -437,7 +437,7 @@ case "$host_os" in + ;; + bsdi4*) + ;; +- cygwin* | mingw* | pw32*) ++ cygwin* | msys* | mingw* | pw32*) + shrext=.dll + ;; + darwin* | rhapsody*) +diff --git a/config/dfp.m4 b/config/dfp.m4 +index 5b29089..b03bcf0 100644 +--- a/config/dfp.m4 ++++ b/config/dfp.m4 +@@ -23,7 +23,8 @@ Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;; + powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \ + i?86*-*-elfiamcu | i?86*-*-gnu* | \ + i?86*-*-mingw* | x86_64*-*-mingw* | \ +- i?86*-*-cygwin* | x86_64*-*-cygwin*) ++ i?86*-*-cygwin* | x86_64*-*-cygwin* | \ ++ i?86*-*-msys* | x86_64*-*-msys*) + enable_decimal_float=yes + ;; + *) +diff --git a/config/elf.m4 b/config/elf.m4 +index 1772a44..2908ffa 100644 +--- a/config/elf.m4 ++++ b/config/elf.m4 +@@ -15,7 +15,7 @@ AC_REQUIRE([AC_CANONICAL_TARGET]) + + target_elf=no + case $target in +- *-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \ ++ *-darwin* | *-aix* | *-cygwin* | *-msys* | *-mingw* | *-aout* | *-*coff* | \ + *-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \ + alpha*-dec-osf* | *-interix* | hppa[[12]]*-*-hpux* | \ + nvptx-*-none) +diff --git a/config/lthostflags.m4 b/config/lthostflags.m4 +index bc0f59e..ad977d4 100644 +--- a/config/lthostflags.m4 ++++ b/config/lthostflags.m4 +@@ -13,7 +13,7 @@ AC_DEFUN([ACX_LT_HOST_FLAGS], [ + AC_REQUIRE([AC_CANONICAL_SYSTEM]) + + case $host in +- *-cygwin* | *-mingw*) ++ *-cygwin* | *-msys* | *-mingw*) + # 'host' will be top-level target in the case of a target lib, + # we must compare to with_cross_host to decide if this is a native + # or cross-compiler and select where to install dlls appropriately. +diff --git a/config/mmap.m4 b/config/mmap.m4 +index fba0d9d..df2c778 100644 +--- a/config/mmap.m4 ++++ b/config/mmap.m4 +@@ -42,7 +42,7 @@ else + # Systems known to be in this category are Windows (all variants), + # VMS, and Darwin. + case "$host_os" in +- *vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) ++ *vms* | cygwin* | msys* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) + gcc_cv_func_mmap_dev_zero=no ;; + *) + gcc_cv_func_mmap_dev_zero=yes;; +@@ -74,7 +74,7 @@ else + # above for use of /dev/zero. + # Systems known to be in this category are Windows, VMS, and SCO Unix. + case "$host_os" in +- *vms* | cygwin* | pe | mingw* | sco* | udk* ) ++ *vms* | cygwin* | msys* | pe | mingw* | sco* | udk* ) + gcc_cv_func_mmap_anon=no ;; + *) + gcc_cv_func_mmap_anon=yes;; +diff --git a/config/picflag.m4 b/config/picflag.m4 +index 2f5b972..997021a 100644 +--- a/config/picflag.m4 ++++ b/config/picflag.m4 +@@ -25,6 +25,8 @@ case "${$2}" in + ;; + i[[34567]]86-*-cygwin* | x86_64-*-cygwin*) + ;; ++ i[[34567]]86-*-msys* | x86_64-*-msys*) ++ ;; + i[[34567]]86-*-mingw* | x86_64-*-mingw*) + ;; + i[[34567]]86-*-interix[[3-9]]*) +diff --git a/config/tcl.m4 b/config/tcl.m4 +index 4542a4b..209bd8d 100644 +--- a/config/tcl.m4 ++++ b/config/tcl.m4 +@@ -33,7 +33,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ + + # First check to see if --with-tcl was specified. + case "${host}" in +- *-*-cygwin*) platDir="win" ;; ++ *-*-cygwin* | *-*-msys*) platDir="win" ;; + *) platDir="unix" ;; + esac + if test x"${with_tclconfig}" != x ; then +@@ -165,7 +165,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ + + # then check for a private Tk library + case "${host}" in +- *-*-cygwin*) platDir="win" ;; ++ *-*-cygwin* | *-*-msys*) platDir="win" ;; + *) platDir="unix" ;; + esac + if test x"${ac_cv_c_tkconfig}" = x ; then +diff --git a/configure b/configure +index 35f231e..b38b744 100755 +--- a/configure ++++ b/configure +@@ -3036,7 +3036,7 @@ fi + # Configure extra directories which are host specific + + case "${host}" in +- *-cygwin*) ++ *-cygwin* | *-msys*) + configdirs="$configdirs libtermcap" ;; + esac + +@@ -3556,7 +3556,7 @@ esac + # Disable the go frontend on systems where it is known to not work. Please keep + # this in sync with contrib/config-list.mk. + case "${target}" in +-*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*) ++*-*-darwin* | *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-aix*) + unsupported_languages="$unsupported_languages go" + ;; + esac +@@ -3569,7 +3569,7 @@ if test x$enable_libgo = x; then + # PR 46986 + noconfigdirs="$noconfigdirs target-libgo" + ;; +- *-*-cygwin* | *-*-mingw*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw*) + noconfigdirs="$noconfigdirs target-libgo" + ;; + *-*-aix*) +@@ -3843,7 +3843,7 @@ case "${target}" in + i[3456789]86-*-mingw*) + target_configdirs="$target_configdirs target-winsup" + ;; +- *-*-cygwin*) ++ *-*-cygwin* | *-*-msys*) + target_configdirs="$target_configdirs target-libtermcap target-winsup" + noconfigdirs="$noconfigdirs target-libgloss" + # always build newlib if winsup directory is present. +@@ -3987,7 +3987,7 @@ case "${host}" in + i[3456789]86-*-msdosdjgpp*) + host_makefile_frag="config/mh-djgpp" + ;; +- *-cygwin*) ++ *-cygwin* | *-msys*) + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if cat works as expected" >&5 + $as_echo_n "checking to see if cat works as expected... " >&6; } +@@ -6138,7 +6138,7 @@ fi + + target_elf=no + case $target in +- *-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \ ++ *-darwin* | *-aix* | *-cygwin* | *-msys* | *-mingw* | *-aout* | *-*coff* | \ + *-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \ + alpha*-dec-osf* | *-interix* | hppa[12]*-*-hpux* | \ + nvptx-*-none) +@@ -6156,7 +6156,7 @@ if test $target_elf = yes; then : + else + if test x"$default_enable_lto" = x"yes" ; then + case $target in +- *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;; ++ *-apple-darwin9* | *-cygwin* | *-msys* | *-mingw* | *djgpp*) ;; + # On other non-ELF platforms, LTO has yet to be validated. + *) enable_lto=no ;; + esac +@@ -6167,7 +6167,7 @@ else + # warn during gcc/ subconfigure; unless you're bootstrapping with + # -flto it won't be needed until after installation anyway. + case $target in +- *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;; ++ *-cygwin* | *-msys* | *-mingw* | *-apple-darwin* | *djgpp*) ;; + *) if test x"$enable_lto" = x"yes"; then + as_fn_error "LTO support is not enabled for this target." "$LINENO" 5 + fi +@@ -6177,7 +6177,7 @@ else + # Among non-ELF, only Windows platforms support the lto-plugin so far. + # Build it unless LTO was explicitly disabled. + case $target in +- *-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;; ++ *-cygwin* | *-msys* | *-mingw*) build_lto_plugin=$enable_lto ;; + *) ;; + esac + +@@ -7048,7 +7048,7 @@ rm -f conftest* + case "${host}" in + *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; + *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; +- *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;; ++ *-*-mingw* | *-*-cygwin | *-msys ) RPATH_ENVVAR=PATH ;; + *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; + esac + +@@ -7556,7 +7556,7 @@ case " $target_configdirs " in + case " $target_configargs " in + *" --with-newlib "*) + case "$target" in +- *-cygwin*) ++ *-cygwin* | *-msys*) + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -isystem $$s/winsup/cygwin/include' + ;; + esac +diff --git a/configure.ac b/configure.ac +index 74bf58a..85ab23d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -409,7 +409,7 @@ AC_ARG_ENABLE(compressed_debug_sections, + # Configure extra directories which are host specific + + case "${host}" in +- *-cygwin*) ++ *-cygwin* | *-msys*) + configdirs="$configdirs libtermcap" ;; + esac + +@@ -892,7 +892,7 @@ esac + # Disable the go frontend on systems where it is known to not work. Please keep + # this in sync with contrib/config-list.mk. + case "${target}" in +-*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*) ++*-*-darwin* | *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-aix*) + unsupported_languages="$unsupported_languages go" + ;; + esac +@@ -905,7 +905,7 @@ if test x$enable_libgo = x; then + # PR 46986 + noconfigdirs="$noconfigdirs target-libgo" + ;; +- *-*-cygwin* | *-*-mingw*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw*) + noconfigdirs="$noconfigdirs target-libgo" + ;; + *-*-aix*) +@@ -1179,7 +1179,7 @@ case "${target}" in + i[[3456789]]86-*-mingw*) + target_configdirs="$target_configdirs target-winsup" + ;; +- *-*-cygwin*) ++ *-*-cygwin* | *-*-msys*) + target_configdirs="$target_configdirs target-libtermcap target-winsup" + noconfigdirs="$noconfigdirs target-libgloss" + # always build newlib if winsup directory is present. +@@ -1323,7 +1323,7 @@ case "${host}" in + i[[3456789]]86-*-msdosdjgpp*) + host_makefile_frag="config/mh-djgpp" + ;; +- *-cygwin*) ++ *-cygwin* | *-msys*) + ACX_CHECK_CYGWIN_CAT_WORKS + host_makefile_frag="config/mh-cygwin" + ;; +@@ -1817,7 +1817,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. + build_lto_plugin=yes + ],[if test x"$default_enable_lto" = x"yes" ; then + case $target in +- *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;; ++ *-apple-darwin9* | *-cygwin* | *-msys* | *-mingw* | *djgpp*) ;; + # On other non-ELF platforms, LTO has yet to be validated. + *) enable_lto=no ;; + esac +@@ -1828,7 +1828,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. + # warn during gcc/ subconfigure; unless you're bootstrapping with + # -flto it won't be needed until after installation anyway. + case $target in +- *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;; ++ *-cygwin* | *-msys*| *-mingw* | *-apple-darwin* | *djgpp*) ;; + *) if test x"$enable_lto" = x"yes"; then + AC_MSG_ERROR([LTO support is not enabled for this target.]) + fi +@@ -1838,7 +1838,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. + # Among non-ELF, only Windows platforms support the lto-plugin so far. + # Build it unless LTO was explicitly disabled. + case $target in +- *-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;; ++ *-cygwin* | *-msys* | *-mingw*) build_lto_plugin=$enable_lto ;; + *) ;; + esac + ]) +@@ -2652,7 +2652,7 @@ rm -f conftest* + case "${host}" in + *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; + *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; +- *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;; ++ *-*-mingw* | *-*-cygwin | *-*-msys ) RPATH_ENVVAR=PATH ;; + *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; + esac + +@@ -3155,7 +3155,7 @@ case " $target_configdirs " in + case " $target_configargs " in + *" --with-newlib "*) + case "$target" in +- *-cygwin*) ++ *-cygwin* | *-msys*) + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -isystem $$s/winsup/cygwin/include' + ;; + esac +diff --git a/libtool.m4 b/libtool.m4 +index 24d13f3..9a37fd7 100644 +--- a/libtool.m4 ++++ b/libtool.m4 +@@ -1491,7 +1491,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -1733,7 +1733,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +@@ -2204,14 +2204,14 @@ bsdi[[45]]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -2235,6 +2235,12 @@ cygwin* | mingw* | pw32* | cegcc*) + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ++m4_if([$1], [],[ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' +@@ -3001,7 +3007,7 @@ bsdi[[45]]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -3285,7 +3291,7 @@ AC_DEFUN([LT_LIB_M], + [AC_REQUIRE([AC_CANONICAL_HOST])dnl + LIBM= + case $host in +-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) ++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-msys* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; + *-ncr-sysv4.3*) +@@ -3360,7 +3366,7 @@ case $host_os in + aix*) + symcode='[[BCDT]]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; + hpux*) +@@ -3607,7 +3613,7 @@ m4_if([$1], [CXX], [ + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; +- mingw* | cygwin* | os2* | pw32* | cegcc*) ++ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -3920,7 +3926,7 @@ m4_if([$1], [CXX], [ + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -4003,7 +4009,7 @@ m4_if([$1], [CXX], [ + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], +@@ -4236,7 +4242,7 @@ m4_if([$1], [CXX], [ + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) +@@ -4288,7 +4294,7 @@ dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -4403,7 +4409,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +@@ -4776,7 +4782,7 @@ _LT_EOF + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -5720,7 +5726,7 @@ if test "$_lt_caught_CXX_error" != yes; then + esac + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' +diff --git a/ltmain.sh b/ltmain.sh +index 9503ec8..307a339 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -976,7 +976,7 @@ func_enable_tag () + + + case $host in +- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* ) ++ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* ) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; +@@ -1453,7 +1453,7 @@ func_mode_compile () + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in +- cygwin* | mingw* | pw32* | os2* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac +@@ -2279,7 +2279,7 @@ func_mode_install () + 'exit $?' + tstripme="$stripme" + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" +@@ -2385,7 +2385,7 @@ func_mode_install () + + # Do a test to see if this is really a libtool program. + case $host in +- *cygwin* | *mingw*) ++ *cygwin* | *msys* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result +@@ -2460,7 +2460,7 @@ func_mode_install () + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in +- */usr/bin/install*,*cygwin*) ++ */usr/bin/install*,*cygwin*|*/usr/bin/install*,*msys*) + case $file:$destfile in + *.exe:*.exe) + # this is ok +@@ -2595,7 +2595,7 @@ extern \"C\" { + $RM $export_symbols + ${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols" + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *msys* | *mingw* | *cegcc* ) + echo EXPORTS > "$output_objdir/$outputname.def" + cat "$export_symbols" >> "$output_objdir/$outputname.def" + ;; +@@ -2607,7 +2607,7 @@ extern \"C\" { + $GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *msys* | *mingw* | *cegcc* ) + echo EXPORTS > "$output_objdir/$outputname.def" + cat "$nlist" >> "$output_objdir/$outputname.def" + ;; +@@ -2663,7 +2663,7 @@ typedef struct { + } lt_dlsymlist; + " + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *msys* | *mingw* | *cegcc* ) + echo >> "$output_objdir/$my_dlsyms" "\ + /* DATA imports from DLLs on WIN32 con't be const, because + runtime relocations are performed -- see ld's documentation +@@ -2749,7 +2749,7 @@ static const void *lt_preloaded_setup() { + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in +- *cygwin* | *mingw* | *cegcc* ) ++ *cygwin* | *msys* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` +@@ -3192,7 +3192,7 @@ func_to_host_path () + func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` + ;; +- *cygwin* ) ++ *cygwin* | *msys* ) + func_to_host_path_result=`cygpath -w "$1" | + $SED -e "$lt_sed_naive_backslashify"` + ;; +@@ -3265,7 +3265,7 @@ func_to_host_pathlist () + ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` + ;; +- *cygwin* ) ++ *cygwin* | *msys* ) + func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | + $SED -e "$lt_sed_naive_backslashify"` + ;; +@@ -3571,7 +3571,7 @@ main (int argc, char *argv[]) + { + EOF + case "$host" in +- *mingw* | *cygwin* ) ++ *mingw* | *cygwin* | *msys* ) + # make stdout use "unix" line endings + echo " setmode(1,_O_BINARY);" + ;; +@@ -4233,7 +4233,7 @@ func_mode_link () + { + $opt_debug + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra +@@ -4713,7 +4713,7 @@ func_mode_link () + ;; + esac + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; +@@ -4733,7 +4733,7 @@ func_mode_link () + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; +@@ -4813,7 +4813,7 @@ func_mode_link () + + -no-install) + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" +@@ -5772,7 +5772,7 @@ func_mode_link () + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in +- *cygwin* | *mingw* | *cegcc*) ++ *cygwin* | *msys* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no +@@ -5842,7 +5842,7 @@ func_mode_link () + elif test -n "$soname_spec"; then + # bleh windows + case $host in +- *cygwin* | mingw* | *cegcc*) ++ *cygwin* | msys* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" +@@ -6693,7 +6693,7 @@ func_mode_link () + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) +@@ -7194,7 +7194,7 @@ EOF + + orig_export_symbols= + case $host_os in +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then +@@ -7710,7 +7710,7 @@ EOF + + prog) + case $host in +- *cygwin*) func_stripname '' '.exe' "$output" ++ *cygwin* | *msys*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ +@@ -7823,7 +7823,7 @@ EOF + esac + fi + case $host in +- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) ++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; +@@ -7901,7 +7901,7 @@ EOF + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; +- *cygwin* | *mingw* ) ++ *cygwin* | *msys* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi +@@ -8029,14 +8029,14 @@ EOF + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in +- *cygwin*) ++ *cygwin* | *msys*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in +- *cygwin* | *mingw* ) ++ *cygwin* | *msys* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result +@@ -8343,7 +8343,7 @@ EOF + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in +- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) ++ *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then +diff --git a/ltoptions.m4 b/ltoptions.m4 +index 5ef12ce..5e7bc34 100644 +--- a/ltoptions.m4 ++++ b/ltoptions.m4 +@@ -126,7 +126,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll], + [enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) +diff --git a/newlib/configure b/newlib/configure +index 30e1d57..8441733 100755 +--- a/newlib/configure ++++ b/newlib/configure +@@ -4225,7 +4225,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -6051,7 +6051,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6390,7 +6390,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6970,7 +6970,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8851,7 +8851,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8933,7 +8933,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9395,7 +9395,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9510,7 +9510,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9941,7 +9941,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10842,14 +10842,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10873,6 +10873,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # MSYS DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11509,7 +11515,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/configure.host b/newlib/configure.host +index d471200..7e71115 100644 +--- a/newlib/configure.host ++++ b/newlib/configure.host +@@ -160,7 +160,7 @@ case "${host_cpu}" in + i[34567]86) + # Don't use for these since they provide their own setjmp. + case ${host} in +- *-*-sco* | *-*-cygwin*) ++ *-*-sco* | *-*-cygwin* | *-*-msys*) + libm_machine_dir=i386 + machine_dir=i386 + ;; +@@ -342,7 +342,7 @@ fi + + if [ "x${newlib_mb}" = "x" ]; then + case "${host}" in +- i[34567]86-pc-linux-*|*-*-cygwin*) ++ i[34567]86-pc-linux-*|*-*-cygwin*|*-*-msys*) + newlib_mb=yes + ;; + esac +@@ -376,7 +376,7 @@ esac + # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY. + + case "${host}" in +- *-*-cygwin*) ++ *-*-cygwin* | *-*-msys*) + posix_dir=posix + stdio64_dir=stdio64 + xdr_dir=xdr +@@ -572,7 +572,7 @@ esac + # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY. + + case "${host}" in +- *-*-cygwin*) ++ *-*-cygwin* | *-*-msys*) + test -z "$cygwin_srcdir" && cygwin_srcdir=`cd ${srcdir}/../winsup/cygwin; pwd` + export cygwin_srcdir + default_newlib_io_c99_formats="yes" +diff --git a/newlib/iconvdata/configure b/newlib/iconvdata/configure +index 673b67f..838150a 100755 +--- a/newlib/iconvdata/configure ++++ b/newlib/iconvdata/configure +@@ -3874,7 +3874,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5700,7 +5700,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6039,7 +6039,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6619,7 +6619,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8500,7 +8500,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8582,7 +8582,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9044,7 +9044,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9159,7 +9159,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9590,7 +9590,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10491,14 +10491,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10522,6 +10522,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11158,7 +11164,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libc/configure b/newlib/libc/configure +index 5dccc85..dce5602 100755 +--- a/newlib/libc/configure ++++ b/newlib/libc/configure +@@ -3974,7 +3974,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5800,7 +5800,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6139,7 +6139,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6719,7 +6719,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8600,7 +8600,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | msys* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8682,7 +8682,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | msys* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9144,7 +9144,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9259,7 +9259,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9690,7 +9690,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10591,14 +10591,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10622,6 +10622,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11258,7 +11264,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libc/machine/configure b/newlib/libc/machine/configure +index 769546a..015f252 100755 +--- a/newlib/libc/machine/configure ++++ b/newlib/libc/machine/configure +@@ -3931,7 +3931,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5757,7 +5757,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6096,7 +6096,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6676,7 +6676,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8557,7 +8557,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8639,7 +8639,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9101,7 +9101,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9216,7 +9216,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9647,7 +9647,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10548,14 +10548,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10579,6 +10579,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11215,7 +11221,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libc/machine/i386/configure b/newlib/libc/machine/i386/configure +index c1f4c61..b4835e0 100755 +--- a/newlib/libc/machine/i386/configure ++++ b/newlib/libc/machine/i386/configure +@@ -3876,7 +3876,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5702,7 +5702,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6041,7 +6041,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6621,7 +6621,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8502,7 +8502,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8584,7 +8584,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9046,7 +9046,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9161,7 +9161,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9592,7 +9592,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10493,14 +10493,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10524,6 +10524,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11160,7 +11166,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libc/sys/configure b/newlib/libc/sys/configure +index 55c6e13..31e0fd9 100755 +--- a/newlib/libc/sys/configure ++++ b/newlib/libc/sys/configure +@@ -3905,7 +3905,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5731,7 +5731,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6070,7 +6070,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6650,7 +6650,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8531,7 +8531,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8613,7 +8613,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9075,7 +9075,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9190,7 +9190,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9621,7 +9621,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10522,14 +10522,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10553,6 +10553,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11189,7 +11195,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libc/sys/linux/configure b/newlib/libc/sys/linux/configure +index 86b6ab4..853e4fa 100755 +--- a/newlib/libc/sys/linux/configure ++++ b/newlib/libc/sys/linux/configure +@@ -3922,7 +3922,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5748,7 +5748,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6087,7 +6087,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6667,7 +6667,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8548,7 +8548,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | msys* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8630,7 +8630,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | msys* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9092,7 +9092,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9207,7 +9207,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9638,7 +9638,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10539,14 +10539,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10570,6 +10570,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11206,7 +11212,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libc/sys/linux/linuxthreads/configure b/newlib/libc/sys/linux/linuxthreads/configure +index dbbba80..a7d59eb 100755 +--- a/newlib/libc/sys/linux/linuxthreads/configure ++++ b/newlib/libc/sys/linux/linuxthreads/configure +@@ -3920,7 +3920,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5746,7 +5746,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6085,7 +6085,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6665,7 +6665,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8546,7 +8546,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8628,7 +8628,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9090,7 +9090,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9205,7 +9205,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9636,7 +9636,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10537,14 +10537,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10568,6 +10568,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11204,7 +11210,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libc/sys/linux/linuxthreads/machine/configure b/newlib/libc/sys/linux/linuxthreads/machine/configure +index ed7b395..fd2b432 100755 +--- a/newlib/libc/sys/linux/linuxthreads/machine/configure ++++ b/newlib/libc/sys/linux/linuxthreads/machine/configure +@@ -3878,7 +3878,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5704,7 +5704,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6043,7 +6043,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6623,7 +6623,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8504,7 +8504,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8586,7 +8586,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9048,7 +9048,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9163,7 +9163,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9594,7 +9594,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10495,14 +10495,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10526,6 +10526,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11162,7 +11168,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure +index bb7b35d..f07ab4b 100755 +--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure ++++ b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure +@@ -3916,7 +3916,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5742,7 +5742,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6081,7 +6081,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6661,7 +6661,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8542,7 +8542,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8624,7 +8624,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9086,7 +9086,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9201,7 +9201,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9632,7 +9632,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10533,14 +10533,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10564,6 +10564,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11200,7 +11206,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libc/sys/linux/machine/configure b/newlib/libc/sys/linux/machine/configure +index 1493475..406f5ee 100755 +--- a/newlib/libc/sys/linux/machine/configure ++++ b/newlib/libc/sys/linux/machine/configure +@@ -3879,7 +3879,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5705,7 +5705,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6044,7 +6044,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6624,7 +6624,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8505,7 +8505,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8587,7 +8587,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9049,7 +9049,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9164,7 +9164,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9595,7 +9595,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10496,14 +10496,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10527,6 +10527,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11163,7 +11169,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libc/sys/linux/machine/i386/configure b/newlib/libc/sys/linux/machine/i386/configure +index c914af8..9b81a8f 100755 +--- a/newlib/libc/sys/linux/machine/i386/configure ++++ b/newlib/libc/sys/linux/machine/i386/configure +@@ -3916,7 +3916,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5742,7 +5742,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6081,7 +6081,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6661,7 +6661,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8542,7 +8542,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8624,7 +8624,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9086,7 +9086,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9201,7 +9201,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9632,7 +9632,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10533,14 +10533,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10564,6 +10564,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11200,7 +11206,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libm/configure b/newlib/libm/configure +index 6f5fa58..51fd439 100755 +--- a/newlib/libm/configure ++++ b/newlib/libm/configure +@@ -3938,7 +3938,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5764,7 +5764,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6103,7 +6103,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6683,7 +6683,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8564,7 +8564,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8646,7 +8646,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9108,7 +9108,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9223,7 +9223,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9654,7 +9654,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10555,14 +10555,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10586,6 +10586,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11222,7 +11228,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libm/machine/configure b/newlib/libm/machine/configure +index 215f41d..da5a97a 100755 +--- a/newlib/libm/machine/configure ++++ b/newlib/libm/machine/configure +@@ -3883,7 +3883,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5709,7 +5709,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6048,7 +6048,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6628,7 +6628,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8509,7 +8509,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8591,7 +8591,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9053,7 +9053,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9168,7 +9168,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9599,7 +9599,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10500,14 +10500,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10531,6 +10531,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11167,7 +11173,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/newlib/libm/machine/i386/configure b/newlib/libm/machine/i386/configure +index 2592664..333badf 100755 +--- a/newlib/libm/machine/i386/configure ++++ b/newlib/libm/machine/i386/configure +@@ -3874,7 +3874,7 @@ if test "${use_libtool}" = "yes"; then + enable_win32_dll=yes + + case $host in +-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) ++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. + set dummy ${ac_tool_prefix}as; ac_word=$2 +@@ -5700,7 +5700,7 @@ else + lt_cv_sys_max_cmd_len=-1; + ;; + +- cygwin* | mingw* | cegcc*) ++ cygwin* | msys* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, +@@ -6039,7 +6039,7 @@ bsdi[45]*) + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +-cygwin*) ++cygwin* | msys*) + # func_win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' +@@ -6619,7 +6619,7 @@ case $host_os in + aix*) + symcode='[BCDT]' + ;; +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + symcode='[ABCDGISTW]' + ;; + hpux*) +@@ -8500,7 +8500,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + # PIC is the default for these OSes. + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style +@@ -8582,7 +8582,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + fi + ;; + +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' +@@ -9044,7 +9044,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + extract_expsyms_cmds= + + case $host_os in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -9159,7 +9159,7 @@ _LT_EOF + fi + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -9590,7 +9590,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + export_dynamic_flag_spec=-rdynamic + ;; + +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -10491,14 +10491,14 @@ bsdi[45]*) + # libtool to hard-code these into programs + ;; + +-cygwin* | mingw* | pw32* | cegcc*) ++cygwin* | msys* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in +- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) ++ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ +@@ -10522,6 +10522,12 @@ cygwin* | mingw* | pw32* | cegcc*) + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" + ;; ++ msys*) ++ # Msys DLLs use 'msys-' prefix rather than 'lib' ++ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ++ ++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ++ ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' +@@ -11158,7 +11164,7 @@ else + lt_cv_dlopen_libs= + ;; + +- cygwin*) ++ cygwin* | msys*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; +diff --git a/winsup/config.guess b/winsup/config.guess +index 872b96a..fe698fe 100755 +--- a/winsup/config.guess ++++ b/winsup/config.guess +@@ -851,6 +851,9 @@ EOF + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; ++ amd64:MSYS*:*:* | x86_64:MSYS*:*:*) ++ echo x86_64-unknown-msys ++ exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; +diff --git a/winsup/configure b/winsup/configure +index 23b3a7b..6231ade 100755 +--- a/winsup/configure ++++ b/winsup/configure +@@ -681,7 +681,7 @@ CXX + CXXFLAGS + CCC + CPP' +-ac_subdirs_all='cygwin cygserver doc ++ac_subdirs_all='cygwin cygserver + utils lsaauth' + + # Initialize some variables set by options. +@@ -3449,7 +3449,7 @@ export CXX + + + +-subdirs="$subdirs cygwin cygserver doc" ++subdirs="$subdirs cygwin cygserver" + + if test "x$with_cross_bootstrap" != "xyes"; then + subdirs="$subdirs utils lsaauth" +diff --git a/winsup/configure.ac b/winsup/configure.ac +index 3daa2ac..14b4eaa 100644 +--- a/winsup/configure.ac ++++ b/winsup/configure.ac +@@ -36,7 +36,7 @@ AC_LANG(C++) + + AC_CYGWIN_INCLUDES + +-AC_CONFIG_SUBDIRS(cygwin cygserver doc) ++AC_CONFIG_SUBDIRS(cygwin cygserver) + if test "x$with_cross_bootstrap" != "xyes"; then + AC_CONFIG_SUBDIRS([utils lsaauth]) + fi +diff --git a/winsup/cygserver/configure b/winsup/cygserver/configure +index 71d1592..3f44b12 100755 +--- a/winsup/cygserver/configure ++++ b/winsup/cygserver/configure +@@ -3449,7 +3449,7 @@ export CXX + + + case "$with_cross_host" in +- ""|*cygwin*) ++ ""|*cygwin*|*msys*) + all_host="all_host" + install_host="install_host" + ;; +diff --git a/winsup/cygserver/configure.ac b/winsup/cygserver/configure.ac +index eb6a894..2d815e0 100644 +--- a/winsup/cygserver/configure.ac ++++ b/winsup/cygserver/configure.ac +@@ -35,7 +35,7 @@ AC_LANG(C++) + AC_CYGWIN_INCLUDES + + case "$with_cross_host" in +- ""|*cygwin*) ++ ""|*cygwin*|*msys*) + all_host="all_host" + install_host="install_host" + ;; +diff --git a/winsup/cygwin/configure b/winsup/cygwin/configure +index f655f57..617b260 100755 +--- a/winsup/cygwin/configure ++++ b/winsup/cygwin/configure +@@ -3460,7 +3460,7 @@ export CXX + + + case "$with_cross_host" in +- ""|*cygwin*) ++ ""|*cygwin*|*msys*) + all_host="all_host" + install_host="install_host" + ;; +diff --git a/winsup/cygwin/configure.ac b/winsup/cygwin/configure.ac +index d8cdcde..23e45d7 100644 +--- a/winsup/cygwin/configure.ac ++++ b/winsup/cygwin/configure.ac +@@ -37,7 +37,7 @@ AC_LANG(C++) + AC_CYGWIN_INCLUDES + + case "$with_cross_host" in +- ""|*cygwin*) ++ ""|*cygwin*|*msys*) + all_host="all_host" + install_host="install_host" + ;; +-- +2.8.0 + diff --git a/msys2-runtime/0002-Rename-DLL-from-cygwin-to-msys.patch b/msys2-runtime/0002-Rename-DLL-from-cygwin-to-msys.patch new file mode 100644 index 00000000000..fb676285311 --- /dev/null +++ b/msys2-runtime/0002-Rename-DLL-from-cygwin-to-msys.patch @@ -0,0 +1,1539 @@ +From 9e108afaa132fb528184136d079ebd1cd860d393 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Tue, 5 Apr 2016 10:15:20 +0300 +Subject: [PATCH 02/16] Rename DLL from cygwin to msys + +--- + winsup/Makefile.in | 4 +-- + winsup/cygserver/Makefile.in | 6 ++--- + winsup/cygserver/transport_pipes.h | 4 +++ + winsup/cygwin/Makefile.in | 38 ++++++++++++++------------- + winsup/cygwin/common.din | 4 +-- + winsup/cygwin/configure | 4 +-- + winsup/cygwin/configure.ac | 4 +-- + winsup/cygwin/crt0.c | 8 ++++++ + winsup/cygwin/cyglsa.h | 4 +++ + winsup/cygwin/cygserver_setpwd.h | 4 +++ + winsup/cygwin/cygthread.cc | 2 +- + winsup/cygwin/cygwin.sc.in | 21 ++++++++++----- + winsup/cygwin/dcrt0.cc | 20 ++++++++------ + winsup/cygwin/devices.cc | 2 +- + winsup/cygwin/devices.in | 2 +- + winsup/cygwin/dlfcn.cc | 5 ++++ + winsup/cygwin/dll_init.cc | 8 ++++++ + winsup/cygwin/dtable.cc | 6 +++++ + winsup/cygwin/exceptions.cc | 4 +-- + winsup/cygwin/fhandler_tty.cc | 12 +++++++++ + winsup/cygwin/fork.cc | 2 +- + winsup/cygwin/hookapi.cc | 4 +++ + winsup/cygwin/i686.din | 6 ++--- + winsup/cygwin/include/cygwin/cygwin_dll.h | 14 +++++----- + winsup/cygwin/include/cygwin/version.h | 8 ++++++ + winsup/cygwin/lib/_cygwin_crt0_common.cc | 4 +++ + winsup/cygwin/lib/crt0.h | 4 +++ + winsup/cygwin/lib/cygwin_attach_dll.c | 8 ++++++ + winsup/cygwin/lib/cygwin_crt0.c | 8 ++++++ + winsup/cygwin/mkvers.sh | 6 ++--- + winsup/cygwin/pinfo.cc | 4 +-- + winsup/cygwin/pipe.cc | 4 +++ + winsup/cygwin/pseudo-reloc.cc | 2 +- + winsup/cygwin/sec_auth.cc | 10 +++---- + winsup/cygwin/syscalls.cc | 4 +-- + winsup/cygwin/syslog.cc | 4 +++ + winsup/cygwin/winsup.h | 4 +++ + winsup/cygwin/winver.rc | 2 +- + winsup/cygwin/x86_64.din | 2 +- + winsup/lsaauth/cyglsa.c | 2 +- + winsup/testsuite/Makefile.in | 2 +- + winsup/testsuite/config/default.exp | 8 +++--- + winsup/testsuite/cygrun.c | 6 ++--- + winsup/testsuite/winsup.api/cygload.cc | 12 ++++----- + winsup/testsuite/winsup.api/cygload.exp | 2 +- + winsup/testsuite/winsup.api/cygload.h | 2 +- + winsup/testsuite/winsup.api/winsup.exp | 2 +- + winsup/utils/Makefile.in | 8 +++--- + winsup/utils/cygcheck.cc | 43 +++++++++++++++---------------- + winsup/utils/ldd.cc | 2 +- + winsup/utils/loadlib.h | 6 ++--- + winsup/utils/path.cc | 12 ++++----- + winsup/utils/ssp.c | 8 +++--- + winsup/utils/strace.cc | 10 +++---- + 54 files changed, 250 insertions(+), 137 deletions(-) + +diff --git a/winsup/Makefile.in b/winsup/Makefile.in +index 1fdf93a..ad2bd04 100644 +--- a/winsup/Makefile.in ++++ b/winsup/Makefile.in +@@ -64,9 +64,9 @@ endif + all: Makefile $(SUBDIRS) + + install-license: CYGWIN_LICENSE COPYING +- ${INSTALL} -d $(DESTDIR)$(prefix)/share/doc/Cygwin ++ ${INSTALL} -d $(DESTDIR)$(prefix)/share/doc/Msys + for i in $^; do \ +- ${INSTALL} $$i $(DESTDIR)$(prefix)/share/doc/Cygwin ; \ ++ ${INSTALL} $$i $(DESTDIR)$(prefix)/share/doc/Msys ; \ + done + + install: Makefile $(INSTALL_LICENSE) $(INSTALL_SUBDIRS) +diff --git a/winsup/cygserver/Makefile.in b/winsup/cygserver/Makefile.in +index 8a47e82..dd42972 100644 +--- a/winsup/cygserver/Makefile.in ++++ b/winsup/cygserver/Makefile.in +@@ -51,16 +51,16 @@ LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)} + + CYGWIN_OBJS:=$(cygwin_build)/version.o + +-CYGWIN_LIB:=$(cygwin_build)/libcygwin.a ++CYGWIN_LIB:=$(cygwin_build)/libmsys-2.0.a + + all: cygserver.exe + + install: all cygserver.conf cygserver-config README +- /bin/mkdir -p $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir) $(DESTDIR)$(sysconfdir)/defaults/etc $(DESTDIR)$(prefix)/share/doc/Cygwin ++ /bin/mkdir -p $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir) $(DESTDIR)$(sysconfdir)/defaults/etc $(DESTDIR)$(prefix)/share/doc/Msys + $(INSTALL_PROGRAM) cygserver.exe $(DESTDIR)$(sbindir)/cygserver.exe + $(INSTALL_PROGRAM) $(srcdir)/cygserver-config $(DESTDIR)$(bindir)/cygserver-config + $(INSTALL_DATA) $(srcdir)/cygserver.conf $(DESTDIR)$(sysconfdir)/defaults/etc/cygserver.conf +- $(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(prefix)/share/doc/Cygwin/cygserver.README ++ $(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(prefix)/share/doc/Msys/cygserver.README + + clean: + rm -f $(OBJS) ${patsubst %.o,%.d,$(OBJS)} cygserver.exe +diff --git a/winsup/cygserver/transport_pipes.h b/winsup/cygserver/transport_pipes.h +index 1368121..13ba609 100644 +--- a/winsup/cygserver/transport_pipes.h ++++ b/winsup/cygserver/transport_pipes.h +@@ -13,7 +13,11 @@ details. */ + #ifndef _TRANSPORT_PIPES_H + #define _TRANSPORT_PIPES_H + ++#ifdef __MSYS__ ++#define PIPE_NAME_PREFIX L"\\\\.\\pipe\\msys-" ++#else + #define PIPE_NAME_PREFIX L"\\\\.\\pipe\\cygwin-" ++#endif + #define PIPE_NAME_SUFFIX L"-lpc" + + /* Named pipes based transport, for security on NT */ +diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in +index 43919bd..2473d8a 100644 +--- a/winsup/cygwin/Makefile.in ++++ b/winsup/cygwin/Makefile.in +@@ -108,17 +108,17 @@ RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \ + else echo runtest; fi` + RUNTESTFLAGS = + +-# Parameters used in building the cygwin.dll. +-# We build as cygwin0.dll and rename at install time to overcome ++# Parameters used in building the msys.dll. ++# We build as msys0.dll and rename at install time to overcome + # native rebuilding issues (we don't want the build tools to see a partially +-# built cygwin.dll and attempt to use it instead of the old one). ++# built msys.dll and attempt to use it instead of the old one). + + DLL_NAME:=@DLL_NAME@ +-TEST_DLL_NAME:=${patsubst %1.dll,%0.dll,@DLL_NAME@} +-TEST_LIB_NAME:=libcygwin0.a +-STATIC_LIB_NAME:=libcygwin_s.a ++TEST_DLL_NAME:=${patsubst %-2.0.dll,%0.dll,@DLL_NAME@} ++TEST_LIB_NAME:=libmsys0.a ++STATIC_LIB_NAME:=libmsys2_s.a + DIN_FILE=@DIN_FILE@ common.din +-DEF_FILE:=cygwin.def ++DEF_FILE:=msys.def + TLSOFFSETS_H:=@TLSOFFSETS_H@ + DLL_ENTRY:=@DLL_ENTRY@ + +@@ -130,6 +130,7 @@ toolopts:=--cpu=${target_cpu} --ar=${AR} --as=${AS} --nm=${NM} --objcopy=${OBJCO + speclib=\ + ${srcdir}/speclib ${toolopts} \ + --exclude='cygwin' \ ++ --exclude='msys' \ + --exclude='(?i:dll)' \ + --exclude='reloc' \ + --exclude='^main$$' \ +@@ -540,7 +541,7 @@ endif + + API_VER:=$(srcdir)/include/cygwin/version.h + +-LIB_NAME:=libcygwin.a ++LIB_NAME:=libmsys-2.0.a + SUBLIBS:=libpthread.a libutil.a ${CURDIR}/libm.a ${CURDIR}/libc.a libdl.a libresolv.a librt.a libacl.a + EXTRALIBS:=libautomode.a libbinmode.a libtextmode.a libtextreadmode.a + INSTOBJS:=automode.o binmode.o textmode.o textreadmode.o +@@ -589,7 +590,8 @@ install-libs: $(TARGET_LIBS) + for i in $^; do \ + $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/lib/`basename $$i` ; \ + done +- cd $(DESTDIR)$(tooldir)/lib && ln -sf libcygwin.a libg.a ++ $(INSTALL_DATA) msys-2.0.dbg $(DESTDIR)$(bindir)/msys-2.0.dbg ++ cd $(DESTDIR)$(tooldir)/lib && ln -sf libmsys-2.0.a libg.a + + install-headers: + cd $(srcdir); \ +@@ -654,7 +656,7 @@ uninstall-man: + done + + clean: +- -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h $(srcdir)/$(TLSOFFSETS_H) $(srcdir)/devices.cc ++ -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s msys.def globals.h $(srcdir)/$(TLSOFFSETS_H) $(srcdir)/devices.cc + -@$(MAKE) -C ${cygserver_blddir} libclean + + maintainer-clean realclean: clean +@@ -666,29 +668,29 @@ maintainer-clean realclean: clean + $(LDSCRIPT): $(LDSCRIPT).in + $(CC) -E - -P < $^ -o $@ + +-# Rule to build cygwin.dll ++# Rule to build msys-2.0.dll + $(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg $(DLL_OFILES) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile $(VERSION_OFILES) + $(CXX) $(CXXFLAGS) \ + -mno-use-libstdc-wrappers -L${WINDOWS_LIBDIR} \ + -Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) -static \ +- -Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o $@ \ ++ -Wl,--heap=0 -Wl,--out-implib,msysdll.a -shared -o $@ \ + -e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) $(VERSION_OFILES) \ + $(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) \ +- -lgcc $(DLL_IMPORTS) -Wl,-Map,cygwin.map +- @$(word 2,$^) $(OBJDUMP) $(OBJCOPY) $@ ${patsubst %0.dll,%1.dbg,$@} ++ -lgcc $(DLL_IMPORTS) -Wl,-Map,msys.map ++ @$(word 2,$^) $(OBJDUMP) $(OBJCOPY) $@ ${patsubst %0.dll,%-2.0.dbg,$@} + @ln -f $@ new-$(DLL_NAME) + +-# Rule to build libcygwin.a ++# Rule to build libmsys-2.0.a + $(LIB_NAME): $(DEF_FILE) $(LIBCOS) | $(TEST_DLL_NAME) +- ${srcdir}/mkimport ${toolopts} ${NEW_FUNCTIONS} $@ cygdll.a $(wordlist 2,99,$^) ++ ${srcdir}/mkimport ${toolopts} ${NEW_FUNCTIONS} $@ msysdll.a $(wordlist 2,99,$^) + + ${STATIC_LIB_NAME}: mkstatic ${TEST_DLL_NAME} +- perl -d $< -x ${EXCLUDE_STATIC_OFILES} --library=${LIBC} --library=${LIBM} --ar=${AR} $@ cygwin.map ++ perl -d $< -x ${EXCLUDE_STATIC_OFILES} --library=${LIBC} --library=${LIBM} --ar=${AR} $@ msys.map + + # Rule to make stub library used by testsuite + # dependency set to $(LIB_NAME) to accommodate make -j2. + $(TEST_LIB_NAME): $(LIB_NAME) +- perl -p -e 'BEGIN{binmode(STDIN); binmode(STDOUT);}; s/cygwin1/cygwin0/g' < $? > $@ ++ perl -p -e 'BEGIN{binmode(STDIN); binmode(STDOUT);}; s/msys-2.0/msys0/g' < $? > $@ + + $(LIBSERVER): ${cygserver_blddir}/Makefile + $(MAKE) -C ${cygserver_blddir} libcygserver.a +diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din +index 2ae3c81..db7ad78 100644 +--- a/winsup/cygwin/common.din ++++ b/winsup/cygwin/common.din +@@ -347,8 +347,8 @@ cygwin_attach_handle_to_fd SIGFE + cygwin_conv_path SIGFE + cygwin_conv_path_list SIGFE + cygwin_create_path SIGFE +-cygwin_detach_dll SIGFE_MAYBE +-cygwin_dll_init NOSIGFE ++msys_detach_dll SIGFE_MAYBE ++msys_dll_init NOSIGFE + cygwin_internal NOSIGFE + cygwin_logon_user SIGFE + cygwin_posix_path_list_p NOSIGFE +diff --git a/winsup/cygwin/configure b/winsup/cygwin/configure +index 617b260..7ba55ca 100755 +--- a/winsup/cygwin/configure ++++ b/winsup/cygwin/configure +@@ -4442,14 +4442,14 @@ fi + + case "$target_cpu" in + i?86) +- DLL_NAME="cygwin1.dll" ++ DLL_NAME="msys-2.0.dll" + DLL_ENTRY="_dll_entry@12" + DEF_DLL_ENTRY="dll_entry@12" + DIN_FILE="i686.din" + TLSOFFSETS_H="tlsoffsets.h" + ;; + x86_64) +- DLL_NAME="cygwin1.dll" ++ DLL_NAME="msys-2.0.dll" + DLL_ENTRY="dll_entry" + DEF_DLL_ENTRY="dll_entry" + DIN_FILE="x86_64.din" +diff --git a/winsup/cygwin/configure.ac b/winsup/cygwin/configure.ac +index 23e45d7..605b614 100644 +--- a/winsup/cygwin/configure.ac ++++ b/winsup/cygwin/configure.ac +@@ -88,14 +88,14 @@ dnl fi + + case "$target_cpu" in + i?86) +- DLL_NAME="cygwin1.dll" ++ DLL_NAME="msys-2.0.dll" + DLL_ENTRY="_dll_entry@12" + DEF_DLL_ENTRY="dll_entry@12" + DIN_FILE="i686.din" + TLSOFFSETS_H="tlsoffsets.h" + ;; + x86_64) +- DLL_NAME="cygwin1.dll" ++ DLL_NAME="msys-2.0.dll" + DLL_ENTRY="dll_entry" + DEF_DLL_ENTRY="dll_entry" + DIN_FILE="x86_64.din" +diff --git a/winsup/cygwin/crt0.c b/winsup/cygwin/crt0.c +index b5a21bd..e296ebf 100644 +--- a/winsup/cygwin/crt0.c ++++ b/winsup/cygwin/crt0.c +@@ -16,7 +16,11 @@ details. */ + + extern int main (int argc, char **argv); + ++#ifdef __MSYS__ ++void msys_crt0 (int (*main) (int, char **)); ++#else + void cygwin_crt0 (int (*main) (int, char **)); ++#endif + + void + mainCRTStartup () +@@ -26,7 +30,11 @@ mainCRTStartup () + asm volatile ("andl $-16,%%esp" ::: "%esp"); + #endif + ++#ifdef __MSYS__ ++ msys_crt0 (main); ++#else + cygwin_crt0 (main); ++#endif + + /* These are never actually called. They are just here to force the inclusion + of things like -lbinmode. */ +diff --git a/winsup/cygwin/cyglsa.h b/winsup/cygwin/cyglsa.h +index cc180da..944d490 100644 +--- a/winsup/cygwin/cyglsa.h ++++ b/winsup/cygwin/cyglsa.h +@@ -16,7 +16,11 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ + extern "C" { + #endif + ++#ifdef __MSYS__ ++#define CYG_LSA_PKGNAME "MSYSLsa" ++#else + #define CYG_LSA_PKGNAME "CygwinLsa" ++#endif + + #define CYG_LSA_MAGIC_OLD1 0x0379f014LU + /* First change to cyglsa_t. +diff --git a/winsup/cygwin/cygserver_setpwd.h b/winsup/cygwin/cygserver_setpwd.h +index 8fa3479..04994fa 100644 +--- a/winsup/cygwin/cygserver_setpwd.h ++++ b/winsup/cygwin/cygserver_setpwd.h +@@ -14,7 +14,11 @@ details. */ + #include + #include "cygserver.h" + ++#ifdef __MSYS__ ++#define CYGWIN_LSA_KEY_PREFIX L"L$MSYS_" ++#else + #define CYGWIN_LSA_KEY_PREFIX L"L$CYGWIN_" ++#endif + + #ifndef __INSIDE_CYGWIN__ + class transport_layer_base; +diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc +index 8597541..46ba273 100644 +--- a/winsup/cygwin/cygthread.cc ++++ b/winsup/cygwin/cygthread.cc +@@ -171,7 +171,7 @@ new (size_t) + } + + #ifdef DEBUGGING +- if (!getenv ("CYGWIN_FREERANGE_NOCHECK")) ++ if (!getenv ("MSYS_FREERANGE_NOCHECK")) + api_fatal ("overflowed cygwin thread pool"); + else + thread_printf ("overflowed cygwin thread pool"); +diff --git a/winsup/cygwin/cygwin.sc.in b/winsup/cygwin/cygwin.sc.in +index 134ae3f..d390a51 100644 +--- a/winsup/cygwin/cygwin.sc.in ++++ b/winsup/cygwin/cygwin.sc.in +@@ -1,10 +1,18 @@ + #ifdef __x86_64__ + OUTPUT_FORMAT(pei-x86-64) ++# ifdef __MSYS__ ++SEARCH_DIR("/usr/x86_64-pc-msys/lib/w32api"); SEARCH_DIR("=/usr/lib/w32api"); ++# else + SEARCH_DIR("/usr/x86_64-pc-cygwin/lib/w32api"); SEARCH_DIR("=/usr/lib/w32api"); ++# endif + #else + #undef i386 + OUTPUT_FORMAT(pei-i386) ++# ifdef __MSYS__ ++SEARCH_DIR("/usr/i686-pc-msys/lib/w32api"); SEARCH_DIR("=/usr/lib/w32api"); ++# else + SEARCH_DIR("/usr/i686-pc-cygwin/lib/w32api"); SEARCH_DIR("=/usr/lib/w32api"); ++# endif + #endif + #define __CONCAT1(a,b) a##b + #define __CONCAT(a,b) __CONCAT1(a,b) +@@ -115,13 +123,14 @@ SECTIONS + } + .gnu_debuglink_overlay ALIGN(__section_alignment__) (NOLOAD): + { +- BYTE(0) /* c */ ++ BYTE(0) /* m */ ++ BYTE(0) /* s */ + BYTE(0) /* y */ +- BYTE(0) /* g */ +- BYTE(0) /* w */ +- BYTE(0) /* i */ +- BYTE(0) /* n */ +- BYTE(0) /* 1 */ ++ BYTE(0) /* s */ ++ BYTE(0) /* - */ ++ BYTE(0) /* 2 */ ++ BYTE(0) /* . */ ++ BYTE(0) /* 0 */ + BYTE(0) /* . */ + BYTE(0) /* d */ + BYTE(0) /* b */ +diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc +index cbe7f25..20746f1 100644 +--- a/winsup/cygwin/dcrt0.cc ++++ b/winsup/cygwin/dcrt0.cc +@@ -381,21 +381,21 @@ check_sanity_and_sync (per_process *p) + + /* Complain if older than last incompatible change */ + if (p->dll_major < CYGWIN_VERSION_DLL_EPOCH) +- api_fatal ("cygwin DLL and APP are out of sync -- DLL version mismatch %u < %u", ++ api_fatal ("msys DLL and APP are out of sync -- DLL version mismatch %u < %u", + p->dll_major, CYGWIN_VERSION_DLL_EPOCH); + + /* magic_biscuit != 0 if using the old style version numbering scheme. */ + if (p->magic_biscuit != SIZEOF_PER_PROCESS) +- api_fatal ("Incompatible cygwin .dll -- incompatible per_process info %u != %u", ++ api_fatal ("Incompatible msys .dll -- incompatible per_process info %u != %u", + p->magic_biscuit, SIZEOF_PER_PROCESS); + + /* Complain if incompatible API changes made */ + if (p->api_major > cygwin_version.api_major) +- api_fatal ("cygwin DLL and APP are out of sync -- API version mismatch %u > %u", ++ api_fatal ("msys DLL and APP are out of sync -- API version mismatch %u > %u", + p->api_major, cygwin_version.api_major); + + #ifndef __x86_64__ +- /* This is a kludge to work around a version of _cygwin_common_crt0 ++ /* This is a kludge to work around a version of _msys_common_crt0 + which overwrote the cxx_malloc field with the local DLL copy. + Hilarity ensues if the DLL is not loaded while the process + is forking. */ +@@ -506,12 +506,12 @@ break_here () + static void + initial_env () + { +- if (GetEnvironmentVariableA ("CYGWIN_TESTING", NULL, 0)) ++ if (GetEnvironmentVariableA ("MSYS_TESTING", NULL, 0)) + _cygwin_testing = 1; + + #ifdef DEBUGGING + char buf[PATH_MAX]; +- if (GetEnvironmentVariableA ("CYGWIN_DEBUG", buf, sizeof (buf) - 1)) ++ if (GetEnvironmentVariableA ("MSYS_DEBUG", buf, sizeof (buf) - 1)) + { + char buf1[PATH_MAX]; + GetModuleFileName (NULL, buf1, PATH_MAX); +@@ -1151,7 +1151,11 @@ dll_crt0 (per_process *uptr) + See winsup/testsuite/cygload for an example of how to use cygwin1.dll + from MSVC and non-cygwin MinGW applications. */ + extern "C" void ++#ifdef __MSYS__ ++msys_dll_init () ++#else + cygwin_dll_init () ++#endif + { + #ifndef __x86_64__ + static char **envp; +@@ -1364,7 +1368,7 @@ multiple_cygwin_problem (const char *what, uintptr_t magic_version, uintptr_t ve + return; + } + +- if (GetEnvironmentVariableA ("CYGWIN_MISMATCH_OK", NULL, 0)) ++ if (GetEnvironmentVariableA ("MSYS_MISMATCH_OK", NULL, 0)) + return; + + if (CYGWIN_VERSION_MAGIC_VERSION (magic_version) == version) +@@ -1384,7 +1388,7 @@ are unable to find another cygwin DLL.", + void __reg1 + cygbench (const char *s) + { +- if (GetEnvironmentVariableA ("CYGWIN_BENCH", NULL, 0)) ++ if (GetEnvironmentVariableA ("MSYS_BENCH", NULL, 0)) + small_printf ("%05u ***** %s : %10d\n", GetCurrentProcessId (), s, strace.microseconds ()); + } + #endif +diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc +index fa022ea..df5402b 100644 +--- a/winsup/cygwin/devices.cc ++++ b/winsup/cygwin/devices.cc +@@ -308,7 +308,7 @@ const _RDATA device dev_storage[] = + {"/dev/fd14", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 14)), "\\Device\\Floppy14", exists_ntdev, S_IFBLK, true}, + {"/dev/fd15", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 15)), "\\Device\\Floppy15", exists_ntdev, S_IFBLK, true}, + {"/dev/full", BRACK(FH_FULL), "\\Device\\Null", exists_ntdev, S_IFCHR, true}, +- {"/dev/kmsg", BRACK(FH_KMSG), "\\Device\\MailSlot\\cygwin\\dev\\kmsg", exists_ntdev, S_IFCHR, true}, ++ {"/dev/kmsg", BRACK(FH_KMSG), "\\Device\\MailSlot\\msys\\dev\\kmsg", exists_ntdev, S_IFCHR, true}, + {"/dev/nst0", BRACK(FHDEV(DEV_TAPE_MAJOR, 128)), "\\Device\\Tape0", exists_ntdev, S_IFBLK, true}, + {"/dev/nst1", BRACK(FHDEV(DEV_TAPE_MAJOR, 129)), "\\Device\\Tape1", exists_ntdev, S_IFBLK, true}, + {"/dev/nst2", BRACK(FHDEV(DEV_TAPE_MAJOR, 130)), "\\Device\\Tape2", exists_ntdev, S_IFBLK, true}, +diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in +index c337053..0b1067a 100644 +--- a/winsup/cygwin/devices.in ++++ b/winsup/cygwin/devices.in +@@ -176,7 +176,7 @@ const device dev_error_storage = + "/dev/sdb%{a-z}s%(1-15)d", BRACK(FH_SDB{uc $1} | {$2}), "\\Device\\Harddisk{52 + ord($1) - ord('a')}\\Partition{$2 % 16}", exists_ntdev, S_IFBLK + "/dev/sdc%{a-z}s%(1-15)d", BRACK(FH_SDC{uc $1} | {$2}), "\\Device\\Harddisk{78 + ord($1) - ord('a')}\\Partition{$2 % 16}", exists_ntdev, S_IFBLK + "/dev/sdd%{a-x}s%(1-15)d", BRACK(FH_SDD{uc $1} | {$2}), "\\Device\\Harddisk{104 + ord($1) - ord('a')}\\Partition{$2 % 16}", exists_ntdev, S_IFBLK +-"/dev/kmsg", BRACK(FH_KMSG), "\\Device\\MailSlot\\cygwin\\dev\\kmsg", exists_ntdev, S_IFCHR ++"/dev/kmsg", BRACK(FH_KMSG), "\\Device\\MailSlot\\msys\\dev\\kmsg", exists_ntdev, S_IFCHR + %other {return NULL;} + %% + #undef BRACK +diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc +index 914411c..4cb9f0b 100644 +--- a/winsup/cygwin/dlfcn.cc ++++ b/winsup/cygwin/dlfcn.cc +@@ -89,8 +89,13 @@ get_full_path_of_dll (const char* str, path_conv &real_filename) + /* Does the filename start with "lib"? */ + if (!strncmp (basename, "lib", 3)) + { ++#ifdef __MSYS__ ++ /* Yes, replace "lib" with "msys-". */ ++ strncpy (basename, "msys-", 5); ++#else + /* Yes, replace "lib" with "cyg". */ + strncpy (basename, "cyg", 3); ++#endif + /* Does the file exist? */ + if (gfpod_helper (name, real_filename)) + return true; +diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc +index 8deceb9..58f24dc 100644 +--- a/winsup/cygwin/dll_init.cc ++++ b/winsup/cygwin/dll_init.cc +@@ -695,14 +695,22 @@ dll_dllcrt0_1 (VOID *x) + future. Cygwin can now handle being loaded from a noncygwin app + using the same entry point. */ + extern "C" int ++#ifdef __MSYS__ ++dll_nonmsys_dllcrt0 (HMODULE h, per_process *p) ++#else + dll_noncygwin_dllcrt0 (HMODULE h, per_process *p) ++#endif + { + return (int) dll_dllcrt0 (h, p); + } + #endif /* !__x86_64__ */ + + extern "C" void ++#ifdef __MSYS__ ++msys_detach_dll (dll *) ++#else + cygwin_detach_dll (dll *) ++#endif + { + HANDLE retaddr; + if (_my_tls.isinitialized ()) +diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc +index 7f12ff5..edebd85 100644 +--- a/winsup/cygwin/dtable.cc ++++ b/winsup/cygwin/dtable.cc +@@ -973,9 +973,15 @@ handle_to_fn (HANDLE h, char *posix_fn) + if (wcsncasecmp (w32, DEV_NAMED_PIPE, DEV_NAMED_PIPE_LEN) == 0) + { + w32 += DEV_NAMED_PIPE_LEN; ++#ifdef __MSYS__ ++ if (wcsncmp (w32, L"msys-", WCLEN (L"msys-")) != 0) ++ return false; ++ w32 += WCLEN (L"msys-"); ++#else + if (wcsncmp (w32, L"cygwin-", WCLEN (L"cygwin-")) != 0) + return false; + w32 += WCLEN (L"cygwin-"); ++#endif + /* Check for installation key and trailing dash. */ + w32len = cygheap->installation_key.Length / sizeof (WCHAR); + if (w32len +diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc +index fc9834c..482ee39 100644 +--- a/winsup/cygwin/exceptions.cc ++++ b/winsup/cygwin/exceptions.cc +@@ -512,14 +512,14 @@ try_to_debug (bool waitloop) + PWCHAR rawenv = GetEnvironmentStringsW () ; + for (PWCHAR p = rawenv; *p != L'\0'; p = wcschr (p, L'\0') + 1) + { +- if (wcsncmp (p, L"CYGWIN=", wcslen (L"CYGWIN=")) == 0) ++ if (wcsncmp (p, L"MSYS=", wcslen (L"MSYS=")) == 0) + { + PWCHAR q = wcsstr (p, L"error_start") ; + /* replace 'error_start=...' with '_rror_start=...' */ + if (q) + { + *q = L'_' ; +- SetEnvironmentVariableW (L"CYGWIN", p + wcslen (L"CYGWIN=")) ; ++ SetEnvironmentVariableW (L"MSYS", p + wcslen (L"MSYS=")) ; + } + break; + } +diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc +index a39a566..f026046 100644 +--- a/winsup/cygwin/fhandler_tty.cc ++++ b/winsup/cygwin/fhandler_tty.cc +@@ -467,7 +467,11 @@ fhandler_pty_slave::open (int flags, mode_t) + pipe_reply repl; + DWORD len; + ++#ifdef __MSYS__ ++ __small_sprintf (buf, "\\\\.\\pipe\\msys-%S-pty%d-master-ctl", ++#else + __small_sprintf (buf, "\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl", ++#endif + &cygheap->installation_key, get_minor ()); + termios_printf ("dup handles via master control pipe %s", buf); + if (!CallNamedPipe (buf, &req, sizeof req, &repl, sizeof repl, +@@ -1309,7 +1313,11 @@ fhandler_pty_master::close () + pipe_reply repl; + DWORD len; + ++#ifdef __MSYS__ ++ __small_sprintf (buf, "\\\\.\\pipe\\msys-%S-pty%d-master-ctl", ++#else + __small_sprintf (buf, "\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl", ++#endif + &cygheap->installation_key, get_minor ()); + acquire_output_mutex (INFINITE); + if (master_ctl) +@@ -1781,7 +1789,11 @@ fhandler_pty_master::setup () + + /* Create master control pipe which allows the master to duplicate + the pty pipe handles to processes which deserve it. */ ++#ifdef __MSYS__ ++ __small_sprintf (buf, "\\\\.\\pipe\\msys-%S-pty%d-master-ctl", ++#else + __small_sprintf (buf, "\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl", ++#endif + &cygheap->installation_key, unit); + master_ctl = CreateNamedPipe (buf, PIPE_ACCESS_DUPLEX + | FILE_FLAG_FIRST_PIPE_INSTANCE, +diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc +index ce54e39..d633093 100644 +--- a/winsup/cygwin/fork.cc ++++ b/winsup/cygwin/fork.cc +@@ -167,7 +167,7 @@ frok::child (volatile char * volatile here) + char buf[80]; + /* This is useful for debugging fork problems. Use gdb to attach to + the pid reported here. */ +- if (GetEnvironmentVariableA ("CYGWIN_FORK_SLEEP", buf, sizeof (buf))) ++ if (GetEnvironmentVariableA ("MSYS_FORK_SLEEP", buf, sizeof (buf))) + { + small_printf ("Sleeping %d after fork, pid %u\n", atoi (buf), GetCurrentProcessId ()); + Sleep (atoi (buf)); +diff --git a/winsup/cygwin/hookapi.cc b/winsup/cygwin/hookapi.cc +index 133d8cb..d1f4ee9 100644 +--- a/winsup/cygwin/hookapi.cc ++++ b/winsup/cygwin/hookapi.cc +@@ -403,7 +403,11 @@ hook_or_detect_cygwin (const char *name, const void *fn, WORD& subsys, HANDLE h) + for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++) + { + if (!ascii_strcasematch (rva (PSTR, map ?: (char *) hm, pd->Name - delta), ++#ifdef __MSYS__ ++ "msys-2.0.dll")) ++#else + "cygwin1.dll")) ++#endif + continue; + if (!fn) + { +diff --git a/winsup/cygwin/i686.din b/winsup/cygwin/i686.din +index f3cd2fd..417a827 100644 +--- a/winsup/cygwin/i686.din ++++ b/winsup/cygwin/i686.din +@@ -1,4 +1,4 @@ +-LIBRARY "cygwin1.dll" BASE=0x61000000 ++LIBRARY "msys-2.0.dll" BASE=0x61000000 + + EXPORTS + #Exported variables +@@ -598,7 +598,7 @@ cygwin32_conv_to_full_posix_path = cygwin_conv_to_full_posix_path SIGFE + cygwin32_conv_to_full_win32_path = cygwin_conv_to_full_win32_path SIGFE + cygwin32_conv_to_posix_path = cygwin_conv_to_posix_path SIGFE + cygwin32_conv_to_win32_path = cygwin_conv_to_win32_path SIGFE +-cygwin32_detach_dll = cygwin_detach_dll SIGFE_MAYBE ++cygwin32_detach_dll = msys_detach_dll SIGFE_MAYBE + cygwin32_internal = cygwin_internal SIGFE + cygwin32_posix_path_list_p = cygwin_posix_path_list_p NOSIGFE + cygwin32_posix_to_win32_path_list = cygwin_posix_to_win32_path_list SIGFE +@@ -616,7 +616,7 @@ cygwin_posix_to_win32_path_list_buf_size SIGFE + cygwin_win32_to_posix_path_list SIGFE + cygwin_win32_to_posix_path_list_buf_size SIGFE + dll_entry@12 NOSIGFE +-dll_noncygwin_dllcrt0 NOSIGFE ++dll_nonmsys_dllcrt0 NOSIGFE + fcloseall_r = _fcloseall_r SIGFE + fscanf_r = _fscanf_r SIGFE + get_osfhandle = _get_osfhandle SIGFE +diff --git a/winsup/cygwin/include/cygwin/cygwin_dll.h b/winsup/cygwin/include/cygwin/cygwin_dll.h +index 908858c..96dc7d8 100644 +--- a/winsup/cygwin/include/cygwin/cygwin_dll.h ++++ b/winsup/cygwin/include/cygwin/cygwin_dll.h +@@ -26,8 +26,8 @@ details. */ + CDECL_BEGIN \ + int WINAPI Entry (HINSTANCE h, DWORD reason, void *ptr); \ + typedef int (*mainfunc) (int, char **, char **); \ +- extern PVOID cygwin_attach_dll (HMODULE, mainfunc); \ +- extern void cygwin_detach_dll (PVOID); \ ++ extern PVOID msys_attach_dll (HMODULE, mainfunc); \ ++ extern void msys_detach_dll (PVOID); \ + CDECL_END \ + \ + static HINSTANCE storedHandle; \ +@@ -44,7 +44,7 @@ static int __dllMain (int a __attribute__ ((__unused__)), \ + \ + static PVOID dll_index; \ + \ +-int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ ++int WINAPI _msys_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ + { \ + int ret; \ + ret = 1; \ +@@ -57,7 +57,7 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ + storedReason = reason; \ + storedPtr = ptr; \ + __dynamically_loaded = (ptr == NULL); \ +- dll_index = cygwin_attach_dll (h, &__dllMain); \ ++ dll_index = msys_attach_dll (h, &__dllMain); \ + if (dll_index == (PVOID) -1) \ + ret = 0; \ + } \ +@@ -68,7 +68,7 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ + ret = Entry (h, reason, ptr); \ + if (ret) \ + { \ +- cygwin_detach_dll (dll_index); \ ++ msys_detach_dll (dll_index); \ + dll_index = (PVOID) -1; \ + } \ + } \ +@@ -90,9 +90,9 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ + } \ + \ + /* OBSOLETE: This is only provided for source level compatibility. */ \ +-int WINAPI _cygwin_noncygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ ++int WINAPI _msys_nonmsys_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ + { \ +- return _cygwin_dll_entry (h, reason, ptr); \ ++ return _msys_dll_entry (h, reason, ptr); \ + } \ + + #endif /* __CYGWIN_CYGWIN_DLL_H__ */ +diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h +index 9442e4e..75661f8 100644 +--- a/winsup/cygwin/include/cygwin/version.h ++++ b/winsup/cygwin/include/cygwin/version.h +@@ -474,7 +474,11 @@ details. */ + names include the CYGWIN_VERSION_SHARED_DATA version as well as this + identifier. */ + ++#ifdef __MSYS__ ++#define CYGWIN_VERSION_DLL_IDENTIFIER "msys-2.0" ++#else + #define CYGWIN_VERSION_DLL_IDENTIFIER "cygwin1" ++#endif + + /* The Cygwin mount table interface in the Win32 registry also has a version + number associated with it in case that is changed in a non-backwards +@@ -490,7 +494,11 @@ details. */ + + /* Identifiers used in the Win32 registry. */ + ++#ifdef __MSYS__ ++#define CYGWIN_INFO_CYGWIN_REGISTRY_NAME "MSYS" ++#else + #define CYGWIN_INFO_CYGWIN_REGISTRY_NAME "Cygwin" ++#endif + #define CYGWIN_INFO_INSTALLATIONS_NAME "Installations" + + /* The default cygdrive prefix. */ +diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc +index 50785d7..c0e0976 100644 +--- a/winsup/cygwin/lib/_cygwin_crt0_common.cc ++++ b/winsup/cygwin/lib/_cygwin_crt0_common.cc +@@ -90,7 +90,11 @@ struct per_process_cxx_malloc __cygwin_cxx_malloc = + and then jump to the dll. */ + + int __stdcall ++#ifdef __MSYS__ ++_msys_crt0_common (MainFunc f, per_process *u) ++#else + _cygwin_crt0_common (MainFunc f, per_process *u) ++#endif + { + per_process *newu = (per_process *) cygwin_internal (CW_USER_DATA); + bool uwasnull; +diff --git a/winsup/cygwin/lib/crt0.h b/winsup/cygwin/lib/crt0.h +index d289e78..86ff2df 100644 +--- a/winsup/cygwin/lib/crt0.h ++++ b/winsup/cygwin/lib/crt0.h +@@ -15,7 +15,11 @@ extern "C" { + #include "winlean.h" + struct per_process; + typedef int (*MainFunc) (int argc, char *argv[], char **env); ++#ifdef __MSYS__ ++int __stdcall _msys_crt0_common (MainFunc, struct per_process *); ++#else + int __stdcall _cygwin_crt0_common (MainFunc, struct per_process *); ++#endif + PVOID dll_dllcrt0 (HMODULE, struct per_process *); + + #ifdef __cplusplus +diff --git a/winsup/cygwin/lib/cygwin_attach_dll.c b/winsup/cygwin/lib/cygwin_attach_dll.c +index 543073c..7b22ebb 100644 +--- a/winsup/cygwin/lib/cygwin_attach_dll.c ++++ b/winsup/cygwin/lib/cygwin_attach_dll.c +@@ -17,10 +17,18 @@ details. */ + + /* for a loaded dll */ + PVOID ++#ifdef __MSYS__ ++msys_attach_dll (HMODULE h, MainFunc f) ++#else + cygwin_attach_dll (HMODULE h, MainFunc f) ++#endif + { + static struct per_process u; ++#ifdef __MSYS__ ++ (void) _msys_crt0_common (f, &u); ++#else + (void) _cygwin_crt0_common (f, &u); ++#endif + + /* jump into the dll. */ + return dll_dllcrt0 (h, &u); +diff --git a/winsup/cygwin/lib/cygwin_crt0.c b/winsup/cygwin/lib/cygwin_crt0.c +index 952ae28..e5a8d58 100644 +--- a/winsup/cygwin/lib/cygwin_crt0.c ++++ b/winsup/cygwin/lib/cygwin_crt0.c +@@ -16,8 +16,16 @@ extern void __stdcall _dll_crt0 () + + /* for main module */ + void ++#ifdef __MSYS__ ++msys_crt0 (MainFunc f) ++#else + cygwin_crt0 (MainFunc f) ++#endif + { ++#ifdef __MSYS__ ++ _msys_crt0_common (f, NULL); ++#else + _cygwin_crt0_common (f, NULL); ++#endif + _dll_crt0 (); /* Jump into the dll, never to return */ + } +diff --git a/winsup/cygwin/mkvers.sh b/winsup/cygwin/mkvers.sh +index f3f3d16..5cd6c2e 100755 +--- a/winsup/cygwin/mkvers.sh ++++ b/winsup/cygwin/mkvers.sh +@@ -136,7 +136,7 @@ fi + ) | while read var; do + read val + cat <&9 + +@@ -154,9 +154,9 @@ fi + # + cat <&9 + #ifdef DEBUGGING +- "%%% Cygwin shared id: " CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "-$builddate\n" ++ "%%% MSYS shared id: " CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "-$builddate\n" + #else +- "%%% Cygwin shared id: " CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "\n" ++ "%%% MSYS shared id: " CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "\n" + #endif + "END_CYGWIN_VERSION_INFO\n\0"; + cygwin_version_info cygwin_version = +diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc +index d4b2afb..b2d8257 100644 +--- a/winsup/cygwin/pinfo.cc ++++ b/winsup/cygwin/pinfo.cc +@@ -191,7 +191,7 @@ pinfo::maybe_set_exit_code_from_windows () + GetExitCodeProcess (hProcess, &x); + set_exit_code (x); + } +- sigproc_printf ("pid %d, exit value - old %y, windows %y, cygwin %y", ++ sigproc_printf ("pid %d, exit value - old %y, windows %y, MSYS %y", + self->pid, oexitcode, x, self->exitcode); + } + +@@ -342,7 +342,7 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0) + if (procinfo->process_state & PID_EXECED) + { + pid_t realpid = procinfo->pid; +- debug_printf ("execed process windows pid %u, cygwin pid %d", n, realpid); ++ debug_printf ("execed process windows pid %u, MSYS pid %d", n, realpid); + if (realpid == n) + api_fatal ("retrieval of execed process info for pid %d failed due to recursion.", n); + +diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc +index 4ccfef6..1f5e465 100644 +--- a/winsup/cygwin/pipe.cc ++++ b/winsup/cygwin/pipe.cc +@@ -202,7 +202,11 @@ fhandler_pipe::dup (fhandler_base *child, int flags) + return res; + } + ++#ifdef __MSYS__ ++#define PIPE_INTRO "\\\\.\\pipe\\msys-" ++#else + #define PIPE_INTRO "\\\\.\\pipe\\cygwin-" ++#endif + + /* Create a pipe, and return handles to the read and write ends, + just like CreatePipe, but ensure that the write end permits +diff --git a/winsup/cygwin/pseudo-reloc.cc b/winsup/cygwin/pseudo-reloc.cc +index c250fdc..a230b35 100644 +--- a/winsup/cygwin/pseudo-reloc.cc ++++ b/winsup/cygwin/pseudo-reloc.cc +@@ -87,7 +87,7 @@ __report_error (const char *msg, ...) + char buf[128]; + char *posix_module = NULL; + static const char UNKNOWN_MODULE[] = ": "; +- static const char CYGWIN_FAILURE_MSG[] = "Cygwin runtime failure: "; ++ static const char CYGWIN_FAILURE_MSG[] = "MSYS runtime failure: "; + HANDLE errh = GetStdHandle (STD_ERROR_HANDLE); + va_list args; + +diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc +index b6dc9d6..f60788b 100644 +--- a/winsup/cygwin/sec_auth.cc ++++ b/winsup/cygwin/sec_auth.cc +@@ -773,7 +773,7 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern) + if (!NT_SUCCESS (status)) + debug_printf ("NtQueryInformationToken(), %y", status); + else +- *pintern = intern = !memcmp (ts.SourceName, "Cygwin.1", 8); ++ *pintern = intern = !memcmp (ts.SourceName, "MSYS.2", 6); + } + /* Verify usersid */ + cygsid tok_usersid (NO_SID); +@@ -891,7 +891,7 @@ create_token (cygsid &usersid, user_groups &new_groups) + TOKEN_DEFAULT_DACL dacl = {}; + TOKEN_SOURCE source; + TOKEN_STATISTICS stats; +- memcpy (source.SourceName, "Cygwin.1", 8); ++ memcpy (source.SourceName, "MSYS.2", 6); + source.SourceIdentifier.HighPart = 0; + source.SourceIdentifier.LowPart = 0x0101; + +@@ -1049,7 +1049,7 @@ lsaauth (cygsid &usersid, user_groups &new_groups) + push_self_privilege (SE_TCB_PRIVILEGE, true); + + /* Register as logon process. */ +- RtlInitAnsiString (&name, "Cygwin"); ++ RtlInitAnsiString (&name, "MSYS"); + SetLastError (0); + status = LsaRegisterLogonProcess (&name, &lsa_hdl, &sec_mode); + if (status != STATUS_SUCCESS) +@@ -1078,10 +1078,10 @@ lsaauth (cygsid &usersid, user_groups &new_groups) + goto out; + + /* Create origin. */ +- stpcpy (origin.buf, "Cygwin"); ++ stpcpy (origin.buf, "MSYS"); + RtlInitAnsiString (&origin.str, origin.buf); + /* Create token source. */ +- memcpy (ts.SourceName, "Cygwin.1", 8); ++ memcpy (ts.SourceName, "MSYS.2", 6); + ts.SourceIdentifier.HighPart = 0; + ts.SourceIdentifier.LowPart = 0x0103; + +diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc +index 4b49441..4e3f515 100644 +--- a/winsup/cygwin/syscalls.cc ++++ b/winsup/cygwin/syscalls.cc +@@ -383,7 +383,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) + /* Create hopefully unique filename. + Since we have to stick to the current directory on remote shares, make + the new filename at least very unlikely to match by accident. It starts +- with ".cyg", with "cyg" transposed into the Unicode low surrogate area ++ with ".msys", with "msys" transposed into the Unicode low surrogate area + starting at U+dc00. Use plain ASCII chars on filesystems not supporting + Unicode. The rest of the filename is the inode number in hex encoding + and a hash of the full NT path in hex. The combination allows to remove +@@ -392,7 +392,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) + RtlAppendUnicodeToString (&recycler, + (pc.fs_flags () & FILE_UNICODE_ON_DISK + && !pc.fs_is_samba ()) +- ? L".\xdc63\xdc79\xdc67" : L".cyg"); ++ ? L".\xdc73\xdc6d\xdc79\xdc6d" : L".msys"); + pfii = (PFILE_INTERNAL_INFORMATION) infobuf; + /* Note: Modern Samba versions apparently don't like buffer sizes of more + than 65535 in some NtQueryInformationFile/NtSetInformationFile calls. +diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc +index 7949b70..fada898 100644 +--- a/winsup/cygwin/syslog.cc ++++ b/winsup/cygwin/syslog.cc +@@ -28,7 +28,11 @@ details. */ + #include "cygtls.h" + #include "tls_pbuf.h" + ++#ifdef __MSYS__ ++#define CYGWIN_LOG_NAME L"MSYS" ++#else + #define CYGWIN_LOG_NAME L"Cygwin" ++#endif + + static struct + { +diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h +index 9b12267..c620a92 100644 +--- a/winsup/cygwin/winsup.h ++++ b/winsup/cygwin/winsup.h +@@ -165,7 +165,11 @@ extern "C" void _pei386_runtime_relocator (per_process *); + + #ifndef __x86_64__ + /* dynamically loaded dll initialization for non-cygwin apps */ ++#ifdef __MSYS__ ++extern "C" int dll_nonmsys_dllcrt0 (HMODULE, per_process *); ++#else + extern "C" int dll_noncygwin_dllcrt0 (HMODULE, per_process *); ++#endif + #endif /* !__x86_64__ */ + + void __reg1 do_exit (int) __attribute__ ((noreturn)); +diff --git a/winsup/cygwin/winver.rc b/winsup/cygwin/winver.rc +index 6174589..7a24cf7 100644 +--- a/winsup/cygwin/winver.rc ++++ b/winsup/cygwin/winver.rc +@@ -35,7 +35,7 @@ BEGIN + VALUE "InternalName", CYGWIN_DLL_NAME + VALUE "LegalCopyright", "Copyright \251 Red Hat, Inc. 1996-" STRINGIFY(CYGWIN_BUILD_YEAR) + VALUE "OriginalFilename", CYGWIN_DLL_NAME +- VALUE "ProductName", "Cygwin" ++ VALUE "ProductName", "MSYS2" + VALUE "ProductVersion", STRINGIFY(CYGWIN_VERSION) + VALUE "APIVersion", CYGWIN_API_VERSION + VALUE "SharedMemoryVersion", STRINGIFY(CYGWIN_VERSION_SHARED_DATA) +diff --git a/winsup/cygwin/x86_64.din b/winsup/cygwin/x86_64.din +index e1896bf..38332c7 100644 +--- a/winsup/cygwin/x86_64.din ++++ b/winsup/cygwin/x86_64.din +@@ -1,4 +1,4 @@ +-LIBRARY "cygwin1.dll" BASE=0x180040000 ++LIBRARY "msys-2.0.dll" BASE=0x180040000 + + EXPORTS + #Exported variables +diff --git a/winsup/lsaauth/cyglsa.c b/winsup/lsaauth/cyglsa.c +index 351a892..36d75af 100644 +--- a/winsup/lsaauth/cyglsa.c ++++ b/winsup/lsaauth/cyglsa.c +@@ -412,7 +412,7 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type, + return stat; + } + +- memcpy (ts.SourceName, "Cygwin.1", 8); ++ memcpy (ts.SourceName, "MSYS.2", 6); + ts.SourceIdentifier.HighPart = 0; + ts.SourceIdentifier.LowPart = 0x0104; + RtlInitEmptyUnicodeString (&flatnm, flatname, +diff --git a/winsup/testsuite/Makefile.in b/winsup/testsuite/Makefile.in +index 04ff99b..1bc41fb 100644 +--- a/winsup/testsuite/Makefile.in ++++ b/winsup/testsuite/Makefile.in +@@ -73,7 +73,7 @@ ifdef VERBOSE + RUNTESTFLAGS = -v + endif + +-RUNTIME=$(cygwin_build)/cygwin0.dll $(cygwin_build)/libcygwin0.a ++RUNTIME=$(cygwin_build)/msys0.dll $(cygwin_build)/libmsys0.a + + TESTSUP_LIB_NAME:=libltp.a + TESTSUP_OFILES:=${sort ${addsuffix .o,${basename ${notdir ${wildcard $(libltp_srcdir)/lib/*.c}}}}} +diff --git a/winsup/testsuite/config/default.exp b/winsup/testsuite/config/default.exp +index 3936979..9acfb11 100644 +--- a/winsup/testsuite/config/default.exp ++++ b/winsup/testsuite/config/default.exp +@@ -1,11 +1,11 @@ + proc winsup_version {} { + global env + global rootme +- clone_output "\n[exec grep ^%%% $rootme/../cygwin/cygwin0.dll]\n" +- if { [info exists env(CYGWIN)] } { +- clone_output "CYGWIN=$env(CYGWIN)\n" ++ clone_output "\n[exec grep ^%%% $rootme/../cygwin/msys0.dll]\n" ++ if { [info exists env(MSYS)] } { ++ clone_output "MSYS=$env(MSYS)\n" + } else { +- clone_output "CYGWIN=\n" ++ clone_output "MSYS=\n" + } + } + +diff --git a/winsup/testsuite/cygrun.c b/winsup/testsuite/cygrun.c +index 60330ca..be8ed9e 100644 +--- a/winsup/testsuite/cygrun.c ++++ b/winsup/testsuite/cygrun.c +@@ -31,8 +31,8 @@ main (int argc, char **argv) + exit (0); + } + +- SetEnvironmentVariable ("CYGWIN_TESTING", "1"); +- if ((p = getenv ("CYGWIN")) == NULL || (strstr (p, "ntsec") == NULL)) ++ SetEnvironmentVariable ("MSYS_TESTING", "1"); ++ if ((p = getenv ("MSYS")) == NULL || (strstr (p, "ntsec") == NULL)) + { + char buf[4096]; + if (!p) +@@ -46,7 +46,7 @@ main (int argc, char **argv) + strcat (buf, " "); + } + strcat(buf, "ntsec"); +- SetEnvironmentVariable ("CYGWIN", buf); ++ SetEnvironmentVariable ("MSYS", buf); + } + + memset (&sa, 0, sizeof (sa)); +diff --git a/winsup/testsuite/winsup.api/cygload.cc b/winsup/testsuite/winsup.api/cygload.cc +index bdbbcd1..6fc5360 100644 +--- a/winsup/testsuite/winsup.api/cygload.cc ++++ b/winsup/testsuite/winsup.api/cygload.cc +@@ -27,7 +27,7 @@ + save for errors. + -testinterrupts Pauses the program for 30 seconds so you can demonstrate + that it handles ^C properly. +- -cygwin Name of DLL to load. Defaults to "cygwin1.dll". */ ++ -cygwin Name of DLL to load. Defaults to "msys-2.0.dll". */ + + #include "cygload.h" + #include +@@ -138,15 +138,15 @@ cygwin::connector::connector (const char *dll) + if ((_library = LoadLibrary (dll)) == NULL) + throw windows_error ("LoadLibrary", dll); + +- *out << "Initializing cygwin..." << endl; ++ *out << "Initializing msys..." << endl; + +- // This calls dcrt0.cc:cygwin_dll_init(), which calls dll_crt0_1(), ++ // This calls dcrt0.cc:msys_dll_init(), which calls dll_crt0_1(), + // which will, among other things: + // * spawn the cygwin signal handling thread from sigproc_init() + // * initialize the thread-local storage for this thread and overwrite + // the first 4K of the stack + void (*cyginit) (); +- get_symbol ("cygwin_dll_init", cyginit); ++ get_symbol ("msys_dll_init", cyginit); + (*cyginit) (); + + *out << "Loading symbols..." << endl; +@@ -212,7 +212,7 @@ cygwin::connector::~connector () + + // This should call init.cc:dll_entry() with DLL_PROCESS_DETACH. + if (!FreeLibrary (_library)) +- throw windows_error ("FreeLibrary", "cygwin1.dll"); ++ throw windows_error ("FreeLibrary", "msys-2.0.dll"); + } + catch (std::exception &x) + { +@@ -478,7 +478,7 @@ main (int argc, char *argv[]) + + std::ostringstream output; + bool verbose = false, testinterrupts = false; +- const char *dll = "cygwin1.dll"; ++ const char *dll = "msys-2.0.dll"; + + out = &output; + +diff --git a/winsup/testsuite/winsup.api/cygload.exp b/winsup/testsuite/winsup.api/cygload.exp +index a07a549..bc1ae61 100644 +--- a/winsup/testsuite/winsup.api/cygload.exp ++++ b/winsup/testsuite/winsup.api/cygload.exp +@@ -26,7 +26,7 @@ if { $rv != {0 {}} } { + set redirect_output /dev/null + } + set windows_runtime_root [exec cygpath -m $runtime_root] +- ws_spawn "./mingw-cygload.exe -cygwin $windows_runtime_root/cygwin0.dll > $redirect_output" ++ ws_spawn "./mingw-cygload.exe -cygwin $windows_runtime_root/msys0.dll > $redirect_output" + if { $rv != {0 {}} } { + verbose -log "cygload: $rv" + fail "cygload (execute)" +diff --git a/winsup/testsuite/winsup.api/cygload.h b/winsup/testsuite/winsup.api/cygload.h +index c7c5620..180a764 100644 +--- a/winsup/testsuite/winsup.api/cygload.h ++++ b/winsup/testsuite/winsup.api/cygload.h +@@ -77,7 +77,7 @@ namespace cygwin + // spawns a thread to let you receive signals from cygwin. + class connector { + public: +- connector (const char *dll = "cygwin1.dll"); ++ connector (const char *dll = "msys-2.0.dll"); + ~connector (); + + // A wrapper around GetProcAddress() for fetching symbols from the +diff --git a/winsup/testsuite/winsup.api/winsup.exp b/winsup/testsuite/winsup.api/winsup.exp +index 6390962..769b7c0 100644 +--- a/winsup/testsuite/winsup.api/winsup.exp ++++ b/winsup/testsuite/winsup.api/winsup.exp +@@ -51,7 +51,7 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.{cc + if [ file exists "$srcdir/$subdir/$basename.exp" ] then { + source "$srcdir/$subdir/$basename.exp" + } else { +- ws_spawn "$CC -nodefaultlibs -mwin32 $CFLAGS $src $add_includes $add_libs $runtime_root/binmode.o -lgcc $runtime_root/libcygwin0.a -lkernel32 -luser32 -o $base.exe" ++ ws_spawn "$CC -nodefaultlibs -mwin32 $CFLAGS $src $add_includes $add_libs $runtime_root/binmode.o -lgcc $runtime_root/libmsys0.a -lkernel32 -luser32 -o $base.exe" + if { $rv != "" } { + verbose -log "$rv" + fail "$testcase (compile)" +diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in +index fe81d87..fe69d3c 100644 +--- a/winsup/utils/Makefile.in ++++ b/winsup/utils/Makefile.in +@@ -50,7 +50,7 @@ EXEEXT_FOR_BUILD:=@EXEEXT_FOR_BUILD@ + + LDLIBS := -lnetapi32 -ladvapi32 -lkernel32 -luser32 + CYGWIN_LDFLAGS := -static -Wl,--enable-auto-import -L${WINDOWS_LIBDIR} $(LDLIBS) +-DEP_LDLIBS := $(cygwin_build)/libcygwin.a ++DEP_LDLIBS := $(cygwin_build)/libmsys-2.0.a + + MINGW_CXX := @MINGW_CXX@ + +@@ -99,8 +99,8 @@ cygcheck.exe: MINGW_LDFLAGS += ${ZLIB} -lwininet -lpsapi -lntdll + cygcheck.exe: ${CYGCHECK_OBJS} + + cygpath.o: CXXFLAGS += -fno-threadsafe-statics +-cygpath.exe: CYGWIN_LDFLAGS += -lcygwin -luserenv -lntdll +-ps.exe: CYGWIN_LDFLAGS += -lcygwin -lpsapi -lntdll ++cygpath.exe: CYGWIN_LDFLAGS += -lmsys-2.0 -luserenv -lntdll ++ps.exe: CYGWIN_LDFLAGS += -lmsys-2.0 -lpsapi -lntdll + strace.exe: MINGW_LDFLAGS += -lntdll + + ldd.exe:CYGWIN_LDFLAGS += -lpsapi +@@ -180,7 +180,7 @@ install: all + $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)/$$n; \ + done + +-$(cygwin_build)/libcygwin.a: $(cygwin_build)/Makefile ++$(cygwin_build)/libmsys-2.0.a: $(cygwin_build)/Makefile + @$(MAKE) -C $(@D) $(@F) + + .PHONY: warn_dumper +diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc +index d3c7d5d..b613f1c 100644 +--- a/winsup/utils/cygcheck.cc ++++ b/winsup/utils/cygcheck.cc +@@ -71,8 +71,7 @@ static const char *known_env_vars[] = { + "c_include_path", + "compiler_path", + "cxx_include_path", +- "cygwin", +- "cygwin32", ++ "msys", + "dejagnu", + "expect", + "gcc_default_options", +@@ -505,12 +504,12 @@ struct ImpDirectory + + static bool track_down (const char *file, const char *suffix, int lvl); + +-#define CYGPREFIX (sizeof ("%%% Cygwin ") - 1) ++#define CYGPREFIX (sizeof ("%%% Msys ") - 1) + static void + cygwin_info (HANDLE h) + { + char *buf, *bufend, *buf_start = NULL; +- const char *hello = " Cygwin DLL version info:\n"; ++ const char *hello = " Msys DLL version info:\n"; + DWORD size = GetFileSize (h, NULL); + DWORD n; + +@@ -537,7 +536,7 @@ cygwin_info (HANDLE h) + while (buf < bufend) + if ((buf = (char *) memchr (buf, '%', bufend - buf)) == NULL) + break; +- else if (strncmp ("%%% Cygwin ", buf, CYGPREFIX) != 0) ++ else if (strncmp ("%%% Msys ", buf, CYGPREFIX) != 0) + buf++; + else + { +@@ -736,7 +735,7 @@ dll_info (const char *path, HANDLE fh, int lvl, int recurse) + } + } + } +- if (strstr (path, "\\cygwin1.dll")) ++ if (strstr (path, "\\msys-2.0.dll")) + cygwin_info (fh); + } + +@@ -989,7 +988,7 @@ scan_registry (RegInfo * prev, HKEY hKey, char *name, int cygwin, bool wow64) + + char *cp; + for (cp = name; *cp; cp++) +- if (strncasecmp (cp, "Cygwin", 6) == 0) ++ if (strncasecmp (cp, "Msys", 4) == 0) + cygwin = 1; + + DWORD num_subkeys, max_subkey_len, num_values; +@@ -1250,7 +1249,7 @@ dump_sysinfo_services () + + /* inform the user if nothing found */ + if (no_services) +- puts ("No Cygwin services found.\n"); ++ puts ("No Msys services found.\n"); + } + + enum handle_reg_t +@@ -1265,10 +1264,10 @@ handle_reg_installation (handle_reg_t what) + HKEY key; + + if (what == PRINT_KEY) +- printf ("Cygwin installations found in the registry:\n"); ++ printf ("Msys installations found in the registry:\n"); + for (int i = 0; i < 2; ++i) + if (RegOpenKeyEx (i ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE, +- "SOFTWARE\\Cygwin\\Installations", 0, ++ "SOFTWARE\\Msys\\Installations", 0, + what == DELETE_KEY ? KEY_READ | KEY_WRITE : KEY_READ, + &key) + == ERROR_SUCCESS) +@@ -1290,7 +1289,7 @@ handle_reg_installation (handle_reg_t what) + if (what == PRINT_KEY) + printf (" %s Key: %s Path: %s", i ? "User: " : "System:", + name, path); +- strcat (path, "\\bin\\cygwin1.dll"); ++ strcat (path, "\\bin\\msys-2.0.dll"); + if (what == PRINT_KEY) + printf ("%s\n", access (path, F_OK) ? " (ORPHANED)" : ""); + else if (access (path, F_OK)) +@@ -1364,7 +1363,7 @@ dump_sysinfo () + _wputenv (comspec); + } + +- printf ("\nCygwin Configuration Diagnostics\n"); ++ printf ("\nMsys Configuration Diagnostics\n"); + time (&now); + printf ("Current System Time: %s\n", ctime (&now)); + +@@ -1675,7 +1674,7 @@ dump_sysinfo () + + + if (givehelp) +- printf ("Here's some environment variables that may affect cygwin:\n"); ++ printf ("Here's some environment variables that may affect msys:\n"); + for (i = 0; environ[i]; i++) + { + char *eq = strchr (environ[i], '='); +@@ -1725,7 +1724,7 @@ dump_sysinfo () + if (registry) + { + if (givehelp) +- printf ("Scanning registry for keys with 'Cygwin' in them...\n"); ++ printf ("Scanning registry for keys with 'Msys' in them...\n"); + scan_registry (0, HKEY_CURRENT_USER, + (char *) "HKEY_CURRENT_USER", 0, false); + scan_registry (0, HKEY_LOCAL_MACHINE, +@@ -1909,7 +1908,7 @@ dump_sysinfo () + printf ("\n"); + + if (givehelp) +- printf ("Looking for various Cygwin DLLs... (-v gives version info)\n"); ++ printf ("Looking for various Msys DLLs... (-v gives version info)\n"); + int cygwin_dll_count = 0; + char cygdll_path[32768]; + for (pathlike *pth = paths; pth->dir; pth++) +@@ -1926,10 +1925,10 @@ dump_sysinfo () + wcstombs (f, ffinfo.cFileName, sizeof f); + if (strcasecmp (f + strlen (f) - 4, ".dll") == 0) + { +- if (strncasecmp (f, "cyg", 3) == 0) ++ if (strncasecmp (f, "msys-", 5) == 0) + { + sprintf (tmp, "%s%s", pth->dir, f); +- if (strcasecmp (f, "cygwin1.dll") == 0) ++ if (strcasecmp (f, "msys-2.0.dll") == 0) + { + if (!cygwin_dll_count) + strcpy (cygdll_path, pth->dir); +@@ -1953,9 +1952,9 @@ dump_sysinfo () + FindClose (ff); + } + if (cygwin_dll_count > 1) +- puts ("Warning: There are multiple cygwin1.dlls on your path"); ++ puts ("Warning: There are multiple msys-2.0.dlls on your path"); + if (!cygwin_dll_count) +- puts ("Warning: cygwin1.dll not found on your path"); ++ puts ("Warning: msys-2.0.dll not found on your path"); + + dump_dodgy_apps (verbose); + +@@ -2197,8 +2196,8 @@ static char opts[] = "cdsrvkflphV"; + static void + print_version () + { +- printf ("cygcheck (cygwin) %d.%d.%d\n" +- "System Checker for Cygwin\n" ++ printf ("cygcheck (msys) %d.%d.%d\n" ++ "System Checker for Msys\n" + "Copyright (C) 1998 - %s Red Hat, Inc.\n" + "This is free software; see the source for copying conditions. There is NO\n" + "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n", +@@ -2228,7 +2227,7 @@ load_cygwin (int& argc, char **&argv) + { + HMODULE h; + +- if (!(h = LoadLibrary ("cygwin1.dll"))) ++ if (!(h = LoadLibrary ("msys-2.0.dll"))) + return; + GetModuleFileNameW (h, cygwin_dll_path, 32768); + if ((cygwin_internal = (uintptr_t (*) (int, ...)) +diff --git a/winsup/utils/ldd.cc b/winsup/utils/ldd.cc +index e4c14b4..7aa7cf8 100644 +--- a/winsup/utils/ldd.cc ++++ b/winsup/utils/ldd.cc +@@ -265,7 +265,7 @@ tocyg (wchar_t *win_fn) + return fn; + } + +-#define CYGWIN_DLL_LEN (wcslen (L"\\cygwin1.dll")) ++#define CYGWIN_DLL_LEN (wcslen (L"\\msys-2.0.dll")) + static int + print_dlls (dlls *dll, const wchar_t *dllfn, const wchar_t *process_fn) + { +diff --git a/winsup/utils/loadlib.h b/winsup/utils/loadlib.h +index 34ed127..5f18228 100644 +--- a/winsup/utils/loadlib.h ++++ b/winsup/utils/loadlib.h +@@ -15,7 +15,7 @@ + #include + + /* Load all system libs from the windows system directory by prepending the +- full path. This doesn't work for loadling cygwin1.dll. For this case, ++ full path. This doesn't work for loadling msys-2.0.dll. For this case, + instead of prepending the path, make sure that the CWD is removed from + the DLL search path, if possible (XP SP1++, Vista++). */ + static HMODULE _load_sys_library (const wchar_t *dll) __attribute__ ((used)); +@@ -47,8 +47,8 @@ _load_sys_library (const wchar_t *dll) + set_dll_directory (L""); + } + +- if (wcscmp (dll, L"cygwin1.dll") == 0) +- return LoadLibraryExW (L"cygwin1.dll", NULL, LOAD_WITH_ALTERED_SEARCH_PATH); ++ if (wcscmp (dll, L"msys-2.0.dll") == 0) ++ return LoadLibraryExW (L"msys-2.0.dll", NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + + wcscpy (dllpath, sysdir); + wcscpy (dllpath + sysdir_len, dll); +diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc +index e34741f..e4417f6 100644 +--- a/winsup/utils/path.cc ++++ b/winsup/utils/path.cc +@@ -601,14 +601,14 @@ read_mounts () + } + max_mount_entry = 0; + +- /* First fetch the cygwin1.dll path from the LoadLibrary call in load_cygwin. +- This utilizes the DLL search order to find a matching cygwin1.dll and to ++ /* First fetch the msys-2.0.dll path from the LoadLibrary call in load_cygwin. ++ This utilizes the DLL search order to find a matching msys-2.0.dll and to + compute the installation path from that DLL's path. */ + if (cygwin_dll_path[0]) + wcscpy (path, cygwin_dll_path); +- /* If we can't load cygwin1.dll, check where cygcheck is living itself and +- try to fetch installation path from here. Does cygwin1.dll exist in the +- same path? This should only kick in if the cygwin1.dll in the same path ++ /* If we can't load msys-2.0.dll, check where cygcheck is living itself and ++ try to fetch installation path from here. Does msys-2.0.dll exist in the ++ same path? This should only kick in if the msys-2.0.dll in the same path + has been made non-executable for the current user accidentally. */ + else if (!GetModuleFileNameW (NULL, path, 32768)) + return; +@@ -617,7 +617,7 @@ read_mounts () + { + if (!cygwin_dll_path[0]) + { +- wcscpy (path_end, L"\\cygwin1.dll"); ++ wcscpy (path_end, L"\\msys-2.0.dll"); + DWORD attr = GetFileAttributesW (path); + if (attr == (DWORD) -1 + || (attr & (FILE_ATTRIBUTE_DIRECTORY +diff --git a/winsup/utils/ssp.c b/winsup/utils/ssp.c +index 0bca544..cc30d53 100644 +--- a/winsup/utils/ssp.c ++++ b/winsup/utils/ssp.c +@@ -719,15 +719,15 @@ usage (FILE * stream) + "You must specify the range of memory addresses to keep track of\n" + "manually, but it's not hard to figure out what to specify. Use the\n" + "\"objdump\" program to determine the bounds of the target's \".text\"\n" +- "section. Let's say we're profiling cygwin1.dll. Make sure you've\n" ++ "section. Let's say we're profiling msys-2.0.dll. Make sure you've\n" + "built it with debug symbols (else gprof won't run) and run objdump\n" + "like this:\n" + "\n" +- " objdump -h cygwin1.dll\n" ++ " objdump -h msys-2.0.dll\n" + "\n" + "It will print a report like this:\n" + "\n" +- "cygwin1.dll: file format pei-i386\n" ++ "msys-2.0.dll: file format pei-i386\n" + "\n" + "Sections:\n" + "Idx Name Size VMA LMA File off Algn\n" +@@ -758,7 +758,7 @@ usage (FILE * stream) + "\"gmon.out\". You can turn this data file into a readable report with\n" + "gprof:\n" + "\n" +- " gprof -b cygwin1.dll\n" ++ " gprof -b msys-2.0.dll\n" + "\n" + "The \"-b\" means 'skip the help pages'. You can omit this until you're\n" + "familiar with the report layout. The gprof documentation explains\n" +diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc +index f9c6644..6d9d727 100644 +--- a/winsup/utils/strace.cc ++++ b/winsup/utils/strace.cc +@@ -284,7 +284,7 @@ load_cygwin () + if (h) + return 0; + +- if (!(h = LoadLibrary ("cygwin1.dll"))) ++ if (!(h = LoadLibrary ("msys-2.0.dll"))) + { + errno = ENOENT; + return 0; +@@ -355,14 +355,14 @@ create_child (char **argv) + make_command_line (one_line, argv); + + SetConsoleCtrlHandler (NULL, 0); +- const char *cygwin_env = getenv ("CYGWIN"); ++ const char *cygwin_env = getenv ("MSYS"); + const char *space; + if (cygwin_env) + space = " "; + else + space = cygwin_env = ""; +- char *newenv = (char *) malloc (sizeof ("CYGWIN=noglob") + strlen (space) + strlen (cygwin_env)); +- sprintf (newenv, "CYGWIN=noglob%s%s", space, cygwin_env); ++ char *newenv = (char *) malloc (sizeof ("MSYS=noglob") + strlen (space) + strlen (cygwin_env)); ++ sprintf (newenv, "MSYS=noglob%s%s", space, cygwin_env); + _putenv (newenv); + ret = CreateProcess (0, one_line.buf, /* command line */ + NULL, /* Security */ +@@ -783,7 +783,7 @@ dotoggle (pid_t pid) + child_pid = (DWORD) cygwin_internal (CW_CYGWIN_PID_TO_WINPID, pid); + if (!child_pid) + { +- warn (0, "no such cygwin pid - %d", pid); ++ warn (0, "no such msys pid - %d", pid); + child_pid = pid; + } + if (cygwin_internal (CW_STRACE_TOGGLE, child_pid)) +-- +2.8.0 + diff --git a/msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch b/msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch new file mode 100644 index 00000000000..46e57658fe0 --- /dev/null +++ b/msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch @@ -0,0 +1,1068 @@ +From 3767f9d4f1a8be2f35f0133407f8b71212a22865 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Thu, 12 Mar 2015 13:58:27 +0300 +Subject: [PATCH 03/16] Add functionality for converting UNIX paths in + arguments and environment variables to Windows form for native Win32 + applications. + +--- + winsup/cygwin/Makefile.in | 1 + + winsup/cygwin/environ.cc | 16 +- + winsup/cygwin/environ.h | 2 +- + winsup/cygwin/external.cc | 2 +- + winsup/cygwin/include/sys/cygwin.h | 6 + + winsup/cygwin/msys2_path_conv.cc | 619 +++++++++++++++++++++++++++++++++++++ + winsup/cygwin/msys2_path_conv.h | 146 +++++++++ + winsup/cygwin/path.cc | 64 ++++ + winsup/cygwin/spawn.cc | 48 ++- + winsup/cygwin/winf.h | 4 + + 10 files changed, 899 insertions(+), 9 deletions(-) + create mode 100644 winsup/cygwin/msys2_path_conv.cc + create mode 100644 winsup/cygwin/msys2_path_conv.h + +diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in +index 2473d8a..0a8895e 100644 +--- a/winsup/cygwin/Makefile.in ++++ b/winsup/cygwin/Makefile.in +@@ -334,6 +334,7 @@ DLL_OFILES:= \ + mktemp.o \ + mmap.o \ + msg.o \ ++ msys2_path_conv.o \ + mount.o \ + net.o \ + netdb.o \ +diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc +index b155311..3629d48 100644 +--- a/winsup/cygwin/environ.cc ++++ b/winsup/cygwin/environ.cc +@@ -1016,7 +1016,7 @@ env_compare (const void *key, const void *memb) + to the child. */ + char ** __reg3 + build_env (const char * const *envp, PWCHAR &envblock, int &envc, +- bool no_envblock, HANDLE new_token) ++ bool no_envblock, HANDLE new_token, bool keep_posix) + { + PWCHAR cwinenv = NULL; + size_t winnum = 0; +@@ -1104,6 +1104,11 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, + for (srcp = envp, dstp = newenv, pass_dstp = pass_env; *srcp; srcp++) + { + bool calc_tl = !no_envblock; ++#ifdef __MSYS__ ++ /* Don't pass timezone environment to non-msys applications */ ++ if (!keep_posix && ascii_strncasematch(*srcp, "TZ=", 3)) ++ goto next1; ++#endif + /* Look for entries that require special attention */ + for (unsigned i = 0; i < SPENVS_SIZE; i++) + if (!saw_spenv[i] && (*dstp = spenvs[i].retrieve (no_envblock, *srcp))) +@@ -1224,6 +1229,15 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, + saw_PATH = true; + } + } ++#ifdef __MSYS__ ++ else if (!keep_posix) { ++ char *win_arg = arg_heuristic(*srcp); ++ debug_printf("WIN32_PATH is %s", win_arg); ++ p = cstrdup1(win_arg); ++ if (win_arg != *srcp) ++ free (win_arg); ++ } ++#endif + else + p = *srcp; /* Don't worry about it */ + +diff --git a/winsup/cygwin/environ.h b/winsup/cygwin/environ.h +index 5048fcd..b549710 100644 +--- a/winsup/cygwin/environ.h ++++ b/winsup/cygwin/environ.h +@@ -45,6 +45,6 @@ extern "C" char **__cygwin_environ, ***main_environ; + extern "C" char __stdcall **cur_environ (); + #endif + char ** __reg3 build_env (const char * const *envp, PWCHAR &envblock, +- int &envc, bool need_envblock, HANDLE new_token); ++ int &envc, bool need_envblock, HANDLE new_token, bool keep_posix); + + #define ENV_CVT -1 +diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc +index 02335eb..eea2fb4 100644 +--- a/winsup/cygwin/external.cc ++++ b/winsup/cygwin/external.cc +@@ -140,7 +140,7 @@ create_winenv (const char * const *env) + int unused_envc; + PWCHAR envblock = NULL; + char **envp = build_env (env ?: cur_environ (), envblock, unused_envc, false, +- NULL); ++ NULL, true); + PWCHAR p = envblock; + + if (envp) +diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h +index e663690..89e971f 100644 +--- a/winsup/cygwin/include/sys/cygwin.h ++++ b/winsup/cygwin/include/sys/cygwin.h +@@ -86,6 +86,12 @@ extern ssize_t cygwin_conv_path_list (cygwin_conv_path_t what, const void *from, + to one of the above values, or to ENOMEM if malloc fails. */ + extern void *cygwin_create_path (cygwin_conv_path_t what, const void *from); + ++extern char * arg_heuristic_with_exclusions (char const * const arg, ++ char const * exclusions, ++ size_t exclusions_count); ++ ++extern char * arg_heuristic (char const * const); ++ + extern pid_t cygwin_winpid_to_pid (int); + extern int cygwin_posix_path_list_p (const char *); + extern void cygwin_split_path (const char *, char *, char *); +diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc +new file mode 100644 +index 0000000..74ebd2e +--- /dev/null ++++ b/winsup/cygwin/msys2_path_conv.cc +@@ -0,0 +1,619 @@ ++/* ++ The MSYS2 Path conversion source code is licensed under: ++ ++ CC0 1.0 Universal ++ ++ Official translations of this legal tool are available ++ ++ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE ++ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ++ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS ++ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES ++ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS ++ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ++ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED ++ HEREUNDER. ++ ++ Statement of Purpose ++ ++ The laws of most jurisdictions throughout the world automatically ++ confer exclusive Copyright and Related Rights (defined below) upon the ++ creator and subsequent owner(s) (each and all, an "owner") of an ++ original work of authorship and/or a database (each, a "Work"). ++ ++ Certain owners wish to permanently relinquish those rights to a Work ++ for the purpose of contributing to a commons of creative, cultural and ++ scientific works ("Commons") that the public can reliably and without ++ fear of later claims of infringement build upon, modify, incorporate ++ in other works, reuse and redistribute as freely as possible in any ++ form whatsoever and for any purposes, including without limitation ++ commercial purposes. These owners may contribute to the Commons to ++ promote the ideal of a free culture and the further production of ++ creative, cultural and scientific works, or to gain reputation or ++ greater distribution for their Work in part through the use and ++ efforts of others. ++ ++ For these and/or other purposes and motivations, and without any ++ expectation of additional consideration or compensation, the person ++ associating CC0 with a Work (the "Affirmer"), to the extent that he or ++ she is an owner of Copyright and Related Rights in the Work, ++ voluntarily elects to apply CC0 to the Work and publicly distribute ++ the Work under its terms, with knowledge of his or her Copyright and ++ Related Rights in the Work and the meaning and intended legal effect ++ of CC0 on those rights. ++ ++ 1. Copyright and Related Rights. A Work made available under CC0 may ++ be protected by copyright and related or neighboring rights ++ ("Copyright and Related Rights"). Copyright and Related Rights ++ include, but are not limited to, the following: ++ ++ the right to reproduce, adapt, distribute, perform, display, ++ communicate, and translate a Work; ++ moral rights retained by the original author(s) and/or performer(s); ++ publicity and privacy rights pertaining to a person's image or ++ likeness depicted in a Work; ++ rights protecting against unfair competition in regards to a Work, ++ subject to the limitations in paragraph 4(a), below; ++ rights protecting the extraction, dissemination, use and reuse of data ++ in a Work; ++ database rights (such as those arising under Directive 96/9/EC of the ++ European Parliament and of the Council of 11 March 1996 on the legal ++ protection of databases, and under any national implementation ++ thereof, including any amended or successor version of such ++ directive); and ++ other similar, equivalent or corresponding rights throughout the world ++ based on applicable law or treaty, and any national implementations ++ thereof. ++ ++ 2. Waiver. To the greatest extent permitted by, but not in ++ contravention of, applicable law, Affirmer hereby overtly, fully, ++ permanently, irrevocably and unconditionally waives, abandons, and ++ surrenders all of Affirmer's Copyright and Related Rights and ++ associated claims and causes of action, whether now known or unknown ++ (including existing as well as future claims and causes of action), in ++ the Work (i) in all territories worldwide, (ii) for the maximum ++ duration provided by applicable law or treaty (including future time ++ extensions), (iii) in any current or future medium and for any number ++ of copies, and (iv) for any purpose whatsoever, including without ++ limitation commercial, advertising or promotional purposes (the ++ "Waiver"). Affirmer makes the Waiver for the benefit of each member of ++ the public at large and to the detriment of Affirmer's heirs and ++ successors, fully intending that such Waiver shall not be subject to ++ revocation, rescission, cancellation, termination, or any other legal ++ or equitable action to disrupt the quiet enjoyment of the Work by the ++ public as contemplated by Affirmer's express Statement of Purpose. ++ ++ 3. Public License Fallback. Should any part of the Waiver for any ++ reason be judged legally invalid or ineffective under applicable law, ++ then the Waiver shall be preserved to the maximum extent permitted ++ taking into account Affirmer's express Statement of Purpose. In ++ addition, to the extent the Waiver is so judged Affirmer hereby grants ++ to each affected person a royalty-free, non transferable, non ++ sublicensable, non exclusive, irrevocable and unconditional license to ++ exercise Affirmer's Copyright and Related Rights in the Work (i) in ++ all territories worldwide, (ii) for the maximum duration provided by ++ applicable law or treaty (including future time extensions), (iii) in ++ any current or future medium and for any number of copies, and (iv) ++ for any purpose whatsoever, including without limitation commercial, ++ advertising or promotional purposes (the "License"). The License shall ++ be deemed effective as of the date CC0 was applied by Affirmer to the ++ Work. Should any part of the License for any reason be judged legally ++ invalid or ineffective under applicable law, such partial invalidity ++ or ineffectiveness shall not invalidate the remainder of the License, ++ and in such case Affirmer hereby affirms that he or she will not (i) ++ exercise any of his or her remaining Copyright and Related Rights in ++ the Work or (ii) assert any associated claims and causes of action ++ with respect to the Work, in either case contrary to Affirmer's ++ express Statement of Purpose. ++ ++ 4. Limitations and Disclaimers. ++ ++ No trademark or patent rights held by Affirmer are waived, abandoned, ++ surrendered, licensed or otherwise affected by this document. ++ Affirmer offers the Work as-is and makes no representations or ++ warranties of any kind concerning the Work, express, implied, ++ statutory or otherwise, including without limitation warranties of ++ title, merchantability, fitness for a particular purpose, non ++ infringement, or the absence of latent or other defects, accuracy, or ++ the present or absence of errors, whether or not discoverable, all to ++ the greatest extent permissible under applicable law. ++ Affirmer disclaims responsibility for clearing rights of other persons ++ that may apply to the Work or any use thereof, including without ++ limitation any person's Copyright and Related Rights in the Work. ++ Further, Affirmer disclaims responsibility for obtaining any necessary ++ consents, permissions or other rights required for any use of the ++ Work. ++ Affirmer understands and acknowledges that Creative Commons is not a ++ party to this document and has no duty or obligation with respect to ++ this CC0 or use of the Work. ++ ++ Contributions thanks to: ++ niXman ++ Ely Arzhannikov ++ Alexey Pavlov ++ Ray Donnelly ++ ++*/ ++ ++#include "winsup.h" ++#include "miscfuncs.h" ++#include ++#include ++#include ++#include ++#include ++#include "cygerrno.h" ++#include "security.h" ++#include "path.h" ++#include "fhandler.h" ++#include "dtable.h" ++#include "cygheap.h" ++#include "shared_info.h" ++#include "cygtls.h" ++#include "tls_pbuf.h" ++#include "environ.h" ++#include ++#include ++#include ++#include ++ ++#include "msys2_path_conv.h" ++ ++typedef enum PATH_TYPE_E { ++ NONE = 0, ++ SIMPLE_WINDOWS_PATH, ++ ESCAPE_WINDOWS_PATH, ++ WINDOWS_PATH_LIST, ++ UNC, ++ ESCAPED_PATH, ++ ROOTED_PATH, ++ POSIX_PATH_LIST, ++ RELATIVE_PATH, ++ URL ++} path_type; ++ ++int is_special_posix_path(const char* from, const char* to, char** dst, const char* dstend); ++void posix_to_win32_path(const char* from, const char* to, char** dst, const char* dstend); ++ ++ ++path_type find_path_start_and_type(const char** src, int recurse, const char* end); ++void copy_to_dst(const char* from, const char* to, char** dst, const char* dstend); ++void convert_path(const char** from, const char* to, path_type type, char** dst, const char* dstend); ++ ++//Transformations ++//SIMPLE_WINDOWS_PATH converter. Copy as is. Hold C:\Something\like\this ++void swp_convert(const char** from, const char* to, char** dst, const char* dstend); ++//ESCAPE_WINDOWS_PATH converter. Turn backslashes to slashes and skip first /. Hold /C:\Somethind\like\this ++void ewp_convert(const char** from, const char* to, char** dst, const char* dstend); ++//WINDOWS_PATH_LIST converter. Copy as is. Hold /something/like/this; ++void wpl_convert(const char** from, const char* to, char** dst, const char* dstend); ++//UNC convert converter. Copy as is. Hold //somethig/like/this ++void unc_convert(const char** from, const char* to, char** dst, const char* dstend); ++//ESCAPED_PATH converter. Turn backslashes to slashes and skip first /. Hold //something\like\this ++void ep_convert(const char** from, const char* to, char** dst, const char* dstend); ++//ROOTED_PATH converter. Prepend root dir to front. Hold /something/like/this ++void rp_convert(const char** from, const char* to, char** dst, const char* dstend); ++//URL converter. Copy as is. ++void url_convert(const char** from, const char* to, char** dst, const char* dstend); ++//POSIX_PATH_LIST. Hold x::x/y:z ++void ppl_convert(const char** from, const char* to, char** dst, const char* dstend); ++ ++ ++void find_end_of_posix_list(const char** to, int* in_string) { ++ for (; **to != '\0' && (in_string ? (**to != *in_string) : **to != ' '); ++*to) { ++ } ++ ++ if (**to == *in_string) { ++ *in_string = 0; ++ } ++} ++ ++void find_end_of_rooted_path(const char** from, const char** to, int* in_string) { ++ for (const char* it = *from; *it != '\0' && it != *to; ++it) ++ if (*it == '.' && *(it + 1) == '.' && *(it - 1) == '/') { ++ *to = it - 1; ++ return; ++ } ++ ++ for (; **to != '\0'; ++*to) { ++ if (*in_string == 0 && **to == ' ') { ++ return; ++ } ++ ++ if (**to == *in_string) { ++ *in_string = 0; ++ return; ++ } ++ ++ if (**to == '/') { ++ if (*(*to - 1) == ' ') { ++ *to -= 1; ++ return; ++ } ++ } ++ } ++} ++ ++void sub_convert(const char** from, const char** to, char** dst, const char* dstend, int* in_string) { ++ const char* copy_from = *from; ++ path_type type = find_path_start_and_type(from, false, *to); ++ ++ if (type == POSIX_PATH_LIST) { ++ find_end_of_posix_list(to, in_string); ++ } ++ ++ if (type == ROOTED_PATH) { ++ find_end_of_rooted_path(from, to, in_string); ++ } ++ ++ copy_to_dst(copy_from, *from, dst, dstend); ++ ++ if (type != NONE) { ++ convert_path(from, *to, type, dst, dstend); ++ } ++ ++ if (*dst != dstend) { ++ **dst = **to; ++ *dst += 1; ++ } ++} ++ ++const char* convert(char *dst, size_t dstlen, const char *src) { ++ if (dst == NULL || dstlen == 0 || src == NULL) { ++ return dst; ++ } ++ ++ int need_convert = false; ++ for (const char* it = src; *it != '\0'; ++it) { ++ if (*it == '\\' || *it == '/') { ++ need_convert = true; ++ break; ++ } ++ if (isspace(*it)) { ++ need_convert = false; ++ break; ++ } ++ } ++ ++ char* dstit = dst; ++ char* dstend = dst + dstlen; ++ if (!need_convert) { ++ copy_to_dst(src, NULL, &dstit, dstend); ++ *dstit = '\0'; ++ return dst; ++ } ++ ++ const char* srcit = src; ++ const char* srcbeg = src; ++ ++ int in_string = false; ++ ++ for (; *srcit != '\0'; ++srcit) { ++ if (*srcit == '\'' || *srcit == '"') { ++ if (in_string == *srcit) { ++ if (*(srcit + 1) != in_string) { ++ in_string = 0; ++ } ++ } else { ++ in_string = *srcit; ++ } ++ continue; ++ } ++ ++ if (isspace(*srcit)) { ++ //sub_convert(&srcbeg, &srcit, &dstit, dstend, &in_string); ++ //srcbeg = srcit + 1; ++ break; ++ } ++ } ++ ++ sub_convert(&srcbeg, &srcit, &dstit, dstend, &in_string); ++ srcbeg = srcit + 1; ++ for (; *srcit != '\0'; ++srcit) { ++ continue; ++ } ++ copy_to_dst(srcbeg, srcit, &dstit, dstend); ++ *dstit = '\0'; ++ ++ /*if (dstit - dst < 2) { ++ dstit = dst; ++ copy_to_dst(src, NULL, &dstit, dstend); ++ *dstit = '\0'; ++ }*/ ++ ++ return dst; ++} ++ ++void copy_to_dst(const char* from, const char* to, char** dst, const char* dstend) { ++ for (; (*from != '\0') && (from != to) && (*dst != dstend); ++from, ++(*dst)) { ++ **dst = *from; ++ } ++} ++ ++const char** move(const char** p, int count) { ++ *p += count; ++ return p; ++} ++ ++path_type find_path_start_and_type(const char** src, int recurse, const char* end) { ++ const char* it = *src; ++ ++ if (*it == '\0' || it == end) return NONE; ++ ++ if (!isalnum(*it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') { ++ return find_path_start_and_type(move(src, 1), true, end); ++ } ++ ++ path_type result = NONE; ++ ++ if (isalpha(*it) && *(it + 1) == ':') { ++ if (*(it + 2) == '\\') { ++ return SIMPLE_WINDOWS_PATH; ++ } ++ ++ if (*(it + 2) == '/' && memchr(it + 2, ':', end - (it + 2)) == NULL) { ++ return SIMPLE_WINDOWS_PATH; ++ } ++ ++ if (*(it + 2) == '/' && memchr(it + 2, ';', end - (it + 2))) { ++ return WINDOWS_PATH_LIST; ++ } ++ } ++ ++ if (*it == '.' && (*(it + 1) == '.' || *(it + 1) == '/') && memchr(it + 2, ':', end - (it + 2)) == NULL) { ++ return RELATIVE_PATH; ++ } ++ ++ if (*it == '/') { ++ it += 1; ++ ++ if (isalpha(*it) && *(it + 1) == ':') { ++ return ESCAPE_WINDOWS_PATH; ++ } ++ ++ if (*it == '.' && *(it + 1) == '.') { ++ return SIMPLE_WINDOWS_PATH; ++ } ++ ++ if (*it == '/') { ++ it += 1; ++ switch(*it) { ++ case ':': return URL; ++ case '/': return ESCAPED_PATH; ++ } ++ if (memchr(it, '/', end - it)) ++ return UNC; ++ else ++ return ESCAPED_PATH; ++ } ++ ++ for (; *it != '\0' && it != end; ++it) { ++ switch(*it) { ++ case ':': {char ch = *(it + 1); if (ch == '/' || ch == ':' || ch == '.') return POSIX_PATH_LIST;} ++ case ';': return WINDOWS_PATH_LIST; ++ } ++ } ++ ++ if (result != NONE) { ++ return result; ++ } ++ ++ return ROOTED_PATH; ++ } ++ ++ int starts_with_minus = 0; ++ int starts_with_minus_alpha = 0; ++ if (*it == '-') { ++ starts_with_minus = 1; ++ it += 1; ++ if (isalpha(*it)) { ++ it += 1; ++ starts_with_minus_alpha = 1; ++ } ++ } ++ ++ for (const char* it2 = it; *it2 != '\0' && it2 != end; ++it2) { ++ char ch = *it2; ++ if (starts_with_minus_alpha) { ++ if (isalpha(ch) && (*(it2+1) == ':') && (*(it2+2) == '/')) { ++ return SIMPLE_WINDOWS_PATH; ++ } ++ if (ch == '/'&& memchr(it2, ',', end - it) == NULL) { ++ *src = it2; ++ return find_path_start_and_type(src, true, end); ++ } ++ starts_with_minus_alpha = 0; ++ } ++ if (ch == '\'' || ch == '"') ++ starts_with_minus = false; ++ if ((ch == '=') || (ch == ':' && starts_with_minus) || ((ch == '\'' || ch == '"') && result == NONE)) { ++ *src = it2 + 1; ++ return find_path_start_and_type(src, true, end); ++ } ++ ++ if (ch == ',' && starts_with_minus) { ++ *src = it2 + 1; ++ return find_path_start_and_type(src, true, end); ++ } ++ ++ if (ch == ':') { ++ it2 += 1; ++ ch = *it2; ++ if (ch == '/' || ch == ':' || ch == '.') { ++ if (ch == '/' && *(it2 + 1) == '/') { ++ return URL; ++ } else { ++ return POSIX_PATH_LIST; ++ } ++ } else if (memchr(it2, '=', end - it) == NULL) { ++ return SIMPLE_WINDOWS_PATH; ++ } ++ } ++ } ++ ++ if (result != NONE) { ++ *src = it; ++ return result; ++ } ++ ++ return SIMPLE_WINDOWS_PATH; ++} ++ ++void convert_path(const char** from, const char* to, path_type type, char** dst, const char* dstend) { ++ switch(type) { ++ case SIMPLE_WINDOWS_PATH: swp_convert(from, to, dst, dstend); break; ++ case ESCAPE_WINDOWS_PATH: ewp_convert(from, to, dst, dstend); break; ++ case WINDOWS_PATH_LIST: wpl_convert(from, to, dst, dstend); break; ++ case RELATIVE_PATH: swp_convert(from, to, dst, dstend); break; ++ case UNC: unc_convert(from, to, dst, dstend); break; ++ case ESCAPED_PATH: ep_convert(from, to, dst, dstend); break; ++ case ROOTED_PATH: rp_convert(from, to, dst, dstend); break; ++ case URL: url_convert(from, to, dst, dstend); break; ++ case POSIX_PATH_LIST: ppl_convert(from, to, dst, dstend); break; ++ case NONE: // prevent warnings; ++ default: ++ return; ++ } ++} ++ ++void swp_convert(const char** from, const char* to, char** dst, const char* dstend) { ++ copy_to_dst(*from, to, dst, dstend); ++} ++ ++void ewp_convert(const char** from, const char* to, char** dst, const char* dstend) { ++ *from += 1; ++ unc_convert(from, to, dst, dstend); ++} ++ ++void wpl_convert(const char** from, const char* to, char** dst, const char* dstend) { ++ swp_convert(from, to, dst, dstend); ++} ++ ++void unc_convert(const char** from, const char* to, char** dst, const char* dstend) { ++ const char* it = *from; ++ for (; (*it != '\0' && it != to) && (*dst != dstend); ++it, ++(*dst)) { ++ if (*it == '\\') { ++ **dst = '/'; ++ } else { ++ **dst = *it; ++ } ++ } ++} ++ ++void ep_convert(const char** from, const char* to, char** dst, const char* dstend) { ++ ewp_convert(from, to, dst, dstend); ++} ++ ++void rp_convert(const char** from, const char* to, char** dst, const char* dstend) { ++ const char* it = *from; ++ const char* real_to = to; ++ ++ if (*real_to == '\0') { ++ real_to -= 1; ++ if (*real_to != '\'' && *real_to != '"') { ++ real_to += 1; ++ } ++ } ++ ++ if (!is_special_posix_path(*from, real_to, dst, dstend)) { ++ posix_to_win32_path(it, real_to, dst, dstend); ++ } ++ ++ if (real_to != to) { ++ **dst = *real_to; ++ *dst += 1; ++ } ++} ++ ++void url_convert(const char** from, const char* to, char** dst, const char* dstend) { ++ unc_convert(from, to, dst, dstend); ++} ++ ++void subp_convert(const char** from, const char* end, int is_url, char** dst, const char* dstend) { ++ const char* begin = *from; ++ path_type type = find_path_start_and_type(from, 0, end); ++ copy_to_dst(begin, *from, dst, dstend); ++ ++ if (type == NONE) { ++ return; ++ } ++ ++ char* start = *dst; ++ convert_path(from, end, type, dst, dstend); ++ ++ if (!is_url) { ++ for (; start != *dst; ++start) { ++ if (*start == '/') { ++ *start = '\\'; ++ } ++ } ++ } ++} ++ ++void ppl_convert(const char** from, const char* to, char** dst, const char* dstend) { ++ const char* it = *from; ++ const char* beg = it; ++ int prev_was_simc = 0; ++ int is_url = 0; ++ for (; (*it != '\0' && it != to) && (*dst != dstend); ++it) { ++ if (*it == ':') { ++ if (prev_was_simc) { ++ continue; ++ } ++ if (*(it + 1) == '/' && *(it + 2) == '/') { ++ is_url = 1; ++ continue; ++ } ++ prev_was_simc = 1; ++ subp_convert(&beg, it, is_url, dst, dstend); ++ is_url = 0; ++ ++ **dst = ';'; ++ *dst += 1; ++ } ++ ++ if (*it != ':' && prev_was_simc) { ++ prev_was_simc = 0; ++ beg = it; ++ } ++ } ++ ++ if (!prev_was_simc) { ++ subp_convert(&beg, it, is_url, dst, dstend); ++ } else { ++ *dst -= 1; ++ } ++} ++ ++int is_special_posix_path(const char* from, const char* to, char** dst, const char* dstend) { ++ const char dev_null[] = "/dev/null"; ++ ++ if ((to - from) == (sizeof(dev_null) - 1) && strncmp(from, "/dev/null", to - from) == 0) { ++ copy_to_dst("nul", NULL, dst, dstend); ++ return true; ++ } ++ return false; ++} ++ ++void posix_to_win32_path(const char* from, const char* to, char** dst, const char* dstend) { ++ if ( from != to ) { ++ tmp_pathbuf tp; ++ char *one_path = tp.c_get(); ++ strncpy(one_path, from, to-from); ++ one_path[to-from] = '\0'; ++ ++ path_conv conv (one_path, 0); ++ if (conv.error) ++ { ++ set_errno(conv.error); ++ copy_to_dst(one_path, NULL, dst, dstend); ++ } else { ++ char* win32_path = tp.c_get(); ++ stpcpy (win32_path, conv.get_win32 ()); ++ for (; (*win32_path != '\0') && (*dst != dstend); ++win32_path, ++(*dst)) { ++ **dst = (*win32_path == '\\') ? '/' : *win32_path; ++ } ++ } ++ } ++} ++ +diff --git a/winsup/cygwin/msys2_path_conv.h b/winsup/cygwin/msys2_path_conv.h +new file mode 100644 +index 0000000..e1e5e87 +--- /dev/null ++++ b/winsup/cygwin/msys2_path_conv.h +@@ -0,0 +1,146 @@ ++/* ++ The MSYS2 Path conversion source code is licensed under: ++ ++ CC0 1.0 Universal ++ ++ Official translations of this legal tool are available ++ ++ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE ++ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ++ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS ++ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES ++ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS ++ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ++ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED ++ HEREUNDER. ++ ++ Statement of Purpose ++ ++ The laws of most jurisdictions throughout the world automatically ++ confer exclusive Copyright and Related Rights (defined below) upon the ++ creator and subsequent owner(s) (each and all, an "owner") of an ++ original work of authorship and/or a database (each, a "Work"). ++ ++ Certain owners wish to permanently relinquish those rights to a Work ++ for the purpose of contributing to a commons of creative, cultural and ++ scientific works ("Commons") that the public can reliably and without ++ fear of later claims of infringement build upon, modify, incorporate ++ in other works, reuse and redistribute as freely as possible in any ++ form whatsoever and for any purposes, including without limitation ++ commercial purposes. These owners may contribute to the Commons to ++ promote the ideal of a free culture and the further production of ++ creative, cultural and scientific works, or to gain reputation or ++ greater distribution for their Work in part through the use and ++ efforts of others. ++ ++ For these and/or other purposes and motivations, and without any ++ expectation of additional consideration or compensation, the person ++ associating CC0 with a Work (the "Affirmer"), to the extent that he or ++ she is an owner of Copyright and Related Rights in the Work, ++ voluntarily elects to apply CC0 to the Work and publicly distribute ++ the Work under its terms, with knowledge of his or her Copyright and ++ Related Rights in the Work and the meaning and intended legal effect ++ of CC0 on those rights. ++ ++ 1. Copyright and Related Rights. A Work made available under CC0 may ++ be protected by copyright and related or neighboring rights ++ ("Copyright and Related Rights"). Copyright and Related Rights ++ include, but are not limited to, the following: ++ ++ the right to reproduce, adapt, distribute, perform, display, ++ communicate, and translate a Work; ++ moral rights retained by the original author(s) and/or performer(s); ++ publicity and privacy rights pertaining to a person's image or ++ likeness depicted in a Work; ++ rights protecting against unfair competition in regards to a Work, ++ subject to the limitations in paragraph 4(a), below; ++ rights protecting the extraction, dissemination, use and reuse of data ++ in a Work; ++ database rights (such as those arising under Directive 96/9/EC of the ++ European Parliament and of the Council of 11 March 1996 on the legal ++ protection of databases, and under any national implementation ++ thereof, including any amended or successor version of such ++ directive); and ++ other similar, equivalent or corresponding rights throughout the world ++ based on applicable law or treaty, and any national implementations ++ thereof. ++ ++ 2. Waiver. To the greatest extent permitted by, but not in ++ contravention of, applicable law, Affirmer hereby overtly, fully, ++ permanently, irrevocably and unconditionally waives, abandons, and ++ surrenders all of Affirmer's Copyright and Related Rights and ++ associated claims and causes of action, whether now known or unknown ++ (including existing as well as future claims and causes of action), in ++ the Work (i) in all territories worldwide, (ii) for the maximum ++ duration provided by applicable law or treaty (including future time ++ extensions), (iii) in any current or future medium and for any number ++ of copies, and (iv) for any purpose whatsoever, including without ++ limitation commercial, advertising or promotional purposes (the ++ "Waiver"). Affirmer makes the Waiver for the benefit of each member of ++ the public at large and to the detriment of Affirmer's heirs and ++ successors, fully intending that such Waiver shall not be subject to ++ revocation, rescission, cancellation, termination, or any other legal ++ or equitable action to disrupt the quiet enjoyment of the Work by the ++ public as contemplated by Affirmer's express Statement of Purpose. ++ ++ 3. Public License Fallback. Should any part of the Waiver for any ++ reason be judged legally invalid or ineffective under applicable law, ++ then the Waiver shall be preserved to the maximum extent permitted ++ taking into account Affirmer's express Statement of Purpose. In ++ addition, to the extent the Waiver is so judged Affirmer hereby grants ++ to each affected person a royalty-free, non transferable, non ++ sublicensable, non exclusive, irrevocable and unconditional license to ++ exercise Affirmer's Copyright and Related Rights in the Work (i) in ++ all territories worldwide, (ii) for the maximum duration provided by ++ applicable law or treaty (including future time extensions), (iii) in ++ any current or future medium and for any number of copies, and (iv) ++ for any purpose whatsoever, including without limitation commercial, ++ advertising or promotional purposes (the "License"). The License shall ++ be deemed effective as of the date CC0 was applied by Affirmer to the ++ Work. Should any part of the License for any reason be judged legally ++ invalid or ineffective under applicable law, such partial invalidity ++ or ineffectiveness shall not invalidate the remainder of the License, ++ and in such case Affirmer hereby affirms that he or she will not (i) ++ exercise any of his or her remaining Copyright and Related Rights in ++ the Work or (ii) assert any associated claims and causes of action ++ with respect to the Work, in either case contrary to Affirmer's ++ express Statement of Purpose. ++ ++ 4. Limitations and Disclaimers. ++ ++ No trademark or patent rights held by Affirmer are waived, abandoned, ++ surrendered, licensed or otherwise affected by this document. ++ Affirmer offers the Work as-is and makes no representations or ++ warranties of any kind concerning the Work, express, implied, ++ statutory or otherwise, including without limitation warranties of ++ title, merchantability, fitness for a particular purpose, non ++ infringement, or the absence of latent or other defects, accuracy, or ++ the present or absence of errors, whether or not discoverable, all to ++ the greatest extent permissible under applicable law. ++ Affirmer disclaims responsibility for clearing rights of other persons ++ that may apply to the Work or any use thereof, including without ++ limitation any person's Copyright and Related Rights in the Work. ++ Further, Affirmer disclaims responsibility for obtaining any necessary ++ consents, permissions or other rights required for any use of the ++ Work. ++ Affirmer understands and acknowledges that Creative Commons is not a ++ party to this document and has no duty or obligation with respect to ++ this CC0 or use of the Work. ++ ++ Contributions thanks to: ++ niXman ++ Ely Arzhannikov ++ Alexey Pavlov ++ Ray Donnelly ++ ++*/ ++ ++#ifndef PATH_CONV_H_DB4IQBH3 ++#define PATH_CONV_H_DB4IQBH3 ++ ++#include ++ ++const char* convert(char *dst, size_t dstlen, const char *src); ++ ++#endif /* end of include guard: PATH_CONV_H_DB4IQBH3 */ ++ +diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc +index 250871d..4a47bb3 100644 +--- a/winsup/cygwin/path.cc ++++ b/winsup/cygwin/path.cc +@@ -71,6 +71,7 @@ + #include "cygtls.h" + #include "tls_pbuf.h" + #include "environ.h" ++#include "msys2_path_conv.h" + #include + #include + #include +@@ -3289,6 +3290,69 @@ fchdir (int fd) + return res; + } + ++// ++// Important: If returned pointer == arg, then this function ++// did not malloc that pointer; otherwise free it. ++// ++extern "C" char * ++arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, size_t exclusions_count) ++{ ++ char *arg_result; ++ ++ // Must return something .. ++ size_t arglen = (arg ? strlen (arg): 0); ++ ++ if (arglen == 0 || !arg) ++ { ++ arg_result = (char *)malloc (sizeof (char)); ++ arg_result[0] = '\0'; ++ return arg_result; ++ } ++ ++ debug_printf("Input value: (%s)", arg); ++ for (size_t excl = 0; excl < exclusions_count; ++excl) ++ { ++ /* Since we've got regex linked we should maybe switch to that, but ++ running regexes for every argument could be too slow. */ ++ if ( strcmp (exclusions, "*") == 0 || strstr (arg, exclusions) == arg ) ++ return (char*)arg; ++ exclusions += strlen (exclusions) + 1; ++ } ++ ++ size_t stack_len = arglen + MAX_PATH; ++ char * stack_path = (char *)malloc (stack_len); ++ memset (stack_path, 0, MAX_PATH); ++ if (!stack_len) ++ { ++ debug_printf ("out of stack space?"); ++ return (char *)arg; ++ } ++ convert (stack_path, stack_len - 1, arg); ++ debug_printf ("convert()'ed: %s (length %d)\n.....->: %s", arg, arglen, stack_path); ++ // Don't allocate memory if no conversion happened. ++ if (!strcmp (arg, stack_path)) ++ { ++ return ((char *)arg); ++ } ++ arg_result = (char *)malloc (strlen (stack_path)+1); ++ strcpy (arg_result, stack_path); ++ // Windows doesn't like empty entries in PATH env. variables (;;) ++ char* semisemi = strstr(arg_result, ";;"); ++ while (semisemi) ++ { ++ memmove(semisemi, semisemi+1, strlen(semisemi)); ++ semisemi = strstr(semisemi, ";;"); ++ } ++ return arg_result; ++} ++ ++extern "C" char * ++arg_heuristic (char const * const arg) ++{ ++ return arg_heuristic_with_exclusions (arg, NULL, 0); ++} ++ ++ + /******************** Exported Path Routines *********************/ + + /* Cover functions to the path conversion routines. +diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc +index 9871bb5..7c1cb86 100644 +--- a/winsup/cygwin/spawn.cc ++++ b/winsup/cygwin/spawn.cc +@@ -264,6 +264,27 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, + pid_t cygpid; + int res = -1; + ++ /* Environment variable MSYS2_ARG_CONV_EXCL contains a list ++ of ';' separated argument prefixes to pass un-modified.. ++ It isn't applied to env. variables; only spawn arguments. ++ A value of * means don't convert any arguments. */ ++ char* msys2_arg_conv_excl_env = getenv("MSYS2_ARG_CONV_EXCL"); ++ char* msys2_arg_conv_excl = NULL; ++ size_t msys2_arg_conv_excl_count = 0; ++ if (msys2_arg_conv_excl_env) ++ { ++ msys2_arg_conv_excl = (char*)alloca (strlen(msys2_arg_conv_excl_env)+1); ++ strcpy (msys2_arg_conv_excl, msys2_arg_conv_excl_env); ++ msys2_arg_conv_excl_count = 1; ++ msys2_arg_conv_excl_env = strchr ( msys2_arg_conv_excl, ';' ); ++ while (msys2_arg_conv_excl_env) ++ { ++ *msys2_arg_conv_excl_env = '\0'; ++ ++msys2_arg_conv_excl_count; ++ msys2_arg_conv_excl_env = strchr ( msys2_arg_conv_excl_env + 1, ';' ); ++ } ++ } ++ + /* Check if we have been called from exec{lv}p or spawn{lv}p and mask + mode to keep only the spawn mode. */ + bool p_type_exec = !!(mode & _P_PATH_TYPE_EXEC); +@@ -373,12 +394,26 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, + moreinfo->argc = newargv.argc; + moreinfo->argv = newargv; + } +- if ((wincmdln || !real_path.iscygexec ()) +- && !cmd.fromargv (newargv, real_path.get_win32 (), +- real_path.iscygexec ())) ++ else + { +- res = -1; +- __leave; ++ for (int i = 0; i < newargv.argc; i++) ++ { ++ //convert argv to win32 ++ int newargvlen = strlen (newargv[i]); ++ char *tmpbuf = (char *)malloc (newargvlen + 1); ++ memcpy (tmpbuf, newargv[i], newargvlen + 1); ++ tmpbuf = arg_heuristic_with_exclusions(tmpbuf, msys2_arg_conv_excl, msys2_arg_conv_excl_count); ++ debug_printf("newargv[%d] = %s", i, newargv[i]); ++ newargv.replace (i, tmpbuf); ++ free (tmpbuf); ++ } ++ if ((wincmdln || !real_path.iscygexec ()) ++ && !cmd.fromargv (newargv, real_path.get_win32 (), ++ real_path.iscygexec ())) ++ { ++ res = -1; ++ __leave; ++ } + } + + +@@ -514,7 +549,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, + moreinfo->envp = build_env (envp, envblock, moreinfo->envc, + real_path.iscygexec (), + switch_user ? ::cygheap->user.primary_token () +- : NULL); ++ : NULL, ++ real_path.iscygexec ()); + if (!moreinfo->envp || !envblock) + { + set_errno (E2BIG); +diff --git a/winsup/cygwin/winf.h b/winsup/cygwin/winf.h +index 1d4fdc0..ccf1e71 100644 +--- a/winsup/cygwin/winf.h ++++ b/winsup/cygwin/winf.h +@@ -53,6 +53,10 @@ class av + calloced = 1; + } + } ++ void replace (int i, const char *arg) ++ { ++ argv[i] = cstrdup1 (arg); ++ } + void dup_all () + { + for (int i = calloced; i < argc; i++) +-- +2.8.0 + diff --git a/msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch b/msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch new file mode 100644 index 00000000000..52fd5f5489e --- /dev/null +++ b/msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch @@ -0,0 +1,169 @@ +From 8cc0dff130047752c9cbc42657d6ec23af4412f5 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Thu, 12 Mar 2015 13:58:27 +0300 +Subject: [PATCH 04/16] Add functionality for changing OS name via MSYSTEM + environment variables. + +--- + winsup/cygserver/cygserver-config | 4 ++-- + winsup/cygwin/environ.cc | 36 ++++++++++++++++++++++++++++++++---- + winsup/cygwin/include/sys/utsname.h | 2 +- + winsup/cygwin/uname.cc | 6 ++++++ + 4 files changed, 41 insertions(+), 7 deletions(-) + +diff --git a/winsup/cygserver/cygserver-config b/winsup/cygserver/cygserver-config +index abe943c..950077d 100755 +--- a/winsup/cygserver/cygserver-config ++++ b/winsup/cygserver/cygserver-config +@@ -88,7 +88,7 @@ done + + # Check if running on NT + _sys="`uname`" +-_nt=`expr "${_sys}" : "CYGWIN_NT"` ++_nt=`expr "${_sys}" : "MSYS_NT"` + + # Check for running cygserver processes first. + if ps -ef | grep -v grep | grep -q ${service_name} +@@ -180,7 +180,7 @@ then + echo "Do you want to install cygserver as service?" + if request "(Say \"no\" if it's already installed as service)" + then +- if ! cygrunsrv -I ${service_name} -d "CYGWIN cygserver" -p /usr/sbin/cygserver ++ if ! cygrunsrv -I ${service_name} -d "MSYS cygserver" -p /usr/sbin/cygserver + then + echo + echo "Installation of cygserver as service failed. Please check the" +diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc +index 3629d48..2bb289b 100644 +--- a/winsup/cygwin/environ.cc ++++ b/winsup/cygwin/environ.cc +@@ -205,7 +205,11 @@ parse_options (const char *inbuf) + if (export_settings) + { + debug_printf ("%s", newbuf + 1); ++#ifdef __MSYS__ ++ setenv ("MSYS", newbuf + 1, 1); ++#else + setenv ("CYGWIN", newbuf + 1, 1); ++#endif + } + return; + } +@@ -650,7 +654,7 @@ _addenv (const char *name, const char *value, int overwrite) + win_env *spenv; + if ((spenv = getwinenv (envhere))) + spenv->add_cache (value); +- if (strcmp (name, "CYGWIN") == 0) ++ if (strcmp (name, "MSYS") == 0) + parse_options (value); + + return 0; +@@ -734,6 +738,9 @@ static struct renv { + } renv_arr[] = { + { NL("COMMONPROGRAMFILES=") }, // 0 + { NL("COMSPEC=") }, ++#ifdef __MSYS__ ++ { NL("MSYSTEM=") }, // 2 ++#endif /* __MSYS__ */ + { NL("PATH=") }, // 2 + { NL("PROGRAMFILES=") }, + { NL("SYSTEMDRIVE=") }, // 4 +@@ -745,10 +752,21 @@ static struct renv { + #define RENV_SIZE (sizeof (renv_arr) / sizeof (renv_arr[0])) + + /* Set of first characters of the above list of variables. */ +-static const char idx_arr[] = "CPSTW"; ++static const char idx_arr[] = ++#ifdef __MSYS__ ++ "CMPSTW"; ++#else ++ "CPSTW"; ++#endif + /* Index into renv_arr at which the variables with this specific character + starts. */ +-static const int start_at[] = { 0, 2, 4, 6, 8 }; ++static const int start_at[] = { ++#ifdef __MSYS__ ++ 0, 2, 3, 5, 7, 9 ++#else ++ 0, 2, 4, 6, 8 ++#endif ++ }; + + /* Turn environment variable part of a=b string into uppercase - for some + environment variables only. */ +@@ -838,8 +856,13 @@ environ_init (char **envp, int envc) + ucenv (newp, eq); /* uppercase env vars which need it */ + if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0) + sawTERM = 1; ++#ifdef __MSYS__ ++ else if (*newp == 'M' && strncmp (newp, "MSYS=", 5) == 0) ++ parse_options (newp + 5); ++#else + else if (*newp == 'C' && strncmp (newp, "CYGWIN=", 7) == 0) + parse_options (newp + 7); ++#endif + if (*eq) + posify_maybe (envp + i, *++eq ? eq : --eq, tmpbuf); + debug_printf ("%p: %s", envp[i], envp[i]); +@@ -856,7 +879,11 @@ environ_init (char **envp, int envc) + update_envptrs (); + if (envp_passed_in) + { ++#ifdef __MSYS__ ++ p = getenv ("MSYS"); ++#else + p = getenv ("CYGWIN"); ++#endif + if (p) + parse_options (p); + } +@@ -923,12 +950,13 @@ struct spenv + static NO_COPY spenv spenvs[] = + { + #ifdef DEBUGGING +- {NL ("CYGWIN_DEBUG="), false, true, NULL}, ++ {NL ("MSYS_DEBUG="), false, true, NULL}, + #endif + {NL ("HOMEDRIVE="), false, false, &cygheap_user::env_homedrive}, + {NL ("HOMEPATH="), false, false, &cygheap_user::env_homepath}, + {NL ("LOGONSERVER="), false, false, &cygheap_user::env_logsrv}, + {NL ("PATH="), false, true, NULL}, ++ {NL ("MSYSTEM="), true, true, NULL}, + {NL ("SYSTEMDRIVE="), false, true, NULL}, + {NL ("SYSTEMROOT="), true, true, &cygheap_user::env_systemroot}, + {NL ("USERDOMAIN="), false, false, &cygheap_user::env_domain}, +diff --git a/winsup/cygwin/include/sys/utsname.h b/winsup/cygwin/include/sys/utsname.h +index 23ca5ab..de7a502 100644 +--- a/winsup/cygwin/include/sys/utsname.h ++++ b/winsup/cygwin/include/sys/utsname.h +@@ -17,7 +17,7 @@ extern "C" { + + struct utsname + { +- char sysname[20]; ++ char sysname[21]; + char nodename[20]; + char release[20]; + char version[20]; +diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc +index cd19cd4..e6141c2 100644 +--- a/winsup/cygwin/uname.cc ++++ b/winsup/cygwin/uname.cc +@@ -29,7 +29,13 @@ uname (struct utsname *name) + char *snp = strstr (cygwin_version.dll_build_date, "SNP"); + + memset (name, 0, sizeof (*name)); ++#ifdef __MSYS__ ++ char* msystem = getenv("MSYSTEM"); ++ const char *msystem_msys = "MSYS"; ++ __small_sprintf (name->sysname, "%s_%s", msystem ? msystem : msystem_msys, wincap.osname ()); ++#else + __small_sprintf (name->sysname, "CYGWIN_%s", wincap.osname ()); ++#endif + + /* Add a hint to the sysname, that we're running under WOW64. This might + give an early clue if somebody encounters problems. */ +-- +2.8.0 + diff --git a/msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-Do-no.patch b/msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-Do-no.patch new file mode 100644 index 00000000000..54f73f42be7 --- /dev/null +++ b/msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-Do-no.patch @@ -0,0 +1,419 @@ +From b476a641db1795c7299c5fd1694aa29d59b839d9 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Thu, 12 Mar 2015 14:09:29 +0300 +Subject: [PATCH 05/16] - Move root to /usr. - Change sorting mount points. - + Do not show warnings for DOS paths. - By default mount without ACLs. - Can + read /etc/fstab with short mount point format. + +--- + winsup/cygwin/cygheap.cc | 12 ++- + winsup/cygwin/globals.cc | 2 +- + winsup/cygwin/mount.cc | 189 ++++++++++++++++++++++++++++++++++++++++------- + winsup/cygwin/mount.h | 3 +- + winsup/cygwin/uinfo.cc | 2 +- + 5 files changed, 177 insertions(+), 31 deletions(-) + +diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc +index 615dfc1..441fe91 100644 +--- a/winsup/cygwin/cygheap.cc ++++ b/winsup/cygwin/cygheap.cc +@@ -181,14 +181,22 @@ init_cygheap::init_installation_root () + + /* Strip off last path component ("\\cygwin1.dll") */ + PWCHAR w = wcsrchr (installation_root, L'\\'); ++#ifdef __MSYS__ ++ /* Back two folders to get root as we have all stuff in usr subfolder */ ++ for (int i=1; i >=0; --i) ++ { ++#endif + if (w) + { + *w = L'\0'; + w = wcsrchr (installation_root, L'\\'); + } + if (!w) +- api_fatal ("Can't initialize Cygwin installation root dir.\n" ++ api_fatal ("Can't initialize MSYS2 installation root dir.\n" + "Invalid DLL path"); ++#ifdef __MSYS__ ++ } ++#endif + + /* Copy result into installation_dir before stripping off "bin" dir and + revert to Win32 path. This path is added to the Windows environment +@@ -211,6 +219,7 @@ init_cygheap::init_installation_root () + if (w > p) + *w = L'\0'; + ++#ifndef __MSYS__ + for (int i = 1; i >= 0; --i) + { + reg_key r (i, KEY_WRITE, _WIDE (CYGWIN_INFO_INSTALLATIONS_NAME), +@@ -219,6 +228,7 @@ init_cygheap::init_installation_root () + installation_root))) + break; + } ++#endif + } + + void __stdcall +diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc +index 7dfe74d..bbbd359 100644 +--- a/winsup/cygwin/globals.cc ++++ b/winsup/cygwin/globals.cc +@@ -69,7 +69,7 @@ int NO_COPY dynamically_loaded; + /* Some CYGWIN environment variable variables. */ + bool allow_glob = true; + bool detect_bloda; +-bool dos_file_warning; ++bool dos_file_warning = false; + bool ignore_case_with_glob; + bool pipe_byte; + bool reset_com; +diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc +index fcb31aa..73d1058 100644 +--- a/winsup/cygwin/mount.cc ++++ b/winsup/cygwin/mount.cc +@@ -42,7 +42,6 @@ details. */ + (path_prefix_p (proc, (path), proc_len, false)) + + bool NO_COPY mount_info::got_usr_bin; +-bool NO_COPY mount_info::got_usr_lib; + int NO_COPY mount_info::root_idx = -1; + + /* is_unc_share: Return non-zero if PATH begins with //server/share +@@ -334,7 +333,6 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol) + #define MINIMAL_WIN_NTFS_FLAGS (FILE_CASE_SENSITIVE_SEARCH \ + | FILE_CASE_PRESERVED_NAMES \ + | FILE_UNICODE_ON_DISK \ +- | FILE_PERSISTENT_ACLS \ + | FILE_FILE_COMPRESSION \ + | FILE_VOLUME_QUOTAS \ + | FILE_SUPPORTS_SPARSE_FILES \ +@@ -483,13 +481,13 @@ mount_info::create_root_entry (const PWCHAR root) + sys_wcstombs (native_root, PATH_MAX, root); + assert (*native_root != '\0'); + if (add_item (native_root, "/", +- MOUNT_SYSTEM | MOUNT_BINARY | MOUNT_IMMUTABLE | MOUNT_AUTOMATIC) ++ MOUNT_SYSTEM | MOUNT_BINARY | MOUNT_IMMUTABLE | MOUNT_AUTOMATIC | MOUNT_NOACL) + < 0) + api_fatal ("add_item (\"%s\", \"/\", ...) failed, errno %d", native_root, errno); + /* Create a default cygdrive entry. Note that this is a user entry. + This allows to override it with mount, unless the sysadmin created + a cygdrive entry in /etc/fstab. */ +- cygdrive_flags = MOUNT_BINARY | MOUNT_NOPOSIX | MOUNT_CYGDRIVE; ++ cygdrive_flags = MOUNT_BINARY | MOUNT_NOPOSIX | MOUNT_CYGDRIVE | MOUNT_NOACL; + strcpy (cygdrive, CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX "/"); + cygdrive_len = strlen (cygdrive); + } +@@ -509,25 +507,17 @@ mount_info::init (bool user_init) + pathend = wcpcpy (pathend, L"\\etc\\fstab"); + from_fstab (user_init, path, pathend); + +- if (!user_init && (!got_usr_bin || !got_usr_lib)) ++ ++ if (!user_init && !got_usr_bin) + { + char native[PATH_MAX]; + if (root_idx < 0) +- api_fatal ("root_idx %d, user_shared magic %y, nmounts %d", root_idx, user_shared->version, nmounts); ++ api_fatal ("root_idx %d, user_shared magic %y, nmounts %d", root_idx, user_shared->version, nmounts); + char *p = stpcpy (native, mount[root_idx].native_path); +- if (!got_usr_bin) +- { +- stpcpy (p, "\\bin"); +- add_item (native, "/usr/bin", +- MOUNT_SYSTEM | MOUNT_BINARY | MOUNT_AUTOMATIC); +- } +- if (!got_usr_lib) +- { +- stpcpy (p, "\\lib"); +- add_item (native, "/usr/lib", +- MOUNT_SYSTEM | MOUNT_BINARY | MOUNT_AUTOMATIC); +- } +- } ++ stpcpy (p, "\\usr\\bin"); ++ add_item (native, "/bin", ++ MOUNT_SYSTEM | MOUNT_BINARY | MOUNT_AUTOMATIC | MOUNT_NOACL); ++ } + } + + static void +@@ -623,6 +613,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, + /* See if this is a cygwin "device" */ + if (win32_device_name (src_path, dst, dev)) + { ++ debug_printf ("win32_device_name (%s)", src_path); + *flags = MOUNT_BINARY; /* FIXME: Is this a sensible default for devices? */ + rc = 0; + goto out_no_chroot_check; +@@ -653,6 +644,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, + } + if (isproc (src_path)) + { ++ debug_printf ("isproc (%s)", src_path); + dev = *proc_dev; + dev = fhandler_proc::get_proc_fhandler (src_path); + if (dev == FH_NADA) +@@ -674,6 +666,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, + off the prefix and transform it into an MS-DOS path. */ + else if (iscygdrive (src_path)) + { ++ debug_printf ("iscygdrive (%s) mount_table->cygdrive %s", src_path, mount_table->cygdrive); + int n = mount_table->cygdrive_len - 1; + int unit; + +@@ -685,11 +678,15 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, + } + else if (cygdrive_win32_path (src_path, dst, unit)) + { ++ debug_printf ("cygdrive_win32_path (%s)", src_path); + set_flags (flags, (unsigned) cygdrive_flags); + goto out; + } + else if (mount_table->cygdrive_len > 1) ++ { ++ debug_printf ("mount_table->cygdrive_len > 1 (%s)", src_path); + return ENOENT; ++ } + } + + int chroot_pathlen; +@@ -700,7 +697,9 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, + const char *path; + int len; + +- mi = mount + posix_sorted[i]; ++ mi = mount + shortest_native_sorted[i]; ++ debug_printf (" mount[%d] .. checking %s -> %s ", i, mi->posix_path, mi->native_path); ++ + if (!cygheap->root.exists () + || (mi->posix_pathlen == 1 && mi->posix_path[0] == '/')) + { +@@ -931,7 +930,8 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path, + int pathbuflen = tail - pathbuf; + for (int i = 0; i < nmounts; ++i) + { +- mount_item &mi = mount[native_sorted[i]]; ++ mount_item &mi = mount[longest_posix_sorted[i]]; ++ debug_printf (" mount[%d] .. checking %s -> %s ", i, mi.posix_path, mi.native_path); + if (!path_prefix_p (mi.native_path, pathbuf, mi.native_pathlen, + mi.flags & MOUNT_NOPOSIX)) + continue; +@@ -1159,8 +1159,17 @@ mount_info::from_fstab_line (char *line, bool user) + if (!*c) + return true; + cend = find_ws (c); +- *cend = '\0'; + posix_path = conv_fstab_spaces (c); ++ if (!*cend) ++ { ++ unsigned mount_flags = MOUNT_SYSTEM | MOUNT_BINARY | MOUNT_NOPOSIX | MOUNT_NOACL; ++ ++ int res = mount_table->add_item (native_path, posix_path, mount_flags); ++ if (res && get_errno () == EMFILE) ++ return false; ++ return true; ++ } ++ *cend = '\0'; + /* Third field: FS type. */ + c = skip_ws (cend + 1); + if (!*c) +@@ -1389,16 +1398,145 @@ sort_by_native_name (const void *a, const void *b) + return res; + } + ++/* sort_by_longest_posix_name: qsort callback to sort the mount entries. ++ Sort user mounts ahead of system mounts to the same POSIX path. */ ++/* FIXME: should the user should be able to choose whether to ++ prefer user or system mounts??? */ ++static int ++sort_by_longest_posix_name (const void *a, const void *b) ++{ ++ mount_item *ap = mounts_for_sort + (*((int*) a)); ++ mount_item *bp = mounts_for_sort + (*((int*) b)); ++ ++ /* Base weighting on the conversion that would give the longest ++ posix path. */ ++ ssize_t alen = (ssize_t) strlen (ap->posix_path) - (ssize_t) strlen (ap->native_path); ++ ssize_t blen = (ssize_t) strlen (bp->posix_path) - (ssize_t) strlen (bp->native_path); ++ ++ int res = blen - alen; ++ ++ if (res) ++ return res; /* Path lengths differed */ ++ ++ /* The two paths were the same length, so just determine normal ++ lexical sorted order. */ ++ res = strcmp (ap->posix_path, bp->posix_path); ++ ++ if (res == 0) ++ { ++ /* need to select between user and system mount to same POSIX path */ ++ if (!(bp->flags & MOUNT_SYSTEM)) /* user mount */ ++ return 1; ++ else ++ return -1; ++ } ++ ++ return res; ++} ++ ++/* sort_by_shortest_native_name: qsort callback to sort the mount entries. ++ Sort user mounts ahead of system mounts to the same POSIX path. */ ++/* FIXME: should the user should be able to choose whether to ++ prefer user or system mounts??? */ ++static int ++sort_by_shortest_native_name (const void *a, const void *b) ++{ ++ mount_item *ap = mounts_for_sort + (*((int*) a)); ++ mount_item *bp = mounts_for_sort + (*((int*) b)); ++ ++ /* Base weighting on the conversion that would give the shortest ++ native path. */ ++ ssize_t alen = (ssize_t) strlen (ap->native_path); ++ ssize_t blen = (ssize_t) strlen (bp->native_path); ++ ++ int res = alen - blen; ++ ++ if (res) ++ return res; /* Path lengths differed */ ++ ++ /* The two paths were the same length, so just determine normal ++ lexical sorted order. */ ++ res = strcmp (ap->native_path, bp->native_path); ++ ++ if (res == 0) ++ { ++ /* need to select between user and system mount to same POSIX path */ ++ if (!(bp->flags & MOUNT_SYSTEM)) /* user mount */ ++ return 1; ++ else ++ return -1; ++ } ++ ++ return res; ++} ++ ++static int ++sort_posix_subdirs_before_parents (const void *a, const void *b) ++{ ++ mount_item *ap = mounts_for_sort + (*((int*) a)); ++ mount_item *bp = mounts_for_sort + (*((int*) b)); ++ ++ if (ap->posix_pathlen > bp->posix_pathlen) ++ { ++ if (!memcmp (bp->posix_path, ap->posix_path, bp->posix_pathlen)) ++ { ++ // bp is a subdir of ap (bp must be moved in-front) ++ return -1; ++ } ++ } ++ else if (ap->posix_pathlen < bp->posix_pathlen) ++ { ++ if (!memcmp (ap->posix_path, bp->posix_path, ap->posix_pathlen)) ++ { ++ // ap is a subdir of bp (good as we are) ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++#define DISABLE_NEW_STUFF 0 ++#define ONLY_USE_NEW_STUFF 1 ++ + void + mount_info::sort () + { + for (int i = 0; i < nmounts; i++) +- native_sorted[i] = posix_sorted[i] = i; ++ native_sorted[i] = posix_sorted[i] = shortest_native_sorted[i] = longest_posix_sorted[i] = i; + /* Sort them into reverse length order, otherwise we won't + be able to look for /foo in /. */ + mounts_for_sort = mount; /* ouch. */ + qsort (posix_sorted, nmounts, sizeof (posix_sorted[0]), sort_by_posix_name); + qsort (native_sorted, nmounts, sizeof (native_sorted[0]), sort_by_native_name); ++ qsort (longest_posix_sorted, nmounts, sizeof (longest_posix_sorted[0]), sort_by_longest_posix_name); ++ qsort (shortest_native_sorted, nmounts, sizeof (shortest_native_sorted[0]), sort_by_shortest_native_name); ++ qsort (shortest_native_sorted, nmounts, sizeof (shortest_native_sorted[0]), sort_posix_subdirs_before_parents); ++ /* Disabling my new crap. */ ++ #if DISABLE_NEW_STUFF ++ for (int i = 0; i < nmounts; i++) ++ { ++ longest_posix_sorted[i] = native_sorted[i]; ++ shortest_native_sorted[i] = posix_sorted[i]; ++ } ++ #else ++ #if ONLY_USE_NEW_STUFF ++ for (int i = 0; i < nmounts; i++) ++ { ++ native_sorted[i] = longest_posix_sorted[i]; ++ posix_sorted[i] = shortest_native_sorted[i]; ++ } ++ #endif ++ #endif ++ for (int i = 0; i < nmounts; i++) ++ { ++ mount_item *mi = mount + shortest_native_sorted[i]; ++ debug_printf ("shortest_native_sorted (subdirs before parents)[%d] %12s %12s", i, mi->native_path, mi->posix_path); ++ } ++ for (int i = 0; i < nmounts; i++) ++ { ++ mount_item *mi = mount + longest_posix_sorted[i]; ++ debug_printf ("longest_posix_sorted[%d] %12s %12s", i, mi->native_path, mi->posix_path); ++ } + } + + /* Add an entry to the mount table. +@@ -1489,12 +1627,9 @@ mount_info::add_item (const char *native, const char *posix, + if (i == nmounts) + nmounts++; + +- if (strcmp (posixtmp, "/usr/bin") == 0) ++ if (strcmp (posixtmp, "/bin") == 0) + got_usr_bin = true; + +- if (strcmp (posixtmp, "/usr/lib") == 0) +- got_usr_lib = true; +- + if (posixtmp[0] == '/' && posixtmp[1] == '\0' && !(mountflags & MOUNT_CYGDRIVE)) + root_idx = i; + +diff --git a/winsup/cygwin/mount.h b/winsup/cygwin/mount.h +index 7219461..32befc9 100644 +--- a/winsup/cygwin/mount.h ++++ b/winsup/cygwin/mount.h +@@ -176,7 +176,6 @@ class mount_info + mount_item mount[MAX_MOUNTS]; + + static bool got_usr_bin; +- static bool got_usr_lib; + static int root_idx; + + /* cygdrive_prefix is used as the root of the path automatically +@@ -188,6 +187,8 @@ class mount_info + private: + int posix_sorted[MAX_MOUNTS]; + int native_sorted[MAX_MOUNTS]; ++ int longest_posix_sorted[MAX_MOUNTS]; ++ int shortest_native_sorted[MAX_MOUNTS]; + + public: + void init (bool); +diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc +index d966dd1..96f5ac9 100644 +--- a/winsup/cygwin/uinfo.cc ++++ b/winsup/cygwin/uinfo.cc +@@ -2559,7 +2559,7 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap) + dom, name, + sid.string ((char *) sidstr), + home ?: "/home/", home ? L"" : name, +- shell ?: "/bin/bash"); ++ shell ?: "/usr/bin/bash"); + if (gecos) + free (gecos); + if (home) +-- +2.8.0 + diff --git a/msys2-runtime/0006-Do-not-create-cygwin-symlinks.-Instead-use-deep-copy.patch b/msys2-runtime/0006-Do-not-create-cygwin-symlinks.-Instead-use-deep-copy.patch new file mode 100644 index 00000000000..853d9f0ec87 --- /dev/null +++ b/msys2-runtime/0006-Do-not-create-cygwin-symlinks.-Instead-use-deep-copy.patch @@ -0,0 +1,178 @@ +From e0308e0fb3892d4f22fb89d4e57b6c029066c6e9 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Thu, 12 Mar 2015 14:09:29 +0300 +Subject: [PATCH 06/16] Do not create cygwin symlinks. Instead use deep copy of + files/folders. + +--- + winsup/cygwin/path.cc | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 147 insertions(+) + +diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc +index 4a47bb3..66317bf 100644 +--- a/winsup/cygwin/path.cc ++++ b/winsup/cygwin/path.cc +@@ -1540,6 +1540,86 @@ conv_path_list (const char *src, char *dst, size_t size, + + /********************** Symbolic Link Support **************************/ + ++/* ++ Create a deep copy of src as dst, while avoiding descending in origpath. ++*/ ++static int ++recursiveCopy (char * src, char * dst, const char * origpath) ++{ ++ WIN32_FIND_DATA dHfile; ++ HANDLE dH; ++ BOOL findfiles; ++ int srcpos = strlen (src); ++ int dstpos = strlen (dst); ++ int res = -1; ++ ++ debug_printf("recursiveCopy (%s, %s)", src, dst); ++ ++ /* Create the destination directory */ ++ if (!CreateDirectoryEx (src, dst, NULL)) ++ { ++ debug_printf("CreateDirectoryEx(%s, %s, 0) failed", src, dst); ++ __seterrno (); ++ goto done; ++ } ++ /* Descend into the source directory */ ++ if (srcpos + 2 >= MAX_PATH || dstpos + 1 >= MAX_PATH) ++ { ++ set_errno (ENAMETOOLONG); ++ goto done; ++ } ++ strcat (src, "\\*"); ++ strcat (dst, "\\"); ++ dH = FindFirstFile (src, &dHfile); ++ debug_printf("dHfile(1): %s", dHfile.cFileName); ++ findfiles = FindNextFile (dH, &dHfile); ++ debug_printf("dHfile(2): %s", dHfile.cFileName); ++ findfiles = FindNextFile (dH, &dHfile); ++ while (findfiles) ++ { ++ /* Append the directory item filename to both source and destination */ ++ int filelen = strlen (dHfile.cFileName); ++ debug_printf("dHfile(3): %s", dHfile.cFileName); ++ if (srcpos + 1 + filelen >= MAX_PATH || ++ dstpos + 1 + filelen >= MAX_PATH) ++ { ++ set_errno (ENAMETOOLONG); ++ goto done; ++ } ++ strcpy (&src[srcpos+1], dHfile.cFileName); ++ strcpy (&dst[dstpos+1], dHfile.cFileName); ++ debug_printf("%s -> %s", src, dst); ++ if (dHfile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ++ { ++ /* Recurse into the child directory */ ++ debug_printf("%s <-> %s", src, origpath); ++ if (strcmp (src, origpath)) // avoids endless recursion ++ if (recursiveCopy (src, dst, origpath)) ++ goto done; ++ } ++ else ++ { ++ /* Just copy the file */ ++ if (!CopyFile (src, dst, FALSE)) ++ { ++ __seterrno (); ++ goto done; ++ } ++ } ++ findfiles = FindNextFile (dH, &dHfile); ++ } ++ if (GetLastError() != ERROR_NO_MORE_FILES) ++ { ++ __seterrno (); ++ goto done; ++ } ++ res = 0; ++ ++done: ++ ++ return res; ++} ++ + /* Create a symlink from FROMPATH to TOPATH. */ + + extern "C" int +@@ -1970,6 +2050,73 @@ symlink_worker (const char *oldpath, const char *newpath, bool isdevice) + } + else + { ++ path_conv src_path; ++ src_path.check (oldpath, PC_SYM_NOFOLLOW, stat_suffixes); ++ if (src_path.error) ++ { ++ set_errno (src_path.error); ++ __leave; ++ } ++ if (!src_path.isdevice () && !src_path.is_fs_special ()) ++ { ++ /* MSYS copy file instead make symlink */ ++ ++ char * real_oldpath; ++ if (isabspath (oldpath)) ++ strcpy (real_oldpath = tp.c_get (), oldpath); ++ else ++ /* Find the real source path, relative ++ to the directory of the destination */ ++ { ++ /* Determine the character position of the last path component */ ++ int pos = strlen (newpath); ++ while (--pos >= 0) ++ if (isdirsep (newpath[pos])) ++ break; ++ /* Append the source path to the directory ++ component of the destination */ ++ if (pos+1+strlen(oldpath) >= MAX_PATH) ++ { ++ set_errno(ENAMETOOLONG); ++ __leave; ++ } ++ strcpy (real_oldpath = tp.c_get (), newpath); ++ strcpy (&real_oldpath[pos+1], oldpath); ++ } ++ ++ /* As a MSYS limitation, the source path must exist. */ ++ path_conv win32_oldpath; ++ win32_oldpath.check (real_oldpath, PC_SYM_NOFOLLOW, stat_suffixes); ++ if (!win32_oldpath.exists ()) ++ { ++ set_errno (ENOENT); ++ __leave; ++ } ++ ++ char *w_newpath; ++ char *w_oldpath; ++ stpcpy (w_newpath = tp.c_get (), win32_newpath.get_win32()); ++ stpcpy (w_oldpath = tp.c_get (), win32_oldpath.get_win32()); ++ if (win32_oldpath.isdir()) ++ { ++ char *origpath; ++ strcpy (origpath = tp.c_get (), w_oldpath); ++ res = recursiveCopy (w_oldpath, w_newpath, origpath); ++ } ++ else ++ { ++ if (!CopyFile (w_oldpath, w_newpath, FALSE)) ++ { ++ __seterrno (); ++ } ++ else ++ { ++ res = 0; ++ } ++ } ++ __leave; ++ } ++ + /* Default technique creating a symlink. */ + buf = tp.t_get (); + cp = stpcpy (buf, SYMLINK_COOKIE); +-- +2.8.0 + diff --git a/msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch b/msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch new file mode 100644 index 00000000000..37d39fcfc16 --- /dev/null +++ b/msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch @@ -0,0 +1,40 @@ +From 41ef30b6e8f68e1e062351b2cf05c573e4bc5ab3 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Tue, 24 Mar 2015 14:09:29 +0300 +Subject: [PATCH 07/16] Automatically rewrite TERM=msys to TERM=cygwin + +With MSys1, it was necessary to set the TERM variable to "msys". To +allow for a smooth transition from MSys1 to MSys2, let's simply handle +TERM=msys as if the user had not specified TERM at all and wanted us to +use our preferred TERM value. + +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/environ.cc | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc +index 2bb289b..7b15810 100644 +--- a/winsup/cygwin/environ.cc ++++ b/winsup/cygwin/environ.cc +@@ -855,7 +855,16 @@ environ_init (char **envp, int envc) + char *eq = strchrnul (newp, '='); + ucenv (newp, eq); /* uppercase env vars which need it */ + if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0) +- sawTERM = 1; ++ { ++ /* backwards compatibility: override TERM=msys by TERM=cygwin */ ++ if (strcmp (newp + 5, "msys") == 0) ++ { ++ free(newp); ++ i--; ++ continue; ++ } ++ sawTERM = 1; ++ } + #ifdef __MSYS__ + else if (*newp == 'M' && strncmp (newp, "MSYS=", 5) == 0) + parse_options (newp + 5); +-- +2.8.0 + diff --git a/msys2-runtime/0008-Do-not-convert-environment-for-strace.patch b/msys2-runtime/0008-Do-not-convert-environment-for-strace.patch new file mode 100644 index 00000000000..0fb6bec8456 --- /dev/null +++ b/msys2-runtime/0008-Do-not-convert-environment-for-strace.patch @@ -0,0 +1,34 @@ +From e02bbb74c3d1fbe49427c607f8e622d25f2ce669 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Fri, 6 Mar 2015 14:09:29 +0300 +Subject: [PATCH 08/16] Do not convert environment for strace + +strace is a Windows program so MSYS2 will convert +all arguments and environment vars and that makes +debugging msys2 software with strace very tricky. +--- + winsup/cygwin/spawn.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc +index 7c1cb86..09e8f3a 100644 +--- a/winsup/cygwin/spawn.cc ++++ b/winsup/cygwin/spawn.cc +@@ -546,11 +546,13 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, + bool switch_user = ::cygheap->user.issetuid () + && (::cygheap->user.saved_uid + != ::cygheap->user.real_uid); ++ bool keep_posix = (iscmd (argv[0], "strace.exe") ++ || iscmd (argv[0], "strace")) ? true : real_path.iscygexec (); + moreinfo->envp = build_env (envp, envblock, moreinfo->envc, + real_path.iscygexec (), + switch_user ? ::cygheap->user.primary_token () + : NULL, +- real_path.iscygexec ()); ++ keep_posix); + if (!moreinfo->envp || !envblock) + { + set_errno (E2BIG); +-- +2.8.0 + diff --git a/msys2-runtime/0009-convert-be-more-careful-to-stay-within-the-buffer.patch b/msys2-runtime/0009-convert-be-more-careful-to-stay-within-the-buffer.patch new file mode 100644 index 00000000000..b0b7a3070bc --- /dev/null +++ b/msys2-runtime/0009-convert-be-more-careful-to-stay-within-the-buffer.patch @@ -0,0 +1,39 @@ +From 2c55991dd8dbfedb84053c9b111c3d77b7c91f30 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Mon, 2 Mar 2015 14:09:29 +0300 +Subject: [PATCH 09/16] convert(): be more careful to stay within the buffer + +We really must not run outside of the buffer. And the buffer needs to be +NUL-terminated, too... + +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/msys2_path_conv.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc +index 74ebd2e..8a7b7e2 100644 +--- a/winsup/cygwin/msys2_path_conv.cc ++++ b/winsup/cygwin/msys2_path_conv.cc +@@ -519,7 +519,7 @@ void rp_convert(const char** from, const char* to, char** dst, const char* dsten + posix_to_win32_path(it, real_to, dst, dstend); + } + +- if (real_to != to) { ++ if (*dst != dstend && real_to != to) { + **dst = *real_to; + *dst += 1; + } +@@ -568,6 +568,9 @@ void ppl_convert(const char** from, const char* to, char** dst, const char* dste + subp_convert(&beg, it, is_url, dst, dstend); + is_url = 0; + ++ if (*dst == dstend) ++ break; ++ + **dst = ';'; + *dst += 1; + } +-- +2.8.0 + diff --git a/msys2-runtime/0010-convert-check-safely-whether-we-could-allocate-the-b.patch b/msys2-runtime/0010-convert-check-safely-whether-we-could-allocate-the-b.patch new file mode 100644 index 00000000000..b2859de5dfd --- /dev/null +++ b/msys2-runtime/0010-convert-check-safely-whether-we-could-allocate-the-b.patch @@ -0,0 +1,33 @@ +From e49f87b4fe76259ab0416e0fc169af931c4b8786 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Mon, 2 Mar 2015 14:09:29 +0300 +Subject: [PATCH 10/16] convert(): check safely whether we could allocate the + buffer + +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/path.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc +index 66317bf..0c7f55b 100644 +--- a/winsup/cygwin/path.cc ++++ b/winsup/cygwin/path.cc +@@ -3468,12 +3468,12 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, + + size_t stack_len = arglen + MAX_PATH; + char * stack_path = (char *)malloc (stack_len); +- memset (stack_path, 0, MAX_PATH); +- if (!stack_len) ++ if (!stack_path) + { + debug_printf ("out of stack space?"); + return (char *)arg; + } ++ memset (stack_path, 0, MAX_PATH); + convert (stack_path, stack_len - 1, arg); + debug_printf ("convert()'ed: %s (length %d)\n.....->: %s", arg, arglen, stack_path); + // Don't allocate memory if no conversion happened. +-- +2.8.0 + diff --git a/msys2-runtime/0011-convert-use-the-elegant-realloc-call.patch b/msys2-runtime/0011-convert-use-the-elegant-realloc-call.patch new file mode 100644 index 00000000000..b66edadeb6a --- /dev/null +++ b/msys2-runtime/0011-convert-use-the-elegant-realloc-call.patch @@ -0,0 +1,29 @@ +From eb35c15ea2e9b49ed72d2f6eb4806b94f76d7f42 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Mon, 2 Mar 2015 14:09:29 +0300 +Subject: [PATCH 11/16] convert(): use the elegant realloc() call + +Instead of doing a poor man's realloc(), we can call the real thing ;-) + +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/path.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc +index 0c7f55b..e71b189 100644 +--- a/winsup/cygwin/path.cc ++++ b/winsup/cygwin/path.cc +@@ -3481,8 +3481,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, + { + return ((char *)arg); + } +- arg_result = (char *)malloc (strlen (stack_path)+1); +- strcpy (arg_result, stack_path); ++ arg_result = (char *)realloc (stack_path, strlen (stack_path)+1); + // Windows doesn't like empty entries in PATH env. variables (;;) + char* semisemi = strstr(arg_result, ";;"); + while (semisemi) +-- +2.8.0 + diff --git a/msys2-runtime/0012-convert-plug-potential-memory-leak.patch b/msys2-runtime/0012-convert-plug-potential-memory-leak.patch new file mode 100644 index 00000000000..22c08cc9a00 --- /dev/null +++ b/msys2-runtime/0012-convert-plug-potential-memory-leak.patch @@ -0,0 +1,31 @@ +From 055c14d9d02b1a7e097c9d71e17a076ca7efe575 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Mon, 2 Mar 2015 14:09:29 +0300 +Subject: [PATCH 12/16] convert(): plug potential memory leak + +When the result of conversion is identical to the original argument, we +should make sure that the temporary buffer was released. + +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/path.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc +index e71b189..ac17bfa 100644 +--- a/winsup/cygwin/path.cc ++++ b/winsup/cygwin/path.cc +@@ -3479,6 +3479,10 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, + // Don't allocate memory if no conversion happened. + if (!strcmp (arg, stack_path)) + { ++ if (arg != stack_path) ++ { ++ free (stack_path); ++ } + return ((char *)arg); + } + arg_result = (char *)realloc (stack_path, strlen (stack_path)+1); +-- +2.8.0 + diff --git a/msys2-runtime/0013-convert-warn-when-we-cut-off-a-path.patch b/msys2-runtime/0013-convert-warn-when-we-cut-off-a-path.patch new file mode 100644 index 00000000000..569233363a6 --- /dev/null +++ b/msys2-runtime/0013-convert-warn-when-we-cut-off-a-path.patch @@ -0,0 +1,46 @@ +From 1cb912e271982e82ab7b4baf3902ede49d3cd90e Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Mon, 2 Mar 2015 14:09:29 +0300 +Subject: [PATCH 13/16] convert(): warn when we cut off a path + +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/msys2_path_conv.cc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc +index 8a7b7e2..34c4d26 100644 +--- a/winsup/cygwin/msys2_path_conv.cc ++++ b/winsup/cygwin/msys2_path_conv.cc +@@ -282,6 +282,7 @@ const char* convert(char *dst, size_t dstlen, const char *src) { + *dstit = '\0'; + return dst; + } ++ *dstend = '\0'; + + const char* srcit = src; + const char* srcbeg = src; +@@ -551,6 +552,7 @@ void subp_convert(const char** from, const char* end, int is_url, char** dst, co + } + + void ppl_convert(const char** from, const char* to, char** dst, const char* dstend) { ++ const char *orig_dst = *dst; + const char* it = *from; + const char* beg = it; + int prev_was_simc = 0; +@@ -568,8 +570,10 @@ void ppl_convert(const char** from, const char* to, char** dst, const char* dste + subp_convert(&beg, it, is_url, dst, dstend); + is_url = 0; + +- if (*dst == dstend) +- break; ++ if (*dst == dstend) { ++ system_printf("Path cut off during conversion: %s\n", orig_dst); ++ break; ++ } + + **dst = ';'; + *dst += 1; +-- +2.8.0 + diff --git a/msys2-runtime/0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch b/msys2-runtime/0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch new file mode 100644 index 00000000000..387079e77f0 --- /dev/null +++ b/msys2-runtime/0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch @@ -0,0 +1,44 @@ +From 139158eb7e5e796e1acc598ebe05f88266665355 Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Mon, 2 Mar 2015 14:09:29 +0300 +Subject: [PATCH 14/16] arg_heuristic(): be better prepared to handle path + lists + +If we were to handle only single paths, the buffer really would only +need to fit a single one, but arg_heuristic is also used to convert e.g. +INFO_PATH and MAN_PATH (which can contain multiple absolute POSIX-style +paths that need to be converted to Windows-style paths). + +This is only really relevant if the POSIX root directory's path is +already pretty long. Such a beast has been spotted in the wild, in the +Git for Windows project: + + https://github.com/git-for-windows/git/issues/303 + +Of course, this patch is only a work-around that helps in many, but not +all cases. Obviously this patch will wait patiently until a real fix +comes around the corner, and then readily retire. + +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/path.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc +index ac17bfa..4b1d6ee 100644 +--- a/winsup/cygwin/path.cc ++++ b/winsup/cygwin/path.cc +@@ -3466,7 +3466,9 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, + exclusions += strlen (exclusions) + 1; + } + +- size_t stack_len = arglen + MAX_PATH; ++ // Leave enough room for at least 16 path elements; we might be converting ++ // a path list. ++ size_t stack_len = arglen + 16 * MAX_PATH; + char * stack_path = (char *)malloc (stack_len); + if (!stack_path) + { +-- +2.8.0 + diff --git a/msys2-runtime/0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch b/msys2-runtime/0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch new file mode 100644 index 00000000000..0109d14ce69 --- /dev/null +++ b/msys2-runtime/0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch @@ -0,0 +1,27 @@ +From f171990944091453c3fffadc7f0e0a4fe5891182 Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Fri, 20 Mar 2015 14:09:29 +0300 +Subject: [PATCH 15/16] Fix converting argument looks like + -DVAR=str1;c:/path1;str2;c:/path2 + +--- + winsup/cygwin/msys2_path_conv.cc | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc +index 34c4d26..c347bd4 100644 +--- a/winsup/cygwin/msys2_path_conv.cc ++++ b/winsup/cygwin/msys2_path_conv.cc +@@ -410,6 +410,9 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en + if (isalpha(*it)) { + it += 1; + starts_with_minus_alpha = 1; ++ if (memchr(it, ';', end - it)) { ++ return WINDOWS_PATH_LIST; ++ } + } + } + +-- +2.8.0 + diff --git a/msys2-runtime/0016-Special-case-for-converting-root-directory-to-have-t.patch b/msys2-runtime/0016-Special-case-for-converting-root-directory-to-have-t.patch new file mode 100644 index 00000000000..671e147cff1 --- /dev/null +++ b/msys2-runtime/0016-Special-case-for-converting-root-directory-to-have-t.patch @@ -0,0 +1,57 @@ +From 24726a5aa22760cd8d4e1850fed5106064d52b5c Mon Sep 17 00:00:00 2001 +From: Alexpux +Date: Tue, 1 Mar 2016 13:19:18 +0300 +Subject: [PATCH 16/16] Special case for converting root directory to have + training slash + +--- + winsup/cygwin/path.cc | 25 ++++++++++++++++--------- + 1 file changed, 16 insertions(+), 9 deletions(-) + +diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc +index 4b1d6ee..d841c23 100644 +--- a/winsup/cygwin/path.cc ++++ b/winsup/cygwin/path.cc +@@ -733,6 +733,12 @@ path_conv::check (const char *src, unsigned opt, + need_directory = 1; + *--tail = '\0'; + } ++ /* Special case for "/" must set need_directory, without removing ++ trailing slash */ ++ else if (tail == path_copy + 1 && isslash (tail[-1])) ++ { ++ need_directory = 1; ++ } + path_end = tail; + + /* Scan path_copy from right to left looking either for a symlink +@@ -1220,16 +1226,17 @@ path_conv::check (const char *src, unsigned opt, + cfree (wide_path); + wide_path = NULL; + } +- if (need_directory) ++ } ++ ++ if (need_directory) ++ { ++ size_t n = strlen (this->path); ++ /* Do not add trailing \ to UNC device names like \\.\a: */ ++ if (this->path[n - 1] != '\\' && ++ (strncmp (this->path, "\\\\.\\", 4) != 0)) + { +- size_t n = strlen (this->path); +- /* Do not add trailing \ to UNC device names like \\.\a: */ +- if (this->path[n - 1] != '\\' && +- (strncmp (this->path, "\\\\.\\", 4) != 0)) +- { +- this->modifiable_path ()[n] = '\\'; +- this->modifiable_path ()[n + 1] = '\0'; +- } ++ this->modifiable_path ()[n] = '\\'; ++ this->modifiable_path ()[n + 1] = '\0'; + } + } + +-- +2.8.0 + diff --git a/msys2-runtime/0001-dcrt0.cc-Untangle-allow_glob-from-winshell.patch b/msys2-runtime/0020-dcrt0.cc-Untangle-allow_glob-from-winshell.patch similarity index 100% rename from msys2-runtime/0001-dcrt0.cc-Untangle-allow_glob-from-winshell.patch rename to msys2-runtime/0020-dcrt0.cc-Untangle-allow_glob-from-winshell.patch diff --git a/msys2-runtime/0002-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch b/msys2-runtime/0021-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch similarity index 100% rename from msys2-runtime/0002-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch rename to msys2-runtime/0021-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch diff --git a/msys2-runtime/0003-strace.cc-Don-t-set-MSYS-noglob.patch b/msys2-runtime/0022-strace.cc-Don-t-set-MSYS-noglob.patch similarity index 100% rename from msys2-runtime/0003-strace.cc-Don-t-set-MSYS-noglob.patch rename to msys2-runtime/0022-strace.cc-Don-t-set-MSYS-noglob.patch diff --git a/msys2-runtime/0004-Add-debugging-for-build_argv.patch b/msys2-runtime/0023-Add-debugging-for-build_argv.patch similarity index 100% rename from msys2-runtime/0004-Add-debugging-for-build_argv.patch rename to msys2-runtime/0023-Add-debugging-for-build_argv.patch diff --git a/msys2-runtime/0005-Add-debugging-for-strace-make_command_line.patch b/msys2-runtime/0024-Add-debugging-for-strace-make_command_line.patch similarity index 100% rename from msys2-runtime/0005-Add-debugging-for-strace-make_command_line.patch rename to msys2-runtime/0024-Add-debugging-for-strace-make_command_line.patch diff --git a/msys2-runtime/0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch b/msys2-runtime/0025-environ.cc-New-facility-environment-variable-MSYS2_E.patch similarity index 100% rename from msys2-runtime/0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch rename to msys2-runtime/0025-environ.cc-New-facility-environment-variable-MSYS2_E.patch diff --git a/msys2-runtime/0007-path.cc-Ignore-zero-length-exclusions.patch b/msys2-runtime/0026-path.cc-Ignore-zero-length-exclusions.patch similarity index 100% rename from msys2-runtime/0007-path.cc-Ignore-zero-length-exclusions.patch rename to msys2-runtime/0026-path.cc-Ignore-zero-length-exclusions.patch diff --git a/msys2-runtime/PKGBUILD b/msys2-runtime/PKGBUILD index 2340e435914..f09c98c58f0 100644 --- a/msys2-runtime/PKGBUILD +++ b/msys2-runtime/PKGBUILD @@ -3,15 +3,13 @@ pkgbase=msys2-runtime pkgname=('msys2-runtime' 'msys2-runtime-devel') -_base_ver=2.5.0 -pkgver=2.5.0.17081.826a610 +pkgver=2.5.1 pkgrel=1 pkgdesc="Cygwin POSIX emulation engine" arch=('i686' 'x86_64') -url="" +url="https://www.cygwin.com/" license=('GPL') groups=('base') -depends=() makedepends=('cocom' 'git' 'perl' @@ -24,15 +22,47 @@ makedepends=('cocom' 'libiconv-devel' 'diffutils') # options=('debug' '!strip') -source=('msys2-runtime'::'git+https://github.com/Alexpux/Cygwin.git#branch=msys2-master' - '0001-dcrt0.cc-Untangle-allow_glob-from-winshell.patch' - '0002-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch' - '0003-strace.cc-Don-t-set-MSYS-noglob.patch' - '0004-Add-debugging-for-build_argv.patch' - '0005-Add-debugging-for-strace-make_command_line.patch' - '0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch' - '0007-path.cc-Ignore-zero-length-exclusions.patch') +source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-${pkgver//./_}-release + 0001-Add-MSYS-triplets.patch + 0002-Rename-DLL-from-cygwin-to-msys.patch + 0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch + 0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch + 0005-Move-root-to-usr.-Change-sorting-mount-points.-Do-no.patch + 0006-Do-not-create-cygwin-symlinks.-Instead-use-deep-copy.patch + 0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch + 0008-Do-not-convert-environment-for-strace.patch + 0009-convert-be-more-careful-to-stay-within-the-buffer.patch + 0010-convert-check-safely-whether-we-could-allocate-the-b.patch + 0011-convert-use-the-elegant-realloc-call.patch + 0012-convert-plug-potential-memory-leak.patch + 0013-convert-warn-when-we-cut-off-a-path.patch + 0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch + 0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch + 0016-Special-case-for-converting-root-directory-to-have-t.patch + 0020-dcrt0.cc-Untangle-allow_glob-from-winshell.patch + 0021-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch + 0022-strace.cc-Don-t-set-MSYS-noglob.patch + 0023-Add-debugging-for-build_argv.patch + 0024-Add-debugging-for-strace-make_command_line.patch + 0025-environ.cc-New-facility-environment-variable-MSYS2_E.patch + 0026-path.cc-Ignore-zero-length-exclusions.patch) sha256sums=('SKIP' + '3fb7dcd1ec724d5bd35334942b859ac2289a1bf6f2fd2d59a985fdca4dd1eabf' + '2734865e097baf07779f207cd5259d6e80e8037a7942a7789333c5ec08dcbeb4' + 'a5ecfe028f71f6302bf6a02caa49c4b1a5532de8925d6fcbe2da95e08b43a4ea' + '8eaf632a7bcad41e57b7f124d2c2bfa8906db81398bf0bb45b0ff5ea70825f05' + '49e4961da10545dd62a19cf34db5e078aa728d050492fb8f0075c813390e18b0' + 'ef814a9bf5cb3b9df0fad392fa6b21397e7551fd07bd9d88694ea06d0abb49d6' + 'df647ce9e2f7b9225ba5d56bc6ac5084763ad18ce2d35dc0a57dfccea8ac64b8' + '52f2370c6a546892d49371ad4f17ac49f4892a4d05787449ea009743e8f41eb4' + '0359ba1318c09a2c90fd7ceb275716117e97baeb1b5c049ba909b6242b4b7513' + '2e4660599d27b0d03d646e1da914fa3d6a78f2c3dc2fe93de56dc54a9846da94' + '8c130927882abc172332b68f50c9f5155efc730538f302759d81eb0d3aa3a60f' + 'a375b87aa892711a13d11b4b342b4aa6b50649e944cb6070a28ce6f35957fb01' + '62936e64f825724c6a63f453f7a0db5012c45c122fd8de1c6c4bf574e9744716' + '603bbb95081729b048104ef32de05295c22fec8d962bf72c8d204e022f45c287' + 'af35ea0336da3573bbfc7cefdd37a9715e85eafa5e035fe90e4f1c8212547a40' + '46aeaa5bdd292c82fc08b6a11a561efaa16a02a915a64899fe63f9a720c34a18' 'afd8454662eb6ea9baa816fc594c3af33f4204d364d148c243c45e556e08613e' 'dc03861d4614c228afb000e081b46569ce7a4fe7b4082f690b00847e8063da2b' 'b8da17a374e9fe21f2051582744fb71cdbc7eea009abeeef055ab1ed4d854c83' @@ -40,23 +70,31 @@ sha256sums=('SKIP' '51894036cd0ad1f8deab4761e9876fb92e8b2ce49bceaf3bc4155c7acf2e003f' 'acd5641aad787dbf9ac31be9d3d7d4ab32cb7b10bb071161abbe6d98df169d36' 'ddbfcdf68e44404d161fb0cc947abf672c974ef67274f649a26de50fd798c111') - -pkgver() { - cd "${srcdir}"/msys2-runtime - #local gitver=$(git describe --tags | sed 's|cygwin-||g' | sed 's|_|.|g') - #gitver=${gitver//-*} - printf "%s.%s.%s" "${_base_ver}" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} - prepare() { cd "${srcdir}"/msys2-runtime - git am --committer-date-is-author-date "${srcdir}"/0001-dcrt0.cc-Untangle-allow_glob-from-winshell.patch - git am --committer-date-is-author-date "${srcdir}"/0002-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch - git am --committer-date-is-author-date "${srcdir}"/0003-strace.cc-Don-t-set-MSYS-noglob.patch - git am --committer-date-is-author-date "${srcdir}"/0004-Add-debugging-for-build_argv.patch - git am --committer-date-is-author-date "${srcdir}"/0005-Add-debugging-for-strace-make_command_line.patch - git am --committer-date-is-author-date "${srcdir}"/0006-environ.cc-New-facility-environment-variable-MSYS2_E.patch - git am --committer-date-is-author-date "${srcdir}"/0007-path.cc-Ignore-zero-length-exclusions.patch + git am --committer-date-is-author-date "${srcdir}"/0001-Add-MSYS-triplets.patch + git am --committer-date-is-author-date "${srcdir}"/0002-Rename-DLL-from-cygwin-to-msys.patch + git am --committer-date-is-author-date "${srcdir}"/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch + git am --committer-date-is-author-date "${srcdir}"/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch + git am --committer-date-is-author-date "${srcdir}"/0005-Move-root-to-usr.-Change-sorting-mount-points.-Do-no.patch + git am --committer-date-is-author-date "${srcdir}"/0006-Do-not-create-cygwin-symlinks.-Instead-use-deep-copy.patch + git am --committer-date-is-author-date "${srcdir}"/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch + git am --committer-date-is-author-date "${srcdir}"/0008-Do-not-convert-environment-for-strace.patch + git am --committer-date-is-author-date "${srcdir}"/0009-convert-be-more-careful-to-stay-within-the-buffer.patch + git am --committer-date-is-author-date "${srcdir}"/0010-convert-check-safely-whether-we-could-allocate-the-b.patch + git am --committer-date-is-author-date "${srcdir}"/0011-convert-use-the-elegant-realloc-call.patch + git am --committer-date-is-author-date "${srcdir}"/0012-convert-plug-potential-memory-leak.patch + git am --committer-date-is-author-date "${srcdir}"/0013-convert-warn-when-we-cut-off-a-path.patch + git am --committer-date-is-author-date "${srcdir}"/0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch + git am --committer-date-is-author-date "${srcdir}"/0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch + git am --committer-date-is-author-date "${srcdir}"/0016-Special-case-for-converting-root-directory-to-have-t.patch + git am --committer-date-is-author-date "${srcdir}"/0020-dcrt0.cc-Untangle-allow_glob-from-winshell.patch + git am --committer-date-is-author-date "${srcdir}"/0021-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch + git am --committer-date-is-author-date "${srcdir}"/0022-strace.cc-Don-t-set-MSYS-noglob.patch + git am --committer-date-is-author-date "${srcdir}"/0023-Add-debugging-for-build_argv.patch + git am --committer-date-is-author-date "${srcdir}"/0024-Add-debugging-for-strace-make_command_line.patch + git am --committer-date-is-author-date "${srcdir}"/0025-environ.cc-New-facility-environment-variable-MSYS2_E.patch + git am --committer-date-is-author-date "${srcdir}"/0026-path.cc-Ignore-zero-length-exclusions.patch } build() { From 387ff5d6238a6d1749f69ed265f3b4360d58d3af Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Mon, 16 May 2016 07:46:31 -0400 Subject: [PATCH 021/101] ccache 3.2.5 - add validpgpkeys array --- ccache/PKGBUILD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ccache/PKGBUILD b/ccache/PKGBUILD index 2abf1fea763..3a5393922d8 100644 --- a/ccache/PKGBUILD +++ b/ccache/PKGBUILD @@ -3,7 +3,7 @@ pkgname=ccache pkgver=3.2.5 -pkgrel=1 +pkgrel=2 pkgdesc="A compiler cache (mingw-w64)" arch=('i686' 'x86_64') url="https://ccache.samba.org/" @@ -15,6 +15,7 @@ options=('staticlibs' 'strip') install="${pkgname}.install" source=(https://samba.org/ftp/ccache/${pkgname}-${pkgver}.tar.bz2{,.asc} "MSYS2-dont-use-symlinks.patch") +validpgpkeys=("5A939A71A46792CF57866A51996DDA075594ADB8") #Joel Rosdahl sha256sums=('7a553809e90faf9de3a23ee9c5b5f786cfd4836bf502744bedb824a24bee1097' 'SKIP' 'a0d2ea2ef1c9e59d4e5fdd659d291a4c7f4afc48ad50b1bc00f77349337d3167') From 7f1a65b248285cf517a5ce7e617e4a4feefe1cf0 Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Mon, 16 May 2016 08:05:07 -0400 Subject: [PATCH 022/101] gdb 7.9 - add validpgpkeys --- gdb/PKGBUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/gdb/PKGBUILD b/gdb/PKGBUILD index ef76311d099..1f7e7d7dda2 100644 --- a/gdb/PKGBUILD +++ b/gdb/PKGBUILD @@ -18,6 +18,7 @@ source=("https://ftp.gnu.org/gnu/gdb/gdb-${pkgver}.tar.xz"{,.sig} 'gdb-7.8.1-msysize.patch' '7.8-symtab-cygwin.patch' '7.8-windows-nat-cygwin.patch') +validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3') sha256sums=('9b315651a16528f7af8c7d8284699fb0c965df316cc7339bb0b7bae335848392' 'SKIP' '2bbe7eddb1828c394d0ff99777058df79b1a596172603bb0e30d983fc1ea8785' From 5f843f61e3a1f87d743e6fe1940431b49919b938 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 16 May 2016 17:38:13 +0200 Subject: [PATCH 023/101] subversion: add missing compile time dependency: gmp-devel Without this package, the build fails in a rather non-obvious way: when compiling the Ruby bindings, the build will fail with a "none not found"... Signed-off-by: Johannes Schindelin --- subversion/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subversion/PKGBUILD b/subversion/PKGBUILD index d9a7d4f9c9e..7790e172396 100644 --- a/subversion/PKGBUILD +++ b/subversion/PKGBUILD @@ -9,7 +9,7 @@ url="https://subversion.apache.org/" license=('APACHE') groups=('VCS') depends=('libsqlite' 'file' 'libserf' 'libsasl') -makedepends=('python2' 'perl' 'swig' 'ruby' 'libsqlite-devel' 'libserf-devel' 'libsasl-devel') +makedepends=('python2' 'perl' 'swig' 'ruby' 'libsqlite-devel' 'libserf-devel' 'libsasl-devel' 'gmp-devel') optdepends=('bash-completion: for svn bash completion' 'python2: for some hook scripts' 'ruby: for some hook scripts') From 5aed66d8f1a64a5e0ed80178920174d6e2396806 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 15 May 2016 16:46:23 +0200 Subject: [PATCH 024/101] Update Subversion to version 1.9.4 Version 1.9.4 has been released on April 28th, 2016: http://subversion.apache.org/news.html Signed-off-by: Johannes Schindelin --- subversion/PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subversion/PKGBUILD b/subversion/PKGBUILD index 7790e172396..f3b102cb6cc 100644 --- a/subversion/PKGBUILD +++ b/subversion/PKGBUILD @@ -1,8 +1,8 @@ # Maintainer: Alexey Pavlov pkgname=subversion -pkgver=1.9.3 -pkgrel=2 +pkgver=1.9.4 +pkgrel=1 pkgdesc="A Modern Concurrent Version Control System" arch=('i686' 'x86_64') url="https://subversion.apache.org/" @@ -40,7 +40,7 @@ source=(https://archive.apache.org/dist/subversion/subversion-${pkgver}.tar.bz2{ subversion-1.9.1-msys2.patch remove-checking-symlink.patch 90-use-copy-instead-symlink.patch) -sha256sums=('8bbf6bb125003d88ee1c22935a36b7b1ab7d957e0c8b5fbfe5cb6310b6e86ae0' +sha256sums=('1267f9e2ab983f260623bee841e6c9cc458bf4bf776238ed5f100983f79e9299' 'SKIP' 'b09dd041aba0078c8d50df130ef2f96c3ef8486279a620532fef4fe48ef9961e' 'cc0367818850e39ccaaeacf6df77303a6ec180017455d7b10c6c68ea024d4e6f' From 1f1b77774d535f65683e7737eaa1cfde5d6c666d Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Tue, 17 May 2016 04:57:32 -0400 Subject: [PATCH 025/101] xmlto: 0.0.28 - update to latest version xmlto: 0.0.28 - update to latest version --- xmlto/PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmlto/PKGBUILD b/xmlto/PKGBUILD index 5c71f1f6019..993e9d3a963 100644 --- a/xmlto/PKGBUILD +++ b/xmlto/PKGBUILD @@ -1,8 +1,8 @@ # Maintainer: Alexey Pavlov pkgname=xmlto -pkgver=0.0.26 -pkgrel=2 +pkgver=0.0.28 +pkgrel=1 pkgdesc="Convert xml to many other formats" arch=('i686' 'x86_64') url="http://cyberelk.net/tim/software/xmlto/" @@ -11,7 +11,7 @@ groups=('base-devel') depends=('libxslt' 'perl-YAML-Syck' 'perl-Test-Pod') makedepends=('docbook-xsl') source=("https://fedorahosted.org/releases/x/m/${pkgname}/${pkgname}-${pkgver}.tar.bz2") -sha256sums=('efb49b2fb3bc27c1a1e24fe34abf19b6bf6cbb40844e6fd58034cdf21c54b5ec') +sha256sums=('1130df3a7957eb9f6f0d29e4aa1c75732a7dfb6d639be013859b5c7ec5421276') build() { cd "$srcdir/${pkgname}-${pkgver}" From f4207b1a3db64395b0dc51b2bd601e98acae9d74 Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Tue, 17 May 2016 06:19:42 -0400 Subject: [PATCH 026/101] nettle 3.2 - Update to latest version and add patch for tests nettle 3.2 - Update to latest version and add patch for tests --- nettle/3.0-dlopen-test-msys-test.patch | 11 +++++++++++ nettle/PKGBUILD | 7 ++++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 nettle/3.0-dlopen-test-msys-test.patch diff --git a/nettle/3.0-dlopen-test-msys-test.patch b/nettle/3.0-dlopen-test-msys-test.patch new file mode 100644 index 00000000000..de512c224d2 --- /dev/null +++ b/nettle/3.0-dlopen-test-msys-test.patch @@ -0,0 +1,11 @@ +--- nettle-3.2/testsuite/dlopen-test.c.orig 2016-05-16 12:09:42.904653700 -0400 ++++ nettle-3.2/testsuite/dlopen-test.c 2016-05-16 12:13:04.290831000 -0400 +@@ -9,7 +9,7 @@ + main (int argc UNUSED, char **argv UNUSED) + { + #if HAVE_LIBDL +- void *handle = dlopen ("../libnettle.so", RTLD_NOW); ++ void *handle = dlopen ("../msys-nettle-6.dll", RTLD_NOW); + int (*get_version)(void); + if (!handle) + { diff --git a/nettle/PKGBUILD b/nettle/PKGBUILD index 9cbd9034a07..e6ac84c3fe9 100644 --- a/nettle/PKGBUILD +++ b/nettle/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alexey Pavlov pkgname=('nettle' 'libnettle' 'libhogweed' 'libnettle-devel') -pkgver=3.1.1 +pkgver=3.2 pkgrel=1 pkgdesc="A low-level cryptographic library" arch=('i686' 'x86_64') @@ -13,7 +13,8 @@ makedepends=('gmp-devel') source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.sig} 2.6-soname.patch nettle-2.6-msys2.patch) -sha256sums=('5fd4d25d64d8ddcb85d0d897572af73b05b4d163c6cc49438a5bfbb8ff293d4c' +validpgpkeys=('343C2FF0FBEE5EC2EDBEF399F3599FF828C67298') +sha256sums=('ea4283def236413edab5a4cf9cf32adf540c8df1b9b67641cfc2302fca849d97' 'SKIP' '489c8de40d074a8555e40ff4a82069cee260481c5ecace64d4b2acf9d7a64409' 'fa52086b5a246a1536293c9a53fbc053ac06c028e3cd501295660c044b436a9f') @@ -23,7 +24,7 @@ prepare() { patch -p2 -i ${srcdir}/2.6-soname.patch patch -p1 -i ${srcdir}/nettle-2.6-msys2.patch - + patch -p1 -i ${srcdir}/3.0-dlopen-test-msys-test.patch autoreconf -fi } From 19c4fd99f609725a2b84518a1181938be8088ffa Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Tue, 17 May 2016 11:53:25 +0100 Subject: [PATCH 027/101] git: Update to 2.8.2 and allow Windows-mixed paths Fixes https://github.com/Alexpux/MSYS2-packages/issues/554 --- git/PKGBUILD | 12 +-- ...=> git-2.8.2-Cygwin-Allow-DOS-paths.patch} | 101 ++++++++++-------- 2 files changed, 64 insertions(+), 49 deletions(-) rename git/{git-2.8.1-Cygwin-Allow-DOS-paths.patch => git-2.8.2-Cygwin-Allow-DOS-paths.patch} (66%) diff --git a/git/PKGBUILD b/git/PKGBUILD index e48e752210e..6f18687aa4f 100644 --- a/git/PKGBUILD +++ b/git/PKGBUILD @@ -2,8 +2,8 @@ # Maintainer: Ray Donnelly pkgname=git -pkgver=2.8.1 -pkgrel=5 +pkgver=2.8.2 +pkgrel=1 pkgdesc="The fast distributed version control system" arch=('i686' 'x86_64') url="https://git-scm.com/" @@ -49,13 +49,13 @@ source=("${pkgname}-${pkgver}.tar.gz"::https://github.com/git/git/archive/v${pkg git-1.9.0-manifest-msys2.patch git-1.8.4-msys2.patch git-2.3.5-mingw-pwd.patch - git-2.8.1-Cygwin-Allow-DOS-paths.patch) -sha256sums=('e08503ecaf5d3ac10c40f22871c996a392256c8d038d16f52ebf974cba29ae42' + git-2.8.2-Cygwin-Allow-DOS-paths.patch) +sha256sums=('b8645cb549f8f7210495fea36fa968de6537ad3c74be17d45e53c99f5b0c4de4' 'c5e735d829e11f79e2d508b663d0924030498f48fc716881031fb975dbf187a5' 'deb39583002770bdfb3d612562e9db73cd6fbd6cc6639fc5d3aeeae25e54ebcc' 'a82df3fc9a80b9f9003a9b9feca063413b14630c043c0b2b88bf2c61c46154cc' 'f67412f829e026b677d4c3ceacfb21da0549ad4636fb07c283e52c3fd5aa3e22' - 'fb405b47c5de08ba73082db959222f5ec87568794e002533cc0b1dcb7edad3d4') + 'fb0e003f686a6d7c676d40144d16d4ba4ff38f28f7928e4401d95f198029f35e') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -65,7 +65,7 @@ prepare() { patch -p1 -i "${srcdir}"/git-1.9.0-manifest-msys2.patch patch -p1 -i "${srcdir}"/git-1.8.4-msys2.patch patch -p2 -i "${srcdir}"/git-2.3.5-mingw-pwd.patch - patch -p1 -i "${srcdir}"/git-2.8.1-Cygwin-Allow-DOS-paths.patch + patch -p1 -i "${srcdir}"/git-2.8.2-Cygwin-Allow-DOS-paths.patch local _arch= if [ "${CARCH}" == 'x86_64' ]; then diff --git a/git/git-2.8.1-Cygwin-Allow-DOS-paths.patch b/git/git-2.8.2-Cygwin-Allow-DOS-paths.patch similarity index 66% rename from git/git-2.8.1-Cygwin-Allow-DOS-paths.patch rename to git/git-2.8.2-Cygwin-Allow-DOS-paths.patch index b2b5ac7de1c..21eabd2c2ab 100644 --- a/git/git-2.8.1-Cygwin-Allow-DOS-paths.patch +++ b/git/git-2.8.2-Cygwin-Allow-DOS-paths.patch @@ -1,5 +1,18 @@ ---- git-2.8.1/cache.h.orig 2016-04-03 18:14:12.000000000 +0100 -+++ git-2.8.1/cache.h 2016-04-21 11:10:05.248614400 +0100 +diff -urN git-2.8.2-orig/builtin/clone.c git-2.8.2/builtin/clone.c +--- git-2.8.2-orig/builtin/clone.c 2016-05-17 11:31:07.469884100 +0100 ++++ git-2.8.2/builtin/clone.c 2016-05-17 11:31:16.899423500 +0100 +@@ -887,7 +887,7 @@ + die(_("depth %s is not a positive number"), option_depth); + + if (argc == 2) +- dir = xstrdup(argv[1]); ++ dir = maybe_xstrdup_cyg_conv_path(argv[1], 1); + else + dir = guess_dir_name(repo_name, is_bundle, option_bare); + strip_trailing_slashes(dir); +diff -urN git-2.8.2-orig/cache.h git-2.8.2/cache.h +--- git-2.8.2-orig/cache.h 2016-05-17 11:31:07.561889400 +0100 ++++ git-2.8.2/cache.h 2016-05-17 11:31:16.884422600 +0100 @@ -989,6 +989,7 @@ int normalize_path_copy(char *dst, const char *src); int longest_ancestor_length(const char *path, struct string_list *prefixes); @@ -8,8 +21,9 @@ int daemon_avoid_alias(const char *path); extern int is_ntfs_dotgit(const char *name); ---- git-2.8.1/path.c.orig 2016-04-21 10:47:09.080902100 +0100 -+++ git-2.8.1/path.c 2016-04-21 11:09:35.644921100 +0100 +diff -urN git-2.8.2-orig/path.c git-2.8.2/path.c +--- git-2.8.2-orig/path.c 2016-05-17 11:31:06.252814500 +0100 ++++ git-2.8.2/path.c 2016-05-17 11:38:34.828471600 +0100 @@ -6,6 +6,10 @@ #include "string-list.h" #include "dir.h" @@ -21,17 +35,27 @@ static int get_st_mode_bits(const char *path, int *mode) { struct stat st; -@@ -1101,6 +1105,29 @@ +@@ -1101,6 +1105,39 @@ return xstrndup(path, chomp_trailing_dir_sep(path, path_len)); } ++/* We're deliberately not changing the normal has_dos_drive_prefix ++ * here, since doing that would likely have unintended side-effects ++ * This version is only for maybe_xstrdup_cyg_conv_path which is ++ * called in very specific cases. ++ */ ++#if defined(__CYGWIN__) ++#define cyg_conv_has_dos_drive_prefix(path) \ ++ (isalpha(*(path)) && (path)[1] == ':' ? 2 : 0) ++#endif ++ +/* + * Avoids duplicating `path` if not needed unless `always_dupe` is non-zero. + */ +char *maybe_xstrdup_cyg_conv_path(const char *path, int always_dupe) +{ +#if defined(__CYGWIN__) -+ int dos_prefix = has_dos_drive_prefix(path) ? 1 : 0; ++ int dos_prefix = cyg_conv_has_dos_drive_prefix(path) ? 1 : 0; + int backslash = strchr(path, '\\') ? 1 : 0; + if (dos_prefix || backslash) + { @@ -51,43 +75,9 @@ int daemon_avoid_alias(const char *p) { int sl, ndot; ---- git-2.8.1/strbuf.c.orig 2016-04-03 18:14:12.000000000 +0100 -+++ git-2.8.1/strbuf.c 2016-04-21 11:16:24.612312700 +0100 -@@ -665,6 +665,10 @@ - - void strbuf_add_absolute_path(struct strbuf *sb, const char *path) - { -+#if defined(__CYGWIN__) -+ const char *in_path = path; -+ path = maybe_xstrdup_cyg_conv_path(path, 0); -+#endif - if (!*path) - die("The empty string is not a valid path"); - if (!is_absolute_path(path)) { -@@ -686,6 +690,10 @@ - free(cwd); - } - strbuf_addstr(sb, path); -+#if defined(__CYGWIN__) -+ if (in_path != path) -+ free((void*)path); -+#endif - } - - int printf_ln(const char *fmt, ...) ---- git-2.8.1/builtin/clone.c.orig 2016-04-03 18:14:12.000000000 +0100 -+++ git-2.8.1/builtin/clone.c 2016-04-21 11:09:52.730898400 +0100 -@@ -887,7 +887,7 @@ - die(_("depth %s is not a positive number"), option_depth); - - if (argc == 2) -- dir = xstrdup(argv[1]); -+ dir = maybe_xstrdup_cyg_conv_path(argv[1], 1); - else - dir = guess_dir_name(repo_name, is_bundle, option_bare); - strip_trailing_slashes(dir); ---- git-2.8.1/pathspec.c.orig 2016-04-03 18:14:12.000000000 +0100 -+++ git-2.8.1/pathspec.c 2016-04-21 12:20:38.203725500 +0100 +diff -urN git-2.8.2-orig/pathspec.c git-2.8.2/pathspec.c +--- git-2.8.2-orig/pathspec.c 2016-05-17 11:31:06.253814600 +0100 ++++ git-2.8.2/pathspec.c 2016-05-17 11:31:16.903423700 +0100 @@ -107,6 +107,10 @@ const char *prefix, int prefixlen, const char *elt) @@ -110,3 +100,28 @@ return magic; } +diff -urN git-2.8.2-orig/strbuf.c git-2.8.2/strbuf.c +--- git-2.8.2-orig/strbuf.c 2016-05-17 11:31:06.336819300 +0100 ++++ git-2.8.2/strbuf.c 2016-05-17 11:31:16.893423100 +0100 +@@ -671,6 +671,10 @@ + + void strbuf_add_absolute_path(struct strbuf *sb, const char *path) + { ++#if defined(__CYGWIN__) ++ const char *in_path = path; ++ path = maybe_xstrdup_cyg_conv_path(path, 0); ++#endif + if (!*path) + die("The empty string is not a valid path"); + if (!is_absolute_path(path)) { +@@ -692,6 +696,10 @@ + free(cwd); + } + strbuf_addstr(sb, path); ++#if defined(__CYGWIN__) ++ if (in_path != path) ++ free((void*)path); ++#endif + } + + int printf_ln(const char *fmt, ...) From 73649cd0a322b1e7ed9ef5e7907f05d2cbae5def Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Tue, 17 May 2016 06:39:03 -0400 Subject: [PATCH 028/101] libarchive 3.2 - Update to new version Update to new version 3.2 and rekey msys2.patch. Remove 0001-mtree-fix-line-filename-length-calculation.patch', libarchive-3.1.3-CVE-2013-0211_read_buffer_overflow.patch, libarchive-3.1.2-acl.patch, and 'libarchive-3.1.2-sparce-mtree.patch because they are in the source-code now. Add validpgpkeys array --- ...fix-line-filename-length-calculation.patch | 29 -- libarchive/PKGBUILD | 35 +- libarchive/libarchive-3.1.2-acl.patch | 219 -------- .../libarchive-3.1.2-sparce-mtree.patch | 478 ------------------ ...3-CVE-2013-0211_read_buffer_overflow.patch | 31 -- ...ys2.patch => libarchive-3.2.0-msys2.patch} | 46 +- nettle/3.0-dlopen-test-msys-test.patch | 11 - nettle/3.2-dlopen-test-msys-test.patch | 15 + nettle/PKGBUILD | 8 +- 9 files changed, 50 insertions(+), 822 deletions(-) delete mode 100644 libarchive/0001-mtree-fix-line-filename-length-calculation.patch delete mode 100644 libarchive/libarchive-3.1.2-acl.patch delete mode 100644 libarchive/libarchive-3.1.2-sparce-mtree.patch delete mode 100644 libarchive/libarchive-3.1.3-CVE-2013-0211_read_buffer_overflow.patch rename libarchive/{libarchive-3.1.2-msys2.patch => libarchive-3.2.0-msys2.patch} (70%) delete mode 100644 nettle/3.0-dlopen-test-msys-test.patch create mode 100644 nettle/3.2-dlopen-test-msys-test.patch diff --git a/libarchive/0001-mtree-fix-line-filename-length-calculation.patch b/libarchive/0001-mtree-fix-line-filename-length-calculation.patch deleted file mode 100644 index a255f2cf2ee..00000000000 --- a/libarchive/0001-mtree-fix-line-filename-length-calculation.patch +++ /dev/null @@ -1,29 +0,0 @@ -From e65bf287f0133426b26611fe3e80b51267987106 Mon Sep 17 00:00:00 2001 -From: Dave Reisner -Date: Thu, 21 Feb 2013 19:01:06 -0500 -Subject: [PATCH] mtree: fix line filename length calculation. Fixes #301. - Signed-off-by: Andres Mejia - ---- - libarchive/archive_write_set_format_mtree.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libarchive/archive_write_set_format_mtree.c b/libarchive/archive_write_set_format_mtree.c -index 9c0613c..f37f723 100644 ---- a/libarchive/archive_write_set_format_mtree.c -+++ b/libarchive/archive_write_set_format_mtree.c -@@ -1855,9 +1855,9 @@ mtree_entry_setup_filenames(struct archive_write *a, struct mtree_entry *file, - return (ret); - } - -- /* Make a basename from dirname and slash */ -+ /* Make a basename from file->parentdir.s and slash */ - *slash = '\0'; -- file->parentdir.length = slash - dirname; -+ file->parentdir.length = slash - file->parentdir.s; - archive_strcpy(&(file->basename), slash + 1); - return (ret); - } --- -1.8.1.4 - diff --git a/libarchive/PKGBUILD b/libarchive/PKGBUILD index b1fb4a6fb62..83204695823 100644 --- a/libarchive/PKGBUILD +++ b/libarchive/PKGBUILD @@ -1,8 +1,8 @@ # Maintainer: Alexey Pavlov pkgname=('libarchive' 'libarchive-devel' 'bsdcpio' 'bsdtar') -pkgver=3.1.2 -pkgrel=5 +pkgver=3.2.0 +pkgrel=1 pkgdesc="library that can create and read several streaming archive formats" arch=('i686' 'x86_64') url="http://libarchive.org/" @@ -13,36 +13,15 @@ makedepends=('libbz2-devel' 'libiconv-devel' 'liblzma-devel' 'liblzo2-devel' 'li options=('!strip' 'debug' 'libtool') # provides=('libarchive.so') source=("http://libarchive.org/downloads/$pkgname-$pkgver.tar.gz" - '0001-mtree-fix-line-filename-length-calculation.patch' - 'libarchive-3.1.3-CVE-2013-0211_read_buffer_overflow.patch' - 'libarchive-3.1.2-acl.patch' - 'libarchive-3.1.2-msys2.patch' - 'libarchive-3.1.2-sparce-mtree.patch') -sha256sums=('eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e' - 'd6f82f33bb35680d391476225fcdbb1bf67b4ffb1e8c8094d89fbf907ebd1e63' - '2e390980be2bce0da109847e61164e38fb41f5ad203ddbf7f0426bad4d16b980' - '41f94b16da2acb8af4c441b221736f0f7fec4ac5ba6ed29e3ccfb8b30e2322e6' - '031e4c9f096e007c50e6d5f7ef955a2f0527f80f301e6832ca0b24dd409f26c5' - '0964edfa27c189b667e3a3424ab7e6a03460e9735210f6e4f07fcecef596e7d6') + 'libarchive-3.2.0-msys2.patch') +sha256sums=('7bce45fd71ff01dc20d19edd78322d4965583d81b8bed8e26cacb65d6f5baa87' + '639f316243509470c6f8132e59104a49bfb8df61be9722887d145a1b7262286c') prepare() { cd "$pkgname-$pkgver" - # https://code.google.com/p/libarchive/issues/detail?id=301 - # upstream commit e65bf287f0133426b26611fe3e80b51267987106 - patch -Np1 -i "$srcdir/0001-mtree-fix-line-filename-length-calculation.patch" - - # https://code.google.com/p/libarchive/issues/detail?id=329 - patch -Np1 -i "$srcdir/libarchive-3.1.2-acl.patch" - - # CVE-2013-0211 - patch -Np1 -i "$srcdir/libarchive-3.1.3-CVE-2013-0211_read_buffer_overflow.patch" - - # upstream commit 977bf2a4 - improved mtree support - patch -p1 -i $srcdir/libarchive-3.1.2-sparce-mtree.patch - # msysize patch - patch -Np1 -i "$srcdir/libarchive-3.1.2-msys2.patch" + patch -Np1 -i "$srcdir/libarchive-3.2.0-msys2.patch" autoreconf -ivf } @@ -63,7 +42,7 @@ build() { check() { cd "$pkgname-$pkgver" - #make check + #make check | true } package_bsdcpio() { diff --git a/libarchive/libarchive-3.1.2-acl.patch b/libarchive/libarchive-3.1.2-acl.patch deleted file mode 100644 index ce563b0c17e..00000000000 --- a/libarchive/libarchive-3.1.2-acl.patch +++ /dev/null @@ -1,219 +0,0 @@ -diff -ruN libarchive-3.1.2/libarchive/archive_read_disk_entry_from_file.c libarchive-3.1.2.fixed/libarchive/archive_read_disk_entry_from_file.c ---- libarchive-3.1.2/libarchive/archive_read_disk_entry_from_file.c 2013-02-08 01:52:07.000000000 +0100 -+++ libarchive-3.1.2.fixed/libarchive/archive_read_disk_entry_from_file.c 2013-08-08 10:47:41.000000000 +0200 -@@ -399,7 +399,7 @@ - #endif - - --#if defined(HAVE_POSIX_ACL) && defined(ACL_TYPE_NFS4) -+#ifdef HAVE_POSIX_ACL - static int translate_acl(struct archive_read_disk *a, - struct archive_entry *entry, acl_t acl, int archive_entry_acl_type); - -@@ -419,6 +419,7 @@ - - archive_entry_acl_clear(entry); - -+#ifdef ACL_TYPE_NFS4 - /* Try NFS4 ACL first. */ - if (*fd >= 0) - acl = acl_get_fd(*fd); -@@ -447,6 +448,7 @@ - acl_free(acl); - return (ARCHIVE_OK); - } -+#endif - - /* Retrieve access ACL from file. */ - if (*fd >= 0) -@@ -492,6 +494,7 @@ - {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, - {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, - {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, -+#ifdef ACL_TYPE_NFS4 - {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, - {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, - {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, -@@ -508,8 +511,10 @@ - {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, - {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, - {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} -+#endif - }; - -+#ifdef ACL_TYPE_NFS4 - static struct { - int archive_inherit; - int platform_inherit; -@@ -519,21 +524,25 @@ - {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY} - }; -- -+#endif - static int - translate_acl(struct archive_read_disk *a, - struct archive_entry *entry, acl_t acl, int default_entry_acl_type) - { - acl_tag_t acl_tag; -+#ifdef ACL_TYPE_NFS4 - acl_entry_type_t acl_type; - acl_flagset_t acl_flagset; -+ int brand, r; -+#endif - acl_entry_t acl_entry; - acl_permset_t acl_permset; -- int brand, i, r, entry_acl_type; -+ int i, entry_acl_type; - int s, ae_id, ae_tag, ae_perm; - const char *ae_name; - - -+#ifdef ACL_TYPE_NFS4 - // FreeBSD "brands" ACLs as POSIX.1e or NFSv4 - // Make sure the "brand" on this ACL is consistent - // with the default_entry_acl_type bits provided. -@@ -560,6 +569,7 @@ - return ARCHIVE_FAILED; - break; - } -+#endif - - - s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry); -@@ -592,9 +602,11 @@ - case ACL_OTHER: - ae_tag = ARCHIVE_ENTRY_ACL_OTHER; - break; -+#ifdef ACL_TYPE_NFS4 - case ACL_EVERYONE: - ae_tag = ARCHIVE_ENTRY_ACL_EVERYONE; - break; -+#endif - default: - /* Skip types that libarchive can't support. */ - s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); -@@ -605,6 +617,7 @@ - // XXX acl_get_entry_type_np on FreeBSD returns EINVAL for - // non-NFSv4 ACLs - entry_acl_type = default_entry_acl_type; -+#ifdef ACL_TYPE_NFS4 - r = acl_get_entry_type_np(acl_entry, &acl_type); - if (r == 0) { - switch (acl_type) { -@@ -634,9 +647,10 @@ - ae_perm |= acl_inherit_map[i].archive_inherit; - - } -+#endif - - acl_get_permset(acl_entry, &acl_permset); -- for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { -+ for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { - /* - * acl_get_perm() is spelled differently on different - * platforms; see above. -diff -ruN libarchive-3.1.2/libarchive/archive_write_disk_acl.c libarchive-3.1.2.fixed/libarchive/archive_write_disk_acl.c ---- libarchive-3.1.2/libarchive/archive_write_disk_acl.c 2013-01-14 02:43:45.000000000 +0100 -+++ libarchive-3.1.2.fixed/libarchive/archive_write_disk_acl.c 2013-08-08 10:31:35.000000000 +0200 -@@ -43,7 +43,7 @@ - #include "archive_acl_private.h" - #include "archive_write_disk_private.h" - --#if !defined(HAVE_POSIX_ACL) || !defined(ACL_TYPE_NFS4) -+#ifndef HAVE_POSIX_ACL - /* Default empty function body to satisfy mainline code. */ - int - archive_write_disk_set_acls(struct archive *a, int fd, const char *name, -@@ -79,10 +79,12 @@ - ret = set_acl(a, fd, name, abstract_acl, ACL_TYPE_DEFAULT, - ARCHIVE_ENTRY_ACL_TYPE_DEFAULT, "default"); - return (ret); -+#ifdef ACL_TYPE_NFS4 - } else if (archive_acl_count(abstract_acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4) > 0) { - ret = set_acl(a, fd, name, abstract_acl, ACL_TYPE_NFS4, - ARCHIVE_ENTRY_ACL_TYPE_NFS4, "nfs4"); - return (ret); -+#endif - } else - return ARCHIVE_OK; - } -@@ -94,6 +96,7 @@ - {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, - {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, - {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, -+#ifdef ACL_TYPE_NFS4 - {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, - {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, - {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, -@@ -110,8 +113,10 @@ - {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, - {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, - {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} -+#endif - }; - -+#ifdef ACL_TYPE_NFS4 - static struct { - int archive_inherit; - int platform_inherit; -@@ -121,6 +126,7 @@ - {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY} - }; -+#endif - - static int - set_acl(struct archive *a, int fd, const char *name, -@@ -130,7 +136,9 @@ - acl_t acl; - acl_entry_t acl_entry; - acl_permset_t acl_permset; -+#ifdef ACL_TYPE_NFS4 - acl_flagset_t acl_flagset; -+#endif - int ret; - int ae_type, ae_permset, ae_tag, ae_id; - uid_t ae_uid; -@@ -171,14 +179,17 @@ - case ARCHIVE_ENTRY_ACL_OTHER: - acl_set_tag_type(acl_entry, ACL_OTHER); - break; -+#ifdef ACL_TYPE_NFS4 - case ARCHIVE_ENTRY_ACL_EVERYONE: - acl_set_tag_type(acl_entry, ACL_EVERYONE); - break; -+#endif - default: - /* XXX */ - break; - } - -+#ifdef ACL_TYPE_NFS4 - switch (ae_type) { - case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: - acl_set_entry_type_np(acl_entry, ACL_ENTRY_TYPE_ALLOW); -@@ -200,6 +211,7 @@ - // XXX error handling here. - break; - } -+#endif - - acl_get_permset(acl_entry, &acl_permset); - acl_clear_perms(acl_permset); -@@ -210,6 +222,7 @@ - acl_perm_map[i].platform_perm); - } - -+#ifdef ACL_TYPE_NFS4 - acl_get_flagset_np(acl_entry, &acl_flagset); - acl_clear_flags_np(acl_flagset); - for (i = 0; i < (int)(sizeof(acl_inherit_map) / sizeof(acl_inherit_map[0])); ++i) { -@@ -217,6 +230,7 @@ - acl_add_flag_np(acl_flagset, - acl_inherit_map[i].platform_inherit); - } -+#endif - } - - /* Try restoring the ACL through 'fd' if we can. */ diff --git a/libarchive/libarchive-3.1.2-sparce-mtree.patch b/libarchive/libarchive-3.1.2-sparce-mtree.patch deleted file mode 100644 index 7b402774938..00000000000 --- a/libarchive/libarchive-3.1.2-sparce-mtree.patch +++ /dev/null @@ -1,478 +0,0 @@ -From 977bf2a49484239f7a7b6ce08bfa9da413a27ead Mon Sep 17 00:00:00 2001 -From: Florian Pritz -Date: Sat, 1 Mar 2014 17:21:47 +0100 -Subject: [PATCH] mtree: Make reading additional information from the fs - optional - -This feature is not needed if users just want to read in the content of -an mtree file and do validation against the file system themselves. - -It is needed for `bsdtar cvf out.tar @input.mtree` which is why the -option is enabled in bsdtar. - -Since the mtree tests rely on this feature, this patch also enables it -there. - -Signed-off-by: Florian Pritz ---- - libarchive/archive_read_support_format_mtree.c | 290 ++++++++++++++----------- - libarchive/test/test_read_format_mtree.c | 20 ++ - tar/write.c | 1 + - 3 files changed, 179 insertions(+), 132 deletions(-) - -diff --git a/libarchive/archive_read_support_format_mtree.c b/libarchive/archive_read_support_format_mtree.c -index 44799df..d82d4c1 100644 ---- a/libarchive/archive_read_support_format_mtree.c -+++ b/libarchive/archive_read_support_format_mtree.c -@@ -104,6 +104,7 @@ struct mtree { - struct archive_entry_linkresolver *resolver; - - int64_t cur_size; -+ char checkfs; - }; - - static int bid_keycmp(const char *, const char *, ssize_t); -@@ -174,6 +175,29 @@ static int read_header(struct archive_read *, - #endif - } - -+static int -+archive_read_format_mtree_options(struct archive_read *a, -+ const char *key, const char *val) -+{ -+ struct mtree *mtree; -+ -+ mtree = (struct mtree *)(a->format->data); -+ if (strcmp(key, "checkfs") == 0) { -+ /* Allows to read information missing from the mtree from the file system */ -+ if (val == NULL || val[0] == 0) { -+ mtree->checkfs = 0; -+ } else { -+ mtree->checkfs = 1; -+ } -+ return (ARCHIVE_OK); -+ } -+ -+ /* Note: The "warn" return is just to inform the options -+ * supervisor that we didn't handle it. It will generate -+ * a suitable error if no one used this option. */ -+ return (ARCHIVE_WARN); -+} -+ - static void - free_options(struct mtree_option *head) - { -@@ -206,7 +230,7 @@ static int read_header(struct archive_read *, - mtree->fd = -1; - - r = __archive_read_register_format(a, mtree, "mtree", -- mtree_bid, NULL, read_header, read_data, skip, NULL, cleanup); -+ mtree_bid, archive_read_format_mtree_options, read_header, read_data, skip, NULL, cleanup); - - if (r != ARCHIVE_OK) - free(mtree); -@@ -1104,162 +1128,164 @@ static int read_header(struct archive_read *, - mtree->current_dir.length = n; - } - -- /* -- * Try to open and stat the file to get the real size -- * and other file info. It would be nice to avoid -- * this here so that getting a listing of an mtree -- * wouldn't require opening every referenced contents -- * file. But then we wouldn't know the actual -- * contents size, so I don't see a really viable way -- * around this. (Also, we may want to someday pull -- * other unspecified info from the contents file on -- * disk.) -- */ -- mtree->fd = -1; -- if (archive_strlen(&mtree->contents_name) > 0) -- path = mtree->contents_name.s; -- else -- path = archive_entry_pathname(entry); -- -- if (archive_entry_filetype(entry) == AE_IFREG || -- archive_entry_filetype(entry) == AE_IFDIR) { -- mtree->fd = open(path, O_RDONLY | O_BINARY | O_CLOEXEC); -- __archive_ensure_cloexec_flag(mtree->fd); -- if (mtree->fd == -1 && -- (errno != ENOENT || -- archive_strlen(&mtree->contents_name) > 0)) { -- archive_set_error(&a->archive, errno, -- "Can't open %s", path); -- r = ARCHIVE_WARN; -+ if (mtree->checkfs) { -+ /* -+ * Try to open and stat the file to get the real size -+ * and other file info. It would be nice to avoid -+ * this here so that getting a listing of an mtree -+ * wouldn't require opening every referenced contents -+ * file. But then we wouldn't know the actual -+ * contents size, so I don't see a really viable way -+ * around this. (Also, we may want to someday pull -+ * other unspecified info from the contents file on -+ * disk.) -+ */ -+ mtree->fd = -1; -+ if (archive_strlen(&mtree->contents_name) > 0) -+ path = mtree->contents_name.s; -+ else -+ path = archive_entry_pathname(entry); -+ -+ if (archive_entry_filetype(entry) == AE_IFREG || -+ archive_entry_filetype(entry) == AE_IFDIR) { -+ mtree->fd = open(path, O_RDONLY | O_BINARY | O_CLOEXEC); -+ __archive_ensure_cloexec_flag(mtree->fd); -+ if (mtree->fd == -1 && -+ (errno != ENOENT || -+ archive_strlen(&mtree->contents_name) > 0)) { -+ archive_set_error(&a->archive, errno, -+ "Can't open %s", path); -+ r = ARCHIVE_WARN; -+ } - } -- } - -- st = &st_storage; -- if (mtree->fd >= 0) { -- if (fstat(mtree->fd, st) == -1) { -- archive_set_error(&a->archive, errno, -- "Could not fstat %s", path); -- r = ARCHIVE_WARN; -- /* If we can't stat it, don't keep it open. */ -- close(mtree->fd); -- mtree->fd = -1; -+ st = &st_storage; -+ if (mtree->fd >= 0) { -+ if (fstat(mtree->fd, st) == -1) { -+ archive_set_error(&a->archive, errno, -+ "Could not fstat %s", path); -+ r = ARCHIVE_WARN; -+ /* If we can't stat it, don't keep it open. */ -+ close(mtree->fd); -+ mtree->fd = -1; -+ st = NULL; -+ } -+ } else if (lstat(path, st) == -1) { - st = NULL; - } -- } else if (lstat(path, st) == -1) { -- st = NULL; -- } - -- /* -- * Check for a mismatch between the type in the specification and -- * the type of the contents object on disk. -- */ -- if (st != NULL) { -- if ( -- ((st->st_mode & S_IFMT) == S_IFREG && -- archive_entry_filetype(entry) == AE_IFREG) -+ /* -+ * Check for a mismatch between the type in the specification and -+ * the type of the contents object on disk. -+ */ -+ if (st != NULL) { -+ if ( -+ ((st->st_mode & S_IFMT) == S_IFREG && -+ archive_entry_filetype(entry) == AE_IFREG) - #ifdef S_IFLNK -- || ((st->st_mode & S_IFMT) == S_IFLNK && -- archive_entry_filetype(entry) == AE_IFLNK) -+ || ((st->st_mode & S_IFMT) == S_IFLNK && -+ archive_entry_filetype(entry) == AE_IFLNK) - #endif - #ifdef S_IFSOCK -- || ((st->st_mode & S_IFSOCK) == S_IFSOCK && -- archive_entry_filetype(entry) == AE_IFSOCK) -+ || ((st->st_mode & S_IFSOCK) == S_IFSOCK && -+ archive_entry_filetype(entry) == AE_IFSOCK) - #endif - #ifdef S_IFCHR -- || ((st->st_mode & S_IFMT) == S_IFCHR && -- archive_entry_filetype(entry) == AE_IFCHR) -+ || ((st->st_mode & S_IFMT) == S_IFCHR && -+ archive_entry_filetype(entry) == AE_IFCHR) - #endif - #ifdef S_IFBLK -- || ((st->st_mode & S_IFMT) == S_IFBLK && -- archive_entry_filetype(entry) == AE_IFBLK) -+ || ((st->st_mode & S_IFMT) == S_IFBLK && -+ archive_entry_filetype(entry) == AE_IFBLK) - #endif -- || ((st->st_mode & S_IFMT) == S_IFDIR && -- archive_entry_filetype(entry) == AE_IFDIR) -+ || ((st->st_mode & S_IFMT) == S_IFDIR && -+ archive_entry_filetype(entry) == AE_IFDIR) - #ifdef S_IFIFO -- || ((st->st_mode & S_IFMT) == S_IFIFO && -- archive_entry_filetype(entry) == AE_IFIFO) -+ || ((st->st_mode & S_IFMT) == S_IFIFO && -+ archive_entry_filetype(entry) == AE_IFIFO) - #endif -- ) { -- /* Types match. */ -- } else { -- /* Types don't match; bail out gracefully. */ -- if (mtree->fd >= 0) -- close(mtree->fd); -- mtree->fd = -1; -- if (parsed_kws & MTREE_HAS_OPTIONAL) { -- /* It's not an error for an optional entry -- to not match disk. */ -- *use_next = 1; -- } else if (r == ARCHIVE_OK) { -- archive_set_error(&a->archive, -- ARCHIVE_ERRNO_MISC, -- "mtree specification has different type for %s", -- archive_entry_pathname(entry)); -- r = ARCHIVE_WARN; -- } -- return r; -+ ) { -+ /* Types match. */ -+ } else { -+ /* Types don't match; bail out gracefully. */ -+ if (mtree->fd >= 0) -+ close(mtree->fd); -+ mtree->fd = -1; -+ if (parsed_kws & MTREE_HAS_OPTIONAL) { -+ /* It's not an error for an optional entry -+ to not match disk. */ -+ *use_next = 1; -+ } else if (r == ARCHIVE_OK) { -+ archive_set_error(&a->archive, -+ ARCHIVE_ERRNO_MISC, -+ "mtree specification has different type for %s", -+ archive_entry_pathname(entry)); -+ r = ARCHIVE_WARN; -+ } -+ return r; -+ } - } -- } - -- /* -- * If there is a contents file on disk, pick some of the metadata -- * from that file. For most of these, we only set it from the contents -- * if it wasn't already parsed from the specification. -- */ -- if (st != NULL) { -- if (((parsed_kws & MTREE_HAS_DEVICE) == 0 || -- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) && -- (archive_entry_filetype(entry) == AE_IFCHR || -- archive_entry_filetype(entry) == AE_IFBLK)) -- archive_entry_set_rdev(entry, st->st_rdev); -- if ((parsed_kws & (MTREE_HAS_GID | MTREE_HAS_GNAME)) == 0 || -- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) -- archive_entry_set_gid(entry, st->st_gid); -- if ((parsed_kws & (MTREE_HAS_UID | MTREE_HAS_UNAME)) == 0 || -- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) -- archive_entry_set_uid(entry, st->st_uid); -- if ((parsed_kws & MTREE_HAS_MTIME) == 0 || -- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) { -+ /* -+ * If there is a contents file on disk, pick some of the metadata -+ * from that file. For most of these, we only set it from the contents -+ * if it wasn't already parsed from the specification. -+ */ -+ if (st != NULL) { -+ if (((parsed_kws & MTREE_HAS_DEVICE) == 0 || -+ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) && -+ (archive_entry_filetype(entry) == AE_IFCHR || -+ archive_entry_filetype(entry) == AE_IFBLK)) -+ archive_entry_set_rdev(entry, st->st_rdev); -+ if ((parsed_kws & (MTREE_HAS_GID | MTREE_HAS_GNAME)) == 0 || -+ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) -+ archive_entry_set_gid(entry, st->st_gid); -+ if ((parsed_kws & (MTREE_HAS_UID | MTREE_HAS_UNAME)) == 0 || -+ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) -+ archive_entry_set_uid(entry, st->st_uid); -+ if ((parsed_kws & MTREE_HAS_MTIME) == 0 || -+ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) { - #if HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC -- archive_entry_set_mtime(entry, st->st_mtime, -- st->st_mtimespec.tv_nsec); -+ archive_entry_set_mtime(entry, st->st_mtime, -+ st->st_mtimespec.tv_nsec); - #elif HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -- archive_entry_set_mtime(entry, st->st_mtime, -- st->st_mtim.tv_nsec); -+ archive_entry_set_mtime(entry, st->st_mtime, -+ st->st_mtim.tv_nsec); - #elif HAVE_STRUCT_STAT_ST_MTIME_N -- archive_entry_set_mtime(entry, st->st_mtime, -- st->st_mtime_n); -+ archive_entry_set_mtime(entry, st->st_mtime, -+ st->st_mtime_n); - #elif HAVE_STRUCT_STAT_ST_UMTIME -- archive_entry_set_mtime(entry, st->st_mtime, -- st->st_umtime*1000); -+ archive_entry_set_mtime(entry, st->st_mtime, -+ st->st_umtime*1000); - #elif HAVE_STRUCT_STAT_ST_MTIME_USEC -- archive_entry_set_mtime(entry, st->st_mtime, -- st->st_mtime_usec*1000); -+ archive_entry_set_mtime(entry, st->st_mtime, -+ st->st_mtime_usec*1000); - #else -- archive_entry_set_mtime(entry, st->st_mtime, 0); -+ archive_entry_set_mtime(entry, st->st_mtime, 0); - #endif -+ } -+ if ((parsed_kws & MTREE_HAS_NLINK) == 0 || -+ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) -+ archive_entry_set_nlink(entry, st->st_nlink); -+ if ((parsed_kws & MTREE_HAS_PERM) == 0 || -+ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) -+ archive_entry_set_perm(entry, st->st_mode); -+ if ((parsed_kws & MTREE_HAS_SIZE) == 0 || -+ (parsed_kws & MTREE_HAS_NOCHANGE) != 0) -+ archive_entry_set_size(entry, st->st_size); -+ archive_entry_set_ino(entry, st->st_ino); -+ archive_entry_set_dev(entry, st->st_dev); -+ -+ archive_entry_linkify(mtree->resolver, &entry, &sparse_entry); -+ } else if (parsed_kws & MTREE_HAS_OPTIONAL) { -+ /* -+ * Couldn't open the entry, stat it or the on-disk type -+ * didn't match. If this entry is optional, just ignore it -+ * and read the next header entry. -+ */ -+ *use_next = 1; -+ return ARCHIVE_OK; - } -- if ((parsed_kws & MTREE_HAS_NLINK) == 0 || -- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) -- archive_entry_set_nlink(entry, st->st_nlink); -- if ((parsed_kws & MTREE_HAS_PERM) == 0 || -- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) -- archive_entry_set_perm(entry, st->st_mode); -- if ((parsed_kws & MTREE_HAS_SIZE) == 0 || -- (parsed_kws & MTREE_HAS_NOCHANGE) != 0) -- archive_entry_set_size(entry, st->st_size); -- archive_entry_set_ino(entry, st->st_ino); -- archive_entry_set_dev(entry, st->st_dev); -- -- archive_entry_linkify(mtree->resolver, &entry, &sparse_entry); -- } else if (parsed_kws & MTREE_HAS_OPTIONAL) { -- /* -- * Couldn't open the entry, stat it or the on-disk type -- * didn't match. If this entry is optional, just ignore it -- * and read the next header entry. -- */ -- *use_next = 1; -- return ARCHIVE_OK; - } - - mtree->cur_size = archive_entry_size(entry); -diff --git a/libarchive/test/test_read_format_mtree.c b/libarchive/test/test_read_format_mtree.c -index 830fa0a..f96529d 100644 ---- a/libarchive/test/test_read_format_mtree.c -+++ b/libarchive/test/test_read_format_mtree.c -@@ -58,6 +58,8 @@ - assertEqualIntA(a, ARCHIVE_OK, - archive_read_support_format_all(a)); - assertEqualIntA(a, ARCHIVE_OK, -+ archive_read_set_options(a, "mtree:checkfs")); -+ assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_filename(a, reffile, 11)); - - /* -@@ -209,6 +211,8 @@ - assertEqualIntA(a, ARCHIVE_OK, - archive_read_support_format_all(a)); - assertEqualIntA(a, ARCHIVE_OK, -+ archive_read_set_options(a, "mtree:checkfs")); -+ assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_memory(a, archive, sizeof(archive))); - assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); - assertEqualInt(archive_format(a), ARCHIVE_FORMAT_MTREE); -@@ -246,6 +250,8 @@ - assertEqualIntA(a, ARCHIVE_OK, - archive_read_support_format_all(a)); - assertEqualIntA(a, ARCHIVE_OK, -+ archive_read_set_options(a, "mtree:checkfs")); -+ assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_memory(a, archive, sizeof(archive))); - assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); - assertEqualString(archive_entry_pathname(ae), "a"); -@@ -299,6 +305,8 @@ - assertEqualIntA(a, ARCHIVE_OK, - archive_read_support_format_all(a)); - assertEqualIntA(a, ARCHIVE_OK, -+ archive_read_set_options(a, "mtree:checkfs")); -+ assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_memory(a, archive, sizeof(archive))); - assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); - assertEqualString(archive_entry_pathname(ae), "./a"); -@@ -365,6 +373,8 @@ - assertEqualIntA(a, ARCHIVE_OK, - archive_read_support_format_all(a)); - assertEqualIntA(a, ARCHIVE_OK, -+ archive_read_set_options(a, "mtree:checkfs")); -+ assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_memory(a, archive, sizeof(archive))); - assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); - assertEqualString(archive_entry_pathname(ae), "./a"); -@@ -402,6 +412,8 @@ - assertEqualIntA(a, ARCHIVE_OK, - archive_read_support_format_all(a)); - assertEqualIntA(a, ARCHIVE_OK, -+ archive_read_set_options(a, "mtree:checkfs")); -+ assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_memory(a, archive2, sizeof(archive2))); - assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); - assertEqualString(archive_entry_pathname(ae), "./a"); -@@ -449,6 +461,8 @@ - assertEqualIntA(a, ARCHIVE_OK, - archive_read_support_format_all(a)); - assertEqualIntA(a, ARCHIVE_OK, -+ archive_read_set_options(a, "mtree:checkfs")); -+ assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_filename(a, reffile, 11)); - - /* -@@ -552,6 +566,8 @@ - assertEqualIntA(a, ARCHIVE_OK, - archive_read_support_format_all(a)); - assertEqualIntA(a, ARCHIVE_OK, -+ archive_read_set_options(a, "mtree:checkfs")); -+ assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_filename(a, reffile, 11)); - - /* -@@ -617,6 +633,8 @@ - assertEqualIntA(a, ARCHIVE_OK, - archive_read_support_format_all(a)); - assertEqualIntA(a, ARCHIVE_OK, -+ archive_read_set_options(a, "mtree:checkfs")); -+ assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_filename(a, reffile, 11)); - - /* -@@ -680,6 +698,8 @@ - assertEqualIntA(a, ARCHIVE_OK, - archive_read_support_format_all(a)); - assertEqualIntA(a, ARCHIVE_OK, -+ archive_read_set_options(a, "mtree:checkfs")); -+ assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_memory(a, archive, sizeof(archive))); - assertEqualIntA(a, ARCHIVE_WARN, archive_read_next_header(a, &ae)); - assert(strlen(archive_error_string(a)) > 0); -diff --git a/tar/write.c b/tar/write.c -index 40d2fb0..7e8cb13 100644 ---- a/tar/write.c -+++ b/tar/write.c -@@ -648,6 +648,7 @@ static void write_hierarchy(struct bsdtar *, struct archive *, - archive_read_support_format_all(ina); - archive_read_support_filter_all(ina); - set_reader_options(bsdtar, a); -+ archive_read_set_options(ina, "mtree:checkfs"); - if (archive_read_open_filename(ina, filename, - bsdtar->bytes_per_block)) { - lafe_warnc(0, "%s", archive_error_string(ina)); --- -1.8.5.5 - diff --git a/libarchive/libarchive-3.1.3-CVE-2013-0211_read_buffer_overflow.patch b/libarchive/libarchive-3.1.3-CVE-2013-0211_read_buffer_overflow.patch deleted file mode 100644 index 1ae36a4928a..00000000000 --- a/libarchive/libarchive-3.1.3-CVE-2013-0211_read_buffer_overflow.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 22531545514043e04633e1c015c7540b9de9dbe4 Mon Sep 17 00:00:00 2001 -From: Tim Kientzle -Date: Fri, 22 Mar 2013 23:48:41 -0700 -Subject: [PATCH] Limit write requests to at most INT_MAX. This prevents a - certain common programming error (passing -1 to write) from leading to other - problems deeper in the library. - ---- - libarchive/archive_write.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/libarchive/archive_write.c b/libarchive/archive_write.c -index eede5e0..be85621 100644 ---- a/libarchive/archive_write.c -+++ b/libarchive/archive_write.c -@@ -673,8 +673,13 @@ static ssize_t - _archive_write_data(struct archive *_a, const void *buff, size_t s) - { - struct archive_write *a = (struct archive_write *)_a; -+ const size_t max_write = INT_MAX; -+ - archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC, - ARCHIVE_STATE_DATA, "archive_write_data"); -+ /* In particular, this catches attempts to pass negative values. */ -+ if (s > max_write) -+ s = max_write; - archive_clear_error(&a->archive); - return ((a->format_write_data)(a, buff, s)); - } --- -1.8.1 diff --git a/libarchive/libarchive-3.1.2-msys2.patch b/libarchive/libarchive-3.2.0-msys2.patch similarity index 70% rename from libarchive/libarchive-3.1.2-msys2.patch rename to libarchive/libarchive-3.2.0-msys2.patch index 610d70b8013..f80364d7f11 100644 --- a/libarchive/libarchive-3.1.2-msys2.patch +++ b/libarchive/libarchive-3.2.0-msys2.patch @@ -1,6 +1,6 @@ -diff -Naur libarchive-3.1.2-orig/build/autoconf/compile libarchive-3.1.2/build/autoconf/compile ---- libarchive-3.1.2-orig/build/autoconf/compile 2013-02-09 17:23:09.000000000 +0000 -+++ libarchive-3.1.2/build/autoconf/compile 2013-06-16 08:22:38.561343800 +0000 +diff -Naur libarchive-3.2.0-orig/build/autoconf/compile libarchive-3.2.0/build/autoconf/compile +--- libarchive-3.2.0-orig/build/autoconf/compile 2013-02-09 17:23:09.000000000 +0000 ++++ libarchive-3.2.0/build/autoconf/compile 2013-06-16 08:22:38.561343800 +0000 @@ -54,7 +54,7 @@ MINGW*) file_conv=mingw @@ -19,9 +19,9 @@ diff -Naur libarchive-3.1.2-orig/build/autoconf/compile libarchive-3.1.2/build/a file=`cygpath -m "$file" || echo "$file"` ;; wine/*) -diff -Naur libarchive-3.1.2-orig/build/autoconf/config.guess libarchive-3.1.2/build/autoconf/config.guess ---- libarchive-3.1.2-orig/build/autoconf/config.guess 2013-02-09 17:23:11.000000000 +0000 -+++ libarchive-3.1.2/build/autoconf/config.guess 2013-06-16 08:23:10.436343800 +0000 +diff -Naur libarchive-3.2.0-orig/build/autoconf/config.guess libarchive-3.2.0/build/autoconf/config.guess +--- libarchive-3.2.0-orig/build/autoconf/config.guess 2013-02-09 17:23:11.000000000 +0000 ++++ libarchive-3.2.0/build/autoconf/config.guess 2013-06-16 08:23:10.436343800 +0000 @@ -845,6 +845,9 @@ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin @@ -32,9 +32,9 @@ diff -Naur libarchive-3.1.2-orig/build/autoconf/config.guess libarchive-3.1.2/bu p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; -diff -Naur libarchive-3.1.2-orig/build/autoconf/config.rpath libarchive-3.1.2/build/autoconf/config.rpath ---- libarchive-3.1.2-orig/build/autoconf/config.rpath 2013-01-13 21:10:46.000000000 +0000 -+++ libarchive-3.1.2/build/autoconf/config.rpath 2013-06-16 08:23:47.826968800 +0000 +diff -Naur libarchive-3.2.0-orig/build/autoconf/config.rpath libarchive-3.2.0/build/autoconf/config.rpath +--- libarchive-3.2.0-orig/build/autoconf/config.rpath 2013-01-13 21:10:46.000000000 +0000 ++++ libarchive-3.2.0/build/autoconf/config.rpath 2013-06-16 08:23:47.826968800 +0000 @@ -63,7 +63,7 @@ aix*) wl='-Wl,' @@ -80,10 +80,10 @@ diff -Naur libarchive-3.1.2-orig/build/autoconf/config.rpath libarchive-3.1.2/bu shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; -diff -Naur libarchive-3.1.2-orig/configure.ac libarchive-3.1.2/configure.ac ---- libarchive-3.1.2-orig/configure.ac 2013-02-09 17:23:03.000000000 +0000 -+++ libarchive-3.1.2/configure.ac 2013-06-16 08:22:04.123843800 +0000 -@@ -83,7 +83,7 @@ +diff -aur libarchive-3.2.0-orig/configure.ac libarchive-3.2.0/configure.ac +--- libarchive-3.2.0/configure.ac.orig 2016-04-30 00:44:07.000000000 -0400 ++++ libarchive-3.2.0/configure.ac 2016-05-16 10:09:17.332631100 -0400 +@@ -88,7 +88,7 @@ inc_cygwin_files=no case "$host_os" in *mingw* ) inc_windows_files=yes ;; @@ -92,16 +92,16 @@ diff -Naur libarchive-3.1.2-orig/configure.ac libarchive-3.1.2/configure.ac esac AM_CONDITIONAL([INC_WINDOWS_FILES], [test $inc_windows_files = yes]) AM_CONDITIONAL([INC_CYGWIN_FILES], [test $inc_cygwin_files = yes]) -@@ -192,7 +192,7 @@ +@@ -242,7 +242,7 @@ # Set up defines needed before including any headers case $host in - *mingw* | *cygwin* ) -+ *mingw* | *cygwin* | *msys* ) - AC_DEFINE([_WIN32_WINNT], 0x0500, [Define to '0x0500' for Windows 2000 APIs.]) - AC_DEFINE([WINVER], 0x0500, [Define to '0x0500' for Windows 2000 APIs.]) - ;; -@@ -248,7 +248,7 @@ ++ *mingw* | *cygwin* | *msys* ) + AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.]) + AC_DEFINE([WINVER], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.]) + AC_DEFINE([NTDDI_VERSION], 0x05020000, [Define to '0x05020000' for Windows Server 2003 APIs.]) +@@ -301,7 +301,7 @@ if test "x$with_bz2lib" != "xno"; then AC_CHECK_HEADERS([bzlib.h]) case "$host_os" in @@ -110,7 +110,7 @@ diff -Naur libarchive-3.1.2-orig/configure.ac libarchive-3.1.2/configure.ac dnl AC_CHECK_LIB cannot be used on the Windows port of libbz2, therefore dnl use AC_LINK_IFELSE. AC_MSG_CHECKING([for BZ2_bzDecompressInit in -lbz2]) -@@ -692,7 +692,7 @@ +@@ -770,7 +770,7 @@ ]) case "$host_os" in @@ -119,7 +119,7 @@ diff -Naur libarchive-3.1.2-orig/configure.ac libarchive-3.1.2/configure.ac ;; *) CRYPTO_CHECK(MD5, LIBC, md5) -@@ -733,7 +733,7 @@ +@@ -813,7 +813,7 @@ AC_CHECK_HEADERS([openssl/evp.h]) saved_LIBS=$LIBS case "$host_os" in @@ -127,8 +127,8 @@ diff -Naur libarchive-3.1.2-orig/configure.ac libarchive-3.1.2/configure.ac + *mingw* | *cygwin* | *msys*) case "$host_cpu" in x86_64) - AC_CHECK_LIB(eay64,main) -@@ -776,7 +776,7 @@ + AC_CHECK_LIB(eay64,OPENSSL_config) +@@ -858,7 +858,7 @@ fi case "$host_os" in diff --git a/nettle/3.0-dlopen-test-msys-test.patch b/nettle/3.0-dlopen-test-msys-test.patch deleted file mode 100644 index de512c224d2..00000000000 --- a/nettle/3.0-dlopen-test-msys-test.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- nettle-3.2/testsuite/dlopen-test.c.orig 2016-05-16 12:09:42.904653700 -0400 -+++ nettle-3.2/testsuite/dlopen-test.c 2016-05-16 12:13:04.290831000 -0400 -@@ -9,7 +9,7 @@ - main (int argc UNUSED, char **argv UNUSED) - { - #if HAVE_LIBDL -- void *handle = dlopen ("../libnettle.so", RTLD_NOW); -+ void *handle = dlopen ("../msys-nettle-6.dll", RTLD_NOW); - int (*get_version)(void); - if (!handle) - { diff --git a/nettle/3.2-dlopen-test-msys-test.patch b/nettle/3.2-dlopen-test-msys-test.patch new file mode 100644 index 00000000000..8a40ce7f47e --- /dev/null +++ b/nettle/3.2-dlopen-test-msys-test.patch @@ -0,0 +1,15 @@ +diff -aur nettle-3.2/testsuite/dlopen-test.c.orig nettle-3.2/testsuite/dlopen-test.c > ../3.2-dlopen-test-msys-test.patch +--- nettle-3.2/testsuite/dlopen-test.c.orig 2016-05-17 07:17:36.777183000 -0400 ++++ nettle-3.2/testsuite/dlopen-test.c 2016-05-17 07:18:23.983817400 -0400 +@@ -9,7 +9,11 @@ + main (int argc UNUSED, char **argv UNUSED) + { + #if HAVE_LIBDL ++ #ifdef __MSYS__ ++ void *handle = dlopen ("../msys-nettle-6.dll", RTLD_NOW); ++ #else + void *handle = dlopen ("../libnettle.so", RTLD_NOW); ++ #endif + int (*get_version)(void); + if (!handle) + { diff --git a/nettle/PKGBUILD b/nettle/PKGBUILD index e6ac84c3fe9..0399c5c011e 100644 --- a/nettle/PKGBUILD +++ b/nettle/PKGBUILD @@ -12,19 +12,21 @@ depends=('gmp') makedepends=('gmp-devel') source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.sig} 2.6-soname.patch - nettle-2.6-msys2.patch) + nettle-2.6-msys2.patch + 3.2-dlopen-test-msys-test.patch) validpgpkeys=('343C2FF0FBEE5EC2EDBEF399F3599FF828C67298') sha256sums=('ea4283def236413edab5a4cf9cf32adf540c8df1b9b67641cfc2302fca849d97' 'SKIP' '489c8de40d074a8555e40ff4a82069cee260481c5ecace64d4b2acf9d7a64409' - 'fa52086b5a246a1536293c9a53fbc053ac06c028e3cd501295660c044b436a9f') + 'fa52086b5a246a1536293c9a53fbc053ac06c028e3cd501295660c044b436a9f' + 'b682165983572d89c491e6d2d8307d7a04662b2de332cebd0f6766459519151c') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" patch -p2 -i ${srcdir}/2.6-soname.patch patch -p1 -i ${srcdir}/nettle-2.6-msys2.patch - patch -p1 -i ${srcdir}/3.0-dlopen-test-msys-test.patch + patch -p1 -i ${srcdir}/3.2-dlopen-test-msys-test.patch autoreconf -fi } From 3ab03a282fa6b4d6de728e36ef21aa52e9374bee Mon Sep 17 00:00:00 2001 From: Alexpux Date: Wed, 18 May 2016 08:39:20 +0300 Subject: [PATCH 029/101] appveyour: Authorization. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 9675b25bd19..7c626e8a324 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,4 +30,4 @@ deploy: publish: true override: true api_key: - secure: BINTRAY_TOKEN_ENCRYPTED_BY_APPVEYOR + secure: B2XBLbsX8EQOpWyyaHskipMoF2+Tbt6hc/afbVm82f01CBKruspjwhee4K4C7/xf From d14f16169528eae8b80c79789ac01dcbb7d62776 Mon Sep 17 00:00:00 2001 From: James Duley Date: Wed, 18 May 2016 23:29:18 +0100 Subject: [PATCH 030/101] Fix rsync build --- rsync/PKGBUILD | 6 ++---- rsync/rsync-3.1.0-msys2.patch | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/rsync/PKGBUILD b/rsync/PKGBUILD index 2928ec6b1f7..b5795eb34b2 100644 --- a/rsync/PKGBUILD +++ b/rsync/PKGBUILD @@ -2,7 +2,7 @@ pkgname=rsync pkgver=3.1.2 -pkgrel=1 +pkgrel=2 pkgdesc="A file transfer program to keep remote files in sync" arch=('i686' 'x86_64') url="https://rsync.samba.org" @@ -10,12 +10,10 @@ groups=('net-utils') license=('GPL3') depends=('perl') source=("https://rsync.samba.org/ftp/rsync/$pkgname-$pkgver.tar.gz" - "https://rsync.samba.org/ftp/rsync/$pkgname-$pkgver.tar.gz.asc" rsync-3.1.0-msys2.patch ssh-6-option.patch) sha256sums=('ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2' - 'SKIP' - 'f7dfeb7162abafb3a6bd58d3df23ec0519df4a8c0b6ebb28592844468d5f9ce6' + '4fee5ba148b2fb4cd910f75e0271f5d66854954cbfaa34a6d9b814de9af2fb05' 'ea88046d8935e7a597cca7379d21edffefa520792d896bd7ce663b4cdc0f2069') prepare() { diff --git a/rsync/rsync-3.1.0-msys2.patch b/rsync/rsync-3.1.0-msys2.patch index 5380d447232..e52fd4f9029 100644 --- a/rsync/rsync-3.1.0-msys2.patch +++ b/rsync/rsync-3.1.0-msys2.patch @@ -46,7 +46,7 @@ diff -Naur rsync-3.0.9-orig/configure.ac rsync-3.0.9/configure.ac AC_DEFINE(SUPPORT_ACLS, 1, [Define to 1 to add support for ACLs]) ;; - solaris*|*cygwin*) -+ solaris*|*cygwin*|*msys*) ++ solaris*) AC_MSG_RESULT(Using solaris ACLs) AC_DEFINE(HAVE_SOLARIS_ACLS, 1, [true if you have solaris ACLs]) AC_DEFINE(SUPPORT_ACLS, 1) @@ -85,7 +85,7 @@ diff -Naur rsync-3.1.0-orig/configure.sh rsync-3.1.0/configure.sh ;; - solaris*|*cygwin*) -+ solaris*|*cygwin*|*msys*) ++ solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using solaris ACLs" >&5 $as_echo "Using solaris ACLs" >&6; } From 2257a8591d65c180c57705e09ce7b99df8fb3da7 Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Fri, 20 May 2016 04:06:50 -0400 Subject: [PATCH 031/101] jsoncpp 1.7.2 use mkdir -p instead of mkdir Use mkdir -p instead of mkdir so that the package does not fail if the dir exists. --- jsoncpp/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jsoncpp/PKGBUILD b/jsoncpp/PKGBUILD index 1f502e6170c..cdffcfa25f4 100644 --- a/jsoncpp/PKGBUILD +++ b/jsoncpp/PKGBUILD @@ -2,7 +2,7 @@ pkgname="jsoncpp" pkgver=1.7.2 -pkgrel=2 +pkgrel=3 pkgdesc="A C++ library for interacting with JSON" arch=('any') url="https://github.com/open-source-parsers/jsoncpp" @@ -20,7 +20,7 @@ prepare() { } build() { - mkdir "${srcdir}/build-${CARCH}" + mkdir -p "${srcdir}/build-${CARCH}" cd "${srcdir}/build-${CARCH}" cmake \ From 062512828edeb185fe22fa045dd1dd2cfd3f2bb3 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Sat, 21 May 2016 14:43:45 -0300 Subject: [PATCH 032/101] CI: Updates for recent AppVeyor changes. --- appveyor.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7c626e8a324..bac28f45155 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,13 +7,6 @@ environment: BUILD_URL: https://ci.appveyor.com/project/$(APPVEYOR_ACCOUNT_NAME)/$(APPVEYOR_PROJECT_NAME)/build/$(APPVEYOR_BUILD_VERSION) build_script: - # TODO: remove the line below once the AppVeyor installation includes a - # newer version of pacman that can perform core updates - - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh pacman - - # Git is required but currently not part of AppVeyor installation - - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh git - - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade - C:\msys64\usr\bin\bash --login -c "$(cygpath ${APPVEYOR_BUILD_FOLDER})/ci-build.sh" From 6cbcc7fbeb99543fd28e0f0fa38cc6b810e1d71f Mon Sep 17 00:00:00 2001 From: David Macek Date: Sun, 22 May 2016 02:08:30 +0200 Subject: [PATCH 033/101] msys2-launcher: Update to v0.3.29 --- msys2-launcher-git/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msys2-launcher-git/PKGBUILD b/msys2-launcher-git/PKGBUILD index 10488777f05..14be4eb94ae 100644 --- a/msys2-launcher-git/PKGBUILD +++ b/msys2-launcher-git/PKGBUILD @@ -2,7 +2,7 @@ _realname="msys2-launcher" pkgname=("${_realname}-git") -pkgver=0.3.28.860c495 +pkgver=0.3.29.4028b6c pkgrel=1 pkgdesc="Helper for launching MSYS2 shells" arch=('x86_64' 'i686') From 022f74b744d2d855a05f6e17e5c0f06b34985ec1 Mon Sep 17 00:00:00 2001 From: Qian Hong Date: Sun, 22 May 2016 15:55:53 +0800 Subject: [PATCH 034/101] Continuous Integration: Enable 64 bit build. --- .drone.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 48656069603..b31306edd8e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,9 +1,8 @@ build: - image: teaci/msys32 + image: teaci/msys$$arch pull: true - shell: msys32 + shell: msys$$arch commands: - - export RUNTEST=$$runtest - ./ci-build.sh notify: @@ -16,7 +15,7 @@ notify: port: 6667 matrix: - runtest: - - false -# Temprorary disable matrix build to workaround irc plugin bug on wine-ci.org, see https://github.com/drone/drone/issues/1459 -# - true # allow failures + arch: + - 64 + - 32 +#FIXME: When a matrix build is done, only the build status of the last job in a matrix is sent to notification plugins, this confuses our irc plugin, see https://github.com/drone/drone/issues/1459. Github pull request Web UI status and Tea CI Web UI status works fine with matrix build. From a5badda0b4fc87e949c179ee4c7d8e687dbb767c Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Mon, 23 May 2016 03:16:03 -0400 Subject: [PATCH 035/101] cmake 3.5.2 - Update to latest version, rekey all patches Update to latest version Rekey all patches Hopefully have improvements from #584. jsoncpp is dependency --- ...ity.patch => 3.5.2-case-sensitivity.patch} | 25 +- ....1.0-cpuinfo.patch => 3.5.2-cpuinfo.patch} | 31 +- ...n-paths.patch => 3.5.2-cygwin-paths.patch} | 62 +- cmake/PKGBUILD | 56 +- ....2.3-msys.patch => cmake-3.5.2-msys.patch} | 1218 +++++++++++++---- cmake/disable-curses-for-msys.patch | 7 +- cmake/disable-response-files-for-msys.patch | 7 +- 7 files changed, 1052 insertions(+), 354 deletions(-) rename cmake/{3.1.0-case-sensitivity.patch => 3.5.2-case-sensitivity.patch} (54%) rename cmake/{3.1.0-cpuinfo.patch => 3.5.2-cpuinfo.patch} (72%) rename cmake/{3.1.0-cygwin-paths.patch => 3.5.2-cygwin-paths.patch} (57%) rename cmake/{cmake-3.2.3-msys.patch => cmake-3.5.2-msys.patch} (50%) diff --git a/cmake/3.1.0-case-sensitivity.patch b/cmake/3.5.2-case-sensitivity.patch similarity index 54% rename from cmake/3.1.0-case-sensitivity.patch rename to cmake/3.5.2-case-sensitivity.patch index 1d83294a011..417cac55add 100644 --- a/cmake/3.1.0-case-sensitivity.patch +++ b/cmake/3.5.2-case-sensitivity.patch @@ -1,8 +1,7 @@ -diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx -index b0ddff4..481185c 100644 ---- a/Source/cmFileCommand.cxx -+++ b/Source/cmFileCommand.cxx -@@ -1116,7 +1116,7 @@ protected: +diff -aur cmake-3.5.2/Source/cmFileCommand.cxx.orig cmake-3.5.2/Source/cmFileCommand.cxx +--- cmake-3.5.2/Source/cmFileCommand.cxx.orig 2016-05-22 16:38:04.545005800 -0400 ++++ cmake-3.5.2/Source/cmFileCommand.cxx 2016-05-22 16:38:04.806538600 -0400 +@@ -1227,7 +1227,7 @@ MatchProperties CollectMatchProperties(const char* file) { // Match rules are case-insensitive on some platforms. @@ -11,11 +10,10 @@ index b0ddff4..481185c 100644 std::string lower = cmSystemTools::LowerCase(file); const char* file_to_match = lower.c_str(); #else -diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx -index c3c9c55..077cbd8 100644 ---- a/Source/cmInstallCommand.cxx -+++ b/Source/cmInstallCommand.cxx -@@ -1149,7 +1149,7 @@ cmInstallCommand::HandleDirectoryMode(std::vector const& args) +diff -aur cmake-3.5.2/Source/cmInstallCommand.cxx.orig cmake-3.5.2/Source/cmInstallCommand.cxx > patch +--- cmake-3.5.2/Source/cmInstallCommand.cxx.orig 2016-05-22 16:38:04.417989000 -0400 ++++ cmake-3.5.2/Source/cmInstallCommand.cxx 2016-05-22 16:38:04.812039200 -0400 +@@ -1182,7 +1182,7 @@ { literal_args += " REGEX \""; // Match rules are case-insensitive on some platforms. @@ -24,10 +22,9 @@ index c3c9c55..077cbd8 100644 std::string regex = cmSystemTools::LowerCase(args[i]); #else std::string regex = args[i]; -diff --git a/Source/kwsys/Glob.cxx b/Source/kwsys/Glob.cxx -index 5a96aed..9379e76 100644 ---- a/Source/kwsys/Glob.cxx -+++ b/Source/kwsys/Glob.cxx +diff -aur cmake-3.5.2/Source/kwsys/Glob.cxx.orig cmake-3.5.2/Source/kwsys/Glob.cxx > patch +--- cmake-3.5.2/Source/kwsys/Glob.cxx.orig 2016-05-22 16:38:04.789536600 -0400 ++++ cmake-3.5.2/Source/kwsys/Glob.cxx 2016-05-22 16:38:04.817040300 -0400 @@ -37,7 +37,7 @@ #include namespace KWSYS_NAMESPACE diff --git a/cmake/3.1.0-cpuinfo.patch b/cmake/3.5.2-cpuinfo.patch similarity index 72% rename from cmake/3.1.0-cpuinfo.patch rename to cmake/3.5.2-cpuinfo.patch index 7d85e2da240..f37f8fe3d9b 100644 --- a/cmake/3.1.0-cpuinfo.patch +++ b/cmake/3.5.2-cpuinfo.patch @@ -1,8 +1,7 @@ -diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx -index 3e1a1ab..690a40f 100644 ---- a/Source/kwsys/SystemInformation.cxx -+++ b/Source/kwsys/SystemInformation.cxx -@@ -910,7 +910,7 @@ void SystemInformation::RunMemoryCheck() +diff -aur cmake-3.5.2/Source/kwsys/SystemInformation.cxx.orig cmake-3.5.2/Source/kwsys/SystemInformation.cxx +--- cmake-3.5.2/Source/kwsys/SystemInformation.cxx.orig 2016-04-15 09:41:22.000000000 -0400 ++++ cmake-3.5.2/Source/kwsys/SystemInformation.cxx 2016-05-19 01:51:07.346713700 -0400 +@@ -917,7 +917,7 @@ // Hide implementation details in an anonymous namespace. namespace { // ***************************************************************************** @@ -10,8 +9,8 @@ index 3e1a1ab..690a40f 100644 +#if defined(__linux) || defined(__APPLE__) || defined(__CYGWIN__) int LoadLines( FILE *file, - kwsys_stl::vector &lines) -@@ -946,7 +946,7 @@ int LoadLines( + std::vector &lines) +@@ -953,7 +953,7 @@ return nRead; } @@ -20,7 +19,7 @@ index 3e1a1ab..690a40f 100644 // ***************************************************************************** int LoadLines( const char *fileName, -@@ -985,7 +985,7 @@ int NameValue( +@@ -992,7 +992,7 @@ } #endif @@ -29,22 +28,22 @@ index 3e1a1ab..690a40f 100644 // **************************************************************************** template int GetFieldsFromFile( -@@ -3131,7 +3131,6 @@ bool SystemInformationImplementation::RetreiveInformationFromCpuInfoFile() +@@ -3200,7 +3200,6 @@ pos = buffer.find("processor\t",pos+1); } -#ifdef __linux // Find the largest physical id. int maxId = -1; - kwsys_stl::string idc = -@@ -3164,14 +3163,6 @@ bool SystemInformationImplementation::RetreiveInformationFromCpuInfoFile() + std::string idc = +@@ -3233,14 +3232,6 @@ atoi(this->ExtractValueFromCpuInfoFile(buffer,"ncpus active").c_str()); } -#else // __CYGWIN__ - // does not have "physical id" entries, neither "cpu cores" - // this has to be fixed for hyper-threading. -- kwsys_stl::string cpucount = +- std::string cpucount = - this->ExtractValueFromCpuInfoFile(buffer,"cpu count"); - this->NumberOfPhysicalCPU= - this->NumberOfLogicalCPU = atoi(cpucount.c_str()); @@ -52,7 +51,7 @@ index 3e1a1ab..690a40f 100644 // gotta have one, and if this is 0 then we get a / by 0n // better to have a bad answer than a crash if(this->NumberOfPhysicalCPU <= 0) -@@ -3369,7 +3360,7 @@ SystemInformationImplementation::GetHostMemoryTotal() +@@ -3438,7 +3429,7 @@ GlobalMemoryStatusEx(&statex); return statex.ullTotalPhys/1024; # endif @@ -61,7 +60,7 @@ index 3e1a1ab..690a40f 100644 SystemInformation::LongLong memTotal=0; int ierr=GetFieldFromFile("/proc/meminfo","MemTotal:",memTotal); if (ierr) -@@ -3500,7 +3491,7 @@ SystemInformationImplementation::GetHostMemoryUsed() +@@ -3569,7 +3560,7 @@ GlobalMemoryStatusEx(&statex); return (statex.ullTotalPhys - statex.ullAvailPhys)/1024; # endif @@ -70,7 +69,7 @@ index 3e1a1ab..690a40f 100644 const char *names[3]={"MemTotal:","MemFree:",NULL}; SystemInformation::LongLong values[2]={SystemInformation::LongLong(0)}; int ierr=GetFieldsFromFile("/proc/meminfo",names,values); -@@ -3559,7 +3550,7 @@ SystemInformationImplementation::GetProcMemoryUsed() +@@ -3628,7 +3619,7 @@ return -2; } return pmc.WorkingSetSize/1024; @@ -79,7 +78,7 @@ index 3e1a1ab..690a40f 100644 SystemInformation::LongLong memUsed=0; int ierr=GetFieldFromFile("/proc/self/status","VmRSS:",memUsed); if (ierr) -@@ -3611,7 +3602,7 @@ SystemInformationImplementation::GetProcessId() +@@ -3712,7 +3703,7 @@ { #if defined(_WIN32) return GetCurrentProcessId(); diff --git a/cmake/3.1.0-cygwin-paths.patch b/cmake/3.5.2-cygwin-paths.patch similarity index 57% rename from cmake/3.1.0-cygwin-paths.patch rename to cmake/3.5.2-cygwin-paths.patch index 274604fc032..1c85630bc21 100644 --- a/cmake/3.1.0-cygwin-paths.patch +++ b/cmake/3.5.2-cygwin-paths.patch @@ -1,8 +1,7 @@ -diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx -index e4c82d8..6064fd1 100644 ---- a/Source/kwsys/SystemTools.cxx -+++ b/Source/kwsys/SystemTools.cxx -@@ -85,19 +85,12 @@ +diff -aur cmake-3.5.2/Source/kwsys/SystemTools.cxx.orig cmake-3.5.2/Source/kwsys/SystemTools.cxx +--- cmake-3.5.2/Source/kwsys/SystemTools.cxx.orig 2016-04-15 09:41:22.000000000 -0400 ++++ cmake-3.5.2/Source/kwsys/SystemTools.cxx 2016-05-19 07:22:11.643728500 -0400 +@@ -93,19 +93,12 @@ # if defined(_MSC_VER) && _MSC_VER >= 1800 # define KWSYS_WINDOWS_DEPRECATED_GetVersionEx # endif @@ -22,7 +21,7 @@ index e4c82d8..6064fd1 100644 // getpwnam doesn't exist on Windows and Cray Xt3/Catamount // same for TIOCGWINSZ #if defined(_WIN32) || defined (__LIBCATAMOUNT__) -@@ -1141,7 +1134,7 @@ bool SystemTools::FileExists(const kwsys_stl::string& filename) +@@ -1214,7 +1207,7 @@ { return false; } @@ -31,7 +30,7 @@ index e4c82d8..6064fd1 100644 // Convert filename to native windows path if possible. char winpath[MAX_PATH]; if(SystemTools::PathCygwinToWin32(filename.c_str(), winpath)) -@@ -1183,7 +1176,7 @@ bool SystemTools::FileExists(const kwsys_stl::string& filename, bool isFile) +@@ -1291,7 +1284,7 @@ } //---------------------------------------------------------------------------- @@ -40,7 +39,7 @@ index e4c82d8..6064fd1 100644 bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path) { SystemToolsTranslationMap::iterator i = -@@ -4289,7 +4282,7 @@ bool SystemTools::FileIsFullPath(const char* in_name) +@@ -4451,7 +4444,7 @@ bool SystemTools::FileIsFullPath(const char* in_name, size_t len) { @@ -49,42 +48,41 @@ index e4c82d8..6064fd1 100644 // On Windows, the name must be at least two characters long. if(len < 2) { -@@ -5056,9 +5049,6 @@ bool SystemTools::ParseURL( const kwsys_stl::string& URL, - static unsigned int SystemToolsManagerCount; - SystemToolsTranslationMap *SystemTools::TranslationMap; - SystemToolsTranslationMap *SystemTools::LongPathMap; +@@ -5263,9 +5256,6 @@ + #ifdef _WIN32 + SystemToolsPathCaseMap *SystemTools::PathCaseMap; + #endif -#ifdef __CYGWIN__ -SystemToolsTranslationMap *SystemTools::Cyg2Win32Map; -#endif // SystemToolsManager manages the SystemTools singleton. // SystemToolsManager should be included in any translation unit -@@ -5104,9 +5094,6 @@ void SystemTools::ClassInitialize() - // Allocate the translation map first. - SystemTools::TranslationMap = new SystemToolsTranslationMap; - SystemTools::LongPathMap = new SystemToolsTranslationMap; +@@ -5313,9 +5303,6 @@ + #ifdef _WIN32 + SystemTools::PathCaseMap = new SystemToolsPathCaseMap; + #endif -#ifdef __CYGWIN__ - SystemTools::Cyg2Win32Map = new SystemToolsTranslationMap; -#endif // Add some special translation paths for unix. These are not added // for windows because drive letters need to be maintained. Also, -@@ -5161,9 +5148,6 @@ void SystemTools::ClassFinalize() - { - delete SystemTools::TranslationMap; - delete SystemTools::LongPathMap; +@@ -5372,9 +5359,6 @@ + #ifdef _WIN32 + delete SystemTools::PathCaseMap; + #endif -#ifdef __CYGWIN__ - delete SystemTools::Cyg2Win32Map; -#endif } + - -diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in -index beb2a7e..eacc22d 100644 ---- a/Source/kwsys/SystemTools.hxx.in -+++ b/Source/kwsys/SystemTools.hxx.in -@@ -298,15 +298,6 @@ public: - static bool FileExists(const kwsys_stl::string& filename); +diff -aur cmake-3.5.2/Source/kwsys/SystemTools.hxx.in.orig cmake-3.5.2/Source/kwsys/SystemTools.hxx.in +--- cmake-3.5.2/Source/kwsys/SystemTools.hxx.in.orig 2016-04-15 09:41:22.000000000 -0400 ++++ cmake-3.5.2/Source/kwsys/SystemTools.hxx.in 2016-05-19 07:36:23.880430500 -0400 +@@ -333,15 +333,6 @@ + TestFilePermissions permissions); /** - * Converts Cygwin path to Win32 path. Uses dictionary container for @@ -98,11 +96,11 @@ index beb2a7e..eacc22d 100644 - /** * Return file length */ - static unsigned long FileLength(const kwsys_stl::string& filename); -@@ -942,9 +933,6 @@ private: - */ - static SystemToolsTranslationMap *TranslationMap; - static SystemToolsTranslationMap *LongPathMap; + static unsigned long FileLength(const std::string& filename); +@@ -990,9 +981,6 @@ + #ifdef _WIN32 + static SystemToolsPathCaseMap *PathCaseMap; + #endif -#ifdef __CYGWIN__ - static SystemToolsTranslationMap *Cyg2Win32Map; -#endif diff --git a/cmake/PKGBUILD b/cmake/PKGBUILD index 890e903eb96..d2bec584e95 100644 --- a/cmake/PKGBUILD +++ b/cmake/PKGBUILD @@ -2,14 +2,14 @@ # Contributor: Martell Malone pkgname=cmake -pkgver=3.2.3 +pkgver=3.5.2 pkgrel=1 pkgdesc="A cross-platform open-source make system" arch=('i686' 'x86_64') url="https://www.cmake.org/" license=("MIT") makedepends=("gcc" "pkg-config" - #jsoncpp + jsoncpp libcurl-devel libexpat-devel libarchive-devel @@ -23,31 +23,38 @@ depends=("gcc-libs" "pkg-config" "zlib") options=('staticlibs' 'strip') -source=("https://www.cmake.org/files/v3.2/${pkgname}-${pkgver}.tar.gz" - "cmake-3.2.3-msys.patch" +source=("https://www.cmake.org/files/v3.5/${pkgname}-${pkgver}.tar.gz" + "cmake-3.5.2-msys.patch" "disable-curses-for-msys.patch" "disable-response-files-for-msys.patch" - 3.1.0-case-sensitivity.patch - 3.1.0-cpuinfo.patch - 3.1.0-cygwin-paths.patch) -sha256sums=('a1ebcaf6d288eb4c966714ea457e3b9677cdfde78820d0f088712d7320850297' - '1d9f2b720619117b456249af4a8f368924806e8e29fd4131693289d65e68b35b' - '054f2bcbf30a67f09f1fbfeeb90dd214601d51227ef53e8e6be451d79e3f8f07' - 'a3fb57b3eefb28f1c9d594869d2dfa2665d8db1a2b45b74a323263cde5ff7be3' - '39db583b9f3897eae79ad740104c2bd3cc7b5c5f903c502366ce817203957894' - 'ceaa42711fcbf642486459c86caceb7090db0c73ccac6031dcf9912061f603ba' - 'b209b7d4d5dbcce9fffa6589c0ac7fd5334f8100d9b0dbfb974827f95c682239') + "3.5.2-case-sensitivity.patch" + "3.5.2-cpuinfo.patch" + "3.5.2-cygwin-paths.patch") +sha256sums=('92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a' + 'ff62957b203f001dc5ae9f628a2ff4276029d976c3f6b5e53a806f9074ab5d1e' + 'b7e398e70b97088f88a0688e8a0794d6780d3cdb91075388a30908dc4b405eb7' + '98dca846de0ca7b71884e26678317f85e78e01862d58a29ce923c835ca7d614f' + '4f312510b45774ef299982ea112efbae4ef89cc680a7e4a14f2d1cf619b9749c' + '6bfd0a843378172883095c409cd4218f755efcbe7777889ade07ef126db6941b' + '320a2f88d5a3c1fe0a63b992ce45cf228e9a121406b0ebf7654bc8c25d1ad79d') prepare() { cd ${pkgname}-${pkgver} - - patch -p1 -i ${srcdir}/cmake-3.2.3-msys.patch - patch -p1 -i ${srcdir}/disable-curses-for-msys.patch - patch -p1 -i ${srcdir}/disable-response-files-for-msys.patch - patch -p1 -i ${srcdir}/3.1.0-case-sensitivity.patch - patch -p1 -i ${srcdir}/3.1.0-cpuinfo.patch - patch -p1 -i ${srcdir}/3.1.0-cygwin-paths.patch - + rm -f Modules/CPackMsys.cmake \ + Modules/FindMsys.cmake \ + Modules/Platform/MSYS-GNU.cmake \ + Modules/Platform/MSYS.cmake \ + Modules/Platform/MSYS-CXX.cmake \ + Modules/Platform/MSYS-GNU-C.cmake \ + Modules/Platform/MSYS-GNU-CXX.cmake \ + Modules/Platform/MSYS-GNU-Fortran.cmake \ + Modules/Platform/MSYS-windres.cmake || true + patch -p1 -i "${srcdir}/cmake-3.5.2-msys.patch" + patch -p1 -i "${srcdir}/disable-curses-for-msys.patch" + patch -p1 -i "${srcdir}/disable-response-files-for-msys.patch" + patch -p1 -i "${srcdir}/3.5.2-case-sensitivity.patch" + patch -p1 -i "${srcdir}/3.5.2-cpuinfo.patch" + patch -p1 -i "${srcdir}/3.5.2-cygwin-paths.patch" } build() { @@ -57,13 +64,12 @@ build() { MSYSTEM=MSYS "${srcdir}"/${pkgname}-${pkgver}/configure \ --prefix=/usr \ --system-libs \ - --no-system-expat \ - --no-system-jsoncpp \ --no-qt-gui \ --parallel=3 \ --mandir=share \ --docdir=share/doc/cmake - +#--no-system-expat +#--no-system-jsoncpp plain "Start building..." make } diff --git a/cmake/cmake-3.2.3-msys.patch b/cmake/cmake-3.5.2-msys.patch similarity index 50% rename from cmake/cmake-3.2.3-msys.patch rename to cmake/cmake-3.5.2-msys.patch index 1bb7cfb7580..5ba29de2922 100644 --- a/cmake/cmake-3.2.3-msys.patch +++ b/cmake/cmake-3.5.2-msys.patch @@ -1,7 +1,7 @@ -diff -Naur cmake-2.8.11.2/bootstrap cmake-2.8.11.2-msys/bootstrap ---- cmake-2.8.11.2/bootstrap 2013-07-02 17:41:41.000000000 +0400 -+++ cmake-2.8.11.2-msys/bootstrap 2014-04-06 22:11:41.567000000 +0400 -@@ -58,6 +58,13 @@ +diff -aur cmake-3.5.2/bootstrap.orig cmake-3.5.2/bootstrap +--- cmake-3.5.2/bootstrap.orig 2016-04-15 09:41:29.000000000 -0400 ++++ cmake-3.5.2/bootstrap 2016-05-22 12:02:31.104568400 -0400 +@@ -87,6 +87,13 @@ cmake_system_cygwin=false fi @@ -15,7 +15,7 @@ diff -Naur cmake-2.8.11.2/bootstrap cmake-2.8.11.2-msys/bootstrap # Determine whether this is a MinGW environment. if echo "${cmake_system}" | grep MINGW >/dev/null 2>&1; then cmake_system_mingw=true -@@ -672,6 +679,10 @@ +@@ -732,6 +739,10 @@ cmake_ld_flags="${LDFLAGS} -Wl,--enable-auto-import" fi @@ -26,7 +26,7 @@ diff -Naur cmake-2.8.11.2/bootstrap cmake-2.8.11.2-msys/bootstrap # Add CoreFoundation framework on Darwin if ${cmake_system_darwin}; then cmake_ld_flags="${LDFLAGS} -framework CoreFoundation" -@@ -701,6 +712,7 @@ +@@ -763,6 +774,7 @@ case "${cmake_system}" in *AIX*) cmake_toolchains='XL GNU' ;; *CYGWIN*) cmake_toolchains='GNU' ;; @@ -34,19 +34,19 @@ diff -Naur cmake-2.8.11.2/bootstrap cmake-2.8.11.2-msys/bootstrap *Darwin*) cmake_toolchains='GNU Clang' ;; *Linux*) cmake_toolchains='GNU Clang XL PGI PathScale' ;; *MINGW*) cmake_toolchains='GNU' ;; -diff -Naur cmake-2.8.11.2/CMakeCPack.cmake cmake-2.8.11.2-msys/CMakeCPack.cmake ---- cmake-2.8.11.2/CMakeCPack.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/CMakeCPack.cmake 2014-04-06 22:14:23.853800000 +0400 -@@ -56,6 +56,8 @@ +diff -aur cmake-3.5.2/CMakeCPack.cmake.orig cmake-3.5.2/CMakeCPack.cmake +--- cmake-3.5.2/CMakeCPack.cmake.orig 2016-04-15 09:41:19.000000000 -0400 ++++ cmake-3.5.2/CMakeCPack.cmake 2016-05-22 17:29:34.072190400 -0400 +@@ -54,6 +54,8 @@ # cygwin is good for the system name - if("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN") + if("x${CMAKE_SYSTEM_NAME}" STREQUAL "xCYGWIN") set(CPACK_SYSTEM_NAME Cygwin) + elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "MSYS") + set(CPACK_SYSTEM_NAME MSYS) else() set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) endif() -@@ -72,7 +74,7 @@ +@@ -155,7 +157,7 @@ # if the CPACK_PACKAGE_FILE_NAME is not defined by the cache # default to source package - system, on cygwin system is not # needed @@ -55,7 +55,7 @@ diff -Naur cmake-2.8.11.2/CMakeCPack.cmake cmake-2.8.11.2-msys/CMakeCPack.cmake set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}") else() set(CPACK_PACKAGE_FILE_NAME -@@ -89,7 +91,7 @@ +@@ -172,7 +174,7 @@ endif() # cygwin specific packaging stuff @@ -64,10 +64,10 @@ diff -Naur cmake-2.8.11.2/CMakeCPack.cmake cmake-2.8.11.2-msys/CMakeCPack.cmake # setup the cygwin package name set(CPACK_PACKAGE_NAME cmake) # setup the name of the package for cygwin cmake-2.4.3 -diff -Naur cmake-2.8.11.2/Modules/CMakeCCompiler.cmake.in cmake-2.8.11.2-msys/Modules/CMakeCCompiler.cmake.in ---- cmake-2.8.11.2/Modules/CMakeCCompiler.cmake.in 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/CMakeCCompiler.cmake.in 2014-04-06 22:17:52.051400000 +0400 -@@ -13,10 +13,16 @@ +diff -aur cmake-3.5.2/Modules/CMakeCCompiler.cmake.in.orig cmake-3.5.2/Modules/CMakeCCompiler.cmake.in +--- cmake-3.5.2/Modules/CMakeCCompiler.cmake.in.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/CMakeCCompiler.cmake.in 2016-05-22 12:24:33.915496300 -0400 +@@ -22,10 +22,16 @@ set(CMAKE_C_ABI_COMPILED @CMAKE_C_ABI_COMPILED@) set(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@) set(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@) @@ -84,10 +84,10 @@ diff -Naur cmake-2.8.11.2/Modules/CMakeCCompiler.cmake.in cmake-2.8.11.2-msys/Mo set(CMAKE_C_COMPILER_ENV_VAR "CC") -diff -Naur cmake-2.8.11.2/Modules/CMakeCXXCompiler.cmake.in cmake-2.8.11.2-msys/Modules/CMakeCXXCompiler.cmake.in ---- cmake-2.8.11.2/Modules/CMakeCXXCompiler.cmake.in 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/CMakeCXXCompiler.cmake.in 2014-04-06 22:18:37.260200000 +0400 -@@ -13,10 +13,16 @@ +diff -aur cmake-3.5.2/Modules/CMakeCXXCompiler.cmake.in.orig cmake-3.5.2/Modules/CMakeCXXCompiler.cmake.in +--- cmake-3.5.2/Modules/CMakeCXXCompiler.cmake.in.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/CMakeCXXCompiler.cmake.in 2016-05-22 12:31:00.598407100 -0400 +@@ -22,10 +22,16 @@ set(CMAKE_CXX_ABI_COMPILED @CMAKE_CXX_ABI_COMPILED@) set(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@) set(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@) @@ -105,34 +105,34 @@ diff -Naur cmake-2.8.11.2/Modules/CMakeCXXCompiler.cmake.in cmake-2.8.11.2-msys/ set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") diff -Naur cmake-2.8.11.2/Modules/CMakeDetermineCCompiler.cmake cmake-2.8.11.2-msys/Modules/CMakeDetermineCCompiler.cmake ---- cmake-2.8.11.2/Modules/CMakeDetermineCCompiler.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/CMakeDetermineCCompiler.cmake 2014-04-06 22:19:18.615800000 +0400 -@@ -131,6 +131,8 @@ +--- cmake-3.5.2/Modules/CMakeDetermineCCompiler.cmake.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/CMakeDetermineCCompiler.cmake 2016-05-22 17:17:45.309910700 -0400 +@@ -125,6 +125,8 @@ set(CMAKE_COMPILER_IS_MINGW 1) - elseif("${CMAKE_C_PLATFORM_ID}" MATCHES "Cygwin") + elseif(CMAKE_C_PLATFORM_ID MATCHES "Cygwin") set(CMAKE_COMPILER_IS_CYGWIN 1) -+ elseif("${CMAKE_C_PLATFORM_ID}" MATCHES "MSYS") ++ elseif(CMAKE_C_PLATFORM_ID MATCHES "MSYS") + set(CMAKE_COMPILER_IS_MSYS 1) endif() endif() diff -Naur cmake-2.8.11.2/Modules/CMakeDetermineCXXCompiler.cmake cmake-2.8.11.2-msys/Modules/CMakeDetermineCXXCompiler.cmake ---- cmake-2.8.11.2/Modules/CMakeDetermineCXXCompiler.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/CMakeDetermineCXXCompiler.cmake 2014-04-06 22:19:50.361800000 +0400 -@@ -127,6 +127,8 @@ +--- cmake-3.5.2/Modules/CMakeDetermineCXXCompiler.cmake.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/CMakeDetermineCXXCompiler.cmake 2016-05-22 17:29:34.087815200 -0400 +@@ -120,6 +120,8 @@ set(CMAKE_COMPILER_IS_MINGW 1) - elseif("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin") + elseif(CMAKE_CXX_PLATFORM_ID MATCHES "Cygwin") set(CMAKE_COMPILER_IS_CYGWIN 1) -+ elseif("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MSYS") ++ elseif(CMAKE_CXX_PLATFORM_ID MATCHES "MSYS") + set(CMAKE_COMPILER_IS_MSYS 1) endif() endif() -diff -Naur cmake-2.8.11.2/Modules/CMakeDetermineFortranCompiler.cmake cmake-2.8.11.2-msys/Modules/CMakeDetermineFortranCompiler.cmake ---- cmake-2.8.11.2/Modules/CMakeDetermineFortranCompiler.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/CMakeDetermineFortranCompiler.cmake 2014-04-06 22:20:59.173400000 +0400 -@@ -174,6 +174,9 @@ - if("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" ) +diff -aur cmake-3.5.2/Modules/CMakeDetermineFortranCompiler.cmake.orig cmake-3.5.2/Modules/CMakeDetermineFortranCompiler.cmake +--- cmake-3.5.2/Modules/CMakeDetermineFortranCompiler.cmake.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/CMakeDetermineFortranCompiler.cmake 2016-05-22 12:46:34.512113600 -0400 +@@ -206,6 +206,9 @@ + if("${CMAKE_COMPILER_OUTPUT}" MATCHES "THIS_IS_CYGWIN") set(CMAKE_Fortran_PLATFORM_ID "Cygwin") endif() + if("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MSYS.*" ) @@ -141,18 +141,18 @@ diff -Naur cmake-2.8.11.2/Modules/CMakeDetermineFortranCompiler.cmake cmake-2.8. endif() endif() endif() -@@ -186,6 +189,8 @@ +@@ -218,6 +221,8 @@ set(CMAKE_COMPILER_IS_MINGW 1) - elseif("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "Cygwin") + elseif(CMAKE_Fortran_PLATFORM_ID MATCHES "Cygwin") set(CMAKE_COMPILER_IS_CYGWIN 1) -+ elseif("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MSYS") ++ elseif(CMAKE_Fortran_PLATFORM_ID MATCHES "MSYS") + set(CMAKE_COMPILER_IS_MSYS 1) endif() endif() -diff -Naur cmake-2.8.11.2/Modules/CMakeDetermineSystem.cmake cmake-2.8.11.2-msys/Modules/CMakeDetermineSystem.cmake ---- cmake-2.8.11.2/Modules/CMakeDetermineSystem.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/CMakeDetermineSystem.cmake 2014-04-06 22:26:05.619800000 +0400 +diff -aur cmake-3.5.2/Modules/CMakeDetermineSystem.cmake.orig cmake-3.5.2/Modules/CMakeDetermineSystem.cmake +--- cmake-3.5.2/Modules/CMakeDetermineSystem.cmake.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/CMakeDetermineSystem.cmake 2016-05-22 12:31:00.629656700 -0400 @@ -38,6 +38,7 @@ # Tru64 Tru64 # Ultrix ULTRIX @@ -169,8 +169,8 @@ diff -Naur cmake-2.8.11.2/Modules/CMakeDetermineSystem.cmake cmake-2.8.11.2-msys + if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|MSYS.*|Darwin|^GNU$") exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR RETURN_VALUE val) - elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "OpenBSD") -@@ -145,6 +146,11 @@ + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND +@@ -152,6 +153,11 @@ set(${_PREFIX}_NAME CYGWIN) endif() @@ -182,10 +182,10 @@ diff -Naur cmake-2.8.11.2/Modules/CMakeDetermineSystem.cmake cmake-2.8.11.2-msys # set CMAKE_SYSTEM to the CMAKE_SYSTEM_NAME set(${_PREFIX} ${${_PREFIX}_NAME}) # if there is a CMAKE_SYSTEM_VERSION then add a -${CMAKE_SYSTEM_VERSION} -diff -Naur cmake-2.8.11.2/Modules/CMakeFortranCompiler.cmake.in cmake-2.8.11.2-msys/Modules/CMakeFortranCompiler.cmake.in ---- cmake-2.8.11.2/Modules/CMakeFortranCompiler.cmake.in 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/CMakeFortranCompiler.cmake.in 2014-04-06 22:27:04.837400000 +0400 -@@ -11,11 +11,18 @@ +diff -aur cmake-3.5.2/Modules/CMakeFortranCompiler.cmake.in.orig cmake-3.5.2/Modules/CMakeFortranCompiler.cmake.in +--- cmake-3.5.2/Modules/CMakeFortranCompiler.cmake.in.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/CMakeFortranCompiler.cmake.in 2016-05-22 12:50:42.919457400 -0400 +@@ -15,11 +15,18 @@ set(CMAKE_Fortran_ABI_COMPILED @CMAKE_Fortran_ABI_COMPILED@) set(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@) set(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@) @@ -204,10 +204,10 @@ diff -Naur cmake-2.8.11.2/Modules/CMakeFortranCompiler.cmake.in cmake-2.8.11.2-m set(CMAKE_Fortran_COMPILER_ENV_VAR "FC") set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 @CMAKE_Fortran_COMPILER_SUPPORTS_F90@) -diff -Naur cmake-2.8.11.2/Modules/CMakeFortranCompilerId.F.in cmake-2.8.11.2-msys/Modules/CMakeFortranCompilerId.F.in ---- cmake-2.8.11.2/Modules/CMakeFortranCompilerId.F.in 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/CMakeFortranCompilerId.F.in 2014-04-06 22:28:08.454200000 +0400 -@@ -52,6 +52,8 @@ +diff -aur cmake-3.5.2/Modules/CMakeFortranCompilerId.F.in.orig cmake-3.5.2/Modules/CMakeFortranCompilerId.F.in +--- cmake-3.5.2/Modules/CMakeFortranCompilerId.F.in.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/CMakeFortranCompilerId.F.in 2016-05-22 12:50:42.919457400 -0400 +@@ -119,6 +119,8 @@ #endif #if defined(__linux) || defined(__linux__) || defined(linux) PRINT *, 'INFO:platform[Linux]' @@ -228,10 +228,10 @@ diff -Naur cmake-2.8.11.2/Modules/CMakeJavaInformation.cmake cmake-2.8.11.2-msys set(CMAKE_INCLUDE_FLAG_SEP_Java ";") else() set(CMAKE_INCLUDE_FLAG_SEP_Java ":") -diff -Naur cmake-2.8.11.2/Modules/CMakePlatformId.h.in cmake-2.8.11.2-msys/Modules/CMakePlatformId.h.in ---- cmake-2.8.11.2/Modules/CMakePlatformId.h.in 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/CMakePlatformId.h.in 2014-04-06 22:29:15.378200000 +0400 -@@ -2,6 +2,9 @@ +diff -aur cmake-3.5.2/Modules/CMakePlatformId.h.in.orig cmake-3.5.2/Modules/CMakePlatformId.h.in +--- cmake-3.5.2/Modules/CMakePlatformId.h.in.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/CMakePlatformId.h.in 2016-05-22 12:50:42.935082200 -0400 +@@ -5,6 +5,9 @@ #if defined(__linux) || defined(__linux__) || defined(linux) # define PLATFORM_ID "Linux" @@ -265,10 +265,10 @@ diff -Naur cmake-2.8.11.2/Modules/CMakeTestGNU.c cmake-2.8.11.2-msys/Modules/CMa -#ifdef __CYGWIN__ void THIS_IS_CYGWIN(); #endif -diff -Naur cmake-2.8.11.2/Modules/CPack.cmake cmake-2.8.11.2-msys/Modules/CPack.cmake ---- cmake-2.8.11.2/Modules/CPack.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/CPack.cmake 2014-04-06 22:33:54.150200000 +0400 -@@ -420,6 +420,8 @@ +diff -aur cmake-3.5.2/Modules/CPack.cmake.orig cmake-3.5.2/Modules/CPack.cmake +--- cmake-3.5.2/Modules/CPack.cmake.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/CPack.cmake 2016-05-22 12:50:42.950707600 -0400 +@@ -449,6 +449,8 @@ if(UNIX) if(CYGWIN) option(CPACK_BINARY_CYGWIN "Enable to build Cygwin binary packages" ON) @@ -277,15 +277,15 @@ diff -Naur cmake-2.8.11.2/Modules/CPack.cmake cmake-2.8.11.2-msys/Modules/CPack. else() if(APPLE) option(CPACK_BINARY_BUNDLE "Enable to build OSX bundles" OFF) -@@ -447,6 +449,7 @@ - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_PACKAGEMAKER PackageMaker) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_OSXX11 OSXX11) +@@ -477,6 +479,7 @@ + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_7Z 7Z) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_BUNDLE Bundle) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_CYGWIN CygwinBinary) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_MSYS MsysBinary) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DEB DEB) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_RPM RPM) - cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_NSIS NSIS) -@@ -464,6 +467,8 @@ + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DRAGNDROP DragNDrop) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_IFW IFW) +@@ -499,6 +502,8 @@ if(UNIX) if(CYGWIN) option(CPACK_SOURCE_CYGWIN "Enable to build Cygwin source packages" ON) @@ -294,7 +294,7 @@ diff -Naur cmake-2.8.11.2/Modules/CPack.cmake cmake-2.8.11.2-msys/Modules/CPack. else() option(CPACK_SOURCE_TBZ2 "Enable to build TBZ2 source packages" ON) option(CPACK_SOURCE_TGZ "Enable to build TGZ source packages" ON) -@@ -495,6 +500,7 @@ +@@ -525,6 +530,7 @@ CPACK_BINARY_7Z CPACK_BINARY_BUNDLE CPACK_BINARY_CYGWIN @@ -302,7 +302,7 @@ diff -Naur cmake-2.8.11.2/Modules/CPack.cmake cmake-2.8.11.2-msys/Modules/CPack. CPACK_BINARY_DEB CPACK_BINARY_DRAGNDROP CPACK_BINARY_IFW -@@ -511,6 +517,7 @@ +@@ -541,6 +547,7 @@ CPACK_BINARY_ZIP CPACK_SOURCE_7Z CPACK_SOURCE_CYGWIN @@ -366,10 +366,10 @@ diff -Naur cmake-2.8.11.2/Modules/CPackZIP.cmake cmake-2.8.11.2-msys/Modules/CPa find_package(Cygwin) find_program(ZIP_EXECUTABLE zip PATHS "${CYGWIN_INSTALL_PATH}/bin") if(ZIP_EXECUTABLE) -diff -Naur cmake-2.8.11.2/Modules/ExternalProject.cmake cmake-2.8.11.2-msys/Modules/ExternalProject.cmake ---- cmake-2.8.11.2/Modules/ExternalProject.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/ExternalProject.cmake 2014-04-06 22:38:39.964200000 +0400 -@@ -910,7 +910,7 @@ +diff -aur cmake-3.5.2/Modules/ExternalProject.cmake.orig cmake-3.5.2/Modules/ExternalProject.cmake +--- cmake-3.5.2/Modules/ExternalProject.cmake.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/ExternalProject.cmake 2016-05-22 13:01:50.005726400 -0400 +@@ -1300,7 +1300,7 @@ string(REGEX REPLACE "^\\$\\(MAKE\\)" "\${make}" command "${command}") set(make "-Dmake=$(MAKE)") @@ -378,22 +378,22 @@ diff -Naur cmake-2.8.11.2/Modules/ExternalProject.cmake cmake-2.8.11.2-msys/Modu set(code_cygpath_make " if(\${make} MATCHES \"^/\") execute_process( -diff -Naur cmake-2.8.11.2/Modules/FindBoost.cmake cmake-2.8.11.2-msys/Modules/FindBoost.cmake ---- cmake-2.8.11.2/Modules/FindBoost.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindBoost.cmake 2014-04-06 22:39:31.069800000 +0400 -@@ -719,7 +719,7 @@ +diff -aur cmake-3.5.2/Modules/FindBoost.cmake.orig cmake-3.5.2/Modules/FindBoost.cmake +--- cmake-3.5.2/Modules/FindBoost.cmake.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/FindBoost.cmake 2016-05-22 13:10:19.595304300 -0400 +@@ -1113,7 +1113,7 @@ - # Setting some more suffixes for the library set(Boost_LIB_PREFIX "") --if ( WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN) -+if ( WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN AND NOT MSYS) + if ( (GHSMULTI AND Boost_USE_STATIC_LIBS) OR +- (WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN) ) ++ ( WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN AND NOT MSYS) set(Boost_LIB_PREFIX "lib") endif() -diff -Naur cmake-2.8.11.2/Modules/FindCoin3D.cmake cmake-2.8.11.2-msys/Modules/FindCoin3D.cmake ---- cmake-2.8.11.2/Modules/FindCoin3D.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindCoin3D.cmake 2014-04-06 22:39:53.190600000 +0400 -@@ -23,7 +23,7 @@ +diff -aur cmake-3.5.2/Modules/FindCoin3D.cmake.orig cmake-3.5.2/Modules/FindCoin3D.cmake +--- cmake-3.5.2/Modules/FindCoin3D.cmake.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/FindCoin3D.cmake 2016-05-22 13:10:19.595304300 -0400 +@@ -29,7 +29,7 @@ # License text for the above reference.) if (WIN32) @@ -402,10 +402,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindCoin3D.cmake cmake-2.8.11.2-msys/Modules/F find_path(COIN3D_INCLUDE_DIRS Inventor/So.h) find_library(COIN3D_LIBRARIES Coin) -diff -Naur cmake-2.8.11.2/Modules/FindCurses.cmake cmake-2.8.11.2-msys/Modules/FindCurses.cmake ---- cmake-2.8.11.2/Modules/FindCurses.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindCurses.cmake 2014-04-06 22:40:15.623400000 +0400 -@@ -37,7 +37,7 @@ +diff -aur cmake-3.5.2/Modules/FindCurses.cmake.orig cmake-3.5.2/Modules/FindCurses.cmake > patch +--- cmake-3.5.2/Modules/FindCurses.cmake.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/FindCurses.cmake 2016-05-22 13:10:19.610932800 -0400 +@@ -64,7 +64,7 @@ # cygwin ncurses stopped providing curses.h symlinks see above # message. Cygwin is an ncurses package, so force ncurses on # cygwin if the curses.h is missing @@ -414,10 +414,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindCurses.cmake cmake-2.8.11.2-msys/Modules/F if(NOT EXISTS /usr/include/curses.h) set(CURSES_USE_NCURSES TRUE) endif() -diff -Naur cmake-2.8.11.2/Modules/FindFLTK.cmake cmake-2.8.11.2-msys/Modules/FindFLTK.cmake ---- cmake-2.8.11.2/Modules/FindFLTK.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindFLTK.cmake 2014-04-06 22:42:24.838200000 +0400 -@@ -48,7 +48,7 @@ +diff -aur cmake-3.5.2/Modules/FindFLTK.cmake.orig cmake-3.5.2/Modules/FindFLTK.cmake +--- cmake-3.5.2/Modules/FindFLTK.cmake.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/FindFLTK.cmake 2016-05-22 13:10:19.610932800 -0400 +@@ -73,7 +73,7 @@ # Platform dependent libraries required by FLTK if(WIN32) @@ -426,10 +426,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindFLTK.cmake cmake-2.8.11.2-msys/Modules/Fin if(BORLAND) set( FLTK_PLATFORM_DEPENDENT_LIBS import32 ) else() -diff -Naur cmake-2.8.11.2/Modules/FindFLTK2.cmake cmake-2.8.11.2-msys/Modules/FindFLTK2.cmake ---- cmake-2.8.11.2/Modules/FindFLTK2.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindFLTK2.cmake 2014-04-06 22:42:38.878200000 +0400 -@@ -27,7 +27,7 @@ +diff -aur cmake-3.5.2/Modules/FindFLTK2.cmake.orig cmake-3.5.2/Modules/FindFLTK2.cmake +--- cmake-3.5.2/Modules/FindFLTK2.cmake.orig 2016-04-15 09:41:20.000000000 -0400 ++++ cmake-3.5.2/Modules/FindFLTK2.cmake 2016-05-22 13:22:33.871208900 -0400 +@@ -39,7 +39,7 @@ # Platform dependent libraries required by FLTK2 if(WIN32) @@ -438,10 +438,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindFLTK2.cmake cmake-2.8.11.2-msys/Modules/Fi if(BORLAND) set( FLTK2_PLATFORM_DEPENDENT_LIBS import32 ) else() -diff -Naur cmake-2.8.11.2/Modules/FindGnuplot.cmake cmake-2.8.11.2-msys/Modules/FindGnuplot.cmake ---- cmake-2.8.11.2/Modules/FindGnuplot.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindGnuplot.cmake 2014-04-06 22:44:04.475400000 +0400 -@@ -22,6 +22,7 @@ +diff -aur cmake-3.5.2/Modules/FindGnuplot.cmake.orig cmake-3.5.2/Modules/FindGnuplot.cmake +--- cmake-3.5.2/Modules/FindGnuplot.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/FindGnuplot.cmake 2016-05-22 13:22:33.878710300 -0400 +@@ -32,6 +32,7 @@ # License text for the above reference.) include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake) @@ -449,7 +449,7 @@ diff -Naur cmake-2.8.11.2/Modules/FindGnuplot.cmake cmake-2.8.11.2-msys/Modules/ find_program(GNUPLOT_EXECUTABLE NAMES -@@ -30,6 +31,7 @@ +@@ -40,6 +41,7 @@ wgnupl32 PATHS ${CYGWIN_INSTALL_PATH}/bin @@ -489,10 +489,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindMsys.cmake cmake-2.8.11.2-msys/Modules/Fin + MSYS_INSTALL_PATH + ) +endif () -diff -Naur cmake-2.8.11.2/Modules/FindOpenGL.cmake cmake-2.8.11.2-msys/Modules/FindOpenGL.cmake ---- cmake-2.8.11.2/Modules/FindOpenGL.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindOpenGL.cmake 2014-04-06 22:44:28.218600000 +0400 -@@ -29,7 +29,7 @@ +diff -aur cmake-3.5.2/Modules/FindOpenGL.cmake.orig cmake-3.5.2/Modules/FindOpenGL.cmake +--- cmake-3.5.2/Modules/FindOpenGL.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/FindOpenGL.cmake 2016-05-22 13:22:33.890218700 -0400 +@@ -50,7 +50,7 @@ set(_OpenGL_REQUIRED_VARS OPENGL_gl_LIBRARY) @@ -501,10 +501,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindOpenGL.cmake cmake-2.8.11.2-msys/Modules/F find_path(OPENGL_INCLUDE_DIR GL/gl.h ) list(APPEND _OpenGL_REQUIRED_VARS OPENGL_INCLUDE_DIR) -diff -Naur cmake-2.8.11.2/Modules/FindOpenSSL.cmake cmake-2.8.11.2-msys/Modules/FindOpenSSL.cmake ---- cmake-2.8.11.2/Modules/FindOpenSSL.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindOpenSSL.cmake 2014-04-06 22:45:01.571400000 +0400 -@@ -68,7 +68,7 @@ +diff -aur cmake-3.5.2/Modules/FindOpenSSL.cmake.orig cmake-3.5.2/Modules/FindOpenSSL.cmake +--- cmake-3.5.2/Modules/FindOpenSSL.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/FindOpenSSL.cmake 2016-05-22 13:22:33.896719500 -0400 +@@ -109,7 +109,7 @@ include ) @@ -513,10 +513,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindOpenSSL.cmake cmake-2.8.11.2-msys/Modules/ if(MSVC) # /MD and /MDd are the standard values - if someone wants to use # others, the libnames have to change here too -diff -Naur cmake-2.8.11.2/Modules/FindPerl.cmake cmake-2.8.11.2-msys/Modules/FindPerl.cmake ---- cmake-2.8.11.2/Modules/FindPerl.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindPerl.cmake 2014-04-06 22:45:49.042200000 +0400 -@@ -19,9 +19,11 @@ +diff -aur cmake-3.5.2/Modules/FindPerl.cmake.orig cmake-3.5.2/Modules/FindPerl.cmake +--- cmake-3.5.2/Modules/FindPerl.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/FindPerl.cmake 2016-05-22 13:22:33.906220700 -0400 +@@ -26,9 +26,11 @@ # License text for the above reference.) include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake) @@ -528,10 +528,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindPerl.cmake cmake-2.8.11.2-msys/Modules/Fin ) if(WIN32) -diff -Naur cmake-2.8.11.2/Modules/FindPNG.cmake cmake-2.8.11.2-msys/Modules/FindPNG.cmake ---- cmake-2.8.11.2/Modules/FindPNG.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindPNG.cmake 2014-04-06 22:46:30.148200000 +0400 -@@ -47,7 +47,7 @@ +diff -aur cmake-3.5.2/Modules/FindPNG.cmake.orig cmake-3.5.2/Modules/FindPNG.cmake +--- cmake-3.5.2/Modules/FindPNG.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/FindPNG.cmake 2016-05-22 13:22:33.913721400 -0400 +@@ -107,7 +107,7 @@ set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatiblity set(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY}) @@ -540,10 +540,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindPNG.cmake cmake-2.8.11.2-msys/Modules/Find if(BUILD_SHARED_LIBS) # No need to define PNG_USE_DLL here, because it's default for Cygwin. else() -diff -Naur cmake-2.8.11.2/Modules/FindPythonLibs.cmake cmake-2.8.11.2-msys/Modules/FindPythonLibs.cmake ---- cmake-2.8.11.2/Modules/FindPythonLibs.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindPythonLibs.cmake 2014-04-06 22:46:52.908600000 +0400 -@@ -215,7 +215,7 @@ +diff -aur cmake-3.5.2/Modules/FindPythonLibs.cmake.orig cmake-3.5.2/Modules/FindPythonLibs.cmake +--- cmake-3.5.2/Modules/FindPythonLibs.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/FindPythonLibs.cmake 2016-05-22 13:22:33.922222100 -0400 +@@ -294,7 +294,7 @@ if(PYTHON_MODULE_${_NAME}_BUILD_SHARED) set_target_properties(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}") @@ -552,10 +552,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindPythonLibs.cmake cmake-2.8.11.2-msys/Modul set_target_properties(${_NAME} PROPERTIES SUFFIX ".pyd") endif() endif() -diff -Naur cmake-2.8.11.2/Modules/FindQt3.cmake cmake-2.8.11.2-msys/Modules/FindQt3.cmake ---- cmake-2.8.11.2/Modules/FindQt3.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindQt3.cmake 2014-04-06 22:47:15.793800000 +0400 -@@ -226,7 +226,7 @@ +diff -aur cmake-3.5.2/Modules/FindQt3.cmake.orig cmake-3.5.2/Modules/FindQt3.cmake +--- cmake-3.5.2/Modules/FindQt3.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/FindQt3.cmake 2016-05-22 13:22:33.931223200 -0400 +@@ -240,7 +240,7 @@ set( QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT_LIBRARY} ) set( QT_DEFINITIONS "") @@ -564,10 +564,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindQt3.cmake cmake-2.8.11.2-msys/Modules/Find if (QT_QTMAIN_LIBRARY) # for version 3 set (QT_DEFINITIONS -DQT_DLL -DQT_THREAD_SUPPORT -DNO_DEBUG) -diff -Naur cmake-2.8.11.2/Modules/FindSelfPackers.cmake cmake-2.8.11.2-msys/Modules/FindSelfPackers.cmake ---- cmake-2.8.11.2/Modules/FindSelfPackers.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindSelfPackers.cmake 2014-04-06 22:47:58.600200000 +0400 -@@ -19,10 +19,12 @@ +diff -aur cmake-3.5.2/Modules/FindSelfPackers.cmake.orig cmake-3.5.2/Modules/FindSelfPackers.cmake +--- cmake-3.5.2/Modules/FindSelfPackers.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/FindSelfPackers.cmake 2016-05-22 13:22:33.938224500 -0400 +@@ -26,10 +26,12 @@ # License text for the above reference.) include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake) @@ -580,10 +580,22 @@ diff -Naur cmake-2.8.11.2/Modules/FindSelfPackers.cmake cmake-2.8.11.2-msys/Modu /bin /usr/bin /usr/local/bin -diff -Naur cmake-2.8.11.2/Modules/FindThreads.cmake cmake-2.8.11.2-msys/Modules/FindThreads.cmake ---- cmake-2.8.11.2/Modules/FindThreads.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindThreads.cmake 2014-04-06 22:49:00.579000000 +0400 -@@ -154,7 +154,7 @@ +diff -Naur cmake-3.5.2/Modules/FindTclsh.cmake cmake-3.5.2-msys/Modules/FindTclsh.cmake +--- cmake-3.5.2/Modules/FindTclsh.cmake 2016-04-15 15:41:22.000000000 +0200 ++++ cmake-3.5.2-msys/Modules/FindTclsh.cmake 2016-04-30 22:27:06.004149300 +0200 +@@ -29,7 +29,7 @@ + # (To distribute this file outside of CMake, substitute the full + # License text for the above reference.) + +-if(CYGWIN) ++if(CYGWIN OR MSYS) + find_program(TCL_TCLSH NAMES cygtclsh83 cygtclsh80) + endif() + +diff -aur cmake-3.5.2/Modules/FindThreads.cmake.orig cmake-3.5.2/Modules/FindThreads.cmake > patch +--- cmake-3.5.2/Modules/FindThreads.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/FindThreads.cmake 2016-05-22 13:22:33.951226200 -0400 +@@ -210,7 +210,7 @@ set(CMAKE_THREAD_LIBS_INIT ) endif() @@ -592,10 +604,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindThreads.cmake cmake-2.8.11.2-msys/Modules/ set(CMAKE_USE_PTHREADS_INIT 1) set(Threads_FOUND TRUE) set(CMAKE_THREAD_LIBS_INIT ) -diff -Naur cmake-2.8.11.2/Modules/FindUnixCommands.cmake cmake-2.8.11.2-msys/Modules/FindUnixCommands.cmake ---- cmake-2.8.11.2/Modules/FindUnixCommands.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindUnixCommands.cmake 2014-04-06 22:51:26.439000000 +0400 -@@ -16,10 +16,12 @@ +diff -aur cmake-3.5.2/Modules/FindUnixCommands.cmake.orig cmake-3.5.2/Modules/FindUnixCommands.cmake > patch +--- cmake-3.5.2/Modules/FindUnixCommands.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/FindUnixCommands.cmake 2016-05-22 13:22:33.957226500 -0400 +@@ -21,10 +21,12 @@ # License text for the above reference.) include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake) @@ -608,7 +620,7 @@ diff -Naur cmake-2.8.11.2/Modules/FindUnixCommands.cmake cmake-2.8.11.2-msys/Mod /bin /usr/bin /usr/local/bin -@@ -32,6 +34,7 @@ +@@ -37,6 +39,7 @@ find_program(CP cp ${CYGWIN_INSTALL_PATH}/bin @@ -616,7 +628,7 @@ diff -Naur cmake-2.8.11.2/Modules/FindUnixCommands.cmake cmake-2.8.11.2-msys/Mod /bin /usr/bin /usr/local/bin -@@ -44,6 +47,7 @@ +@@ -49,6 +52,7 @@ find_program(GZIP gzip ${CYGWIN_INSTALL_PATH}/bin @@ -624,7 +636,7 @@ diff -Naur cmake-2.8.11.2/Modules/FindUnixCommands.cmake cmake-2.8.11.2-msys/Mod /bin /usr/bin /usr/local/bin -@@ -56,6 +60,7 @@ +@@ -61,6 +65,7 @@ find_program(MV mv ${CYGWIN_INSTALL_PATH}/bin @@ -632,7 +644,7 @@ diff -Naur cmake-2.8.11.2/Modules/FindUnixCommands.cmake cmake-2.8.11.2-msys/Mod /bin /usr/bin /usr/local/bin -@@ -68,6 +73,7 @@ +@@ -73,6 +78,7 @@ find_program(RM rm ${CYGWIN_INSTALL_PATH}/bin @@ -640,7 +652,7 @@ diff -Naur cmake-2.8.11.2/Modules/FindUnixCommands.cmake cmake-2.8.11.2-msys/Mod /bin /usr/bin /usr/local/bin -@@ -83,6 +89,7 @@ +@@ -88,6 +94,7 @@ gtar PATH ${CYGWIN_INSTALL_PATH}/bin @@ -648,10 +660,10 @@ diff -Naur cmake-2.8.11.2/Modules/FindUnixCommands.cmake cmake-2.8.11.2-msys/Mod /bin /usr/bin /usr/local/bin -diff -Naur cmake-2.8.11.2/Modules/FindWget.cmake cmake-2.8.11.2-msys/Modules/FindWget.cmake ---- cmake-2.8.11.2/Modules/FindWget.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/FindWget.cmake 2014-04-06 22:52:31.522200000 +0400 -@@ -18,10 +18,12 @@ +diff -aur cmake-3.5.2/Modules/FindWget.cmake.orig cmake-3.5.2/Modules/FindWget.cmake +--- cmake-3.5.2/Modules/FindWget.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/FindWget.cmake 2016-05-22 13:22:33.963728700 -0400 +@@ -25,10 +25,12 @@ # License text for the above reference.) include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake) @@ -664,9 +676,9 @@ diff -Naur cmake-2.8.11.2/Modules/FindWget.cmake cmake-2.8.11.2-msys/Modules/Fin ) # handle the QUIETLY and REQUIRED arguments and set WGET_FOUND to TRUE if -diff -Naur cmake-2.8.11.2/Modules/GenerateExportHeader.cmake cmake-2.8.11.2-msys/Modules/GenerateExportHeader.cmake ---- cmake-2.8.11.2/Modules/GenerateExportHeader.cmake 2013-07-02 17:41:39.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/GenerateExportHeader.cmake 2014-04-06 22:53:11.754600000 +0400 +diff -aur cmake-3.5.2/Modules/GenerateExportHeader.cmake.orig cmake-3.5.2/Modules/GenerateExportHeader.cmake +--- cmake-3.5.2/Modules/GenerateExportHeader.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/GenerateExportHeader.cmake 2016-05-22 13:22:33.970728300 -0400 @@ -217,6 +217,7 @@ AND NOT _INTEL_TOO_OLD AND NOT WIN32 @@ -675,6 +687,15 @@ diff -Naur cmake-2.8.11.2/Modules/GenerateExportHeader.cmake cmake-2.8.11.2-msys AND NOT CMAKE_CXX_COMPILER_ID MATCHES XL AND NOT CMAKE_CXX_COMPILER_ID MATCHES PGI AND NOT CMAKE_CXX_COMPILER_ID MATCHES Watcom) +@@ -272,7 +273,7 @@ + get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE) + + if(NOT ${type} STREQUAL "STATIC_LIBRARY") +- if(WIN32 OR CYGWIN) ++ if(WIN32 OR CYGWIN OR MSYS) + set(DEFINE_EXPORT "__declspec(dllexport)") + set(DEFINE_IMPORT "__declspec(dllimport)") + elseif(COMPILER_HAS_HIDDEN_VISIBILITY AND USE_COMPILER_HIDDEN_VISIBILITY) diff -Naur cmake-2.8.11.2/Modules/KDE3Macros.cmake cmake-2.8.11.2-msys/Modules/KDE3Macros.cmake --- cmake-2.8.11.2/Modules/KDE3Macros.cmake 2013-07-02 17:41:39.000000000 +0400 +++ cmake-2.8.11.2-msys/Modules/KDE3Macros.cmake 2014-04-06 22:54:20.940600000 +0400 @@ -850,10 +871,10 @@ diff -Naur cmake-2.8.11.2/Modules/Platform/MSYS-windres.cmake cmake-2.8.11.2-msy +++ cmake-2.8.11.2-msys/Modules/Platform/MSYS-windres.cmake 2013-07-02 17:41:40.000000000 +0400 @@ -0,0 +1 @@ +set(CMAKE_RC_COMPILE_OBJECT " -O coff ") -diff -Naur cmake-2.8.11.2/Modules/UseJava.cmake cmake-2.8.11.2-msys/Modules/UseJava.cmake ---- cmake-2.8.11.2/Modules/UseJava.cmake 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/UseJava.cmake 2014-04-06 22:54:37.632600000 +0400 -@@ -242,7 +242,7 @@ +diff -aur cmake-3.5.2/Modules/UseJava.cmake.orig cmake-3.5.2/Modules/UseJava.cmake +--- cmake-3.5.2/Modules/UseJava.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/UseJava.cmake 2016-05-22 13:22:34.013234600 -0400 +@@ -460,7 +460,7 @@ ${CMAKE_JAVA_LIBRARY_OUTPUT_PATH} ) @@ -862,10 +883,19 @@ diff -Naur cmake-2.8.11.2/Modules/UseJava.cmake cmake-2.8.11.2-msys/Modules/UseJ set(CMAKE_JAVA_INCLUDE_FLAG_SEP ";") else () set(CMAKE_JAVA_INCLUDE_FLAG_SEP ":") -diff -Naur cmake-2.8.11.2/Modules/UseSWIG.cmake cmake-2.8.11.2-msys/Modules/UseSWIG.cmake ---- cmake-2.8.11.2/Modules/UseSWIG.cmake 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Modules/UseSWIG.cmake 2014-04-06 22:54:55.525800000 +0400 -@@ -234,7 +234,7 @@ +@@ -1211,7 +1211,7 @@ + endif() + + set (_output_files) +- if (WIN32 AND NOT CYGWIN AND CMAKE_HOST_SYSTEM_NAME MATCHES "Windows") ++ if (WIN32 AND NOT CYGWIN AND NOT MSYS AND CMAKE_HOST_SYSTEM_NAME MATCHES "Windows") + set(_classpath_sep "$") + else () + set(_classpath_sep ":") +diff -aur cmake-3.5.2/Modules/UseSWIG.cmake.orig cmake-3.5.2/Modules/UseSWIG.cmake +--- cmake-3.5.2/Modules/UseSWIG.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/UseSWIG.cmake 2016-05-22 13:22:34.020734600 -0400 +@@ -271,7 +271,7 @@ # Windows: .dll is no longer supported as a filename extension for extension modules. # .pyd is now the only filename extension that will be searched for. # @@ -873,33 +903,33 @@ diff -Naur cmake-2.8.11.2/Modules/UseSWIG.cmake cmake-2.8.11.2-msys/Modules/UseS + if(WIN32 AND NOT CYGWIN AND NOT MSYS) set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".pyd") endif() - endif () -diff -Naur cmake-2.8.11.2/Source/CMakeInstallDestinations.cmake cmake-2.8.11.2-msys/Source/CMakeInstallDestinations.cmake ---- cmake-2.8.11.2/Source/CMakeInstallDestinations.cmake 2015-07-02 15:59:09.727800000 +0300 -+++ cmake-2.8.11.2-msys/Source/CMakeInstallDestinations.cmake 2015-07-02 15:59:17.481000000 +0300 -@@ -3,7 +3,7 @@ - set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # HAIKU + elseif ("${swig_lowercase_language}" STREQUAL "r") +diff -aur cmake-3.5.2/Source/CMakeInstallDestinations.cmake.orig cmake-3.5.2/Source/CMakeInstallDestinations.cmake > patch +--- cmake-3.5.2/Source/CMakeInstallDestinations.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Source/CMakeInstallDestinations.cmake 2016-05-22 13:22:34.027235500 -0400 +@@ -4,7 +4,7 @@ set(CMAKE_MAN_DIR_DEFAULT "documentation/man") # HAIKU set(CMAKE_DOC_DIR_DEFAULT "documentation/doc/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") # HAIKU + set(CMAKE_XDGDATA_DIR_DEFAULT "share") # HAIKU -elseif(CYGWIN) +elseif(CYGWIN OR MSYS) set(CMAKE_DATA_DIR_DEFAULT "share/cmake-${CMake_VERSION}") # CYGWIN set(CMAKE_DOC_DIR_DEFAULT "share/doc/cmake-${CMake_VERSION}") # CYGWIN set(CMAKE_MAN_DIR_DEFAULT "share/man") # CYGWIN -diff -Naur cmake-2.8.11.2/Source/CMakeLists.txt cmake-2.8.11.2-msys/Source/CMakeLists.txt ---- cmake-2.8.11.2/Source/CMakeLists.txt 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Source/CMakeLists.txt 2014-04-06 23:04:41.530000000 +0400 -@@ -381,7 +381,7 @@ - cmNinjaUtilityTargetGenerator.cxx +diff -aur cmake-3.5.2/Source/CMakeLists.txt.orig cmake-3.5.2/Source/CMakeLists.txt > patch +--- cmake-3.5.2/Source/CMakeLists.txt.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Source/CMakeLists.txt 2016-05-22 13:22:34.035736800 -0400 +@@ -533,7 +533,7 @@ cmNinjaUtilityTargetGenerator.h ) + -if(WIN32 AND NOT CYGWIN) +if(WIN32 AND NOT CYGWIN AND NOT MSYS) set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501) - add_executable(cmcldeps cmcldeps.cxx) + add_executable(cmcldeps cmcldeps.cxx ${MANIFEST_FILE}) target_link_libraries(cmcldeps CMakeLib) -@@ -491,7 +491,7 @@ - CPack/cmCPackDocumentMacros.cxx +@@ -676,7 +676,7 @@ + CPack/cmCPack7zGenerator.cxx ) -if(CYGWIN) @@ -907,34 +937,61 @@ diff -Naur cmake-2.8.11.2/Source/CMakeLists.txt cmake-2.8.11.2-msys/Source/CMake set(CPACK_SRCS ${CPACK_SRCS} CPack/cmCPackCygwinBinaryGenerator.cxx CPack/cmCPackCygwinSourceGenerator.cxx -diff -Naur cmake-2.8.11.2/Source/cmExportBuildFileGenerator.cxx cmake-2.8.11.2-msys/Source/cmExportBuildFileGenerator.cxx ---- cmake-2.8.11.2/Source/cmExportBuildFileGenerator.cxx 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Source/cmExportBuildFileGenerator.cxx 2014-04-06 23:05:56.550400000 +0400 -@@ -156,7 +156,7 @@ +diff -aur cmake-3.5.2/Source/cmInstallExportGenerator.cxx.orig cmake-3.5.2/Source/cmInstallExportGenerator.cxx > patch +--- cmake-3.5.2/Source/cmInstallExportGenerator.cxx.orig 2016-05-19 13:43:51.624375300 -0400 ++++ cmake-3.5.2/Source/cmInstallExportGenerator.cxx 2016-05-19 13:44:40.934450400 -0400 +@@ -79,7 +79,7 @@ + + // Enforce a maximum length. + bool useMD5 = false; +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) + std::string::size_type const max_total_len = 250; + #else + std::string::size_type const max_total_len = 1000; +diff -aur cmake-3.5.2/Source/cmGeneratorTarget.cxx.orig cmake-3.5.2/Source/cmGeneratorTarget.cxx +--- cmake-3.5.2/Source/cmGeneratorTarget.cxx.orig 2016-05-22 15:37:19.855724000 -0400 ++++ cmake-3.5.2/Source/cmGeneratorTarget.cxx 2016-05-22 15:38:27.261887800 -0400 +@@ -307,6 +307,7 @@ - // Check whether this is a DLL platform. - bool dll_platform = -- (mf->IsOn("WIN32") || mf->IsOn("CYGWIN") || mf->IsOn("MINGW")); -+ (mf->IsOn("WIN32") || mf->IsOn("CYGWIN") || mf->IsOn("MSYS") || mf->IsOn("MINGW")); - - // Add the import library for windows DLLs. - if(dll_platform && -diff -Naur cmake-2.8.11.2/Source/cmExportFileGenerator.cxx cmake-2.8.11.2-msys/Source/cmExportFileGenerator.cxx ---- cmake-2.8.11.2/Source/cmExportFileGenerator.cxx 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Source/cmExportFileGenerator.cxx 2014-04-06 23:06:15.878800000 +0400 -@@ -617,7 +617,7 @@ - { - // Check whether this is a DLL platform. - bool dll_platform = -- (mf->IsOn("WIN32") || mf->IsOn("CYGWIN") || mf->IsOn("MINGW")); -+ (mf->IsOn("WIN32") || mf->IsOn("CYGWIN") || mf->IsOn("MSYS") || mf->IsOn("MINGW")); - if(!dll_platform) - { - std::string prop; -diff -Naur cmake-2.8.11.2/Source/cmInstallCommand.cxx cmake-2.8.11.2-msys/Source/cmInstallCommand.cxx ---- cmake-2.8.11.2/Source/cmInstallCommand.cxx 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Source/cmInstallCommand.cxx 2014-04-06 23:08:50.833600000 +0400 -@@ -352,6 +352,7 @@ + this->DLLPlatform = (this->Makefile->IsOn("WIN32") || + this->Makefile->IsOn("CYGWIN") || ++ this->Makefile->IsOn("MSYS") || + this->Makefile->IsOn("MINGW")); + + this->PolicyMap = t->PolicyMap; +@@ -3411,7 +3412,7 @@ + + // This versioning is supported only for executables and then only + // when the platform supports symbolic links. +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + const char* version = 0; + #else + // Check for executable version properties. +@@ -3432,7 +3433,7 @@ + name = prefix+base+suffix; + + // The executable's real name on disk. +-#if defined(__CYGWIN__) ++#if defined(__CYGWIN__) || defined(__MSYS__) + realName = prefix+base; + #else + realName = name; +@@ -3442,7 +3443,7 @@ + realName += "-"; + realName += version; + } +-#if defined(__CYGWIN__) ++#if defined(__CYGWIN__) || defined(__MSYS__) + realName += suffix; + #endif + + +diff -aur cmake-3.5.2/Source/cmInstallCommand.cxx.orig cmake-3.5.2/Source/cmInstallCommand.cxx +--- cmake-3.5.2/Source/cmInstallCommand.cxx.orig 2016-04-15 09:41:22.000000000 -0400 ++++ cmake-3.5.2/Source/cmInstallCommand.cxx 2016-05-22 15:24:33.085564300 -0400 +@@ -364,6 +364,7 @@ // Check whether this is a DLL platform. bool dll_platform = (this->Makefile->IsOn("WIN32") || this->Makefile->IsOn("CYGWIN") || @@ -942,33 +999,623 @@ diff -Naur cmake-2.8.11.2/Source/cmInstallCommand.cxx cmake-2.8.11.2-msys/Source this->Makefile->IsOn("MINGW")); for(std::vector::const_iterator +diff -aur cmake-3.5.2/Source/cmake.cxx.orig cmake-3.5.2/Source/cmake.cxx +--- cmake-3.5.2/Source/cmake.cxx.orig 2016-05-19 10:05:58.441433800 -0400 ++++ cmake-3.5.2/Source/cmake.cxx 2016-05-19 10:11:43.926575800 -0400 +@@ -49,7 +49,7 @@ + #endif + + // include the generator +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + # if !defined(CMAKE_BOOT_MINGW) + # include "cmGlobalVisualStudio6Generator.h" + # include "cmGlobalVisualStudio7Generator.h" +@@ -973,7 +973,7 @@ + void cmake::AddDefaultExtraGenerators() + { + #if defined(CMAKE_BUILD_WITH_CMAKE) +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + // e.g. kdevelop4 ? + #endif + +@@ -1413,7 +1413,7 @@ + } + else + { +-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) && !defined(CMAKE_BOOT_MINGW) + std::string installedCompiler; + // Try to find the newest VS installed on the computer and + // use that as a default if -G is not specified +@@ -1820,7 +1820,7 @@ + + void cmake::AddDefaultGenerators() + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + # if !defined(CMAKE_BOOT_MINGW) + this->Generators.push_back( + cmGlobalVisualStudio14Generator::NewFactory()); +@@ -2495,7 +2495,7 @@ + // solution. + std::string stampDepends = stampName; + stampDepends += ".depend"; +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) + cmsys::ifstream fin(stampDepends.c_str(), std::ios::in | std::ios::binary); + #else + cmsys::ifstream fin(stampDepends.c_str(), std::ios::in); +diff -aur cmake-3.5.2/Source/cmLocalUnixMakefileGenerator3.cxx.orig cmake-3.5.2/Source/cmLocalUnixMakefileGenerator3.cxx +--- cmake-3.5.2/Source/cmLocalUnixMakefileGenerator3.cxx.orig 2016-05-19 15:42:39.373832100 -0400 ++++ cmake-3.5.2/Source/cmLocalUnixMakefileGenerator3.cxx 2016-05-19 15:44:54.077730400 -0400 +@@ -2207,7 +2207,7 @@ + std::string result; + if(useWatcomQuote) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + result = "'"; + #else + result = "\"'"; +@@ -2223,7 +2223,7 @@ + { + // Choose a slash direction and fix root component. + const char* slash = "/"; +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + if(!cmSystemTools::GetForceUnixPaths()) + { + slash = "\\"; +@@ -2260,7 +2260,7 @@ + // Close the quoted result. + if(useWatcomQuote) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + result += "'"; + #else + result += "'\""; +diff -aur cmake-3.5.2/Source/cmGlobalVisualStudio14Generator.cxx.orig cmake-3.5.2/Source/cmGlobalVisualStudio14Generator.cxx +--- cmake-3.5.2/Source/cmGlobalVisualStudio14Generator.cxx.orig 2016-05-19 13:37:27.946889100 -0400 ++++ cmake-3.5.2/Source/cmGlobalVisualStudio14Generator.cxx 2016-05-19 13:39:44.407502500 -0400 +@@ -232,7 +232,7 @@ + win10SDK, cmSystemTools::KeyWOW64_32); + } + +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + struct NoWindowsH + { + bool operator()(std::string const& p) +@@ -245,7 +245,7 @@ + //---------------------------------------------------------------------------- + std::string cmGlobalVisualStudio14Generator::GetWindows10SDKVersion() + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + // This logic is taken from the vcvarsqueryregistry.bat file from VS2015 + // Try HKLM and then HKCU. + std::string win10Root; +diff -aur cmake-3.5.2/Source/cmLocalVisualStudio6Generator.cxx.orig cmake-3.5.2/Source/cmLocalVisualStudio6Generator.cxx +--- cmake-3.5.2/Source/cmLocalVisualStudio6Generator.cxx.orig 2016-05-19 13:49:33.238525500 -0400 ++++ cmake-3.5.2/Source/cmLocalVisualStudio6Generator.cxx 2016-05-19 13:50:49.003575300 -0400 +@@ -337,7 +337,7 @@ + // Make sure the path exists for the file + std::string path = cmSystemTools::GetFilenamePath(source); + cmSystemTools::MakeDirectory(path.c_str()); +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) + cmsys::ofstream sourceFout(source.c_str(), + std::ios::binary | std::ios::out + | std::ios::trunc); diff -Naur cmake-2.8.11.2/Source/cmLocalGenerator.cxx cmake-2.8.11.2-msys/Source/cmLocalGenerator.cxx ---- cmake-2.8.11.2/Source/cmLocalGenerator.cxx 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Source/cmLocalGenerator.cxx 2014-04-06 23:09:26.136400000 +0400 -@@ -1528,7 +1528,7 @@ +--- cmake-3.5.2/Source/cmLocalGenerator.cxx.orig 2016-04-15 09:41:22.000000000 -0400 ++++ cmake-3.5.2/Source/cmLocalGenerator.cxx 2016-05-19 09:41:29.624823800 -0400 +@@ -86,7 +86,7 @@ + void cmLocalGenerator::ComputeObjectMaxPath() + { + // Choose a maximum object file name length. +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) + this->ObjectPathMax = 250; + #else + this->ObjectPathMax = 1000; +@@ -262,7 +262,7 @@ + { + // Compute the install prefix. + const char* prefix = this->Makefile->GetDefinition("CMAKE_INSTALL_PREFIX"); +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + std::string prefix_win32; + if(!prefix) + { +@@ -1407,7 +1407,7 @@ linkFlags += " "; } if(this->Makefile->IsOn("WIN32") && - !(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW"))) + !(this->Makefile->IsOn("CYGWIN") && !(this->Makefile->IsOn("MSYS")) || this->Makefile->IsOn("MINGW"))) { - const std::vector& sources = target->GetSourceFiles(); - for(std::vector::const_iterator i = sources.begin(); -diff -Naur cmake-2.8.11.2/Source/cmTarget.cxx cmake-2.8.11.2-msys/Source/cmTarget.cxx ---- cmake-2.8.11.2/Source/cmTarget.cxx 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Source/cmTarget.cxx 2014-04-06 23:10:21.703600000 +0400 -@@ -1476,6 +1476,7 @@ + std::vector sources; + target->GetSourceFiles(sources, buildType); +@@ -2607,7 +2607,7 @@ + break; + case cmState::SHARED_LIBRARY: + { +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) + // Special code to handle DLL. Install the import library + // to the normal destination and the DLL to the runtime + // destination. +diff -aur cmake-3.5.2/Source/cmMakefile.cxx.orig cmake-3.5.2/Source/cmMakefile.cxx > patch +--- cmake-3.5.2/Source/cmMakefile.cxx.orig 2016-05-19 15:50:10.295496200 -0400 ++++ cmake-3.5.2/Source/cmMakefile.cxx 2016-05-19 15:51:48.011350200 -0400 +@@ -733,7 +733,7 @@ + "with CMake 2.4 or later. For compatibility with older versions please " + "use any CMake 2.8.x release or lower."); + } +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + // Do old-style link dependency analysis only for CM_USE_OLD_VS6. + if(this->GetGlobalGenerator()->IsForVS6()) + { +diff -aur cmake-3.5.2/Source/cmGlobalGenerator.cxx.orig cmake-3.5.2/Source/cmGlobalGenerator.cxx +--- cmake-3.5.2/Source/cmGlobalGenerator.cxx.orig 2016-05-19 09:07:10.921702100 -0400 ++++ cmake-3.5.2/Source/cmGlobalGenerator.cxx 2016-05-19 09:00:45.163233600 -0400 +@@ -9,7 +9,7 @@ + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. + ============================================================================*/ +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + #include "windows.h" // this must be first to define GetCurrentDirectory + #if defined(_MSC_VER) && _MSC_VER >= 1800 + # define KWSYS_WINDOWS_DEPRECATED_GetVersionEx +@@ -462,7 +462,7 @@ + // what platform we are running on + if (!mf->GetDefinition("CMAKE_SYSTEM")) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + /* Windows version number data. */ + OSVERSIONINFOEXW osviex; + ZeroMemory(&osviex, sizeof(osviex)); +@@ -1794,7 +1794,7 @@ + { + newTarget += target; + #if 0 +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) + std::string tmp = target; + // if the target does not already end in . something + // then assume .exe +diff -aur cmake-3.5.2/Source/cmGlobalGenerator.h.orig cmake-3.5.2/Source/cmGlobalGenerator.h +--- cmake-3.5.2/Source/cmGlobalGenerator.h.orig 2016-05-19 08:05:24.408852600 -0400 ++++ cmake-3.5.2/Source/cmGlobalGenerator.h 2016-05-19 08:07:22.932438900 -0400 +@@ -241,7 +241,7 @@ + */ + virtual void FindMakeProgram(cmMakefile*); + +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + /** Is this the Visual Studio 6 generator? */ + bool IsForVS6() const { return this->GetName() == "Visual Studio 6"; } + #endif +diff -Naur cmake-3.5.2/Source/cmTarget.cxx.orig cmake-3.5.2/Source/cmTarget.cxx +--- cmake-3.5.2/Source/cmTarget.cxx.orig 2016-05-19 09:27:56.216016200 -0400 ++++ cmake-3.5.2/Source/cmTarget.cxx 2016-05-19 09:24:42.377088500 -0400 +@@ -55,7 +55,7 @@ + cmTarget::cmTarget() + { + this->Makefile = 0; +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + this->LinkLibrariesForVS6Analyzed = false; + #endif + this->HaveInstallRule = false; +@@ -91,6 +91,7 @@ // Check whether this is a DLL platform. this->DLLPlatform = (this->Makefile->IsOn("WIN32") || this->Makefile->IsOn("CYGWIN") || + this->Makefile->IsOn("MSYS") || this->Makefile->IsOn("MINGW")); - // Check whether we are targeting an Apple platform. -diff -Naur cmake-2.8.11.2/Source/kwsys/CMakeLists.txt cmake-2.8.11.2-msys/Source/kwsys/CMakeLists.txt ---- cmake-2.8.11.2/Source/kwsys/CMakeLists.txt 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Source/kwsys/CMakeLists.txt 2014-04-06 23:11:57.706000000 +0400 -@@ -576,7 +576,7 @@ + // Check whether we are targeting an Android platform. +@@ -699,7 +700,7 @@ + cmTarget::LibraryID tmp; + tmp.first = lib; + tmp.second = llt; +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + this->LinkLibrariesForVS6.push_back( tmp ); + #endif + this->OriginalLinkLibraries.push_back(tmp); +@@ -811,7 +812,7 @@ + return cmMakeRange(this->Internal->LinkImplementationPropertyBacktraces); + } + +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + //---------------------------------------------------------------------------- + void + cmTarget::AnalyzeLibDependenciesForVS6( const cmMakefile& mf ) +diff -aur cmake-3.5.2/Source/cmcmd.cxx.orig cmake-3.5.2/Source/cmcmd.cxx > patch +--- cmake-3.5.2/Source/cmcmd.cxx.orig 2016-05-19 10:22:19.093739100 -0400 ++++ cmake-3.5.2/Source/cmcmd.cxx 2016-05-19 10:27:37.691969700 -0400 +@@ -81,7 +81,7 @@ + << " time command [args...] - run command and return elapsed time\n" + << " touch file - touch a file.\n" + << " touch_nocreate file - touch a file but do not create it.\n" +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + << "Available on Windows only:\n" + << " delete_regv key - delete registry value\n" + << " env_vs8_wince sdkname - displays a batch file which sets the " +@@ -1020,7 +1020,7 @@ + } + #endif + +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + // Write registry value + else if (args[1] == "write_regv" && args.size() > 3) + { +@@ -1105,7 +1105,7 @@ + { + cmSystemTools::RemoveFile(link); + } +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + return cmSystemTools::CopyFileAlways(file.c_str(), link.c_str()); + #else + std::string linktext = cmSystemTools::GetFilenameName(file); +diff -aur cmake-3.5.2/Source/cmArchiveWrite.cxx.orig cmake-3.5.2/Source/cmArchiveWrite.cxx +--- cmake-3.5.2/Source/cmArchiveWrite.cxx.orig 2016-05-19 10:17:03.572973800 -0400 ++++ cmake-3.5.2/Source/cmArchiveWrite.cxx 2016-05-19 10:18:57.611317700 -0400 +@@ -141,7 +141,7 @@ + } + break; + }; +-#if !defined(_WIN32) || defined(__CYGWIN__) ++#if !defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) + if (archive_read_disk_set_standard_lookup(this->Disk) != ARCHIVE_OK) + { + this->Error = "archive_read_disk_set_standard_lookup: "; +diff -aur cmake-3.5.2/Source/cmTarget.h.orig cmake-3.5.2/Source/cmTarget.h.orig +--- cmake-3.5.2/Source/cmTarget.h.orig 2016-05-19 08:43:05.594266500 -0400 ++++ cmake-3.5.2/Source/cmTarget.h 2016-05-19 08:47:14.155242400 -0400 +@@ -245,7 +245,7 @@ + cmStringRange GetLinkImplementationEntries() const; + cmBacktraceRange GetLinkImplementationBacktraces() const; + +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + const LinkLibraryVectorType &GetLinkLibrariesForVS6() const { + return this->LinkLibrariesForVS6;} + +@@ -259,7 +259,7 @@ + private: + bool HandleLocationPropertyPolicy(cmMakefile* context) const; + +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + /** + * A list of direct dependencies. Use in conjunction with DependencyMap. + */ +@@ -338,7 +338,7 @@ + std::vector > TLLCommands; + LinkLibraryVectorType PrevLinkedLibraries; + LinkLibraryVectorType OriginalLinkLibraries; +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + LinkLibraryVectorType LinkLibrariesForVS6; + #endif + cmMakefile* Makefile; +@@ -351,7 +351,7 @@ + bool IsImportedTarget; + bool ImportedGloballyVisible; + bool BuildInterfaceIncludesAppended; +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + bool LinkLibrariesForVS6Analyzed; + #endif + +diff -aur cmake-3.5.2/Source/cmStandardLexer.h.orig cmake-3.5.2/Source/cmStandardLexer.h +--- cmake-3.5.2/Source/cmStandardLexer.h.orig 2016-05-19 08:36:09.077653400 -0400 ++++ cmake-3.5.2/Source/cmStandardLexer.h 2016-05-19 08:37:13.037654500 -0400 +@@ -26,7 +26,7 @@ + #endif + + /* Define isatty on windows. */ +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + # include + # if defined( _MSC_VER ) + # define isatty _isatty +diff -aur cmake-3.5.2/Source/kwsys/Glob.cxx.orig cmake-3.5.2/Source/kwsys/Glob.cxx +--- cmake-3.5.2/Source/kwsys/Glob.cxx.orig 2016-05-19 15:13:59.302081400 -0400 ++++ cmake-3.5.2/Source/kwsys/Glob.cxx 2016-05-19 15:15:26.306288200 -0400 +@@ -42,7 +42,7 @@ + # define KWSYS_GLOB_CASE_INDEPENDENT + #endif + +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) + // Handle network paths + # define KWSYS_GLOB_SUPPORT_NETWORK_PATHS + #endif +diff -aur cmake-3.5.2/Source/cmFindProgramCommand.cxx.orig cmake-3.5.2/Source/cmFindProgramCommand.cxx > patch +--- cmake-3.5.2/Source/cmFindProgramCommand.cxx.orig 2016-05-19 14:32:46.174309800 -0400 ++++ cmake-3.5.2/Source/cmFindProgramCommand.cxx 2016-05-19 14:33:53.560338000 -0400 +@@ -21,7 +21,7 @@ + { + cmFindProgramHelper() + { +-#if defined (_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) ++#if defined (_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) || defined(__MINGW32__) + // Consider platform-specific extensions. + this->Extensions.push_back(".com"); + this->Extensions.push_back(".exe"); +diff -aur cmake-3.5.2/Source/cmFileCommand.cxx.orig cmake-3.5.2/Source/cmFileCommand.cxx +--- cmake-3.5.2/Source/cmFileCommand.cxx.orig 2016-05-19 14:41:49.641750500 -0400 ++++ cmake-3.5.2/Source/cmFileCommand.cxx 2016-05-19 14:44:59.019366800 -0400 +@@ -39,7 +39,7 @@ + #include + + // Table of permissions flags. +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + static mode_t mode_owner_read = S_IREAD; + static mode_t mode_owner_write = S_IWRITE; + static mode_t mode_owner_execute = S_IEXEC; +@@ -315,7 +315,7 @@ + std::string variable = resultArg.GetString(); + + // Open the specified file. +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) + cmsys::ifstream file(fileName.c_str(), std::ios::in | + (hexOutputArg.IsEnabled() ? std::ios::binary : std::ios::in)); + #else +@@ -654,7 +654,7 @@ + } + + // Open the specified file. +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) + cmsys::ifstream fin(fileName.c_str(), std::ios::in | std::ios::binary); + #else + cmsys::ifstream fin(fileName.c_str(), std::ios::in); +@@ -2721,7 +2721,7 @@ + return false; + } + i++; // Get rid of subcommand +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + char pathSep = ';'; + #else + char pathSep = ':'; +diff -aur cmake-3.5.2/Source/cmExecProgramCommand.cxx.orig cmake-3.5.2/Source/cmExecProgramCommand.cxx +--- cmake-3.5.2/Source/cmExecProgramCommand.cxx.orig 2016-05-19 16:02:58.887410400 -0400 ++++ cmake-3.5.2/Source/cmExecProgramCommand.cxx 2016-05-19 16:06:03.525319400 -0400 +@@ -156,7 +156,7 @@ + verbose = false; + } + +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + // if the command does not start with a quote, then + // try to find the program, and if the program can not be + // found use system to run the command as it must be a built in +@@ -219,7 +219,7 @@ + return false; + } + +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + if(dir) + { + cmsysProcess_SetWorkingDirectory(cp, dir); +@@ -305,7 +305,7 @@ + } + if(!msg.empty()) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + // Old Windows process execution printed this info. + msg += "\n\nfor command: "; + msg += command; +diff -aur cmake-3.5.2/Source/cmExportCommand.cxx.orig cmake-3.5.2/Source/cmExportCommand.cxx +--- cmake-3.5.2/Source/cmExportCommand.cxx.orig 2016-05-19 14:49:27.818387600 -0400 ++++ cmake-3.5.2/Source/cmExportCommand.cxx 2016-05-19 14:51:01.000599700 -0400 +@@ -301,7 +301,7 @@ + // unique with high probability. + const char* outDir = this->Makefile->GetCurrentBinaryDirectory(); + std::string hash = cmSystemTools::ComputeStringMD5(outDir); +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + this->StorePackageRegistryWin(package, outDir, hash.c_str()); + #else + this->StorePackageRegistryDir(package, outDir, hash.c_str()); +@@ -310,7 +310,7 @@ + return true; + } + +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + # include + # undef GetCurrentDirectory + //---------------------------------------------------------------------------- +diff -aur cmake-3.5.2/Source/cmDependsFortran.cxx.orig cmake-3.5.2/Source/cmDependsFortran.cxx +--- cmake-3.5.2/Source/cmDependsFortran.cxx.orig 2016-05-19 16:10:26.702949800 -0400 ++++ cmake-3.5.2/Source/cmDependsFortran.cxx 2016-05-19 16:14:31.822362400 -0400 +@@ -727,7 +727,7 @@ + return cmSystemTools::FilesDiffer(modFile, stampFile); + } + +-#if defined(_WIN32) || defined(__CYGWIN__) ++#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) + cmsys::ifstream finModFile(modFile, std::ios::in | std::ios::binary); + cmsys::ifstream finStampFile(stampFile, std::ios::in | std::ios::binary); + #else +diff -aur cmake-3.5.2/Source/cmFindPackageCommand.cxx.orig cmake-3.5.2/Source/cmFindPackageCommand.cxx +--- cmake-3.5.2/Source/cmFindPackageCommand.cxx.orig 2016-05-19 14:14:04.549137200 -0400 ++++ cmake-3.5.2/Source/cmFindPackageCommand.cxx 2016-05-19 14:18:06.737325600 -0400 +@@ -1213,7 +1213,7 @@ + //---------------------------------------------------------------------------- + void cmFindPackageCommand::FillPrefixesUserRegistry() + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + this->LoadPackageRegistryWinUser(); + #elif defined(__HAIKU__) + char dir[B_PATH_NAME_LENGTH]; +@@ -1246,12 +1246,12 @@ + return; + } + +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + this->LoadPackageRegistryWinSystem(); + #endif + } + +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + # include + # undef GetCurrentDirectory + // http://msdn.microsoft.com/en-us/library/aa384253%28v=vs.85%29.aspx +diff -aur cmake-3.5.2/Source/cmCustomCommandGenerator.cxx.orig cmake-3.5.2/Source/cmCustomCommandGenerator.cxx +--- cmake-3.5.2/Source/cmCustomCommandGenerator.cxx.orig 2016-05-19 10:41:41.091630600 -0400 ++++ cmake-3.5.2/Source/cmCustomCommandGenerator.cxx 2016-05-19 10:42:51.426005500 -0400 +@@ -57,7 +57,7 @@ + std::string escapeForShellOldStyle(const std::string& str) + { + std::string result; +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + // if there are spaces + std::string temp = str; + if (temp.find(" ") != std::string::npos && +diff -aur cmake-3.5.2/Source/cmComputeLinkInformation.cxx.orig cmake-3.5.2/Source/cmComputeLinkInformation.cxx +--- cmake-3.5.2/Source/cmComputeLinkInformation.cxx.orig 2016-05-19 10:36:17.718337900 -0400 ++++ cmake-3.5.2/Source/cmComputeLinkInformation.cxx 2016-05-19 10:39:25.038596800 -0400 +@@ -1001,7 +1001,7 @@ + + // Store this extension choice with the "." escaped. + libext += "\\"; +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + libext += this->NoCaseExpression(i->c_str()); + #else + libext += *i; +--- cmake-3.5.2/Source/cmSystemTools.cxx.orig 2016-05-19 15:25:39.437788400 -0400 ++++ cmake-3.5.2/Source/cmSystemTools.cxx 2016-05-19 15:31:46.434245000 -0400 +@@ -80,7 +80,7 @@ + class cmSystemToolsFileTime + { + public: +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + FILETIME timeCreation; + FILETIME timeLastAccess; + FILETIME timeLastWrite; +@@ -164,7 +164,7 @@ + + // replace replace with with as many times as it shows up in source. + // write the result into source. +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + void cmSystemTools::ExpandRegistryValues(std::string& source, KeyWOW64 view) + { + // Regular expression to match anything inside [...] that begins in HKEY. +@@ -1367,7 +1367,7 @@ + + std::string cmSystemTools::ConvertToOutputPath(const char* path) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + if(s_ForceUnixPaths) + { + return cmSystemTools::ConvertToUnixOutputPath(path); +@@ -1380,7 +1380,7 @@ + + void cmSystemTools::ConvertToOutputSlashes(std::string& path) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + if(!s_ForceUnixPaths) + { + // Convert to windows slashes. +@@ -1397,7 +1397,7 @@ + + std::string cmSystemTools::ConvertToRunCommandPath(const char* path) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + return cmSystemTools::ConvertToWindowsOutputPath(path); + #else + return cmSystemTools::ConvertToUnixOutputPath(path); +@@ -1707,7 +1707,7 @@ + /* Format the time using 'ls -l' conventions. */ + tim = archive_entry_mtime(entry); + #define HALF_YEAR (time_t)365 * 86400 / 2 +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + /* Windows' strftime function does not support %e format. */ + #define DAY_FMT "%d" + #else +@@ -2031,7 +2031,7 @@ + //---------------------------------------------------------------------------- + bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + cmSystemToolsWindowsHandle hFrom = + CreateFileW(SystemTools::ConvertToWindowsExtendedPath(fromFile).c_str(), + GENERIC_READ, FILE_SHARE_READ, 0, +@@ -2088,7 +2088,7 @@ + //---------------------------------------------------------------------------- + bool cmSystemTools::FileTimeGet(const char* fname, cmSystemToolsFileTime* t) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + cmSystemToolsWindowsHandle h = + CreateFileW(SystemTools::ConvertToWindowsExtendedPath(fname).c_str(), + GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, +@@ -2116,7 +2116,7 @@ + //---------------------------------------------------------------------------- + bool cmSystemTools::FileTimeSet(const char* fname, cmSystemToolsFileTime* t) + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + cmSystemToolsWindowsHandle h = + CreateFileW(SystemTools::ConvertToWindowsExtendedPath(fname).c_str(), + FILE_WRITE_ATTRIBUTES, 0, 0, OPEN_EXISTING, +@@ -2160,7 +2160,7 @@ + //---------------------------------------------------------------------------- + unsigned int cmSystemTools::RandomSeed() + { +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + unsigned int seed = 0; + + // Try using a real random source. +@@ -2214,7 +2214,7 @@ + void cmSystemTools::FindCMakeResources(const char* argv0) + { + std::string exe_dir; +-#if defined(_WIN32) && !defined(__CYGWIN__) ++#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) + (void)argv0; // ignore this on windows + wchar_t modulepath[_MAX_PATH]; + ::GetModuleFileNameW(NULL, modulepath, sizeof(modulepath)); +diff -aur cmake-3.5.2/Source/kwsys/CMakeLists.txt.orig cmake-3.5.2/Source/kwsys/CMakeLists.txt +--- cmake-3.5.2/Source/kwsys/CMakeLists.txt.orig 2016-04-15 09:41:22.000000000 -0400 ++++ cmake-3.5.2/Source/kwsys/CMakeLists.txt 2016-05-22 14:32:07.500150000 -0400 +@@ -460,7 +460,7 @@ IF(KWSYS_USE_SystemInformation) SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY COMPILE_DEFINITIONS SIZEOF_VOID_P=${CMAKE_SIZEOF_VOID_P}) @@ -977,7 +1624,16 @@ diff -Naur cmake-2.8.11.2/Source/kwsys/CMakeLists.txt cmake-2.8.11.2-msys/Source INCLUDE(CheckIncludeFiles) CHECK_INCLUDE_FILES("sys/types.h;ifaddrs.h" KWSYS_SYS_HAS_IFADDRS_H) IF(KWSYS_SYS_HAS_IFADDRS_H) -@@ -1074,9 +1074,9 @@ +@@ -622,7 +622,7 @@ + COMPILE_DEFINITIONS KWSYS_BUILD_SHARED=1) + ENDIF() + +- IF(UNIX AND NOT CYGWIN) ++ IF(UNIX AND NOT CYGWIN AND NOT MSYS) + KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_GETLOADAVG + "Checking whether CXX compiler has getloadavg" DIRECT) + IF(KWSYS_CXX_HAS_GETLOADAVG) +@@ -991,9 +991,9 @@ ADD_EXECUTABLE(${KWSYS_NAMESPACE}TestProcess testProcess.c) SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}TestProcess PROPERTY LABELS ${KWSYS_LABELS_EXE}) TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE}TestProcess ${KWSYS_NAMESPACE}_c) @@ -986,13 +1642,13 @@ diff -Naur cmake-2.8.11.2/Source/kwsys/CMakeLists.txt cmake-2.8.11.2-msys/Source SET(KWSYS_TEST_PROCESS_7 7) - ENDIF() + ENDIF(NOT CYGWIN AND NOT MSYS) - FOREACH(n 1 2 3 4 5 6 ${KWSYS_TEST_PROCESS_7}) + FOREACH(n 1 2 3 4 5 6 ${KWSYS_TEST_PROCESS_7} 9 10) ADD_TEST(kwsys.testProcess-${n} ${EXEC_DIR}/${KWSYS_NAMESPACE}TestProcess ${n}) SET_PROPERTY(TEST kwsys.testProcess-${n} PROPERTY LABELS ${KWSYS_LABELS_TEST}) -diff -Naur cmake-2.8.11.2/Tests/CMakeLists.txt cmake-2.8.11.2-msys/Tests/CMakeLists.txt ---- cmake-2.8.11.2/Tests/CMakeLists.txt 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Tests/CMakeLists.txt 2014-04-06 23:19:33.007600000 +0400 -@@ -115,7 +115,7 @@ +diff -aur cmake-3.5.2/Tests/CMakeLists.txt.orig cmake-3.5.2/Tests/CMakeLists.txt +--- cmake-3.5.2/Tests/CMakeLists.txt.orig 2016-04-15 09:41:23.000000000 -0400 ++++ cmake-3.5.2/Tests/CMakeLists.txt 2016-05-22 14:32:07.510150700 -0400 +@@ -167,7 +167,7 @@ endif() if(do_cvs_tests AND NOT UNIX) @@ -1001,7 +1657,7 @@ diff -Naur cmake-2.8.11.2/Tests/CMakeLists.txt cmake-2.8.11.2-msys/Tests/CMakeLi set(do_cvs_tests 0) endif() endif() -@@ -173,7 +173,7 @@ +@@ -265,7 +265,7 @@ # assume no resources building to test set(TEST_RESOURCES FALSE) # for windows and cygwin assume we have resources @@ -1010,7 +1666,7 @@ diff -Naur cmake-2.8.11.2/Tests/CMakeLists.txt cmake-2.8.11.2-msys/Tests/CMakeLi set(TEST_RESOURCES TRUE) endif() # for borland and watcom there is no resource support -@@ -1243,7 +1243,7 @@ +@@ -1677,7 +1677,7 @@ # Test static linking on toolchains known to support it. if(CMAKE_C_COMPILER_ID STREQUAL "GNU" @@ -1019,7 +1675,7 @@ diff -Naur cmake-2.8.11.2/Tests/CMakeLists.txt cmake-2.8.11.2-msys/Tests/CMakeLi AND EXISTS "/usr/lib/libm.a") add_test(LinkStatic ${CMAKE_CTEST_COMMAND} --build-and-test -@@ -1668,7 +1668,7 @@ +@@ -2330,7 +2330,7 @@ endif() set(CTEST_TEST_UPDATE_CVS ${CVS_FOUND}) if(CTEST_TEST_UPDATE_CVS AND NOT UNIX) @@ -1028,7 +1684,7 @@ diff -Naur cmake-2.8.11.2/Tests/CMakeLists.txt cmake-2.8.11.2-msys/Tests/CMakeLi message(STATUS "No CTest.UpdateCVS test with cygwin cvs.exe outside cygwin!") set(CTEST_TEST_UPDATE_CVS 0) endif() -@@ -1688,7 +1688,7 @@ +@@ -2350,7 +2350,7 @@ mark_as_advanced(BZR_EXECUTABLE) set(CTEST_TEST_UPDATE_BZR 0) if(BZR_EXECUTABLE) @@ -1037,7 +1693,7 @@ diff -Naur cmake-2.8.11.2/Tests/CMakeLists.txt cmake-2.8.11.2-msys/Tests/CMakeLi set(CTEST_TEST_UPDATE_BZR 1) endif() endif() -@@ -1720,7 +1720,7 @@ +@@ -2382,7 +2382,7 @@ mark_as_advanced(GIT_EXECUTABLE) set(CTEST_TEST_UPDATE_GIT 0) if(GIT_EXECUTABLE) @@ -1046,7 +1702,7 @@ diff -Naur cmake-2.8.11.2/Tests/CMakeLists.txt cmake-2.8.11.2-msys/Tests/CMakeLi set(CTEST_TEST_UPDATE_GIT 1) endif() endif() -@@ -1739,7 +1739,7 @@ +@@ -2401,7 +2401,7 @@ mark_as_advanced(HG_EXECUTABLE) set(CTEST_TEST_UPDATE_HG 0) if(HG_EXECUTABLE) @@ -1055,7 +1711,7 @@ diff -Naur cmake-2.8.11.2/Tests/CMakeLists.txt cmake-2.8.11.2-msys/Tests/CMakeLi set(CTEST_TEST_UPDATE_HG 1) endif() endif() -@@ -1936,7 +1936,7 @@ +@@ -2704,7 +2704,7 @@ set(CTestTestBadExe_REGEX "BAD_COMMAND") # some cygwin can not be made to produce a BAD_COMMAND error # the best we can get from it is a failed test @@ -1076,10 +1732,10 @@ diff -Naur cmake-2.8.11.2/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt cm " MSVC: ${MSVC}\n MSVC60: ${MSVC60}\n MSVC70: ${MSVC70}\n MSVC71: ${MSVC71}\n MSVC80: ${MSVC80}\n MSVC90: ${MSVC90}\n MSVC10: ${MSVC10}\n" " GCC: ${_gcc_version}\n" " Clang: ${_clang_version}\n" -diff -Naur cmake-2.8.11.2/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in cmake-2.8.11.2-msys/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in ---- cmake-2.8.11.2/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in 2014-04-06 23:29:29.130400000 +0400 -@@ -488,23 +488,24 @@ +diff -aur cmake-3.5.2/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in.orig cmake-3.5.2/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in +--- cmake-3.5.2/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in.orig 2016-04-15 09:41:23.000000000 -0400 ++++ cmake-3.5.2/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in 2016-05-22 14:38:41.681197500 -0400 +@@ -495,23 +495,24 @@ # MSYS # gcc dummy.c -v @@ -1140,10 +1796,10 @@ diff -Naur cmake-2.8.11.2/Tests/ComplexOneConfig/Library/CMakeLists.txt cmake-2. if(NOT BORLAND) if(NOT MINGW) target_link_libraries(CMakeTestLibrary -diff -Naur cmake-2.8.11.2/Tests/ExternalProject/CMakeLists.txt cmake-2.8.11.2-msys/Tests/ExternalProject/CMakeLists.txt ---- cmake-2.8.11.2/Tests/ExternalProject/CMakeLists.txt 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Tests/ExternalProject/CMakeLists.txt 2014-04-06 23:34:01.256800000 +0400 -@@ -260,7 +260,7 @@ +diff -aur cmake-3.5.2/Tests/ExternalProject/CMakeLists.txt.orig cmake-3.5.2/Tests/ExternalProject/CMakeLists.txt +--- cmake-3.5.2/Tests/ExternalProject/CMakeLists.txt.orig 2016-04-15 09:41:24.000000000 -0400 ++++ cmake-3.5.2/Tests/ExternalProject/CMakeLists.txt 2016-05-22 14:43:01.879520400 -0400 +@@ -100,7 +100,7 @@ endif() if(do_cvs_tests AND NOT UNIX) @@ -1153,9 +1809,9 @@ diff -Naur cmake-2.8.11.2/Tests/ExternalProject/CMakeLists.txt cmake-2.8.11.2-ms set(do_cvs_tests 0) endif() diff -Naur cmake-2.8.11.2/Tests/FindPackageTest/CMakeLists.txt cmake-2.8.11.2-msys/Tests/FindPackageTest/CMakeLists.txt ---- cmake-2.8.11.2/Tests/FindPackageTest/CMakeLists.txt 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Tests/FindPackageTest/CMakeLists.txt 2014-04-06 23:34:24.547600000 +0400 -@@ -56,7 +56,7 @@ +--- cmake-3.5.2/Tests/FindPackageTest/CMakeLists.txt.orig 2016-04-15 09:41:24.000000000 -0400 ++++ cmake-3.5.2/Tests/FindPackageTest/CMakeLists.txt 2016-05-22 14:43:01.886520300 -0400 +@@ -65,7 +65,7 @@ #----------------------------------------------------------------------------- # Test system package registry if possible. set(CMakeTestSystemPackage "") @@ -1164,10 +1820,10 @@ diff -Naur cmake-2.8.11.2/Tests/FindPackageTest/CMakeLists.txt cmake-2.8.11.2-ms # Try writing a value to the system package registry. set(_data "${FindPackageTest_SOURCE_DIR}/SystemPackage") set(_key "HKLM\\Software\\Kitware\\CMake\\Packages\\CMakeTestSystemPackage") -diff -Naur cmake-2.8.11.2/Tests/Fortran/CMakeLists.txt cmake-2.8.11.2-msys/Tests/Fortran/CMakeLists.txt ---- cmake-2.8.11.2/Tests/Fortran/CMakeLists.txt 2013-07-02 17:41:40.000000000 +0400 -+++ cmake-2.8.11.2-msys/Tests/Fortran/CMakeLists.txt 2014-04-06 23:34:43.158400000 +0400 -@@ -24,7 +24,7 @@ +diff -aur cmake-3.5.2/Tests/Fortran/CMakeLists.txt.orig cmake-3.5.2/Tests/Fortran/CMakeLists.txt +--- cmake-3.5.2/Tests/Fortran/CMakeLists.txt.orig 2016-04-15 09:41:24.000000000 -0400 ++++ cmake-3.5.2/Tests/Fortran/CMakeLists.txt 2016-05-22 14:43:01.892522100 -0400 +@@ -28,7 +28,7 @@ # Pick a module .def file with the properly mangled symbol name. set(world_def "") @@ -1175,7 +1831,7 @@ diff -Naur cmake-2.8.11.2/Tests/Fortran/CMakeLists.txt cmake-2.8.11.2-msys/Tests +if(WIN32 AND NOT CYGWIN AND NOT MSYS) if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") set(world_def world_gnu.def) - elseif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "Intel" OR + elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel" OR diff -Naur cmake-2.8.11.2/Tests/Jump/Library/Shared/CMakeLists.txt cmake-2.8.11.2-msys/Tests/Jump/Library/Shared/CMakeLists.txt --- cmake-2.8.11.2/Tests/Jump/Library/Shared/CMakeLists.txt 2013-07-02 17:41:40.000000000 +0400 +++ cmake-2.8.11.2-msys/Tests/Jump/Library/Shared/CMakeLists.txt 2014-04-06 23:35:00.505600000 +0400 @@ -1187,6 +1843,22 @@ diff -Naur cmake-2.8.11.2/Tests/Jump/Library/Shared/CMakeLists.txt cmake-2.8.11. set(SHARED_MUST_BE_IN_EXE_DIR 1) endif() +diff -Naur cmake-3.5.2/Tests/Module/GenerateExportHeader/CMakeLists.txt cmake-3.5.2-msys/Tests/Module/GenerateExportHeader/CMakeLists.txt +--- cmake-3.5.2/Tests/Module/GenerateExportHeader/CMakeLists.txt 2016-04-15 15:41:22.000000000 +0200 ++++ cmake-3.5.2-msys/Tests/Module/GenerateExportHeader/CMakeLists.txt 2016-04-30 22:27:06.004149300 +0200 +@@ -106,10 +106,10 @@ + add_executable(GenerateExportHeader exportheader_test.cpp) + + target_link_libraries(GenerateExportHeader ${link_libraries}) +-if (WIN32 OR CYGWIN) ++if (WIN32 OR CYGWIN OR MSYS) + if(MSVC AND COMPILER_HAS_DEPRECATED) + set(_platform Win32) +- elseif((MINGW OR CYGWIN) AND COMPILER_HAS_DEPRECATED) ++ elseif((MINGW OR CYGWIN OR MSYS) AND COMPILER_HAS_DEPRECATED) + set(_platform MinGW) + else() + set(_platform WinEmpty) diff -Naur cmake-2.8.11.2/Tests/PerConfig/CMakeLists.txt cmake-2.8.11.2-msys/Tests/PerConfig/CMakeLists.txt --- cmake-2.8.11.2/Tests/PerConfig/CMakeLists.txt 2013-07-02 17:41:40.000000000 +0400 +++ cmake-2.8.11.2-msys/Tests/PerConfig/CMakeLists.txt 2014-04-06 23:35:16.480000000 +0400 @@ -1199,6 +1871,29 @@ diff -Naur cmake-2.8.11.2/Tests/PerConfig/CMakeLists.txt cmake-2.8.11.2-msys/Tes set(soname_file -DpcShared_soname_file=$) endif() add_executable(perconfig perconfig.c) +diff -aur cmake-3.5.2/Tests/RunCMake/file/RunCMakeTest.cmake.orig cmake-3.5.2/Tests/RunCMake/file/RunCMakeTest.cmake +--- cmake-3.5.2/Tests/RunCMake/file/RunCMakeTest.cmake.orig 2016-04-15 09:41:27.000000000 -0400 ++++ cmake-3.5.2/Tests/RunCMake/file/RunCMakeTest.cmake 2016-05-22 14:43:01.916024900 -0400 +@@ -24,6 +24,6 @@ + # test is valid both for GLOB and GLOB_RECURSE + run_cmake(GLOB-error-LIST_DIRECTORIES-no-arg) + +-if(NOT WIN32 OR CYGWIN) ++if(NOT WIN32 OR CYGWIN OR MSYS) + run_cmake(GLOB_RECURSE-cyclic-recursion) + endif() +diff -Naur cmake-3.5.2/Tests/RunCMake/find_program/RunCMakeTest.cmake cmake-3.5.2-msys/Tests/RunCMake/find_program/RunCMakeTest.cmake +--- cmake-3.5.2/Tests/RunCMake/find_program/RunCMakeTest.cmake 2016-04-15 15:41:22.000000000 +0200 ++++ cmake-3.5.2-msys/Tests/RunCMake/find_program/RunCMakeTest.cmake 2016-04-30 22:27:06.004149300 +0200 +@@ -4,7 +4,7 @@ + run_cmake(DirsPerName) + run_cmake(NamesPerDir) + +-if(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN)$") ++if(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$") + run_cmake(WindowsCom) + run_cmake(WindowsExe) + endif() diff -Naur cmake-2.8.11.2/Tests/SimpleInstall/CMakeLists.txt cmake-2.8.11.2-msys/Tests/SimpleInstall/CMakeLists.txt --- cmake-2.8.11.2/Tests/SimpleInstall/CMakeLists.txt 2013-07-02 17:41:40.000000000 +0400 +++ cmake-2.8.11.2-msys/Tests/SimpleInstall/CMakeLists.txt 2014-04-06 23:35:50.971600000 +0400 @@ -1241,10 +1936,10 @@ diff -Naur cmake-2.8.11.2/Tests/SimpleInstallS2/CMakeLists.txt cmake-2.8.11.2-ms set(BAT .bat) else() set(BAT) -diff -Naur cmake-2.8.11.2/Utilities/cmlibarchive/CMakeLists.txt cmake-2.8.11.2-msys/Utilities/cmlibarchive/CMakeLists.txt ---- cmake-2.8.11.2/Utilities/cmlibarchive/CMakeLists.txt 2013-07-02 17:41:41.000000000 +0400 -+++ cmake-2.8.11.2-msys/Utilities/cmlibarchive/CMakeLists.txt 2014-04-06 23:37:51.590800000 +0400 -@@ -138,7 +138,7 @@ +diff -aur cmake-3.5.2/Utilities/cmlibarchive/CMakeLists.txt.orig cmake-3.5.2/Utilities/cmlibarchive/CMakeLists.txt +--- cmake-3.5.2/Utilities/cmlibarchive/CMakeLists.txt.orig 2016-04-15 09:41:29.000000000 -0400 ++++ cmake-3.5.2/Utilities/cmlibarchive/CMakeLists.txt 2016-05-22 14:54:15.233756400 -0400 +@@ -152,7 +152,7 @@ # MACRO (TRY_MACRO_FOR_LIBRARY INCLUDES LIBRARIES TRY_TYPE SAMPLE_SOURCE MACRO_LIST) @@ -1253,7 +1948,7 @@ diff -Naur cmake-2.8.11.2/Utilities/cmlibarchive/CMakeLists.txt cmake-2.8.11.2-m CMAKE_PUSH_CHECK_STATE() # Save the state of the variables SET(CMAKE_REQUIRED_INCLUDES ${INCLUDES}) SET(CMAKE_REQUIRED_LIBRARIES ${LIBRARIES}) -@@ -163,15 +163,15 @@ +@@ -177,15 +177,15 @@ "Macro ${VAR} is checked with") ENDFOREACH(VAR) CMAKE_POP_CHECK_STATE() # Restore the state of the variables @@ -1272,7 +1967,7 @@ diff -Naur cmake-2.8.11.2/Utilities/cmlibarchive/CMakeLists.txt cmake-2.8.11.2-m IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}") # You have to add a path availabel DLL file into PATH environment variable. # Maybe DLL path is "C:/Program Files/GnuWin32/bin". -@@ -171,7 +171,7 @@ +@@ -228,7 +228,7 @@ SET(HAVE_ZLIB_H 1) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) @@ -1281,7 +1976,7 @@ diff -Naur cmake-2.8.11.2/Utilities/cmlibarchive/CMakeLists.txt cmake-2.8.11.2-m # # Test if ZLIB_WINAPI macro is needed to use. # -@@ -231,7 +231,7 @@ +@@ -250,7 +250,7 @@ ADD_DEFINITIONS(-DZLIB_DLL) ENDIF(ZLIB_DLL) ENDIF(ZLIB_WINAPI) @@ -1290,25 +1985,25 @@ diff -Naur cmake-2.8.11.2/Utilities/cmlibarchive/CMakeLists.txt cmake-2.8.11.2-m ELSE(ZLIB_FOUND) MESSAGE(FATAL_ERROR "CMake requires zlib to be available to libarchive") ENDIF(ZLIB_FOUND) -@@ -446,7 +446,7 @@ +@@ -634,7 +634,7 @@ # of Windows XP do not support SHA256, SHA384 and SHA512. # MACRO(CHECK_CRYPTO_WIN CRYPTO_LIST) - IF(WIN32 AND NOT CYGWIN) + IF(WIN32 AND NOT CYGWIN AND NOT MSYS) FOREACH(CRYPTO ${CRYPTO_LIST}) + IF(NOT ARCHIVE_CRYPTO_${CRYPTO}) IF(NOT DEFINED ARCHIVE_CRYPTO_${CRYPTO}_WIN) - STRING(TOUPPER "${CRYPTO}" crypto) -@@ -505,7 +505,7 @@ - +@@ -701,7 +701,7 @@ ENDIF(NOT DEFINED ARCHIVE_CRYPTO_${CRYPTO}_WIN) + ENDIF(NOT ARCHIVE_CRYPTO_${CRYPTO}) ENDFOREACH(CRYPTO) - ENDIF(WIN32 AND NOT CYGWIN) + ENDIF(WIN32 AND NOT CYGWIN AND NOT MSYS) ENDMACRO(CHECK_CRYPTO_WIN CRYPTO_LIST) # -@@ -1082,7 +1082,7 @@ +@@ -1363,7 +1363,7 @@ # # Register installation of PDF documents. # @@ -1317,7 +2012,7 @@ diff -Naur cmake-2.8.11.2/Utilities/cmlibarchive/CMakeLists.txt cmake-2.8.11.2-m # # On Windows platform, It's better that we install PDF documents # on one's computer. -@@ -1094,7 +1094,7 @@ +@@ -1375,7 +1375,7 @@ FILES_MATCHING PATTERN "*.pdf" ) ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doc/pdf) @@ -1326,10 +2021,10 @@ diff -Naur cmake-2.8.11.2/Utilities/cmlibarchive/CMakeLists.txt cmake-2.8.11.2-m # # # -diff -Naur cmake-2.8.11.2/Utilities/cmlibarchive/libarchive/CMakeLists.txt cmake-2.8.11.2-msys/Utilities/cmlibarchive/libarchive/CMakeLists.txt ---- cmake-2.8.11.2/Utilities/cmlibarchive/libarchive/CMakeLists.txt 2013-07-02 17:41:41.000000000 +0400 -+++ cmake-2.8.11.2-msys/Utilities/cmlibarchive/libarchive/CMakeLists.txt 2014-04-06 23:38:41.713600000 +0400 -@@ -138,14 +138,14 @@ +diff -aur cmake-3.5.2/Utilities/cmlibarchive/libarchive/CMakeLists.txt.orig cmake-3.5.2/Utilities/cmlibarchive/libarchive/CMakeLists.txt +--- cmake-3.5.2/Utilities/cmlibarchive/libarchive/CMakeLists.txt.orig 2016-04-15 09:41:29.000000000 -0400 ++++ cmake-3.5.2/Utilities/cmlibarchive/libarchive/CMakeLists.txt 2016-05-22 17:37:02.642679500 -0400 +@@ -180,14 +180,14 @@ tar.5 ) @@ -1346,10 +2041,10 @@ diff -Naur cmake-2.8.11.2/Utilities/cmlibarchive/libarchive/CMakeLists.txt cmake # CMake needs just one static "cmlibarchive" library. ADD_LIBRARY(cmlibarchive STATIC ${libarchive_SOURCES} ${include_HEADERS}) -diff -Naur cmake-2.8.11.2/Utilities/Release/release_cmake.cmake cmake-2.8.11.2-msys/Utilities/Release/release_cmake.cmake ---- cmake-2.8.11.2/Utilities/Release/release_cmake.cmake 2013-07-02 17:41:41.000000000 +0400 -+++ cmake-2.8.11.2-msys/Utilities/Release/release_cmake.cmake 2014-04-06 23:40:09.697600000 +0400 -@@ -100,6 +100,10 @@ +diff -aur cmake-3.5.2/Utilities/Release/release_cmake.cmake.orig cmake-3.5.2/Utilities/Release/release_cmake.cmake +--- cmake-3.5.2/Utilities/Release/release_cmake.cmake.orig 2016-04-15 09:41:29.000000000 -0400 ++++ cmake-3.5.2/Utilities/Release/release_cmake.cmake 2016-05-22 15:05:16.234560500 -0400 +@@ -112,6 +112,10 @@ set(SUFFIXES ${SUFFIXES} "*.tar.bz2") set(extra_files setup.hint) endif() @@ -1360,3 +2055,4 @@ diff -Naur cmake-2.8.11.2/Utilities/Release/release_cmake.cmake cmake-2.8.11.2-m if("${gen}" STREQUAL "TZ") set(SUFFIXES ${SUFFIXES} "*.tar.Z") endif() + diff --git a/cmake/disable-curses-for-msys.patch b/cmake/disable-curses-for-msys.patch index 99b0e08bc64..244d1799f26 100644 --- a/cmake/disable-curses-for-msys.patch +++ b/cmake/disable-curses-for-msys.patch @@ -1,6 +1,7 @@ ---- cmake/src/cmake-3.2.3/CMakeLists.txt.orig 2015-06-05 00:33:15.424175400 +0100 -+++ cmake-3.2.3/CMakeLists.txt 2015-06-05 00:27:44.021827700 +0100 -@@ -412,7 +412,7 @@ +diff -aur cmake-3.5.2/CMakeLists.txt.orig-2 cmake-3.5.2/CMakeLists.txt +--- cmake-3.5.2/CMakeLists.txt.orig-2 2016-05-22 15:54:50.164818300 -0400 ++++ cmake-3.5.2/CMakeLists.txt 2016-05-22 15:54:50.186949300 -0400 +@@ -454,7 +454,7 @@ #--------------------------------------------------------------------- # Use curses? diff --git a/cmake/disable-response-files-for-msys.patch b/cmake/disable-response-files-for-msys.patch index c294bfbc7b8..e0e3a0a77ea 100644 --- a/cmake/disable-response-files-for-msys.patch +++ b/cmake/disable-response-files-for-msys.patch @@ -1,6 +1,7 @@ ---- cmake-2.8.12.2/Modules/Platform/Windows-GNU.cmake.orig 2014-01-30 23:55:26.783200000 +0400 -+++ cmake-2.8.12.2/Modules/Platform/Windows-GNU.cmake 2014-01-31 00:03:27.411200000 +0400 -@@ -86,8 +86,10 @@ +diff -aur cmake-3.5.2/Modules/Platform/Windows-GNU.cmake.orig cmake-3.5.2/Modules/Platform/Windows-GNU.cmake +--- cmake-3.5.2/Modules/Platform/Windows-GNU.cmake.orig 2016-04-15 09:41:21.000000000 -0400 ++++ cmake-3.5.2/Modules/Platform/Windows-GNU.cmake 2016-05-22 16:14:39.524241600 -0400 +@@ -84,9 +84,11 @@ set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "") set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") From e19d9bfb65ff355c43c7fcc85bd1e2d364673b31 Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Mon, 23 May 2016 14:26:10 -0400 Subject: [PATCH 036/101] curl 7.49.0 - update to latest version curl 7.49.0 - update to latest version Add all valid PGP keys. --- curl/PKGBUILD | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/curl/PKGBUILD b/curl/PKGBUILD index 3485b11cf75..0b1267a22d4 100644 --- a/curl/PKGBUILD +++ b/curl/PKGBUILD @@ -2,7 +2,7 @@ pkgbase=curl pkgname=('curl' 'libcurl' 'libcurl-devel') -pkgver=7.48.0 +pkgver=7.49.0 pkgrel=1 pkgdesc="Multi-protocol file transfer utility" arch=('i686' 'x86_64') @@ -13,10 +13,12 @@ makedepends=('heimdal-devel' 'libmetalink-devel' 'libcrypt-devel' 'libidn-devel' options=('!libtool' 'strip' '!debug') source=("https://curl.haxx.se/download/${pkgname}-${pkgver}.tar.bz2"{,.asc} curl-7.32.0-msys2.patch) -sha256sums=('864e7819210b586d42c674a1fdd577ce75a78b3dda64c63565abe5aefd72c753' +sha256sums=('14f44ed7b5207fea769ddb2c31bd9e720d37312e1c02315def67923a4a636078' 'SKIP' '703963690bfa95b92e8281b7d9070a12c18bada044c3a7c9995fe9ae5adc5a8f') -validpgpkeys=('914C533DF9B2ADA2204F586D78E11C6B279D5C91') # Daniel Stenberg +validpgpkeys=('914C533DF9B2ADA2204F586D78E11C6B279D5C91' # Daniel Stenberg + '27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2' + '4461EAF0F8E9097F48AF0555F9FEAFF9D34A1BDB') prepare() { cd "${pkgname}-${pkgver}" From e6f1f74768a9dcee164b6200325b75e4e54d3d01 Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Tue, 24 May 2016 09:03:15 -0400 Subject: [PATCH 037/101] libssh2: 1.7.0 Update package to latest version. Add validpgpkeys. --- libssh2/PKGBUILD | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libssh2/PKGBUILD b/libssh2/PKGBUILD index c7641dc64f8..00a18d56cbe 100644 --- a/libssh2/PKGBUILD +++ b/libssh2/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alexey Pavlov pkgname=('libssh2' 'libssh2-devel') -pkgver=1.6.0 +pkgver=1.7.0 pkgrel=1 pkgdesc="A library implementing the SSH2 protocol as defined by Internet Drafts" url="https://libssh2.org/" @@ -13,10 +13,11 @@ options=('!libtool') source=("https://libssh2.org/download/${pkgname}-${pkgver}.tar.gz"{,.asc} 1.2.7-cygwin.patch libssh2-1.4.3-msys2.patch) -sha256sums=('5a202943a34a1d82a1c31f74094f2453c207bf9936093867f41414968c8e8215' +sha256sums=('e4561fd43a50539a8c2ceb37841691baf03ecb7daf043766da1b112e4280d584' 'SKIP' '894937383ec281301cc15464e07cd518e5f1093fd46c41e1bb7d1f2b0ed1a4df' '0b8fc2e9ccf45f2e174e1e5350a9e05fe3c1da6b7b5b42aab0e06d979d11d1f4') +validpgpkeys=('914C533DF9B2ADA2204F586D78E11C6B279D5C91') prepare() { cd "${pkgname}-${pkgver}" From b827a678b1793571968a4d27f72f981d99c305ef Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Sun, 1 May 2016 18:26:01 -0300 Subject: [PATCH 038/101] Some environment improvements. * New script /etc/msystem providing information associated with the current MSYSTEM. This is sourced by /etc/profile but can be used by non-login scripts for getting information such as the current compiler architecture or mount point. * New script /usr/bin/shell for switching between shells without restarting MSYS2. This can be used in interactive sessions but also from shell scripts for switching the MSYSTEM without restarting bash or spawning a subshell. * Allow /etc/profile to be sourced multiple times without continuously appending stuff to PATH or losing track of the original Windows TEMP. Also implemented for /etc/profile.d/perlbin.sh, so perl path is not repeatedly appended. --- filesystem/PKGBUILD | 11 ++++++++--- filesystem/msystem | 46 +++++++++++++++++++++++++++++++++++++++++++++ filesystem/profile | 22 +++++++++++++++------- filesystem/shell | 27 ++++++++++++++++++++++++++ perl/PKGBUILD | 4 ++-- perl/perlbin.sh | 16 ++++++++++------ 6 files changed, 108 insertions(+), 18 deletions(-) create mode 100644 filesystem/msystem create mode 100644 filesystem/shell diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index 6f749f2f8ec..0f1c23676e7 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -1,4 +1,5 @@ # Maintainer: Alexey Pavlov +# Contributor: Renato Silva pkgname=filesystem pkgver=2016.05 @@ -26,6 +27,7 @@ source=('bash.bash_logout' 'start_shell.cmd' 'mingw32_shell.bat' 'mingw64_shell.bat' + 'msystem' 'msys2_shell.bat' 'msys2.ico' 'nsswitch.conf' @@ -33,6 +35,7 @@ source=('bash.bash_logout' 'profile.lang.sh' 'profile.tzset.sh' 'regen-info.sh' + 'shell' 'shells' 'start' '01-devices.post' @@ -55,13 +58,15 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' 'e38c92ded3ba1cb5bedec40dc3691a4558d88bb632e07b614df7bb10fcd34cad' '73bf20b5d11a5d2e8754bd62bb8a7cbb4fd31dfe781169723b1842aa62c323ab' '71f3031066ca0824e4b494127f74a41920b15f8b6d3f573c43da080050c0e1ca' + '3afdc0d689da510c32a04da2a021241c6fda85fdf1f1f558da5f1d778a2037f7' 'cc4088d418a2dbb1ec754a0e89b80b8521b04011c08b8f5c9a563f1bdd745c8f' '7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e' '91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d' - '400c159975f38e1578e8452cf825310fd7aee3c65c4b36714c024928e9c711af' + '5b3109cb32639aff640d5629e9c1a898e540b8b8d38ac26aa34014df6b002b63' '0a3a3b131ace34f11f428118dfe81b34da148e29b6bea3b027d79bebd47141a7' '020d0619a6af9a4d6e1068cb77f2789bcf470380426214e90177f5596d651835' '756df34c5b28478a81331785de0f56438bb652cf5f29029a9db2d83281361340' + '9f7e0f3f640e8acd0ec3a92231bb7d983b2b4741ccc16cac649d32c4e8a652f8' 'f63241cc56aa7b7ec6962d19991d211b4e1641b78ba5226835118ab493830a8b' 'e96c1f54ffff792e738aa032815c82c30821b0683806e5ed0ba2a759db2fd494' '95105051d31ecbe4ace262a4496ec1055bdd14d61b7d475a771b56fe15f8ccd9' @@ -90,7 +95,7 @@ package() { # setup /etc # install -d etc/{fstab.d,skel,profile.d,post-install} - for f in bash.bashrc bash.bash_logout fstab shells profile nsswitch.conf; do + for f in bash.bashrc bash.bash_logout fstab shells profile nsswitch.conf msystem; do install -m644 ${srcdir}/${f} etc/ done @@ -131,7 +136,7 @@ package() { install -d -m755 usr/share/man/man${d} done # various shell scripts - for f in cmd start dep-search regen-info.sh; do + for f in cmd start dep-search regen-info.sh shell; do install -m755 ${srcdir}/${f} usr/bin done diff --git a/filesystem/msystem b/filesystem/msystem new file mode 100644 index 00000000000..7507d804e7d --- /dev/null +++ b/filesystem/msystem @@ -0,0 +1,46 @@ +# MSYSTEM Environment Information +# Copyright (C) 2016 Renato Silva +# Licensed under public domain + +# Once sourced, this script provides common information associated with the +# current MSYSTEM. For example, the compiler architecture and host type. + +# The MSYSTEM_ prefix is used for avoiding too generic names. For example, +# makepkg is sensitive to the value of CARCH, so MSYSTEM_CARCH is defined +# instead. The MINGW_ prefix does not influence makepkg-mingw variables and +# is not used for the MSYS shell. + +unset MSYSTEM_PREFIX +unset MSYSTEM_CARCH +unset MSYSTEM_CHOST + +unset MINGW_CHOST +unset MINGW_PREFIX +unset MINGW_PACKAGE_PREFIX + +case "${MSYSTEM}" in + MINGW32) + MSYSTEM_PREFIX='/mingw32' + MSYSTEM_CARCH='i686' + MSYSTEM_CHOST='i686-w64-mingw32' + MINGW_CHOST="${MSYSTEM_CHOST}" + MINGW_PREFIX="${MSYSTEM_PREFIX}" + MINGW_PACKAGE_PREFIX="mingw-w64-${MSYSTEM_CARCH}" + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX + ;; + MINGW64) + MSYSTEM_PREFIX='/mingw64' + MSYSTEM_CARCH='x86_64' + MSYSTEM_CHOST='x86_64-w64-mingw32' + MINGW_CHOST="${MSYSTEM_CHOST}" + MINGW_PREFIX="${MSYSTEM_PREFIX}" + MINGW_PACKAGE_PREFIX="mingw-w64-${MSYSTEM_CARCH}" + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX + ;; + MSYS) + MSYSTEM_PREFIX='/usr' + MSYSTEM_CARCH="${HOSTTYPE}" + MSYSTEM_CHOST="${MACHTYPE}" + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST + ;; +esac diff --git a/filesystem/profile b/filesystem/profile index 9d0dd85c0fc..2ef416db87a 100644 --- a/filesystem/profile +++ b/filesystem/profile @@ -35,7 +35,7 @@ case "${MSYS2_PATH_TYPE:-minimal}" in inherit) # Inherit previous path. Note that this will make all of the Windows path # available in current shell, with possible interference in project builds. - ORIGINAL_PATH="${PATH}" + ORIGINAL_PATH="${ORIGINAL_PATH:-${PATH}}" ;; *) # Do not inherit any path configuration but configure a default Windows path @@ -44,19 +44,20 @@ case "${MSYS2_PATH_TYPE:-minimal}" in ORIGINAL_PATH="${WIN_ROOT}/System32:${WIN_ROOT}:${WIN_ROOT}/System32/Wbem:${WIN_ROOT}/System32/WindowsPowerShell/v1.0/" esac -MINGW_MOUNT_POINT= +unset MINGW_MOUNT_POINT if [ -n "$MSYSTEM" ] then + source /etc/msystem case "$MSYSTEM" in MINGW32) - MINGW_MOUNT_POINT=/mingw32 + MINGW_MOUNT_POINT="${MINGW_PREFIX}" PATH="${MINGW_MOUNT_POINT}/bin:${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}" PKG_CONFIG_PATH="${MINGW_MOUNT_POINT}/lib/pkgconfig:${MINGW_MOUNT_POINT}/share/pkgconfig" ACLOCAL_PATH="${MINGW_MOUNT_POINT}/share/aclocal:/usr/share/aclocal" MANPATH="${MINGW_MOUNT_POINT}/share/man:${MANPATH}" ;; MINGW64) - MINGW_MOUNT_POINT=/mingw64 + MINGW_MOUNT_POINT="${MINGW_PREFIX}" PATH="${MINGW_MOUNT_POINT}/bin:${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}" PKG_CONFIG_PATH="${MINGW_MOUNT_POINT}/lib/pkgconfig:${MINGW_MOUNT_POINT}/share/pkgconfig" ACLOCAL_PATH="${MINGW_MOUNT_POINT}/share/aclocal:/usr/share/aclocal" @@ -82,8 +83,15 @@ SYSCONFDIR="${SYSCONFDIR:=/etc}" # them set to the default Windows temporary directory or unset # can have unexpected consequences for msys2 apps, so we define # our own to match GNU/Linux behaviour. -ORIGINAL_TMP=$TMP -ORIGINAL_TEMP=$TEMP +# +# Note: this uppercase/lowercase workaround does not seem to work. +# In fact, it has been removed from Cygwin some years ago. See: +# +# * https://cygwin.com/git/gitweb.cgi?p=cygwin-apps/base-files.git;a=commitdiff;h=3e54b07 +# * https://cygwin.com/git/gitweb.cgi?p=cygwin-apps/base-files.git;a=commitdiff;h=7f09aef +# +ORIGINAL_TMP="${ORIGINAL_TMP:-${TMP}}" +ORIGINAL_TEMP="${ORIGINAL_TEMP:-${TEMP}}" unset TMP TEMP tmp=$(cygpath -w "$ORIGINAL_TMP" 2> /dev/null) temp=$(cygpath -w "$ORIGINAL_TEMP" 2> /dev/null) @@ -151,7 +159,7 @@ then export ACLOCAL_PATH fi -export PATH MANPATH INFOPATH PKG_CONFIG_PATH USER TMP TEMP PRINTER HOSTNAME PS1 SHELL tmp temp +export PATH MANPATH INFOPATH PKG_CONFIG_PATH USER TMP TEMP PRINTER HOSTNAME PS1 SHELL tmp temp ORIGINAL_TMP ORIGINAL_TEMP ORIGINAL_PATH unset PATH_SEPARATOR if [ "$MAYBE_FIRST_START" = "true" ]; then diff --git a/filesystem/shell b/filesystem/shell new file mode 100644 index 00000000000..47a97eda752 --- /dev/null +++ b/filesystem/shell @@ -0,0 +1,27 @@ +#!/bin/bash + +if [[ "${BASH_SOURCE}" = "${0}" || ! "${1}" =~ ^(mingw(32|64)|msys)$ ]]; then tee < Date: Sun, 1 May 2016 19:16:03 -0300 Subject: [PATCH 039/101] Remove unneeded shell starting wrappers. These batch files used to contain duplicated code that has been merged into start_shell.cmd. Shortcuts can replace them like this: * Call `start_shell.cmd -mingw32` instead of mingw32_shell.bat. * Call `start_shell.cmd -mingw64` instead of mingw64_shell.bat. * Call `start_shell.cmd -msys` instead of msys2_shell.bat. --- README.md | 2 +- cmake/PKGBUILD | 2 +- cmake/cmake-3.5.2-msys.patch | 2 +- filesystem/PKGBUILD | 11 +---------- filesystem/mingw32_shell.bat | 14 -------------- filesystem/mingw64_shell.bat | 14 -------------- filesystem/msys2_shell.bat | 14 -------------- msys2-installer/compress-msys2 | 2 +- msys2-installer/make-msys2-installer | 2 +- msys2-installer/make-msys2-installer.bat | 2 +- msys2-installer/qt-ifw/config/config.xml | 2 +- 11 files changed, 8 insertions(+), 59 deletions(-) delete mode 100644 filesystem/mingw32_shell.bat delete mode 100644 filesystem/mingw64_shell.bat delete mode 100644 filesystem/msys2_shell.bat diff --git a/README.md b/README.md index eb2174ff2cd..d33ff3634c8 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ MSYS2-packages Package scripts for MSYS2. -To build these, run msys2_shell.bat then from the bash prompt. +To build these, run start_shell.cmd then from the bash prompt. cd ${package-name} makepkg diff --git a/cmake/PKGBUILD b/cmake/PKGBUILD index d2bec584e95..f0c5a7cbd6a 100644 --- a/cmake/PKGBUILD +++ b/cmake/PKGBUILD @@ -31,7 +31,7 @@ source=("https://www.cmake.org/files/v3.5/${pkgname}-${pkgver}.tar.gz" "3.5.2-cpuinfo.patch" "3.5.2-cygwin-paths.patch") sha256sums=('92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a' - 'ff62957b203f001dc5ae9f628a2ff4276029d976c3f6b5e53a806f9074ab5d1e' + 'ecb9b77aebc13b99323fcad5e844d7414cfa88fcb2118829d5c73b0ac925220c' 'b7e398e70b97088f88a0688e8a0794d6780d3cdb91075388a30908dc4b405eb7' '98dca846de0ca7b71884e26678317f85e78e01862d58a29ce923c835ca7d614f' '4f312510b45774ef299982ea112efbae4ef89cc680a7e4a14f2d1cf619b9749c' diff --git a/cmake/cmake-3.5.2-msys.patch b/cmake/cmake-3.5.2-msys.patch index 5ba29de2922..c91cd86241b 100644 --- a/cmake/cmake-3.5.2-msys.patch +++ b/cmake/cmake-3.5.2-msys.patch @@ -479,7 +479,7 @@ diff -Naur cmake-2.8.11.2/Modules/FindMsys.cmake cmake-2.8.11.2-msys/Modules/Fin + +if (WIN32) + find_path(MSYS_INSTALL_PATH -+ msys2_shell.bat ++ start_shell.cmd + "C:/MSYS" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MSYS\\setup;rootdir]" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\MSYS\\mounts v2\\/;native]" diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index 0f1c23676e7..12f1ba80db7 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -25,10 +25,7 @@ source=('bash.bash_logout' 'dot.profile' 'fstab' 'start_shell.cmd' - 'mingw32_shell.bat' - 'mingw64_shell.bat' 'msystem' - 'msys2_shell.bat' 'msys2.ico' 'nsswitch.conf' 'profile' @@ -56,17 +53,14 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '50c3746d621e682e3560e1b37cc1ac5d988460064a20ed15f107c203ac5ad622' '9620bdf1c82ea3f14c3553c44a2006ea61ff3f5a775a2a053130a59cc186daf5' 'e38c92ded3ba1cb5bedec40dc3691a4558d88bb632e07b614df7bb10fcd34cad' - '73bf20b5d11a5d2e8754bd62bb8a7cbb4fd31dfe781169723b1842aa62c323ab' - '71f3031066ca0824e4b494127f74a41920b15f8b6d3f573c43da080050c0e1ca' '3afdc0d689da510c32a04da2a021241c6fda85fdf1f1f558da5f1d778a2037f7' - 'cc4088d418a2dbb1ec754a0e89b80b8521b04011c08b8f5c9a563f1bdd745c8f' '7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e' '91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d' '5b3109cb32639aff640d5629e9c1a898e540b8b8d38ac26aa34014df6b002b63' '0a3a3b131ace34f11f428118dfe81b34da148e29b6bea3b027d79bebd47141a7' '020d0619a6af9a4d6e1068cb77f2789bcf470380426214e90177f5596d651835' '756df34c5b28478a81331785de0f56438bb652cf5f29029a9db2d83281361340' - '9f7e0f3f640e8acd0ec3a92231bb7d983b2b4741ccc16cac649d32c4e8a652f8' + '4da1901fc060198cb1261d1f855b4f76042a50272815726d8e0518afdcc4689f' 'f63241cc56aa7b7ec6962d19991d211b4e1641b78ba5226835118ab493830a8b' 'e96c1f54ffff792e738aa032815c82c30821b0683806e5ed0ba2a759db2fd494' '95105051d31ecbe4ace262a4496ec1055bdd14d61b7d475a771b56fe15f8ccd9' @@ -116,9 +110,6 @@ package() { install -m644 ${srcdir}/msys2.ico msys2.ico install -m755 ${srcdir}/start_shell.cmd start_shell.cmd - install -m755 ${srcdir}/msys2_shell.bat msys2_shell.bat - install -m755 ${srcdir}/mingw32_shell.bat mingw32_shell.bat - install -m755 ${srcdir}/mingw64_shell.bat mingw64_shell.bat # setup /var # diff --git a/filesystem/mingw32_shell.bat b/filesystem/mingw32_shell.bat deleted file mode 100644 index c4bd20ec308..00000000000 --- a/filesystem/mingw32_shell.bat +++ /dev/null @@ -1,14 +0,0 @@ -: -@echo off - -rem To activate windows native symlinks uncomment next line -rem set MSYS=winsymlinks:nativestrict - -rem Set debugging program for errors -rem set MSYS=error_start:%WD%../../mingw32/bin/qtcreator.exe^|-debug^|^ - -rem To export full current PATH from environment into MSYS2 uncomment next line -rem set MSYS2_PATH_TYPE=inherit - -call "%~dp0start_shell.cmd" -mingw32 %* -:EOF diff --git a/filesystem/mingw64_shell.bat b/filesystem/mingw64_shell.bat deleted file mode 100644 index df9b4870b2f..00000000000 --- a/filesystem/mingw64_shell.bat +++ /dev/null @@ -1,14 +0,0 @@ -: -@echo off - -rem To activate windows native symlinks uncomment next line -rem set MSYS=winsymlinks:nativestrict - -rem Set debugging program for errors -rem set MSYS=error_start:%WD%../../mingw64/bin/qtcreator.exe^|-debug^|^ - -rem To export full current PATH from environment into MSYS2 uncomment next line -rem set MSYS2_PATH_TYPE=inherit - -call "%~dp0start_shell.cmd" -mingw64 %* -:EOF diff --git a/filesystem/msys2_shell.bat b/filesystem/msys2_shell.bat deleted file mode 100644 index 751bee687f2..00000000000 --- a/filesystem/msys2_shell.bat +++ /dev/null @@ -1,14 +0,0 @@ -: -@echo off - -rem To activate windows native symlinks uncomment next line -rem set MSYS=winsymlinks:nativestrict - -rem Set debugging program for errors -rem set MSYS=error_start:%WD%../../mingw32/bin/qtcreator.exe^|-debug^|^ - -rem To export full current PATH from environment into MSYS2 uncomment next line -rem set MSYS2_PATH_TYPE=inherit - -call "%~dp0start_shell.cmd" -msys %* -:EOF diff --git a/msys2-installer/compress-msys2 b/msys2-installer/compress-msys2 index 4290e6b0500..8b719c634a6 100644 --- a/msys2-installer/compress-msys2 +++ b/msys2-installer/compress-msys2 @@ -11,7 +11,7 @@ if [ -f /tmp/$_filename ]; then fi _dirs= -for curr_dir in /etc /include /lib /libexec /sbin /share /ssl /tmp /usr /var /mingw32_shell.bat /mingw64_shell.bat /msys2.ico /msys2_shell.bat /start_shell.cmd; do +for curr_dir in /etc /include /lib /libexec /sbin /share /ssl /tmp /usr /var /msys2.ico /start_shell.cmd; do if [[ -d $curr_dir || -f $curr_dir ]]; then _dirs="$_dirs $curr_dir" fi diff --git a/msys2-installer/make-msys2-installer b/msys2-installer/make-msys2-installer index c25db5cea24..7b32aa990e0 100644 --- a/msys2-installer/make-msys2-installer +++ b/msys2-installer/make-msys2-installer @@ -59,7 +59,7 @@ create_archives() { [ -d "${_data}" ] && rm -rf "${_data}" mkdir -p "${_data}" local _dirs= - for curr_dir in /etc /var /tmp /usr /mingw32_shell.bat /mingw64_shell.bat /msys2_shell.bat /start_shell.cmd /msys2.ico /autorebase.bat autorebasebase1st.bat; do + for curr_dir in /etc /var /tmp /usr /start_shell.cmd /msys2.ico /autorebase.bat autorebasebase1st.bat; do if [[ -d ${_newmsys}${curr_dir} || -f ${_newmsys}${curr_dir} ]]; then _dirs="${_dirs} ${_newmsys}$curr_dir" fi diff --git a/msys2-installer/make-msys2-installer.bat b/msys2-installer/make-msys2-installer.bat index 15c048e1902..18ee1b0595f 100644 --- a/msys2-installer/make-msys2-installer.bat +++ b/msys2-installer/make-msys2-installer.bat @@ -7,7 +7,7 @@ if "%1"=="" ( exit /b 1 ) -if not exist %1\msys2_shell.bat ( +if not exist %1\start_shell.cmd ( echo '%1' does not seem to be the root folder of an existing MSYS2 installation?! exit /b 2 ) diff --git a/msys2-installer/qt-ifw/config/config.xml b/msys2-installer/qt-ifw/config/config.xml index 6de953aaf81..6d64239e431 100644 --- a/msys2-installer/qt-ifw/config/config.xml +++ b/msys2-installer/qt-ifw/config/config.xml @@ -5,7 +5,7 @@ MSYS2 @BITNESS@bit The MSYS2 Developers MSYS2 @BITNESS@bit - @TargetDir@/msys2_shell.bat + @TargetDir@/start_shell.cmd ../../msys2 ../../msys2 From 2c4e6d7289dfb31219f572f098b6ad3c02302f4a Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Sun, 1 May 2016 19:48:38 -0300 Subject: [PATCH 040/101] Rename start_shell.cmd to msys2_shell.cmd. This more specific name improves MSYS2 detection by applications that are sensitive to the presence of this file, such as the installer script make-msys2-installer.bat. --- README.md | 2 +- cmake/PKGBUILD | 2 +- cmake/cmake-3.5.2-msys.patch | 2 +- filesystem/PKGBUILD | 8 ++++---- filesystem/{start_shell.cmd => msys2_shell.cmd} | 0 msys2-installer/compress-msys2 | 2 +- msys2-installer/make-msys2-installer | 2 +- msys2-installer/make-msys2-installer.bat | 2 +- msys2-installer/qt-ifw/config/config.xml | 2 +- .../packages/com.msys2.root.base/meta/installscript.js | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) rename filesystem/{start_shell.cmd => msys2_shell.cmd} (100%) diff --git a/README.md b/README.md index d33ff3634c8..d249d679300 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ MSYS2-packages Package scripts for MSYS2. -To build these, run start_shell.cmd then from the bash prompt. +To build these, run msys2_shell.cmd then from the bash prompt. cd ${package-name} makepkg diff --git a/cmake/PKGBUILD b/cmake/PKGBUILD index f0c5a7cbd6a..8c1fde186f9 100644 --- a/cmake/PKGBUILD +++ b/cmake/PKGBUILD @@ -31,7 +31,7 @@ source=("https://www.cmake.org/files/v3.5/${pkgname}-${pkgver}.tar.gz" "3.5.2-cpuinfo.patch" "3.5.2-cygwin-paths.patch") sha256sums=('92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a' - 'ecb9b77aebc13b99323fcad5e844d7414cfa88fcb2118829d5c73b0ac925220c' + '17ea1358116b4fd22b4ad372c24202058e374a97d967284fcc768d494c539e2c' 'b7e398e70b97088f88a0688e8a0794d6780d3cdb91075388a30908dc4b405eb7' '98dca846de0ca7b71884e26678317f85e78e01862d58a29ce923c835ca7d614f' '4f312510b45774ef299982ea112efbae4ef89cc680a7e4a14f2d1cf619b9749c' diff --git a/cmake/cmake-3.5.2-msys.patch b/cmake/cmake-3.5.2-msys.patch index c91cd86241b..e9744156cee 100644 --- a/cmake/cmake-3.5.2-msys.patch +++ b/cmake/cmake-3.5.2-msys.patch @@ -479,7 +479,7 @@ diff -Naur cmake-2.8.11.2/Modules/FindMsys.cmake cmake-2.8.11.2-msys/Modules/Fin + +if (WIN32) + find_path(MSYS_INSTALL_PATH -+ start_shell.cmd ++ msys2_shell.cmd + "C:/MSYS" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MSYS\\setup;rootdir]" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\MSYS\\mounts v2\\/;native]" diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index 12f1ba80db7..a3c4169abc8 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -24,9 +24,9 @@ source=('bash.bash_logout' 'dot.inputrc' 'dot.profile' 'fstab' - 'start_shell.cmd' - 'msystem' 'msys2.ico' + 'msys2_shell.cmd' + 'msystem' 'nsswitch.conf' 'profile' 'profile.lang.sh' @@ -52,9 +52,9 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' 'b896abbbd7187184045e42e2646d4cb25f5484a27558f780137c7ec9ca9bdc47' '50c3746d621e682e3560e1b37cc1ac5d988460064a20ed15f107c203ac5ad622' '9620bdf1c82ea3f14c3553c44a2006ea61ff3f5a775a2a053130a59cc186daf5' + '7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e' 'e38c92ded3ba1cb5bedec40dc3691a4558d88bb632e07b614df7bb10fcd34cad' '3afdc0d689da510c32a04da2a021241c6fda85fdf1f1f558da5f1d778a2037f7' - '7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e' '91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d' '5b3109cb32639aff640d5629e9c1a898e540b8b8d38ac26aa34014df6b002b63' '0a3a3b131ace34f11f428118dfe81b34da148e29b6bea3b027d79bebd47141a7' @@ -109,7 +109,7 @@ package() { install -m644 ${srcdir}/profile.lang.sh etc/profile.d/lang.sh install -m644 ${srcdir}/msys2.ico msys2.ico - install -m755 ${srcdir}/start_shell.cmd start_shell.cmd + install -m755 ${srcdir}/msys2_shell.cmd msys2_shell.cmd # setup /var # diff --git a/filesystem/start_shell.cmd b/filesystem/msys2_shell.cmd similarity index 100% rename from filesystem/start_shell.cmd rename to filesystem/msys2_shell.cmd diff --git a/msys2-installer/compress-msys2 b/msys2-installer/compress-msys2 index 8b719c634a6..61207397f0b 100644 --- a/msys2-installer/compress-msys2 +++ b/msys2-installer/compress-msys2 @@ -11,7 +11,7 @@ if [ -f /tmp/$_filename ]; then fi _dirs= -for curr_dir in /etc /include /lib /libexec /sbin /share /ssl /tmp /usr /var /msys2.ico /start_shell.cmd; do +for curr_dir in /etc /include /lib /libexec /sbin /share /ssl /tmp /usr /var /msys2.ico /msys2_shell.cmd; do if [[ -d $curr_dir || -f $curr_dir ]]; then _dirs="$_dirs $curr_dir" fi diff --git a/msys2-installer/make-msys2-installer b/msys2-installer/make-msys2-installer index 7b32aa990e0..c44d8503d33 100644 --- a/msys2-installer/make-msys2-installer +++ b/msys2-installer/make-msys2-installer @@ -59,7 +59,7 @@ create_archives() { [ -d "${_data}" ] && rm -rf "${_data}" mkdir -p "${_data}" local _dirs= - for curr_dir in /etc /var /tmp /usr /start_shell.cmd /msys2.ico /autorebase.bat autorebasebase1st.bat; do + for curr_dir in /etc /var /tmp /usr /msys2_shell.cmd /msys2.ico /autorebase.bat autorebasebase1st.bat; do if [[ -d ${_newmsys}${curr_dir} || -f ${_newmsys}${curr_dir} ]]; then _dirs="${_dirs} ${_newmsys}$curr_dir" fi diff --git a/msys2-installer/make-msys2-installer.bat b/msys2-installer/make-msys2-installer.bat index 18ee1b0595f..0513d3d3dbe 100644 --- a/msys2-installer/make-msys2-installer.bat +++ b/msys2-installer/make-msys2-installer.bat @@ -7,7 +7,7 @@ if "%1"=="" ( exit /b 1 ) -if not exist %1\start_shell.cmd ( +if not exist %1\msys2_shell.cmd ( echo '%1' does not seem to be the root folder of an existing MSYS2 installation?! exit /b 2 ) diff --git a/msys2-installer/qt-ifw/config/config.xml b/msys2-installer/qt-ifw/config/config.xml index 6d64239e431..f0822e4a199 100644 --- a/msys2-installer/qt-ifw/config/config.xml +++ b/msys2-installer/qt-ifw/config/config.xml @@ -5,7 +5,7 @@ MSYS2 @BITNESS@bit The MSYS2 Developers MSYS2 @BITNESS@bit - @TargetDir@/start_shell.cmd + @TargetDir@/msys2_shell.cmd ../../msys2 ../../msys2 diff --git a/msys2-installer/qt-ifw/packages/com.msys2.root.base/meta/installscript.js b/msys2-installer/qt-ifw/packages/com.msys2.root.base/meta/installscript.js index 4bd7014d8a7..19b111f8617 100644 --- a/msys2-installer/qt-ifw/packages/com.msys2.root.base/meta/installscript.js +++ b/msys2-installer/qt-ifw/packages/com.msys2.root.base/meta/installscript.js @@ -17,7 +17,7 @@ function createShortcuts() return; } - var cmdLocation = installer.value("TargetDir") + "\\start_shell.cmd"; + var cmdLocation = installer.value("TargetDir") + "\\msys2_shell.cmd"; component.addOperation("CreateShortcut", cmdLocation, "@StartMenuDir@/MSYS2 MinGW 32-bit.lnk", "-mingw32"); component.addOperation("CreateShortcut", cmdLocation, "@StartMenuDir@/MSYS2 MinGW 64-bit.lnk", "-mingw64"); component.addOperation("CreateShortcut", cmdLocation, "@StartMenuDir@/MSYS2 MSYS.lnk", "-msys"); From f102f8cf58cd01d81da5b5a912b8bdbfc9b58df5 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Sun, 1 May 2016 23:34:22 -0300 Subject: [PATCH 041/101] filesystem: Improve the shell script. This script can now also be used for executing commands with custom handling for better MSYS2 integration. The following commands are currently supported and more can be added: * Windows Explorer, for proper backslash path conversion. * Windows command prompt, for properly executing under winpty. * Programs under /mingw32 and /mingw64, for the same reason. --- filesystem/PKGBUILD | 2 +- filesystem/shell | 70 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 59 insertions(+), 13 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index a3c4169abc8..399492f4011 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -60,7 +60,7 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '0a3a3b131ace34f11f428118dfe81b34da148e29b6bea3b027d79bebd47141a7' '020d0619a6af9a4d6e1068cb77f2789bcf470380426214e90177f5596d651835' '756df34c5b28478a81331785de0f56438bb652cf5f29029a9db2d83281361340' - '4da1901fc060198cb1261d1f855b4f76042a50272815726d8e0518afdcc4689f' + 'dbf1fd2d38a89346545ebaa0969ab8bf8bf588db854b5f23690f9eefd87afc8e' 'f63241cc56aa7b7ec6962d19991d211b4e1641b78ba5226835118ab493830a8b' 'e96c1f54ffff792e738aa032815c82c30821b0683806e5ed0ba2a759db2fd494' '95105051d31ecbe4ace262a4496ec1055bdd14d61b7d475a771b56fe15f8ccd9' diff --git a/filesystem/shell b/filesystem/shell index 47a97eda752..bcbc766f9c5 100644 --- a/filesystem/shell +++ b/filesystem/shell @@ -1,16 +1,23 @@ #!/bin/bash -if [[ "${BASH_SOURCE}" = "${0}" || ! "${1}" =~ ^(mingw(32|64)|msys)$ ]]; then tee < Date: Sun, 1 May 2016 23:49:15 -0300 Subject: [PATCH 042/101] filesystem: New specific variable MSYS2_PS1. Setting this variable now makes /etc/bash.bashrc use that as PS1 instead of default value. This allows for configuration shared between MSYS2 and other environments like Cygwin or MinGW.org MSYS to define a PS1 that is specific to MSYS2 without manual detection of the system type. --- filesystem/PKGBUILD | 2 +- filesystem/bash.bashrc | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index 399492f4011..babee5db0cc 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -43,7 +43,7 @@ source=('bash.bash_logout' '08-xml-catalog.post' 'cygwin.ldif') sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' - 'b246aec17f8117b18231a94ca8b806b5e281844de402e923a9982f3622f33a43' + '437d8e49e10aa8a5dc29bda296e21d5f8a4920d4bd193d05d58c6aab259a518e' '99eae6e37081edd73b399009c85f4a67a0c14481241ee4937ab45c4178b540fb' 'ed08a8bd0919ba29ec5dd2d0c74ba74324ca2bcbf7852354b0b6c523809029a0' '4330edf340394d0dae50afb04ac2a621f106fe67fb634ec81c4bfb98be2a1eb5' diff --git a/filesystem/bash.bashrc b/filesystem/bash.bashrc index 209c768cec1..dc81d919de9 100644 --- a/filesystem/bash.bashrc +++ b/filesystem/bash.bashrc @@ -15,8 +15,12 @@ # If not running interactively, don't do anything [[ "$-" != *i* ]] && return -# Set a default prompt of: user@host, MSYSTEM variable, and current_directory -PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n\$ ' +# If MSYS2_PS1 is set, use that as default PS1, otherwise set a default prompt +# of user@host, MSYSTEM variable, and current_directory +if test -n "${MSYS2_PS1}" + then PS1="${MSYS2_PS1}" + else PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n\$ ' +fi # Uncomment to use the terminal colours set in DIR_COLORS # eval "$(dircolors -b /etc/DIR_COLORS)" From dc9fe7941382d520825999b90bde84fd12443e2c Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Mon, 2 May 2016 19:29:16 -0300 Subject: [PATCH 043/101] filesystem: Fixes for the shell starting script. * Fix default value for MSYSTEM. This was being determined based on relative paths to /mingw64 and /mingw32. Since these directories are provided by filesystem, it would always default to MINGW64, and only under such relative path condition. MSYSTEM now defaults to MSYS when not specified. * Remove the ambiguous parameters -mingw and -msys2. For the same reason above, and for avoiding confusion since MINGW shells are also "MSYS2 shells", respectively. --- filesystem/PKGBUILD | 2 +- filesystem/msys2_shell.cmd | 15 +-------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index babee5db0cc..2de0e3feac6 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -53,7 +53,7 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '50c3746d621e682e3560e1b37cc1ac5d988460064a20ed15f107c203ac5ad622' '9620bdf1c82ea3f14c3553c44a2006ea61ff3f5a775a2a053130a59cc186daf5' '7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e' - 'e38c92ded3ba1cb5bedec40dc3691a4558d88bb632e07b614df7bb10fcd34cad' + 'a109582dc1377f0b5f934a5883b95bc4ee4a60b8c262caced586b83fe0e367d3' '3afdc0d689da510c32a04da2a021241c6fda85fdf1f1f558da5f1d778a2037f7' '91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d' '5b3109cb32639aff640d5629e9c1a898e540b8b8d38ac26aa34014df6b002b63' diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index b5c2f64a0ed..d3f561fcdb5 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -17,12 +17,9 @@ rem set MSYS2_PATH_TYPE=inherit :checkparams rem Shell types if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams -if "x%~1" == "x-msys2" shift& set MSYSTEM=MSYS& goto :checkparams if "x%~1" == "x-mingw32" shift& set MSYSTEM=MINGW32& goto :checkparams if "x%~1" == "x-mingw64" shift& set MSYSTEM=MINGW64& goto :checkparams -if "x%~1" == "x-mingw" shift& ( - if exist "%WD%..\..\mingw64" (set MSYSTEM=MINGW64) else (set MSYSTEM=MINGW32) -)& goto :checkparams +if not defined MSYSTEM set MSYSTEM=MSYS rem Console types if "x%~1" == "x-consolez" shift& set MSYSCON=console.exe& goto :checkparams if "x%~1" == "x-mintty" shift& set MSYSCON=mintty.exe& goto :checkparams @@ -40,16 +37,6 @@ if "x%~1" == "x-where" shift& ( exit /b 1 ) - -rem Autodetect shell type if not specified -if not defined MSYSTEM ( - if exist "%WD%..\..\mingw64" ( - set MSYSTEM=MINGW64 - ) else if exist "%WD%..\..\mingw32" ( - set MSYSTEM=MINGW32 - ) else (set MSYSTEM=MSYS) -) - rem Setup proper title if "%MSYSTEM%" == "MSYS" ( set CONTITLE=MSys2 From 6da50f5a6682fbac3a91f623f174034cbbd8d835 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Tue, 3 May 2016 19:42:41 -0300 Subject: [PATCH 044/101] filesystem: Improvements for shell manager. * Use winpty for all commands from the Windows system32 directory. * Run Windows Explorer instances when provided with directory arguments. --- filesystem/PKGBUILD | 2 +- filesystem/shell | 52 ++++++++++++++++++++++++++++----------------- 2 files changed, 33 insertions(+), 21 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index 2de0e3feac6..a345c8bc578 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -60,7 +60,7 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '0a3a3b131ace34f11f428118dfe81b34da148e29b6bea3b027d79bebd47141a7' '020d0619a6af9a4d6e1068cb77f2789bcf470380426214e90177f5596d651835' '756df34c5b28478a81331785de0f56438bb652cf5f29029a9db2d83281361340' - 'dbf1fd2d38a89346545ebaa0969ab8bf8bf588db854b5f23690f9eefd87afc8e' + 'a860577092e95a64cb305a00d2311504f69a3149b7515674958b3f061f478c30' 'f63241cc56aa7b7ec6962d19991d211b4e1641b78ba5226835118ab493830a8b' 'e96c1f54ffff792e738aa032815c82c30821b0683806e5ed0ba2a759db2fd494' '95105051d31ecbe4ace262a4496ec1055bdd14d61b7d475a771b56fe15f8ccd9' diff --git a/filesystem/shell b/filesystem/shell index bcbc766f9c5..e5695063e23 100644 --- a/filesystem/shell +++ b/filesystem/shell @@ -1,8 +1,10 @@ #!/bin/bash +# Usage + if [[ -z "${1}" || "${1}" =~ ^(--help|-h)$ ]]; then tee < Date: Wed, 4 May 2016 20:18:02 -0300 Subject: [PATCH 045/101] More environment improvements. * Warning about required shortcut changes. When upgrading the filesystem package, user will be notified about the unified msys2_shell.cmd and asked for updating their shortcuts. * New warning mechanism for interactive bash sessions. Applications can now add warnings to the terminal for notifying the user about possible problems. This is done by adding a file containing the warning text to one of the following locations: - /etc/profile.d/NAME.warning - /mingw32/etc/profile.d/NAME.warning - /mingw64/etc/profile.d/NAME.warning These files are processed by /etc/bash.bashrc. Files with the "warning.once" extension are removed after processing. An implementation example is provided by next change. * Add simplified parameter -full-path to msys2_shell.cmd. The old parameter -use-full-path still works for now but is marked as deprecated using the above warning mechanism. * Add file opening support to shell manager. Both directory and file arguments are now accepted and passed to Windows Explorer for opening with default application. * Residual pkgrel updates. --- cmake/PKGBUILD | 2 +- filesystem/PKGBUILD | 9 +++++---- filesystem/bash.bashrc | 24 ++++++++++++++++++++++++ filesystem/filesystem.install | 11 +++++++++++ filesystem/msys2_shell.cmd | 10 +++++++++- filesystem/shell | 20 ++++++++++---------- 6 files changed, 60 insertions(+), 16 deletions(-) create mode 100644 filesystem/filesystem.install diff --git a/cmake/PKGBUILD b/cmake/PKGBUILD index 8c1fde186f9..e4d0b659bf0 100644 --- a/cmake/PKGBUILD +++ b/cmake/PKGBUILD @@ -3,7 +3,7 @@ pkgname=cmake pkgver=3.5.2 -pkgrel=1 +pkgrel=2 pkgdesc="A cross-platform open-source make system" arch=('i686' 'x86_64') url="https://www.cmake.org/" diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index a345c8bc578..5166ad81b42 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -3,7 +3,7 @@ pkgname=filesystem pkgver=2016.05 -pkgrel=1 +pkgrel=2 pkgdesc='Base filesystem' arch=('i686' 'x86_64') license=('BSD') @@ -11,6 +11,7 @@ url='https://sourceforge.net/projects/msys2/' groups=('base') provides=('msys2-base') replaces=('msys2-base') +install="${pkgname}.install" backup=('etc/fstab' 'etc/shells' 'etc/profile' etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout} etc/nsswitch.conf) @@ -43,7 +44,7 @@ source=('bash.bash_logout' '08-xml-catalog.post' 'cygwin.ldif') sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' - '437d8e49e10aa8a5dc29bda296e21d5f8a4920d4bd193d05d58c6aab259a518e' + 'b985a05176a940bfd46c33ac1a1f78b3b09508d8b7c28f8e23e542975e09e0e2' '99eae6e37081edd73b399009c85f4a67a0c14481241ee4937ab45c4178b540fb' 'ed08a8bd0919ba29ec5dd2d0c74ba74324ca2bcbf7852354b0b6c523809029a0' '4330edf340394d0dae50afb04ac2a621f106fe67fb634ec81c4bfb98be2a1eb5' @@ -53,14 +54,14 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '50c3746d621e682e3560e1b37cc1ac5d988460064a20ed15f107c203ac5ad622' '9620bdf1c82ea3f14c3553c44a2006ea61ff3f5a775a2a053130a59cc186daf5' '7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e' - 'a109582dc1377f0b5f934a5883b95bc4ee4a60b8c262caced586b83fe0e367d3' + 'a435d0a14381c486df1927862227529c78cee710da9c490cd526d38cecd6276f' '3afdc0d689da510c32a04da2a021241c6fda85fdf1f1f558da5f1d778a2037f7' '91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d' '5b3109cb32639aff640d5629e9c1a898e540b8b8d38ac26aa34014df6b002b63' '0a3a3b131ace34f11f428118dfe81b34da148e29b6bea3b027d79bebd47141a7' '020d0619a6af9a4d6e1068cb77f2789bcf470380426214e90177f5596d651835' '756df34c5b28478a81331785de0f56438bb652cf5f29029a9db2d83281361340' - 'a860577092e95a64cb305a00d2311504f69a3149b7515674958b3f061f478c30' + 'c7a9ccd80c8a888fb96c904d7deca69b530874407493f8e3d584badd834241f2' 'f63241cc56aa7b7ec6962d19991d211b4e1641b78ba5226835118ab493830a8b' 'e96c1f54ffff792e738aa032815c82c30821b0683806e5ed0ba2a759db2fd494' '95105051d31ecbe4ace262a4496ec1055bdd14d61b7d475a771b56fe15f8ccd9' diff --git a/filesystem/bash.bashrc b/filesystem/bash.bashrc index dc81d919de9..5ab19689c21 100644 --- a/filesystem/bash.bashrc +++ b/filesystem/bash.bashrc @@ -15,6 +15,30 @@ # If not running interactively, don't do anything [[ "$-" != *i* ]] && return +# Warnings +unset _warning_found +for _warning_prefix in '' ${MINGW_PREFIX}; do + for _warning_file in ${_warning_prefix}/etc/profile.d/*.warning{.once,}; do + test -f "${_warning_file}" || continue + _warning="$(command sed 's/^/\t\t/' "${_warning_file}" 2>/dev/null)" + if test -n "${_warning}"; then + if test -z "${_warning_found}"; then + _warning_found='true' + echo + fi + if test -t 1 + then printf "\t\e[1;33mwarning:\e[0m\n${_warning}\n\n" + else printf "\twarning:\n${_warning}\n\n" + fi + fi + [[ "${_warning_file}" = *.once ]] && rm -f "${_warning_file}" + done +done +unset _warning_found +unset _warning_prefix +unset _warning_file +unset _warning + # If MSYS2_PS1 is set, use that as default PS1, otherwise set a default prompt # of user@host, MSYSTEM variable, and current_directory if test -n "${MSYS2_PS1}" diff --git a/filesystem/filesystem.install b/filesystem/filesystem.install new file mode 100644 index 00000000000..05d9b97db95 --- /dev/null +++ b/filesystem/filesystem.install @@ -0,0 +1,11 @@ +# Note that this is executed under core upgrade + +post_upgrade() { + printf ' + WARNING: the shell starting scripts have been unified. Please update your + shortcuts to the following targets, otherwise they will STOP WORKING: + + * MSYS2_ROOT\msys2_shell.cmd -mingw32 + * MSYS2_ROOT\msys2_shell.cmd -mingw64 + * MSYS2_ROOT\msys2_shell.cmd -msys\n\n' +} diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index d3f561fcdb5..498095538de 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -26,7 +26,8 @@ if "x%~1" == "x-mintty" shift& set MSYSCON=mintty.exe& goto :checkparams if "x%~1" == "x-conemu" shift& set MSYSCON=conemu& goto :checkparams if "x%~1" == "x-defterm" shift& set MSYSCON=defterm& goto :checkparams rem Other parameters -if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams +if "x%~1" == "x-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams +if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& set _deprecated_use_full_path=true& goto :checkparams if "x%~1" == "x-where" shift& ( set CHERE_INVOKING=1 rem Check if next argument is an existing directory @@ -37,6 +38,13 @@ if "x%~1" == "x-where" shift& ( exit /b 1 ) +rem Deprecated parameters +rem TODO: remove this check when most users have stopped using them +if "x%_deprecated_use_full_path%" == "xtrue" ( + echo The MSYS2 shell has been started with the deprecated -use-full-path> "%WD%..\..\etc\profile.d\use_full_path.warning.once" + echo option. Please update your shortcuts to use -full-path instead.>> "%WD%..\..\etc\profile.d\use_full_path.warning.once" +) + rem Setup proper title if "%MSYSTEM%" == "MSYS" ( set CONTITLE=MSys2 diff --git a/filesystem/shell b/filesystem/shell index e5695063e23..8fe3e3b7878 100644 --- a/filesystem/shell +++ b/filesystem/shell @@ -4,7 +4,7 @@ if [[ -z "${1}" || "${1}" =~ ^(--help|-h)$ ]]; then tee < Date: Wed, 18 May 2016 09:36:59 -0300 Subject: [PATCH 046/101] filesystem: More consistent behavior for MSYSTEM. MSYSTEM now defaults to MSYS when not specified, and there is no different behavior anymore between empty value and MSYS, for example /opt/bin was not being added to path when not setting MSYSTEM. This removes the need for explicitly setting the variable, since a default value is now implied. --- appveyor.yml | 1 - filesystem/PKGBUILD | 6 ++--- filesystem/msys2_shell.cmd | 7 +++--- filesystem/msystem | 4 +++- filesystem/profile | 49 ++++++++++++++++---------------------- 5 files changed, 29 insertions(+), 38 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index bac28f45155..9cb70b969ca 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,4 @@ environment: - MSYSTEM: MSYS DEPLOY_PROVIDER: bintray BINTRAY_ACCOUNT: alexpux BINTRAY_REPOSITORY: msys2 diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index 5166ad81b42..c43e769bdb5 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -54,10 +54,10 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '50c3746d621e682e3560e1b37cc1ac5d988460064a20ed15f107c203ac5ad622' '9620bdf1c82ea3f14c3553c44a2006ea61ff3f5a775a2a053130a59cc186daf5' '7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e' - 'a435d0a14381c486df1927862227529c78cee710da9c490cd526d38cecd6276f' - '3afdc0d689da510c32a04da2a021241c6fda85fdf1f1f558da5f1d778a2037f7' + '91dfc32adec6c2e7e5ddab2d47b7812f2ae5da42bc552fd061682fb5fbb9800d' + 'dbad95826d6302294aa7cfbafdefb8ef86b12388e3ac419fc55326cc4e2fc7fe' '91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d' - '5b3109cb32639aff640d5629e9c1a898e540b8b8d38ac26aa34014df6b002b63' + 'ddad06e5a36dc501356d585154eabb755af20a4e26f1aa6709d6282feee41866' '0a3a3b131ace34f11f428118dfe81b34da148e29b6bea3b027d79bebd47141a7' '020d0619a6af9a4d6e1068cb77f2789bcf470380426214e90177f5596d651835' '756df34c5b28478a81331785de0f56438bb652cf5f29029a9db2d83281361340' diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index 498095538de..0e9e74816e4 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -19,7 +19,6 @@ rem Shell types if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams if "x%~1" == "x-mingw32" shift& set MSYSTEM=MINGW32& goto :checkparams if "x%~1" == "x-mingw64" shift& set MSYSTEM=MINGW64& goto :checkparams -if not defined MSYSTEM set MSYSTEM=MSYS rem Console types if "x%~1" == "x-consolez" shift& set MSYSCON=console.exe& goto :checkparams if "x%~1" == "x-mintty" shift& set MSYSCON=mintty.exe& goto :checkparams @@ -46,12 +45,12 @@ if "x%_deprecated_use_full_path%" == "xtrue" ( ) rem Setup proper title -if "%MSYSTEM%" == "MSYS" ( - set CONTITLE=MSys2 -) else if "%MSYSTEM%" == "MINGW32" ( +if "%MSYSTEM%" == "MINGW32" ( set "CONTITLE=MinGW x32" ) else if "%MSYSTEM%" == "MINGW64" ( set "CONTITLE=MinGW x64" +) else ( + set "CONTITLE=MSYS2 MSYS" ) if "x%MSYSCON%" == "xmintty.exe" goto startmintty diff --git a/filesystem/msystem b/filesystem/msystem index 7507d804e7d..11bdedbd295 100644 --- a/filesystem/msystem +++ b/filesystem/msystem @@ -10,6 +10,8 @@ # instead. The MINGW_ prefix does not influence makepkg-mingw variables and # is not used for the MSYS shell. +export MSYSTEM="${MSYSTEM:-MSYS}" + unset MSYSTEM_PREFIX unset MSYSTEM_CARCH unset MSYSTEM_CHOST @@ -37,7 +39,7 @@ case "${MSYSTEM}" in MINGW_PACKAGE_PREFIX="mingw-w64-${MSYSTEM_CARCH}" export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX ;; - MSYS) + *) MSYSTEM_PREFIX='/usr' MSYSTEM_CARCH="${HOSTTYPE}" MSYSTEM_CHOST="${MACHTYPE}" diff --git a/filesystem/profile b/filesystem/profile index 2ef416db87a..0b180c1059a 100644 --- a/filesystem/profile +++ b/filesystem/profile @@ -45,35 +45,26 @@ case "${MSYS2_PATH_TYPE:-minimal}" in esac unset MINGW_MOUNT_POINT -if [ -n "$MSYSTEM" ] -then - source /etc/msystem - case "$MSYSTEM" in - MINGW32) - MINGW_MOUNT_POINT="${MINGW_PREFIX}" - PATH="${MINGW_MOUNT_POINT}/bin:${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}" - PKG_CONFIG_PATH="${MINGW_MOUNT_POINT}/lib/pkgconfig:${MINGW_MOUNT_POINT}/share/pkgconfig" - ACLOCAL_PATH="${MINGW_MOUNT_POINT}/share/aclocal:/usr/share/aclocal" - MANPATH="${MINGW_MOUNT_POINT}/share/man:${MANPATH}" - ;; - MINGW64) - MINGW_MOUNT_POINT="${MINGW_PREFIX}" - PATH="${MINGW_MOUNT_POINT}/bin:${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}" - PKG_CONFIG_PATH="${MINGW_MOUNT_POINT}/lib/pkgconfig:${MINGW_MOUNT_POINT}/share/pkgconfig" - ACLOCAL_PATH="${MINGW_MOUNT_POINT}/share/aclocal:/usr/share/aclocal" - MANPATH="${MINGW_MOUNT_POINT}/share/man:${MANPATH}" - ;; - MSYS) - PATH="${MSYS2_PATH}:/opt/bin${ORIGINAL_PATH:+:${ORIGINAL_PATH}}" - PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig" - ;; - *) - PATH="${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}" - ;; - esac -else - PATH="${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}" -fi +source '/etc/msystem' +case "${MSYSTEM}" in +MINGW32) + MINGW_MOUNT_POINT="${MINGW_PREFIX}" + PATH="${MINGW_MOUNT_POINT}/bin:${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}" + PKG_CONFIG_PATH="${MINGW_MOUNT_POINT}/lib/pkgconfig:${MINGW_MOUNT_POINT}/share/pkgconfig" + ACLOCAL_PATH="${MINGW_MOUNT_POINT}/share/aclocal:/usr/share/aclocal" + MANPATH="${MINGW_MOUNT_POINT}/share/man:${MANPATH}" + ;; +MINGW64) + MINGW_MOUNT_POINT="${MINGW_PREFIX}" + PATH="${MINGW_MOUNT_POINT}/bin:${MSYS2_PATH}${ORIGINAL_PATH:+:${ORIGINAL_PATH}}" + PKG_CONFIG_PATH="${MINGW_MOUNT_POINT}/lib/pkgconfig:${MINGW_MOUNT_POINT}/share/pkgconfig" + ACLOCAL_PATH="${MINGW_MOUNT_POINT}/share/aclocal:/usr/share/aclocal" + MANPATH="${MINGW_MOUNT_POINT}/share/man:${MANPATH}" + ;; +*) + PATH="${MSYS2_PATH}:/opt/bin${ORIGINAL_PATH:+:${ORIGINAL_PATH}}" + PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig:/lib/pkgconfig" +esac MAYBE_FIRST_START=false SYSCONFDIR="${SYSCONFDIR:=/etc}" From 7aa258ac7b7f89019369c28b797233bf5d7631c9 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Mon, 23 May 2016 14:53:51 -0300 Subject: [PATCH 047/101] filesystem: Some improvements. * Improve shell manager to run existing executable files provided as first argument, instead of opening them with Windows Explorer. * Add simplified parameter -here to shell starter, making the directory argument optional and deprecating the -where parameter. * Add -help parameter to shell starter. --- filesystem/PKGBUILD | 4 ++-- filesystem/msys2_shell.cmd | 25 ++++++++++++++++--------- filesystem/shell | 4 ++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index c43e769bdb5..57e111bf9b8 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -54,14 +54,14 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '50c3746d621e682e3560e1b37cc1ac5d988460064a20ed15f107c203ac5ad622' '9620bdf1c82ea3f14c3553c44a2006ea61ff3f5a775a2a053130a59cc186daf5' '7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e' - '91dfc32adec6c2e7e5ddab2d47b7812f2ae5da42bc552fd061682fb5fbb9800d' + '58ed2b684334c695abba15a11cc0b9f6ab58477fccb00635564a66d8091b2f0c' 'dbad95826d6302294aa7cfbafdefb8ef86b12388e3ac419fc55326cc4e2fc7fe' '91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d' 'ddad06e5a36dc501356d585154eabb755af20a4e26f1aa6709d6282feee41866' '0a3a3b131ace34f11f428118dfe81b34da148e29b6bea3b027d79bebd47141a7' '020d0619a6af9a4d6e1068cb77f2789bcf470380426214e90177f5596d651835' '756df34c5b28478a81331785de0f56438bb652cf5f29029a9db2d83281361340' - 'c7a9ccd80c8a888fb96c904d7deca69b530874407493f8e3d584badd834241f2' + '373ea627247c7dbbaa79cd229b4118796f1518a3ad534e5d6c2517038a4c9f4b' 'f63241cc56aa7b7ec6962d19991d211b4e1641b78ba5226835118ab493830a8b' 'e96c1f54ffff792e738aa032815c82c30821b0683806e5ed0ba2a759db2fd494' '95105051d31ecbe4ace262a4496ec1055bdd14d61b7d475a771b56fe15f8ccd9' diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index 0e9e74816e4..d2cc1181bb0 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -15,6 +15,15 @@ rem or uncomment next line rem set MSYS2_PATH_TYPE=inherit :checkparams +rem Help option +if "x%~1" == "x-help" ( + echo Options: + echo -mingw32,mingw64,msys Set shell type + echo -defterm,mintty,conemu,consolez Set terminal type + echo -here [DIRECTORY] Starting directory + echo -full-path Inherit Windows path + exit /b 1 +) rem Shell types if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams if "x%~1" == "x-mingw32" shift& set MSYSTEM=MINGW32& goto :checkparams @@ -27,15 +36,9 @@ if "x%~1" == "x-defterm" shift& set MSYSCON=defterm& goto :checkparams rem Other parameters if "x%~1" == "x-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& set _deprecated_use_full_path=true& goto :checkparams -if "x%~1" == "x-where" shift& ( - set CHERE_INVOKING=1 - rem Check if next argument is an existing directory - if not "%~2" == "" if exist "%~2\" shift& cd /d "%~2\"& goto :checkparams - - rem If not, print error and exit - echo Invalid directory specified for -where. Exiting. 1>&2 - exit /b 1 -) +if "x%~1" == "x-here" shift& set CHERE_INVOKING=enabled_from_arguments& goto :checkparams +if "x%~1" == "x-where" shift& set CHERE_INVOKING=enabled_from_arguments& set _deprecated_where=true& goto :checkparams +if "x%CHERE_INVOKING%" == "xenabled_from_arguments" if not "%~1" == "" if exist "%~1\" shift& cd /d "%~1\"& goto :checkparams rem Deprecated parameters rem TODO: remove this check when most users have stopped using them @@ -43,6 +46,10 @@ if "x%_deprecated_use_full_path%" == "xtrue" ( echo The MSYS2 shell has been started with the deprecated -use-full-path> "%WD%..\..\etc\profile.d\use_full_path.warning.once" echo option. Please update your shortcuts to use -full-path instead.>> "%WD%..\..\etc\profile.d\use_full_path.warning.once" ) +if "x%_deprecated_where%" == "xtrue" ( + echo The MSYS2 shell has been started with the deprecated -where> "%WD%..\..\etc\profile.d\where.warning.once" + echo option. Please update your shortcuts to use -here instead.>> "%WD%..\..\etc\profile.d\where.warning.once" +) rem Setup proper title if "%MSYSTEM%" == "MINGW32" ( diff --git a/filesystem/shell b/filesystem/shell index 8fe3e3b7878..2b41bfabd42 100644 --- a/filesystem/shell +++ b/filesystem/shell @@ -4,7 +4,7 @@ if [[ -z "${1}" || "${1}" =~ ^(--help|-h)$ ]]; then tee < Date: Tue, 24 May 2016 18:06:43 -0300 Subject: [PATCH 048/101] CI: Fix for package change detection. --- ci-library.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-library.sh b/ci-library.sh index 8cc83c0ae58..5aaa9bad7dd 100644 --- a/ci-library.sh +++ b/ci-library.sh @@ -174,11 +174,12 @@ list_commits() { # Changed recipes list_packages() { local _packages - _list_changes _packages '*/PKGBUILD' '%/PKGBUILD' --pretty=format: --name-only + _list_changes _packages '*/PKGBUILD' '%/PKGBUILD' --pretty=format: --name-only || return 1 for _package in "${_packages[@]}"; do local find_case_sensitive="$(find -name "${_package}" -type d -print -quit)" test -n "${find_case_sensitive}" && packages+=("${_package}") done + return 0 } # Status functions From ce2f81c7be8613173ac90303775638e543066d63 Mon Sep 17 00:00:00 2001 From: Erwin Waterlander Date: Wed, 25 May 2016 21:34:16 +0200 Subject: [PATCH 049/101] dos2unix: Update to 7.3.4 --- dos2unix/PKGBUILD | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dos2unix/PKGBUILD b/dos2unix/PKGBUILD index 8793e1be69a..b4fd3e280b1 100644 --- a/dos2unix/PKGBUILD +++ b/dos2unix/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alexey Pavlov pkgname=dos2unix -pkgver=7.3.3 +pkgver=7.3.4 pkgrel=1 pkgdesc='Text file format converter' arch=('i686' 'x86_64') @@ -11,8 +11,15 @@ depends=('libintl') groups=('base-devel') makedepends=('perl' 'gettext-devel') conflicts=('hd2u') -source=("https://waterlan.home.xs4all.nl/${pkgname}/${pkgname}-${pkgver}.tar.gz") -sha256sums=('5c910aea2eae96663c67e87627998c4fe3cded403be5819b4c190e56c82ff0fb') +source=("https://waterlan.home.xs4all.nl/${pkgname}/${pkgname}-${pkgver}.tar.gz" + dos2unix-7.3.4-msys2.patch ) +sha256sums=('8ccda7bbc5a2f903dafd95900abb5bf5e77a769b572ef25150fde4056c5f30c5' + '103d99896fd87d00871097b36ed80ba4e0fc9bf0f158e1d53a63c9f05a339bcb') + +prepare() { + cd ${srcdir}/${pkgname}-${pkgver} + patch -p1 -i ${srcdir}/dos2unix-7.3.4-msys2.patch +} build() { cd ${srcdir}/${pkgname}-${pkgver} From 482a1da710e1dd671b7508878fa786bb6b6e915a Mon Sep 17 00:00:00 2001 From: Erwin Waterlander Date: Wed, 25 May 2016 21:38:35 +0200 Subject: [PATCH 050/101] dos2unix: Update to 7.3.4 (patch file) --- dos2unix/dos2unix-7.3.4-msys2.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 dos2unix/dos2unix-7.3.4-msys2.patch diff --git a/dos2unix/dos2unix-7.3.4-msys2.patch b/dos2unix/dos2unix-7.3.4-msys2.patch new file mode 100755 index 00000000000..0fcb7e4c99a --- /dev/null +++ b/dos2unix/dos2unix-7.3.4-msys2.patch @@ -0,0 +1,19 @@ +diff -ru dos2unix-7.3.4.orig/common.c dos2unix-7.3.4/common.c +--- dos2unix-7.3.4.orig/common.c 2016-05-24 22:11:15.000000000 +0200 ++++ dos2unix-7.3.4/common.c 2016-05-25 21:05:33.862572800 +0200 +@@ -800,6 +800,7 @@ + return path; + } + ++#ifdef NO_MKSTEMP + char *basename(char *path) + { + char *ptr; +@@ -821,6 +822,7 @@ + return ptr ; + } + #endif ++#endif + + /* Standard mktemp() is not safe to use (See mktemp(3)). + * On Windows it is recommended to use GetTempFileName() (See MSDN). From 4c8398e8f27c60cce9abfb595ff1c3405af8d70a Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Tue, 24 May 2016 14:56:53 -0300 Subject: [PATCH 051/101] pactoys-git: New package. --- pactoys-git/PKGBUILD | 45 +++++++++++++++++++++++++++++++++++++ pactoys-git/pactoys.install | 2 ++ repman-git/PKGBUILD | 36 ----------------------------- updpkgver-git/PKGBUILD | 29 ------------------------ 4 files changed, 47 insertions(+), 65 deletions(-) create mode 100644 pactoys-git/PKGBUILD create mode 100644 pactoys-git/pactoys.install delete mode 100644 repman-git/PKGBUILD delete mode 100644 updpkgver-git/PKGBUILD diff --git a/pactoys-git/PKGBUILD b/pactoys-git/PKGBUILD new file mode 100644 index 00000000000..ab8a8585622 --- /dev/null +++ b/pactoys-git/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Renato Silva + +_realname='pactoys' +pkgname="${_realname}-git" +pkgver=r1.e58a7ac +pkgrel=1 +pkgdesc='A set of pacman packaging utilities' +url='https://github.com/renatosilva/pactoys' +groups=('base' 'base-devel') +license=(BSD) +arch=(i686 x86_64) + +provides=(${_realname}) +conflicts=(${_realname} repman-git updpkgver-git) +replaces=(repman-git updpkgver-git) +depends=(pacman pkgfile wget) +makedepends=(gcc git) +install="${_realname}.install" +source=('git+https://github.com/renatosilva/pactoys') +sha256sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_realname}" + printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD) +} + +build() { + cd "${srcdir}/${_realname}/repman/native" + make +} + +package() { + cd "${srcdir}/${_realname}" + mkdir -p "${pkgdir}/var/cache/pacboy" + + install -Dm755 makepatch/makepatch.sh "${pkgdir}/usr/bin/makepatch" + install -Dm755 pacboy/pacboy.sh "${pkgdir}/usr/bin/pacboy" + install -Dm755 repman/native/repman.exe "${pkgdir}/usr/bin/repman.exe" + install -Dm755 saneman/saneman.sh "${pkgdir}/usr/bin/saneman" + install -Dm755 updpkgver/updpkgver.sh "${pkgdir}/usr/bin/updpkgver" + + install -Dm644 pacboy/pacboy.completion "${pkgdir}/usr/share/bash-completion/completions/pacboy" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_realname}/LICENSE" + install -Dm644 repman/native/inih/LICENSE.txt "${pkgdir}/usr/share/licenses/${_realname}/inih/LICENSE" +} diff --git a/pactoys-git/pactoys.install b/pactoys-git/pactoys.install new file mode 100644 index 00000000000..a50ed699329 --- /dev/null +++ b/pactoys-git/pactoys.install @@ -0,0 +1,2 @@ +post_upgrade() { rm -rf /var/cache/pacboy/*; } +pre_remove() { rm -rf /var/cache/pacboy/*; } diff --git a/repman-git/PKGBUILD b/repman-git/PKGBUILD deleted file mode 100644 index 6d0e5044a69..00000000000 --- a/repman-git/PKGBUILD +++ /dev/null @@ -1,36 +0,0 @@ -# Maintainer: Renato Silva - -_realname='repman' -pkgname="${_realname}-git" -pkgdesc='Pacman repository manager' -url='https://github.com/renatosilva/repman' -license=(BSD) - -arch=(i686 x86_64) -pkgver=r25.92edb44 -pkgrel=1 - -groups=(base) -depends=(pacman) -makedepends=(gcc git) -provides=(${_realname}) -conflicts=(${_realname}) -source=("git+${url}") -sha256sums=('SKIP') - -pkgver() { - cd "${srcdir}/${_realname}" - printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD) -} - -build() { - cd "${srcdir}/${_realname}/native" - make -} - -package() { - cd "${srcdir}/${_realname}" - install -Dm755 native/repman.exe "${pkgdir}/usr/bin/repman.exe" - install -Dm644 native/inih/LICENSE.txt "${pkgdir}/usr/share/licenses/${_realname}/inih/LICENSE" - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_realname}/LICENSE" -} diff --git a/updpkgver-git/PKGBUILD b/updpkgver-git/PKGBUILD deleted file mode 100644 index 461397b17b5..00000000000 --- a/updpkgver-git/PKGBUILD +++ /dev/null @@ -1,29 +0,0 @@ -# Maintainer: Renato Silva - -_realname='updpkgver' -pkgname="${_realname}-git" -pkgver=r1.d159db2 -pkgrel=1 -pkgdesc='Update recipe version for pacman packages' -url='https://github.com/renatosilva/updpkgver' -groups=('base-devel') -license=(BSD) -arch=(any) - -depends=(pacman wget) -makedepends=(git) -provides=(${_realname}) -conflicts=(${_realname}) -source=('git+https://github.com/renatosilva/updpkgver') -sha256sums=('SKIP') - -pkgver() { - cd "${srcdir}/${_realname}" - printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD) -} - -package() { - cd "${srcdir}/${_realname}" - install -Dm755 updpkgver.sh "${pkgdir}/usr/bin/updpkgver" - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_realname}/LICENSE" -} From e1580abd5563501c5da33630d9b9d046a5995fd5 Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Fri, 27 May 2016 11:53:56 +0300 Subject: [PATCH 052/101] make: Update to 4.2 --- make/PKGBUILD | 13 +++++-------- make/make-autoconf.patch | 25 ------------------------- 2 files changed, 5 insertions(+), 33 deletions(-) delete mode 100644 make/make-autoconf.patch diff --git a/make/PKGBUILD b/make/PKGBUILD index 1828651f989..865fe70625e 100644 --- a/make/PKGBUILD +++ b/make/PKGBUILD @@ -2,8 +2,8 @@ # Contributor: Ray Donnelly pkgname=make -pkgver=4.1 -pkgrel=4 +pkgver=4.2 +pkgrel=1 pkgdesc="GNU make utility to maintain groups of programs" arch=('i686' 'x86_64') url="https://www.gnu.org/software/make" @@ -13,15 +13,12 @@ depends=('msys2-runtime' 'libintl' 'sh') makedepends=('gettext' 'gettext-devel' 'git' 'wget' 'msys2-runtime-devel') install=${pkgname}.install options=() # 'debug' '!strip') -source=("https://ftp.gnu.org/gnu/make/${pkgname}-${pkgver}.tar.bz2" - 'make-autoconf.patch') -sha256sums=('0bc7613389650ee6a24554b52572a272f7356164fd2c4132b0bcf13123e4fca5' - '6d3c7505698fe372ede6f27491925ad76d3580ef042a7c427f2b9d839926021d') +source=("https://ftp.gnu.org/gnu/make/${pkgname}-${pkgver}.tar.bz2") +sha256sums=('4e5ce3b62fe5d75ff8db92b7f6df91e476d10c3aceebf1639796dc5bfece655f') prepare() { cd ${srcdir}/${pkgname}-${pkgver} - patch -p1 -i ${srcdir}/make-autoconf.patch - autoreconf -fi + #autoreconf -fi } build() { diff --git a/make/make-autoconf.patch b/make/make-autoconf.patch deleted file mode 100644 index 71092ca045b..00000000000 --- a/make/make-autoconf.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/w32/Makefile.am 2013-09-16 12:07:00.976000000 +0400 -+++ b/w32/Makefile.am 2013-10-18 22:09:50.533600000 +0400 -@@ -14,6 +14,7 @@ - # - # You should have received a copy of the GNU General Public License along with - # this program. If not, see . -+AUTOMAKE_OPTIONS = subdir-objects - - noinst_LIBRARIES = libw32.a - ---- a/configure.ac 2013-10-20 15:20:16.931400000 +0400 -+++ b/configure.ac 2013-10-18 22:18:46.650200000 +0400 -@@ -45,9 +45,11 @@ - AC_MINIX - - # Enable gettext, in "external" mode. --AM_GNU_GETTEXT_VERSION([0.18.1]) -+AM_GNU_GETTEXT_VERSION([0.18.3]) - AM_GNU_GETTEXT([external]) - -+AM_PROG_AR -+ - # This test must come as early as possible after the compiler configuration - # tests, because the choice of the file model can (in principle) affect - # whether functions and headers are available, whether they work, etc. From f3d69450f21b6c46597f6c565e39f522c4cdb8bb Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Sun, 29 May 2016 14:51:02 -0300 Subject: [PATCH 053/101] filesystem: Restore removed parameters as deprecated in shell starter. --- filesystem/PKGBUILD | 4 ++-- filesystem/msys2_shell.cmd | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index 57e111bf9b8..a4b6c243153 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -3,7 +3,7 @@ pkgname=filesystem pkgver=2016.05 -pkgrel=2 +pkgrel=3 pkgdesc='Base filesystem' arch=('i686' 'x86_64') license=('BSD') @@ -54,7 +54,7 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '50c3746d621e682e3560e1b37cc1ac5d988460064a20ed15f107c203ac5ad622' '9620bdf1c82ea3f14c3553c44a2006ea61ff3f5a775a2a053130a59cc186daf5' '7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e' - '58ed2b684334c695abba15a11cc0b9f6ab58477fccb00635564a66d8091b2f0c' + '45bdfd620e81e6c0ff0bc0e7d9fa1bc4efebe7382c37e8affc29e306fe3fe7b7' 'dbad95826d6302294aa7cfbafdefb8ef86b12388e3ac419fc55326cc4e2fc7fe' '91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d' 'ddad06e5a36dc501356d585154eabb755af20a4e26f1aa6709d6282feee41866' diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index d2cc1181bb0..20d967a32e9 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -26,8 +26,10 @@ if "x%~1" == "x-help" ( ) rem Shell types if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams +if "x%~1" == "x-msys2" shift& set MSYSTEM=MSYS& set _deprecated_msys2=true& goto :checkparams if "x%~1" == "x-mingw32" shift& set MSYSTEM=MINGW32& goto :checkparams if "x%~1" == "x-mingw64" shift& set MSYSTEM=MINGW64& goto :checkparams +if "x%~1" == "x-mingw" shift& set _deprecated_mingw=true& (if exist "%WD%..\..\mingw64" (set MSYSTEM=MINGW64) else (set MSYSTEM=MINGW32))& goto :checkparams rem Console types if "x%~1" == "x-consolez" shift& set MSYSCON=console.exe& goto :checkparams if "x%~1" == "x-mintty" shift& set MSYSCON=mintty.exe& goto :checkparams @@ -43,12 +45,20 @@ if "x%CHERE_INVOKING%" == "xenabled_from_arguments" if not "%~1" == "" if exist rem Deprecated parameters rem TODO: remove this check when most users have stopped using them if "x%_deprecated_use_full_path%" == "xtrue" ( - echo The MSYS2 shell has been started with the deprecated -use-full-path> "%WD%..\..\etc\profile.d\use_full_path.warning.once" - echo option. Please update your shortcuts to use -full-path instead.>> "%WD%..\..\etc\profile.d\use_full_path.warning.once" + echo The MSYS2 shell has been started with the deprecated -use-full-path> "%WD%..\..\etc\profile.d\msys2_shell.use_full_path.warning.once" + echo option. Please update your shortcuts to use -full-path instead.>> "%WD%..\..\etc\profile.d\msys2_shell.use_full_path.warning.once" ) if "x%_deprecated_where%" == "xtrue" ( - echo The MSYS2 shell has been started with the deprecated -where> "%WD%..\..\etc\profile.d\where.warning.once" - echo option. Please update your shortcuts to use -here instead.>> "%WD%..\..\etc\profile.d\where.warning.once" + echo The MSYS2 shell has been started with the deprecated -where> "%WD%..\..\etc\profile.d\msys2_shell.where.warning.once" + echo option. Please update your shortcuts to use -here instead.>> "%WD%..\..\etc\profile.d\msys2_shell.where.warning.once" +) +if "x%_deprecated_msys2%" == "xtrue" ( + echo The MSYS2 shell has been started with the deprecated -msys2> "%WD%..\..\etc\profile.d\msys2_shell.msys2.warning.once" + echo option. Please update your shortcuts to use -msys instead.>> "%WD%..\..\etc\profile.d\msys2_shell.msys2.warning.once" +) +if "x%_deprecated_mingw%" == "xtrue" ( + echo The MSYS2 shell has been started with the deprecated -mingw option.> "%WD%..\..\etc\profile.d\msys2_shell.mingw.warning.once" + echo Please update your shortcuts to use -mingw32 or -mingw64 instead.>> "%WD%..\..\etc\profile.d\msys2_shell.mingw.warning.once" ) rem Setup proper title From b133eb320aa4673fcf5523082ed1b700d487d150 Mon Sep 17 00:00:00 2001 From: Andrew Chadwick Date: Wed, 1 Jun 2016 15:44:36 +0100 Subject: [PATCH 054/101] bashisms: remove arrays --- gnupg/PKGBUILD | 2 +- gnupg/gnupg.install | 4 ++-- pinentry/PKGBUILD | 2 +- pinentry/pinentry.install | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gnupg/PKGBUILD b/gnupg/PKGBUILD index 031858b52fd..37af1c33f0b 100644 --- a/gnupg/PKGBUILD +++ b/gnupg/PKGBUILD @@ -2,7 +2,7 @@ pkgname=gnupg pkgver=1.4.20 -pkgrel=1 +pkgrel=2 pkgdesc='Complete and free implementation of the OpenPGP standard' url='https://gnupg.org/' license=('GPL') diff --git a/gnupg/gnupg.install b/gnupg/gnupg.install index 5e96ec54976..f036a17a25f 100644 --- a/gnupg/gnupg.install +++ b/gnupg/gnupg.install @@ -1,5 +1,5 @@ info_dir=usr/share/info -info_files=(gnupg1.info) +info_files="gnupg1.info" post_install() { [ -x usr/bin/install-info ] || return 0 @@ -18,7 +18,7 @@ post_upgrade() { pre_remove() { [ -x usr/bin/install-info ] || return 0 - for f in ${info_files[@]}; do + for f in $info_files; do usr/bin/install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null done } diff --git a/pinentry/PKGBUILD b/pinentry/PKGBUILD index 9eaf36c4bcb..86abbb16ecb 100644 --- a/pinentry/PKGBUILD +++ b/pinentry/PKGBUILD @@ -2,7 +2,7 @@ pkgname=pinentry pkgver=0.9.7 -pkgrel=1 +pkgrel=2 pkgdesc='A collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol' url='https://gnupg.org/related_software/pinentry/' license=('GPL') diff --git a/pinentry/pinentry.install b/pinentry/pinentry.install index 28bbeecbc05..fddb1e76476 100644 --- a/pinentry/pinentry.install +++ b/pinentry/pinentry.install @@ -1,5 +1,5 @@ info_dir=usr/share/info -info_files=(pinentry.info) +info_files="pinentry.info" post_install() { [ -x usr/bin/install-info ] || return 0 @@ -14,7 +14,7 @@ post_upgrade() { pre_remove() { [ -x usr/bin/install-info ] || return 0 - for f in ${info_files[@]}; do + for f in $info_files; do usr/bin/install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null done } From 38f70672b973ee83c8c62f1b4d82371507433e84 Mon Sep 17 00:00:00 2001 From: Andrew Chadwick Date: Wed, 1 Jun 2016 15:53:56 +0100 Subject: [PATCH 055/101] install scripts: succeed even if info isn't installed A number of install scripts were testing for install-info to no effect, then calling it regardless. For minimal installs, this makes pacman fail on them visibly. This fix replicates what other MSYS2 packages, e.g. autoconf, do. Also none of these packages actually depend on GNU info. --- bash/PKGBUILD | 2 +- bash/bash.install | 4 ++-- coreutils/PKGBUILD | 2 +- coreutils/coreutils.install | 4 ++-- findutils/PKGBUILD | 2 +- findutils/findutils.install | 4 ++-- gettext/PKGBUILD | 2 +- gettext/gettext.install | 4 ++-- git/PKGBUILD | 2 +- git/git.install | 4 ++-- gmp/PKGBUILD | 2 +- gmp/gmp.install | 4 ++-- mpc/PKGBUILD | 2 +- mpc/mpc.install | 4 ++-- mpfr/PKGBUILD | 2 +- mpfr/mpfr.install | 4 ++-- readline/PKGBUILD | 2 +- readline/readline.install | 4 ++-- 18 files changed, 27 insertions(+), 27 deletions(-) diff --git a/bash/PKGBUILD b/bash/PKGBUILD index 8c68f136e30..7dce83fdb9b 100644 --- a/bash/PKGBUILD +++ b/bash/PKGBUILD @@ -6,7 +6,7 @@ pkgname=('bash' 'bash-devel') _basever=4.3 _patchlevel=042 #prepare for some patches pkgver=${_basever}.${_patchlevel} -pkgrel=4 +pkgrel=5 pkgdesc="The GNU Bourne Again shell" arch=('i686' 'x86_64') license=('GPL') diff --git a/bash/bash.install b/bash/bash.install index 8557df15879..c4c1cc53df9 100644 --- a/bash/bash.install +++ b/bash/bash.install @@ -2,14 +2,14 @@ info_dir=usr/share/info info_files=bash.info post_upgrade() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for f in ${info_files}; do usr/bin/install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null done } pre_remove() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for f in ${info_files}; do usr/bin/install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null done diff --git a/coreutils/PKGBUILD b/coreutils/PKGBUILD index dfd955c90f1..0296a6e5e43 100644 --- a/coreutils/PKGBUILD +++ b/coreutils/PKGBUILD @@ -2,7 +2,7 @@ pkgname=coreutils pkgver=8.25 -pkgrel=1 +pkgrel=2 pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system" arch=('i686' 'x86_64') license=('GPL3') diff --git a/coreutils/coreutils.install b/coreutils/coreutils.install index 8a5e43ac077..22cfcb2a113 100644 --- a/coreutils/coreutils.install +++ b/coreutils/coreutils.install @@ -2,7 +2,7 @@ infodir=usr/share/info file=coreutils.info post_install() { - [[ -x usr/bin/install-info ]] + [[ -x usr/bin/install-info ]] || return 0 install-info $infodir/$file.gz $infodir/dir 2> /dev/null } @@ -11,7 +11,7 @@ post_upgrade() { } pre_remove() { - [[ -x usr/bin/install-info ]] + [[ -x usr/bin/install-info ]] || return 0 install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null } diff --git a/findutils/PKGBUILD b/findutils/PKGBUILD index b53e1088a3f..567289b4063 100644 --- a/findutils/PKGBUILD +++ b/findutils/PKGBUILD @@ -2,7 +2,7 @@ pkgname=findutils pkgver=4.6.0 -pkgrel=1 +pkgrel=2 pkgdesc="GNU utilities to locate files" arch=('i686' 'x86_64') license=('GPL3') diff --git a/findutils/findutils.install b/findutils/findutils.install index 5e905edb18c..043994da82b 100644 --- a/findutils/findutils.install +++ b/findutils/findutils.install @@ -2,7 +2,7 @@ infodir=/usr/share/info filelist="find-maint.info find.info" post_install() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info $infodir/$file.gz $infodir/dir 2> /dev/null done @@ -13,7 +13,7 @@ post_upgrade() { } pre_remove() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null done diff --git a/gettext/PKGBUILD b/gettext/PKGBUILD index cf574a4bee3..08eb44b0958 100644 --- a/gettext/PKGBUILD +++ b/gettext/PKGBUILD @@ -3,7 +3,7 @@ pkgbase=gettext pkgname=('gettext' 'gettext-devel' 'libgettextpo' 'libasprintf' 'libintl') pkgver=0.19.7 -pkgrel=3 +pkgrel=4 pkgdesc="GNU internationalization library" arch=('i686' 'x86_64') url="https://www.gnu.org/software/gettext/" diff --git a/gettext/gettext.install b/gettext/gettext.install index b6f26263522..82b6e3fb046 100644 --- a/gettext/gettext.install +++ b/gettext/gettext.install @@ -2,7 +2,7 @@ infodir=usr/share/info filelist="gettext.info.gz autosprintf.info.gz" post_install() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info $infodir/$file $infodir/dir 2> /dev/null done @@ -13,7 +13,7 @@ post_upgrade() { } pre_remove() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info --delete $infodir/$file $infodir/dir 2> /dev/null done diff --git a/git/PKGBUILD b/git/PKGBUILD index 6f18687aa4f..8c6702f1b9d 100644 --- a/git/PKGBUILD +++ b/git/PKGBUILD @@ -3,7 +3,7 @@ pkgname=git pkgver=2.8.2 -pkgrel=1 +pkgrel=2 pkgdesc="The fast distributed version control system" arch=('i686' 'x86_64') url="https://git-scm.com/" diff --git a/git/git.install b/git/git.install index ad69c4fe891..472688dde61 100644 --- a/git/git.install +++ b/git/git.install @@ -2,7 +2,7 @@ infodir=usr/share/info filelist="git.info.gz gitman.info.gz" post_install() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info $infodir/$file $infodir/dir 2> /dev/null done @@ -13,7 +13,7 @@ post_upgrade() { } pre_remove() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info --delete $infodir/$file $infodir/dir 2> /dev/null done diff --git a/gmp/PKGBUILD b/gmp/PKGBUILD index 3ecb3f63b67..76d3fa22957 100644 --- a/gmp/PKGBUILD +++ b/gmp/PKGBUILD @@ -3,7 +3,7 @@ pkgbase=gmp pkgname=('gmp' 'gmp-devel') pkgver=6.1.0 -pkgrel=2 +pkgrel=3 pkgdesc="A free library for arbitrary precision arithmetic" groups=('libraries') arch=('i686' 'x86_64') diff --git a/gmp/gmp.install b/gmp/gmp.install index 1288b4a7432..ae8b374c4fb 100644 --- a/gmp/gmp.install +++ b/gmp/gmp.install @@ -2,7 +2,7 @@ info_dir=usr/share/info info_files="gmp.info gmp.info-1 gmp.info-2" post_install() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for f in ${info_files}; do install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null done @@ -13,7 +13,7 @@ post_upgrade() { } pre_remove() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for f in ${info_files}; do install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null done diff --git a/mpc/PKGBUILD b/mpc/PKGBUILD index 6091521a402..f49661158f6 100644 --- a/mpc/PKGBUILD +++ b/mpc/PKGBUILD @@ -2,7 +2,7 @@ pkgname=('mpc' 'mpc-devel') pkgver=1.0.3 -pkgrel=1 +pkgrel=2 pkgdesc='Multiple precision complex arithmetic library' groups=('libraries') url='http://www.multiprecision.org' diff --git a/mpc/mpc.install b/mpc/mpc.install index 448030a77a1..f2d101eb537 100644 --- a/mpc/mpc.install +++ b/mpc/mpc.install @@ -2,7 +2,7 @@ info_dir=usr/share/info info_files=mpc.info post_install() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for f in ${info_files}; do install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null done @@ -13,7 +13,7 @@ post_upgrade() { } pre_remove() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for f in ${info_files}; do install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null done diff --git a/mpfr/PKGBUILD b/mpfr/PKGBUILD index 09d92526b2e..2431274f1ad 100644 --- a/mpfr/PKGBUILD +++ b/mpfr/PKGBUILD @@ -8,7 +8,7 @@ if [ -n "${_patchlevel}" ]; then pkgver+=.${_patchlevel} fi #pkgver=${_pkgver} -pkgrel=1 +pkgrel=2 pkgdesc="Multiple-precision floating-point library" arch=('i686' 'x86_64') url="http://www.mpfr.org/" diff --git a/mpfr/mpfr.install b/mpfr/mpfr.install index 2966e47276c..fe034905e80 100644 --- a/mpfr/mpfr.install +++ b/mpfr/mpfr.install @@ -2,7 +2,7 @@ info_dir=usr/share/info info_files=mpfr.info post_install() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for f in ${info_files}; do install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null done @@ -13,7 +13,7 @@ post_upgrade() { } pre_remove() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for f in ${info_files}; do install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null done diff --git a/readline/PKGBUILD b/readline/PKGBUILD index d8d2c40d9e6..273351e6bbc 100644 --- a/readline/PKGBUILD +++ b/readline/PKGBUILD @@ -5,7 +5,7 @@ pkgname=('libreadline' 'libreadline-devel') _basever=6.3 _patchlevel=008 #prepare for some patches pkgver=${_basever}.${_patchlevel} -pkgrel=7 +pkgrel=8 pkgdesc="GNU readline library" arch=('i686' 'x86_64') url="http://tiswww.case.edu/php/chet/readline/rltop.html" diff --git a/readline/readline.install b/readline/readline.install index a3adca0d1b5..1e6a685259e 100644 --- a/readline/readline.install +++ b/readline/readline.install @@ -2,14 +2,14 @@ infodir=usr/share/info filelist="history.info readline.info rluserman.info" post_upgrade() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info $infodir/$file.gz $infodir/dir 2> /dev/null done } pre_remove() { - [ -x usr/bin/install-info ] + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null done From 8c86454b53f4dc2d8a0edcd1a211b31b8d4c0054 Mon Sep 17 00:00:00 2001 From: Andrew Chadwick Date: Wed, 1 Jun 2016 15:55:38 +0100 Subject: [PATCH 056/101] Fix bashisms: alternative test command dash doesn't support [[ foo ]], just [ foo ]. --- coreutils/PKGBUILD | 2 +- coreutils/coreutils.install | 4 ++-- libffi-git/PKGBUILD | 2 +- libffi-git/libffi.install | 4 ++-- libffi/PKGBUILD | 2 +- libffi/libffi.install | 4 ++-- make-git/PKGBUILD | 2 +- make-git/make-git.install | 4 ++-- make/PKGBUILD | 2 +- make/make.install | 4 ++-- time/PKGBUILD | 2 +- time/time.install | 4 ++-- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/coreutils/PKGBUILD b/coreutils/PKGBUILD index 0296a6e5e43..819d5d5227c 100644 --- a/coreutils/PKGBUILD +++ b/coreutils/PKGBUILD @@ -2,7 +2,7 @@ pkgname=coreutils pkgver=8.25 -pkgrel=2 +pkgrel=3 pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system" arch=('i686' 'x86_64') license=('GPL3') diff --git a/coreutils/coreutils.install b/coreutils/coreutils.install index 22cfcb2a113..438da82071f 100644 --- a/coreutils/coreutils.install +++ b/coreutils/coreutils.install @@ -2,7 +2,7 @@ infodir=usr/share/info file=coreutils.info post_install() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 install-info $infodir/$file.gz $infodir/dir 2> /dev/null } @@ -11,7 +11,7 @@ post_upgrade() { } pre_remove() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null } diff --git a/libffi-git/PKGBUILD b/libffi-git/PKGBUILD index a697a172069..053ed17bf40 100644 --- a/libffi-git/PKGBUILD +++ b/libffi-git/PKGBUILD @@ -2,7 +2,7 @@ pkgname=('libffi' 'libffi-devel') pkgver=v3.2.1.r142.g17ffc36 -pkgrel=1 +pkgrel=2 pkgdesc="Portable, high level programming interface to various calling conventions" arch=('i686' 'x86_64') url="https://sourceware.org/libffi/" diff --git a/libffi-git/libffi.install b/libffi-git/libffi.install index 002b6722018..fd7f09ff9d8 100644 --- a/libffi-git/libffi.install +++ b/libffi-git/libffi.install @@ -2,7 +2,7 @@ infodir=usr/share/info filelist=libffi.info.gz post_install() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info $infodir/$file $infodir/dir 2> /dev/null done @@ -13,7 +13,7 @@ post_upgrade() { } pre_remove() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info --delete $infodir/$file $infodir/dir 2> /dev/null done diff --git a/libffi/PKGBUILD b/libffi/PKGBUILD index 7593a5ae238..3bfff9f140d 100644 --- a/libffi/PKGBUILD +++ b/libffi/PKGBUILD @@ -2,7 +2,7 @@ pkgname=('libffi' 'libffi-devel') pkgver=3.2.1 -pkgrel=1 +pkgrel=2 pkgdesc="Portable, high level programming interface to various calling conventions" arch=('i686' 'x86_64') url="https://sourceware.org/libffi/" diff --git a/libffi/libffi.install b/libffi/libffi.install index 002b6722018..fd7f09ff9d8 100644 --- a/libffi/libffi.install +++ b/libffi/libffi.install @@ -2,7 +2,7 @@ infodir=usr/share/info filelist=libffi.info.gz post_install() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info $infodir/$file $infodir/dir 2> /dev/null done @@ -13,7 +13,7 @@ post_upgrade() { } pre_remove() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info --delete $infodir/$file $infodir/dir 2> /dev/null done diff --git a/make-git/PKGBUILD b/make-git/PKGBUILD index d5c23021b5d..c98983e1f58 100644 --- a/make-git/PKGBUILD +++ b/make-git/PKGBUILD @@ -4,7 +4,7 @@ pkgname=make-git #_ver_base=4.1 pkgver=4.1.8.g292da6f -pkgrel=1 +pkgrel=2 pkgdesc="GNU make utility to maintain groups of programs" arch=('i686' 'x86_64') url="https://www.gnu.org/software/make" diff --git a/make-git/make-git.install b/make-git/make-git.install index 4c30f4231fd..9cbbf4afe3c 100644 --- a/make-git/make-git.install +++ b/make-git/make-git.install @@ -2,7 +2,7 @@ infodir=usr/share/info filelist="make.info make.info-1 make.info-2" post_install() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info $infodir/$file.gz $infodir/dir 2> /dev/null done @@ -13,7 +13,7 @@ post_upgrade() { } pre_remove() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null done diff --git a/make/PKGBUILD b/make/PKGBUILD index 865fe70625e..a2a2ad64015 100644 --- a/make/PKGBUILD +++ b/make/PKGBUILD @@ -3,7 +3,7 @@ pkgname=make pkgver=4.2 -pkgrel=1 +pkgrel=2 pkgdesc="GNU make utility to maintain groups of programs" arch=('i686' 'x86_64') url="https://www.gnu.org/software/make" diff --git a/make/make.install b/make/make.install index 4c30f4231fd..9cbbf4afe3c 100644 --- a/make/make.install +++ b/make/make.install @@ -2,7 +2,7 @@ infodir=usr/share/info filelist="make.info make.info-1 make.info-2" post_install() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info $infodir/$file.gz $infodir/dir 2> /dev/null done @@ -13,7 +13,7 @@ post_upgrade() { } pre_remove() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 for file in ${filelist}; do install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null done diff --git a/time/PKGBUILD b/time/PKGBUILD index 1a5e3f96a43..531f78be16a 100644 --- a/time/PKGBUILD +++ b/time/PKGBUILD @@ -2,7 +2,7 @@ pkgname=time pkgver=1.7 -pkgrel=1 +pkgrel=2 pkgdesc="Utility for monitoring a program's use of system resources" depends=('msys2-runtime') makedepends=('gcc') diff --git a/time/time.install b/time/time.install index 495ce5a5e0c..cc9cda330b1 100644 --- a/time/time.install +++ b/time/time.install @@ -2,7 +2,7 @@ infodir=usr/share/info filelist="time.info.gz" post_install() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 for file in "${filelist}"; do install-info "$infodir/$file" "$infodir/dir" 2>/dev/null done @@ -13,7 +13,7 @@ post_upgrade() { } pre_remove() { - [[ -x usr/bin/install-info ]] || return 0 + [ -x usr/bin/install-info ] || return 0 for file in "${filelist}"; do install-info --delete "$infodir/$file" "$infodir/dir" 2>/dev/null done From 74f0d029b0dabcfed5d33498478b5c3a7714202a Mon Sep 17 00:00:00 2001 From: Andrew Chadwick Date: Wed, 1 Jun 2016 16:41:44 +0100 Subject: [PATCH 057/101] Fix pinentry build --- pinentry/PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pinentry/PKGBUILD b/pinentry/PKGBUILD index 86abbb16ecb..bbc096522de 100644 --- a/pinentry/PKGBUILD +++ b/pinentry/PKGBUILD @@ -2,13 +2,13 @@ pkgname=pinentry pkgver=0.9.7 -pkgrel=2 +pkgrel=3 pkgdesc='A collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol' url='https://gnupg.org/related_software/pinentry/' license=('GPL') arch=('i686' 'x86_64') -makedepends=('ncurses-devel') -depends=('ncurses') +makedepends=('ncurses-devel' 'libassuan-devel' 'libgpg-error-devel') +depends=('ncurses' 'libassuan' 'libgpg-error') source=(https://gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2{,.sig} pinentry-0.9.1-msysize.patch) install=pinentry.install From 97491f06184abf63c49a2680144cf75cf9e405f6 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Thu, 2 Jun 2016 16:42:22 +0100 Subject: [PATCH 058/101] pacman: Add a means to ensure sha1 consistency .. .. in the face of using `git am` to apply patches. We set `GIT_COMMITTER_NAME` and `GIT_COMMITTER_EMAIL` to fixed values and provide a `gitam_mkpkg` function that passes `--committer-date-is-author-date` The means we can generate packages with the same, correct sha1 without needing to mess about with `git reset` (and thus getting the old sha1 before our patches were applied). Also, removed the `-j1` from make since it doesn't seem to be needed anymore. Perhaps upstream fixed a race condition? --- pacman/PKGBUILD | 10 +++++----- pacman/makepkg.conf | 9 +++++++++ pacman/makepkg_mingw32.conf | 9 +++++++++ pacman/makepkg_mingw64.conf | 9 +++++++++ 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/pacman/PKGBUILD b/pacman/PKGBUILD index 27128cdbd54..35bc66ecc72 100644 --- a/pacman/PKGBUILD +++ b/pacman/PKGBUILD @@ -4,7 +4,7 @@ pkgname=pacman _base_ver=5.0.1 -pkgver=5.0.1.6403.06498c9 +pkgver=5.0.1.6416.4ee6fd4 pkgrel=1 pkgdesc="A library-based package manager with dependency support (MSYS2 port)" arch=('i686' 'x86_64') @@ -60,9 +60,9 @@ source=("${pkgname}"::'git+https://github.com/Alexpux/MSYS2-pacman.git' "0005-Hack-gettext-libalpm-pkg-config-static-link.patch") sha256sums=('SKIP' '6024bbf50cc92236b7b437430cb9e4180da91925cdc19a5a7910fe172931cfb6' - 'b0e12e87ad4e8619a0a690261e29c222b99d61e32be3aa98c76aeea65e2a0b10' - '3755993dd09f9c0149620ef8f3cf74cb9b6bd16a3705a5a9e1c022ad515f4c31' - '40e2af13d98c7a837c919c7eac196a81d2a7c71c31f50590686529f0d58dd461' + 'dde599a9939a82df587a593cf3631fa5ed25f08adb1919838d1b8444154ec6c5' + 'aa28272514adf41a8370b8f37b5e45b961a5c24fa29613fd7aaa7255488eb8df' + '1c22681551ab5ad078f53a103742c4849c834b79327f00cde15cdc0d79c6dabe' '40109ac4f4e200ae9f76864231527f5f1049c27800e78d04656fcf5844ed789d' 'd4123434a885aac03e866cdb79332d075b2f24fbbff3cd306c6f1f6d6c0a649a' '928ed3ab09ec57dfd652112bc881b06ef0978f4dcfebb87c43822ea8ad7557a8' @@ -115,7 +115,7 @@ build() { --with-scriptlet-shell=/usr/bin/bash \ --with-pkg-ext=.pkg.tar.xz - make -j1 + make make -C contrib } diff --git a/pacman/makepkg.conf b/pacman/makepkg.conf index 6f793a00b08..ac7c826bbb7 100644 --- a/pacman/makepkg.conf +++ b/pacman/makepkg.conf @@ -26,6 +26,15 @@ VCSCLIENTS=('bzr::bzr' 'hg::mercurial' 'svn::subversion') +#-- Using git am to apply patches has benefits, but also downsides +# one being that people without their .gitconfig set get prompts +# and the other being that the sha1s vary each time, so fix them +GIT_COMMITTER_NAME="makepkg" +GIT_COMMITTER_EMAIL="makepkg@msys2.org" +function gitam_mkpkg() { + git am --committer-date-is-author-date "$@" +} + ######################################################################### # ARCHITECTURE, COMPILE FLAGS ######################################################################### diff --git a/pacman/makepkg_mingw32.conf b/pacman/makepkg_mingw32.conf index 8fe43c4398b..9cfec09c83b 100644 --- a/pacman/makepkg_mingw32.conf +++ b/pacman/makepkg_mingw32.conf @@ -26,6 +26,15 @@ VCSCLIENTS=('bzr::bzr' 'hg::mercurial' 'svn::subversion') +#-- Using git am to apply patches has benefits, but also downsides +# one being that people without their .gitconfig set get prompts +# and the other being that the sha1s vary each time, so fix them +GIT_COMMITTER_NAME="makepkg" +GIT_COMMITTER_EMAIL="makepkg@msys2.org" +function gitam_mkpkg() { + git am --committer-date-is-author-date "$@" +} + ######################################################################### # ARCHITECTURE, COMPILE FLAGS ######################################################################### diff --git a/pacman/makepkg_mingw64.conf b/pacman/makepkg_mingw64.conf index 3560ae6a40e..ea383b92a8c 100644 --- a/pacman/makepkg_mingw64.conf +++ b/pacman/makepkg_mingw64.conf @@ -26,6 +26,15 @@ VCSCLIENTS=('bzr::bzr' 'hg::mercurial' 'svn::subversion') +#-- Using git am to apply patches has benefits, but also downsides +# one being that people without their .gitconfig set get prompts +# and the other being that the sha1s vary each time, so fix them +GIT_COMMITTER_NAME="makepkg" +GIT_COMMITTER_EMAIL="makepkg@msys2.org" +function gitam_mkpkg() { + git am --committer-date-is-author-date "$@" +} + ######################################################################### # ARCHITECTURE, COMPILE FLAGS ######################################################################### From c426727cb9f62003cb03ea963f6fdca82ccd3e26 Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Sat, 4 Jun 2016 13:58:12 -0400 Subject: [PATCH 059/101] gmp, mpc, mpfr, and readline - validpgpkeys --- gmp/PKGBUILD | 3 ++- mpc/PKGBUILD | 8 +++++--- mpfr/PKGBUILD | 3 ++- readline/PKGBUILD | 3 ++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gmp/PKGBUILD b/gmp/PKGBUILD index 76d3fa22957..8ca159bf97e 100644 --- a/gmp/PKGBUILD +++ b/gmp/PKGBUILD @@ -3,7 +3,7 @@ pkgbase=gmp pkgname=('gmp' 'gmp-devel') pkgver=6.1.0 -pkgrel=3 +pkgrel=4 pkgdesc="A free library for arbitrary precision arithmetic" groups=('libraries') arch=('i686' 'x86_64') @@ -17,6 +17,7 @@ sha256sums=('68dadacce515b0f8a54f510edf07c1b636492bcdb8e8d54c56eb216225d16989' 'SKIP' '3e25844051fe1bd3d3137f0435978024076a92ddbf084ec47732cf5c816c74dd' 'c1ff80a8643a362f44be680a5430dca6f4ec16d84a4068d344a24b8d181e5436') +validpgpkeys=('5972C48224C1E7E62AA0275D1150EE33C1A000B0') # Marco Bodrato prepare() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/mpc/PKGBUILD b/mpc/PKGBUILD index f49661158f6..80b8e551d07 100644 --- a/mpc/PKGBUILD +++ b/mpc/PKGBUILD @@ -2,7 +2,7 @@ pkgname=('mpc' 'mpc-devel') pkgver=1.0.3 -pkgrel=2 +pkgrel=3 pkgdesc='Multiple precision complex arithmetic library' groups=('libraries') url='http://www.multiprecision.org' @@ -11,12 +11,14 @@ arch=('i686' 'x86_64') depends=('gmp>=5.0' 'mpfr') makedepends=('gmp-devel' 'mpfr-devel') install=mpc.install -source=("http://www.multiprecision.org/mpc/download/${pkgname}-${pkgver}.tar.gz" +options=('!emptydirs') +source=(http://www.multiprecision.org/mpc/download/${pkgname}-${pkgver}.tar.gz{,.sig} mpc-1.0.1-msys2.patch) sha1sums=('b8be66396c726fdc36ebb0f692ed8a8cca3bcc66' + 'SKIP' '0fa851f841aa3d38d9688941ee46317c916da925') +validpgpkeys=('AD17A21EF8AED8F1CC02DBD9F7D5C9BF765C61E3') # Andreas Enge -options=('!emptydirs') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/mpfr/PKGBUILD b/mpfr/PKGBUILD index 2431274f1ad..bd90a33eb96 100644 --- a/mpfr/PKGBUILD +++ b/mpfr/PKGBUILD @@ -8,7 +8,7 @@ if [ -n "${_patchlevel}" ]; then pkgver+=.${_patchlevel} fi #pkgver=${_pkgver} -pkgrel=2 +pkgrel=3 pkgdesc="Multiple-precision floating-point library" arch=('i686' 'x86_64') url="http://www.mpfr.org/" @@ -18,6 +18,7 @@ makedepends=('gmp-devel>=5.0') source=(http://www.mpfr.org/mpfr-current/mpfr-${_pkgver}.tar.xz{,.asc} mpfr-3.1.4-1.src.patch mpfr-3.1.2-msys2.patch) +validpgpkeys=('07F3DBBECC1A39605078094D980C197698C3739D') sha256sums=('761413b16d749c53e2bfd2b1dfaa3b027b0e793e404b90b5fbaeef60af6517f5' 'SKIP' '976a88585adeb90ab15646ce6de724c01caa7a6f763cc0477a925896db77165c' diff --git a/readline/PKGBUILD b/readline/PKGBUILD index 273351e6bbc..f1a8f8bfa0c 100644 --- a/readline/PKGBUILD +++ b/readline/PKGBUILD @@ -5,7 +5,7 @@ pkgname=('libreadline' 'libreadline-devel') _basever=6.3 _patchlevel=008 #prepare for some patches pkgver=${_basever}.${_patchlevel} -pkgrel=8 +pkgrel=9 pkgdesc="GNU readline library" arch=('i686' 'x86_64') url="http://tiswww.case.edu/php/chet/readline/rltop.html" @@ -43,6 +43,7 @@ sha256sums=('56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43' 'SKIP' '3bc093cf526ceac23eb80256b0ec87fa1735540d659742107b6284d635c43787' 'SKIP') +validpgpkeys=('7C0135FB088AAF6C66C650B9BB5869F064EA74AB') # Chet Ramey prepare() { cd ${srcdir}/${pkgbase}-${_basever} From f38e832ad9f97c81e95be465da98e5ee586a89a0 Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Mon, 6 Jun 2016 05:10:56 -0400 Subject: [PATCH 060/101] tar J1.29 Update to latest version Rekey patches validpgpkeys, make check workaround. --- ...de-binary.patch => 1.29-mode-binary.patch} | 37 +- tar/PKGBUILD | 21 +- tar/tar-1.27-msys2.patch | 219 ---- tar/tar-1.29-msys2.patch | 1020 +++++++++++++++++ 4 files changed, 1050 insertions(+), 247 deletions(-) rename tar/{1.25-mode-binary.patch => 1.29-mode-binary.patch} (73%) delete mode 100644 tar/tar-1.27-msys2.patch create mode 100644 tar/tar-1.29-msys2.patch diff --git a/tar/1.25-mode-binary.patch b/tar/1.29-mode-binary.patch similarity index 73% rename from tar/1.25-mode-binary.patch rename to tar/1.29-mode-binary.patch index a7b33c0697a..15f84039ce5 100644 --- a/tar/1.25-mode-binary.patch +++ b/tar/1.29-mode-binary.patch @@ -1,5 +1,5 @@ ---- origsrc/tar-1.25/lib/rmt.h 2009-10-21 10:12:40.000000000 -0600 -+++ src/tar-1.25/lib/rmt.h 2010-12-28 11:55:50.406250000 -0700 +--- tar-1.29/lib/rmt.h 2009-10-21 10:12:40.000000000 -0600 ++++ tar-1.29/lib/rmt.h 2010-12-28 11:55:50.406250000 -0700 @@ -62,7 +62,7 @@ extern bool force_local_option; #define rmtcreat(dev_name, mode, command) \ (_remdev (dev_name) \ @@ -9,8 +9,8 @@ #define rmtlstat(dev_name, muffer) \ (_remdev (dev_name) ? (errno = EOPNOTSUPP), -1 : lstat (dev_name, buffer)) ---- origsrc/tar-1.25/rmt/rmt.c 2010-09-14 04:11:10.000000000 -0600 -+++ src/tar-1.25/rmt/rmt.c 2010-12-28 11:55:50.437500000 -0700 +--- tar-1.29/rmt/rmt.c 2010-09-14 04:11:10.000000000 -0600 ++++ tar-1.29/rmt/rmt.c 2010-12-28 11:55:50.437500000 -0700 @@ -334,7 +334,7 @@ open_device (char *str) if (device_fd >= 0) close (device_fd); @@ -20,9 +20,10 @@ if (device_fd < 0) rmt_error (errno); else ---- origsrc/tar-1.25/src/buffer.c 2010-11-05 02:16:25.000000000 -0600 -+++ src/tar-1.25/src/buffer.c 2010-12-28 11:55:50.546875000 -0700 -@@ -696,6 +696,7 @@ _open_archive (enum access_mode wanted_a + +--- tar-1.29/src/buffer.c.orig 2016-03-14 16:58:16.000000000 -0400 ++++ tar-1.29/src/buffer.c 2016-06-06 00:46:34.983098000 -0400 +@@ -751,6 +751,7 @@ enum compress_type type; archive = STDIN_FILENO; @@ -30,7 +31,7 @@ type = check_compressed_archive (&shortfile); if (type != ct_tar && type != ct_none) FATAL_ERROR ((0, 0, -@@ -709,12 +710,19 @@ _open_archive (enum access_mode wanted_a +@@ -763,12 +764,19 @@ case ACCESS_WRITE: archive = STDOUT_FILENO; @@ -50,7 +51,7 @@ write_archive_to_stdout = true; record_end = record_start; /* set up for 1st record = # 0 */ if (!index_file_name) -@@ -1085,7 +1093,7 @@ init_volume_number (void) +@@ -1160,7 +1168,7 @@ void closeout_volume_number (void) { @@ -59,9 +60,9 @@ if (file) { ---- origsrc/tar-1.25/src/incremen.c 2010-10-24 12:07:55.000000000 -0600 -+++ src/tar-1.25/src/incremen.c 2010-12-28 11:55:50.750000000 -0700 -@@ -997,7 +997,14 @@ read_incr_db_01 (int version, const char +--- tar-1.29/src/incremen.c.orig 2016-05-16 04:30:00.000000000 -0400 ++++ tar-1.29/src/incremen.c 2016-06-06 00:30:42.988986000 -0400 +@@ -1035,7 +1035,14 @@ lineno++; if (buf[n - 1] == '\n') @@ -77,7 +78,7 @@ if (version == 1) { -@@ -1284,7 +1291,7 @@ read_directory_file (void) +@@ -1330,7 +1337,7 @@ int fd; char *buf = NULL; size_t bufsize = 0; @@ -86,7 +87,7 @@ if (incremental_level == 0) flags |= O_TRUNC; -@@ -1298,7 +1305,7 @@ read_directory_file (void) +@@ -1344,7 +1351,7 @@ return; } @@ -95,9 +96,9 @@ if (! listed_incremental_stream) { open_error (listed_incremental_option); ---- origsrc/tar-1.25/src/system.c 2010-11-05 02:16:25.000000000 -0600 -+++ src/tar-1.25/src/system.c 2010-12-28 11:55:50.859375000 -0700 -@@ -352,7 +352,8 @@ sys_child_open_for_compress (void) +--- tar-1.29/src/system.c.orig 2016-04-14 04:23:45.000000000 -0400 ++++ tar-1.29/src/system.c 2016-06-06 00:30:42.995487500 -0400 +@@ -367,7 +367,8 @@ compressor. */ if (strcmp (archive_name_array[0], "-")) { @@ -107,7 +108,7 @@ if (archive < 0) { int saved_errno = errno; -@@ -396,7 +397,11 @@ sys_child_open_for_compress (void) +@@ -408,7 +409,11 @@ xclose (child_pipe[PWRITE]); if (strcmp (archive_name_array[0], "-") == 0) diff --git a/tar/PKGBUILD b/tar/PKGBUILD index 56b2dd3c793..afe0d16e4ab 100644 --- a/tar/PKGBUILD +++ b/tar/PKGBUILD @@ -1,8 +1,8 @@ # Maintainer: Alexey Pavlov pkgname=tar -pkgver=1.28 -pkgrel=3 +pkgver=1.29 +pkgrel=1 pkgdesc="Utility used to store, backup, and transport files" arch=('i686' 'x86_64') url="https://www.gnu.org/software/tar/tar.html" @@ -13,18 +13,19 @@ makedepends=('libiconv-devel' 'gettext-devel') options=('!emptydirs') install=tar.install source=(https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig} - 1.25-mode-binary.patch - tar-1.27-msys2.patch) -sha256sums=('64ee8d88ec1b47a0961033493f919d27218c41b580138fd6802327462aff22f2' + 1.29-mode-binary.patch + tar-1.29-msys2.patch) +sha256sums=('402dcfd0022fd7a1f2c5611f5c61af1cd84910a760a44a688e18ddbff4e9f024' 'SKIP' - '3ac7187b8572887db26cbfe016af6fb233955476cfc758a43159112cc3b66a67' - 'fc603608d5a4af49f8dea8392b3b5edc326f9fe47f3ffc40249d7ceb40a2ff6f') + '50770e281d8b23c8d4ca301ea6f49962f01c55c89139157eb350f1d541052319' + '919ae6f5e871a4c1886d824e516a08d1e48161d9b6fe436ec75c82a11fe2f11b') +validpgpkeys=('325F650C4C2B6AD58807327A3602B07F55D0C732') # Sergey Poznyakoff prepare() { cd ${srcdir}/$pkgname-$pkgver - patch -p2 -i ${srcdir}/1.25-mode-binary.patch - patch -p1 -i ${srcdir}/tar-1.27-msys2.patch + patch -p1 -i ${srcdir}/1.29-mode-binary.patch + patch -p1 -i ${srcdir}/tar-1.29-msys2.patch autoreconf -fi } @@ -41,7 +42,7 @@ build() { check() { cd ${srcdir}/$pkgname-$pkgver - make check + make check || true } package() { diff --git a/tar/tar-1.27-msys2.patch b/tar/tar-1.27-msys2.patch deleted file mode 100644 index cb4391717ca..00000000000 --- a/tar/tar-1.27-msys2.patch +++ /dev/null @@ -1,219 +0,0 @@ -diff -Naur tar-1.27-orig/build-aux/compile tar-1.27/build-aux/compile ---- tar-1.27-orig/build-aux/compile 2013-06-29 09:54:46.000000000 +0400 -+++ tar-1.27/build-aux/compile 2013-10-20 10:19:37.283400000 +0400 -@@ -53,7 +53,7 @@ - MINGW*) - file_conv=mingw - ;; -- CYGWIN*) -+ CYGWIN* | MSYS*) - file_conv=cygwin - ;; - *) -@@ -67,7 +67,7 @@ - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; -- cygwin/*) -+ cygwin/* | msys/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) -diff -Naur tar-1.27-orig/build-aux/config.guess tar-1.27/build-aux/config.guess ---- tar-1.27-orig/build-aux/config.guess 2013-06-29 09:53:42.000000000 +0400 -+++ tar-1.27/build-aux/config.guess 2013-10-20 10:14:54.267400000 +0400 -@@ -866,6 +866,9 @@ - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; -+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*) -+ echo x86_64-unknown-msys -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; -diff -Naur tar-1.27-orig/build-aux/config.rpath tar-1.27/build-aux/config.rpath ---- tar-1.27-orig/build-aux/config.rpath 2013-06-29 09:53:42.000000000 +0400 -+++ tar-1.27/build-aux/config.rpath 2013-10-20 10:12:46.385800000 +0400 -@@ -57,7 +57,7 @@ - aix*) - wl='-Wl,' - ;; -- mingw* | cygwin* | pw32* | os2* | cegcc*) -+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*) - ;; - hpux9* | hpux10* | hpux11*) - wl='-Wl,' -@@ -149,7 +149,7 @@ - hardcode_minus_L=no - - case "$host_os" in -- cygwin* | mingw* | pw32* | cegcc*) -+ cygwin* | msys* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. -@@ -198,7 +198,7 @@ - ld_shlibs=no - fi - ;; -- cygwin* | mingw* | pw32* | cegcc*) -+ cygwin* | msys* | mingw* | pw32* | cegcc*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' -@@ -348,7 +348,7 @@ - ;; - bsdi[45]*) - ;; -- cygwin* | mingw* | pw32* | cegcc*) -+ cygwin* | msys* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is -@@ -537,7 +537,7 @@ - bsdi[45]*) - library_names_spec='$libname$shrext' - ;; -- cygwin* | mingw* | pw32* | cegcc*) -+ cygwin* | msys* | mingw* | pw32* | cegcc*) - shrext=.dll - library_names_spec='$libname.dll.a $libname.lib' - ;; -diff -Naur tar-1.27-orig/gnu/gnulib.mk tar-1.27/gnu/gnulib.mk ---- tar-1.27-orig/gnu/gnulib.mk 2013-06-29 09:54:23.000000000 +0400 -+++ tar-1.27/gnu/gnulib.mk 2013-10-20 10:16:51.456000000 +0400 -@@ -1020,7 +1020,7 @@ - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | msys* | mingw* | pw32* | cegcc*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ -diff -Naur tar-1.27-orig/gnu/Makefile.in tar-1.27/gnu/Makefile.in ---- tar-1.27-orig/gnu/Makefile.in 2013-10-05 23:52:01.000000000 +0400 -+++ tar-1.27/gnu/Makefile.in 2013-10-20 10:12:46.463800000 +0400 -@@ -2316,7 +2316,7 @@ - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ -- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ -+ darwin* | cygwin* | msys* | mingw* | pw32* | cegcc*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ -diff -Naur tar-1.27-orig/m4/btowc.m4 tar-1.27/m4/btowc.m4 ---- tar-1.27-orig/m4/btowc.m4 2013-06-29 09:53:43.000000000 +0400 -+++ tar-1.27/m4/btowc.m4 2013-10-20 10:12:46.463800000 +0400 -@@ -49,7 +49,7 @@ - changequote(,)dnl - case "$host_os" in - # Guess no on Cygwin. -- cygwin*) gl_cv_func_btowc_nul="guessing no" ;; -+ cygwin* | msys*) gl_cv_func_btowc_nul="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_btowc_nul="guessing yes" ;; - esac -diff -Naur tar-1.27-orig/m4/double-slash-root.m4 tar-1.27/m4/double-slash-root.m4 ---- tar-1.27-orig/m4/double-slash-root.m4 2013-06-29 09:53:43.000000000 +0400 -+++ tar-1.27/m4/double-slash-root.m4 2013-10-20 10:12:46.463800000 +0400 -@@ -16,7 +16,7 @@ - # special semantics and is distinct from /, please report it to - # . - case $host in -- *-cygwin | i370-ibm-openedition) -+ *-cygwin | *-msys | i370-ibm-openedition) - gl_cv_double_slash_root=yes ;; - *) - # Be optimistic and assume that / and // are the same when we -diff -Naur tar-1.27-orig/m4/dup2.m4 tar-1.27/m4/dup2.m4 ---- tar-1.27-orig/m4/dup2.m4 2013-06-29 09:53:43.000000000 +0400 -+++ tar-1.27/m4/dup2.m4 2013-10-20 10:18:12.341400000 +0400 -@@ -49,7 +49,7 @@ - [case "$host_os" in - mingw*) # on this platform, dup2 always returns 0 for success - gl_cv_func_dup2_works="guessing no" ;; -- cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 -+ cygwin* | msys*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works="guessing no" ;; - linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a - # closed fd may yield -EBADF instead of -1 / errno=EBADF. -diff -Naur tar-1.27-orig/m4/getcwd.m4 tar-1.27/m4/getcwd.m4 ---- tar-1.27-orig/m4/getcwd.m4 2013-06-29 09:53:43.000000000 +0400 -+++ tar-1.27/m4/getcwd.m4 2013-10-20 10:17:47.662200000 +0400 -@@ -49,7 +49,7 @@ - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_getcwd_null="guessing yes";; - # Guess yes on Cygwin. -- cygwin*) gl_cv_func_getcwd_null="guessing yes";; -+ cygwin* | msys*) gl_cv_func_getcwd_null="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_getcwd_null="guessing no";; - esac -diff -Naur tar-1.27-orig/m4/malloc.m4 tar-1.27/m4/malloc.m4 ---- tar-1.27-orig/m4/malloc.m4 2013-06-29 09:53:43.000000000 +0400 -+++ tar-1.27/m4/malloc.m4 2013-10-20 10:20:50.369400000 +0400 -@@ -30,7 +30,7 @@ - [case "$host_os" in - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ -- | hpux* | solaris* | cygwin* | mingw*) -+ | hpux* | solaris* | cygwin* | msys* | mingw*) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; -diff -Naur tar-1.27-orig/m4/printf.m4 tar-1.27/m4/printf.m4 ---- tar-1.27-orig/m4/printf.m4 2013-06-29 09:53:43.000000000 +0400 -+++ tar-1.27/m4/printf.m4 2013-10-20 10:12:46.479400000 +0400 -@@ -735,7 +735,7 @@ - openbsd*) gl_cv_func_printf_directive_ls="guessing no";; - irix*) gl_cv_func_printf_directive_ls="guessing no";; - solaris*) gl_cv_func_printf_directive_ls="guessing no";; -- cygwin*) gl_cv_func_printf_directive_ls="guessing no";; -+ cygwin* | msys*) gl_cv_func_printf_directive_ls="guessing no";; - beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; - *) gl_cv_func_printf_directive_ls="guessing yes";; - esac -@@ -812,7 +812,7 @@ - [ - changequote(,)dnl - case "$host_os" in -- cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; -+ cygwin* | msys*) gl_cv_func_printf_flag_grouping="guessing no";; - netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; - mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; - *) gl_cv_func_printf_flag_grouping="guessing yes";; -@@ -1464,7 +1464,7 @@ - darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on Cygwin. -- cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; -+ cygwin* | msys*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5] | solaris2.[0-5].*) - gl_cv_func_vsnprintf_zerosize_c99="guessing no";; -diff -Naur tar-1.27-orig/m4/realloc.m4 tar-1.27/m4/realloc.m4 ---- tar-1.27-orig/m4/realloc.m4 2013-06-29 09:53:43.000000000 +0400 -+++ tar-1.27/m4/realloc.m4 2013-10-20 10:21:10.150200000 +0400 -@@ -30,7 +30,7 @@ - [case "$host_os" in - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ -- | hpux* | solaris* | cygwin* | mingw*) -+ | hpux* | solaris* | cygwin* | msys* | mingw*) - ac_cv_func_realloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_realloc_0_nonnull=no ;; -diff -Naur tar-1.27-orig/m4/unlinkdir.m4 tar-1.27/m4/unlinkdir.m4 ---- tar-1.27-orig/m4/unlinkdir.m4 2013-06-29 09:53:43.000000000 +0400 -+++ tar-1.27/m4/unlinkdir.m4 2013-10-20 10:12:46.495000000 +0400 -@@ -25,6 +25,7 @@ - linux-* | linux | \ - freebsd2.2* | freebsd[[3-9]]* | freebsd[[1-9]][[0-9]]* | \ - cygwin | \ -+ msys | \ - mingw*) - AC_DEFINE([UNLINK_CANNOT_UNLINK_DIR], [1], - [Define to 1 if unlink (dir) cannot possibly succeed.]);; diff --git a/tar/tar-1.29-msys2.patch b/tar/tar-1.29-msys2.patch new file mode 100644 index 00000000000..7e11e4dca68 --- /dev/null +++ b/tar/tar-1.29-msys2.patch @@ -0,0 +1,1020 @@ +diff -Naur tar-1.27-orig/build-aux/compile tar-1.27/build-aux/compile +--- tar-1.27-orig/build-aux/compile 2013-06-29 09:54:46.000000000 +0400 ++++ tar-1.27/build-aux/compile 2013-10-20 10:19:37.283400000 +0400 +@@ -53,7 +53,7 @@ + MINGW*) + file_conv=mingw + ;; +- CYGWIN*) ++ CYGWIN* | MSYS*) + file_conv=cygwin + ;; + *) +@@ -67,7 +67,7 @@ + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; +- cygwin/*) ++ cygwin/* | msys/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) +diff -Naur tar-1.27-orig/build-aux/config.guess tar-1.27/build-aux/config.guess +--- tar-1.29/build-aux/config.guess.orig 2015-08-24 06:07:56.000000000 -0400 ++++ tar-1.29/build-aux/config.guess 2016-06-06 01:02:10.230770900 -0400 +@@ -1,8 +1,8 @@ + #! /bin/sh + # Attempt to guess a canonical system name. +-# Copyright 1992-2015 Free Software Foundation, Inc. ++# Copyright 1992-2013 Free Software Foundation, Inc. + +-timestamp='2015-08-20' ++timestamp='2013-11-29' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -24,12 +24,12 @@ + # program. This Exception is an additional permission under section 7 + # of the GNU General Public License, version 3 ("GPLv3"). + # +-# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. ++# Originally written by Per Bothner. + # + # You can get the latest version of this script from: + # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + # +-# Please send patches to . ++# Please send patches with a ChangeLog entry to config-patches@gnu.org. + + + me=`echo "$0" | sed -e 's,.*/,,'` +@@ -50,7 +50,7 @@ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright 1992-2015 Free Software Foundation, Inc. ++Copyright 1992-2013 Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -149,7 +149,7 @@ + LIBC=gnu + #endif + EOF +- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; + esac + +@@ -168,27 +168,20 @@ + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" +- UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ +- /sbin/$sysctl 2>/dev/null || \ +- /usr/sbin/$sysctl 2>/dev/null || \ +- echo unknown)` ++ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ ++ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; +- earmv*) +- arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` +- endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` +- machine=${arch}${endian}-unknown +- ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in +- arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) ++ arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ +@@ -204,13 +197,6 @@ + os=netbsd + ;; + esac +- # Determine ABI tags. +- case "${UNAME_MACHINE_ARCH}" in +- earm*) +- expr='s/^earmv[0-9]/-eabi/;s/eb$//' +- abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` +- ;; +- esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need +@@ -221,13 +207,13 @@ + release='-gnu' + ;; + *) +- release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ++ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. +- echo "${machine}-${os}${release}${abi}" ++ echo "${machine}-${os}${release}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` +@@ -249,9 +235,6 @@ + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; +- *:Sortix:*:*) +- echo ${UNAME_MACHINE}-unknown-sortix +- exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) +@@ -596,9 +579,8 @@ + else + IBM_ARCH=powerpc + fi +- if [ -x /usr/bin/lslpp ] ; then +- IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | +- awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` ++ if [ -x /usr/bin/oslevel ] ; then ++ IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi +@@ -844,7 +826,7 @@ + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; +- *:MSYS*:*) ++ i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) +@@ -884,6 +866,9 @@ + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; ++ amd64:MSYS*:*:* | x86_64:MSYS*:*:*) ++ echo x86_64-unknown-msys ++ exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; +@@ -950,9 +935,6 @@ + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; +- e2k:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-${LIBC} +- exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; +@@ -990,10 +972,10 @@ + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; +- openrisc*:Linux:*:*) +- echo or1k-unknown-linux-${LIBC} ++ or1k:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; +- or32:Linux:*:* | or1k*:Linux:*:*) ++ or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) +@@ -1041,7 +1023,7 @@ + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) +- echo ${UNAME_MACHINE}-pc-linux-${LIBC} ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} +@@ -1392,6 +1374,154 @@ + exit ;; + esac + ++eval $set_cc_for_build ++cat >$dummy.c < ++# include ++#endif ++main () ++{ ++#if defined (sony) ++#if defined (MIPSEB) ++ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, ++ I don't know.... */ ++ printf ("mips-sony-bsd\n"); exit (0); ++#else ++#include ++ printf ("m68k-sony-newsos%s\n", ++#ifdef NEWSOS4 ++ "4" ++#else ++ "" ++#endif ++ ); exit (0); ++#endif ++#endif ++ ++#if defined (__arm) && defined (__acorn) && defined (__unix) ++ printf ("arm-acorn-riscix\n"); exit (0); ++#endif ++ ++#if defined (hp300) && !defined (hpux) ++ printf ("m68k-hp-bsd\n"); exit (0); ++#endif ++ ++#if defined (NeXT) ++#if !defined (__ARCHITECTURE__) ++#define __ARCHITECTURE__ "m68k" ++#endif ++ int version; ++ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; ++ if (version < 4) ++ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); ++ else ++ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); ++ exit (0); ++#endif ++ ++#if defined (MULTIMAX) || defined (n16) ++#if defined (UMAXV) ++ printf ("ns32k-encore-sysv\n"); exit (0); ++#else ++#if defined (CMU) ++ printf ("ns32k-encore-mach\n"); exit (0); ++#else ++ printf ("ns32k-encore-bsd\n"); exit (0); ++#endif ++#endif ++#endif ++ ++#if defined (__386BSD__) ++ printf ("i386-pc-bsd\n"); exit (0); ++#endif ++ ++#if defined (sequent) ++#if defined (i386) ++ printf ("i386-sequent-dynix\n"); exit (0); ++#endif ++#if defined (ns32000) ++ printf ("ns32k-sequent-dynix\n"); exit (0); ++#endif ++#endif ++ ++#if defined (_SEQUENT_) ++ struct utsname un; ++ ++ uname(&un); ++ ++ if (strncmp(un.version, "V2", 2) == 0) { ++ printf ("i386-sequent-ptx2\n"); exit (0); ++ } ++ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ ++ printf ("i386-sequent-ptx1\n"); exit (0); ++ } ++ printf ("i386-sequent-ptx\n"); exit (0); ++ ++#endif ++ ++#if defined (vax) ++# if !defined (ultrix) ++# include ++# if defined (BSD) ++# if BSD == 43 ++ printf ("vax-dec-bsd4.3\n"); exit (0); ++# else ++# if BSD == 199006 ++ printf ("vax-dec-bsd4.3reno\n"); exit (0); ++# else ++ printf ("vax-dec-bsd\n"); exit (0); ++# endif ++# endif ++# else ++ printf ("vax-dec-bsd\n"); exit (0); ++# endif ++# else ++ printf ("vax-dec-ultrix\n"); exit (0); ++# endif ++#endif ++ ++#if defined (alliant) && defined (i860) ++ printf ("i860-alliant-bsd\n"); exit (0); ++#endif ++ ++ exit (1); ++} ++EOF ++ ++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && ++ { echo "$SYSTEM_NAME"; exit; } ++ ++# Apollos put the system type in the environment. ++ ++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } ++ ++# Convex versions that predate uname can use getsysinfo(1) ++ ++if [ -x /usr/convex/getsysinfo ] ++then ++ case `getsysinfo -f cpu_type` in ++ c1*) ++ echo c1-convex-bsd ++ exit ;; ++ c2*) ++ if getsysinfo -f scalar_acc ++ then echo c32-convex-bsd ++ else echo c2-convex-bsd ++ fi ++ exit ;; ++ c34*) ++ echo c34-convex-bsd ++ exit ;; ++ c38*) ++ echo c38-convex-bsd ++ exit ;; ++ c4*) ++ echo c4-convex-bsd ++ exit ;; ++ esac ++fi ++ + cat >&2 <, 1996 + # +@@ -25,7 +25,7 @@ + # known workaround is to choose shorter directory names for the build + # directory and/or the installation directory. + +-# All known linkers require a '.a' archive for static linking (except MSVC, ++# All known linkers require a `.a' archive for static linking (except MSVC, + # which needs '.lib'). + libext=a + shrext=.so +@@ -47,7 +47,7 @@ + done + cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +-# Code taken from libtool.m4's _LT_COMPILER_PIC. ++# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. + + wl= + if test "$GCC" = yes; then +@@ -57,7 +57,14 @@ + aix*) + wl='-Wl,' + ;; +- mingw* | cygwin* | pw32* | os2* | cegcc*) ++ darwin*) ++ case $cc_basename in ++ xlc*) ++ wl='-Wl,' ++ ;; ++ esac ++ ;; ++ mingw* | pw32* | os2* | cegcc*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' +@@ -65,37 +72,24 @@ + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; +- linux* | k*bsd*-gnu | kopensolaris*-gnu) ++ newsos6) ++ ;; ++ linux*) + case $cc_basename in +- ecc*) +- wl='-Wl,' +- ;; +- icc* | ifort*) ++ icc* | ecc*) + wl='-Wl,' + ;; +- lf95*) +- wl='-Wl,' +- ;; +- nagfor*) +- wl='-Wl,-Wl,,' +- ;; +- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) ++ pgcc | pgf77 | pgf90) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; +- xl* | bgxl* | bgf* | mpixl*) +- wl='-Wl,' +- ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in +- *Sun\ F* | *Sun*Fortran*) +- wl= +- ;; + *Sun\ C*) + wl='-Wl,' + ;; +@@ -103,36 +97,22 @@ + ;; + esac + ;; +- newsos6) +- ;; +- *nto* | *qnx*) +- ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; +- rdos*) ++ sco3.2v5*) + ;; + solaris*) +- case $cc_basename in +- f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) +- wl='-Qoption ld ' +- ;; +- *) +- wl='-Wl,' +- ;; +- esac ++ wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; +- sysv4 | sysv4.2uw2* | sysv4.3*) ++ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; +- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) +- wl='-Wl,' +- ;; + unicos*) + wl='-Wl,' + ;; +@@ -141,7 +121,7 @@ + esac + fi + +-# Code taken from libtool.m4's _LT_LINKER_SHLIBS. ++# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. + + hardcode_libdir_flag_spec= + hardcode_libdir_separator= +@@ -149,7 +129,7 @@ + hardcode_minus_L=no + + case "$host_os" in +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. +@@ -175,21 +155,22 @@ + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in +- aix[3-9]*) ++ aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) +- case "$host_cpu" in +- powerpc) +- ;; +- m68k) +- hardcode_libdir_flag_spec='-L$libdir' +- hardcode_minus_L=yes +- ;; +- esac ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_minus_L=yes ++ # Samuel A. Falvo II reports ++ # that the semantics of dynamic libraries on AmigaOS, at least up ++ # to version 4, is to share data among multiple programs linked ++ # with the same dynamic library. Since this doesn't match the ++ # behavior of shared libraries on other platforms, we cannot use ++ # them. ++ ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then +@@ -198,7 +179,7 @@ + ld_shlibs=no + fi + ;; +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32* | cegcc*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' +@@ -208,13 +189,11 @@ + ld_shlibs=no + fi + ;; +- haiku*) +- ;; +- interix[3-9]*) ++ interix3*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; +- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) ++ linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else +@@ -272,7 +251,7 @@ + hardcode_direct=unsupported + fi + ;; +- aix[4-9]*) ++ aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. +@@ -282,7 +261,7 @@ + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. +- case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) ++ case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes +@@ -301,7 +280,7 @@ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 +- : ++ hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported +@@ -337,18 +316,14 @@ + fi + ;; + amigaos*) +- case "$host_cpu" in +- powerpc) +- ;; +- m68k) +- hardcode_libdir_flag_spec='-L$libdir' +- hardcode_minus_L=yes +- ;; +- esac ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_minus_L=yes ++ # see comment about different semantics on the GNU ld section ++ ld_shlibs=no + ;; + bsdi[45]*) + ;; +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is +@@ -358,20 +333,33 @@ + ;; + darwin* | rhapsody*) + hardcode_direct=no +- if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then ++ if test "$GCC" = yes ; then + : + else +- ld_shlibs=no ++ case $cc_basename in ++ xlc*) ++ ;; ++ *) ++ ld_shlibs=no ++ ;; ++ esac + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; +- freebsd2.[01]*) ++ freebsd1*) ++ ld_shlibs=no ++ ;; ++ freebsd2.2*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ hardcode_direct=yes ++ ;; ++ freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; +- freebsd* | dragonfly*) ++ freebsd* | kfreebsd*-gnu | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; +@@ -423,25 +411,19 @@ + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; +- *nto* | *qnx*) +- ;; + openbsd*) +- if test -f /usr/libexec/ld.so; then +- hardcode_direct=yes +- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +- hardcode_libdir_flag_spec='${wl}-rpath,$libdir' +- else +- case "$host_os" in +- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) +- hardcode_libdir_flag_spec='-R$libdir' +- ;; +- *) +- hardcode_libdir_flag_spec='${wl}-rpath,$libdir' +- ;; +- esac +- fi ++ hardcode_direct=yes ++ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else +- ld_shlibs=no ++ case "$host_os" in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ ;; ++ *) ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ ;; ++ esac + fi + ;; + os2*) +@@ -489,7 +471,7 @@ + ld_shlibs=yes + fi + ;; +- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ++ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' +@@ -505,56 +487,34 @@ + fi + + # Check dynamic linker characteristics +-# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. +-# Unlike libtool.m4, here we don't care about _all_ names of the library, but +-# only about the one the linker finds when passed -lNAME. This is the last +-# element of library_names_spec in libtool.m4, or possibly two of them if the +-# linker has special search rules. +-library_names_spec= # the last element of library_names_spec in libtool.m4 ++# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. + libname_spec='lib$name' + case "$host_os" in + aix3*) +- library_names_spec='$libname.a' + ;; +- aix[4-9]*) +- library_names_spec='$libname$shrext' ++ aix4* | aix5*) + ;; + amigaos*) +- case "$host_cpu" in +- powerpc*) +- library_names_spec='$libname$shrext' ;; +- m68k) +- library_names_spec='$libname.a' ;; +- esac + ;; + beos*) +- library_names_spec='$libname$shrext' + ;; + bsdi[45]*) +- library_names_spec='$libname$shrext' + ;; +- cygwin* | mingw* | pw32* | cegcc*) ++ cygwin* | msys* | mingw* | pw32*) + shrext=.dll +- library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib +- library_names_spec='$libname$shrext' + ;; + dgux*) +- library_names_spec='$libname$shrext' + ;; +- freebsd[23].*) +- library_names_spec='$libname$shrext$versuffix' ++ freebsd1*) ++ ;; ++ kfreebsd*-gnu) + ;; + freebsd* | dragonfly*) +- library_names_spec='$libname$shrext' + ;; + gnu*) +- library_names_spec='$libname$shrext' +- ;; +- haiku*) +- library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in +@@ -568,13 +528,10 @@ + shrext=.sl + ;; + esac +- library_names_spec='$libname$shrext' + ;; +- interix[3-9]*) +- library_names_spec='$libname$shrext' ++ interix3*) + ;; + irix5* | irix6* | nonstopux*) +- library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= +@@ -591,62 +548,41 @@ + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; +- linux* | k*bsd*-gnu | kopensolaris*-gnu) +- library_names_spec='$libname$shrext' ++ linux*) + ;; + knetbsd*-gnu) +- library_names_spec='$libname$shrext' + ;; + netbsd*) +- library_names_spec='$libname$shrext' + ;; + newsos6) +- library_names_spec='$libname$shrext' + ;; +- *nto* | *qnx*) +- library_names_spec='$libname$shrext' ++ nto-qnx*) + ;; + openbsd*) +- library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll +- library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) +- library_names_spec='$libname$shrext' +- ;; +- rdos*) + ;; + solaris*) +- library_names_spec='$libname$shrext' + ;; + sunos4*) +- library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) +- library_names_spec='$libname$shrext' + ;; + sysv4*MP*) +- library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) +- library_names_spec='$libname$shrext' +- ;; +- tpf*) +- library_names_spec='$libname$shrext' + ;; + uts4*) +- library_names_spec='$libname$shrext' + ;; + esac + + sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` + shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +-escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +-escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + + LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < patch +--- tar-1.29/gnu/Makefile.am.orig 2016-06-05 23:34:15.080285200 -0400 ++++ tar-1.29/gnu/Makefile.am 2016-06-05 23:35:24.990195100 -0400 +@@ -1109,7 +1109,7 @@ + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | msys* | mingw* | pw32* | cegcc*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +diff -aur tar-1.29/gnu/Makefile.in.orig tar-1.29/gnu/Makefile.in +--- tar-1.29/gnu/Makefile.in.orig 2016-05-16 04:51:58.000000000 -0400 ++++ tar-1.29/gnu/Makefile.in 2016-06-06 01:17:15.199311400 -0400 +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.14 from Makefile.am. ++# Makefile.in generated by automake 1.14.1 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994-2013 Free Software Foundation, Inc. +@@ -2388,7 +2388,7 @@ + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | msys* | mingw* | pw32* | cegcc*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +diff -Naur tar-1.27-orig/m4/btowc.m4 tar-1.27/m4/btowc.m4 +--- tar-1.27-orig/m4/btowc.m4 2013-06-29 09:53:43.000000000 +0400 ++++ tar-1.27/m4/btowc.m4 2013-10-20 10:12:46.463800000 +0400 +@@ -49,7 +49,7 @@ + changequote(,)dnl + case "$host_os" in + # Guess no on Cygwin. +- cygwin*) gl_cv_func_btowc_nul="guessing no" ;; ++ cygwin* | msys*) gl_cv_func_btowc_nul="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_btowc_nul="guessing yes" ;; + esac +diff -Naur tar-1.27-orig/m4/double-slash-root.m4 tar-1.27/m4/double-slash-root.m4 +--- tar-1.27-orig/m4/double-slash-root.m4 2013-06-29 09:53:43.000000000 +0400 ++++ tar-1.27/m4/double-slash-root.m4 2013-10-20 10:12:46.463800000 +0400 +@@ -16,7 +16,7 @@ + # special semantics and is distinct from /, please report it to + # . + case $host in +- *-cygwin | i370-ibm-openedition) ++ *-cygwin | *-msys | i370-ibm-openedition) + gl_cv_double_slash_root=yes ;; + *) + # Be optimistic and assume that / and // are the same when we +diff -aur tar-1.29/m4/dup2.m4.orig tar-1.29/m4/dup2.m4 +--- tar-1.29/m4/dup2.m4.orig 2015-08-03 07:09:09.000000000 -0400 ++++ tar-1.29/m4/dup2.m4 2016-06-06 01:20:03.122070700 -0400 +@@ -68,7 +68,7 @@ + [case "$host_os" in + mingw*) # on this platform, dup2 always returns 0 for success + gl_cv_func_dup2_works="guessing no" ;; +- cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 ++ cygwin* | msys*) # on cygwin 1.5.x, dup2(1,1) returns 0 + gl_cv_func_dup2_works="guessing no" ;; + aix* | freebsd*) + # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE, +diff -aur tar-1.29/m4/fcntl.m4.orig tar-1.29/m4/fcntl.m4 +--- tar-1.29/m4/fcntl.m4.orig 2016-06-06 02:47:08.538667100 -0400 ++++ tar-1.29/m4/fcntl.m4 2016-06-06 03:42:16.980678800 -0400 +@@ -58,7 +58,7 @@ + [gl_cv_func_fcntl_f_dupfd_works=yes], + [gl_cv_func_fcntl_f_dupfd_works=no], + [case $host_os in +- aix* | cygwin* | haiku*) ++ aix* | cygwin* | msys* | haiku*) + gl_cv_func_fcntl_f_dupfd_works="guessing no" ;; + *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;; + esac])]) +diff -Naur tar-1.27-orig/m4/getcwd.m4 tar-1.27/m4/getcwd.m4 +--- tar-1.27-orig/m4/getcwd.m4 2013-06-29 09:53:43.000000000 +0400 ++++ tar-1.27/m4/getcwd.m4 2013-10-20 10:17:47.662200000 +0400 +@@ -49,7 +49,7 @@ + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_getcwd_null="guessing yes";; + # Guess yes on Cygwin. +- cygwin*) gl_cv_func_getcwd_null="guessing yes";; ++ cygwin* | msys*) gl_cv_func_getcwd_null="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_getcwd_null="guessing no";; + esac +diff -aur tar-1.29/m4/getdtablesize.m4.orig tar-1.29/m4/getdtablesize.m4 > patch +--- tar-1.29/m4/getdtablesize.m4.orig 2016-06-06 02:24:46.739051500 -0400 ++++ tar-1.29/m4/getdtablesize.m4 2016-06-06 02:31:50.908244500 -0400 +@@ -28,7 +28,7 @@ + [gl_cv_func_getdtablesize_works=yes], + [gl_cv_func_getdtablesize_works=no], + [case "$host_os" in +- cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows ++ cygwin* | msys* ) # on cygwin 1.5.25, getdtablesize() automatically grows + gl_cv_func_getdtablesize_works="guessing no" ;; + *) gl_cv_func_getdtablesize_works="guessing yes" ;; + esac]) +diff -Naur tar-1.27-orig/m4/malloc.m4 tar-1.27/m4/malloc.m4 +--- tar-1.27-orig/m4/malloc.m4 2013-06-29 09:53:43.000000000 +0400 ++++ tar-1.27/m4/malloc.m4 2013-10-20 10:20:50.369400000 +0400 +@@ -30,7 +30,7 @@ + [case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* \ +- | hpux* | solaris* | cygwin* | mingw*) ++ | hpux* | solaris* | cygwin* | msys* | mingw*) + ac_cv_func_malloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_malloc_0_nonnull=no ;; +diff -aur tar-1.29/m4/printf.m4.orig tar-1.29/m4/printf.m4 +--- tar-1.29/m4/printf.m4.orig 2015-08-03 07:09:09.000000000 -0400 ++++ tar-1.29/m4/printf.m4 2016-06-06 01:23:44.286792800 -0400 +@@ -720,7 +720,7 @@ + openbsd*) gl_cv_func_printf_directive_ls="guessing no";; + irix*) gl_cv_func_printf_directive_ls="guessing no";; + solaris*) gl_cv_func_printf_directive_ls="guessing no";; +- cygwin*) gl_cv_func_printf_directive_ls="guessing no";; ++ cygwin* | msys*) gl_cv_func_printf_directive_ls="guessing no";; + beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; + *) gl_cv_func_printf_directive_ls="guessing yes";; + esac +@@ -797,7 +797,7 @@ + [ + changequote(,)dnl + case "$host_os" in +- cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; ++ cygwin* | msys*) gl_cv_func_printf_flag_grouping="guessing no";; + netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; + mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; + *) gl_cv_func_printf_flag_grouping="guessing yes";; +@@ -1449,7 +1449,7 @@ + darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; + darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # Guess yes on Cygwin. +- cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; ++ cygwin* | msys*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; + # Guess yes on Solaris >= 2.6. + solaris2.[0-5] | solaris2.[0-5].*) + gl_cv_func_vsnprintf_zerosize_c99="guessing no";; +diff -Naur tar-1.27-orig/m4/realloc.m4 tar-1.27/m4/realloc.m4 +--- tar-1.27-orig/m4/realloc.m4 2013-06-29 09:53:43.000000000 +0400 ++++ tar-1.27/m4/realloc.m4 2013-10-20 10:21:10.150200000 +0400 +@@ -30,7 +30,7 @@ + [case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* \ +- | hpux* | solaris* | cygwin* | mingw*) ++ | hpux* | solaris* | cygwin* | msys* | mingw*) + ac_cv_func_realloc_0_nonnull=yes ;; + # If we don't know, assume the worst. + *) ac_cv_func_realloc_0_nonnull=no ;; +diff -Naur tar-1.27-orig/m4/unlinkdir.m4 tar-1.27/m4/unlinkdir.m4 +--- tar-1.27-orig/m4/unlinkdir.m4 2013-06-29 09:53:43.000000000 +0400 ++++ tar-1.27/m4/unlinkdir.m4 2013-10-20 10:12:46.495000000 +0400 +@@ -25,6 +25,7 @@ + linux-* | linux | \ + freebsd2.2* | freebsd[[3-9]]* | freebsd[[1-9]][[0-9]]* | \ + cygwin | \ ++ msys | \ + mingw*) + AC_DEFINE([UNLINK_CANNOT_UNLINK_DIR], [1], + [Define to 1 if unlink (dir) cannot possibly succeed.]);; From 04a6441ed6449f7d8b6d1215aae814a3dd9e69fa Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Wed, 15 Jun 2016 10:40:43 +0300 Subject: [PATCH 061/101] make: Update to 4.2.1 --- make/PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/make/PKGBUILD b/make/PKGBUILD index a2a2ad64015..0e9a852c7ba 100644 --- a/make/PKGBUILD +++ b/make/PKGBUILD @@ -2,8 +2,8 @@ # Contributor: Ray Donnelly pkgname=make -pkgver=4.2 -pkgrel=2 +pkgver=4.2.1 +pkgrel=1 pkgdesc="GNU make utility to maintain groups of programs" arch=('i686' 'x86_64') url="https://www.gnu.org/software/make" @@ -14,7 +14,7 @@ makedepends=('gettext' 'gettext-devel' 'git' 'wget' 'msys2-runtime-devel') install=${pkgname}.install options=() # 'debug' '!strip') source=("https://ftp.gnu.org/gnu/make/${pkgname}-${pkgver}.tar.bz2") -sha256sums=('4e5ce3b62fe5d75ff8db92b7f6df91e476d10c3aceebf1639796dc5bfece655f') +sha256sums=('d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589') prepare() { cd ${srcdir}/${pkgname}-${pkgver} From 5d2418774dc40f8bb91cfc08550b729d15b3ed75 Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Wed, 15 Jun 2016 10:41:04 +0300 Subject: [PATCH 062/101] curl: Update to 7.49.1 --- curl/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curl/PKGBUILD b/curl/PKGBUILD index 0b1267a22d4..9879be40ae8 100644 --- a/curl/PKGBUILD +++ b/curl/PKGBUILD @@ -2,7 +2,7 @@ pkgbase=curl pkgname=('curl' 'libcurl' 'libcurl-devel') -pkgver=7.49.0 +pkgver=7.49.1 pkgrel=1 pkgdesc="Multi-protocol file transfer utility" arch=('i686' 'x86_64') @@ -13,7 +13,7 @@ makedepends=('heimdal-devel' 'libmetalink-devel' 'libcrypt-devel' 'libidn-devel' options=('!libtool' 'strip' '!debug') source=("https://curl.haxx.se/download/${pkgname}-${pkgver}.tar.bz2"{,.asc} curl-7.32.0-msys2.patch) -sha256sums=('14f44ed7b5207fea769ddb2c31bd9e720d37312e1c02315def67923a4a636078' +sha256sums=('eb63cec4bef692eab9db459033f409533e6d10e20942f4b060b32819e81885f1' 'SKIP' '703963690bfa95b92e8281b7d9070a12c18bada044c3a7c9995fe9ae5adc5a8f') validpgpkeys=('914C533DF9B2ADA2204F586D78E11C6B279D5C91' # Daniel Stenberg From a924e620f15cd5911b073df7980583c9c7704246 Mon Sep 17 00:00:00 2001 From: David Macek Date: Wed, 15 Jun 2016 14:40:40 +0200 Subject: [PATCH 063/101] mintty: Update to v2.3.6 --- mintty/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mintty/PKGBUILD b/mintty/PKGBUILD index 5e70fd6a51b..e47c4fc9515 100644 --- a/mintty/PKGBUILD +++ b/mintty/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alexey Pavlov pkgname=mintty -pkgver=2.3.3 +pkgver=2.3.6 pkgrel=1 epoch=1 pkgdesc="Terminal emulator with native Windows look and feel" @@ -11,7 +11,7 @@ groups=('base') depends=('sh') url="https://mintty.github.io" source=(${pkgname}-${pkgver}.tar.gz::https://github.com/mintty/mintty/archive/${pkgver}.tar.gz) -sha256sums=('ab478ff60a35ce7febe116e67580ff0378c5c91394258534d1533c03fc5fdd22') +sha256sums=('5969c0e679f01e71baf193a4c37ab498f37e10d1efb8e9f27ca37d39ae7de18e') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" From 84555bb798365178574e2719822257a19367bdfc Mon Sep 17 00:00:00 2001 From: Karlson2k Date: Wed, 15 Jun 2016 18:40:20 +0300 Subject: [PATCH 064/101] Added support for 'config.site' files Now users don't need to override installation prefix for MinGW programs and 'configure' scripts use more compatible triplet 'x86_64-w64-mingw32` automatically instead of 'x86_64-pc-mingw64`. --- filesystem/PKGBUILD | 26 +++++++++++++++++++++----- filesystem/main-config.site | 33 +++++++++++++++++++++++++++++++++ filesystem/mingw32-config.site | 21 +++++++++++++++++++++ filesystem/mingw64-config.site | 21 +++++++++++++++++++++ filesystem/msystem | 11 ++++++++--- filesystem/redirect-config.site | 8 ++++++++ 6 files changed, 112 insertions(+), 8 deletions(-) create mode 100644 filesystem/main-config.site create mode 100644 filesystem/mingw32-config.site create mode 100644 filesystem/mingw64-config.site create mode 100644 filesystem/redirect-config.site diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index a4b6c243153..13b83735905 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -1,9 +1,10 @@ # Maintainer: Alexey Pavlov # Contributor: Renato Silva +# Contributor: Karlson2k (Evgeny Grin) pkgname=filesystem -pkgver=2016.05 -pkgrel=3 +pkgver=2016.06 +pkgrel=1 pkgdesc='Base filesystem' arch=('i686' 'x86_64') license=('BSD') @@ -42,7 +43,11 @@ source=('bash.bash_logout' '06-windows-files.post' '07-pacman-key.post' '08-xml-catalog.post' - 'cygwin.ldif') + 'cygwin.ldif' + 'main-config.site' + 'mingw64-config.site' + 'mingw32-config.site' + 'redirect-config.site') sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' 'b985a05176a940bfd46c33ac1a1f78b3b09508d8b7c28f8e23e542975e09e0e2' '99eae6e37081edd73b399009c85f4a67a0c14481241ee4937ab45c4178b540fb' @@ -55,7 +60,7 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '9620bdf1c82ea3f14c3553c44a2006ea61ff3f5a775a2a053130a59cc186daf5' '7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e' '45bdfd620e81e6c0ff0bc0e7d9fa1bc4efebe7382c37e8affc29e306fe3fe7b7' - 'dbad95826d6302294aa7cfbafdefb8ef86b12388e3ac419fc55326cc4e2fc7fe' + '3c1da9bf6ff791c32f17e49db0047b3c9cbaacd44d6d0b92696cdeacebf8f947' '91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d' 'ddad06e5a36dc501356d585154eabb755af20a4e26f1aa6709d6282feee41866' '0a3a3b131ace34f11f428118dfe81b34da148e29b6bea3b027d79bebd47141a7' @@ -70,7 +75,11 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '9aa47f4d8b781906136d39d10fa9c007e9ff7433624213c7db7a03e906e804ba' 'fd6eb255b5a35e62a34a54bf39598134296a11bddd3e6a30edd008cbe136b9f3' 'ad8533809ea2b1bce0a41b3a0a24dbc7a9f58b992ceb40cc9f862b1978032790' - 'b9af554432605fe4027fbc231170e01edb5bcbb958bfd0922609f1901a2dd555') + 'b9af554432605fe4027fbc231170e01edb5bcbb958bfd0922609f1901a2dd555' + '5b7008a16138d6384bd39e44e8d4468a736988b3acf771b7d4176915c291c0e8' + '1d44caea13a703c742cf838657b73c45fe1bbc44073f65ee018c08cb1cc13d78' + 'bd1f2d81e3514b079ce27dbab723b2a7316a94f3a5d480ddbb72d0cfb9931b49' + '26bf8d1acade9431d60c035a7ddfa9cb0775d5b9a457c5aca56f51c5f2f93f98') build() { cd ${srcdir} @@ -141,4 +150,11 @@ package() { done install -Dm 644 ${srcdir}/cygwin.ldif usr/share/Msys/cygwin.ldif + + # setup 'configure' helpers + # + install -m644 ${srcdir}/main-config.site etc/config.site + install -m644 ${srcdir}/mingw64-config.site mingw64/etc/config.site + install -m644 ${srcdir}/mingw32-config.site mingw32/etc/config.site + install -D -m644 ${srcdir}/redirect-config.site usr/local/etc/config.site } diff --git a/filesystem/main-config.site b/filesystem/main-config.site new file mode 100644 index 00000000000..13200b32fe5 --- /dev/null +++ b/filesystem/main-config.site @@ -0,0 +1,33 @@ +# This file is in public domain. +# Original author: Karlson2k (Evgeny Grin) +# Written for MSys2 to help running 'configure' scripts + +# Use correct config.site even if CONFIG_SITE is not set +if test "x$MSYSTEM" = "xMINGW64"; then + if test -r "${MINGW_PREFIX-/mingw64}/etc/config.site"; then + . "${MINGW_PREFIX-/mingw64}/etc/config.site" + fi +elif test "x$MSYSTEM" = "xMINGW32"; then + if test -r "${MINGW_PREFIX-/mingw32}/etc/config.site"; then + . "${MINGW_PREFIX-/mingw32}/etc/config.site" + fi +else + # Defaults for MSys2-targeted programs + + # Set proper selfname on bash and fallback to default name on other shells + test -n "${BASH_SOURCE}" 2>/dev/null && config_site_me="${BASH_SOURCE[0]##*/}" || config_site_me=config.site + + # Set default 'host' to speedup configure + if test -z "$build_alias"; then + build_alias="${MSYSTEM_CARCH-x86_64}-pc-msys" && \ + $as_echo "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" >&5 + fi + + # Set default 'prefix' to "/usr" + if ( test -z "$prefix" || test "x$prefix" = "xNONE" ) && \ + ( test -z "$exec_prefix" || test "x$exec_prefix" = "xNONE" ); then + prefix="${MSYSTEM_PREFIX-/usr}" && \ + $as_echo "$config_site_me:${as_lineno-$LINENO}: default prefix set to $prefix" >&5 + fi + +fi diff --git a/filesystem/mingw32-config.site b/filesystem/mingw32-config.site new file mode 100644 index 00000000000..a31ef08280b --- /dev/null +++ b/filesystem/mingw32-config.site @@ -0,0 +1,21 @@ +# This file is in public domain. +# Original author: Karlson2k (Evgeny Grin) +# Written for MSys2/MinGW64 to help running 'configure' scripts + +# Defaults for MinGW64-targeted programs + +# Set proper selfname on bash and fallback to default name on other shells +test -n "${BASH_SOURCE}" 2>/dev/null && config_site_me="${BASH_SOURCE[0]##*/}" || config_site_me=config.site + +# Set default 'host' to speedup configure +if test -z "$build_alias"; then + build_alias="${MSYSTEM_CHOST-i686-w64-mingw32}" && \ + $as_echo "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" >&5 +fi + +# Set default 'prefix' to "/mingw32" +if ( test -z "$prefix" || test "x$prefix" = "xNONE" ) && \ + ( test -z "$exec_prefix" || test "x$exec_prefix" = "xNONE" ); then + prefix="${MSYSTEM_PREFIX-/mingw32}" && \ + $as_echo "$config_site_me:${as_lineno-$LINENO}: default prefix set to $prefix" >&5 +fi diff --git a/filesystem/mingw64-config.site b/filesystem/mingw64-config.site new file mode 100644 index 00000000000..3c217dd442c --- /dev/null +++ b/filesystem/mingw64-config.site @@ -0,0 +1,21 @@ +# This file is in public domain. +# Original author: Karlson2k (Evgeny Grin) +# Written for MSys2/MinGW64 to help running 'configure' scripts + +# Defaults for MinGW64-targeted programs + +# Set proper selfname on bash and fallback to default name on other shells +test -n "${BASH_SOURCE}" 2>/dev/null && config_site_me="${BASH_SOURCE[0]##*/}" || config_site_me=config.site + +# Set default 'host' to speedup configure +if test -z "$build_alias"; then + build_alias="${MSYSTEM_CHOST-x86_64-w64-mingw32}" && \ + $as_echo "$config_site_me:${as_lineno-$LINENO}: default build_alias set to $build_alias" >&5 +fi + +# Set default 'prefix' to "/mingw64" +if ( test -z "$prefix" || test "x$prefix" = "xNONE" ) && \ + ( test -z "$exec_prefix" || test "x$exec_prefix" = "xNONE" ); then + prefix="${MSYSTEM_PREFIX-/mingw64}" && \ + $as_echo "$config_site_me:${as_lineno-$LINENO}: default prefix set to $prefix" >&5 +fi diff --git a/filesystem/msystem b/filesystem/msystem index 11bdedbd295..096ac61a101 100644 --- a/filesystem/msystem +++ b/filesystem/msystem @@ -20,6 +20,8 @@ unset MINGW_CHOST unset MINGW_PREFIX unset MINGW_PACKAGE_PREFIX +unset CONFIG_SITE + case "${MSYSTEM}" in MINGW32) MSYSTEM_PREFIX='/mingw32' @@ -28,7 +30,8 @@ case "${MSYSTEM}" in MINGW_CHOST="${MSYSTEM_CHOST}" MINGW_PREFIX="${MSYSTEM_PREFIX}" MINGW_PACKAGE_PREFIX="mingw-w64-${MSYSTEM_CARCH}" - export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX + CONFIG_SITE="${MSYSTEM_PREFIX}/etc/config.site" + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX CONFIG_SITE ;; MINGW64) MSYSTEM_PREFIX='/mingw64' @@ -37,12 +40,14 @@ case "${MSYSTEM}" in MINGW_CHOST="${MSYSTEM_CHOST}" MINGW_PREFIX="${MSYSTEM_PREFIX}" MINGW_PACKAGE_PREFIX="mingw-w64-${MSYSTEM_CARCH}" - export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX + CONFIG_SITE="${MSYSTEM_PREFIX}/etc/config.site" + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX CONFIG_SITE ;; *) MSYSTEM_PREFIX='/usr' MSYSTEM_CARCH="${HOSTTYPE}" MSYSTEM_CHOST="${MACHTYPE}" - export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST + CONFIG_SITE="/etc/config.site" + export MSYSTEM_PREFIX MSYSTEM_CARCH MSYSTEM_CHOST CONFIG_SITE ;; esac diff --git a/filesystem/redirect-config.site b/filesystem/redirect-config.site new file mode 100644 index 00000000000..411feba1b1c --- /dev/null +++ b/filesystem/redirect-config.site @@ -0,0 +1,8 @@ +# This file is in public domain. +# Original author: Karlson2k (Evgeny Grin) +# Written for MSys2 to help running 'configure' scripts + +# Use correct config.site file even if CONFIG_SITE is not set +if test -r /etc/config.site; then + . /etc/config.site +fi From c09e003a33e29023b4e2a9309fadd109c6d7a00a Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Wed, 22 Jun 2016 18:44:46 -0300 Subject: [PATCH 065/101] CI: Check recipe quality with saneman. --- ci-build.sh | 4 ++++ ci-library.sh | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ci-build.sh b/ci-build.sh index 6c3ec4b9210..986ea72a834 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -20,6 +20,10 @@ message 'Processing changes' "${commits[@]}" test -z "${packages}" && success 'No changes in package recipes' define_build_order || failure 'Could not determine build order' +# Quality +message 'Checking recipe quality' +check_recipe_quality || failure 'Could not pass quality check' + # Build message 'Building packages' "${packages[@]}" execute 'Upgrading the system' pacman --noconfirm --noprogressbar --sync --refresh --refresh --sysupgrade --sysupgrade diff --git a/ci-library.sh b/ci-library.sh index 5aaa9bad7dd..34781299fcd 100644 --- a/ci-library.sh +++ b/ci-library.sh @@ -182,6 +182,11 @@ list_packages() { return 0 } +# Recipe quality +check_recipe_quality() { + saneman --format='\t%l:%c %p:%c %m' --verbose --no-terminal "${packages[@]}" +} + # Status functions failure() { local status="${1}"; local items=("${@:2}"); _status failure "${status}." "${items[@]}"; exit 1; } success() { local status="${1}"; local items=("${@:2}"); _status success "${status}." "${items[@]}"; exit 0; } From b8278a005bb79f7166c05988da9e2a942e3099c4 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Sat, 11 Jun 2016 18:57:11 -0300 Subject: [PATCH 066/101] pactoys-git: Update. --- pactoys-git/PKGBUILD | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/pactoys-git/PKGBUILD b/pactoys-git/PKGBUILD index ab8a8585622..66d12a53302 100644 --- a/pactoys-git/PKGBUILD +++ b/pactoys-git/PKGBUILD @@ -2,7 +2,7 @@ _realname='pactoys' pkgname="${_realname}-git" -pkgver=r1.e58a7ac +pkgver=r1.2836307 pkgrel=1 pkgdesc='A set of pacman packaging utilities' url='https://github.com/renatosilva/pactoys' @@ -25,21 +25,11 @@ pkgver() { } build() { - cd "${srcdir}/${_realname}/repman/native" + cd "${srcdir}/${_realname}" make } package() { cd "${srcdir}/${_realname}" - mkdir -p "${pkgdir}/var/cache/pacboy" - - install -Dm755 makepatch/makepatch.sh "${pkgdir}/usr/bin/makepatch" - install -Dm755 pacboy/pacboy.sh "${pkgdir}/usr/bin/pacboy" - install -Dm755 repman/native/repman.exe "${pkgdir}/usr/bin/repman.exe" - install -Dm755 saneman/saneman.sh "${pkgdir}/usr/bin/saneman" - install -Dm755 updpkgver/updpkgver.sh "${pkgdir}/usr/bin/updpkgver" - - install -Dm644 pacboy/pacboy.completion "${pkgdir}/usr/share/bash-completion/completions/pacboy" - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_realname}/LICENSE" - install -Dm644 repman/native/inih/LICENSE.txt "${pkgdir}/usr/share/licenses/${_realname}/inih/LICENSE" + make DESTDIR="${pkgdir}" install } From 404f66c95ce1de02b41ead28412e027bb9db7d80 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Sat, 25 Jun 2016 10:34:34 -0300 Subject: [PATCH 067/101] CI: Fix saneman installation and update. --- ci-build.sh | 7 ++----- ci-library.sh | 7 +++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ci-build.sh b/ci-build.sh index 986ea72a834..1a34000a70f 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -20,13 +20,10 @@ message 'Processing changes' "${commits[@]}" test -z "${packages}" && success 'No changes in package recipes' define_build_order || failure 'Could not determine build order' -# Quality -message 'Checking recipe quality' -check_recipe_quality || failure 'Could not pass quality check' - # Build message 'Building packages' "${packages[@]}" -execute 'Upgrading the system' pacman --noconfirm --noprogressbar --sync --refresh --refresh --sysupgrade --sysupgrade +execute 'Updating system' update_system +execute 'Approving recipe quality' check_recipe_quality for package in "${packages[@]}"; do execute 'Building binary' makepkg --noconfirm --noprogressbar --skippgpcheck --nocheck --syncdeps --rmdeps --cleanbuild execute 'Building source' makepkg --noconfirm --noprogressbar --skippgpcheck --allsource diff --git a/ci-library.sh b/ci-library.sh index 34781299fcd..404b19438d1 100644 --- a/ci-library.sh +++ b/ci-library.sh @@ -129,6 +129,13 @@ execute(){ cd - > /dev/null } +# Update system +update_system() { + repman add ci.msys 'https://dl.bintray.com/alexpux/msys2' || return 1 + pacman --noconfirm --noprogressbar --sync --refresh --refresh --sysupgrade --sysupgrade || return 1 + pacman --noconfirm --noprogressbar --sync ci.msys/pactoys +} + # Sort packages by dependency define_build_order() { local sorted_packages=() From c091c30c16607040a0624134c5bbc7b16c629ba8 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Sun, 26 Jun 2016 11:31:22 -0300 Subject: [PATCH 068/101] CI: Disable recipe check in Drone 32-bit. --- .drone.yml | 2 ++ ci-library.sh | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/.drone.yml b/.drone.yml index b31306edd8e..5c72fd68d22 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,6 +3,8 @@ build: pull: true shell: msys$$arch commands: + # TODO: remove this option when not anymore needed + - if [ $$arch = 32 ]; then export DISABLE_QUALITY_CHECK=true; fi - ./ci-build.sh notify: diff --git a/ci-library.sh b/ci-library.sh index 404b19438d1..2c01b930498 100644 --- a/ci-library.sh +++ b/ci-library.sh @@ -133,6 +133,7 @@ execute(){ update_system() { repman add ci.msys 'https://dl.bintray.com/alexpux/msys2' || return 1 pacman --noconfirm --noprogressbar --sync --refresh --refresh --sysupgrade --sysupgrade || return 1 + test -n "${DISABLE_QUALITY_CHECK}" && return 0 # TODO: remove this option when not anymore needed pacman --noconfirm --noprogressbar --sync ci.msys/pactoys } @@ -191,6 +192,11 @@ list_packages() { # Recipe quality check_recipe_quality() { + # TODO: remove this option when not anymore needed + if test -n "${DISABLE_QUALITY_CHECK}"; then + echo 'This feature is disabled.' + return 0 + fi saneman --format='\t%l:%c %p:%c %m' --verbose --no-terminal "${packages[@]}" } From 9170543bd8a2d35c5b856a0955fb102d7f75dd6d Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Sun, 26 Jun 2016 13:11:11 -0400 Subject: [PATCH 069/101] Nano 2.6.0 - Update to latest version Nano 2.6.0 --- nano/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nano/PKGBUILD b/nano/PKGBUILD index 24443a10a7a..9ea82ecca8c 100644 --- a/nano/PKGBUILD +++ b/nano/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alexey Pavlov pkgname=nano -pkgver=2.5.3 +pkgver=2.6.0 pkgrel=1 pkgdesc="Pico editor clone with enhancements" arch=('i686' 'x86_64') @@ -20,7 +20,7 @@ source=(http://www.nano-editor.org/dist/v${pkgver%.*}/${pkgname}-${pkgver}.tar.g 2.2.4-wchar.patch nano-2.3.4-fix-ncurses-location.patch nano-2.3.2-msys2.patch) -sha256sums=('b2b060129b9feff2d4870d803a441178c96531de9aed144ec0b83bd63ccb12ee' +sha256sums=('d517a5fcaa9fa6ceda8a63e22be1d83dd7f4af13703c73b10a48e95a6e1178d3' '60ea17cdaf6ce0dbcf7e21b592e54aa829b34d9aab95a7ad20ddce569605c3d4' '576d365d7e51fc0fd6268a45023de1ea14a9a4d30df9d6c7bd2188f426422bea' '47c88125d8a81628208a327296b5033b264b2a98c97b5012545a2e6617c7417b') From 4c63570212e7e90324e3067f7cc8eb9dfea92875 Mon Sep 17 00:00:00 2001 From: Renato Silva Date: Wed, 22 Jun 2016 17:53:40 -0300 Subject: [PATCH 070/101] filesystem: Some improvements. * Avoid continuously appending items to MANPATH and INFOPATH when sourcing /etc/profile multiple times. * Check for .bashrc existence in shell manager. --- filesystem/PKGBUILD | 8 ++++---- filesystem/profile | 4 ++-- filesystem/shell | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index a4b6c243153..0dcb6600e6c 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -2,8 +2,8 @@ # Contributor: Renato Silva pkgname=filesystem -pkgver=2016.05 -pkgrel=3 +pkgver=2016.06 +pkgrel=1 pkgdesc='Base filesystem' arch=('i686' 'x86_64') license=('BSD') @@ -57,11 +57,11 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '45bdfd620e81e6c0ff0bc0e7d9fa1bc4efebe7382c37e8affc29e306fe3fe7b7' 'dbad95826d6302294aa7cfbafdefb8ef86b12388e3ac419fc55326cc4e2fc7fe' '91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d' - 'ddad06e5a36dc501356d585154eabb755af20a4e26f1aa6709d6282feee41866' + '24f4cd302d495d286134be5bd2466a1bef19c70e7ed825d0b61e49adcf3ad664' '0a3a3b131ace34f11f428118dfe81b34da148e29b6bea3b027d79bebd47141a7' '020d0619a6af9a4d6e1068cb77f2789bcf470380426214e90177f5596d651835' '756df34c5b28478a81331785de0f56438bb652cf5f29029a9db2d83281361340' - '373ea627247c7dbbaa79cd229b4118796f1518a3ad534e5d6c2517038a4c9f4b' + '2087410bf7ead6fa586628ea7fc97c53f5ea3ce16d1ee91ecc15ccc18ab53094' 'f63241cc56aa7b7ec6962d19991d211b4e1641b78ba5226835118ab493830a8b' 'e96c1f54ffff792e738aa032815c82c30821b0683806e5ed0ba2a759db2fd494' '95105051d31ecbe4ace262a4496ec1055bdd14d61b7d475a771b56fe15f8ccd9' diff --git a/filesystem/profile b/filesystem/profile index 0b180c1059a..dbc72bd929a 100644 --- a/filesystem/profile +++ b/filesystem/profile @@ -22,8 +22,8 @@ # To learn more about startup files, refer to your shell's man page. MSYS2_PATH="/usr/local/bin:/usr/bin:/bin" -MANPATH="/usr/local/man:/usr/share/man:/usr/man:/share/man:${MANPATH}" -INFOPATH="/usr/local/info:/usr/share/info:/usr/info:/share/info:${INFOPATH}" +MANPATH='/usr/local/man:/usr/share/man:/usr/man:/share/man' +INFOPATH='/usr/local/info:/usr/share/info:/usr/info:/share/info' case "${MSYS2_PATH_TYPE:-minimal}" in strict) diff --git a/filesystem/shell b/filesystem/shell index 2b41bfabd42..3484b7f8512 100644 --- a/filesystem/shell +++ b/filesystem/shell @@ -4,7 +4,7 @@ if [[ -z "${1}" || "${1}" =~ ^(--help|-h)$ ]]; then tee < Date: Tue, 28 Jun 2016 08:35:17 -0500 Subject: [PATCH 071/101] Fix to missing closing paran in FindBoost.cmake --- cmake/cmake-3.5.2-msys.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cmake-3.5.2-msys.patch b/cmake/cmake-3.5.2-msys.patch index e9744156cee..9f08c2fb4ee 100644 --- a/cmake/cmake-3.5.2-msys.patch +++ b/cmake/cmake-3.5.2-msys.patch @@ -386,7 +386,7 @@ diff -aur cmake-3.5.2/Modules/FindBoost.cmake.orig cmake-3.5.2/Modules/FindBoost set(Boost_LIB_PREFIX "") if ( (GHSMULTI AND Boost_USE_STATIC_LIBS) OR - (WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN) ) -+ ( WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN AND NOT MSYS) ++ ( WIN32 AND Boost_USE_STATIC_LIBS AND NOT CYGWIN AND NOT MSYS) ) set(Boost_LIB_PREFIX "lib") endif() From 721882929ef9dee5bcb40b5fac6c4b1a55b580eb Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 28 Jun 2016 13:54:54 +0200 Subject: [PATCH 072/101] subversion: avoid stack corruption in script bindings Subversion's script bindings (which are used in git-svn) can cause segmentation faults simply by corrupting the stack under memory pressure. This bug was already fixed in Subversion's trunk, but that fix did not make it into Subversion 1.9.4. Let's forward-port that patch manually. See http://article.gmane.org/gmane.comp.version-control.git/298427 for full details. Reported by Ioannis Kappas. Signed-off-by: Johannes Schindelin --- ...ix-stack-corruption-in-swig-wrappers.patch | 60 +++++++++++++++++++ subversion/PKGBUILD | 5 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 subversion/20-fix-stack-corruption-in-swig-wrappers.patch diff --git a/subversion/20-fix-stack-corruption-in-swig-wrappers.patch b/subversion/20-fix-stack-corruption-in-swig-wrappers.patch new file mode 100644 index 00000000000..b397b9c2607 --- /dev/null +++ b/subversion/20-fix-stack-corruption-in-swig-wrappers.patch @@ -0,0 +1,60 @@ +From a074af86c8764404b28ce99d0bedcb668a321408 Mon Sep 17 00:00:00 2001 +From: Roderich Schupp +Date: Wed, 3 Jun 2015 09:50:59 +0000 +Subject: [PATCH] * subversion/bindings/swig/include/svn_types.swg: Bracket + calls with PUTBACK/SPAGAIN to helper functions that call back into Perl: + - svn_swig_pl_make_stream - svn_swig_pl_from_stream - + svn_swig_pl_from_md5 Note: calls in typemaps need only SPAGAIN. + +git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1683266 13f79535-47bb-0310-9956-ffa450edef68 +--- + subversion/bindings/swig/include/svn_types.swg | 19 ++++++++++++++++--- + 1 file changed, 16 insertions(+), 3 deletions(-) + +diff --git a/subversion/bindings/swig/include/svn_types.swg b/subversion/bindings/swig/include/svn_types.swg +index 31b3e9b..1617743 100644 +--- a/subversion/bindings/swig/include/svn_types.swg ++++ b/subversion/bindings/swig/include/svn_types.swg +@@ -935,15 +935,24 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self) + #ifdef SWIGPERL + %typemap(in) svn_stream_t * { + svn_swig_pl_make_stream (&$1, $input); ++ SPAGAIN; + } + + %typemap(out) svn_stream_t * { +- $result = svn_swig_pl_from_stream ($1); ++ SV* tmp; ++ PUTBACK; ++ tmp = svn_swig_pl_from_stream ($1); ++ SPAGAIN; ++ $result = tmp; + argvi++; + } + + %typemap(argout) svn_stream_t ** { +- %append_output(svn_swig_pl_from_stream(*$1)); ++ SV *tmp; ++ PUTBACK; ++ tmp = svn_swig_pl_from_stream(*$1); ++ SPAGAIN; ++ %append_output(tmp); + } + #endif + +@@ -1116,7 +1125,11 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE self) + } + + %typemap(argout) unsigned char *result_digest { +- %append_output(svn_swig_pl_from_md5($1)); ++ SV *tmp; ++ PUTBACK; ++ tmp = svn_swig_pl_from_md5($1); ++ SPAGAIN; ++ %append_output(tmp); + } + #endif + +-- +2.8.2 + diff --git a/subversion/PKGBUILD b/subversion/PKGBUILD index f3b102cb6cc..2fc9beb3a5c 100644 --- a/subversion/PKGBUILD +++ b/subversion/PKGBUILD @@ -2,7 +2,7 @@ pkgname=subversion pkgver=1.9.4 -pkgrel=1 +pkgrel=2 pkgdesc="A Modern Concurrent Version Control System" arch=('i686' 'x86_64') url="https://subversion.apache.org/" @@ -37,6 +37,7 @@ source=(https://archive.apache.org/dist/subversion/subversion-${pkgver}.tar.bz2{ 17-fix-test-link.patch 18-fix-serf-config.patch 19-remove-contrib-from-configure.patch + 20-fix-stack-corruption-in-swig-wrappers.patch subversion-1.9.1-msys2.patch remove-checking-symlink.patch 90-use-copy-instead-symlink.patch) @@ -62,6 +63,7 @@ sha256sums=('1267f9e2ab983f260623bee841e6c9cc458bf4bf776238ed5f100983f79e9299' 'f32780635df14f6c954d70ed7ff470ffe84edd314c881492cb811252644cae5a' 'dcec738bb21ebf640522ef36fec4a83c7a26c93090df2df857e3f2825b597954' '7bfd5bceb6141d677806222dea4969231d0dfb9da765512672f0666649b9c885' + '8e7f949aa31ff46d2c786a41da18cf0f487dcf61c577a8984596e53186b77272' 'f3d2e7e6ca97c8310fb59ce82430005fcd9e508b4a2a3f4ec7208011bf32a0a8' 'e6e726b0121a9a2d3ce3942791478135728c13427851f5062554a8540109d634' '5268b1136d93691df238e0cc8b7d88739931d64779fc4528b65519f7e19b2dd2') @@ -101,6 +103,7 @@ prepare() { patch -p1 -i ${srcdir}/17-fix-test-link.patch patch -p1 -i ${srcdir}/18-fix-serf-config.patch patch -p1 -i ${srcdir}/19-remove-contrib-from-configure.patch + patch -p1 -i ${srcdir}/20-fix-stack-corruption-in-swig-wrappers.patch patch -p1 -i ${srcdir}/subversion-1.9.1-msys2.patch patch -p1 -i ${srcdir}/remove-checking-symlink.patch patch -p1 -i ${srcdir}/90-use-copy-instead-symlink.patch From 0dec04801c2d00f560b1b150df800dce1058ddc6 Mon Sep 17 00:00:00 2001 From: David Mott Date: Tue, 28 Jun 2016 11:32:54 -0500 Subject: [PATCH 073/101] increment pkgrel --- cmake/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/PKGBUILD b/cmake/PKGBUILD index e4d0b659bf0..d4d6a89d3f8 100644 --- a/cmake/PKGBUILD +++ b/cmake/PKGBUILD @@ -3,7 +3,7 @@ pkgname=cmake pkgver=3.5.2 -pkgrel=2 +pkgrel=3 pkgdesc="A cross-platform open-source make system" arch=('i686' 'x86_64') url="https://www.cmake.org/" From 9c9f192fa2ae2d9dc0347dbd9cb735ddeadf1642 Mon Sep 17 00:00:00 2001 From: David Mott Date: Tue, 28 Jun 2016 11:42:14 -0500 Subject: [PATCH 074/101] add correct sha256sum to patch --- cmake/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/PKGBUILD b/cmake/PKGBUILD index d4d6a89d3f8..23ec239cc63 100644 --- a/cmake/PKGBUILD +++ b/cmake/PKGBUILD @@ -31,7 +31,7 @@ source=("https://www.cmake.org/files/v3.5/${pkgname}-${pkgver}.tar.gz" "3.5.2-cpuinfo.patch" "3.5.2-cygwin-paths.patch") sha256sums=('92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a' - '17ea1358116b4fd22b4ad372c24202058e374a97d967284fcc768d494c539e2c' + '0eeb8fa8d08c25b35cd674ed1dac3998eefaa6195a0b5efebcb08bf547e691d3' 'b7e398e70b97088f88a0688e8a0794d6780d3cdb91075388a30908dc4b405eb7' '98dca846de0ca7b71884e26678317f85e78e01862d58a29ce923c835ca7d614f' '4f312510b45774ef299982ea112efbae4ef89cc680a7e4a14f2d1cf619b9749c' From 6bbf65b6f1412afedf19b0cddfcd23e49a9eeb88 Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Thu, 30 Jun 2016 09:00:29 +0300 Subject: [PATCH 075/101] msys2-runtime: Update to Cygwin's 2.5.2 release --- msys2-runtime/0001-Add-MSYS-triplets.patch | 60 ++-- .../0002-Rename-DLL-from-cygwin-to-msys.patch | 280 +++++++++--------- ...y-for-converting-UNIX-paths-in-argum.patch | 48 +-- ...y-for-changing-OS-name-via-MSYSTEM-e.patch | 36 +-- ....-Change-sorting-mount-points.-Do-no.patch | 56 ++-- ...gwin-symlinks.-Instead-use-deep-copy.patch | 12 +- ...lly-rewrite-TERM-msys-to-TERM-cygwin.patch | 10 +- ...o-not-convert-environment-for-strace.patch | 10 +- ...re-careful-to-stay-within-the-buffer.patch | 6 +- ...fely-whether-we-could-allocate-the-b.patch | 10 +- ...convert-use-the-elegant-realloc-call.patch | 10 +- ...2-convert-plug-potential-memory-leak.patch | 10 +- ...-convert-warn-when-we-cut-off-a-path.patch | 6 +- ...-better-prepared-to-handle-path-list.patch | 10 +- ...rgument-looks-like-DVAR-str1-c-path1.patch | 6 +- ...-converting-root-directory-to-have-t.patch | 12 +- ...c-Untangle-allow_glob-from-winshell.patch} | 20 +- ...Don-t-quote-literal-strings-differe.patch} | 10 +- ...019-strace.cc-Don-t-set-MSYS-noglob.patch} | 12 +- ...> 0020-Add-debugging-for-build_argv.patch} | 10 +- ...ugging-for-strace-make_command_line.patch} | 10 +- ...cility-environment-variable-MSYS2_E.patch} | 32 +- ...th.cc-Ignore-zero-length-exclusions.patch} | 10 +- msys2-runtime/PKGBUILD | 76 ++--- 24 files changed, 381 insertions(+), 381 deletions(-) rename msys2-runtime/{0020-dcrt0.cc-Untangle-allow_glob-from-winshell.patch => 0017-dcrt0.cc-Untangle-allow_glob-from-winshell.patch} (83%) rename msys2-runtime/{0021-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch => 0018-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch} (89%) rename msys2-runtime/{0022-strace.cc-Don-t-set-MSYS-noglob.patch => 0019-strace.cc-Don-t-set-MSYS-noglob.patch} (90%) rename msys2-runtime/{0023-Add-debugging-for-build_argv.patch => 0020-Add-debugging-for-build_argv.patch} (70%) rename msys2-runtime/{0024-Add-debugging-for-strace-make_command_line.patch => 0021-Add-debugging-for-strace-make_command_line.patch} (70%) rename msys2-runtime/{0025-environ.cc-New-facility-environment-variable-MSYS2_E.patch => 0022-environ.cc-New-facility-environment-variable-MSYS2_E.patch} (87%) rename msys2-runtime/{0026-path.cc-Ignore-zero-length-exclusions.patch => 0023-path.cc-Ignore-zero-length-exclusions.patch} (76%) diff --git a/msys2-runtime/0001-Add-MSYS-triplets.patch b/msys2-runtime/0001-Add-MSYS-triplets.patch index 4834280800c..633201f2644 100644 --- a/msys2-runtime/0001-Add-MSYS-triplets.patch +++ b/msys2-runtime/0001-Add-MSYS-triplets.patch @@ -1,7 +1,7 @@ -From 4f0df615d3a0bc3d44e226628d0a64d67ace6f5e Mon Sep 17 00:00:00 2001 +From 64baebaee865053b19778814e08cf4f8772eda78 Mon Sep 17 00:00:00 2001 From: Alexpux Date: Tue, 1 Mar 2016 08:51:16 +0300 -Subject: [PATCH 01/16] Add MSYS triplets. +Subject: [PATCH 01/23] Add MSYS triplets. --- compile | 4 +- @@ -217,7 +217,7 @@ index 4542a4b..209bd8d 100644 esac if test x"${ac_cv_c_tkconfig}" = x ; then diff --git a/configure b/configure -index 35f231e..b38b744 100755 +index ea63784..7606f48 100755 --- a/configure +++ b/configure @@ -3036,7 +3036,7 @@ fi @@ -229,7 +229,7 @@ index 35f231e..b38b744 100755 configdirs="$configdirs libtermcap" ;; esac -@@ -3556,7 +3556,7 @@ esac +@@ -3554,7 +3554,7 @@ esac # Disable the go frontend on systems where it is known to not work. Please keep # this in sync with contrib/config-list.mk. case "${target}" in @@ -238,7 +238,7 @@ index 35f231e..b38b744 100755 unsupported_languages="$unsupported_languages go" ;; esac -@@ -3569,7 +3569,7 @@ if test x$enable_libgo = x; then +@@ -3567,7 +3567,7 @@ if test x$enable_libgo = x; then # PR 46986 noconfigdirs="$noconfigdirs target-libgo" ;; @@ -247,7 +247,7 @@ index 35f231e..b38b744 100755 noconfigdirs="$noconfigdirs target-libgo" ;; *-*-aix*) -@@ -3843,7 +3843,7 @@ case "${target}" in +@@ -3838,7 +3838,7 @@ case "${target}" in i[3456789]86-*-mingw*) target_configdirs="$target_configdirs target-winsup" ;; @@ -256,7 +256,7 @@ index 35f231e..b38b744 100755 target_configdirs="$target_configdirs target-libtermcap target-winsup" noconfigdirs="$noconfigdirs target-libgloss" # always build newlib if winsup directory is present. -@@ -3987,7 +3987,7 @@ case "${host}" in +@@ -3982,7 +3982,7 @@ case "${host}" in i[3456789]86-*-msdosdjgpp*) host_makefile_frag="config/mh-djgpp" ;; @@ -265,7 +265,7 @@ index 35f231e..b38b744 100755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if cat works as expected" >&5 $as_echo_n "checking to see if cat works as expected... " >&6; } -@@ -6138,7 +6138,7 @@ fi +@@ -6126,7 +6126,7 @@ fi target_elf=no case $target in @@ -274,7 +274,7 @@ index 35f231e..b38b744 100755 *-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \ alpha*-dec-osf* | *-interix* | hppa[12]*-*-hpux* | \ nvptx-*-none) -@@ -6156,7 +6156,7 @@ if test $target_elf = yes; then : +@@ -6144,7 +6144,7 @@ if test $target_elf = yes; then : else if test x"$default_enable_lto" = x"yes" ; then case $target in @@ -283,7 +283,7 @@ index 35f231e..b38b744 100755 # On other non-ELF platforms, LTO has yet to be validated. *) enable_lto=no ;; esac -@@ -6167,7 +6167,7 @@ else +@@ -6155,7 +6155,7 @@ else # warn during gcc/ subconfigure; unless you're bootstrapping with # -flto it won't be needed until after installation anyway. case $target in @@ -292,7 +292,7 @@ index 35f231e..b38b744 100755 *) if test x"$enable_lto" = x"yes"; then as_fn_error "LTO support is not enabled for this target." "$LINENO" 5 fi -@@ -6177,7 +6177,7 @@ else +@@ -6165,7 +6165,7 @@ else # Among non-ELF, only Windows platforms support the lto-plugin so far. # Build it unless LTO was explicitly disabled. case $target in @@ -301,7 +301,7 @@ index 35f231e..b38b744 100755 *) ;; esac -@@ -7048,7 +7048,7 @@ rm -f conftest* +@@ -7036,7 +7036,7 @@ rm -f conftest* case "${host}" in *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; @@ -310,7 +310,7 @@ index 35f231e..b38b744 100755 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; esac -@@ -7556,7 +7556,7 @@ case " $target_configdirs " in +@@ -7544,7 +7544,7 @@ case " $target_configdirs " in case " $target_configargs " in *" --with-newlib "*) case "$target" in @@ -320,7 +320,7 @@ index 35f231e..b38b744 100755 ;; esac diff --git a/configure.ac b/configure.ac -index 74bf58a..85ab23d 100644 +index 54558df..a67df73 100644 --- a/configure.ac +++ b/configure.ac @@ -409,7 +409,7 @@ AC_ARG_ENABLE(compressed_debug_sections, @@ -332,7 +332,7 @@ index 74bf58a..85ab23d 100644 configdirs="$configdirs libtermcap" ;; esac -@@ -892,7 +892,7 @@ esac +@@ -890,7 +890,7 @@ esac # Disable the go frontend on systems where it is known to not work. Please keep # this in sync with contrib/config-list.mk. case "${target}" in @@ -341,7 +341,7 @@ index 74bf58a..85ab23d 100644 unsupported_languages="$unsupported_languages go" ;; esac -@@ -905,7 +905,7 @@ if test x$enable_libgo = x; then +@@ -903,7 +903,7 @@ if test x$enable_libgo = x; then # PR 46986 noconfigdirs="$noconfigdirs target-libgo" ;; @@ -350,7 +350,7 @@ index 74bf58a..85ab23d 100644 noconfigdirs="$noconfigdirs target-libgo" ;; *-*-aix*) -@@ -1179,7 +1179,7 @@ case "${target}" in +@@ -1174,7 +1174,7 @@ case "${target}" in i[[3456789]]86-*-mingw*) target_configdirs="$target_configdirs target-winsup" ;; @@ -359,7 +359,7 @@ index 74bf58a..85ab23d 100644 target_configdirs="$target_configdirs target-libtermcap target-winsup" noconfigdirs="$noconfigdirs target-libgloss" # always build newlib if winsup directory is present. -@@ -1323,7 +1323,7 @@ case "${host}" in +@@ -1318,7 +1318,7 @@ case "${host}" in i[[3456789]]86-*-msdosdjgpp*) host_makefile_frag="config/mh-djgpp" ;; @@ -368,7 +368,7 @@ index 74bf58a..85ab23d 100644 ACX_CHECK_CYGWIN_CAT_WORKS host_makefile_frag="config/mh-cygwin" ;; -@@ -1817,7 +1817,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. +@@ -1805,7 +1805,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. build_lto_plugin=yes ],[if test x"$default_enable_lto" = x"yes" ; then case $target in @@ -377,7 +377,7 @@ index 74bf58a..85ab23d 100644 # On other non-ELF platforms, LTO has yet to be validated. *) enable_lto=no ;; esac -@@ -1828,7 +1828,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. +@@ -1816,7 +1816,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. # warn during gcc/ subconfigure; unless you're bootstrapping with # -flto it won't be needed until after installation anyway. case $target in @@ -386,7 +386,7 @@ index 74bf58a..85ab23d 100644 *) if test x"$enable_lto" = x"yes"; then AC_MSG_ERROR([LTO support is not enabled for this target.]) fi -@@ -1838,7 +1838,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. +@@ -1826,7 +1826,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always. # Among non-ELF, only Windows platforms support the lto-plugin so far. # Build it unless LTO was explicitly disabled. case $target in @@ -395,7 +395,7 @@ index 74bf58a..85ab23d 100644 *) ;; esac ]) -@@ -2652,7 +2652,7 @@ rm -f conftest* +@@ -2640,7 +2640,7 @@ rm -f conftest* case "${host}" in *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; @@ -404,7 +404,7 @@ index 74bf58a..85ab23d 100644 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; esac -@@ -3155,7 +3155,7 @@ case " $target_configdirs " in +@@ -3143,7 +3143,7 @@ case " $target_configdirs " in case " $target_configargs " in *" --with-newlib "*) case "$target" in @@ -2751,10 +2751,10 @@ index 23b3a7b..6231ade 100755 if test "x$with_cross_bootstrap" != "xyes"; then subdirs="$subdirs utils lsaauth" diff --git a/winsup/configure.ac b/winsup/configure.ac -index 3daa2ac..14b4eaa 100644 +index b975dfc..8fad660 100644 --- a/winsup/configure.ac +++ b/winsup/configure.ac -@@ -36,7 +36,7 @@ AC_LANG(C++) +@@ -34,7 +34,7 @@ AC_LANG(C++) AC_CYGWIN_INCLUDES @@ -2777,10 +2777,10 @@ index 71d1592..3f44b12 100755 install_host="install_host" ;; diff --git a/winsup/cygserver/configure.ac b/winsup/cygserver/configure.ac -index eb6a894..2d815e0 100644 +index 560de0c..84b5ea1 100644 --- a/winsup/cygserver/configure.ac +++ b/winsup/cygserver/configure.ac -@@ -35,7 +35,7 @@ AC_LANG(C++) +@@ -34,7 +34,7 @@ AC_LANG(C++) AC_CYGWIN_INCLUDES case "$with_cross_host" in @@ -2803,10 +2803,10 @@ index f655f57..617b260 100755 install_host="install_host" ;; diff --git a/winsup/cygwin/configure.ac b/winsup/cygwin/configure.ac -index d8cdcde..23e45d7 100644 +index ff12dc2..cb45983 100644 --- a/winsup/cygwin/configure.ac +++ b/winsup/cygwin/configure.ac -@@ -37,7 +37,7 @@ AC_LANG(C++) +@@ -35,7 +35,7 @@ AC_LANG(C++) AC_CYGWIN_INCLUDES case "$with_cross_host" in @@ -2816,5 +2816,5 @@ index d8cdcde..23e45d7 100644 install_host="install_host" ;; -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0002-Rename-DLL-from-cygwin-to-msys.patch b/msys2-runtime/0002-Rename-DLL-from-cygwin-to-msys.patch index fb676285311..cbdccc615a0 100644 --- a/msys2-runtime/0002-Rename-DLL-from-cygwin-to-msys.patch +++ b/msys2-runtime/0002-Rename-DLL-from-cygwin-to-msys.patch @@ -1,7 +1,7 @@ -From 9e108afaa132fb528184136d079ebd1cd860d393 Mon Sep 17 00:00:00 2001 +From 4f22d0ac760769c0f9f3d13089d4f2291759643d Mon Sep 17 00:00:00 2001 From: Alexpux Date: Tue, 5 Apr 2016 10:15:20 +0300 -Subject: [PATCH 02/16] Rename DLL from cygwin to msys +Subject: [PATCH 02/23] Rename DLL from cygwin to msys --- winsup/Makefile.in | 4 +-- @@ -61,10 +61,10 @@ Subject: [PATCH 02/16] Rename DLL from cygwin to msys 54 files changed, 250 insertions(+), 137 deletions(-) diff --git a/winsup/Makefile.in b/winsup/Makefile.in -index 1fdf93a..ad2bd04 100644 +index 148d985..81ce93c 100644 --- a/winsup/Makefile.in +++ b/winsup/Makefile.in -@@ -64,9 +64,9 @@ endif +@@ -62,9 +62,9 @@ endif all: Makefile $(SUBDIRS) install-license: CYGWIN_LICENSE COPYING @@ -77,10 +77,10 @@ index 1fdf93a..ad2bd04 100644 install: Makefile $(INSTALL_LICENSE) $(INSTALL_SUBDIRS) diff --git a/winsup/cygserver/Makefile.in b/winsup/cygserver/Makefile.in -index 8a47e82..dd42972 100644 +index 16a2ccc..b86d996 100644 --- a/winsup/cygserver/Makefile.in +++ b/winsup/cygserver/Makefile.in -@@ -51,16 +51,16 @@ LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)} +@@ -50,16 +50,16 @@ LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)} CYGWIN_OBJS:=$(cygwin_build)/version.o @@ -101,10 +101,10 @@ index 8a47e82..dd42972 100644 clean: rm -f $(OBJS) ${patsubst %.o,%.d,$(OBJS)} cygserver.exe diff --git a/winsup/cygserver/transport_pipes.h b/winsup/cygserver/transport_pipes.h -index 1368121..13ba609 100644 +index e101623..66272bc 100644 --- a/winsup/cygserver/transport_pipes.h +++ b/winsup/cygserver/transport_pipes.h -@@ -13,7 +13,11 @@ details. */ +@@ -11,7 +11,11 @@ details. */ #ifndef _TRANSPORT_PIPES_H #define _TRANSPORT_PIPES_H @@ -117,10 +117,10 @@ index 1368121..13ba609 100644 /* Named pipes based transport, for security on NT */ diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in -index 43919bd..2473d8a 100644 +index 70da06f..0c771a5 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in -@@ -108,17 +108,17 @@ RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \ +@@ -106,17 +106,17 @@ RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \ else echo runtest; fi` RUNTESTFLAGS = @@ -145,7 +145,7 @@ index 43919bd..2473d8a 100644 TLSOFFSETS_H:=@TLSOFFSETS_H@ DLL_ENTRY:=@DLL_ENTRY@ -@@ -130,6 +130,7 @@ toolopts:=--cpu=${target_cpu} --ar=${AR} --as=${AS} --nm=${NM} --objcopy=${OBJCO +@@ -128,6 +128,7 @@ toolopts:=--cpu=${target_cpu} --ar=${AR} --as=${AS} --nm=${NM} --objcopy=${OBJCO speclib=\ ${srcdir}/speclib ${toolopts} \ --exclude='cygwin' \ @@ -153,7 +153,7 @@ index 43919bd..2473d8a 100644 --exclude='(?i:dll)' \ --exclude='reloc' \ --exclude='^main$$' \ -@@ -540,7 +541,7 @@ endif +@@ -538,7 +539,7 @@ endif API_VER:=$(srcdir)/include/cygwin/version.h @@ -162,7 +162,7 @@ index 43919bd..2473d8a 100644 SUBLIBS:=libpthread.a libutil.a ${CURDIR}/libm.a ${CURDIR}/libc.a libdl.a libresolv.a librt.a libacl.a EXTRALIBS:=libautomode.a libbinmode.a libtextmode.a libtextreadmode.a INSTOBJS:=automode.o binmode.o textmode.o textreadmode.o -@@ -589,7 +590,8 @@ install-libs: $(TARGET_LIBS) +@@ -588,7 +589,8 @@ install-libs: $(TARGET_LIBS) for i in $^; do \ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/lib/`basename $$i` ; \ done @@ -172,16 +172,16 @@ index 43919bd..2473d8a 100644 install-headers: cd $(srcdir); \ -@@ -654,7 +656,7 @@ uninstall-man: +@@ -653,7 +655,7 @@ uninstall-man: done - clean: -- -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h $(srcdir)/$(TLSOFFSETS_H) $(srcdir)/devices.cc -+ -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s msys.def globals.h $(srcdir)/$(TLSOFFSETS_H) $(srcdir)/devices.cc + clean distclean realclean: +- -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h ++ -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s msys.def globals.h -@$(MAKE) -C ${cygserver_blddir} libclean - maintainer-clean realclean: clean -@@ -666,29 +668,29 @@ maintainer-clean realclean: clean + maintainer-clean: clean +@@ -666,29 +668,29 @@ maintainer-clean: clean $(LDSCRIPT): $(LDSCRIPT).in $(CC) -E - -P < $^ -o $@ @@ -256,10 +256,10 @@ index 617b260..7ba55ca 100755 DEF_DLL_ENTRY="dll_entry" DIN_FILE="x86_64.din" diff --git a/winsup/cygwin/configure.ac b/winsup/cygwin/configure.ac -index 23e45d7..605b614 100644 +index cb45983..fe2b8e1 100644 --- a/winsup/cygwin/configure.ac +++ b/winsup/cygwin/configure.ac -@@ -88,14 +88,14 @@ dnl fi +@@ -86,14 +86,14 @@ dnl fi case "$target_cpu" in i?86) @@ -277,10 +277,10 @@ index 23e45d7..605b614 100644 DEF_DLL_ENTRY="dll_entry" DIN_FILE="x86_64.din" diff --git a/winsup/cygwin/crt0.c b/winsup/cygwin/crt0.c -index b5a21bd..e296ebf 100644 +index f0103b4..bfbd6e0 100644 --- a/winsup/cygwin/crt0.c +++ b/winsup/cygwin/crt0.c -@@ -16,7 +16,11 @@ details. */ +@@ -14,7 +14,11 @@ details. */ extern int main (int argc, char **argv); @@ -292,7 +292,7 @@ index b5a21bd..e296ebf 100644 void mainCRTStartup () -@@ -26,7 +30,11 @@ mainCRTStartup () +@@ -24,7 +28,11 @@ mainCRTStartup () asm volatile ("andl $-16,%%esp" ::: "%esp"); #endif @@ -305,10 +305,10 @@ index b5a21bd..e296ebf 100644 /* These are never actually called. They are just here to force the inclusion of things like -lbinmode. */ diff --git a/winsup/cygwin/cyglsa.h b/winsup/cygwin/cyglsa.h -index cc180da..944d490 100644 +index f9da707..120c0a9 100644 --- a/winsup/cygwin/cyglsa.h +++ b/winsup/cygwin/cyglsa.h -@@ -16,7 +16,11 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ +@@ -14,7 +14,11 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */ extern "C" { #endif @@ -321,10 +321,10 @@ index cc180da..944d490 100644 #define CYG_LSA_MAGIC_OLD1 0x0379f014LU /* First change to cyglsa_t. diff --git a/winsup/cygwin/cygserver_setpwd.h b/winsup/cygwin/cygserver_setpwd.h -index 8fa3479..04994fa 100644 +index fc1576b..b297511 100644 --- a/winsup/cygwin/cygserver_setpwd.h +++ b/winsup/cygwin/cygserver_setpwd.h -@@ -14,7 +14,11 @@ details. */ +@@ -12,7 +12,11 @@ details. */ #include #include "cygserver.h" @@ -337,10 +337,10 @@ index 8fa3479..04994fa 100644 #ifndef __INSIDE_CYGWIN__ class transport_layer_base; diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc -index 8597541..46ba273 100644 +index fc051cd..1aa3072 100644 --- a/winsup/cygwin/cygthread.cc +++ b/winsup/cygwin/cygthread.cc -@@ -171,7 +171,7 @@ new (size_t) +@@ -168,7 +168,7 @@ new (size_t) } #ifdef DEBUGGING @@ -394,10 +394,10 @@ index 134ae3f..d390a51 100644 BYTE(0) /* d */ BYTE(0) /* b */ diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc -index cbe7f25..20746f1 100644 +index fda4b58..ccfce50 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc -@@ -381,21 +381,21 @@ check_sanity_and_sync (per_process *p) +@@ -378,21 +378,21 @@ check_sanity_and_sync (per_process *p) /* Complain if older than last incompatible change */ if (p->dll_major < CYGWIN_VERSION_DLL_EPOCH) @@ -423,7 +423,7 @@ index cbe7f25..20746f1 100644 which overwrote the cxx_malloc field with the local DLL copy. Hilarity ensues if the DLL is not loaded while the process is forking. */ -@@ -506,12 +506,12 @@ break_here () +@@ -503,12 +503,12 @@ break_here () static void initial_env () { @@ -438,7 +438,7 @@ index cbe7f25..20746f1 100644 { char buf1[PATH_MAX]; GetModuleFileName (NULL, buf1, PATH_MAX); -@@ -1151,7 +1151,11 @@ dll_crt0 (per_process *uptr) +@@ -1148,7 +1148,11 @@ dll_crt0 (per_process *uptr) See winsup/testsuite/cygload for an example of how to use cygwin1.dll from MSVC and non-cygwin MinGW applications. */ extern "C" void @@ -450,7 +450,7 @@ index cbe7f25..20746f1 100644 { #ifndef __x86_64__ static char **envp; -@@ -1364,7 +1368,7 @@ multiple_cygwin_problem (const char *what, uintptr_t magic_version, uintptr_t ve +@@ -1361,7 +1365,7 @@ multiple_cygwin_problem (const char *what, uintptr_t magic_version, uintptr_t ve return; } @@ -459,7 +459,7 @@ index cbe7f25..20746f1 100644 return; if (CYGWIN_VERSION_MAGIC_VERSION (magic_version) == version) -@@ -1384,7 +1388,7 @@ are unable to find another cygwin DLL.", +@@ -1381,7 +1385,7 @@ are unable to find another cygwin DLL.", void __reg1 cygbench (const char *s) { @@ -495,10 +495,10 @@ index c337053..0b1067a 100644 %% #undef BRACK diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc -index 914411c..4cb9f0b 100644 +index 255a6d5..4a90293 100644 --- a/winsup/cygwin/dlfcn.cc +++ b/winsup/cygwin/dlfcn.cc -@@ -89,8 +89,13 @@ get_full_path_of_dll (const char* str, path_conv &real_filename) +@@ -86,8 +86,13 @@ get_full_path_of_dll (const char* str, path_conv &real_filename) /* Does the filename start with "lib"? */ if (!strncmp (basename, "lib", 3)) { @@ -513,10 +513,10 @@ index 914411c..4cb9f0b 100644 if (gfpod_helper (name, real_filename)) return true; diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc -index 8deceb9..58f24dc 100644 +index 7d01bf9..0647a60 100644 --- a/winsup/cygwin/dll_init.cc +++ b/winsup/cygwin/dll_init.cc -@@ -695,14 +695,22 @@ dll_dllcrt0_1 (VOID *x) +@@ -692,14 +692,22 @@ dll_dllcrt0_1 (VOID *x) future. Cygwin can now handle being loaded from a noncygwin app using the same entry point. */ extern "C" int @@ -540,10 +540,10 @@ index 8deceb9..58f24dc 100644 HANDLE retaddr; if (_my_tls.isinitialized ()) diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc -index 7f12ff5..edebd85 100644 +index 0f995e4290..33c886a 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc -@@ -973,9 +973,15 @@ handle_to_fn (HANDLE h, char *posix_fn) +@@ -970,9 +970,15 @@ handle_to_fn (HANDLE h, char *posix_fn) if (wcsncasecmp (w32, DEV_NAMED_PIPE, DEV_NAMED_PIPE_LEN) == 0) { w32 += DEV_NAMED_PIPE_LEN; @@ -560,10 +560,10 @@ index 7f12ff5..edebd85 100644 w32len = cygheap->installation_key.Length / sizeof (WCHAR); if (w32len diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc -index fc9834c..482ee39 100644 +index 7ad9988..c07d5df 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc -@@ -512,14 +512,14 @@ try_to_debug (bool waitloop) +@@ -509,14 +509,14 @@ try_to_debug (bool waitloop) PWCHAR rawenv = GetEnvironmentStringsW () ; for (PWCHAR p = rawenv; *p != L'\0'; p = wcschr (p, L'\0') + 1) { @@ -581,10 +581,10 @@ index fc9834c..482ee39 100644 break; } diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc -index a39a566..f026046 100644 +index 95c47c4..c363b84 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc -@@ -467,7 +467,11 @@ fhandler_pty_slave::open (int flags, mode_t) +@@ -464,7 +464,11 @@ fhandler_pty_slave::open (int flags, mode_t) pipe_reply repl; DWORD len; @@ -596,7 +596,7 @@ index a39a566..f026046 100644 &cygheap->installation_key, get_minor ()); termios_printf ("dup handles via master control pipe %s", buf); if (!CallNamedPipe (buf, &req, sizeof req, &repl, sizeof repl, -@@ -1309,7 +1313,11 @@ fhandler_pty_master::close () +@@ -1305,7 +1309,11 @@ fhandler_pty_master::close () pipe_reply repl; DWORD len; @@ -608,7 +608,7 @@ index a39a566..f026046 100644 &cygheap->installation_key, get_minor ()); acquire_output_mutex (INFINITE); if (master_ctl) -@@ -1781,7 +1789,11 @@ fhandler_pty_master::setup () +@@ -1777,7 +1785,11 @@ fhandler_pty_master::setup () /* Create master control pipe which allows the master to duplicate the pty pipe handles to processes which deserve it. */ @@ -621,10 +621,10 @@ index a39a566..f026046 100644 master_ctl = CreateNamedPipe (buf, PIPE_ACCESS_DUPLEX | FILE_FLAG_FIRST_PIPE_INSTANCE, diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc -index ce54e39..d633093 100644 +index ef5a268..e728b0d 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc -@@ -167,7 +167,7 @@ frok::child (volatile char * volatile here) +@@ -164,7 +164,7 @@ frok::child (volatile char * volatile here) char buf[80]; /* This is useful for debugging fork problems. Use gdb to attach to the pid reported here. */ @@ -634,10 +634,10 @@ index ce54e39..d633093 100644 small_printf ("Sleeping %d after fork, pid %u\n", atoi (buf), GetCurrentProcessId ()); Sleep (atoi (buf)); diff --git a/winsup/cygwin/hookapi.cc b/winsup/cygwin/hookapi.cc -index 133d8cb..d1f4ee9 100644 +index 4078e65..3c992bb 100644 --- a/winsup/cygwin/hookapi.cc +++ b/winsup/cygwin/hookapi.cc -@@ -403,7 +403,11 @@ hook_or_detect_cygwin (const char *name, const void *fn, WORD& subsys, HANDLE h) +@@ -401,7 +401,11 @@ hook_or_detect_cygwin (const char *name, const void *fn, WORD& subsys, HANDLE h) for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++) { if (!ascii_strcasematch (rva (PSTR, map ?: (char *) hm, pd->Name - delta), @@ -678,10 +678,10 @@ index f3cd2fd..417a827 100644 fscanf_r = _fscanf_r SIGFE get_osfhandle = _get_osfhandle SIGFE diff --git a/winsup/cygwin/include/cygwin/cygwin_dll.h b/winsup/cygwin/include/cygwin/cygwin_dll.h -index 908858c..96dc7d8 100644 +index 56b4363..6bc948a 100644 --- a/winsup/cygwin/include/cygwin/cygwin_dll.h +++ b/winsup/cygwin/include/cygwin/cygwin_dll.h -@@ -26,8 +26,8 @@ details. */ +@@ -24,8 +24,8 @@ details. */ CDECL_BEGIN \ int WINAPI Entry (HINSTANCE h, DWORD reason, void *ptr); \ typedef int (*mainfunc) (int, char **, char **); \ @@ -692,7 +692,7 @@ index 908858c..96dc7d8 100644 CDECL_END \ \ static HINSTANCE storedHandle; \ -@@ -44,7 +44,7 @@ static int __dllMain (int a __attribute__ ((__unused__)), \ +@@ -42,7 +42,7 @@ static int __dllMain (int a __attribute__ ((__unused__)), \ \ static PVOID dll_index; \ \ @@ -701,7 +701,7 @@ index 908858c..96dc7d8 100644 { \ int ret; \ ret = 1; \ -@@ -57,7 +57,7 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ +@@ -55,7 +55,7 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ storedReason = reason; \ storedPtr = ptr; \ __dynamically_loaded = (ptr == NULL); \ @@ -710,7 +710,7 @@ index 908858c..96dc7d8 100644 if (dll_index == (PVOID) -1) \ ret = 0; \ } \ -@@ -68,7 +68,7 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ +@@ -66,7 +66,7 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ ret = Entry (h, reason, ptr); \ if (ret) \ { \ @@ -719,7 +719,7 @@ index 908858c..96dc7d8 100644 dll_index = (PVOID) -1; \ } \ } \ -@@ -90,9 +90,9 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ +@@ -88,9 +88,9 @@ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \ } \ \ /* OBSOLETE: This is only provided for source level compatibility. */ \ @@ -732,10 +732,10 @@ index 908858c..96dc7d8 100644 #endif /* __CYGWIN_CYGWIN_DLL_H__ */ diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h -index 9442e4e..75661f8 100644 +index 9351ea9..b15773b 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h -@@ -474,7 +474,11 @@ details. */ +@@ -471,7 +471,11 @@ details. */ names include the CYGWIN_VERSION_SHARED_DATA version as well as this identifier. */ @@ -747,7 +747,7 @@ index 9442e4e..75661f8 100644 /* The Cygwin mount table interface in the Win32 registry also has a version number associated with it in case that is changed in a non-backwards -@@ -490,7 +494,11 @@ details. */ +@@ -487,7 +491,11 @@ details. */ /* Identifiers used in the Win32 registry. */ @@ -760,10 +760,10 @@ index 9442e4e..75661f8 100644 /* The default cygdrive prefix. */ diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc -index 50785d7..c0e0976 100644 +index 612aa12..0517979 100644 --- a/winsup/cygwin/lib/_cygwin_crt0_common.cc +++ b/winsup/cygwin/lib/_cygwin_crt0_common.cc -@@ -90,7 +90,11 @@ struct per_process_cxx_malloc __cygwin_cxx_malloc = +@@ -87,7 +87,11 @@ struct per_process_cxx_malloc __cygwin_cxx_malloc = and then jump to the dll. */ int __stdcall @@ -776,10 +776,10 @@ index 50785d7..c0e0976 100644 per_process *newu = (per_process *) cygwin_internal (CW_USER_DATA); bool uwasnull; diff --git a/winsup/cygwin/lib/crt0.h b/winsup/cygwin/lib/crt0.h -index d289e78..86ff2df 100644 +index c551de7..e901d91 100644 --- a/winsup/cygwin/lib/crt0.h +++ b/winsup/cygwin/lib/crt0.h -@@ -15,7 +15,11 @@ extern "C" { +@@ -13,7 +13,11 @@ extern "C" { #include "winlean.h" struct per_process; typedef int (*MainFunc) (int argc, char *argv[], char **env); @@ -792,10 +792,10 @@ index d289e78..86ff2df 100644 #ifdef __cplusplus diff --git a/winsup/cygwin/lib/cygwin_attach_dll.c b/winsup/cygwin/lib/cygwin_attach_dll.c -index 543073c..7b22ebb 100644 +index 866bfd8..82679c4 100644 --- a/winsup/cygwin/lib/cygwin_attach_dll.c +++ b/winsup/cygwin/lib/cygwin_attach_dll.c -@@ -17,10 +17,18 @@ details. */ +@@ -15,10 +15,18 @@ details. */ /* for a loaded dll */ PVOID @@ -815,10 +815,10 @@ index 543073c..7b22ebb 100644 /* jump into the dll. */ return dll_dllcrt0 (h, &u); diff --git a/winsup/cygwin/lib/cygwin_crt0.c b/winsup/cygwin/lib/cygwin_crt0.c -index 952ae28..e5a8d58 100644 +index 776e7e8..3e1eda1 100644 --- a/winsup/cygwin/lib/cygwin_crt0.c +++ b/winsup/cygwin/lib/cygwin_crt0.c -@@ -16,8 +16,16 @@ extern void __stdcall _dll_crt0 () +@@ -14,8 +14,16 @@ extern void __stdcall _dll_crt0 () /* for main module */ void @@ -836,10 +836,10 @@ index 952ae28..e5a8d58 100644 _dll_crt0 (); /* Jump into the dll, never to return */ } diff --git a/winsup/cygwin/mkvers.sh b/winsup/cygwin/mkvers.sh -index f3f3d16..5cd6c2e 100755 +index 7e763e0..36b4d78 100755 --- a/winsup/cygwin/mkvers.sh +++ b/winsup/cygwin/mkvers.sh -@@ -136,7 +136,7 @@ fi +@@ -133,7 +133,7 @@ fi ) | while read var; do read val cat <&9 -@@ -154,9 +154,9 @@ fi +@@ -151,9 +151,9 @@ fi # cat <&9 #ifdef DEBUGGING @@ -861,10 +861,10 @@ index f3f3d16..5cd6c2e 100755 "END_CYGWIN_VERSION_INFO\n\0"; cygwin_version_info cygwin_version = diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc -index d4b2afb..b2d8257 100644 +index 8e2be32..0291ac8 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc -@@ -191,7 +191,7 @@ pinfo::maybe_set_exit_code_from_windows () +@@ -188,7 +188,7 @@ pinfo::maybe_set_exit_code_from_windows () GetExitCodeProcess (hProcess, &x); set_exit_code (x); } @@ -873,7 +873,7 @@ index d4b2afb..b2d8257 100644 self->pid, oexitcode, x, self->exitcode); } -@@ -342,7 +342,7 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0) +@@ -339,7 +339,7 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0) if (procinfo->process_state & PID_EXECED) { pid_t realpid = procinfo->pid; @@ -912,10 +912,10 @@ index c250fdc..a230b35 100644 va_list args; diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc -index b6dc9d6..f60788b 100644 +index 853a07f..c0c343b 100644 --- a/winsup/cygwin/sec_auth.cc +++ b/winsup/cygwin/sec_auth.cc -@@ -773,7 +773,7 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern) +@@ -770,7 +770,7 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern) if (!NT_SUCCESS (status)) debug_printf ("NtQueryInformationToken(), %y", status); else @@ -924,7 +924,7 @@ index b6dc9d6..f60788b 100644 } /* Verify usersid */ cygsid tok_usersid (NO_SID); -@@ -891,7 +891,7 @@ create_token (cygsid &usersid, user_groups &new_groups) +@@ -888,7 +888,7 @@ create_token (cygsid &usersid, user_groups &new_groups) TOKEN_DEFAULT_DACL dacl = {}; TOKEN_SOURCE source; TOKEN_STATISTICS stats; @@ -933,7 +933,7 @@ index b6dc9d6..f60788b 100644 source.SourceIdentifier.HighPart = 0; source.SourceIdentifier.LowPart = 0x0101; -@@ -1049,7 +1049,7 @@ lsaauth (cygsid &usersid, user_groups &new_groups) +@@ -1046,7 +1046,7 @@ lsaauth (cygsid &usersid, user_groups &new_groups) push_self_privilege (SE_TCB_PRIVILEGE, true); /* Register as logon process. */ @@ -942,7 +942,7 @@ index b6dc9d6..f60788b 100644 SetLastError (0); status = LsaRegisterLogonProcess (&name, &lsa_hdl, &sec_mode); if (status != STATUS_SUCCESS) -@@ -1078,10 +1078,10 @@ lsaauth (cygsid &usersid, user_groups &new_groups) +@@ -1075,10 +1075,10 @@ lsaauth (cygsid &usersid, user_groups &new_groups) goto out; /* Create origin. */ @@ -956,10 +956,10 @@ index b6dc9d6..f60788b 100644 ts.SourceIdentifier.LowPart = 0x0103; diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc -index 4b49441..4e3f515 100644 +index 6991e06..d6a869f 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc -@@ -383,7 +383,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) +@@ -380,7 +380,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) /* Create hopefully unique filename. Since we have to stick to the current directory on remote shares, make the new filename at least very unlikely to match by accident. It starts @@ -968,7 +968,7 @@ index 4b49441..4e3f515 100644 starting at U+dc00. Use plain ASCII chars on filesystems not supporting Unicode. The rest of the filename is the inode number in hex encoding and a hash of the full NT path in hex. The combination allows to remove -@@ -392,7 +392,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) +@@ -389,7 +389,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) RtlAppendUnicodeToString (&recycler, (pc.fs_flags () & FILE_UNICODE_ON_DISK && !pc.fs_is_samba ()) @@ -978,10 +978,10 @@ index 4b49441..4e3f515 100644 /* Note: Modern Samba versions apparently don't like buffer sizes of more than 65535 in some NtQueryInformationFile/NtSetInformationFile calls. diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc -index 7949b70..fada898 100644 +index 81717c6..36d1a1a 100644 --- a/winsup/cygwin/syslog.cc +++ b/winsup/cygwin/syslog.cc -@@ -28,7 +28,11 @@ details. */ +@@ -25,7 +25,11 @@ details. */ #include "cygtls.h" #include "tls_pbuf.h" @@ -994,10 +994,10 @@ index 7949b70..fada898 100644 static struct { diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h -index 9b12267..c620a92 100644 +index 369b862..501cd4b 100644 --- a/winsup/cygwin/winsup.h +++ b/winsup/cygwin/winsup.h -@@ -165,7 +165,11 @@ extern "C" void _pei386_runtime_relocator (per_process *); +@@ -162,7 +162,11 @@ extern "C" void _pei386_runtime_relocator (per_process *); #ifndef __x86_64__ /* dynamically loaded dll initialization for non-cygwin apps */ @@ -1010,12 +1010,12 @@ index 9b12267..c620a92 100644 void __reg1 do_exit (int) __attribute__ ((noreturn)); diff --git a/winsup/cygwin/winver.rc b/winsup/cygwin/winver.rc -index 6174589..7a24cf7 100644 +index 980d512..58878d4 100644 --- a/winsup/cygwin/winver.rc +++ b/winsup/cygwin/winver.rc @@ -35,7 +35,7 @@ BEGIN VALUE "InternalName", CYGWIN_DLL_NAME - VALUE "LegalCopyright", "Copyright \251 Red Hat, Inc. 1996-" STRINGIFY(CYGWIN_BUILD_YEAR) + VALUE "LegalCopyright", "Copyright \251 Cygwin Authors 1996-" STRINGIFY(CYGWIN_BUILD_YEAR) VALUE "OriginalFilename", CYGWIN_DLL_NAME - VALUE "ProductName", "Cygwin" + VALUE "ProductName", "MSYS2" @@ -1033,10 +1033,10 @@ index e1896bf..38332c7 100644 EXPORTS #Exported variables diff --git a/winsup/lsaauth/cyglsa.c b/winsup/lsaauth/cyglsa.c -index 351a892..36d75af 100644 +index 9d9c9ff..ffdb8f7 100644 --- a/winsup/lsaauth/cyglsa.c +++ b/winsup/lsaauth/cyglsa.c -@@ -412,7 +412,7 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type, +@@ -410,7 +410,7 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type, return stat; } @@ -1046,10 +1046,10 @@ index 351a892..36d75af 100644 ts.SourceIdentifier.LowPart = 0x0104; RtlInitEmptyUnicodeString (&flatnm, flatname, diff --git a/winsup/testsuite/Makefile.in b/winsup/testsuite/Makefile.in -index 04ff99b..1bc41fb 100644 +index a86a35b..8060bb5 100644 --- a/winsup/testsuite/Makefile.in +++ b/winsup/testsuite/Makefile.in -@@ -73,7 +73,7 @@ ifdef VERBOSE +@@ -72,7 +72,7 @@ ifdef VERBOSE RUNTESTFLAGS = -v endif @@ -1079,10 +1079,10 @@ index 3936979..9acfb11 100644 } diff --git a/winsup/testsuite/cygrun.c b/winsup/testsuite/cygrun.c -index 60330ca..be8ed9e 100644 +index d1f53aa..e8220d0 100644 --- a/winsup/testsuite/cygrun.c +++ b/winsup/testsuite/cygrun.c -@@ -31,8 +31,8 @@ main (int argc, char **argv) +@@ -29,8 +29,8 @@ main (int argc, char **argv) exit (0); } @@ -1093,7 +1093,7 @@ index 60330ca..be8ed9e 100644 { char buf[4096]; if (!p) -@@ -46,7 +46,7 @@ main (int argc, char **argv) +@@ -44,7 +44,7 @@ main (int argc, char **argv) strcat (buf, " "); } strcat(buf, "ntsec"); @@ -1103,10 +1103,10 @@ index 60330ca..be8ed9e 100644 memset (&sa, 0, sizeof (sa)); diff --git a/winsup/testsuite/winsup.api/cygload.cc b/winsup/testsuite/winsup.api/cygload.cc -index bdbbcd1..6fc5360 100644 +index ad45996..7a398dc 100644 --- a/winsup/testsuite/winsup.api/cygload.cc +++ b/winsup/testsuite/winsup.api/cygload.cc -@@ -27,7 +27,7 @@ +@@ -25,7 +25,7 @@ save for errors. -testinterrupts Pauses the program for 30 seconds so you can demonstrate that it handles ^C properly. @@ -1115,7 +1115,7 @@ index bdbbcd1..6fc5360 100644 #include "cygload.h" #include -@@ -138,15 +138,15 @@ cygwin::connector::connector (const char *dll) +@@ -136,15 +136,15 @@ cygwin::connector::connector (const char *dll) if ((_library = LoadLibrary (dll)) == NULL) throw windows_error ("LoadLibrary", dll); @@ -1134,7 +1134,7 @@ index bdbbcd1..6fc5360 100644 (*cyginit) (); *out << "Loading symbols..." << endl; -@@ -212,7 +212,7 @@ cygwin::connector::~connector () +@@ -210,7 +210,7 @@ cygwin::connector::~connector () // This should call init.cc:dll_entry() with DLL_PROCESS_DETACH. if (!FreeLibrary (_library)) @@ -1143,7 +1143,7 @@ index bdbbcd1..6fc5360 100644 } catch (std::exception &x) { -@@ -478,7 +478,7 @@ main (int argc, char *argv[]) +@@ -476,7 +476,7 @@ main (int argc, char *argv[]) std::ostringstream output; bool verbose = false, testinterrupts = false; @@ -1166,10 +1166,10 @@ index a07a549..bc1ae61 100644 verbose -log "cygload: $rv" fail "cygload (execute)" diff --git a/winsup/testsuite/winsup.api/cygload.h b/winsup/testsuite/winsup.api/cygload.h -index c7c5620..180a764 100644 +index 8007fd5..ab4003b 100644 --- a/winsup/testsuite/winsup.api/cygload.h +++ b/winsup/testsuite/winsup.api/cygload.h -@@ -77,7 +77,7 @@ namespace cygwin +@@ -76,7 +76,7 @@ namespace cygwin // spawns a thread to let you receive signals from cygwin. class connector { public: @@ -1192,10 +1192,10 @@ index 6390962..769b7c0 100644 verbose -log "$rv" fail "$testcase (compile)" diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in -index fe81d87..fe69d3c 100644 +index 0ad73fb..63dd4ca 100644 --- a/winsup/utils/Makefile.in +++ b/winsup/utils/Makefile.in -@@ -50,7 +50,7 @@ EXEEXT_FOR_BUILD:=@EXEEXT_FOR_BUILD@ +@@ -48,7 +48,7 @@ EXEEXT_FOR_BUILD:=@EXEEXT_FOR_BUILD@ LDLIBS := -lnetapi32 -ladvapi32 -lkernel32 -luser32 CYGWIN_LDFLAGS := -static -Wl,--enable-auto-import -L${WINDOWS_LIBDIR} $(LDLIBS) @@ -1204,7 +1204,7 @@ index fe81d87..fe69d3c 100644 MINGW_CXX := @MINGW_CXX@ -@@ -99,8 +99,8 @@ cygcheck.exe: MINGW_LDFLAGS += ${ZLIB} -lwininet -lpsapi -lntdll +@@ -97,8 +97,8 @@ cygcheck.exe: MINGW_LDFLAGS += ${ZLIB} -lwininet -lpsapi -lntdll cygcheck.exe: ${CYGCHECK_OBJS} cygpath.o: CXXFLAGS += -fno-threadsafe-statics @@ -1215,7 +1215,7 @@ index fe81d87..fe69d3c 100644 strace.exe: MINGW_LDFLAGS += -lntdll ldd.exe:CYGWIN_LDFLAGS += -lpsapi -@@ -180,7 +180,7 @@ install: all +@@ -178,7 +178,7 @@ install: all $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)/$$n; \ done @@ -1225,10 +1225,10 @@ index fe81d87..fe69d3c 100644 .PHONY: warn_dumper diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc -index d3c7d5d..b613f1c 100644 +index 4f311f2..e7bb826 100644 --- a/winsup/utils/cygcheck.cc +++ b/winsup/utils/cygcheck.cc -@@ -71,8 +71,7 @@ static const char *known_env_vars[] = { +@@ -68,8 +68,7 @@ static const char *known_env_vars[] = { "c_include_path", "compiler_path", "cxx_include_path", @@ -1238,7 +1238,7 @@ index d3c7d5d..b613f1c 100644 "dejagnu", "expect", "gcc_default_options", -@@ -505,12 +504,12 @@ struct ImpDirectory +@@ -502,12 +501,12 @@ struct ImpDirectory static bool track_down (const char *file, const char *suffix, int lvl); @@ -1253,7 +1253,7 @@ index d3c7d5d..b613f1c 100644 DWORD size = GetFileSize (h, NULL); DWORD n; -@@ -537,7 +536,7 @@ cygwin_info (HANDLE h) +@@ -534,7 +533,7 @@ cygwin_info (HANDLE h) while (buf < bufend) if ((buf = (char *) memchr (buf, '%', bufend - buf)) == NULL) break; @@ -1262,7 +1262,7 @@ index d3c7d5d..b613f1c 100644 buf++; else { -@@ -736,7 +735,7 @@ dll_info (const char *path, HANDLE fh, int lvl, int recurse) +@@ -733,7 +732,7 @@ dll_info (const char *path, HANDLE fh, int lvl, int recurse) } } } @@ -1271,7 +1271,7 @@ index d3c7d5d..b613f1c 100644 cygwin_info (fh); } -@@ -989,7 +988,7 @@ scan_registry (RegInfo * prev, HKEY hKey, char *name, int cygwin, bool wow64) +@@ -986,7 +985,7 @@ scan_registry (RegInfo * prev, HKEY hKey, char *name, int cygwin, bool wow64) char *cp; for (cp = name; *cp; cp++) @@ -1280,7 +1280,7 @@ index d3c7d5d..b613f1c 100644 cygwin = 1; DWORD num_subkeys, max_subkey_len, num_values; -@@ -1250,7 +1249,7 @@ dump_sysinfo_services () +@@ -1247,7 +1246,7 @@ dump_sysinfo_services () /* inform the user if nothing found */ if (no_services) @@ -1289,7 +1289,7 @@ index d3c7d5d..b613f1c 100644 } enum handle_reg_t -@@ -1265,10 +1264,10 @@ handle_reg_installation (handle_reg_t what) +@@ -1262,10 +1261,10 @@ handle_reg_installation (handle_reg_t what) HKEY key; if (what == PRINT_KEY) @@ -1302,7 +1302,7 @@ index d3c7d5d..b613f1c 100644 what == DELETE_KEY ? KEY_READ | KEY_WRITE : KEY_READ, &key) == ERROR_SUCCESS) -@@ -1290,7 +1289,7 @@ handle_reg_installation (handle_reg_t what) +@@ -1287,7 +1286,7 @@ handle_reg_installation (handle_reg_t what) if (what == PRINT_KEY) printf (" %s Key: %s Path: %s", i ? "User: " : "System:", name, path); @@ -1311,7 +1311,7 @@ index d3c7d5d..b613f1c 100644 if (what == PRINT_KEY) printf ("%s\n", access (path, F_OK) ? " (ORPHANED)" : ""); else if (access (path, F_OK)) -@@ -1364,7 +1363,7 @@ dump_sysinfo () +@@ -1361,7 +1360,7 @@ dump_sysinfo () _wputenv (comspec); } @@ -1320,7 +1320,7 @@ index d3c7d5d..b613f1c 100644 time (&now); printf ("Current System Time: %s\n", ctime (&now)); -@@ -1675,7 +1674,7 @@ dump_sysinfo () +@@ -1672,7 +1671,7 @@ dump_sysinfo () if (givehelp) @@ -1329,7 +1329,7 @@ index d3c7d5d..b613f1c 100644 for (i = 0; environ[i]; i++) { char *eq = strchr (environ[i], '='); -@@ -1725,7 +1724,7 @@ dump_sysinfo () +@@ -1722,7 +1721,7 @@ dump_sysinfo () if (registry) { if (givehelp) @@ -1338,7 +1338,7 @@ index d3c7d5d..b613f1c 100644 scan_registry (0, HKEY_CURRENT_USER, (char *) "HKEY_CURRENT_USER", 0, false); scan_registry (0, HKEY_LOCAL_MACHINE, -@@ -1909,7 +1908,7 @@ dump_sysinfo () +@@ -1906,7 +1905,7 @@ dump_sysinfo () printf ("\n"); if (givehelp) @@ -1347,7 +1347,7 @@ index d3c7d5d..b613f1c 100644 int cygwin_dll_count = 0; char cygdll_path[32768]; for (pathlike *pth = paths; pth->dir; pth++) -@@ -1926,10 +1925,10 @@ dump_sysinfo () +@@ -1923,10 +1922,10 @@ dump_sysinfo () wcstombs (f, ffinfo.cFileName, sizeof f); if (strcasecmp (f + strlen (f) - 4, ".dll") == 0) { @@ -1360,7 +1360,7 @@ index d3c7d5d..b613f1c 100644 { if (!cygwin_dll_count) strcpy (cygdll_path, pth->dir); -@@ -1953,9 +1952,9 @@ dump_sysinfo () +@@ -1950,9 +1949,9 @@ dump_sysinfo () FindClose (ff); } if (cygwin_dll_count > 1) @@ -1372,7 +1372,7 @@ index d3c7d5d..b613f1c 100644 dump_dodgy_apps (verbose); -@@ -2197,8 +2196,8 @@ static char opts[] = "cdsrvkflphV"; +@@ -2194,8 +2193,8 @@ static char opts[] = "cdsrvkflphV"; static void print_version () { @@ -1380,10 +1380,10 @@ index d3c7d5d..b613f1c 100644 - "System Checker for Cygwin\n" + printf ("cygcheck (msys) %d.%d.%d\n" + "System Checker for Msys\n" - "Copyright (C) 1998 - %s Red Hat, Inc.\n" + "Copyright (C) 1998 - %s Cygwin Authors\n" "This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n", -@@ -2228,7 +2227,7 @@ load_cygwin (int& argc, char **&argv) +@@ -2225,7 +2224,7 @@ load_cygwin (int& argc, char **&argv) { HMODULE h; @@ -1393,7 +1393,7 @@ index d3c7d5d..b613f1c 100644 GetModuleFileNameW (h, cygwin_dll_path, 32768); if ((cygwin_internal = (uintptr_t (*) (int, ...)) diff --git a/winsup/utils/ldd.cc b/winsup/utils/ldd.cc -index e4c14b4..7aa7cf8 100644 +index 233d650..43a0747 100644 --- a/winsup/utils/ldd.cc +++ b/winsup/utils/ldd.cc @@ -265,7 +265,7 @@ tocyg (wchar_t *win_fn) @@ -1406,10 +1406,10 @@ index e4c14b4..7aa7cf8 100644 print_dlls (dlls *dll, const wchar_t *dllfn, const wchar_t *process_fn) { diff --git a/winsup/utils/loadlib.h b/winsup/utils/loadlib.h -index 34ed127..5f18228 100644 +index c83b764..42ffbfd 100644 --- a/winsup/utils/loadlib.h +++ b/winsup/utils/loadlib.h -@@ -15,7 +15,7 @@ +@@ -13,7 +13,7 @@ #include /* Load all system libs from the windows system directory by prepending the @@ -1418,7 +1418,7 @@ index 34ed127..5f18228 100644 instead of prepending the path, make sure that the CWD is removed from the DLL search path, if possible (XP SP1++, Vista++). */ static HMODULE _load_sys_library (const wchar_t *dll) __attribute__ ((used)); -@@ -47,8 +47,8 @@ _load_sys_library (const wchar_t *dll) +@@ -45,8 +45,8 @@ _load_sys_library (const wchar_t *dll) set_dll_directory (L""); } @@ -1430,10 +1430,10 @@ index 34ed127..5f18228 100644 wcscpy (dllpath, sysdir); wcscpy (dllpath + sysdir_len, dll); diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc -index e34741f..e4417f6 100644 +index 4877f6a..dc71dae 100644 --- a/winsup/utils/path.cc +++ b/winsup/utils/path.cc -@@ -601,14 +601,14 @@ read_mounts () +@@ -598,14 +598,14 @@ read_mounts () } max_mount_entry = 0; @@ -1453,7 +1453,7 @@ index e34741f..e4417f6 100644 has been made non-executable for the current user accidentally. */ else if (!GetModuleFileNameW (NULL, path, 32768)) return; -@@ -617,7 +617,7 @@ read_mounts () +@@ -614,7 +614,7 @@ read_mounts () { if (!cygwin_dll_path[0]) { @@ -1463,10 +1463,10 @@ index e34741f..e4417f6 100644 if (attr == (DWORD) -1 || (attr & (FILE_ATTRIBUTE_DIRECTORY diff --git a/winsup/utils/ssp.c b/winsup/utils/ssp.c -index 0bca544..cc30d53 100644 +index 548b89a..09ee26d 100644 --- a/winsup/utils/ssp.c +++ b/winsup/utils/ssp.c -@@ -719,15 +719,15 @@ usage (FILE * stream) +@@ -718,15 +718,15 @@ usage (FILE * stream) "You must specify the range of memory addresses to keep track of\n" "manually, but it's not hard to figure out what to specify. Use the\n" "\"objdump\" program to determine the bounds of the target's \".text\"\n" @@ -1485,7 +1485,7 @@ index 0bca544..cc30d53 100644 "\n" "Sections:\n" "Idx Name Size VMA LMA File off Algn\n" -@@ -758,7 +758,7 @@ usage (FILE * stream) +@@ -757,7 +757,7 @@ usage (FILE * stream) "\"gmon.out\". You can turn this data file into a readable report with\n" "gprof:\n" "\n" @@ -1495,10 +1495,10 @@ index 0bca544..cc30d53 100644 "The \"-b\" means 'skip the help pages'. You can omit this until you're\n" "familiar with the report layout. The gprof documentation explains\n" diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc -index f9c6644..6d9d727 100644 +index 3042d1b..5c7f030 100644 --- a/winsup/utils/strace.cc +++ b/winsup/utils/strace.cc -@@ -284,7 +284,7 @@ load_cygwin () +@@ -281,7 +281,7 @@ load_cygwin () if (h) return 0; @@ -1507,7 +1507,7 @@ index f9c6644..6d9d727 100644 { errno = ENOENT; return 0; -@@ -355,14 +355,14 @@ create_child (char **argv) +@@ -352,14 +352,14 @@ create_child (char **argv) make_command_line (one_line, argv); SetConsoleCtrlHandler (NULL, 0); @@ -1525,7 +1525,7 @@ index f9c6644..6d9d727 100644 _putenv (newenv); ret = CreateProcess (0, one_line.buf, /* command line */ NULL, /* Security */ -@@ -783,7 +783,7 @@ dotoggle (pid_t pid) +@@ -780,7 +780,7 @@ dotoggle (pid_t pid) child_pid = (DWORD) cygwin_internal (CW_CYGWIN_PID_TO_WINPID, pid); if (!child_pid) { @@ -1535,5 +1535,5 @@ index f9c6644..6d9d727 100644 } if (cygwin_internal (CW_STRACE_TOGGLE, child_pid)) -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch b/msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch index 46e57658fe0..b9f3be80ca0 100644 --- a/msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch +++ b/msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch @@ -1,7 +1,7 @@ -From 3767f9d4f1a8be2f35f0133407f8b71212a22865 Mon Sep 17 00:00:00 2001 +From b8dd79aff0eee72bab120584157e6125c56f006f Mon Sep 17 00:00:00 2001 From: Alexpux Date: Thu, 12 Mar 2015 13:58:27 +0300 -Subject: [PATCH 03/16] Add functionality for converting UNIX paths in +Subject: [PATCH 03/23] Add functionality for converting UNIX paths in arguments and environment variables to Windows form for native Win32 applications. @@ -21,10 +21,10 @@ Subject: [PATCH 03/16] Add functionality for converting UNIX paths in create mode 100644 winsup/cygwin/msys2_path_conv.h diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in -index 2473d8a..0a8895e 100644 +index 0c771a5..9bb7e72 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in -@@ -334,6 +334,7 @@ DLL_OFILES:= \ +@@ -332,6 +332,7 @@ DLL_OFILES:= \ mktemp.o \ mmap.o \ msg.o \ @@ -33,10 +33,10 @@ index 2473d8a..0a8895e 100644 net.o \ netdb.o \ diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index b155311..3629d48 100644 +index 6ba1469..922e29c 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc -@@ -1016,7 +1016,7 @@ env_compare (const void *key, const void *memb) +@@ -1013,7 +1013,7 @@ env_compare (const void *key, const void *memb) to the child. */ char ** __reg3 build_env (const char * const *envp, PWCHAR &envblock, int &envc, @@ -45,7 +45,7 @@ index b155311..3629d48 100644 { PWCHAR cwinenv = NULL; size_t winnum = 0; -@@ -1104,6 +1104,11 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1101,6 +1101,11 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, for (srcp = envp, dstp = newenv, pass_dstp = pass_env; *srcp; srcp++) { bool calc_tl = !no_envblock; @@ -57,7 +57,7 @@ index b155311..3629d48 100644 /* Look for entries that require special attention */ for (unsigned i = 0; i < SPENVS_SIZE; i++) if (!saw_spenv[i] && (*dstp = spenvs[i].retrieve (no_envblock, *srcp))) -@@ -1224,6 +1229,15 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1221,6 +1226,15 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, saw_PATH = true; } } @@ -74,10 +74,10 @@ index b155311..3629d48 100644 p = *srcp; /* Don't worry about it */ diff --git a/winsup/cygwin/environ.h b/winsup/cygwin/environ.h -index 5048fcd..b549710 100644 +index 46beb2d..ef00c0e 100644 --- a/winsup/cygwin/environ.h +++ b/winsup/cygwin/environ.h -@@ -45,6 +45,6 @@ extern "C" char **__cygwin_environ, ***main_environ; +@@ -43,6 +43,6 @@ extern "C" char **__cygwin_environ, ***main_environ; extern "C" char __stdcall **cur_environ (); #endif char ** __reg3 build_env (const char * const *envp, PWCHAR &envblock, @@ -86,10 +86,10 @@ index 5048fcd..b549710 100644 #define ENV_CVT -1 diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc -index 02335eb..eea2fb4 100644 +index c81bdc0..de3eaa8 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc -@@ -140,7 +140,7 @@ create_winenv (const char * const *env) +@@ -137,7 +137,7 @@ create_winenv (const char * const *env) int unused_envc; PWCHAR envblock = NULL; char **envp = build_env (env ?: cur_environ (), envblock, unused_envc, false, @@ -99,10 +99,10 @@ index 02335eb..eea2fb4 100644 if (envp) diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h -index e663690..89e971f 100644 +index 5990e46..8bc5d8f 100644 --- a/winsup/cygwin/include/sys/cygwin.h +++ b/winsup/cygwin/include/sys/cygwin.h -@@ -86,6 +86,12 @@ extern ssize_t cygwin_conv_path_list (cygwin_conv_path_t what, const void *from, +@@ -83,6 +83,12 @@ extern ssize_t cygwin_conv_path_list (cygwin_conv_path_t what, const void *from, to one of the above values, or to ENOMEM if malloc fails. */ extern void *cygwin_create_path (cygwin_conv_path_t what, const void *from); @@ -893,10 +893,10 @@ index 0000000..e1e5e87 +#endif /* end of include guard: PATH_CONV_H_DB4IQBH3 */ + diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index 250871d..4a47bb3 100644 +index 7533e00..9e152a5 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -71,6 +71,7 @@ +@@ -68,6 +68,7 @@ #include "cygtls.h" #include "tls_pbuf.h" #include "environ.h" @@ -904,7 +904,7 @@ index 250871d..4a47bb3 100644 #include #include #include -@@ -3289,6 +3290,69 @@ fchdir (int fd) +@@ -3276,6 +3277,69 @@ fchdir (int fd) return res; } @@ -975,10 +975,10 @@ index 250871d..4a47bb3 100644 /* Cover functions to the path conversion routines. diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc -index 9871bb5..7c1cb86 100644 +index b7e09c3..39bbac6 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc -@@ -264,6 +264,27 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -261,6 +261,27 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, pid_t cygpid; int res = -1; @@ -1006,7 +1006,7 @@ index 9871bb5..7c1cb86 100644 /* Check if we have been called from exec{lv}p or spawn{lv}p and mask mode to keep only the spawn mode. */ bool p_type_exec = !!(mode & _P_PATH_TYPE_EXEC); -@@ -373,12 +394,26 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -370,12 +391,26 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, moreinfo->argc = newargv.argc; moreinfo->argv = newargv; } @@ -1038,7 +1038,7 @@ index 9871bb5..7c1cb86 100644 } -@@ -514,7 +549,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -511,7 +546,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, moreinfo->envp = build_env (envp, envblock, moreinfo->envc, real_path.iscygexec (), switch_user ? ::cygheap->user.primary_token () @@ -1049,10 +1049,10 @@ index 9871bb5..7c1cb86 100644 { set_errno (E2BIG); diff --git a/winsup/cygwin/winf.h b/winsup/cygwin/winf.h -index 1d4fdc0..ccf1e71 100644 +index e3a65f8..1aeec8d 100644 --- a/winsup/cygwin/winf.h +++ b/winsup/cygwin/winf.h -@@ -53,6 +53,10 @@ class av +@@ -51,6 +51,10 @@ class av calloced = 1; } } @@ -1064,5 +1064,5 @@ index 1d4fdc0..ccf1e71 100644 { for (int i = calloced; i < argc; i++) -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch b/msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch index 52fd5f5489e..4d0197b1aab 100644 --- a/msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch +++ b/msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch @@ -1,7 +1,7 @@ -From 8cc0dff130047752c9cbc42657d6ec23af4412f5 Mon Sep 17 00:00:00 2001 +From cbcf242546f30e98e894f76737330d1fba9ad82c Mon Sep 17 00:00:00 2001 From: Alexpux Date: Thu, 12 Mar 2015 13:58:27 +0300 -Subject: [PATCH 04/16] Add functionality for changing OS name via MSYSTEM +Subject: [PATCH 04/23] Add functionality for changing OS name via MSYSTEM environment variables. --- @@ -12,10 +12,10 @@ Subject: [PATCH 04/16] Add functionality for changing OS name via MSYSTEM 4 files changed, 41 insertions(+), 7 deletions(-) diff --git a/winsup/cygserver/cygserver-config b/winsup/cygserver/cygserver-config -index abe943c..950077d 100755 +index 373bfd2..c902857 100755 --- a/winsup/cygserver/cygserver-config +++ b/winsup/cygserver/cygserver-config -@@ -88,7 +88,7 @@ done +@@ -86,7 +86,7 @@ done # Check if running on NT _sys="`uname`" @@ -24,7 +24,7 @@ index abe943c..950077d 100755 # Check for running cygserver processes first. if ps -ef | grep -v grep | grep -q ${service_name} -@@ -180,7 +180,7 @@ then +@@ -178,7 +178,7 @@ then echo "Do you want to install cygserver as service?" if request "(Say \"no\" if it's already installed as service)" then @@ -34,10 +34,10 @@ index abe943c..950077d 100755 echo echo "Installation of cygserver as service failed. Please check the" diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 3629d48..2bb289b 100644 +index 922e29c..5e5b08c 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc -@@ -205,7 +205,11 @@ parse_options (const char *inbuf) +@@ -202,7 +202,11 @@ parse_options (const char *inbuf) if (export_settings) { debug_printf ("%s", newbuf + 1); @@ -49,7 +49,7 @@ index 3629d48..2bb289b 100644 } return; } -@@ -650,7 +654,7 @@ _addenv (const char *name, const char *value, int overwrite) +@@ -647,7 +651,7 @@ _addenv (const char *name, const char *value, int overwrite) win_env *spenv; if ((spenv = getwinenv (envhere))) spenv->add_cache (value); @@ -58,7 +58,7 @@ index 3629d48..2bb289b 100644 parse_options (value); return 0; -@@ -734,6 +738,9 @@ static struct renv { +@@ -731,6 +735,9 @@ static struct renv { } renv_arr[] = { { NL("COMMONPROGRAMFILES=") }, // 0 { NL("COMSPEC=") }, @@ -68,7 +68,7 @@ index 3629d48..2bb289b 100644 { NL("PATH=") }, // 2 { NL("PROGRAMFILES=") }, { NL("SYSTEMDRIVE=") }, // 4 -@@ -745,10 +752,21 @@ static struct renv { +@@ -742,10 +749,21 @@ static struct renv { #define RENV_SIZE (sizeof (renv_arr) / sizeof (renv_arr[0])) /* Set of first characters of the above list of variables. */ @@ -92,7 +92,7 @@ index 3629d48..2bb289b 100644 /* Turn environment variable part of a=b string into uppercase - for some environment variables only. */ -@@ -838,8 +856,13 @@ environ_init (char **envp, int envc) +@@ -835,8 +853,13 @@ environ_init (char **envp, int envc) ucenv (newp, eq); /* uppercase env vars which need it */ if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0) sawTERM = 1; @@ -106,7 +106,7 @@ index 3629d48..2bb289b 100644 if (*eq) posify_maybe (envp + i, *++eq ? eq : --eq, tmpbuf); debug_printf ("%p: %s", envp[i], envp[i]); -@@ -856,7 +879,11 @@ environ_init (char **envp, int envc) +@@ -853,7 +876,11 @@ environ_init (char **envp, int envc) update_envptrs (); if (envp_passed_in) { @@ -118,7 +118,7 @@ index 3629d48..2bb289b 100644 if (p) parse_options (p); } -@@ -923,12 +950,13 @@ struct spenv +@@ -920,12 +947,13 @@ struct spenv static NO_COPY spenv spenvs[] = { #ifdef DEBUGGING @@ -134,10 +134,10 @@ index 3629d48..2bb289b 100644 {NL ("SYSTEMROOT="), true, true, &cygheap_user::env_systemroot}, {NL ("USERDOMAIN="), false, false, &cygheap_user::env_domain}, diff --git a/winsup/cygwin/include/sys/utsname.h b/winsup/cygwin/include/sys/utsname.h -index 23ca5ab..de7a502 100644 +index e9dd019..670cd2e 100644 --- a/winsup/cygwin/include/sys/utsname.h +++ b/winsup/cygwin/include/sys/utsname.h -@@ -17,7 +17,7 @@ extern "C" { +@@ -15,7 +15,7 @@ extern "C" { struct utsname { @@ -147,10 +147,10 @@ index 23ca5ab..de7a502 100644 char release[20]; char version[20]; diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc -index cd19cd4..e6141c2 100644 +index 479cc44..3dabbaf 100644 --- a/winsup/cygwin/uname.cc +++ b/winsup/cygwin/uname.cc -@@ -29,7 +29,13 @@ uname (struct utsname *name) +@@ -26,7 +26,13 @@ uname (struct utsname *name) char *snp = strstr (cygwin_version.dll_build_date, "SNP"); memset (name, 0, sizeof (*name)); @@ -165,5 +165,5 @@ index cd19cd4..e6141c2 100644 /* Add a hint to the sysname, that we're running under WOW64. This might give an early clue if somebody encounters problems. */ -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-Do-no.patch b/msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-Do-no.patch index 54f73f42be7..f3b020174c2 100644 --- a/msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-Do-no.patch +++ b/msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-Do-no.patch @@ -1,7 +1,7 @@ -From b476a641db1795c7299c5fd1694aa29d59b839d9 Mon Sep 17 00:00:00 2001 +From 5934a37b736584683a90fd74cd9e055056766eb4 Mon Sep 17 00:00:00 2001 From: Alexpux Date: Thu, 12 Mar 2015 14:09:29 +0300 -Subject: [PATCH 05/16] - Move root to /usr. - Change sorting mount points. - +Subject: [PATCH 05/23] - Move root to /usr. - Change sorting mount points. - Do not show warnings for DOS paths. - By default mount without ACLs. - Can read /etc/fstab with short mount point format. @@ -14,10 +14,10 @@ Subject: [PATCH 05/16] - Move root to /usr. - Change sorting mount points. - 5 files changed, 177 insertions(+), 31 deletions(-) diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc -index 615dfc1..441fe91 100644 +index 11f868f..9092913 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc -@@ -181,14 +181,22 @@ init_cygheap::init_installation_root () +@@ -178,14 +178,22 @@ init_cygheap::init_installation_root () /* Strip off last path component ("\\cygwin1.dll") */ PWCHAR w = wcsrchr (installation_root, L'\\'); @@ -41,7 +41,7 @@ index 615dfc1..441fe91 100644 /* Copy result into installation_dir before stripping off "bin" dir and revert to Win32 path. This path is added to the Windows environment -@@ -211,6 +219,7 @@ init_cygheap::init_installation_root () +@@ -208,6 +216,7 @@ init_cygheap::init_installation_root () if (w > p) *w = L'\0'; @@ -49,7 +49,7 @@ index 615dfc1..441fe91 100644 for (int i = 1; i >= 0; --i) { reg_key r (i, KEY_WRITE, _WIDE (CYGWIN_INFO_INSTALLATIONS_NAME), -@@ -219,6 +228,7 @@ init_cygheap::init_installation_root () +@@ -216,6 +225,7 @@ init_cygheap::init_installation_root () installation_root))) break; } @@ -58,10 +58,10 @@ index 615dfc1..441fe91 100644 void __stdcall diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc -index 7dfe74d..bbbd359 100644 +index 7427756..bb3ee21 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc -@@ -69,7 +69,7 @@ int NO_COPY dynamically_loaded; +@@ -66,7 +66,7 @@ int NO_COPY dynamically_loaded; /* Some CYGWIN environment variable variables. */ bool allow_glob = true; bool detect_bloda; @@ -71,10 +71,10 @@ index 7dfe74d..bbbd359 100644 bool pipe_byte; bool reset_com; diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc -index fcb31aa..73d1058 100644 +index 2621680..3343804 100644 --- a/winsup/cygwin/mount.cc +++ b/winsup/cygwin/mount.cc -@@ -42,7 +42,6 @@ details. */ +@@ -39,7 +39,6 @@ details. */ (path_prefix_p (proc, (path), proc_len, false)) bool NO_COPY mount_info::got_usr_bin; @@ -82,7 +82,7 @@ index fcb31aa..73d1058 100644 int NO_COPY mount_info::root_idx = -1; /* is_unc_share: Return non-zero if PATH begins with //server/share -@@ -334,7 +333,6 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol) +@@ -331,7 +330,6 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol) #define MINIMAL_WIN_NTFS_FLAGS (FILE_CASE_SENSITIVE_SEARCH \ | FILE_CASE_PRESERVED_NAMES \ | FILE_UNICODE_ON_DISK \ @@ -90,7 +90,7 @@ index fcb31aa..73d1058 100644 | FILE_FILE_COMPRESSION \ | FILE_VOLUME_QUOTAS \ | FILE_SUPPORTS_SPARSE_FILES \ -@@ -483,13 +481,13 @@ mount_info::create_root_entry (const PWCHAR root) +@@ -480,13 +478,13 @@ mount_info::create_root_entry (const PWCHAR root) sys_wcstombs (native_root, PATH_MAX, root); assert (*native_root != '\0'); if (add_item (native_root, "/", @@ -106,7 +106,7 @@ index fcb31aa..73d1058 100644 strcpy (cygdrive, CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX "/"); cygdrive_len = strlen (cygdrive); } -@@ -509,25 +507,17 @@ mount_info::init (bool user_init) +@@ -506,25 +504,17 @@ mount_info::init (bool user_init) pathend = wcpcpy (pathend, L"\\etc\\fstab"); from_fstab (user_init, path, pathend); @@ -139,7 +139,7 @@ index fcb31aa..73d1058 100644 } static void -@@ -623,6 +613,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, +@@ -620,6 +610,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, /* See if this is a cygwin "device" */ if (win32_device_name (src_path, dst, dev)) { @@ -147,7 +147,7 @@ index fcb31aa..73d1058 100644 *flags = MOUNT_BINARY; /* FIXME: Is this a sensible default for devices? */ rc = 0; goto out_no_chroot_check; -@@ -653,6 +644,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, +@@ -650,6 +641,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, } if (isproc (src_path)) { @@ -155,7 +155,7 @@ index fcb31aa..73d1058 100644 dev = *proc_dev; dev = fhandler_proc::get_proc_fhandler (src_path); if (dev == FH_NADA) -@@ -674,6 +666,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, +@@ -671,6 +663,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, off the prefix and transform it into an MS-DOS path. */ else if (iscygdrive (src_path)) { @@ -163,7 +163,7 @@ index fcb31aa..73d1058 100644 int n = mount_table->cygdrive_len - 1; int unit; -@@ -685,11 +678,15 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, +@@ -682,11 +675,15 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, } else if (cygdrive_win32_path (src_path, dst, unit)) { @@ -179,7 +179,7 @@ index fcb31aa..73d1058 100644 } int chroot_pathlen; -@@ -700,7 +697,9 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, +@@ -697,7 +694,9 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, const char *path; int len; @@ -190,7 +190,7 @@ index fcb31aa..73d1058 100644 if (!cygheap->root.exists () || (mi->posix_pathlen == 1 && mi->posix_path[0] == '/')) { -@@ -931,7 +930,8 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path, +@@ -928,7 +927,8 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path, int pathbuflen = tail - pathbuf; for (int i = 0; i < nmounts; ++i) { @@ -200,7 +200,7 @@ index fcb31aa..73d1058 100644 if (!path_prefix_p (mi.native_path, pathbuf, mi.native_pathlen, mi.flags & MOUNT_NOPOSIX)) continue; -@@ -1159,8 +1159,17 @@ mount_info::from_fstab_line (char *line, bool user) +@@ -1156,8 +1156,17 @@ mount_info::from_fstab_line (char *line, bool user) if (!*c) return true; cend = find_ws (c); @@ -219,7 +219,7 @@ index fcb31aa..73d1058 100644 /* Third field: FS type. */ c = skip_ws (cend + 1); if (!*c) -@@ -1389,16 +1398,145 @@ sort_by_native_name (const void *a, const void *b) +@@ -1386,16 +1395,145 @@ sort_by_native_name (const void *a, const void *b) return res; } @@ -366,7 +366,7 @@ index fcb31aa..73d1058 100644 } /* Add an entry to the mount table. -@@ -1489,12 +1627,9 @@ mount_info::add_item (const char *native, const char *posix, +@@ -1486,12 +1624,9 @@ mount_info::add_item (const char *native, const char *posix, if (i == nmounts) nmounts++; @@ -381,10 +381,10 @@ index fcb31aa..73d1058 100644 root_idx = i; diff --git a/winsup/cygwin/mount.h b/winsup/cygwin/mount.h -index 7219461..32befc9 100644 +index d37b673..ee505c8 100644 --- a/winsup/cygwin/mount.h +++ b/winsup/cygwin/mount.h -@@ -176,7 +176,6 @@ class mount_info +@@ -173,7 +173,6 @@ class mount_info mount_item mount[MAX_MOUNTS]; static bool got_usr_bin; @@ -392,7 +392,7 @@ index 7219461..32befc9 100644 static int root_idx; /* cygdrive_prefix is used as the root of the path automatically -@@ -188,6 +187,8 @@ class mount_info +@@ -185,6 +184,8 @@ class mount_info private: int posix_sorted[MAX_MOUNTS]; int native_sorted[MAX_MOUNTS]; @@ -402,10 +402,10 @@ index 7219461..32befc9 100644 public: void init (bool); diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc -index d966dd1..96f5ac9 100644 +index 323222a..e096c67 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc -@@ -2559,7 +2559,7 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap) +@@ -2548,7 +2548,7 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap) dom, name, sid.string ((char *) sidstr), home ?: "/home/", home ? L"" : name, @@ -415,5 +415,5 @@ index d966dd1..96f5ac9 100644 free (gecos); if (home) -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0006-Do-not-create-cygwin-symlinks.-Instead-use-deep-copy.patch b/msys2-runtime/0006-Do-not-create-cygwin-symlinks.-Instead-use-deep-copy.patch index 853d9f0ec87..34d2db7b3a7 100644 --- a/msys2-runtime/0006-Do-not-create-cygwin-symlinks.-Instead-use-deep-copy.patch +++ b/msys2-runtime/0006-Do-not-create-cygwin-symlinks.-Instead-use-deep-copy.patch @@ -1,7 +1,7 @@ -From e0308e0fb3892d4f22fb89d4e57b6c029066c6e9 Mon Sep 17 00:00:00 2001 +From efe885297f757d11bfb0d078514f7b359076cb1b Mon Sep 17 00:00:00 2001 From: Alexpux Date: Thu, 12 Mar 2015 14:09:29 +0300 -Subject: [PATCH 06/16] Do not create cygwin symlinks. Instead use deep copy of +Subject: [PATCH 06/23] Do not create cygwin symlinks. Instead use deep copy of files/folders. --- @@ -9,10 +9,10 @@ Subject: [PATCH 06/16] Do not create cygwin symlinks. Instead use deep copy of 1 file changed, 147 insertions(+) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index 4a47bb3..66317bf 100644 +index 9e152a5..10a8ebd 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -1540,6 +1540,86 @@ conv_path_list (const char *src, char *dst, size_t size, +@@ -1537,6 +1537,86 @@ conv_path_list (const char *src, char *dst, size_t size, /********************** Symbolic Link Support **************************/ @@ -99,7 +99,7 @@ index 4a47bb3..66317bf 100644 /* Create a symlink from FROMPATH to TOPATH. */ extern "C" int -@@ -1970,6 +2050,73 @@ symlink_worker (const char *oldpath, const char *newpath, bool isdevice) +@@ -1967,6 +2047,73 @@ symlink_worker (const char *oldpath, const char *newpath, bool isdevice) } else { @@ -174,5 +174,5 @@ index 4a47bb3..66317bf 100644 buf = tp.t_get (); cp = stpcpy (buf, SYMLINK_COOKIE); -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch b/msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch index 37d39fcfc16..419fbbf0e91 100644 --- a/msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch +++ b/msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch @@ -1,7 +1,7 @@ -From 41ef30b6e8f68e1e062351b2cf05c573e4bc5ab3 Mon Sep 17 00:00:00 2001 +From 3c7eada27d6d8b32f4fd6c200c3ae7e09794daca Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 24 Mar 2015 14:09:29 +0300 -Subject: [PATCH 07/16] Automatically rewrite TERM=msys to TERM=cygwin +Subject: [PATCH 07/23] Automatically rewrite TERM=msys to TERM=cygwin With MSys1, it was necessary to set the TERM variable to "msys". To allow for a smooth transition from MSys1 to MSys2, let's simply handle @@ -14,10 +14,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 2bb289b..7b15810 100644 +index 5e5b08c..7a1a0ed 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc -@@ -855,7 +855,16 @@ environ_init (char **envp, int envc) +@@ -852,7 +852,16 @@ environ_init (char **envp, int envc) char *eq = strchrnul (newp, '='); ucenv (newp, eq); /* uppercase env vars which need it */ if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0) @@ -36,5 +36,5 @@ index 2bb289b..7b15810 100644 else if (*newp == 'M' && strncmp (newp, "MSYS=", 5) == 0) parse_options (newp + 5); -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0008-Do-not-convert-environment-for-strace.patch b/msys2-runtime/0008-Do-not-convert-environment-for-strace.patch index 0fb6bec8456..4b94391b671 100644 --- a/msys2-runtime/0008-Do-not-convert-environment-for-strace.patch +++ b/msys2-runtime/0008-Do-not-convert-environment-for-strace.patch @@ -1,7 +1,7 @@ -From e02bbb74c3d1fbe49427c607f8e622d25f2ce669 Mon Sep 17 00:00:00 2001 +From a4b26c51083bf93b73e6a0af080aff01891b9bee Mon Sep 17 00:00:00 2001 From: Alexpux Date: Fri, 6 Mar 2015 14:09:29 +0300 -Subject: [PATCH 08/16] Do not convert environment for strace +Subject: [PATCH 08/23] Do not convert environment for strace strace is a Windows program so MSYS2 will convert all arguments and environment vars and that makes @@ -11,10 +11,10 @@ debugging msys2 software with strace very tricky. 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc -index 7c1cb86..09e8f3a 100644 +index 39bbac6..85315cb 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc -@@ -546,11 +546,13 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -543,11 +543,13 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, bool switch_user = ::cygheap->user.issetuid () && (::cygheap->user.saved_uid != ::cygheap->user.real_uid); @@ -30,5 +30,5 @@ index 7c1cb86..09e8f3a 100644 { set_errno (E2BIG); -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0009-convert-be-more-careful-to-stay-within-the-buffer.patch b/msys2-runtime/0009-convert-be-more-careful-to-stay-within-the-buffer.patch index b0b7a3070bc..fa95a22ad03 100644 --- a/msys2-runtime/0009-convert-be-more-careful-to-stay-within-the-buffer.patch +++ b/msys2-runtime/0009-convert-be-more-careful-to-stay-within-the-buffer.patch @@ -1,7 +1,7 @@ -From 2c55991dd8dbfedb84053c9b111c3d77b7c91f30 Mon Sep 17 00:00:00 2001 +From eecf61b31568f8bff088b3fc6c83a59f8b59473a Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 2 Mar 2015 14:09:29 +0300 -Subject: [PATCH 09/16] convert(): be more careful to stay within the buffer +Subject: [PATCH 09/23] convert(): be more careful to stay within the buffer We really must not run outside of the buffer. And the buffer needs to be NUL-terminated, too... @@ -35,5 +35,5 @@ index 74ebd2e..8a7b7e2 100644 *dst += 1; } -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0010-convert-check-safely-whether-we-could-allocate-the-b.patch b/msys2-runtime/0010-convert-check-safely-whether-we-could-allocate-the-b.patch index b2859de5dfd..e4cd5e57a87 100644 --- a/msys2-runtime/0010-convert-check-safely-whether-we-could-allocate-the-b.patch +++ b/msys2-runtime/0010-convert-check-safely-whether-we-could-allocate-the-b.patch @@ -1,7 +1,7 @@ -From e49f87b4fe76259ab0416e0fc169af931c4b8786 Mon Sep 17 00:00:00 2001 +From e99ee7e39d49c60ffa7b1d8476417c5fe77fbff2 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 2 Mar 2015 14:09:29 +0300 -Subject: [PATCH 10/16] convert(): check safely whether we could allocate the +Subject: [PATCH 10/23] convert(): check safely whether we could allocate the buffer Signed-off-by: Johannes Schindelin @@ -10,10 +10,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index 66317bf..0c7f55b 100644 +index 10a8ebd..cd4ae90 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -3468,12 +3468,12 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, +@@ -3455,12 +3455,12 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, size_t stack_len = arglen + MAX_PATH; char * stack_path = (char *)malloc (stack_len); @@ -29,5 +29,5 @@ index 66317bf..0c7f55b 100644 debug_printf ("convert()'ed: %s (length %d)\n.....->: %s", arg, arglen, stack_path); // Don't allocate memory if no conversion happened. -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0011-convert-use-the-elegant-realloc-call.patch b/msys2-runtime/0011-convert-use-the-elegant-realloc-call.patch index b66edadeb6a..90c4e8c1071 100644 --- a/msys2-runtime/0011-convert-use-the-elegant-realloc-call.patch +++ b/msys2-runtime/0011-convert-use-the-elegant-realloc-call.patch @@ -1,7 +1,7 @@ -From eb35c15ea2e9b49ed72d2f6eb4806b94f76d7f42 Mon Sep 17 00:00:00 2001 +From bf243006fa48e195271cbdc7a71b3d342e56fc4c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 2 Mar 2015 14:09:29 +0300 -Subject: [PATCH 11/16] convert(): use the elegant realloc() call +Subject: [PATCH 11/23] convert(): use the elegant realloc() call Instead of doing a poor man's realloc(), we can call the real thing ;-) @@ -11,10 +11,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index 0c7f55b..e71b189 100644 +index cd4ae90..4fe89f1 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -3481,8 +3481,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, +@@ -3468,8 +3468,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, { return ((char *)arg); } @@ -25,5 +25,5 @@ index 0c7f55b..e71b189 100644 char* semisemi = strstr(arg_result, ";;"); while (semisemi) -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0012-convert-plug-potential-memory-leak.patch b/msys2-runtime/0012-convert-plug-potential-memory-leak.patch index 22c08cc9a00..b5be992780a 100644 --- a/msys2-runtime/0012-convert-plug-potential-memory-leak.patch +++ b/msys2-runtime/0012-convert-plug-potential-memory-leak.patch @@ -1,7 +1,7 @@ -From 055c14d9d02b1a7e097c9d71e17a076ca7efe575 Mon Sep 17 00:00:00 2001 +From e31764af851bc40a2fcf18439a7aa1098bb7ad0c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 2 Mar 2015 14:09:29 +0300 -Subject: [PATCH 12/16] convert(): plug potential memory leak +Subject: [PATCH 12/23] convert(): plug potential memory leak When the result of conversion is identical to the original argument, we should make sure that the temporary buffer was released. @@ -12,10 +12,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 4 insertions(+) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index e71b189..ac17bfa 100644 +index 4fe89f1..2f7b258 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -3479,6 +3479,10 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, +@@ -3466,6 +3466,10 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, // Don't allocate memory if no conversion happened. if (!strcmp (arg, stack_path)) { @@ -27,5 +27,5 @@ index e71b189..ac17bfa 100644 } arg_result = (char *)realloc (stack_path, strlen (stack_path)+1); -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0013-convert-warn-when-we-cut-off-a-path.patch b/msys2-runtime/0013-convert-warn-when-we-cut-off-a-path.patch index 569233363a6..a9950def04b 100644 --- a/msys2-runtime/0013-convert-warn-when-we-cut-off-a-path.patch +++ b/msys2-runtime/0013-convert-warn-when-we-cut-off-a-path.patch @@ -1,7 +1,7 @@ -From 1cb912e271982e82ab7b4baf3902ede49d3cd90e Mon Sep 17 00:00:00 2001 +From 331d466a39cf3fc9329ae879cc48e0396b0d90b4 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 2 Mar 2015 14:09:29 +0300 -Subject: [PATCH 13/16] convert(): warn when we cut off a path +Subject: [PATCH 13/23] convert(): warn when we cut off a path Signed-off-by: Johannes Schindelin --- @@ -42,5 +42,5 @@ index 8a7b7e2..34c4d26 100644 **dst = ';'; *dst += 1; -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch b/msys2-runtime/0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch index 387079e77f0..d0f6740cc1a 100644 --- a/msys2-runtime/0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch +++ b/msys2-runtime/0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch @@ -1,7 +1,7 @@ -From 139158eb7e5e796e1acc598ebe05f88266665355 Mon Sep 17 00:00:00 2001 +From 5623dcf7cac5f7d2104b725ffb48837d90b8d1ad Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 2 Mar 2015 14:09:29 +0300 -Subject: [PATCH 14/16] arg_heuristic(): be better prepared to handle path +Subject: [PATCH 14/23] arg_heuristic(): be better prepared to handle path lists If we were to handle only single paths, the buffer really would only @@ -25,10 +25,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index ac17bfa..4b1d6ee 100644 +index 2f7b258..94cbf4f 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -3466,7 +3466,9 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, +@@ -3453,7 +3453,9 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, exclusions += strlen (exclusions) + 1; } @@ -40,5 +40,5 @@ index ac17bfa..4b1d6ee 100644 if (!stack_path) { -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch b/msys2-runtime/0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch index 0109d14ce69..24c3300096a 100644 --- a/msys2-runtime/0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch +++ b/msys2-runtime/0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch @@ -1,7 +1,7 @@ -From f171990944091453c3fffadc7f0e0a4fe5891182 Mon Sep 17 00:00:00 2001 +From 34266ca5b3f10abacc99763a56edb5bec6b126f1 Mon Sep 17 00:00:00 2001 From: Alexpux Date: Fri, 20 Mar 2015 14:09:29 +0300 -Subject: [PATCH 15/16] Fix converting argument looks like +Subject: [PATCH 15/23] Fix converting argument looks like -DVAR=str1;c:/path1;str2;c:/path2 --- @@ -23,5 +23,5 @@ index 34c4d26..c347bd4 100644 } -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0016-Special-case-for-converting-root-directory-to-have-t.patch b/msys2-runtime/0016-Special-case-for-converting-root-directory-to-have-t.patch index 671e147cff1..a359a37879f 100644 --- a/msys2-runtime/0016-Special-case-for-converting-root-directory-to-have-t.patch +++ b/msys2-runtime/0016-Special-case-for-converting-root-directory-to-have-t.patch @@ -1,7 +1,7 @@ -From 24726a5aa22760cd8d4e1850fed5106064d52b5c Mon Sep 17 00:00:00 2001 +From a2bc37e78163f4318a83dc8ef4fc283b4fa70ce5 Mon Sep 17 00:00:00 2001 From: Alexpux Date: Tue, 1 Mar 2016 13:19:18 +0300 -Subject: [PATCH 16/16] Special case for converting root directory to have +Subject: [PATCH 16/23] Special case for converting root directory to have training slash --- @@ -9,10 +9,10 @@ Subject: [PATCH 16/16] Special case for converting root directory to have 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index 4b1d6ee..d841c23 100644 +index 94cbf4f..e426042 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -733,6 +733,12 @@ path_conv::check (const char *src, unsigned opt, +@@ -730,6 +730,12 @@ path_conv::check (const char *src, unsigned opt, need_directory = 1; *--tail = '\0'; } @@ -25,7 +25,7 @@ index 4b1d6ee..d841c23 100644 path_end = tail; /* Scan path_copy from right to left looking either for a symlink -@@ -1220,16 +1226,17 @@ path_conv::check (const char *src, unsigned opt, +@@ -1217,16 +1223,17 @@ path_conv::check (const char *src, unsigned opt, cfree (wide_path); wide_path = NULL; } @@ -53,5 +53,5 @@ index 4b1d6ee..d841c23 100644 } -- -2.8.0 +2.9.0 diff --git a/msys2-runtime/0020-dcrt0.cc-Untangle-allow_glob-from-winshell.patch b/msys2-runtime/0017-dcrt0.cc-Untangle-allow_glob-from-winshell.patch similarity index 83% rename from msys2-runtime/0020-dcrt0.cc-Untangle-allow_glob-from-winshell.patch rename to msys2-runtime/0017-dcrt0.cc-Untangle-allow_glob-from-winshell.patch index 272be93ac1b..a4068625a34 100644 --- a/msys2-runtime/0020-dcrt0.cc-Untangle-allow_glob-from-winshell.patch +++ b/msys2-runtime/0017-dcrt0.cc-Untangle-allow_glob-from-winshell.patch @@ -1,7 +1,7 @@ -From b6af22164cf18fe545b3b5d053f47f907dda2900 Mon Sep 17 00:00:00 2001 +From 1b5586f04b8ec61c41cf7005149b43d342d7f9a6 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 12:52:09 +0100 -Subject: [PATCH 1/7] dcrt0.cc: Untangle allow_glob from winshell +Subject: [PATCH 17/23] dcrt0.cc: Untangle allow_glob from winshell Otherwise if globbing is allowed and we get called from a Windows program, build_argv thinks we've been called from @@ -11,10 +11,10 @@ a Cygwin program. 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc -index 20746f1..b8b01de 100644 +index ccfce50..8dfe0be 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc -@@ -157,12 +157,12 @@ isquote (char c) +@@ -154,12 +154,12 @@ isquote (char c) /* Step over a run of characters delimited by quotes */ static /*__inline*/ char * @@ -29,7 +29,7 @@ index 20746f1..b8b01de 100644 { char *p; strcpy (cmd, cmd + 1); -@@ -172,8 +172,8 @@ quoted (char *cmd, int winshell) +@@ -169,8 +169,8 @@ quoted (char *cmd, int winshell) } const char *s = quote == '\'' ? "'" : "\\\""; @@ -40,7 +40,7 @@ index 20746f1..b8b01de 100644 while (*cmd && *++cmd) if ((p = strpbrk (cmd, s)) == NULL) { -@@ -294,7 +294,7 @@ globify (char *word, char **&argv, int &argc, int &argvlen) +@@ -291,7 +291,7 @@ globify (char *word, char **&argv, int &argc, int &argvlen) /* Build argv, argc from string passed from Windows. */ static void __stdcall @@ -49,7 +49,7 @@ index 20746f1..b8b01de 100644 { int argvlen = 0; int nesting = 0; // monitor "nesting" from insert_file -@@ -328,7 +328,7 @@ build_argv (char *cmd, char **&argv, int &argc, int winshell) +@@ -325,7 +325,7 @@ build_argv (char *cmd, char **&argv, int &argc, int winshell) a Cygwin process, or if the word starts with a '@'. In this case, the insert_file function needs an unquoted DOS filename and globbing isn't performed anyway. */ @@ -58,7 +58,7 @@ index 20746f1..b8b01de 100644 } if (issep (*cmd)) // End of argument if space break; -@@ -354,7 +354,7 @@ build_argv (char *cmd, char **&argv, int &argc, int winshell) +@@ -351,7 +351,7 @@ build_argv (char *cmd, char **&argv, int &argc, int winshell) } /* Add word to argv file after (optional) wildcard expansion. */ @@ -67,7 +67,7 @@ index 20746f1..b8b01de 100644 { debug_printf ("argv[%d] = '%s'", argc, word); argv[argc++] = word; -@@ -955,6 +955,7 @@ dll_crt0_1 (void *) +@@ -952,6 +952,7 @@ dll_crt0_1 (void *) /* Scan the command line and build argv. Expand wildcards if not called from another cygwin process. */ build_argv (line, __argv, __argc, @@ -76,5 +76,5 @@ index 20746f1..b8b01de 100644 /* Convert argv[0] to posix rules if it's currently blatantly -- -2.8.1 +2.9.0 diff --git a/msys2-runtime/0021-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch b/msys2-runtime/0018-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch similarity index 89% rename from msys2-runtime/0021-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch rename to msys2-runtime/0018-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch index 380f18b4c63..28087d4a066 100644 --- a/msys2-runtime/0021-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch +++ b/msys2-runtime/0018-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch @@ -1,7 +1,7 @@ -From 56375c2d628499059f40a4ac6cd390818a3357d7 Mon Sep 17 00:00:00 2001 +From 7fdaf313a2eb71a908020f72c5f918fda9665a05 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 24 Aug 2015 00:48:06 +0100 -Subject: [PATCH 2/7] dcrt0.cc (globify): Don't quote literal strings +Subject: [PATCH 18/23] dcrt0.cc (globify): Don't quote literal strings differently when dos_spec Reverts 25ba8f306f3099caf8397859019e936b90510e8d. I can't figure out what @@ -30,10 +30,10 @@ the expense of sensible forward-slash-containing input. 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc -index b8b01de..7cd1bd6 100644 +index 8dfe0be..25bb4e1 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc -@@ -239,10 +239,20 @@ globify (char *word, char **&argv, int &argc, int &argvlen) +@@ -236,10 +236,20 @@ globify (char *word, char **&argv, int &argc, int &argvlen) char quote = *s; while (*++s && *s != quote) { @@ -56,5 +56,5 @@ index b8b01de..7cd1bd6 100644 size_t cnt = isascii (*s) ? 1 : mbtowc (NULL, s, MB_CUR_MAX); if (cnt <= 1 || cnt == (size_t)-1) -- -2.8.1 +2.9.0 diff --git a/msys2-runtime/0022-strace.cc-Don-t-set-MSYS-noglob.patch b/msys2-runtime/0019-strace.cc-Don-t-set-MSYS-noglob.patch similarity index 90% rename from msys2-runtime/0022-strace.cc-Don-t-set-MSYS-noglob.patch rename to msys2-runtime/0019-strace.cc-Don-t-set-MSYS-noglob.patch index ffd7c2183c6..82d9e80dddc 100644 --- a/msys2-runtime/0022-strace.cc-Don-t-set-MSYS-noglob.patch +++ b/msys2-runtime/0019-strace.cc-Don-t-set-MSYS-noglob.patch @@ -1,7 +1,7 @@ -From 912b157fb4e93ff273878d0c7f51527458d187da Mon Sep 17 00:00:00 2001 +From f102d7c56f636ba7528054f7c21fea599c2fee8e Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 23 Aug 2015 20:47:30 +0100 -Subject: [PATCH 3/7] strace.cc: Don't set MSYS=noglob +Subject: [PATCH 19/23] strace.cc: Don't set MSYS=noglob Commit message for this code was: @@ -26,10 +26,10 @@ See quoted () comment: 1 file changed, 19 insertions(+) diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc -index 6d9d727..dc3ef55 100644 +index 5c7f030..49fb4fe 100644 --- a/winsup/utils/strace.cc +++ b/winsup/utils/strace.cc -@@ -355,6 +355,24 @@ create_child (char **argv) +@@ -352,6 +352,24 @@ create_child (char **argv) make_command_line (one_line, argv); SetConsoleCtrlHandler (NULL, 0); @@ -54,7 +54,7 @@ index 6d9d727..dc3ef55 100644 const char *cygwin_env = getenv ("MSYS"); const char *space; if (cygwin_env) -@@ -364,6 +382,7 @@ create_child (char **argv) +@@ -361,6 +379,7 @@ create_child (char **argv) char *newenv = (char *) malloc (sizeof ("MSYS=noglob") + strlen (space) + strlen (cygwin_env)); sprintf (newenv, "MSYS=noglob%s%s", space, cygwin_env); _putenv (newenv); @@ -63,5 +63,5 @@ index 6d9d727..dc3ef55 100644 NULL, /* Security */ NULL, /* thread */ -- -2.8.1 +2.9.0 diff --git a/msys2-runtime/0023-Add-debugging-for-build_argv.patch b/msys2-runtime/0020-Add-debugging-for-build_argv.patch similarity index 70% rename from msys2-runtime/0023-Add-debugging-for-build_argv.patch rename to msys2-runtime/0020-Add-debugging-for-build_argv.patch index ad802678019..c8e5bb48e5f 100644 --- a/msys2-runtime/0023-Add-debugging-for-build_argv.patch +++ b/msys2-runtime/0020-Add-debugging-for-build_argv.patch @@ -1,17 +1,17 @@ -From 9245b876168b436422b79c6cdea633cca73878ad Mon Sep 17 00:00:00 2001 +From a3e09f4cb2b95575e9ff5f94d5ee6762c0b4dbc4 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 12:18:52 +0100 -Subject: [PATCH 4/7] Add debugging for build_argv +Subject: [PATCH 20/23] Add debugging for build_argv --- winsup/cygwin/dcrt0.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc -index 7cd1bd6..3ca61b5 100644 +index 25bb4e1..8c5a825 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc -@@ -313,6 +313,8 @@ build_argv (char *cmd, char **&argv, int &argc, int winshell, int glob) +@@ -310,6 +310,8 @@ build_argv (char *cmd, char **&argv, int &argc, int winshell, int glob) argvlen = 0; argv = NULL; @@ -21,5 +21,5 @@ index 7cd1bd6..3ca61b5 100644 while (*cmd) { -- -2.8.1 +2.9.0 diff --git a/msys2-runtime/0024-Add-debugging-for-strace-make_command_line.patch b/msys2-runtime/0021-Add-debugging-for-strace-make_command_line.patch similarity index 70% rename from msys2-runtime/0024-Add-debugging-for-strace-make_command_line.patch rename to msys2-runtime/0021-Add-debugging-for-strace-make_command_line.patch index f3dd76d6b00..6a9c7dab95f 100644 --- a/msys2-runtime/0024-Add-debugging-for-strace-make_command_line.patch +++ b/msys2-runtime/0021-Add-debugging-for-strace-make_command_line.patch @@ -1,17 +1,17 @@ -From c2c8d2e21e0b1d1beb8a5489325709013a44d748 Mon Sep 17 00:00:00 2001 +From a90dcb58fda24d0d30a75c1f9dade1b1979d7a83 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 09:52:47 +0100 -Subject: [PATCH 5/7] Add debugging for strace make_command_line +Subject: [PATCH 21/23] Add debugging for strace make_command_line --- winsup/utils/strace.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc -index dc3ef55..ead4c04 100644 +index 49fb4fe..13b9c9a 100644 --- a/winsup/utils/strace.cc +++ b/winsup/utils/strace.cc -@@ -353,6 +353,7 @@ create_child (char **argv) +@@ -350,6 +350,7 @@ create_child (char **argv) flags |= CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP; make_command_line (one_line, argv); @@ -20,5 +20,5 @@ index dc3ef55..ead4c04 100644 SetConsoleCtrlHandler (NULL, 0); /* Commit message for this code was: -- -2.8.1 +2.9.0 diff --git a/msys2-runtime/0025-environ.cc-New-facility-environment-variable-MSYS2_E.patch b/msys2-runtime/0022-environ.cc-New-facility-environment-variable-MSYS2_E.patch similarity index 87% rename from msys2-runtime/0025-environ.cc-New-facility-environment-variable-MSYS2_E.patch rename to msys2-runtime/0022-environ.cc-New-facility-environment-variable-MSYS2_E.patch index c70ac177f34..b1a30cd633d 100644 --- a/msys2-runtime/0025-environ.cc-New-facility-environment-variable-MSYS2_E.patch +++ b/msys2-runtime/0022-environ.cc-New-facility-environment-variable-MSYS2_E.patch @@ -1,7 +1,7 @@ -From e88b12c382dfeeeaed6628bb8af5f4a66f3eca07 Mon Sep 17 00:00:00 2001 +From 82972d89bff044df3320f8279e00be65d3330f08 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 10 Apr 2016 21:47:41 +0100 -Subject: [PATCH 6/7] environ.cc: New facility/environment variable +Subject: [PATCH 22/23] environ.cc: New facility/environment variable MSYS2_ENV_CONV_EXCL Works very much like MSYS2_ARG_CONV_EXCL. In fact it uses the same @@ -25,10 +25,10 @@ it to another absolute path, R_HOME, forming an invalid path. 5 files changed, 43 insertions(+), 15 deletions(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 7b15810..46c7195 100644 +index 7a1a0ed..cab7bfd 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc -@@ -1134,6 +1134,10 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1131,6 +1131,10 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, int tl = 0; char **pass_dstp; @@ -39,7 +39,7 @@ index 7b15810..46c7195 100644 char **pass_env = (char **) alloca (sizeof (char *) * (n + winnum + SPENVS_SIZE + 1)); /* Iterate over input list, generating a new environment list and refreshing -@@ -1142,9 +1146,18 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1139,9 +1143,18 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, { bool calc_tl = !no_envblock; #ifdef __MSYS__ @@ -61,7 +61,7 @@ index 7b15810..46c7195 100644 #endif /* Look for entries that require special attention */ for (unsigned i = 0; i < SPENVS_SIZE; i++) -@@ -1268,7 +1281,8 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1265,7 +1278,8 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, } #ifdef __MSYS__ else if (!keep_posix) { @@ -72,10 +72,10 @@ index 7b15810..46c7195 100644 p = cstrdup1(win_arg); if (win_arg != *srcp) diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc -index 54150f1..220d116 100644 +index 80fa954..d846be1 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc -@@ -530,6 +530,27 @@ slashify (const char *src, char *dst, bool trailing_slash_p) +@@ -527,6 +527,27 @@ slashify (const char *src, char *dst, bool trailing_slash_p) *dst++ = 0; } @@ -104,10 +104,10 @@ index 54150f1..220d116 100644 void * __reg1 __import_address (void *imp) diff --git a/winsup/cygwin/miscfuncs.h b/winsup/cygwin/miscfuncs.h -index 2690e44..79d3723 100644 +index a885dcf..1af41f2 100644 --- a/winsup/cygwin/miscfuncs.h +++ b/winsup/cygwin/miscfuncs.h -@@ -61,6 +61,8 @@ void backslashify (const char *, char *, bool); +@@ -58,6 +58,8 @@ void backslashify (const char *, char *, bool); void slashify (const char *, char *, bool); #define isslash(c) ((c) == '/') @@ -117,10 +117,10 @@ index 2690e44..79d3723 100644 extern inline void transform_chars (PUNICODE_STRING upath, USHORT start_idx) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index 13681f0..6f6f74d 100644 +index e426042..3850a75 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -3463,7 +3463,6 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, +@@ -3450,7 +3450,6 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, return arg_result; } @@ -129,10 +129,10 @@ index 13681f0..6f6f74d 100644 { /* Since we've got regex linked we should maybe switch to that, but diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc -index 09e8f3a..481b6d6 100644 +index 85315cb..3f0673a 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc -@@ -265,8 +265,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -262,8 +262,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, int res = -1; /* Environment variable MSYS2_ARG_CONV_EXCL contains a list @@ -142,7 +142,7 @@ index 09e8f3a..481b6d6 100644 A value of * means don't convert any arguments. */ char* msys2_arg_conv_excl_env = getenv("MSYS2_ARG_CONV_EXCL"); char* msys2_arg_conv_excl = NULL; -@@ -275,14 +274,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -272,14 +271,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, { msys2_arg_conv_excl = (char*)alloca (strlen(msys2_arg_conv_excl_env)+1); strcpy (msys2_arg_conv_excl, msys2_arg_conv_excl_env); @@ -159,5 +159,5 @@ index 09e8f3a..481b6d6 100644 /* Check if we have been called from exec{lv}p or spawn{lv}p and mask -- -2.8.1 +2.9.0 diff --git a/msys2-runtime/0026-path.cc-Ignore-zero-length-exclusions.patch b/msys2-runtime/0023-path.cc-Ignore-zero-length-exclusions.patch similarity index 76% rename from msys2-runtime/0026-path.cc-Ignore-zero-length-exclusions.patch rename to msys2-runtime/0023-path.cc-Ignore-zero-length-exclusions.patch index 06aeea84c20..e4ab691b4f4 100644 --- a/msys2-runtime/0026-path.cc-Ignore-zero-length-exclusions.patch +++ b/msys2-runtime/0023-path.cc-Ignore-zero-length-exclusions.patch @@ -1,17 +1,17 @@ -From 45b3b59cf3f3960267d31e8d446ed68fa13dd0a8 Mon Sep 17 00:00:00 2001 +From 08904f622bae5918d52a024a774039a124b9a50d Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 15 May 2016 09:31:51 +0100 -Subject: [PATCH 7/7] path.cc: Ignore zero-length exclusions +Subject: [PATCH 23/23] path.cc: Ignore zero-length exclusions --- winsup/cygwin/path.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index 6f6f74d..fb41080 100644 +index 3850a75..e266a94 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -3467,7 +3467,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, +@@ -3454,7 +3454,7 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, { /* Since we've got regex linked we should maybe switch to that, but running regexes for every argument could be too slow. */ @@ -21,5 +21,5 @@ index 6f6f74d..fb41080 100644 exclusions += strlen (exclusions) + 1; } -- -2.8.1 +2.9.0 diff --git a/msys2-runtime/PKGBUILD b/msys2-runtime/PKGBUILD index f09c98c58f0..d2fe3a9615e 100644 --- a/msys2-runtime/PKGBUILD +++ b/msys2-runtime/PKGBUILD @@ -3,7 +3,7 @@ pkgbase=msys2-runtime pkgname=('msys2-runtime' 'msys2-runtime-devel') -pkgver=2.5.1 +pkgver=2.5.2 pkgrel=1 pkgdesc="Cygwin POSIX emulation engine" arch=('i686' 'x86_64') @@ -39,37 +39,37 @@ source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-$ 0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch 0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch 0016-Special-case-for-converting-root-directory-to-have-t.patch - 0020-dcrt0.cc-Untangle-allow_glob-from-winshell.patch - 0021-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch - 0022-strace.cc-Don-t-set-MSYS-noglob.patch - 0023-Add-debugging-for-build_argv.patch - 0024-Add-debugging-for-strace-make_command_line.patch - 0025-environ.cc-New-facility-environment-variable-MSYS2_E.patch - 0026-path.cc-Ignore-zero-length-exclusions.patch) + 0017-dcrt0.cc-Untangle-allow_glob-from-winshell.patch + 0018-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch + 0019-strace.cc-Don-t-set-MSYS-noglob.patch + 0020-Add-debugging-for-build_argv.patch + 0021-Add-debugging-for-strace-make_command_line.patch + 0022-environ.cc-New-facility-environment-variable-MSYS2_E.patch + 0023-path.cc-Ignore-zero-length-exclusions.patch) sha256sums=('SKIP' - '3fb7dcd1ec724d5bd35334942b859ac2289a1bf6f2fd2d59a985fdca4dd1eabf' - '2734865e097baf07779f207cd5259d6e80e8037a7942a7789333c5ec08dcbeb4' - 'a5ecfe028f71f6302bf6a02caa49c4b1a5532de8925d6fcbe2da95e08b43a4ea' - '8eaf632a7bcad41e57b7f124d2c2bfa8906db81398bf0bb45b0ff5ea70825f05' - '49e4961da10545dd62a19cf34db5e078aa728d050492fb8f0075c813390e18b0' - 'ef814a9bf5cb3b9df0fad392fa6b21397e7551fd07bd9d88694ea06d0abb49d6' - 'df647ce9e2f7b9225ba5d56bc6ac5084763ad18ce2d35dc0a57dfccea8ac64b8' - '52f2370c6a546892d49371ad4f17ac49f4892a4d05787449ea009743e8f41eb4' - '0359ba1318c09a2c90fd7ceb275716117e97baeb1b5c049ba909b6242b4b7513' - '2e4660599d27b0d03d646e1da914fa3d6a78f2c3dc2fe93de56dc54a9846da94' - '8c130927882abc172332b68f50c9f5155efc730538f302759d81eb0d3aa3a60f' - 'a375b87aa892711a13d11b4b342b4aa6b50649e944cb6070a28ce6f35957fb01' - '62936e64f825724c6a63f453f7a0db5012c45c122fd8de1c6c4bf574e9744716' - '603bbb95081729b048104ef32de05295c22fec8d962bf72c8d204e022f45c287' - 'af35ea0336da3573bbfc7cefdd37a9715e85eafa5e035fe90e4f1c8212547a40' - '46aeaa5bdd292c82fc08b6a11a561efaa16a02a915a64899fe63f9a720c34a18' - 'afd8454662eb6ea9baa816fc594c3af33f4204d364d148c243c45e556e08613e' - 'dc03861d4614c228afb000e081b46569ce7a4fe7b4082f690b00847e8063da2b' - 'b8da17a374e9fe21f2051582744fb71cdbc7eea009abeeef055ab1ed4d854c83' - '0bdf0308ddef05a3abdc3a091760f2b8e1055cc1232fd95135beb5ac6063985e' - '51894036cd0ad1f8deab4761e9876fb92e8b2ce49bceaf3bc4155c7acf2e003f' - 'acd5641aad787dbf9ac31be9d3d7d4ab32cb7b10bb071161abbe6d98df169d36' - 'ddbfcdf68e44404d161fb0cc947abf672c974ef67274f649a26de50fd798c111') + '7b24f901bddfb4b92ed2982d8608e8a9fdd1d2e523ae028115b5f5e8d710fea4' + '2683c45d3d964c55738dc65c9897fe6b8344ba20ead4102c432c46e382923625' + 'c335d965acc3d632f95ebabd68b1ccd29f09bc4de0be7b9eb5e8f51092a7512c' + 'aee9c77565bb076d8641f2bbf83020ead6dc5a5407489592718ea1bff9c17dba' + '58ca67dc53b65075679f518915854590b5c14572b7b27824251d06675fd434fe' + '0fc81a9ebb06f1b445d1feaab5cad47f8d2dc9194cc4e8a089a995b00cfdc24b' + '7b4f1f59a1c872b453234320d1d4e4d9f232530c2c97e41016fdcd294f5cc1ae' + 'd874063ea8aa51fb63f3329daa101f16b388f9efa64495375aa353bbd6a51106' + '769399c63146d0d49ffbf8e6fbd6b79cea9e82f9268cf134ce6599819821f424' + '2ca7d7269f07722a631ddea0f60146fb93c1003449f0287f73ecaa34572f3c81' + 'c441aaac174f5f1511381aac687cc70d5923ad5e78f98951c010d1afef1cc630' + 'f8d7975f56d1c1ca25492ba2c3283c225d7df4508d508f776463080f0d4a084d' + 'd3ab995ac5141f38fc228800b0ef867428775df789cd6ea242ef790ccabe6f0e' + '05e5305a4562ade558efa572176fa2632ac8a0b8c1680c904f3fcc4e900f6604' + '0995138d7311f5515fcb33524747960624cadb2f22f8059b99f3ad5b95e0917c' + '4ed24fcd8a4d0ac4961da8707a357ec7021d8c0c0638c83fa2734b764c897d28' + '43a02d7c85c55e4b9abbfb0e3ffe7512eefacd4420e42686efa5ba6705a53d7b' + 'acb7bb895dc93eb4cbec81d9026b63f35dbf954093f9507629a5a8e0274aae63' + '90d9f051cd13d1ec9c6d23adda9eed28f3219da59378d98fc9e2f0cb8de7ad48' + 'fc067fe6bb2d7d15909e41c1982fed7ebb1d2e3622acd277dbdadfc64beaa4ad' + 'fd2731afc3b6ff3d9e870e5b0a582280eeb1a1ed7bbfe944c15299112bd2eb21' + '673680ee81c15a5750c3c56bf8803cfa4f4bd698d0b875d8e1a5d9362e4ce865' + '8e3fdcd9c6914e5edbe415b164321ff588ec2f1259772e633629314c30eac6b7') prepare() { cd "${srcdir}"/msys2-runtime git am --committer-date-is-author-date "${srcdir}"/0001-Add-MSYS-triplets.patch @@ -88,13 +88,13 @@ prepare() { git am --committer-date-is-author-date "${srcdir}"/0014-arg_heuristic-be-better-prepared-to-handle-path-list.patch git am --committer-date-is-author-date "${srcdir}"/0015-Fix-converting-argument-looks-like-DVAR-str1-c-path1.patch git am --committer-date-is-author-date "${srcdir}"/0016-Special-case-for-converting-root-directory-to-have-t.patch - git am --committer-date-is-author-date "${srcdir}"/0020-dcrt0.cc-Untangle-allow_glob-from-winshell.patch - git am --committer-date-is-author-date "${srcdir}"/0021-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch - git am --committer-date-is-author-date "${srcdir}"/0022-strace.cc-Don-t-set-MSYS-noglob.patch - git am --committer-date-is-author-date "${srcdir}"/0023-Add-debugging-for-build_argv.patch - git am --committer-date-is-author-date "${srcdir}"/0024-Add-debugging-for-strace-make_command_line.patch - git am --committer-date-is-author-date "${srcdir}"/0025-environ.cc-New-facility-environment-variable-MSYS2_E.patch - git am --committer-date-is-author-date "${srcdir}"/0026-path.cc-Ignore-zero-length-exclusions.patch + git am --committer-date-is-author-date "${srcdir}"/0017-dcrt0.cc-Untangle-allow_glob-from-winshell.patch + git am --committer-date-is-author-date "${srcdir}"/0018-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch + git am --committer-date-is-author-date "${srcdir}"/0019-strace.cc-Don-t-set-MSYS-noglob.patch + git am --committer-date-is-author-date "${srcdir}"/0020-Add-debugging-for-build_argv.patch + git am --committer-date-is-author-date "${srcdir}"/0021-Add-debugging-for-strace-make_command_line.patch + git am --committer-date-is-author-date "${srcdir}"/0022-environ.cc-New-facility-environment-variable-MSYS2_E.patch + git am --committer-date-is-author-date "${srcdir}"/0023-path.cc-Ignore-zero-length-exclusions.patch } build() { From 0adf36cda0c402fdc451c37277c128619a43694a Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Thu, 30 Jun 2016 09:01:03 +0300 Subject: [PATCH 076/101] pactoys: Update to r2.07ca37f --- pactoys-git/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pactoys-git/PKGBUILD b/pactoys-git/PKGBUILD index 66d12a53302..abfa897e1c6 100644 --- a/pactoys-git/PKGBUILD +++ b/pactoys-git/PKGBUILD @@ -2,7 +2,7 @@ _realname='pactoys' pkgname="${_realname}-git" -pkgver=r1.2836307 +pkgver=r2.07ca37f pkgrel=1 pkgdesc='A set of pacman packaging utilities' url='https://github.com/renatosilva/pactoys' From fa28549a1ad7c080b608395cc703d5197405a94f Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Thu, 30 Jun 2016 11:45:01 +0300 Subject: [PATCH 077/101] git: Update to 2.9.0 --- git/PKGBUILD | 10 +++++----- git/git-1.9.0-manifest-msys2.patch | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/git/PKGBUILD b/git/PKGBUILD index 8c6702f1b9d..24bda2632db 100644 --- a/git/PKGBUILD +++ b/git/PKGBUILD @@ -2,8 +2,8 @@ # Maintainer: Ray Donnelly pkgname=git -pkgver=2.8.2 -pkgrel=2 +pkgver=2.9.0 +pkgrel=1 pkgdesc="The fast distributed version control system" arch=('i686' 'x86_64') url="https://git-scm.com/" @@ -50,9 +50,9 @@ source=("${pkgname}-${pkgver}.tar.gz"::https://github.com/git/git/archive/v${pkg git-1.8.4-msys2.patch git-2.3.5-mingw-pwd.patch git-2.8.2-Cygwin-Allow-DOS-paths.patch) -sha256sums=('b8645cb549f8f7210495fea36fa968de6537ad3c74be17d45e53c99f5b0c4de4' +sha256sums=('dad202c1a2dec4caa2a6cab5c1ca8dc486206fd4a39585613bece8aa8c9da93b' 'c5e735d829e11f79e2d508b663d0924030498f48fc716881031fb975dbf187a5' - 'deb39583002770bdfb3d612562e9db73cd6fbd6cc6639fc5d3aeeae25e54ebcc' + 'ab3bed00af6943c1b29810cede3b50ff61e19f5015870dd273a35263fe5eb271' 'a82df3fc9a80b9f9003a9b9feca063413b14630c043c0b2b88bf2c61c46154cc' 'f67412f829e026b677d4c3ceacfb21da0549ad4636fb07c283e52c3fd5aa3e22' 'fb0e003f686a6d7c676d40144d16d4ba4ff38f28f7928e4401d95f198029f35e') @@ -62,8 +62,8 @@ prepare() { rm -f compat/win32/git.manifest compat/win32/resource.rc patch -p2 -i "${srcdir}"/1.7.9-cygwin.patch - patch -p1 -i "${srcdir}"/git-1.9.0-manifest-msys2.patch patch -p1 -i "${srcdir}"/git-1.8.4-msys2.patch + patch -p1 -i "${srcdir}"/git-1.9.0-manifest-msys2.patch patch -p2 -i "${srcdir}"/git-2.3.5-mingw-pwd.patch patch -p1 -i "${srcdir}"/git-2.8.2-Cygwin-Allow-DOS-paths.patch diff --git a/git/git-1.9.0-manifest-msys2.patch b/git/git-1.9.0-manifest-msys2.patch index a1b060ab6d3..424a3b2d83d 100644 --- a/git/git-1.9.0-manifest-msys2.patch +++ b/git/git-1.9.0-manifest-msys2.patch @@ -179,11 +179,11 @@ Signed-off-by: Cesar Eduardo Barros .PRECIOUS: $(TEST_OBJS) --test-%$X: test-%.o GIT-LDFLAGS $(GITLIBS) -+test-%$X: test-%.o $(RESOURCE_OBJS) GIT-LDFLAGS $(GITLIBS) +-t/helper/test-%$X: t/helper/test-%.o GIT-LDFLAGS $(GITLIBS) ++t/helper/test-%$X: t/helper/test-%.o $(RESOURCE_OBJS) GIT-LDFLAGS $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(filter %.a,$^) $(LIBS) - check-sha1:: test-sha1$X + check-sha1:: t/helper/test-sha1$X diff --git a/compat/win32/git.manifest b/compat/win32/git.manifest new file mode 100644 index 0000000..a82605c From ef0e5fd6e0f54cd713e9de83846f8679d3e8b491 Mon Sep 17 00:00:00 2001 From: Qian Hong Date: Fri, 1 Jul 2016 00:23:36 +0800 Subject: [PATCH 078/101] CI: Use --needed when installing pactoys. --- ci-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-library.sh b/ci-library.sh index 2c01b930498..08c3e79a7ea 100644 --- a/ci-library.sh +++ b/ci-library.sh @@ -134,7 +134,7 @@ update_system() { repman add ci.msys 'https://dl.bintray.com/alexpux/msys2' || return 1 pacman --noconfirm --noprogressbar --sync --refresh --refresh --sysupgrade --sysupgrade || return 1 test -n "${DISABLE_QUALITY_CHECK}" && return 0 # TODO: remove this option when not anymore needed - pacman --noconfirm --noprogressbar --sync ci.msys/pactoys + pacman --noconfirm --needed --noprogressbar --sync ci.msys/pactoys } # Sort packages by dependency From 9d0057f1e4a1a12e6f2d73b6d4d73480986574df Mon Sep 17 00:00:00 2001 From: Norbert Pfeiler Date: Sat, 2 Jul 2016 03:00:29 +0200 Subject: [PATCH 079/101] txt2tags: New package. needed for zsh man pages --- txt2tags/PKGBUILD | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 txt2tags/PKGBUILD diff --git a/txt2tags/PKGBUILD b/txt2tags/PKGBUILD new file mode 100644 index 00000000000..b19b5569711 --- /dev/null +++ b/txt2tags/PKGBUILD @@ -0,0 +1,70 @@ +# borrowed from Arch without changes +# Maintainer: Norbert Pfeiler + +pkgname=txt2tags +pkgver=2.6 +pkgrel=4 +pkgdesc='A text formatting and conversion tool.' +arch=('any') +url='http://www.txt2tags.org' +license=('GPL') +depends=('python2') +optdepends=('ruby: for running t2tmake.rb' + 'sh: for running html-update.sh' + 'vim: for using the vim-files') +makedepends=('gettext') +source=("http://txt2tags.googlecode.com/files/$pkgname-$pkgver.tgz") +md5sums=('ac09fd624f1e3a553d5f0e01271cc0ee') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # python2 fix + for f in txt2tags extras/gensite; do + sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' "$f" + done +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + install -d "$pkgdir/usr/share/vim/vimfiles"/{plugin,syntax,compiler,macros} + install -d "$pkgdir/usr/share/man"/{it,pt_BR,fr,es,ca}/man1 + install -d "$pkgdir/usr/share/man/man1" + + install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname" + install -Dm644 extras/pagemaker.vim "$pkgdir/usr/share/vim/vimfiles/syntax/pagemaker.vim" + install -Dm644 "extras/$pkgname.vim" "$pkgdir/usr/share/vim/vimfiles/syntax/$pkgname.vim" + install -Dm644 extras/gvim-menu.vim \ + "$pkgdir/usr/share/vim/vimfiles/plugin/$pkgname-gvim-menu.vim" + install -Dm644 "extras/$pkgname-compiler.vim" \ + "$pkgdir/usr/share/vim/vimfiles/compiler/$pkgname-compiler.vim" + install -Dm644 extras/unhtml.vim \ + "$pkgdir/usr/share/vim/vimfiles/macros/unhtml.vim" + + # installing other extra tools + install -m755 extras/{t2tmake.rb,gensite,html-update.sh,dynartslides} "$pkgdir/usr/bin" + install -Dm644 extras/txt2tags-mode.el "$pkgdir/usr/share/emacs/site-lisp/txt2tags-mode.el" + + # handling man pages + cd doc + for _lang in {"it","pt","fr","es","ca"}; do + install -Dm644 "manpage-${_lang}.man" "$pkgname.1-${_lang}" + if [[ ${_lang} == "pt" ]]; then + cp "$pkgname.1-${_lang}" "$pkgdir/usr/share/man/pt_BR/man1/$pkgname.1" + else + install -Dm644 "$pkgname.1-${_lang}" "$pkgdir/usr/share/man/${_lang}/man1/$pkgname.1" + fi + done + + # English man page + install -Dm644 manpage.man "$pkgdir/usr/share/man/man1/$pkgname.1" + + # i18n + cd ../po + for _i in *.po + do + msgfmt -o "${_i%.po}.mo" "${_i}" + install -Dm644 "${_i%.po}.mo" "$pkgdir/usr/share/locale/${_i%.po}/LC_MESSAGES/$pkgname.mo" + done +} From da454a08b975d68aa2b8368f18f404f12d155aab Mon Sep 17 00:00:00 2001 From: Norbert Pfeiler Date: Sat, 2 Jul 2016 03:02:05 +0200 Subject: [PATCH 080/101] grml-zsh-config: New package. --- grml-zsh-config/PKGBUILD | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 grml-zsh-config/PKGBUILD diff --git a/grml-zsh-config/PKGBUILD b/grml-zsh-config/PKGBUILD new file mode 100644 index 00000000000..dc1d6707017 --- /dev/null +++ b/grml-zsh-config/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Norbert Pfeiler + +pkgname=grml-zsh-config +pkgver=0.12.6 +pkgrel=1 +pkgdesc="grml's zsh setup" +arch=('any') +url='http://grml.org/zsh/' +license=('GPL2') +provides=('grmlzshrc') +depends=('zsh' 'coreutils' 'inetutils' 'grep' 'sed' 'procps') +makedepends=('txt2tags') +source=("http://deb.grml.org/pool/main/g/grml-etc-core/grml-etc-core_${pkgver}.tar.gz") +sha256sums=('8b712099b812f1d07429bfe4c19b45b9b1efd1c173c1be8f49c6351edcd1a118') + +build() { + cd ${srcdir}/grml-etc-core-${pkgver}/doc + make +} + +package() { + cd ${srcdir}/grml-etc-core-${pkgver} + install -D -m644 etc/skel/.zshrc ${pkgdir}/etc/skel/.zshrc + install -D -m644 etc/zsh/keephack ${pkgdir}/etc/zsh/keephack + install -D -m644 etc/zsh/zshrc ${pkgdir}/etc/zsh/zshrc + + install -D -m644 doc/grmlzshrc.5 ${pkgdir}/usr/share/man/man5/grmlzshrc.5 + # the symlinking from the original pkg doesn’t work + # because the target doesn’t exist yet (manpage compression) + # and msys2’s symlink simply copies + install -D -m644 doc/grmlzshrc.5 ${pkgdir}/usr/share/man/man5/grml-zsh-config.5 +} From 17a600430145a4d7a16cc3fb15a065739acc81c0 Mon Sep 17 00:00:00 2001 From: Philip Oakley Date: Tue, 5 Jul 2016 09:58:21 +0100 Subject: [PATCH 081/101] bashrc: re-include $PS1 priority 6e6310d (filesystem: New specific variable MSYS2_PS1., 2016-05-01) introduced the MSYS2_PS1 prompt script priority to allow multiple device configurations. Unfortunately, if MSYS2_PS1 was not set it overwrote the $PS1, even when specifically set by the users configuration, such as provided in the Git-for-Windows SDK (see https://github.com/git-for-windows/git/issues/794#issuecomment-227401839) and the monkey patch fix (https://github.com/git-for-windows/build-extra/pull/122). Introduce a priority order so that the user's $PS1 (if set) has an intermediate priority between the MSYS2_PS1 and the default PS1. Signed-off-by: Philip Oakley --- filesystem/PKGBUILD | 4 ++-- filesystem/bash.bashrc | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index 2e00120b5ad..7f16a694be5 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -4,7 +4,7 @@ pkgname=filesystem pkgver=2016.06 -pkgrel=1 +pkgrel=2 pkgdesc='Base filesystem' arch=('i686' 'x86_64') license=('BSD') @@ -49,7 +49,7 @@ source=('bash.bash_logout' 'mingw32-config.site' 'redirect-config.site') sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' - 'b985a05176a940bfd46c33ac1a1f78b3b09508d8b7c28f8e23e542975e09e0e2' + '82fb61ad0e5625fe29d4fd2ef4d191cb76b24be17967076a45ba9941f855eb48' '99eae6e37081edd73b399009c85f4a67a0c14481241ee4937ab45c4178b540fb' 'ed08a8bd0919ba29ec5dd2d0c74ba74324ca2bcbf7852354b0b6c523809029a0' '4330edf340394d0dae50afb04ac2a621f106fe67fb634ec81c4bfb98be2a1eb5' diff --git a/filesystem/bash.bashrc b/filesystem/bash.bashrc index 5ab19689c21..77c94a11675 100644 --- a/filesystem/bash.bashrc +++ b/filesystem/bash.bashrc @@ -39,11 +39,14 @@ unset _warning_prefix unset _warning_file unset _warning -# If MSYS2_PS1 is set, use that as default PS1, otherwise set a default prompt +# If MSYS2_PS1 is set, use that as default PS1; +# if a PS1 is already set, use that; +# otherwise set a default prompt # of user@host, MSYSTEM variable, and current_directory if test -n "${MSYS2_PS1}" then PS1="${MSYS2_PS1}" - else PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n\$ ' + elif test -z "${PS1}" + then PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n\$ ' fi # Uncomment to use the terminal colours set in DIR_COLORS From 226b5c86246178512acce5c5f507585e38db47eb Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Wed, 13 Jul 2016 13:16:18 +0300 Subject: [PATCH 082/101] bash: Update to 4.3.046 --- bash/0001-bash-4.3-cygwin.patch | 2 +- bash/PKGBUILD | 14 ++++++-- bash/bash43-043 | 59 ++++++++++++++++++++++++++++++++ bash/bash43-043.sig | Bin 0 -> 72 bytes bash/bash43-044 | 48 ++++++++++++++++++++++++++ bash/bash43-044.sig | Bin 0 -> 72 bytes bash/bash43-045 | 52 ++++++++++++++++++++++++++++ bash/bash43-045.sig | Bin 0 -> 72 bytes bash/bash43-046 | 55 +++++++++++++++++++++++++++++ bash/bash43-046.sig | Bin 0 -> 72 bytes 10 files changed, 226 insertions(+), 4 deletions(-) create mode 100644 bash/bash43-043 create mode 100644 bash/bash43-043.sig create mode 100644 bash/bash43-044 create mode 100644 bash/bash43-044.sig create mode 100644 bash/bash43-045 create mode 100644 bash/bash43-045.sig create mode 100644 bash/bash43-046 create mode 100644 bash/bash43-046.sig diff --git a/bash/0001-bash-4.3-cygwin.patch b/bash/0001-bash-4.3-cygwin.patch index 2bf50d825df..cecd4cb5aaf 100644 --- a/bash/0001-bash-4.3-cygwin.patch +++ b/bash/0001-bash-4.3-cygwin.patch @@ -209,7 +209,7 @@ @@ -161,6 +166,9 @@ static struct { { "compat40", &shopt_compat40, set_compatibility_level }, { "compat41", &shopt_compat41, set_compatibility_level }, - { "compat42", &shopt_compat41, set_compatibility_level }, + { "compat42", &shopt_compat42, set_compatibility_level }, +#if __CYGWIN__ + { "completion_strip_exe", &completion_strip_exe, NULL }, +#endif diff --git a/bash/PKGBUILD b/bash/PKGBUILD index 7dce83fdb9b..4dd23c6033c 100644 --- a/bash/PKGBUILD +++ b/bash/PKGBUILD @@ -4,9 +4,9 @@ pkgbase=bash pkgname=('bash' 'bash-devel') _basever=4.3 -_patchlevel=042 #prepare for some patches +_patchlevel=046 #prepare for some patches pkgver=${_basever}.${_patchlevel} -pkgrel=5 +pkgrel=1 pkgdesc="The GNU Bourne Again shell" arch=('i686' 'x86_64') license=('GPL') @@ -132,7 +132,7 @@ package_bash-devel() { sha256sums=('afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4' 'SKIP' - '4e3bd589c3b3b39ced9ce824f9da39667ee8d6c8cc86de080b2714cb0db36d9a' + '4266bbb4c406e1b42b160e46897b9745621ac7cf2aad059ff270ba8312113edc' 'da08e4661fdcb179f7749dd1c8ce728d0ed8d4ca07e50da757046c06c6464dee' 'd833f89569b3d4ea4c78d998db087e60a426b8360a34707e80d71f3ce6ecc415' '9829166ecd5d48651fb4a139f7e05053c775aa1a760ff4cf9561bbe6bae3d308' @@ -223,4 +223,12 @@ sha256sums=('afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4' '4ec432966e4198524a7e0cd685fe222e96043769c9613e66742ac475db132c1a' 'SKIP' 'b75a53141ab3d8fff3fa74b5f3dc76468b01eae299f50bbc2bc71ae395d690af' + 'SKIP' + '47a8a3c005b46e25821f4d8f5ccb04c1d653b1c829cb40568d553dc44f7a6180' + 'SKIP' + '9338820630bf67373b44d8ea68409f65162ea7a47b9b29ace06a0aed12567f99' + 'SKIP' + 'ba6ec3978e9eaa1eb3fabdaf3cc6fdf8c4606ac1c599faaeb4e2d69864150023' + 'SKIP' + 'b3b456a6b690cd293353f17e22d92a202b3c8bce587ae5f2667c20c9ab6f688f' 'SKIP') diff --git a/bash/bash43-043 b/bash/bash43-043 new file mode 100644 index 00000000000..ad82c29258b --- /dev/null +++ b/bash/bash43-043 @@ -0,0 +1,59 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-043 + +Bug-Reported-by: lolilolicon +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00040.html + +Bug-Description: + +When the lastpipe option is enabled, the last component can contain nested +pipelines and cause a segmentation fault under certain circumestances. + +Patch (apply with `patch -p0'): + +*** ../bash-4.3-patched/execute_cmd.c 2014-07-30 10:26:52.000000000 -0400 +--- execute_cmd.c 2014-08-15 08:55:24.000000000 -0400 +*************** +*** 2406,2412 **** + { + #if defined (JOB_CONTROL) +! append_process (savestring (the_printed_command), dollar_dollar_pid, exec_result, lastpipe_jid); +! #endif + lstdin = wait_for (lastpid); + #if defined (JOB_CONTROL) + /* If wait_for removes the job from the jobs table, use result of last +--- 2433,2447 ---- + { + #if defined (JOB_CONTROL) +! if (INVALID_JOB (lastpipe_jid) == 0) +! { +! append_process (savestring (the_printed_command_except_trap), dollar_dollar_pid, exec_result, lastpipe_jid); +! lstdin = wait_for (lastpid); +! } +! else +! lstdin = wait_for_single_pid (lastpid); /* checks bgpids list */ +! #else + lstdin = wait_for (lastpid); ++ #endif ++ + #if defined (JOB_CONTROL) + /* If wait_for removes the job from the jobs table, use result of last +*** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 42 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 43 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/bash/bash43-043.sig b/bash/bash43-043.sig new file mode 100644 index 0000000000000000000000000000000000000000..3af5b31a1108e7ddd67f13b36e2ee093650bcef2 GIT binary patch literal 72 zcmV-O0Jr~$Mg#y60ssaD0#{@BwEzkU5W84u@MP+At0r9lpIOc{X5$YwUh$IS1p-<) eWC>R2$pD)K&R>faSns1{Ky93C3nIKPHb?n^wi_@2 literal 0 HcmV?d00001 diff --git a/bash/bash43-044 b/bash/bash43-044 new file mode 100644 index 00000000000..d8f1ce07238 --- /dev/null +++ b/bash/bash43-044 @@ -0,0 +1,48 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-044 + +Bug-Reported-by: Ondrej Oprala +Bug-Reference-ID: <539ED55B.2080103@redhat.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00046.html + +Bug-Description: + +A typo prevents the `compat42' shopt option from working as intended. + +Patch (apply with `patch -p0'): + +diff -rC 2 bash-4.3.42/builtins/shopt.def bash-4.3.43/builtins/shopt.def +*** bash-4.3.42/builtins/shopt.def 2013-02-27 09:43:20.000000000 -0500 +--- builtins/shopt.def 2015-10-16 11:25:28.000000000 -0400 +*************** +*** 161,165 **** + { "compat40", &shopt_compat40, set_compatibility_level }, + { "compat41", &shopt_compat41, set_compatibility_level }, +! { "compat42", &shopt_compat41, set_compatibility_level }, + #if defined (READLINE) + { "complete_fullquote", &complete_fullquote, (shopt_set_func_t *)NULL}, +--- 161,165 ---- + { "compat40", &shopt_compat40, set_compatibility_level }, + { "compat41", &shopt_compat41, set_compatibility_level }, +! { "compat42", &shopt_compat42, set_compatibility_level }, + #if defined (READLINE) + { "complete_fullquote", &complete_fullquote, (shopt_set_func_t *)NULL}, + +*** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 43 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 44 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/bash/bash43-044.sig b/bash/bash43-044.sig new file mode 100644 index 0000000000000000000000000000000000000000..b08482b1e274130fd7d5df5fb45f3d8274642185 GIT binary patch literal 72 zcmV-O0Jr~$Mg#y60ssaD0#{@Bx&R6Z5W84u@MP+At0>d}pL095#~b8pa5~Dc`MKDW eiLGC6fB>I+`HEF$A0<2^;eC!8Jm6UVK2@slQXc>S literal 0 HcmV?d00001 diff --git a/bash/bash43-045 b/bash/bash43-045 new file mode 100644 index 00000000000..25dc3587ac9 --- /dev/null +++ b/bash/bash43-045 @@ -0,0 +1,52 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-045 + +Bug-Reported-by: Basin Ilya +Bug-Reference-ID: <5624C0AC.8070802@gmail.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-10/msg00141.html + +Bug-Description: + +If a file open attempted as part of a redirection fails because it is interrupted +by a signal, the shell needs to process any pending traps to allow the redirection +to be canceled. + +Patch (apply with `patch -p0'): + +*** bash-20150109/redir.c 2014-12-03 10:47:38.000000000 -0500 +--- redir.c 2015-01-16 10:15:47.000000000 -0500 +*************** +*** 672,676 **** + e = errno; + if (fd < 0 && e == EINTR) +! QUIT; + errno = e; + } +--- 672,679 ---- + e = errno; + if (fd < 0 && e == EINTR) +! { +! QUIT; +! run_pending_traps (); +! } + errno = e; + } + +*** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 44 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 45 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/bash/bash43-045.sig b/bash/bash43-045.sig new file mode 100644 index 0000000000000000000000000000000000000000..0fc2e52aad6d29f1e5f9f0e2a70c5d4af739f2dd GIT binary patch literal 72 zcmV-O0Jr~$Mg#y60ssaD0#{@BzyJyf5W84u@MP+As}nW=o-!=pWxj!uXMf|ef+~m` ebER{7-TgUU!###wU5|7uVaAw5DSsyw8 literal 0 HcmV?d00001 diff --git a/bash/bash43-046 b/bash/bash43-046 new file mode 100644 index 00000000000..bea3970a2a1 --- /dev/null +++ b/bash/bash43-046 @@ -0,0 +1,55 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-046 + +Bug-Reported-by: Sergey Tselikh +Bug-Reference-ID: <20150816110235.91f3e12e3f20d20cdaad963e@gmail.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-08/msg00080.html + +Bug-Description: + +An incorrect conversion from an indexed to associative array can result in a +core dump. + +Patch (apply with `patch -p0'): + +*** /fs2/chet/bash/bash-20150813/subst.c 2015-08-13 11:32:54.000000000 -0400 +--- subst.c 2015-08-18 10:13:59.000000000 -0400 +*************** +*** 9562,9566 **** + opts[opti] = '\0'; + if (opti > 0) +! make_internal_declare (tlist->word->word, opts); + + t = do_word_assignment (tlist->word, 0); +--- 9562,9573 ---- + opts[opti] = '\0'; + if (opti > 0) +! { +! t = make_internal_declare (tlist->word->word, opts); +! if (t != EXECUTION_SUCCESS) +! { +! last_command_exit_value = t; +! exp_jump_to_top_level (DISCARD); +! } +! } + + t = do_word_assignment (tlist->word, 0); + +*** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 45 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 46 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/bash/bash43-046.sig b/bash/bash43-046.sig new file mode 100644 index 0000000000000000000000000000000000000000..a60e71ca672f1ea2bf39b0bfda85d0644a0c39b3 GIT binary patch literal 72 zcmV-O0Jr~$Mg#y60ssaD0#{@B$N&ln5W84u@MP+At6Jj#o+ekutcvYCEuqp4ZmqD2 ehNp+ndH|dYwcZ~L(CQCwS<9+4BjQ0k5}}&qRvuIU literal 0 HcmV?d00001 From 1dff94e3f25e37b35eb97ef1f4b8d42acfac765f Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Wed, 13 Jul 2016 13:29:09 +0300 Subject: [PATCH 083/101] git: Update to 2.9.1 --- git/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git/PKGBUILD b/git/PKGBUILD index 24bda2632db..16d32b3d189 100644 --- a/git/PKGBUILD +++ b/git/PKGBUILD @@ -2,7 +2,7 @@ # Maintainer: Ray Donnelly pkgname=git -pkgver=2.9.0 +pkgver=2.9.1 pkgrel=1 pkgdesc="The fast distributed version control system" arch=('i686' 'x86_64') @@ -50,7 +50,7 @@ source=("${pkgname}-${pkgver}.tar.gz"::https://github.com/git/git/archive/v${pkg git-1.8.4-msys2.patch git-2.3.5-mingw-pwd.patch git-2.8.2-Cygwin-Allow-DOS-paths.patch) -sha256sums=('dad202c1a2dec4caa2a6cab5c1ca8dc486206fd4a39585613bece8aa8c9da93b' +sha256sums=('957e0d1e02dd730366a819a1c135c174988b143eb2e624d3236eb11f0a968c87' 'c5e735d829e11f79e2d508b663d0924030498f48fc716881031fb975dbf187a5' 'ab3bed00af6943c1b29810cede3b50ff61e19f5015870dd273a35263fe5eb271' 'a82df3fc9a80b9f9003a9b9feca063413b14630c043c0b2b88bf2c61c46154cc' From 74daf3cd2a1ec0fc823c79ef315735209b66eef9 Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Wed, 13 Jul 2016 14:09:24 +0300 Subject: [PATCH 084/101] libgpg-error: Update to 1.23 --- libgpg-error/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgpg-error/PKGBUILD b/libgpg-error/PKGBUILD index 30d0d6ddf91..b24c1788942 100644 --- a/libgpg-error/PKGBUILD +++ b/libgpg-error/PKGBUILD @@ -2,7 +2,7 @@ pkgbase=libgpg-error pkgname=('libgpg-error' 'libgpg-error-devel') # 'gpg-error' -pkgver=1.21 +pkgver=1.23 pkgrel=1 pkgdesc="Support library for libgcrypt" arch=(i686 x86_64) @@ -13,7 +13,7 @@ makedepends=('libiconv-devel' 'gettext-devel') source=(https://gnupg.org/ftp/gcrypt/libgpg-error/${pkgname}-${pkgver}.tar.bz2{,.sig} libgpg-error-1.16-msys2.patch cygwin-gen-lock2.patch) -sha256sums=('b7dbdb3cad63a740e9f0c632a1da32d4afdb694ec86c8625c98ea0691713b84d' +sha256sums=('7f0c7f65b98c4048f649bfeebfa4d4c1559707492962504592b985634c939eaa' 'SKIP' '8cba23cd11fe2344a692aceea1aeb6d0aeea7fa87ea11022500afdcd47c2fe93' '55139ba4a7e42eb03622c21c96750c595aba3bd8ac1d7f53bc768621ab261f23') From 69035971a60ad2c9a7bfe745d2160b0f2dc95e88 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Thu, 14 Jul 2016 12:51:48 +0100 Subject: [PATCH 085/101] msys2-runtime: In `machine/_types.h` `__blkcnt_t` should be signed --- ..._types.h-__blkcnt_t-should-be-signed.patch | 32 +++++++++++++++++++ msys2-runtime/PKGBUILD | 9 ++++-- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 msys2-runtime/0024-machine-_types.h-__blkcnt_t-should-be-signed.patch diff --git a/msys2-runtime/0024-machine-_types.h-__blkcnt_t-should-be-signed.patch b/msys2-runtime/0024-machine-_types.h-__blkcnt_t-should-be-signed.patch new file mode 100644 index 00000000000..ff45a0721eb --- /dev/null +++ b/msys2-runtime/0024-machine-_types.h-__blkcnt_t-should-be-signed.patch @@ -0,0 +1,32 @@ +From cc2b4d5326ddfe5284863e2d9d98aac008a12d21 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Thu, 14 Jul 2016 12:40:47 +0100 +Subject: [PATCH 24/24] machine/_types.h: __blkcnt_t should be signed + +[1] states: "blkcnt_t and off_t shall be signed integer types." + +This causes pacman to fail when the size requirement +of the net update operation is negative, instead it +calculated a huge positive number. + +[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html +--- + winsup/cygwin/include/machine/_types.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/winsup/cygwin/include/machine/_types.h b/winsup/cygwin/include/machine/_types.h +index e6ed313..7e636f8 100644 +--- a/winsup/cygwin/include/machine/_types.h ++++ b/winsup/cygwin/include/machine/_types.h +@@ -14,7 +14,7 @@ typedef __uint32_t __ino32_t; + #endif + + #define __machine_blkcnt_t_defined +-typedef __uint64_t __blkcnt_t; ++typedef __int64_t __blkcnt_t; + + #define __machine_blksize_t_defined + typedef __int32_t __blksize_t; +-- +2.8.2 + diff --git a/msys2-runtime/PKGBUILD b/msys2-runtime/PKGBUILD index d2fe3a9615e..004b3c7ab40 100644 --- a/msys2-runtime/PKGBUILD +++ b/msys2-runtime/PKGBUILD @@ -4,7 +4,7 @@ pkgbase=msys2-runtime pkgname=('msys2-runtime' 'msys2-runtime-devel') pkgver=2.5.2 -pkgrel=1 +pkgrel=2 pkgdesc="Cygwin POSIX emulation engine" arch=('i686' 'x86_64') url="https://www.cygwin.com/" @@ -45,7 +45,8 @@ source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-$ 0020-Add-debugging-for-build_argv.patch 0021-Add-debugging-for-strace-make_command_line.patch 0022-environ.cc-New-facility-environment-variable-MSYS2_E.patch - 0023-path.cc-Ignore-zero-length-exclusions.patch) + 0023-path.cc-Ignore-zero-length-exclusions.patch + 0024-machine-_types.h-__blkcnt_t-should-be-signed.patch) sha256sums=('SKIP' '7b24f901bddfb4b92ed2982d8608e8a9fdd1d2e523ae028115b5f5e8d710fea4' '2683c45d3d964c55738dc65c9897fe6b8344ba20ead4102c432c46e382923625' @@ -69,7 +70,8 @@ sha256sums=('SKIP' 'fc067fe6bb2d7d15909e41c1982fed7ebb1d2e3622acd277dbdadfc64beaa4ad' 'fd2731afc3b6ff3d9e870e5b0a582280eeb1a1ed7bbfe944c15299112bd2eb21' '673680ee81c15a5750c3c56bf8803cfa4f4bd698d0b875d8e1a5d9362e4ce865' - '8e3fdcd9c6914e5edbe415b164321ff588ec2f1259772e633629314c30eac6b7') + '8e3fdcd9c6914e5edbe415b164321ff588ec2f1259772e633629314c30eac6b7' + '671401f0a26c53edc2b72dc9e87cf72780f64bffe3a3465f8c7c4b6760dab192') prepare() { cd "${srcdir}"/msys2-runtime git am --committer-date-is-author-date "${srcdir}"/0001-Add-MSYS-triplets.patch @@ -95,6 +97,7 @@ prepare() { git am --committer-date-is-author-date "${srcdir}"/0021-Add-debugging-for-strace-make_command_line.patch git am --committer-date-is-author-date "${srcdir}"/0022-environ.cc-New-facility-environment-variable-MSYS2_E.patch git am --committer-date-is-author-date "${srcdir}"/0023-path.cc-Ignore-zero-length-exclusions.patch + git am --committer-date-is-author-date "${srcdir}"/0024-machine-_types.h-__blkcnt_t-should-be-signed.patch } build() { From 73e06b9d4cfd43ff9b2980812095419998ce2658 Mon Sep 17 00:00:00 2001 From: Karlson2k Date: Thu, 14 Jul 2016 23:59:51 +0300 Subject: [PATCH 086/101] bash.bashrc: Update PS1 if PS1 wasn't exported. Closes #653 --- filesystem/PKGBUILD | 6 +++--- filesystem/bash.bashrc | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index 7f16a694be5..2038eaf542e 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -3,8 +3,8 @@ # Contributor: Karlson2k (Evgeny Grin) pkgname=filesystem -pkgver=2016.06 -pkgrel=2 +pkgver=2016.07 +pkgrel=1 pkgdesc='Base filesystem' arch=('i686' 'x86_64') license=('BSD') @@ -49,7 +49,7 @@ source=('bash.bash_logout' 'mingw32-config.site' 'redirect-config.site') sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' - '82fb61ad0e5625fe29d4fd2ef4d191cb76b24be17967076a45ba9941f855eb48' + '81706dc0674d06ddd98b630774816810e7dc25c1441e9805a4b6b81e1beaf3f1' '99eae6e37081edd73b399009c85f4a67a0c14481241ee4937ab45c4178b540fb' 'ed08a8bd0919ba29ec5dd2d0c74ba74324ca2bcbf7852354b0b6c523809029a0' '4330edf340394d0dae50afb04ac2a621f106fe67fb634ec81c4bfb98be2a1eb5' diff --git a/filesystem/bash.bashrc b/filesystem/bash.bashrc index 77c94a11675..8b5aba3f698 100644 --- a/filesystem/bash.bashrc +++ b/filesystem/bash.bashrc @@ -40,14 +40,13 @@ unset _warning_file unset _warning # If MSYS2_PS1 is set, use that as default PS1; -# if a PS1 is already set, use that; +# if a PS1 is already set and exported, use that; # otherwise set a default prompt # of user@host, MSYSTEM variable, and current_directory -if test -n "${MSYS2_PS1}" - then PS1="${MSYS2_PS1}" - elif test -z "${PS1}" - then PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n\$ ' -fi +[[ -n "${MSYS2_PS1}" ]] && export PS1="${MSYS2_PS1}" +[[ $(declare -p PS1 2>/dev/null | cut -c 1-11) = 'declare -x ' ]] || \ + export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n\$ ' + # Uncomment to use the terminal colours set in DIR_COLORS # eval "$(dircolors -b /etc/DIR_COLORS)" From 46945ff878ab550c0ecf0203fe41466625ab9e3e Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Fri, 15 Jul 2016 09:53:31 +0300 Subject: [PATCH 087/101] pacman: Switch to satble release. --- pacman/0000-pacman-msysize.patch | 1743 +++++++++++++++++ pacman/0001-more-debugging-info.patch | 25 +- ...04-Link-pacman-with-static-libraries.patch | 41 +- ...ttext-libalpm-pkg-config-static-link.patch | 24 +- pacman/PKGBUILD | 55 +- 5 files changed, 1785 insertions(+), 103 deletions(-) create mode 100644 pacman/0000-pacman-msysize.patch diff --git a/pacman/0000-pacman-msysize.patch b/pacman/0000-pacman-msysize.patch new file mode 100644 index 00000000000..990389e41e0 --- /dev/null +++ b/pacman/0000-pacman-msysize.patch @@ -0,0 +1,1743 @@ +diff -Naur pacman-5.0.1-orig/configure.ac pacman-5.0.1/configure.ac +--- pacman-5.0.1-orig/configure.ac 2016-02-23 06:17:34.000000000 +0300 ++++ pacman-5.0.1/configure.ac 2016-07-15 09:42:18.760037400 +0300 +@@ -114,12 +114,6 @@ + [set the full path to the shell used to run install scriptlets]), + [SCRIPTLET_SHELL=$withval], [SCRIPTLET_SHELL=/bin/sh]) + +-# Help line for ldconfig path +-AC_ARG_WITH(ldconfig, +- AS_HELP_STRING([--with-ldconfig=path], +- [set the full path to ldconfig]), +- [LDCONFIG=$withval], [LDCONFIG=/sbin/ldconfig]) +- + # Help line for using OpenSSL + AC_ARG_WITH(openssl, + AS_HELP_STRING([--with-openssl], [use OpenSSL crypto implementations instead of internal routines]), +@@ -497,9 +491,6 @@ + # Set shell used by install scriptlets + AC_SUBST(SCRIPTLET_SHELL) + AC_DEFINE_UNQUOTED([SCRIPTLET_SHELL], "$SCRIPTLET_SHELL", [The full path of the shell used to run install scriptlets]) +-# Set ldconfig path +-AC_SUBST(LDCONFIG) +-AC_DEFINE_UNQUOTED([LDCONFIG], "$LDCONFIG", [The full path to ldconfig]) + + + # Configuration files +diff -Naur pacman-5.0.1-orig/contrib/bacman.sh.in pacman-5.0.1/contrib/bacman.sh.in +--- pacman-5.0.1-orig/contrib/bacman.sh.in 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/contrib/bacman.sh.in 2016-07-15 09:42:18.772037400 +0300 +@@ -80,21 +80,6 @@ + fi + + # +-# Fakeroot support +-# +-if (( EUID )); then +- if [[ -f /usr/bin/fakeroot ]]; then +- msg "Entering fakeroot environment" +- export INFAKEROOT="1" +- /usr/bin/fakeroot -u -- "$0" "${ARGS[@]}" +- exit $? +- else +- warning "installing fakeroot or running $myname as root is required to" +- plain " preserve the ownership permissions of files in some packages\n" +- fi +-fi +- +-# + # Setting environmental variables + # + if [[ ! -r @sysconfdir@/pacman.conf ]]; then +@@ -205,7 +190,7 @@ + esac + + ret=0 +- bsdtar -cnf - -s'/.pacnew$//' "$local_file" 2> /dev/null | bsdtar -xpf - 2> /dev/null ++ /usr/bin/bsdtar -cnf - -s'/.pacnew$//' "$local_file" 2> /dev/null | /bin/bsdtar -xpf - 2> /dev/null + + # Workaround to bsdtar not reporting a missing file as an error + if ! [[ -e $package_file || -L $package_file ]]; then +@@ -231,9 +216,6 @@ + # + msg2 "Generating .PKGINFO metadata..." + echo "# Generated by $myname $myver" > .PKGINFO +-if [[ $INFAKEROOT == "1" ]]; then +- echo "# Using $(fakeroot -v)" >> .PKGINFO +-fi + echo "# $(LC_ALL=C date)" >> .PKGINFO + echo "#" >> .PKGINFO + +@@ -331,11 +313,11 @@ + + # TODO: Maybe this can be set globally for robustness + shopt -s -o pipefail +-bsdtar -cf - $comp_files * | ++/usr/bin/bsdtar -cf - $comp_files * | + case "$PKGEXT" in +- *tar.gz) gzip -c -f -n ;; +- *tar.bz2) bzip2 -c -f ;; +- *tar.xz) xz -c -z - ;; ++ *tar.gz) /bin/gzip -c -f -n ;; ++ *tar.bz2) /bin/bzip2 -c -f ;; ++ *tar.xz) /bin/xz -c -z - ;; + *tar.Z) compress -c -f ;; + *tar) cat ;; + *) warning "'%s' is not a valid archive extension." \ +diff -Naur pacman-5.0.1-orig/contrib/checkupdates.sh.in pacman-5.0.1/contrib/checkupdates.sh.in +--- pacman-5.0.1-orig/contrib/checkupdates.sh.in 2015-10-18 08:38:28.000000000 +0300 ++++ pacman-5.0.1/contrib/checkupdates.sh.in 2016-07-15 09:42:18.779037400 +0300 +@@ -35,11 +35,6 @@ + exit 0 + fi + +-if ! type -P fakeroot >/dev/null; then +- error 'Cannot find the fakeroot binary.' +- exit 1 +-fi +- + if [[ -z $CHECKUPDATES_DB ]]; then + CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/" + fi +@@ -51,7 +46,7 @@ + + mkdir -p "$CHECKUPDATES_DB" + ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null +-fakeroot -- pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null ++pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null + pacman -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]' + + exit 0 +diff -Naur pacman-5.0.1-orig/contrib/paccache.sh.in pacman-5.0.1/contrib/paccache.sh.in +--- pacman-5.0.1-orig/contrib/paccache.sh.in 2015-03-26 07:43:10.000000000 +0300 ++++ pacman-5.0.1/contrib/paccache.sh.in 2016-07-15 09:42:18.787037400 +0300 +@@ -24,7 +24,7 @@ + declare -r myver='@PACKAGE_VERSION@' + + declare -a cachedirs=() candidates=() cmdopts=() whitelist=() blacklist=() +-declare -i delete=0 dryrun=0 filecount=0 move=0 needsroot=0 totalsaved=0 verbose=0 ++declare -i delete=0 dryrun=0 filecount=0 move=0 totalsaved=0 verbose=0 + declare delim=$'\n' keep=3 movedir= scanarch= + + QUIET=0 +@@ -123,16 +123,7 @@ + m4_include(../scripts/library/size_to_human.sh) + + runcmd() { +- if (( needsroot && EUID != 0 )); then +- msg "Privilege escalation required" +- if sudo -v &>/dev/null && sudo -l &>/dev/null; then +- sudo "$@" +- else +- die 'Unable to escalate privileges using sudo' +- fi +- else +- "$@" +- fi ++ "$@" + } + + summarize() { +@@ -306,17 +297,12 @@ + if (( move || delete )); then + # make it an absolute path since we're about to chdir + [[ $movedir && ${movedir:0:1} != '/' ]] && movedir=$PWD/$movedir +- [[ $movedir && ! -w $movedir ]] && needsroot=1 + fi + + for cachedir in "${cachedirs[@]}"; do + [[ -d $cachedir ]] || + die "cachedir '%s' does not exist or is not a directory" "$cachedir" + +- if (( move || delete )); then +- [[ ! -w $cachedir ]] && needsroot=1 +- fi +- + # unlikely that this will fail, but better make sure + pushd "$cachedir" &>/dev/null || die "failed to chdir to '%s'" "$cachedir" + +diff -Naur pacman-5.0.1-orig/contrib/paclist.sh.in pacman-5.0.1/contrib/paclist.sh.in +--- pacman-5.0.1-orig/contrib/paclist.sh.in 2014-12-24 04:16:59.000000000 +0300 ++++ pacman-5.0.1/contrib/paclist.sh.in 2016-07-15 09:42:18.796037400 +0300 +@@ -59,7 +59,7 @@ + exit 0 + fi + +-printf -v installed '[%s]' "$(gettext installed)" ++printf -v installed '[%s]' "$(/usr/bin/gettext installed)" + pacman -Sl $1 | awk -v i="$installed" '$NF == i { print $2,$3 }' + + # exit with pacman's return value, not awk's +diff -Naur pacman-5.0.1-orig/contrib/pacscripts.sh.in pacman-5.0.1/contrib/pacscripts.sh.in +--- pacman-5.0.1-orig/contrib/pacscripts.sh.in 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/contrib/pacscripts.sh.in 2016-07-15 09:42:18.804037400 +0300 +@@ -42,7 +42,7 @@ + + error() { + local mesg=$1; shift +- printf "==> $(gettext "ERROR:") ${mesg}\n" "$@" >&2 ++ printf "==> $(/usr/bin/gettext "ERROR:") ${mesg}\n" "$@" >&2 + } + + usage() { +@@ -67,17 +67,7 @@ + } + + spacman() { +- if [ $EUID -eq 0 ]; then +- pacman "$@" +- else +- if ! type -p sudo; then +- error "Cannot find the sudo binary!" +- error "${myname} requires root privileges. Either install \"sudo\" or run as root." +- exit 1 +- else +- sudo pacman "$@" +- fi +- fi ++ pacman "$@" + } + + print_db() { +@@ -94,7 +84,7 @@ + } + + print_pkg() { +- if ! bsdtar -xqOf "$1" .INSTALL 2>/dev/null; then ++ if ! /usr/bin/bsdtar -xqOf "$1" .INSTALL 2>/dev/null; then + error "Package $1 does not include any .INSTALL script" + return 1 + fi +@@ -103,7 +93,7 @@ + + print_scriptlet() { + if [ -f "$1" ]; then +- if bsdtar tf "$1" .PKGINFO &>/dev/null; then ++ if /usr/bin/bsdtar tf "$1" .PKGINFO &>/dev/null; then + print_pkg "$1" + return + fi +diff -Naur pacman-5.0.1-orig/contrib/updpkgsums.sh.in pacman-5.0.1/contrib/updpkgsums.sh.in +--- pacman-5.0.1-orig/contrib/updpkgsums.sh.in 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/contrib/updpkgsums.sh.in 2016-07-15 09:42:18.816037400 +0300 +@@ -83,7 +83,7 @@ + newbuildfile=$(mktemp "${TMPDIR:-/tmp}/updpkgsums.XXXXXX") + + trap "rm -rf '$BUILDDIR' '$newbuildfile'" EXIT +-newsums=$(makepkg -g -p "$buildfile") || die 'Failed to generate new checksums' ++newsums=$(MINGW_PACKAGE_PREFIX=mingw-w64-i686 makepkg -g -p "$buildfile") || die 'Failed to generate new checksums' + awk -v newsums="$newsums" ' + /^[[:blank:]]*(md|sha)[[:digit:]]+sums(_[^=]+)?=/,/\)[[:blank:]]*(#.*)?$/ { + if (!w) { +diff -Naur pacman-5.0.1-orig/lib/libalpm/add.c pacman-5.0.1/lib/libalpm/add.c +--- pacman-5.0.1-orig/lib/libalpm/add.c 2016-02-23 05:51:26.000000000 +0300 ++++ pacman-5.0.1/lib/libalpm/add.c 2016-07-15 09:42:18.848037400 +0300 +@@ -247,6 +247,7 @@ + "filesystem: %o package: %o\n", filename, lsbuf.st_mode & mask, + entrymode & mask); + } ++#ifndef __MSYS__ + + #if 0 + /* Disable this warning until our user management in packages has improved. +@@ -264,6 +265,7 @@ + } + #endif + ++#endif + _alpm_log(handle, ALPM_LOG_DEBUG, "extract: skipping dir extraction of %s\n", + filename); + archive_read_data_skip(archive); +@@ -629,7 +631,10 @@ + int _alpm_upgrade_packages(alpm_handle_t *handle) + { + size_t pkg_count, pkg_current; +- int skip_ldconfig = 0, ret = 0; ++#ifndef __MSYS__ ++ int skip_ldconfig = 0; ++#endif ++ int ret = 0; + alpm_list_t *targ; + alpm_trans_t *trans = handle->trans; + +@@ -652,18 +657,22 @@ + /* something screwed up on the commit, abort the trans */ + trans->state = STATE_INTERRUPTED; + handle->pm_errno = ALPM_ERR_TRANS_ABORT; ++#ifndef __MSYS__ + /* running ldconfig at this point could possibly screw system */ + skip_ldconfig = 1; ++#endif + ret = -1; + } + + pkg_current++; + } + ++#ifndef __MSYS__ + if(!skip_ldconfig) { + /* run ldconfig if it exists */ + _alpm_ldconfig(handle); + } ++#endif + + return ret; + } +diff -Naur pacman-5.0.1-orig/lib/libalpm/alpm.h pacman-5.0.1/lib/libalpm/alpm.h +--- pacman-5.0.1-orig/lib/libalpm/alpm.h 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/lib/libalpm/alpm.h 2016-07-15 09:42:18.878037400 +0300 +@@ -1538,6 +1538,15 @@ + * @return 0 on success, -1 on error (pm_errno is set accordingly) + */ + int alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade); ++#ifdef __MSYS__ ++int alpm_sync_sysupgrade_core(alpm_handle_t *handle, int enable_downgrade); ++ ++/** Informs whether a package is a core package. ++ * @param pkg the package to check ++ * @return non-zero if this is a core package, zero otherwise ++ */ ++int alpm_pkg_is_core_package(const alpm_pkg_t *pkg); ++#endif + + /** Add a package to the transaction. + * If the package was loaded by alpm_pkg_load(), it will be freed upon +diff -Naur pacman-5.0.1-orig/lib/libalpm/package.c pacman-5.0.1/lib/libalpm/package.c +--- pacman-5.0.1-orig/lib/libalpm/package.c 2016-02-23 05:51:26.000000000 +0300 ++++ pacman-5.0.1/lib/libalpm/package.c 2016-07-15 09:42:18.910037400 +0300 +@@ -788,4 +788,20 @@ + return 0; + } + ++#ifdef __MSYS__ ++int SYMEXPORT alpm_pkg_is_core_package(const alpm_pkg_t *pkg) ++{ ++ if (pkg == NULL) ++ return 0; ++ return ++ strcmp(pkg->name, "bash") == 0 || ++ strcmp(pkg->name, "filesystem") == 0 || ++ strcmp(pkg->name, "mintty") == 0 || ++ strcmp(pkg->name, "msys2-runtime") == 0 || ++ strcmp(pkg->name, "msys2-runtime-devel") == 0 || ++ strcmp(pkg->name, "pacman") == 0 || ++ strcmp(pkg->name, "pacman-mirrors") == 0; ++} ++#endif ++ + /* vim: set noet: */ +diff -Naur pacman-5.0.1-orig/lib/libalpm/remove.c pacman-5.0.1/lib/libalpm/remove.c +--- pacman-5.0.1-orig/lib/libalpm/remove.c 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/lib/libalpm/remove.c 2016-07-15 09:42:18.937037400 +0300 +@@ -751,18 +751,22 @@ + if(_alpm_remove_single_package(handle, pkg, NULL, + targ_count, pkg_count) == -1) { + handle->pm_errno = ALPM_ERR_TRANS_ABORT; ++#ifndef __MSYS__ + /* running ldconfig at this point could possibly screw system */ + run_ldconfig = 0; ++#endif + ret = -1; + } + + targ_count++; + } + ++#ifndef __MSYS__ + if(run_ldconfig) { + /* run ldconfig if it exists */ + _alpm_ldconfig(handle); + } ++#endif + + return ret; + } +diff -Naur pacman-5.0.1-orig/lib/libalpm/sync.c pacman-5.0.1/lib/libalpm/sync.c +--- pacman-5.0.1-orig/lib/libalpm/sync.c 2016-02-23 05:51:26.000000000 +0300 ++++ pacman-5.0.1/lib/libalpm/sync.c 2016-07-15 09:42:18.983037400 +0300 +@@ -200,7 +200,12 @@ + } + + /** Search for packages to upgrade and add them to the transaction. */ ++#ifdef __MSYS__ ++static ++int SYMEXPORT do_alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade, int core_update) ++#else + int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade) ++#endif + { + alpm_list_t *i, *j; + alpm_trans_t *trans; +@@ -214,6 +219,13 @@ + for(i = _alpm_db_get_pkgcache(handle->db_local); i; i = i->next) { + alpm_pkg_t *lpkg = i->data; + ++#ifdef __MSYS__ ++ /* Skip regular packages in core update, and core packages in regular update */ ++ if(core_update != alpm_pkg_is_core_package(lpkg)) { ++ continue; ++ } ++#endif ++ + if(alpm_pkg_find(trans->remove, lpkg->name)) { + _alpm_log(handle, ALPM_LOG_DEBUG, "%s is marked for removal -- skipping\n", lpkg->name); + continue; +@@ -255,6 +267,18 @@ + return 0; + } + ++#ifdef __MSYS__ ++int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade) ++{ ++ return do_alpm_sync_sysupgrade(handle, enable_downgrade, 0); ++} ++ ++int SYMEXPORT alpm_sync_sysupgrade_core(alpm_handle_t *handle, int enable_downgrade) ++{ ++ return do_alpm_sync_sysupgrade(handle, enable_downgrade, 1); ++} ++#endif ++ + /** Find group members across a list of databases. + * If a member exists in several databases, only the first database is used. + * IgnorePkg is also handled. +diff -Naur pacman-5.0.1-orig/lib/libalpm/util.c pacman-5.0.1/lib/libalpm/util.c +--- pacman-5.0.1-orig/lib/libalpm/util.c 2016-02-23 05:51:26.000000000 +0300 ++++ pacman-5.0.1/lib/libalpm/util.c 2016-07-15 09:42:19.020037400 +0300 +@@ -735,6 +735,7 @@ + return retval; + } + ++#ifndef __MSYS__ + /** Run ldconfig in a chroot. + * @param handle the context handle + * @return 0 on success, 1 on error +@@ -758,6 +759,7 @@ + + return 0; + } ++#endif + + /** Helper function for comparing strings using the alpm "compare func" + * signature. +diff -Naur pacman-5.0.1-orig/lib/libalpm/version.c pacman-5.0.1/lib/libalpm/version.c +--- pacman-5.0.1-orig/lib/libalpm/version.c 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/lib/libalpm/version.c 2016-07-15 09:42:19.059037400 +0300 +@@ -50,7 +50,11 @@ + /* se points to version terminator */ + se = strrchr(s, '-'); + ++#ifdef __MSYS__ ++ if(*s == '~') { ++#else + if(*s == ':') { ++#endif + epoch = evr; + *s++ = '\0'; + version = s; +@@ -250,7 +254,7 @@ + return 0; + } + +- /* Parse both versions into [epoch:]version[-release] triplets. We probably ++ /* Parse both versions into [epoch:|~]version[-release] triplets. We probably + * don't need epoch and release to support all the same magic, but it is + * easier to just run it all through the same code. */ + full1 = strdup(a); +diff -Naur pacman-5.0.1-orig/Makefile.am pacman-5.0.1/Makefile.am +--- pacman-5.0.1-orig/Makefile.am 2016-01-29 02:50:49.000000000 +0300 ++++ pacman-5.0.1/Makefile.am 2016-07-15 09:42:19.094037400 +0300 +@@ -47,7 +47,6 @@ + PY_LOG_COMPILER = $(PYTHON) $(top_srcdir)/test/pacman/pactest.py + AM_PY_LOG_FLAGS = \ + --scriptlet-shell $(SCRIPTLET_SHELL) \ +- --ldconfig $(LDCONFIG) \ + --bindir $(top_builddir)/src/pacman \ + --bindir $(top_builddir)/scripts + +diff -Naur pacman-5.0.1-orig/scripts/libmakepkg/lint_package/build_references.sh.in pacman-5.0.1/scripts/libmakepkg/lint_package/build_references.sh.in +--- pacman-5.0.1-orig/scripts/libmakepkg/lint_package/build_references.sh.in 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/scripts/libmakepkg/lint_package/build_references.sh.in 2016-07-15 09:42:19.124037400 +0300 +@@ -35,4 +35,12 @@ + if find "${pkgdir}" -type f -print0 | xargs -0 grep -q -I "${pkgdirbase}" ; then + warning "$(gettext "Package contains reference to %s")" "\$pkgdir" + fi ++ ++ # Check for Windows-style MSYS2 root path ++ if find "${pkgdir}" -type f -print0 | xargs -0 grep -iFqI "$(cygpath -m /)" ; then ++ warning "$(gettext "Package contains reference to %s")" "\$(cygpath -m /)" ++ fi ++ if find "${pkgdir}" -type f -print0 | xargs -0 grep -iFqI "$(cygpath -w /)" ; then ++ warning "$(gettext "Package contains reference to %s")" "\$(cygpath -w /)" ++ fi + } +diff -Naur pacman-5.0.1-orig/scripts/libmakepkg/tidy/staticlibs.sh.in pacman-5.0.1/scripts/libmakepkg/tidy/staticlibs.sh.in +--- pacman-5.0.1-orig/scripts/libmakepkg/tidy/staticlibs.sh.in 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/scripts/libmakepkg/tidy/staticlibs.sh.in 2016-07-15 09:42:19.170037400 +0300 +@@ -35,9 +35,9 @@ + msg2 "$(gettext "Removing static library files...")" + local l + while read -rd '' l; do +- if [[ -f "${l%.a}.so" || -h "${l%.a}.so" ]]; then ++ if [[ -f "${l%.a}.dll.a" || -h "${l%.a}.dll.a" ]]; then + rm "$l" + fi +- done < <(find . ! -type d -name "*.a" -print0) ++ done < <(find . ! -type d \( -name "*.a" ! -name "*.dll.a" \) -print0) + fi + } +diff -Naur pacman-5.0.1-orig/scripts/libmakepkg/tidy/strip.sh.in pacman-5.0.1/scripts/libmakepkg/tidy/strip.sh.in +--- pacman-5.0.1-orig/scripts/libmakepkg/tidy/strip.sh.in 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/scripts/libmakepkg/tidy/strip.sh.in 2016-07-15 09:42:19.206037400 +0300 +@@ -31,55 +31,53 @@ + tidy_modify+=('tidy_strip') + + +-build_id() { +- LANG=C readelf -n $1 | sed -n '/Build ID/ { s/.*: //p; q; }' +-} +- + strip_file() { + local binary=$1; shift + +- if check_option "debug" "y"; then +- local bid=$(build_id "$binary") +- +- # has this file already been stripped +- if [[ -n "$bid" ]]; then +- if [[ -f "$dbgdir/.build-id/${bid:0:2}/${bid:2}.debug" ]]; then ++ case "$(file -bi "$binary")" in ++ *application/x-dosexec*) ++ if check_option "debug" "y"; then ++ ++ if [[ -f "$dbgdir/$binary.debug" ]]; then + return + fi +- elif [[ -f "$dbgdir/$binary.debug" ]]; then +- return +- fi +- +- mkdir -p "$dbgdir/${binary%/*}" +- objcopy --only-keep-debug "$binary" "$dbgdir/$binary.debug" +- objcopy --add-gnu-debuglink="$dbgdir/${binary#/}.debug" "$binary" +- +- # create any needed hardlinks +- while read -rd '' file ; do +- if [[ "${binary}" -ef "${file}" && ! -f "$dbgdir/${file}.debug" ]]; then +- mkdir -p "$dbgdir/${file%/*}" +- ln "$dbgdir/${binary}.debug" "$dbgdir/${file}.debug" +- fi +- done < <(find . -type f -perm -u+w -print0 2>/dev/null) + +- if [[ -n "$bid" ]]; then +- local target +- mkdir -p "$dbgdir/.build-id/${bid:0:2}" +- +- target="../../../../../${binary#./}" +- target="${target/..\/..\/usr\/lib\/}" +- target="${target/..\/usr\/}" +- ln -s "$target" "$dbgdir/.build-id/${bid:0:2}/${bid:2}" +- +- target="../../${binary#./}.debug" +- ln -s "$target" "$dbgdir/.build-id/${bid:0:2}/${bid:2}.debug" ++ mkdir -p "$dbgdir/${binary%/*}" ++ msg2 "Separating debug info from $binary into $dbgdir/$binary.debug" ++ # create a dbg file with proper debug info: ++ objcopy --only-keep-debug "$binary" "$dbgdir/$binary.debug" ++ ++ msg2 "Creating a debuginfo link to $dbgdir/$binary.debug in $binary" ++ objcopy --add-gnu-debuglink="$dbgdir/${binary#/}.debug" "$binary" ++ ++ msg2 "Separating (again) debug info from $binary into $dbgdir/$binary.debug" ++ objcopy --only-keep-debug "$binary" "$dbgdir/$binary.debug" ++ ++ msg2 "Removing old .gnu_debuglink section from $binary" ++ objcopy --remove-section=.gnu_debuglink "$binary" ++ ++ # strip debug-info from the original file ++ objcopy --strip-debug "$binary" ++ msg2 "Creating (again) a debuginfo link to $dbgdir/$binary.debug in $binary" ++ objcopy --add-gnu-debuglink="$dbgdir/${binary#/}.debug" "$binary" ++ # This way dbg file gets a .gnu_debuglink section (doesn't matter where ++ # it's pointing), and its contents pass the CRC32 check ++ ++ # create any needed hardlinks ++ while read -rd '' file ; do ++ if [[ "${binary}" -ef "${file}" && ! -f "$dbgdir/${file}.debug" ]]; then ++ mkdir -p "$dbgdir/${file%/*}" ++ ln "$dbgdir/${binary}.debug" "$dbgdir/${file}.debug" ++ fi ++ done < <(find . -type f -perm -u+w -print0 2>/dev/null) ++ + fi +- fi ++ ;; ++ esac + + strip $@ "$binary" + } + +- + tidy_strip() { + if check_option "strip" "y"; then + msg2 "$(gettext "Stripping unneeded symbols from binaries and libraries...")" +@@ -88,13 +86,74 @@ + [[ -z ${STRIP_STATIC+x} ]] && STRIP_STATIC="-S" + + if check_option "debug" "y"; then +- dbgdir="$pkgdir-@DEBUGSUFFIX@/usr/lib/debug" ++ dbgdir="$pkgdir-@DEBUGSUFFIX@" + mkdir -p "$dbgdir" + fi + + local binary strip_flags +- find . -type f -perm -u+w -print0 2>/dev/null | while read -rd '' binary ; do ++ # *.so: Apache2 modules, OCaml stublibs, Ruby modules ++ # *.oct: Octave modules ++ # *.cmxs: OCaml natdynlink modules: http://gallium.inria.fr/~frisch/ndl.txt ++ find * -type f ! -name '*.dll.a' ! -name '*.lib' \ ++ -a \( -name '*.a' -o -name '*.dll' -o -name '*.exe' -o -name '*.so' -o -name '*.so.*' -o -name '*.oct' -o -name '*.cmxs' \) -print0 \ ++ -o -type f -executable ! -name '*.dll' ! -name '*.exe' ! -name '*.so' ! -name '*.so.[0-9]*' ! -name '*.oct' ! -name '*.cmxs' ! -name '*.a' ! -name '*.la' ! -name '*.lib' ! -name '*.exe.manifest' ! -name '*.exe.config' ! -name '*.dll.config' ! -name '*.mdb' ! -name '*-config' ! -name '*.csh' ! -name '*.sh' ! -name '*.pl' ! -name '*.pm' ! -name '*.py' ! -name '*.rb' ! -name '*.tcl' -print0 | \ ++ while read -d $'\0' binary ++ do ++ # assure this is actually a binary object ++ if [ "$(head -c 2 "${binary}")" = '#!' ] ++ then ++ # sometimes .exe will be appended where it does not belong ++ case "${exe}" in ++ usr/lib/hevea/*.exe) ;; ++ *.exe) mv "${binary}" "${binary%.exe}" ;; ++ esac ++ continue ++ fi ++ ++ # OCaml bytecode must not be stripped ++ # Magic number is at end of file: ++ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#74 ++ # http://cygwin.com/ml/cygwin-apps/2010-10/msg00057.html ++ case $(tail -c 12 "${binary}") in ++ Caml1999X0[0-9][0-9]) continue ;; ++ esac ++ ++ # Perl Archive (PAR) binaries must not be stripped ++ # https://rt.cpan.org/Public/Bug/Display.html?id=18536 ++ # http://cygwin.com/ml/cygwin-apps/2012-07/msg00088.html ++ case $(tail -c 8 "${binary}" | tr '\012' '%') in ++ %PAR\.pm%) continue ;; ++ esac ++ ++ # Mono assemblies must not be stripped, but remove .mdb debug symbols, ++ # and make them non-executable so they're not launched by MS .NET ++ if LC_ALL=C file -b "${binary}" 2>&1 | grep -q "Mono/\.Net assembly" ++ then ++ chmod 0644 "${binary}" ++ rm -f "${binary}.mdb" ++ continue ++ fi ++ ++ # check for .exe from non-automake Makefile which install(1) didn't fix ++ # strip(1) used to take care of this, but not anymore ++ case ${CHOST} in ++ *-*-cygwin*|*-*-mingw*|*-*-msys*) ++ case "${binary##*/}" in ++ *.dll|*.exe|*.sfx|*.so|*.so.[0-9]*|*.oct|*.cmxs) ;; ++ # make sure this isn't some oddly named DLL ++ *) if LANG=en_US.UTF-8 LC_ALL=C objdump -f "${binary}" | grep -Eq '^start address 0x(0000000[01])?00401[0-9a-e][0-9a-e]0' ++ then ++ mv "${binary}" "${binary}.exe" ++ binary+=.exe ++ fi ;; ++ esac ++ ;; ++ esac ++ chmod 0755 "${binary}"; ++ + case "$(file -bi "$binary")" in ++ *application/x-dosexec*) # Windows executables and dlls ++ strip_flags="$STRIP_SHARED";; + *application/x-sharedlib*) # Libraries (.so) + strip_flags="$STRIP_SHARED";; + *application/x-archive*) # Libraries (.a) +diff -Naur pacman-5.0.1-orig/scripts/libmakepkg/util/pkgbuild.sh.in pacman-5.0.1/scripts/libmakepkg/util/pkgbuild.sh.in +--- pacman-5.0.1-orig/scripts/libmakepkg/util/pkgbuild.sh.in 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/scripts/libmakepkg/util/pkgbuild.sh.in 2016-07-15 09:42:19.241037400 +0300 +@@ -116,7 +116,11 @@ + ## + get_full_version() { + if (( epoch > 0 )); then +- printf "%s\n" "$epoch:$pkgver-$pkgrel" ++ if [[ -n $MSYSTEM ]]; then ++ printf "%s\n" "${epoch}~${pkgver}-${pkgrel}" ++ else ++ printf "%s\n" "$epoch:$pkgver-$pkgrel" ++ fi + else + printf "%s\n" "$pkgver-$pkgrel" + fi +diff -Naur pacman-5.0.1-orig/scripts/library/utils_fixed_path.sh pacman-5.0.1/scripts/library/utils_fixed_path.sh +--- pacman-5.0.1-orig/scripts/library/utils_fixed_path.sh 1970-01-01 03:00:00.000000000 +0300 ++++ pacman-5.0.1/scripts/library/utils_fixed_path.sh 2016-07-15 09:42:19.277037400 +0300 +@@ -0,0 +1,34 @@ ++if [[ -n "$MSYSTEM" ]]; then ++ readonly -a UTILS_NAME=('bsdtar' ++ 'bzip2' ++ 'bzr' ++ 'cat' ++ 'ccache' ++ 'distcc' ++ 'git' ++ 'gpg' ++ 'gzip' ++ 'hg' ++ 'lzip' ++ 'lzop' ++ 'openssl' ++ 'svn' ++ 'tput' ++ 'uncompress' ++ 'upx' ++ 'xargs' ++ 'xz' ++ ) ++ ++ for wrapper in ${UTILS_NAME[@]}; do ++ eval " ++ ${wrapper}"'() { ++ local UTILS_PATH="/usr/bin/" ++ if ! type -p ${UTILS_PATH}${FUNCNAME[0]} >/dev/null; then ++ error "$(gettext "Cannot find the %s binary required for makepkg.")" "${UTILS_PATH}${FUNCNAME[0]}" ++ exit 1 ++ fi ++ ${UTILS_PATH}${FUNCNAME[0]} "$@" ++ }' ++ done ++fi +diff -Naur pacman-5.0.1-orig/scripts/Makefile.am pacman-5.0.1/scripts/Makefile.am +--- pacman-5.0.1-orig/scripts/Makefile.am 2015-10-18 08:38:28.000000000 +0300 ++++ pacman-5.0.1/scripts/Makefile.am 2016-07-15 09:42:19.306037400 +0300 +@@ -36,7 +36,8 @@ + library/parseopts.sh \ + library/human_to_size.sh \ + library/size_to_human.sh \ +- library/term_colors.sh ++ library/term_colors.sh \ ++ library/utils_fixed_path.sh + + libmakepkgdir = $(datarootdir)/makepkg + +@@ -158,6 +159,7 @@ + $(srcdir)/makepkg.sh.in \ + $(srcdir)/makepkg-wrapper.sh.in \ + $(srcdir)/library/parseopts.sh \ ++ $(srcdir)/library/utils_fixed_path.sh \ + $(LIBMAKEPKG_IN) + + makepkg-template: \ +@@ -170,7 +172,8 @@ + + pacman-db-upgrade: \ + $(srcdir)/pacman-db-upgrade.sh.in \ +- $(srcdir)/library/output_format.sh ++ $(srcdir)/library/output_format.sh \ ++ $(srcdir)/library/utils_fixed_path.sh + + pacman-key: \ + $(srcdir)/pacman-key.sh.in \ +@@ -179,16 +182,19 @@ + + pacman-optimize: \ + $(srcdir)/pacman-optimize.sh.in \ +- $(srcdir)/library/output_format.sh ++ $(srcdir)/library/output_format.sh \ ++ $(srcdir)/library/utils_fixed_path.sh + + pkgdelta: \ + $(srcdir)/pkgdelta.sh.in \ + $(srcdir)/library/output_format.sh \ +- $(srcdir)/library/parseopts.sh ++ $(srcdir)/library/parseopts.sh \ ++ $(srcdir)/library/utils_fixed_path.sh + + repo-add: \ + $(srcdir)/repo-add.sh.in \ +- $(srcdir)/library/output_format.sh ++ $(srcdir)/library/output_format.sh \ ++ $(srcdir)/library/utils_fixed_path.sh + + repo-remove: $(srcdir)/repo-add.sh.in + $(AM_V_at)$(RM) repo-remove +@@ -203,6 +209,7 @@ + $(srcdir)/makepkg-wrapper.sh.in \ + $(srcdir)/makepkg.sh.in \ + $(srcdir)/library/parseopts.sh \ ++ $(srcdir)/library/utils_fixed_path.sh \ + | makepkg + $(AM_V_at)$(MKDIR_P) .lib + $(AM_V_at)mv -f makepkg .lib +diff -Naur pacman-5.0.1-orig/scripts/makepkg.sh.in pacman-5.0.1/scripts/makepkg.sh.in +--- pacman-5.0.1-orig/scripts/makepkg.sh.in 2016-02-23 05:52:34.000000000 +0300 ++++ pacman-5.0.1/scripts/makepkg.sh.in 2016-07-15 09:42:19.375037400 +0300 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + # + # makepkg - make packages compatible for use with pacman + # @configure_input@ +@@ -27,7 +27,7 @@ + + # makepkg uses quite a few external programs during its execution. You + # need to have at least the following installed for makepkg to function: +-# awk, bsdtar (libarchive), bzip2, coreutils, fakeroot, file, find (findutils), ++# awk, bsdtar (libarchive), bzip2, coreutils, file, find (findutils), + # gettext, gpg, grep, gzip, openssl, sed, tput (ncurses), xz + + # gettext initialization +@@ -67,7 +67,6 @@ + GENINTEG=0 + HOLDVER=0 + IGNOREARCH=0 +-INFAKEROOT=0 + INSTALL=0 + LOGGING=0 + NEEDED=0 +@@ -91,6 +90,8 @@ + + shopt -s extglob + ++m4_include(library/utils_fixed_path.sh) ++ + ### SUBROUTINES ### + + # Import libmakepkg +@@ -105,10 +106,9 @@ + trap_exit() { + local signal=$1; shift + +- if (( ! INFAKEROOT )); then +- echo +- error "$@" +- fi ++ echo ++ error "$@" ++ + [[ -n $srclinks ]] && rm -rf "$srclinks" + + # unset the trap for this signal, and then call the default handler +@@ -123,17 +123,12 @@ + clean_up() { + local EXIT_CODE=$? + +- if (( INFAKEROOT )); then +- # Don't clean up when leaving fakeroot, we're not done yet. +- return +- fi +- + if (( ! EXIT_CODE && CLEANUP )); then + local pkg file + + # If it's a clean exit and -c/--clean has been passed... + msg "$(gettext "Cleaning up...")" +- rm -rf "$pkgdirbase" "$srcdir" ++ rm -rf "$pkgdirbase" "$srcdir" "$destdir" + if [[ -n $pkgbase ]]; then + local fullver=$(get_full_version) + # Can't do this unless the BUILDSCRIPT has been sourced. +@@ -223,13 +218,7 @@ + else + cmd=("$PACMAN_PATH" "$@") + fi +- if [[ $1 != -@(T|Qq|Q) ]]; then +- if type -p sudo >/dev/null; then +- cmd=(sudo "${cmd[@]}") +- else +- cmd=(su root -c "$(printf '%q ' "${cmd[@]}")") +- fi +- fi ++ + "${cmd[@]}" + } + +@@ -806,6 +795,8 @@ + + # ensure all necessary build variables are exported + export CPPFLAGS CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS CHOST ++ export MINGW_CHOST MINGW_PREFIX MINGW_PACKAGE_PREFIX ++ export DXSDK_DIR ACLOCAL_PATH PKG_CONFIG_PATH + # save our shell options so pkgfunc() can't override what we need + local shellopts=$(shopt -p) + +@@ -889,7 +880,7 @@ + + sodepends=0; + for d in "${depends[@]}"; do +- if [[ $d = *.so ]]; then ++ if [[ $d = *.dll ]]; then + sodepends=1; + break; + fi +@@ -900,28 +891,33 @@ + return; + fi + +- local libdeps filename soarch sofile soname soversion; ++ local libdeps filename soarch sofile soname; + declare -A libdeps; + + while read -r filename; do +- # get architecture of the file; if soarch is empty it's not an ELF binary +- soarch=$(LC_ALL=C readelf -h "$filename" 2>/dev/null | sed -n 's/.*Class.*ELF\(32\|64\)/\1/p') ++ # get architecture of the file; if soarch is empty it's not an binary ++ soarch=$(LANG=en_US.UTF-8 LC_ALL=C objdump -a "$filename" | sed -n 's/.*file format.*pei-\(i386\|x86-64\)/\1/p') + [[ -n "$soarch" ]] || continue ++ case "$soarch" in ++ i386) ++ soarch=i686 ++ ;; ++ x86-64) ++ soarch=x86_64 ++ ;; ++ esac + + # process all libraries needed by the binary +- for sofile in $(LC_ALL=C readelf -d "$filename" 2>/dev/null | sed -nr 's/.*Shared library: \[(.*)\].*/\1/p') ++ for sofile in $(LC_ALL=C objdump -x "$filename" 2>/dev/null | sed -nr 's/.*DLL Name: (.*).*/\1/p') + do +- # extract the library name: libfoo.so +- soname="${sofile%.so?(+(.+([0-9])))}".so +- # extract the major version: 1 +- soversion="${sofile##*\.so\.}" ++ soname=${sofile} + + if [[ ${libdeps[$soname]} ]]; then +- if [[ ${libdeps[$soname]} != *${soversion}-${soarch}* ]]; then +- libdeps[$soname]+=" ${soversion}-${soarch}" ++ if [[ ${libdeps[$soname]} != *${soarch}* ]]; then ++ libdeps[$soname]+=" ${soarch}" + fi + else +- libdeps[$soname]="${soversion}-${soarch}" ++ libdeps[$soname]="${soarch}" + fi + done + done < <(find "$pkgdir" -type f -perm -u+x) +@@ -929,7 +925,7 @@ + local libdepends v + for d in "${depends[@]}"; do + case "$d" in +- *.so) ++ *.dll) + if [[ ${libdeps[$d]} ]]; then + for v in ${libdeps[$d]}; do + libdepends+=("$d=$v") +@@ -954,32 +950,23 @@ + for p in "${provides[@]}"; do + missing=0 + case "$p" in +- *.so) +- mapfile -t filename < <(find "$pkgdir" -type f -name $p\*) ++ *.dll) ++ mapfile -t filename < <(find "$pkgdir" -type f -name $p) + if [[ $filename ]]; then + # packages may provide multiple versions of the same library + for fn in "${filename[@]}"; do +- # check if we really have a shared object +- if LC_ALL=C readelf -h "$fn" 2>/dev/null | grep -q '.*Type:.*DYN (Shared object file).*'; then +- # get the string binaries link to (e.g. libfoo.so.1.2 -> libfoo.so.1) +- local sofile=$(LC_ALL=C readelf -d "$fn" 2>/dev/null | sed -n 's/.*Library soname: \[\(.*\)\].*/\1/p') +- if [[ -z "$sofile" ]]; then +- warning "$(gettext "Library listed in %s is not versioned: %s")" "'provides'" "$p" +- libprovides+=("$p") +- continue +- fi +- +- # get the library architecture (32 or 64 bit) +- local soarch=$(LC_ALL=C readelf -h "$fn" | sed -n 's/.*Class.*ELF\(32\|64\)/\1/p') +- +- # extract the library major version +- local soversion="${sofile##*\.so\.}" +- +- libprovides+=("${p}=${soversion}-${soarch}") +- else +- warning "$(gettext "Library listed in %s is not a shared object: %s")" "'provides'" "$p" +- libprovides+=("$p") +- fi ++ # get the library architecture (32 or 64 bit) ++ local soarch=$(LC_ALL=C objdump -a "$fn" | sed -n 's/.*file format.*pei-\(i386\|x86-64\)/\1/p') ++ case "$soarch" in ++ i386) ++ soarch=i686 ++ ;; ++ x86-64) ++ soarch=x86_64 ++ ;; ++ esac ++ ++ libprovides+=("${p}=${soarch}") + done + else + libprovides+=("$p") +@@ -1115,7 +1102,6 @@ + + msg2 "$(gettext "Generating %s file...")" ".PKGINFO" + printf "# Generated by makepkg %s\n" "$makepkg_version" +- printf "# using %s\n" "$(fakeroot -v)" + printf "# %s\n" "$(LC_ALL=C date -u)" + + printf "pkgname = %s\n" "$pkgname" +@@ -1234,7 +1220,7 @@ + case "$PKGEXT" in + *tar.gz) ${COMPRESSGZ[@]:-gzip -c -f -n} ;; + *tar.bz2) ${COMPRESSBZ2[@]:-bzip2 -c -f} ;; +- *tar.xz) ${COMPRESSXZ[@]:-xz -c -z -} ;; ++ *tar.xz) ${COMPRESSXZ[@]:-xz -c -z -T0 -} ;; + *tar.lrz) ${COMPRESSLRZ[@]:-lrzip -q} ;; + *tar.lzo) ${COMPRESSLZO[@]:-lzop -q} ;; + *tar.Z) ${COMPRESSZ[@]:-compress -c -f} ;; +@@ -1275,9 +1261,8 @@ + fi + + pkgdir="${pkgdir}-@DEBUGSUFFIX@" +- + # check if we have any debug symbols to package +- if dir_is_empty "$pkgdir/usr/lib/debug"; then ++ if dir_is_empty "$pkgdir"; then + return + fi + +@@ -1517,21 +1502,6 @@ + fi + fi + +- # check for sudo if we will need it during makepkg execution +- if (( DEP_BIN || RMDEPS || INSTALL )); then +- if ! type -p sudo >/dev/null; then +- warning "$(gettext "Cannot find the %s binary. Will use %s to acquire root privileges.")" "sudo" "su" +- fi +- fi +- +- # fakeroot - correct package file permissions +- if check_buildenv "fakeroot" "y" && (( EUID > 0 )); then +- if ! type -p fakeroot >/dev/null; then +- error "$(gettext "Cannot find the %s binary.")" "fakeroot" +- ret=1 +- fi +- fi +- + # gpg - package signing + if [[ $SIGNPKG == 'y' ]] || { [[ -z $SIGNPKG ]] && check_buildenv "sign" "y"; }; then + if ! type -p gpg >/dev/null; then +@@ -1683,6 +1653,11 @@ + local pkgname_backup=("${pkgname[@]}") + for pkgname in ${pkgname_backup[@]}; do + pkgdir="$pkgdirbase/$pkgname" ++ # clean existing pkg directory ++ if [[ -d $pkgdir ]]; then ++ msg "$(gettext "Removing existing %s directory...")" "\$pkgdir/" ++ rm -rf "$pkgdir" ++ fi + mkdir "$pkgdir" + backup_package_variables + run_package $pkgname +@@ -1770,12 +1745,16 @@ + gettext() { + printf "%s\n" "$@" + } ++else ++ gettext() { ++ /usr/bin/gettext "$@" ++ } + fi + + ARGLIST=("$@") + + # Parse Command Line Options. +-OPT_SHORT="AcCdefFghiLmop:rRsSV" ++OPT_SHORT="AcCdefghiLmop:rRsSV" + OPT_LONG=('allsource' 'check' 'clean' 'cleanbuild' 'config:' 'force' 'geninteg' + 'help' 'holdver' 'ignorearch' 'install' 'key:' 'log' 'noarchive' 'nobuild' + 'nocolor' 'nocheck' 'nodeps' 'noextract' 'noprepare' 'nosign' 'packagelist' +@@ -1809,7 +1788,6 @@ + -d|--nodeps) NODEPS=1 ;; + -e|--noextract) NOEXTRACT=1 ;; + -f|--force) FORCE=1 ;; +- -F) INFAKEROOT=1 ;; + # generating integrity checks does not depend on architecture + -g|--geninteg) GENINTEG=1 IGNOREARCH=1;; + --holdver) HOLDVER=1 ;; +@@ -1975,19 +1953,6 @@ + PACKAGER=${_PACKAGER:-$PACKAGER} + CARCH=${_CARCH:-$CARCH} + +-if (( ! INFAKEROOT )); then +- if (( EUID == 0 )); then +- error "$(gettext "Running %s as root is not allowed as it can cause permanent,\n\ +-catastrophic damage to your system.")" "makepkg" +- exit 1 # $E_USER_ABORT +- fi +-else +- if [[ -z $FAKEROOTKEY ]]; then +- error "$(gettext "Do not use the %s option. This option is only for use by %s.")" "'-F'" "makepkg" +- exit 1 # TODO: error code +- fi +-fi +- + unset pkgname pkgbase pkgver pkgrel epoch pkgdesc url license groups provides + unset md5sums replaces depends conflicts backup source install changelog build + unset makedepends optdepends options noextract validpgpkeys +@@ -2105,33 +2070,6 @@ + check_build_status + fi + +-# Run the bare minimum in fakeroot +-if (( INFAKEROOT )); then +- if (( SOURCEONLY )); then +- create_srcpackage +- msg "$(gettext "Leaving %s environment.")" "fakeroot" +- exit 0 # $E_OK +- fi +- +- chmod 755 "$pkgdirbase" +- if (( ! SPLITPKG )); then +- pkgdir="$pkgdirbase/$pkgname" +- mkdir "$pkgdir" +- if (( PKGFUNC )); then +- run_package +- fi +- tidy_install +- lint_package +- create_package +- create_debug_package +- else +- run_split_packaging +- fi +- +- msg "$(gettext "Leaving %s environment.")" "fakeroot" +- exit 0 # $E_OK +-fi +- + msg "$(gettext "Making package: %s")" "$pkgbase $basever ($(date))" + + # if we are creating a source-only package, go no further +@@ -2155,7 +2093,7 @@ + check_source_integrity all + cd_safe "$startdir" + +- enter_fakeroot ++ create_srcpackage + + msg "$(gettext "Source package created: %s")" "$pkgbase ($(date))" + exit 0 +@@ -2245,13 +2183,32 @@ + cd_safe "$startdir" + fi + +- enter_fakeroot +-fi +- +-# if inhibiting archive creation, go no further +-if (( NOARCHIVE )); then +- msg "$(gettext "Package directory is ready.")" +- exit 0 ++ # if inhibiting archive creation, go no further ++ if (( NOARCHIVE )); then ++ msg "$(gettext "Package directory is ready.")" ++ exit 0 ++ fi ++ mkdir -p "$pkgdirbase" ++ chmod a-srwx "$pkgdirbase" ++ chmod 755 "$pkgdirbase" ++ if (( ! SPLITPKG )); then ++ pkgdir="$pkgdirbase/$pkgname" ++ # clean existing pkg directory ++ if [[ -d $pkgdir ]]; then ++ msg "$(gettext "Removing existing %s directory...")" "\$pkgdir/" ++ rm -rf "$pkgdir" ++ fi ++ mkdir "$pkgdir" ++ if (( PKGFUNC )); then ++ run_package ++ fi ++ tidy_install ++ lint_package ++ create_package ++ create_debug_package ++ else ++ run_split_packaging ++ fi + fi + + msg "$(gettext "Finished making: %s")" "$pkgbase $basever ($(date))" +diff -Naur pacman-5.0.1-orig/scripts/makepkg-wrapper.sh.in pacman-5.0.1/scripts/makepkg-wrapper.sh.in +--- pacman-5.0.1-orig/scripts/makepkg-wrapper.sh.in 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/scripts/makepkg-wrapper.sh.in 2016-07-15 09:42:19.421037400 +0300 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + # + # makepkg - a wrapper for running the real makepkg in the source tree + # +diff -Naur pacman-5.0.1-orig/scripts/pacman-db-upgrade.sh.in pacman-5.0.1/scripts/pacman-db-upgrade.sh.in +--- pacman-5.0.1-orig/scripts/pacman-db-upgrade.sh.in 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/scripts/pacman-db-upgrade.sh.in 2016-07-15 09:42:19.456037400 +0300 +@@ -1,4 +1,4 @@ +-#!/bin/bash -e ++#!/usr/bin/env bash + # + # pacman-db-upgrade - upgrade the local pacman db to a newer format + # @configure_input@ +@@ -88,9 +88,13 @@ + # PROGRAM START + + # determine whether we have gettext; make it a no-op if we do not +-if ! type gettext &>/dev/null; then ++if ! type -p gettext >/dev/null; then + gettext() { +- echo "$@" ++ printf "%s\n" "$@" ++ } ++else ++ gettext() { ++ /usr/bin/gettext "$@" + } + fi + +@@ -147,7 +151,7 @@ + + # make sure pacman isn't running + if [[ -f $lockfile ]]; then +- die "$(gettext "Pacman lock file was found. Cannot run while pacman is running.")" ++ die "$(/bin/gettext "Pacman lock file was found. Cannot run while pacman is running.")" + fi + # do not let pacman run while we do this + touch "$lockfile" +diff -Naur pacman-5.0.1-orig/scripts/pacman-key.sh.in pacman-5.0.1/scripts/pacman-key.sh.in +--- pacman-5.0.1-orig/scripts/pacman-key.sh.in 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/scripts/pacman-key.sh.in 2016-07-15 09:42:19.512037400 +0300 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + # + # pacman-key - manages pacman's keyring + # Based on apt-key, from Debian +@@ -52,6 +52,8 @@ + + m4_include(library/parseopts.sh) + ++m4_include(library/utils_fixed_path.sh) ++ + usage() { + printf "pacman-key (pacman) %s\n" ${myver} + echo +@@ -226,7 +228,7 @@ + exit 1 + fi + +- if (( (EXPORT || FINGER || LIST || VERIFY) && EUID != 0 )); then ++ if (( EXPORT || FINGER || LIST || VERIFY )); then + if ! grep -q "^[[:space:]]*lock-never[[:space:]]*$" ${PACMAN_KEYRING_DIR}/gpg.conf &>/dev/null; then + error "$(gettext "You do not have sufficient permissions to run this command.")" + msg "$(gettext "Use '%s' to correct the keyring permissions.")" "pacman-key --init" +@@ -379,7 +381,7 @@ + local ret=0 + for importdir in "$@"; do + if [[ -f "${importdir}/trustdb.gpg" ]]; then +- gpg --homedir "${importdir}" --export-ownertrust | \ ++ /bin/gpg --homedir "${importdir}" --export-ownertrust | \ + "${GPG_PACMAN[@]}" --import-ownertrust - + if (( PIPESTATUS )); then + error "$(gettext "%s could not be imported.")" "${importdir}/trustdb.gpg" +@@ -499,10 +501,14 @@ + fi + } + +-# PROGRAM START +-if ! type gettext &>/dev/null; then ++# determine whether we have gettext; make it a no-op if we do not ++if ! type -p gettext >/dev/null; then ++ gettext() { ++ printf "%s\n" "$@" ++ } ++else + gettext() { +- echo "$@" ++ /usr/bin/gettext "$@" + } + fi + +@@ -560,11 +566,6 @@ + exit 1 + fi + +-if (( (ADD || DELETE || EDITKEY || IMPORT || IMPORT_TRUSTDB || INIT || LSIGNKEY || POPULATE || RECEIVE || REFRESH || UPDATEDB) && EUID != 0 )); then +- error "$(gettext "%s needs to be run as root for this operation.")" "pacman-key" +- exit 1 +-fi +- + CONFIG=${CONFIG:-@sysconfdir@/pacman.conf} + if [[ ! -r "${CONFIG}" ]]; then + error "$(gettext "%s configuration file '%s' not found.")" "pacman" "$CONFIG" +diff -Naur pacman-5.0.1-orig/scripts/pacman-optimize.sh.in pacman-5.0.1/scripts/pacman-optimize.sh.in +--- pacman-5.0.1-orig/scripts/pacman-optimize.sh.in 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/scripts/pacman-optimize.sh.in 2016-07-15 09:42:19.549037400 +0300 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + # + # pacman-optimize + # @configure_input@ +@@ -33,6 +33,8 @@ + + m4_include(library/output_format.sh) + ++m4_include(library/utils_fixed_path.sh) ++ + usage() { + printf "pacman-optimize (pacman) %s\n\n" "$myver" + printf -- "$(gettext "Usage: %s [--nocolor] [pacman_db_root]")\n\n" "$0" +@@ -70,9 +72,13 @@ + # PROGRAM START + + # determine whether we have gettext; make it a no-op if we do not +-if ! type gettext &>/dev/null; then ++if ! type -p gettext >/dev/null; then ++ gettext() { ++ printf "%s\n" "$@" ++ } ++else + gettext() { +- echo "$@" ++ /usr/bin/gettext "$@" + } + fi + +diff -Naur pacman-5.0.1-orig/scripts/pkgdelta.sh.in pacman-5.0.1/scripts/pkgdelta.sh.in +--- pacman-5.0.1-orig/scripts/pkgdelta.sh.in 2015-03-26 07:43:10.000000000 +0300 ++++ pacman-5.0.1/scripts/pkgdelta.sh.in 2016-07-15 09:42:19.591037400 +0300 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + # + # pkgdelta - create delta files for use with pacman and repo-add + # @configure_input@ +@@ -43,6 +43,7 @@ + + m4_include(library/parseopts.sh) + m4_include(library/output_format.sh) ++m4_include(library/utils_fixed_path.sh) + + # print usage instructions + usage() { +@@ -168,6 +169,17 @@ + set -- "${OPTRET[@]}" + unset OPT_SHORT OPT_LONG OPTRET + ++# determine whether we have gettext; make it a no-op if we do not ++if ! type -p gettext >/dev/null; then ++ gettext() { ++ printf "%s\n" "$@" ++ } ++else ++ gettext() { ++ /usr/bin/gettext "$@" ++ } ++fi ++ + # parse arguments + while :; do + case $1 in +diff -Naur pacman-5.0.1-orig/scripts/repo-add.sh.in pacman-5.0.1/scripts/repo-add.sh.in +--- pacman-5.0.1-orig/scripts/repo-add.sh.in 2016-02-22 04:26:22.000000000 +0300 ++++ pacman-5.0.1/scripts/repo-add.sh.in 2016-07-15 09:42:19.644037400 +0300 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + # + # repo-add - add a package to a given repo database file + # repo-remove - remove a package entry from a given repo database file +@@ -46,6 +46,7 @@ + umask 0022 + + m4_include(library/output_format.sh) ++m4_include(library/utils_fixed_path.sh) + + # print usage instructions + usage() { +@@ -707,9 +708,13 @@ + # PROGRAM START + + # determine whether we have gettext; make it a no-op if we do not +-if ! type gettext &>/dev/null; then ++if ! type -p gettext &>/dev/null; then + gettext() { +- echo "$@" ++ printf "%s\n" "$@" ++ } ++else ++ gettext() { ++ /usr/bin/gettext "$@" + } + fi + +diff -Naur pacman-5.0.1-orig/src/pacman/callback.c pacman-5.0.1/src/pacman/callback.c +--- pacman-5.0.1-orig/src/pacman/callback.c 2016-02-23 05:56:52.000000000 +0300 ++++ pacman-5.0.1/src/pacman/callback.c 2016-07-15 09:42:19.660037400 +0300 +@@ -98,8 +98,11 @@ + static void fill_progress(const int bar_percent, const int disp_percent, + const int proglen) + { +- /* 8 = 1 space + 1 [ + 1 ] + 5 for percent */ +- const int hashlen = proglen > 8 ? proglen - 8 : 0; ++ /* 9 = 1 space + 1 [ + 1 ] + 5 for percent + 1 blank */ ++ /* Without the single blank at the end, carriage return wouldn't ++ * work properly on most windows terminals. ++ */ ++ const int hashlen = proglen > 9 ? proglen - 9 : 0; + const int hash = bar_percent * hashlen / 100; + static int lasthash = 0, mouth = 0; + int i; +diff -Naur pacman-5.0.1-orig/src/pacman/check.c pacman-5.0.1/src/pacman/check.c +--- pacman-5.0.1-orig/src/pacman/check.c 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/src/pacman/check.c 2016-07-15 09:42:19.685037400 +0300 +@@ -75,6 +75,7 @@ + int errors = 0; + mode_t fsmode; + ++#ifndef __MSYS__ + /* uid */ + if(st->st_uid != archive_entry_uid(entry)) { + errors++; +@@ -92,6 +93,7 @@ + pkgname, filepath); + } + } ++#endif + + /* mode */ + fsmode = st->st_mode & (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO); +diff -Naur pacman-5.0.1-orig/src/pacman/pacman.c pacman-5.0.1/src/pacman/pacman.c +--- pacman-5.0.1-orig/src/pacman/pacman.c 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/src/pacman/pacman.c 2016-07-15 09:42:19.712037400 +0300 +@@ -1090,7 +1090,9 @@ + { + int ret = 0; + size_t i; ++#ifndef __MSYS__ + uid_t myuid = getuid(); ++#endif + + install_segv_handler(); + +@@ -1213,11 +1215,13 @@ + config->logmask &= ~ALPM_LOG_WARNING; + } + ++#ifndef __MSYS__ + /* check if we have sufficient permission for the requested operation */ + if(myuid > 0 && needs_root()) { + pm_printf(ALPM_LOG_ERROR, _("you cannot perform this operation unless you are root.\n")); + cleanup(EXIT_FAILURE); + } ++#endif + + if(config->verbose > 0) { + alpm_list_t *j; +diff -Naur pacman-5.0.1-orig/src/pacman/sighandler.c pacman-5.0.1/src/pacman/sighandler.c +--- pacman-5.0.1-orig/src/pacman/sighandler.c 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/src/pacman/sighandler.c 2016-07-15 09:42:19.744037400 +0300 +@@ -21,6 +21,10 @@ + #include + #include + ++#ifdef __MSYS__ ++#include ++#endif ++ + #include + + #include "conf.h" +@@ -44,6 +48,9 @@ + */ + static void soft_interrupt_handler(int signum) + { ++#ifdef __MSYS__ ++ struct termios term; ++#endif + if(signum == SIGINT) { + const char msg[] = "\nInterrupt signal received\n"; + xwrite(STDERR_FILENO, msg, ARRAYSIZE(msg) - 1); +@@ -56,6 +63,13 @@ + return; + } + alpm_unlock(config->handle); ++#ifdef __MSYS__ ++ /* restore input printing possibly disabled by core update */ ++ if(tcgetattr(STDIN_FILENO, &term) == 0) { ++ term.c_lflag |= ECHO; ++ tcsetattr(STDIN_FILENO, TCSAFLUSH, &term); ++ } ++#endif + /* output a newline to be sure we clear any line we may be on */ + xwrite(STDOUT_FILENO, "\n", 1); + _Exit(128 + signum); +diff -Naur pacman-5.0.1-orig/src/pacman/sync.c pacman-5.0.1/src/pacman/sync.c +--- pacman-5.0.1-orig/src/pacman/sync.c 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/src/pacman/sync.c 2016-07-15 09:42:19.779037400 +0300 +@@ -28,6 +28,12 @@ + #include + #include + ++#ifdef __MSYS__ ++#include ++#include ++#include ++#endif ++ + #include + #include + +@@ -670,8 +676,74 @@ + return ret; + } + ++#ifdef __MSYS__ ++static int wait_indefinitely(void) ++{ ++ struct termios term; ++ ++ /* disable input printing */ ++ if(tcgetattr(STDIN_FILENO, &term) == 0) { ++ term.c_lflag &= ~ECHO; ++ tcsetattr(STDIN_FILENO, TCSAFLUSH, &term); ++ } ++ ++ while (1) { ++ getchar(); ++ } ++} ++ ++static int core_update(int *needed) ++{ ++ int retval; ++ alpm_list_t *i; ++ alpm_list_t *core = NULL; ++ ++ colon_printf(_("Starting core system upgrade...\n")); ++ alpm_logaction(config->handle, PACMAN_CALLER_PREFIX, ++ "starting core system upgrade\n"); ++ ++ if(alpm_sync_sysupgrade_core(config->handle, config->op_s_upgrade >= 2) == -1) { ++ pm_printf(ALPM_LOG_ERROR, "%s\n", alpm_strerror(alpm_errno(config->handle))); ++ trans_release(); ++ return 1; ++ } ++ ++ *needed = 0; ++ for(i = alpm_trans_get_add(config->handle); i; i = i->next) { ++ alpm_pkg_t *pkg = i->data; ++ if (alpm_pkg_is_core_package(pkg)) { ++ core = alpm_list_add(core, pkg); ++ *needed = 1; ++ } ++ } ++ ++ if(!(*needed)) { ++ if (!config->print) { ++ printf(_(" there is nothing to do\n")); ++ } ++ return 0; ++ } ++ ++ config->handle->trans->add = core; ++ pm_printf(ALPM_LOG_WARNING, _("terminate other MSYS2 programs before proceeding\n")); ++ if((retval = sync_prepare_execute()) == 0) { ++ pm_printf(ALPM_LOG_WARNING, _("terminate MSYS2 without returning to shell and check for updates again\n")); ++ pm_printf(ALPM_LOG_WARNING, _("for example close your terminal window instead of calling exit")); ++ if(config->noconfirm) { ++ fprintf(stdout, "\n"); ++ return 0; ++ } ++ wait_indefinitely(); ++ } ++ return retval; ++} ++#endif ++ + static int sync_trans(alpm_list_t *targets) + { ++#ifdef __MSYS__ ++ int found_core_updates = 0; ++#endif + int retval = 0; + alpm_list_t *i; + +@@ -694,6 +766,14 @@ + } + + if(config->op_s_upgrade) { ++#ifdef __MSYS__ ++ if(retval = core_update(&found_core_updates)) { ++ return retval; ++ } ++ if(found_core_updates) { ++ return retval; ++ } ++#endif + colon_printf(_("Starting full system upgrade...\n")); + alpm_logaction(config->handle, PACMAN_CALLER_PREFIX, + "starting full system upgrade\n"); +diff -Naur pacman-5.0.1-orig/test/pacman/ldconfig.stub pacman-5.0.1/test/pacman/ldconfig.stub +--- pacman-5.0.1-orig/test/pacman/ldconfig.stub 2013-04-30 15:05:45.000000000 +0400 ++++ pacman-5.0.1/test/pacman/ldconfig.stub 1970-01-01 03:00:00.000000000 +0300 +@@ -1,4 +0,0 @@ +-#!/bin/sh +-# A simple stub to copy into the chroot to fake ldconfig. +-# Simply appends a line to /etc/ld.so.cache if called. +-echo "ldconfig called" >> /etc/ld.so.cache +diff -Naur pacman-5.0.1-orig/test/pacman/Makefile.am pacman-5.0.1/test/pacman/Makefile.am +--- pacman-5.0.1-orig/test/pacman/Makefile.am 2014-12-21 09:24:36.000000000 +0300 ++++ pacman-5.0.1/test/pacman/Makefile.am 2016-07-15 09:42:19.825037400 +0300 +@@ -17,7 +17,6 @@ + README \ + TODO \ + ChangeLog \ +- ldconfig.stub \ + $(check_SCRIPTS) + + # vim:set noet: +diff -Naur pacman-5.0.1-orig/test/pacman/pactest.py pacman-5.0.1/test/pacman/pactest.py +--- pacman-5.0.1-orig/test/pacman/pactest.py 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/test/pacman/pactest.py 2016-07-15 09:42:19.850037400 +0300 +@@ -68,9 +68,6 @@ + parser.add_option("--scriptlet-shell", type = "string", + dest = "scriptletshell", default = "/bin/sh", + help = "specify path to shell used for install scriptlets") +- parser.add_option("--ldconfig", type = "string", +- dest = "ldconfig", default = "/sbin/ldconfig", +- help = "specify path to ldconfig") + return parser + + +@@ -103,7 +100,6 @@ + env.pacman["valgrind"] = opts.valgrind + env.pacman["manual-confirm"] = opts.manualconfirm + env.pacman["scriptlet-shell"] = opts.scriptletshell +- env.pacman["ldconfig"] = opts.ldconfig + + try: + for i in args: +diff -Naur pacman-5.0.1-orig/test/pacman/pmtest.py pacman-5.0.1/test/pacman/pmtest.py +--- pacman-5.0.1-orig/test/pacman/pmtest.py 2016-01-04 06:27:45.000000000 +0300 ++++ pacman-5.0.1/test/pacman/pmtest.py 2016-07-15 09:42:19.875037400 +0300 +@@ -127,12 +127,10 @@ + logdir = os.path.join(self.root, os.path.dirname(util.LOGFILE)) + etcdir = os.path.join(self.root, os.path.dirname(util.PACCONF)) + bindir = os.path.join(self.root, "bin") +- ldconfig = os.path.basename(pacman["ldconfig"]) +- ldconfigdir = os.path.join(self.root, os.path.dirname(pacman["ldconfig"][1:])) + shell = pacman["scriptlet-shell"][1:] + shelldir = os.path.join(self.root, os.path.dirname(shell)) + sys_dirs = [dbdir, cachedir, syncdir, tmpdir, logdir, etcdir, bindir, +- ldconfigdir, shelldir] ++ shelldir] + for sys_dir in sys_dirs: + if not os.path.isdir(sys_dir): + vprint("\t%s" % sys_dir[len(self.root)+1:]) +@@ -141,10 +139,6 @@ + shutil.copy("/bin/sh", bindir) + if shell != "bin/sh": + shutil.copy("/bin/sh", os.path.join(self.root, shell)) +- shutil.copy(os.path.join(util.SELFPATH, "ldconfig.stub"), +- os.path.join(ldconfigdir, ldconfig)) +- ld_so_conf = open(os.path.join(etcdir, "ld.so.conf"), "w") +- ld_so_conf.close() + + # Configuration file + vprint(" Creating configuration file") +@@ -228,19 +222,6 @@ + vprint("\tpacman %s" % self.args) + + cmd = [] +- if os.geteuid() != 0: +- fakeroot = util.which("fakeroot") +- if not fakeroot: +- tap.diag("WARNING: fakeroot not found!") +- else: +- cmd.append("fakeroot") +- +- fakechroot = util.which("fakechroot") +- if not fakechroot: +- tap.diag("WARNING: fakechroot not found!") +- else: +- cmd.append("fakechroot") +- + if pacman["gdb"]: + cmd.extend(["libtool", "execute", "gdb", "--args"]) + if pacman["valgrind"]: +@@ -281,8 +262,9 @@ + # Change to the tmp dir before running pacman, so that local package + # archives are made available more easily. + time_start = time.time() +- self.retcode = subprocess.call(cmd, stdout=output, stderr=output, +- cwd=os.path.join(self.root, util.TMPDIR), env={'LC_ALL': 'C'}) ++ self.retcode = subprocess.call(cmd, ++ cwd=os.path.join(self.root, util.TMPDIR), ++ env={'LC_ALL': 'C', 'PATH': os.environ['PATH']}) + time_end = time.time() + vprint("\ttime elapsed: %.2fs" % (time_end - time_start)) + +diff -Naur pacman-5.0.1-orig/test/pacman/tests/ldconfig001.py pacman-5.0.1/test/pacman/tests/ldconfig001.py +--- pacman-5.0.1-orig/test/pacman/tests/ldconfig001.py 2013-04-30 15:05:45.000000000 +0400 ++++ pacman-5.0.1/test/pacman/tests/ldconfig001.py 1970-01-01 03:00:00.000000000 +0300 +@@ -1,9 +0,0 @@ +-self.description = "Make sure ldconfig runs on an upgrade operation" +- +-p = pmpkg("dummy") +-self.addpkg(p) +- +-self.args = "-U %s" % p.filename() +- +-self.addrule("PACMAN_RETCODE=0") +-self.addrule("FILE_EXIST=etc/ld.so.cache") +diff -Naur pacman-5.0.1-orig/test/pacman/tests/ldconfig002.py pacman-5.0.1/test/pacman/tests/ldconfig002.py +--- pacman-5.0.1-orig/test/pacman/tests/ldconfig002.py 2013-04-30 15:05:45.000000000 +0400 ++++ pacman-5.0.1/test/pacman/tests/ldconfig002.py 1970-01-01 03:00:00.000000000 +0300 +@@ -1,13 +0,0 @@ +-self.description = "Make sure ldconfig runs on an upgrade operation" +- +-lp = pmpkg("dummy") +-self.addpkg2db("local", lp) +- +-p = pmpkg("dummy", "1.0-2") +-self.addpkg(p) +- +-self.args = "-U %s" % p.filename() +- +-self.addrule("PACMAN_RETCODE=0") +-self.addrule("PKG_VERSION=dummy|1.0-2") +-self.addrule("FILE_EXIST=etc/ld.so.cache") +diff -Naur pacman-5.0.1-orig/test/pacman/tests/ldconfig003.py pacman-5.0.1/test/pacman/tests/ldconfig003.py +--- pacman-5.0.1-orig/test/pacman/tests/ldconfig003.py 2013-04-30 15:05:45.000000000 +0400 ++++ pacman-5.0.1/test/pacman/tests/ldconfig003.py 1970-01-01 03:00:00.000000000 +0300 +@@ -1,9 +0,0 @@ +-self.description = "Make sure ldconfig runs on a sync operation" +- +-sp = pmpkg("dummy") +-self.addpkg2db("sync", sp) +- +-self.args = "-S %s" % sp.name +- +-self.addrule("PACMAN_RETCODE=0") +-self.addrule("FILE_EXIST=etc/ld.so.cache") +diff -Naur pacman-5.0.1-orig/test/pacman/tests/TESTS pacman-5.0.1/test/pacman/tests/TESTS +--- pacman-5.0.1-orig/test/pacman/tests/TESTS 2016-02-23 05:51:26.000000000 +0300 ++++ pacman-5.0.1/test/pacman/tests/TESTS 2016-07-15 09:42:19.906037400 +0300 +@@ -72,9 +72,6 @@ + TESTS += test/pacman/tests/ignore006.py + TESTS += test/pacman/tests/ignore007.py + TESTS += test/pacman/tests/ignore008.py +-TESTS += test/pacman/tests/ldconfig001.py +-TESTS += test/pacman/tests/ldconfig002.py +-TESTS += test/pacman/tests/ldconfig003.py + TESTS += test/pacman/tests/mode001.py + TESTS += test/pacman/tests/mode002.py + TESTS += test/pacman/tests/mode003.py diff --git a/pacman/0001-more-debugging-info.patch b/pacman/0001-more-debugging-info.patch index db53c9ebb62..6161c122818 100644 --- a/pacman/0001-more-debugging-info.patch +++ b/pacman/0001-more-debugging-info.patch @@ -1,17 +1,7 @@ -From df107840c82d70745a3f22721162bf2cfcec5776 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Fri, 13 Jun 2014 00:12:33 +0100 -Subject: [PATCH 1/4] more debugging info - ---- - lib/libalpm/util.c | 21 +++++++++++++++++++-- - 1 file changed, 19 insertions(+), 2 deletions(-) - -diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c -index ebccc39..d565fdb 100644 ---- a/lib/libalpm/util.c -+++ b/lib/libalpm/util.c -@@ -300,6 +300,23 @@ int _alpm_unpack_single(alpm_handle_t *handle, const char *archive, +diff -Naur pacman-5.0.1-orig/lib/libalpm/util.c pacman-5.0.1/lib/libalpm/util.c +--- pacman-5.0.1-orig/lib/libalpm/util.c 2016-07-15 09:42:21.400037400 +0300 ++++ pacman-5.0.1/lib/libalpm/util.c 2016-07-15 09:42:22.245037400 +0300 +@@ -300,6 +300,23 @@ return ret; } @@ -35,7 +25,7 @@ index ebccc39..d565fdb 100644 /** Unpack a list of files in an archive. * @param handle the context handle * @param path the archive to unpack -@@ -557,7 +574,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[]) +@@ -629,7 +646,7 @@ umask(0022); execv(cmd, argv); /* execv only returns if there was an error */ @@ -44,7 +34,7 @@ index ebccc39..d565fdb 100644 exit(1); } else { /* this code runs for the parent only (wait on the child) */ -@@ -602,7 +619,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[]) +@@ -708,7 +725,7 @@ if(WIFEXITED(status)) { _alpm_log(handle, ALPM_LOG_DEBUG, "call to waitpid succeeded\n"); if(WEXITSTATUS(status) != 0) { @@ -53,6 +43,3 @@ index ebccc39..d565fdb 100644 retval = 1; } } else if(WIFSIGNALED(status) != 0) { --- -2.1.2 - diff --git a/pacman/0004-Link-pacman-with-static-libraries.patch b/pacman/0004-Link-pacman-with-static-libraries.patch index 95272ce5359..7174269e337 100644 --- a/pacman/0004-Link-pacman-with-static-libraries.patch +++ b/pacman/0004-Link-pacman-with-static-libraries.patch @@ -1,19 +1,7 @@ -From 0fd91197c5e51069fa5abe6ec2733a09fb903ff7 Mon Sep 17 00:00:00 2001 -From: Alexey Pavlov -Date: Thu, 23 Oct 2014 13:48:29 +0400 -Subject: [PATCH 4/4] Link pacman with static libraries. - ---- - lib/libalpm/Makefile.am | 2 +- - src/pacman/Makefile.am | 2 ++ - src/util/Makefile.am | 1 + - 3 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am -index 1649814..ef22e28 100644 ---- a/lib/libalpm/Makefile.am -+++ b/lib/libalpm/Makefile.am -@@ -63,7 +63,7 @@ libalpm_la_SOURCES += \ +diff -Naur pacman-5.0.1-orig/lib/libalpm/Makefile.am pacman-5.0.1/lib/libalpm/Makefile.am +--- pacman-5.0.1-orig/lib/libalpm/Makefile.am 2015-10-18 08:38:28.000000000 +0300 ++++ pacman-5.0.1/lib/libalpm/Makefile.am 2016-07-15 09:42:23.014037400 +0300 +@@ -64,7 +64,7 @@ sha2.h sha2.c endif @@ -22,11 +10,10 @@ index 1649814..ef22e28 100644 libalpm_la_CFLAGS = \ $(AM_CFLAGS) \ -diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am -index 5f10308..a132498 100644 ---- a/src/pacman/Makefile.am -+++ b/src/pacman/Makefile.am -@@ -22,6 +22,8 @@ AM_CPPFLAGS = \ +diff -Naur pacman-5.0.1-orig/src/pacman/Makefile.am pacman-5.0.1/src/pacman/Makefile.am +--- pacman-5.0.1-orig/src/pacman/Makefile.am 2015-12-05 15:40:17.000000000 +0300 ++++ pacman-5.0.1/src/pacman/Makefile.am 2016-07-15 09:42:23.016037400 +0300 +@@ -24,6 +24,8 @@ AM_CFLAGS = -pedantic -D_GNU_SOURCE $(WARNING_CFLAGS) \ $(LIBARCHIVE_CFLAGS) @@ -35,11 +22,10 @@ index 5f10308..a132498 100644 if USE_GIT_VERSION GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//') AM_CPPFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" -diff --git a/src/util/Makefile.am b/src/util/Makefile.am -index a007588..0e50c64 100644 ---- a/src/util/Makefile.am -+++ b/src/util/Makefile.am -@@ -17,6 +17,7 @@ AM_CPPFLAGS = \ +diff -Naur pacman-5.0.1-orig/src/util/Makefile.am pacman-5.0.1/src/util/Makefile.am +--- pacman-5.0.1-orig/src/util/Makefile.am 2015-05-12 07:00:54.000000000 +0300 ++++ pacman-5.0.1/src/util/Makefile.am 2016-07-15 09:42:23.019037400 +0300 +@@ -17,6 +17,7 @@ AM_CFLAGS = -pedantic -D_GNU_SOURCE $(WARNING_CFLAGS) \ $(LIBARCHIVE_CFLAGS) @@ -47,6 +33,3 @@ index a007588..0e50c64 100644 cleanupdelta_SOURCES = cleanupdelta.c cleanupdelta_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la --- -2.1.2 - diff --git a/pacman/0005-Hack-gettext-libalpm-pkg-config-static-link.patch b/pacman/0005-Hack-gettext-libalpm-pkg-config-static-link.patch index 62895de9203..ea15f961b23 100644 --- a/pacman/0005-Hack-gettext-libalpm-pkg-config-static-link.patch +++ b/pacman/0005-Hack-gettext-libalpm-pkg-config-static-link.patch @@ -1,25 +1,9 @@ -From 029f10570b095cef5fe6ed1d3325098af01cd1ca Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Sat, 12 Mar 2016 17:49:38 +0000 -Subject: [PATCH] Hack gettext libalpm pkg-config static link - -It is better this way since gettext.m4 is not something -you want to get involved with, nor does it set variables -that you can re-use. ---- - lib/libalpm/libalpm.pc.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/libalpm/libalpm.pc.in b/lib/libalpm/libalpm.pc.in -index e4be174..93eda14 100644 ---- a/lib/libalpm/libalpm.pc.in -+++ b/lib/libalpm/libalpm.pc.in -@@ -9,4 +9,4 @@ URL: http://www.archlinux.org/pacman/ +diff -Naur pacman-5.0.1-orig/lib/libalpm/libalpm.pc.in pacman-5.0.1/lib/libalpm/libalpm.pc.in +--- pacman-5.0.1-orig/lib/libalpm/libalpm.pc.in 2015-12-05 15:40:17.000000000 +0300 ++++ pacman-5.0.1/lib/libalpm/libalpm.pc.in 2016-07-15 09:42:23.555037400 +0300 +@@ -9,4 +9,4 @@ Version: @LIB_VERSION@ Cflags: -I${includedir} @LFS_CFLAGS@ Libs: -L${libdir} -lalpm -Libs.private: @LIBS@ @LIBARCHIVE_LIBS@ @LIBSSL_LIBS@ @LIBCURL_LIBS@ @GPGME_LIBS@ +Libs.private: @LIBS@ @LIBARCHIVE_LIBS@ @LIBSSL_LIBS@ @LIBCURL_LIBS@ @GPGME_LIBS@ -lintl -liconv --- -2.7.2 - diff --git a/pacman/PKGBUILD b/pacman/PKGBUILD index 35bc66ecc72..5ab90173d33 100644 --- a/pacman/PKGBUILD +++ b/pacman/PKGBUILD @@ -3,8 +3,7 @@ # Contributor: Ray Donnelly pkgname=pacman -_base_ver=5.0.1 -pkgver=5.0.1.6416.4ee6fd4 +pkgver=5.0.1 pkgrel=1 pkgdesc="A library-based package manager with dependency support (MSYS2 port)" arch=('i686' 'x86_64') @@ -47,60 +46,46 @@ backup=("etc/pacman.conf" "etc/makepkg.conf" "etc/makepkg_mingw32.conf" "etc/makepkg_mingw64.conf") -source=("${pkgname}"::'git+https://github.com/Alexpux/MSYS2-pacman.git' +source=(https://sources.archlinux.org/other/pacman/${pkgname}-${pkgver}.tar.gz{,.sig} "pacman.conf" "makepkg.conf" "makepkg_mingw32.conf" "makepkg_mingw64.conf" "makepkg-mingw" + 0000-pacman-msysize.patch "0001-more-debugging-info.patch" "0002-Add-util-msys2.-c-h-and-rebase-db-msys2.-c.patch" "0003-use-busybox-for-msys2-post-installs.patch" "0004-Link-pacman-with-static-libraries.patch" "0005-Hack-gettext-libalpm-pkg-config-static-link.patch") -sha256sums=('SKIP' +sha256sums=('8bd5f407ce8e05c4be8f1c4be4d8dcc8550ea5e494937da5220ea2c23cbb8e04' + 'SKIP' '6024bbf50cc92236b7b437430cb9e4180da91925cdc19a5a7910fe172931cfb6' - 'dde599a9939a82df587a593cf3631fa5ed25f08adb1919838d1b8444154ec6c5' - 'aa28272514adf41a8370b8f37b5e45b961a5c24fa29613fd7aaa7255488eb8df' - '1c22681551ab5ad078f53a103742c4849c834b79327f00cde15cdc0d79c6dabe' + '60a1c74dcaf8353175b6869f7a1818a1ea25a6cc6cf042b43f7ff6d538ed5f54' + 'e1e2f7a4ad1f0a26e72b0fbd68630392ce487c81f852474ca45c3728e00f0cc8' + 'b63fd1ef326f75a17f892cef15a8874bba49a13b4c64d01f34e37548f3bfaeba' '40109ac4f4e200ae9f76864231527f5f1049c27800e78d04656fcf5844ed789d' - 'd4123434a885aac03e866cdb79332d075b2f24fbbff3cd306c6f1f6d6c0a649a' + '1c4c19dce8ed4bb01d582fd3b96b093abd3bd244d21240c25235184cb25fde36' + '24ea2c8dca37847e04894ebfd05d1cf5df49dc0c8089f5581c99caa19b77a7ef' '928ed3ab09ec57dfd652112bc881b06ef0978f4dcfebb87c43822ea8ad7557a8' '23132552a388b238acf8bf650b5c2aa08cf3de63c647e84ad551807c4edfeb1e' - '0393a5769b6c02b65f25cf15b513011ec23c7936ce27a47b815f3ea3a789ca40' - 'c7d7dd0f70687e17df0346ad1b1d9a0476c1f02422172c7db5465ef832489bc2') - -pkgver() { - cd "${srcdir}/${pkgname}" - printf "%s.%s.%s" ${_base_ver} "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" - #printf "%s.%s.%s" "$(git describe --tags --abbrev=0 | sed 's/^v//')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} + '1ec59e4262546a4f25432a9194adadd039641f61225c71e56464dc641ae4a299' + '1c71c5f38a408fbc027db164730739e644047706a0ea3f8330ea1666a58e3e91') prepare() { - cd ${srcdir}/${pkgname} - git am "${srcdir}"/0001-more-debugging-info.patch + cd ${srcdir}/${pkgname}-${pkgver} + patch -p1 -i ${srcdir}/0000-pacman-msysize.patch + patch -p1 -i ${srcdir}/0001-more-debugging-info.patch #git am "${srcdir}"/0002-Add-util-msys2.-c-h-and-rebase-db-msys2.-c.patch #git am "${srcdir}"/0003-use-busybox-for-msys2-post-installs.patch - git am "${srcdir}"/0004-Link-pacman-with-static-libraries.patch - git am "${srcdir}"/0005-Hack-gettext-libalpm-pkg-config-static-link.patch - - # Workaround for symlinks - rm src/util/util-common.{h,c} - cp src/{common,pacman}/ini.h - cp src/{common,pacman}/ini.c - - cp {src/common,lib/libalpm}/ini.h - cp {src/common,lib/libalpm}/ini.c - - cp src/{common,util}/util-common.h - cp src/{common,util}/util-common.c + patch -p1 -i ${srcdir}/0004-Link-pacman-with-static-libraries.patch + patch -p1 -i ${srcdir}/0005-Hack-gettext-libalpm-pkg-config-static-link.patch autoreconf -fi } build() { - cd ${srcdir}/${pkgname} - ./autogen.sh + cd ${srcdir}/${pkgname}-${pkgver} export PKG_CONFIG="/usr/bin/pkg-config --static" ./configure \ @@ -120,11 +105,11 @@ build() { } check() { - make -C "${pkgname}" check + make -C "${pkgname}-${pkgver}" check } package() { - cd ${srcdir}/${pkgname} + cd ${srcdir}/${pkgname}-${pkgver} make -j1 DESTDIR=${pkgdir} install make -j1 DESTDIR=${pkgdir} -C contrib install From 1942ce3fcdf585ad52a3d5a4de078750ee84912a Mon Sep 17 00:00:00 2001 From: Karlson2k Date: Sat, 16 Jul 2016 18:32:15 +0300 Subject: [PATCH 088/101] msys2_shell.cmd: Stop deprecating parameters, give users freedom to use whatever they found convenient --- filesystem/msys2_shell.cmd | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index 20d967a32e9..b4c69043018 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -26,10 +26,10 @@ if "x%~1" == "x-help" ( ) rem Shell types if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams -if "x%~1" == "x-msys2" shift& set MSYSTEM=MSYS& set _deprecated_msys2=true& goto :checkparams +if "x%~1" == "x-msys2" shift& set MSYSTEM=MSYS& goto :checkparams if "x%~1" == "x-mingw32" shift& set MSYSTEM=MINGW32& goto :checkparams if "x%~1" == "x-mingw64" shift& set MSYSTEM=MINGW64& goto :checkparams -if "x%~1" == "x-mingw" shift& set _deprecated_mingw=true& (if exist "%WD%..\..\mingw64" (set MSYSTEM=MINGW64) else (set MSYSTEM=MINGW32))& goto :checkparams +if "x%~1" == "x-mingw" shift& (if exist "%WD%..\..\mingw64" (set MSYSTEM=MINGW64) else (set MSYSTEM=MINGW32))& goto :checkparams rem Console types if "x%~1" == "x-consolez" shift& set MSYSCON=console.exe& goto :checkparams if "x%~1" == "x-mintty" shift& set MSYSCON=mintty.exe& goto :checkparams @@ -37,30 +37,11 @@ if "x%~1" == "x-conemu" shift& set MSYSCON=conemu& goto :checkparams if "x%~1" == "x-defterm" shift& set MSYSCON=defterm& goto :checkparams rem Other parameters if "x%~1" == "x-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams -if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& set _deprecated_use_full_path=true& goto :checkparams +if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams if "x%~1" == "x-here" shift& set CHERE_INVOKING=enabled_from_arguments& goto :checkparams -if "x%~1" == "x-where" shift& set CHERE_INVOKING=enabled_from_arguments& set _deprecated_where=true& goto :checkparams +if "x%~1" == "x-where" shift& set CHERE_INVOKING=enabled_from_arguments& goto :checkparams if "x%CHERE_INVOKING%" == "xenabled_from_arguments" if not "%~1" == "" if exist "%~1\" shift& cd /d "%~1\"& goto :checkparams -rem Deprecated parameters -rem TODO: remove this check when most users have stopped using them -if "x%_deprecated_use_full_path%" == "xtrue" ( - echo The MSYS2 shell has been started with the deprecated -use-full-path> "%WD%..\..\etc\profile.d\msys2_shell.use_full_path.warning.once" - echo option. Please update your shortcuts to use -full-path instead.>> "%WD%..\..\etc\profile.d\msys2_shell.use_full_path.warning.once" -) -if "x%_deprecated_where%" == "xtrue" ( - echo The MSYS2 shell has been started with the deprecated -where> "%WD%..\..\etc\profile.d\msys2_shell.where.warning.once" - echo option. Please update your shortcuts to use -here instead.>> "%WD%..\..\etc\profile.d\msys2_shell.where.warning.once" -) -if "x%_deprecated_msys2%" == "xtrue" ( - echo The MSYS2 shell has been started with the deprecated -msys2> "%WD%..\..\etc\profile.d\msys2_shell.msys2.warning.once" - echo option. Please update your shortcuts to use -msys instead.>> "%WD%..\..\etc\profile.d\msys2_shell.msys2.warning.once" -) -if "x%_deprecated_mingw%" == "xtrue" ( - echo The MSYS2 shell has been started with the deprecated -mingw option.> "%WD%..\..\etc\profile.d\msys2_shell.mingw.warning.once" - echo Please update your shortcuts to use -mingw32 or -mingw64 instead.>> "%WD%..\..\etc\profile.d\msys2_shell.mingw.warning.once" -) - rem Setup proper title if "%MSYSTEM%" == "MINGW32" ( set "CONTITLE=MinGW x32" From ae96deba82c91c147752356a4adbc06399068c0e Mon Sep 17 00:00:00 2001 From: Karlson2k Date: Sat, 16 Jul 2016 18:36:22 +0300 Subject: [PATCH 089/101] msys2_shell.cmd: Fixed running with conemu if path (for any strange reason) has spaces --- filesystem/msys2_shell.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index b4c69043018..b00d027eb62 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -72,7 +72,7 @@ call :conemudetect || ( echo ConEmu not found. Exiting. 1>&2 exit /b 1 ) -start "%CONTITLE%" "%ComEmuCommand%" /Here /Icon "%WD%..\..\msys2.ico" /cmd %WD%bash --login %1 %2 %3 %4 %5 %6 %7 %8 %9 +start "%CONTITLE%" "%ComEmuCommand%" /Here /Icon "%WD%..\..\msys2.ico" /cmd "%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9 exit /b %ERRORLEVEL% :startsh From f777b848dcf863f059031640704bc341136258b5 Mon Sep 17 00:00:00 2001 From: Karlson2k Date: Sat, 16 Jul 2016 18:39:11 +0300 Subject: [PATCH 090/101] msys2_shell.cmd: Fixed running with ConsoleZ. 'start' command like to use first quoted parameter as title. --- filesystem/msys2_shell.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index b00d027eb62..8584961bdf2 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -64,7 +64,7 @@ exit /b %ERRORLEVEL% :startconsolez cd %WD%..\lib\ConsoleZ -start console -t "%CONTITLE%" -r %1 %2 %3 %4 %5 %6 %7 %8 %9 +start "%CONTITLE%" console -t "%CONTITLE%" -r %1 %2 %3 %4 %5 %6 %7 %8 %9 exit /b %ERRORLEVEL% :startconemu From 222dd3a2ef14756119626cb47fd8b54ece58e637 Mon Sep 17 00:00:00 2001 From: Karlson2k Date: Sat, 16 Jul 2016 19:05:00 +0300 Subject: [PATCH 091/101] msys2_shell.cmd: Improved help display --- filesystem/msys2_shell.cmd | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index 8584961bdf2..48379eb04b3 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -17,11 +17,7 @@ rem set MSYS2_PATH_TYPE=inherit :checkparams rem Help option if "x%~1" == "x-help" ( - echo Options: - echo -mingw32,mingw64,msys Set shell type - echo -defterm,mintty,conemu,consolez Set terminal type - echo -here [DIRECTORY] Starting directory - echo -full-path Inherit Windows path + call :printhelp "%~nx0" exit /b 1 ) rem Shell types @@ -124,3 +120,20 @@ if not defined ComEmuCommand ( ) if not defined ComEmuCommand exit /b 2 exit /b 0 + +:printhelp +echo Usage: +echo %~1 [options] [bash parameters] +echo. +echo Options: +echo -mingw32 ^| -mingw64 ^| -msys[2] Set shell type +echo -defterm ^| -mintty ^| -conemu ^| -consolez +echo Set terminal type +echo -here [DIRECTORY] Starting directory +echo -[use-]full-path Use full currnent PATH variable +echo instead of triming to minimal +echo. +echo Any parameter that cannot be treated as valid option and all +echo following parameters are passed as bash command parameters. +echo. +exit /b 0 From 705a4681085d19dd48b5c119b2d005c78de19d78 Mon Sep 17 00:00:00 2001 From: Karlson2k Date: Sat, 16 Jul 2016 19:11:50 +0300 Subject: [PATCH 092/101] msys2_shell.cmd: Fixed return value - printing help is not an error. --- filesystem/msys2_shell.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index 48379eb04b3..2c870a2425b 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -18,7 +18,7 @@ rem set MSYS2_PATH_TYPE=inherit rem Help option if "x%~1" == "x-help" ( call :printhelp "%~nx0" - exit /b 1 + exit /b %ERRORLEVEL% ) rem Shell types if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams From 9f7a93a620aad0f87f5edc583aed7871998284e1 Mon Sep 17 00:00:00 2001 From: Karlson2k Date: Sat, 16 Jul 2016 19:20:44 +0300 Subject: [PATCH 093/101] msys2_shell.cmd: print help if asked by '--help', '-?' or '/?' parameters This simplify usage for people who are used to the MS or GNU standards. --- filesystem/msys2_shell.cmd | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index 2c870a2425b..287f0f16abe 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -20,6 +20,18 @@ if "x%~1" == "x-help" ( call :printhelp "%~nx0" exit /b %ERRORLEVEL% ) +if "x%~1" == "x--help" ( + call :printhelp "%~nx0" + exit /b %ERRORLEVEL% +) +if "x%~1" == "x-?" ( + call :printhelp "%~nx0" + exit /b %ERRORLEVEL% +) +if "x%~1" == "x/?" ( + call :printhelp "%~nx0" + exit /b %ERRORLEVEL% +) rem Shell types if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams if "x%~1" == "x-msys2" shift& set MSYSTEM=MSYS& goto :checkparams @@ -132,6 +144,7 @@ echo Set terminal type echo -here [DIRECTORY] Starting directory echo -[use-]full-path Use full currnent PATH variable echo instead of triming to minimal +echo -help ^| --help ^| -? ^| /? Display this help and exit echo. echo Any parameter that cannot be treated as valid option and all echo following parameters are passed as bash command parameters. From 931aeb09d72bee556e06709d1ea73559a432249c Mon Sep 17 00:00:00 2001 From: David Macek Date: Sat, 16 Jul 2016 20:48:05 +0200 Subject: [PATCH 094/101] mintty: Update to v2.4.0 --- mintty/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mintty/PKGBUILD b/mintty/PKGBUILD index e47c4fc9515..5fa630523d7 100644 --- a/mintty/PKGBUILD +++ b/mintty/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alexey Pavlov pkgname=mintty -pkgver=2.3.6 +pkgver=2.4.0 pkgrel=1 epoch=1 pkgdesc="Terminal emulator with native Windows look and feel" @@ -11,7 +11,7 @@ groups=('base') depends=('sh') url="https://mintty.github.io" source=(${pkgname}-${pkgver}.tar.gz::https://github.com/mintty/mintty/archive/${pkgver}.tar.gz) -sha256sums=('5969c0e679f01e71baf193a4c37ab498f37e10d1efb8e9f27ca37d39ae7de18e') +sha256sums=('52855c54818052b01384123570ccfb83aa84e257684c1aa9cc7c2327dde6e0ac') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" From 648db9106c0a5b5faecf7be744aaad4796591db1 Mon Sep 17 00:00:00 2001 From: Karlson2k Date: Sat, 16 Jul 2016 22:15:10 +0300 Subject: [PATCH 095/101] msys2_shell.cmd: fixed processing specified working directory --- filesystem/msys2_shell.cmd | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/filesystem/msys2_shell.cmd b/filesystem/msys2_shell.cmd index 287f0f16abe..5772dedaf35 100644 --- a/filesystem/msys2_shell.cmd +++ b/filesystem/msys2_shell.cmd @@ -47,8 +47,17 @@ rem Other parameters if "x%~1" == "x-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams if "x%~1" == "x-here" shift& set CHERE_INVOKING=enabled_from_arguments& goto :checkparams -if "x%~1" == "x-where" shift& set CHERE_INVOKING=enabled_from_arguments& goto :checkparams -if "x%CHERE_INVOKING%" == "xenabled_from_arguments" if not "%~1" == "" if exist "%~1\" shift& cd /d "%~1\"& goto :checkparams +if "x%~1" == "x-where" ( + if "x%~2" == "x" ( + echo Working directory is not specified for -where parameter. 1>&2 + exit /b 2 + ) + cd /d "%~2" || ( + echo Cannot set specified working diretory "%~2". 1>&2 + exit /b 2 + ) + set CHERE_INVOKING=enabled_from_arguments +)& shift& shift& goto :checkparams rem Setup proper title if "%MSYSTEM%" == "MINGW32" ( @@ -141,7 +150,10 @@ echo Options: echo -mingw32 ^| -mingw64 ^| -msys[2] Set shell type echo -defterm ^| -mintty ^| -conemu ^| -consolez echo Set terminal type -echo -here [DIRECTORY] Starting directory +echo -here Use current directory as working +echo directory +echo -where DIRECTORY Use specified DIRECTORY as working +echo directory echo -[use-]full-path Use full currnent PATH variable echo instead of triming to minimal echo -help ^| --help ^| -? ^| /? Display this help and exit From 9f39c75117e43939fd3d614d583d3623eccba579 Mon Sep 17 00:00:00 2001 From: Karlson2k Date: Sat, 16 Jul 2016 22:18:25 +0300 Subject: [PATCH 096/101] filesystem: bump version and update checksums --- filesystem/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filesystem/PKGBUILD b/filesystem/PKGBUILD index 2038eaf542e..aaf7dad419a 100644 --- a/filesystem/PKGBUILD +++ b/filesystem/PKGBUILD @@ -4,7 +4,7 @@ pkgname=filesystem pkgver=2016.07 -pkgrel=1 +pkgrel=2 pkgdesc='Base filesystem' arch=('i686' 'x86_64') license=('BSD') @@ -59,7 +59,7 @@ sha256sums=('6d651f6b0b2d173961a3fa21acd9d44c783ed9cd73a031687698c8b9ed1f6dee' '50c3746d621e682e3560e1b37cc1ac5d988460064a20ed15f107c203ac5ad622' '9620bdf1c82ea3f14c3553c44a2006ea61ff3f5a775a2a053130a59cc186daf5' '7d6994d7caf52a459b562cfb0da1d758a4b7bca478d1df00de3a96686e59008e' - '45bdfd620e81e6c0ff0bc0e7d9fa1bc4efebe7382c37e8affc29e306fe3fe7b7' + 'db22c5b21b1ee38ff978557754b59f3847f69d63f03d60cb664de4a816793810' '3c1da9bf6ff791c32f17e49db0047b3c9cbaacd44d6d0b92696cdeacebf8f947' '91f1f918cf13deab0124082086e990786113b0e710dbda4678d8fc14905ad94d' '24f4cd302d495d286134be5bd2466a1bef19c70e7ed825d0b61e49adcf3ad664' From f249b8d7f6226820df4326cf9eb48cdca95d065e Mon Sep 17 00:00:00 2001 From: David Macek Date: Mon, 1 Aug 2016 20:58:42 +0200 Subject: [PATCH 097/101] msys2-launcher-git: Update to latest --- msys2-launcher-git/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msys2-launcher-git/PKGBUILD b/msys2-launcher-git/PKGBUILD index 14be4eb94ae..25bf7096d22 100644 --- a/msys2-launcher-git/PKGBUILD +++ b/msys2-launcher-git/PKGBUILD @@ -2,7 +2,7 @@ _realname="msys2-launcher" pkgname=("${_realname}-git") -pkgver=0.3.29.4028b6c +pkgver=0.3.32.56c2ba7 pkgrel=1 pkgdesc="Helper for launching MSYS2 shells" arch=('x86_64' 'i686') From 181dfe8c3bde676100f959dae0744a0beb5d1c23 Mon Sep 17 00:00:00 2001 From: David Macek Date: Tue, 2 Aug 2016 16:15:36 +0200 Subject: [PATCH 098/101] mintty: Update to v2.4.2 --- mintty/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mintty/PKGBUILD b/mintty/PKGBUILD index 5fa630523d7..31a4d7f189f 100644 --- a/mintty/PKGBUILD +++ b/mintty/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alexey Pavlov pkgname=mintty -pkgver=2.4.0 +pkgver=2.4.2 pkgrel=1 epoch=1 pkgdesc="Terminal emulator with native Windows look and feel" @@ -11,7 +11,7 @@ groups=('base') depends=('sh') url="https://mintty.github.io" source=(${pkgname}-${pkgver}.tar.gz::https://github.com/mintty/mintty/archive/${pkgver}.tar.gz) -sha256sums=('52855c54818052b01384123570ccfb83aa84e257684c1aa9cc7c2327dde6e0ac') +sha256sums=('809f06111976dab58aa60948d9f7681edeab671abd338afa9ee7b2748d6188d9') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" From c24b978a1862d5cded0fd1f5df5dcaae634753fa Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 22 Aug 2016 16:00:20 +0200 Subject: [PATCH 099/101] openssh: use MIT mirror It appears that right now, openbsd.org is a little bit overloaded. Signed-off-by: Johannes Schindelin --- openssh/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openssh/PKGBUILD b/openssh/PKGBUILD index 115677d1db3..082b34c2e85 100644 --- a/openssh/PKGBUILD +++ b/openssh/PKGBUILD @@ -10,7 +10,7 @@ arch=('i686' 'x86_64') groups=('net-utils') depends=('heimdal' 'libedit' 'libcrypt' 'openssl') makedepends=('heimdal-devel' 'libedit-devel' 'libcrypt-devel' 'openssl-devel') -source=("ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz" +source=("http://mirrors.mit.edu/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz" openssh-6.3p1-fix-man-install.patch openssh-6.3p1-msys2.patch) sha256sums=('dd75f024dcf21e06a0d6421d582690bf987a1f6323e32ad6619392f3bfde6bbd' From 633933b5131ff5f45195e41fe46e6f607d176c34 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 22 Aug 2016 09:09:39 +0200 Subject: [PATCH 100/101] openssh: update to 7.3p1 This update made the fix-man-install patch unnecessary and required minor adjustments to the msys2 one (to avoid huge changes due to autoconf tools updates resulting in vastly different generated files, we simply call autoreconf after patching configure.ac). Due to a recent export of setkey() in msys2-runtime-devel's stdlib.h when _XOPEN_SOURCE is defined, we need to add a little work-around patch that avoids clashing with crypt.h's declaration of the function of the same name. Suggested by Ryan Rode-Corrent. Signed-off-by: Johannes Schindelin --- openssh/PKGBUILD | 17 +-- openssh/openssh-6.3p1-fix-man-install.patch | 11 -- openssh/openssh-6.3p1-msys2.patch | 126 ----------------- openssh/openssh-7.3p1-msys2-setkey.patch | 34 +++++ openssh/openssh-7.3p1-msys2.patch | 142 ++++++++++++++++++++ 5 files changed, 185 insertions(+), 145 deletions(-) delete mode 100644 openssh/openssh-6.3p1-fix-man-install.patch delete mode 100644 openssh/openssh-6.3p1-msys2.patch create mode 100644 openssh/openssh-7.3p1-msys2-setkey.patch create mode 100644 openssh/openssh-7.3p1-msys2.patch diff --git a/openssh/PKGBUILD b/openssh/PKGBUILD index 082b34c2e85..797661afc83 100644 --- a/openssh/PKGBUILD +++ b/openssh/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Alexey Pavlov pkgname=openssh -pkgver=7.1p2 +pkgver=7.3p1 pkgrel=1 pkgdesc='Free version of the SSH connectivity tools' url='http://www.openssh.org/portable.html' @@ -11,18 +11,19 @@ groups=('net-utils') depends=('heimdal' 'libedit' 'libcrypt' 'openssl') makedepends=('heimdal-devel' 'libedit-devel' 'libcrypt-devel' 'openssl-devel') source=("http://mirrors.mit.edu/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz" - openssh-6.3p1-fix-man-install.patch - openssh-6.3p1-msys2.patch) -sha256sums=('dd75f024dcf21e06a0d6421d582690bf987a1f6323e32ad6619392f3bfde6bbd' - '88a755f5a3c52cfeb1d7764e05c4eada86339ba3a009d2f8c527fb44521db02b' - '07259e7908a6a6677c5e8ad26cd3b6274b1e9d1deea343e433bdf3e049033bd4') + openssh-7.3p1-msys2.patch + openssh-7.3p1-msys2-setkey.patch) +sha256sums=('3ffb989a6dcaa69594c3b550d4855a5a2e1718ccdde7f5e36387b424220fbecc' + 'ab54293758c908bfdcd95b338bad5eb35290291e957dc99bc09fae4f906987fc' + '25079cf4a10c1ab70d60302bccaabee513762520dffd7c35285f7aae3ea36087') backup=('etc/ssh/ssh_config') prepare() { cd "${srcdir}/${pkgname}-${pkgver}" - patch -p1 -i ${srcdir}/openssh-6.3p1-fix-man-install.patch - patch -p1 -i ${srcdir}/openssh-6.3p1-msys2.patch + patch -p1 -i ${srcdir}/openssh-7.3p1-msys2.patch + patch -p1 -i ${srcdir}/openssh-7.3p1-msys2-setkey.patch + autoreconf -fvi } build() { diff --git a/openssh/openssh-6.3p1-fix-man-install.patch b/openssh/openssh-6.3p1-fix-man-install.patch deleted file mode 100644 index e0229ac36e9..00000000000 --- a/openssh/openssh-6.3p1-fix-man-install.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- openssh-6.3p1/Makefile.in.orig 2013-10-21 16:01:01.869400000 +0400 -+++ openssh-6.3p1/Makefile.in 2013-10-21 16:01:39.096600000 +0400 -@@ -288,7 +288,7 @@ - -rm -f $(DESTDIR)$(bindir)/slogin - ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin - -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 -- ln -s ./ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 -+ cp -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 - - install-sysconf: - if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \ diff --git a/openssh/openssh-6.3p1-msys2.patch b/openssh/openssh-6.3p1-msys2.patch deleted file mode 100644 index 41fc3b25442..00000000000 --- a/openssh/openssh-6.3p1-msys2.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff -Naur openssh-6.3p1-orig/config.guess openssh-6.3p1/config.guess ---- openssh-6.3p1-orig/config.guess 2013-04-18 05:26:26.000000000 +0400 -+++ openssh-6.3p1/config.guess 2013-10-20 21:05:15.482000000 +0400 -@@ -851,6 +851,9 @@ - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; -+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*) -+ echo x86_64-unknown-msys -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; -diff -Naur openssh-6.3p1-orig/configure openssh-6.3p1/configure ---- openssh-6.3p1-orig/configure 2013-09-13 10:20:40.000000000 +0400 -+++ openssh-6.3p1/configure 2013-10-20 21:04:13.523400000 +0400 -@@ -6686,7 +6686,7 @@ - $as_echo "#define DISABLE_WTMP 1" >>confdefs.h - - ;; --*-*-cygwin*) -+*-*-cygwin* | *-*-msys*) - check_for_libcrypt_later=1 - LIBS="$LIBS /usr/lib/textreadmode.o" - -diff -Naur openssh-6.3p1-orig/configure.ac openssh-6.3p1/configure.ac ---- openssh-6.3p1-orig/configure.ac 2013-08-04 15:48:41.000000000 +0400 -+++ openssh-6.3p1/configure.ac 2013-10-20 21:04:13.570200000 +0400 -@@ -497,7 +497,7 @@ - AC_DEFINE([DISABLE_UTMP], [1], [Define if you don't want to use utmp]) - AC_DEFINE([DISABLE_WTMP], [1], [Define if you don't want to use wtmp]) - ;; --*-*-cygwin*) -+*-*-cygwin* | *-*-msys*) - check_for_libcrypt_later=1 - LIBS="$LIBS /usr/lib/textreadmode.o" - AC_DEFINE([HAVE_CYGWIN], [1], [Define if you are on Cygwin]) -diff -Naur openssh-6.3p1-orig/contrib/cygwin/Makefile openssh-6.3p1/contrib/cygwin/Makefile ---- openssh-6.3p1-orig/contrib/cygwin/Makefile 2011-10-25 02:38:00.000000000 +0400 -+++ openssh-6.3p1/contrib/cygwin/Makefile 2013-10-20 21:04:13.570200000 +0400 -@@ -7,7 +7,7 @@ - mandir=$(datadir)/man - docdir=$(datadir)/doc - sshdocdir=$(docdir)/openssh --cygdocdir=$(docdir)/Cygwin -+cygdocdir=$(docdir)/MSYS - sysconfdir=/etc - defaultsdir=$(sysconfdir)/defaults/etc - inetdefdir=$(defaultsdir)/inetd.d -diff -Naur openssh-6.3p1-orig/openbsd-compat/bsd-cygwin_util.c openssh-6.3p1/openbsd-compat/bsd-cygwin_util.c ---- openssh-6.3p1-orig/openbsd-compat/bsd-cygwin_util.c 2013-06-02 02:07:32.000000000 +0400 -+++ openssh-6.3p1/openbsd-compat/bsd-cygwin_util.c 2013-10-20 21:04:13.570200000 +0400 -@@ -67,7 +67,7 @@ - { NL("ALLUSERSPROFILE=") }, - { NL("COMPUTERNAME=") }, - { NL("COMSPEC=") }, -- { NL("CYGWIN=") }, -+ { NL("MSYS=") }, - { NL("OS=") }, - { NL("PATH=") }, - { NL("PATHEXT=") }, -diff -Naur openssh-6.3p1-orig/regress/agent-ptrace.sh openssh-6.3p1/regress/agent-ptrace.sh ---- openssh-6.3p1-orig/regress/agent-ptrace.sh 2011-01-17 03:20:20.000000000 +0300 -+++ openssh-6.3p1/regress/agent-ptrace.sh 2013-10-20 21:04:13.570200000 +0400 -@@ -5,7 +5,7 @@ - - if have_prog uname ; then - case `uname` in -- AIX|CYGWIN*|OSF1) -+ AIX|CYGWIN*|MSYS*|OSF1) - echo "skipped (not supported on this platform)" - exit 0 - ;; -diff -Naur openssh-6.3p1-orig/regress/reexec.sh openssh-6.3p1/regress/reexec.sh ---- openssh-6.3p1-orig/regress/reexec.sh 2013-05-17 14:41:07.000000000 +0400 -+++ openssh-6.3p1/regress/reexec.sh 2013-10-20 21:04:13.570200000 +0400 -@@ -45,7 +45,7 @@ - cp $OBJ/sshd_config.orig $OBJ/sshd_config - - # cygwin can't fork a deleted binary --if [ "$os" != "cygwin" ]; then -+if [ "$os" != "cygwin" || "$os" != "msys" ]; then - - verbose "test reexec fallback" - -diff -Naur openssh-6.3p1-orig/regress/sftp-cmds.sh openssh-6.3p1/regress/sftp-cmds.sh ---- openssh-6.3p1-orig/regress/sftp-cmds.sh 2013-07-25 06:11:20.000000000 +0400 -+++ openssh-6.3p1/regress/sftp-cmds.sh 2013-10-20 21:04:13.585800000 +0400 -@@ -77,7 +77,7 @@ - || fail "get failed" - cmp $DATA ${COPY} || fail "corrupted copy after get" - --if [ "$os" != "cygwin" ]; then -+if [ "$os" != "cygwin" || "$os" != "msys" ]; then - rm -f ${QUOTECOPY} - cp $DATA ${QUOTECOPY} - verbose "$tid: get filename with quotes" -@@ -136,7 +136,7 @@ - ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed" - cmp $DATA ${COPY} || fail "corrupted copy after put" - --if [ "$os" != "cygwin" ]; then -+if [ "$os" != "cygwin" || "$os" != "msys" ]; then - rm -f ${QUOTECOPY} - verbose "$tid: put filename with quotes" - echo "put $DATA \"$QUOTECOPY_ARG\"" | \ -diff -Naur openssh-6.3p1-orig/regress/test-exec.sh openssh-6.3p1/regress/test-exec.sh ---- openssh-6.3p1-orig/regress/test-exec.sh 2013-08-08 11:02:12.000000000 +0400 -+++ openssh-6.3p1/regress/test-exec.sh 2013-10-20 21:04:13.585800000 +0400 -@@ -16,9 +16,16 @@ - os=cygwin - TEST_SSH_IPV6=no - ;; -+MSYS_NT-5.0) -+ os=cygwin -+ TEST_SSH_IPV6=no -+ ;; - CYGWIN*) - os=cygwin - ;; -+MSYS*) -+ os=cygwin -+ ;; - esac - - if [ ! -z "$TEST_SSH_PORT" ]; then diff --git a/openssh/openssh-7.3p1-msys2-setkey.patch b/openssh/openssh-7.3p1-msys2-setkey.patch new file mode 100644 index 00000000000..be3c1b8c707 --- /dev/null +++ b/openssh/openssh-7.3p1-msys2-setkey.patch @@ -0,0 +1,34 @@ +From 0490e734e4023964d4662c07a5ac109747b8e0af Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Mon, 22 Aug 2016 17:09:20 +0200 +Subject: [PATCH] openssh: work around Cygwin declaring setkey + +When _XOPEN_SOURCE is defined, setkey() is declared in +/usr/include/stdlib.h in a manner that is incompatible with +/usr/include/crypt.h. + +Let's work around that. + +Signed-off-by: Johannes Schindelin +--- + includes.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/includes.h b/includes.h +index 497a038..4f9e233 100644 +--- a/includes.h ++++ b/includes.h +@@ -22,6 +22,10 @@ + #define _GNU_SOURCE /* activate extra prototypes for glibc */ + #endif + ++#define setkey CYGWIN_setkey ++#include ++#undef setkey ++ + #include + #include + #include /* For CMSG_* */ +-- +2.9.1 + diff --git a/openssh/openssh-7.3p1-msys2.patch b/openssh/openssh-7.3p1-msys2.patch new file mode 100644 index 00000000000..02532566728 --- /dev/null +++ b/openssh/openssh-7.3p1-msys2.patch @@ -0,0 +1,142 @@ +From 3018c32948c66b246b1020dea40f4e8688fae61a Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Mon, 22 Aug 2016 09:17:42 +0200 +Subject: [PATCH] Forward-port MSys2 patches + +Signed-off-by: Johannes Schindelin +--- + config.guess | 3 + + configure.ac | 2 +- + contrib/cygwin/Makefile | 2 +- + openbsd-compat/bsd-cygwin_util.c | 2 +- + regress/agent-ptrace.sh | 2 +- + regress/reexec.sh | 2 +- + regress/sftp-cmds.sh | 4 +- + regress/test-exec.sh | 7 + + 10 files changed, 13385 insertions(+), 30689 deletions(-) + +diff --git a/config.guess b/config.guess +index c563628..4b7bada 100755 +--- a/config.guess ++++ b/config.guess +@@ -851,6 +851,9 @@ EOF + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; ++ amd64:MSYS*:*:* | x86_64:MSYS*:*:*) ++ echo x86_64-unknown-msys ++ exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; +diff --git a/configure.ac b/configure.ac +index 373d21b..7843791 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -578,7 +578,7 @@ case "$host" in + AC_DEFINE([DISABLE_UTMP], [1], [Define if you don't want to use utmp]) + AC_DEFINE([DISABLE_WTMP], [1], [Define if you don't want to use wtmp]) + ;; +-*-*-cygwin*) ++*-*-cygwin* | *-*-msys*) + check_for_libcrypt_later=1 + LIBS="$LIBS /usr/lib/textreadmode.o" + AC_DEFINE([HAVE_CYGWIN], [1], [Define if you are on Cygwin]) +diff --git a/contrib/cygwin/Makefile b/contrib/cygwin/Makefile +index a0261f4..2fdb676 100644 +--- a/contrib/cygwin/Makefile ++++ b/contrib/cygwin/Makefile +@@ -7,7 +7,7 @@ datadir=$(prefix)/share + mandir=$(datadir)/man + docdir=$(datadir)/doc + sshdocdir=$(docdir)/openssh +-cygdocdir=$(docdir)/Cygwin ++cygdocdir=$(docdir)/MSYS + sysconfdir=/etc + defaultsdir=$(sysconfdir)/defaults/etc + inetdefdir=$(defaultsdir)/inetd.d +diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c +index 8672ccf..f36a207 100644 +--- a/openbsd-compat/bsd-cygwin_util.c ++++ b/openbsd-compat/bsd-cygwin_util.c +@@ -83,7 +83,7 @@ static struct wenv { + { NL("ALLUSERSPROFILE=") }, + { NL("COMPUTERNAME=") }, + { NL("COMSPEC=") }, +- { NL("CYGWIN=") }, ++ { NL("MSYS=") }, + { NL("OS=") }, + { NL("PATH=") }, + { NL("PATHEXT=") }, +diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh +index bb676d6..854d711 100644 +--- a/regress/agent-ptrace.sh ++++ b/regress/agent-ptrace.sh +@@ -5,7 +5,7 @@ tid="disallow agent ptrace attach" + + if have_prog uname ; then + case `uname` in +- AIX|CYGWIN*|OSF1) ++ AIX|CYGWIN*|MSYS*|OSF1) + echo "skipped (not supported on this platform)" + exit 0 + ;; +diff --git a/regress/reexec.sh b/regress/reexec.sh +index 5c0a7b4..ba17e9b 100644 +--- a/regress/reexec.sh ++++ b/regress/reexec.sh +@@ -45,7 +45,7 @@ rm -f $PIDFILE + cp $OBJ/sshd_config.orig $OBJ/sshd_config + + # cygwin can't fork a deleted binary +-if [ "$os" != "cygwin" ]; then ++if [ "$os" != "cygwin" || "$os" != "msys" ]; then + + verbose "test reexec fallback" + +diff --git a/regress/sftp-cmds.sh b/regress/sftp-cmds.sh +index aad7fca..e8c002c 100644 +--- a/regress/sftp-cmds.sh ++++ b/regress/sftp-cmds.sh +@@ -77,7 +77,7 @@ echo "get \"$DATA\" $COPY" | ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 \ + || fail "get failed" + cmp $DATA ${COPY} || fail "corrupted copy after get" + +-if [ "$os" != "cygwin" ]; then ++if [ "$os" != "cygwin" || "$os" != "msys" ]; then + rm -f ${QUOTECOPY} + cp $DATA ${QUOTECOPY} + verbose "$tid: get filename with quotes" +@@ -136,7 +136,7 @@ echo "put $DATA $COPY" | \ + ${SFTP} -D ${SFTPSERVER} >/dev/null 2>&1 || fail "put failed" + cmp $DATA ${COPY} || fail "corrupted copy after put" + +-if [ "$os" != "cygwin" ]; then ++if [ "$os" != "cygwin" || "$os" != "msys" ]; then + rm -f ${QUOTECOPY} + verbose "$tid: put filename with quotes" + echo "put $DATA \"$QUOTECOPY_ARG\"" | \ +diff --git a/regress/test-exec.sh b/regress/test-exec.sh +index 1b6526d..0b5426f 100644 +--- a/regress/test-exec.sh ++++ b/regress/test-exec.sh +@@ -16,9 +16,16 @@ CYGWIN_NT-5.0) + os=cygwin + TEST_SSH_IPV6=no + ;; ++MSYS_NT-5.0) ++ os=cygwin ++ TEST_SSH_IPV6=no ++ ;; + CYGWIN*) + os=cygwin + ;; ++MSYS*) ++ os=cygwin ++ ;; + esac + + if [ ! -z "$TEST_SSH_PORT" ]; then +-- +2.9.1 + From da63f585e35623ab46dde5bdc4ae9478816694e9 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 22 Aug 2016 17:48:50 +0200 Subject: [PATCH 101/101] openssh: skip privilege separation tests In MSYS2's context, it does not make sense, as we do not have a special-purpose 'sshd' user account and also no easy way to make one. Signed-off-by: Johannes Schindelin --- openssh/PKGBUILD | 7 +++-- ...enssh-7.3p1-msys2-skip-privsep-tests.patch | 28 +++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 openssh/openssh-7.3p1-msys2-skip-privsep-tests.patch diff --git a/openssh/PKGBUILD b/openssh/PKGBUILD index 797661afc83..1a2fc2408e1 100644 --- a/openssh/PKGBUILD +++ b/openssh/PKGBUILD @@ -12,10 +12,12 @@ depends=('heimdal' 'libedit' 'libcrypt' 'openssl') makedepends=('heimdal-devel' 'libedit-devel' 'libcrypt-devel' 'openssl-devel') source=("http://mirrors.mit.edu/pub/OpenBSD/OpenSSH/portable/${pkgname}-${pkgver}.tar.gz" openssh-7.3p1-msys2.patch - openssh-7.3p1-msys2-setkey.patch) + openssh-7.3p1-msys2-setkey.patch + openssh-7.3p1-msys2-skip-privsep-tests.patch) sha256sums=('3ffb989a6dcaa69594c3b550d4855a5a2e1718ccdde7f5e36387b424220fbecc' 'ab54293758c908bfdcd95b338bad5eb35290291e957dc99bc09fae4f906987fc' - '25079cf4a10c1ab70d60302bccaabee513762520dffd7c35285f7aae3ea36087') + '25079cf4a10c1ab70d60302bccaabee513762520dffd7c35285f7aae3ea36087' + '729aa8ef3723a223afbd1bda678a7deaca75b5c3b42a74b1a8c396f95f8677b5') backup=('etc/ssh/ssh_config') @@ -23,6 +25,7 @@ prepare() { cd "${srcdir}/${pkgname}-${pkgver}" patch -p1 -i ${srcdir}/openssh-7.3p1-msys2.patch patch -p1 -i ${srcdir}/openssh-7.3p1-msys2-setkey.patch + patch -p1 -i ${srcdir}/openssh-7.3p1-msys2-skip-privsep-tests.patch autoreconf -fvi } diff --git a/openssh/openssh-7.3p1-msys2-skip-privsep-tests.patch b/openssh/openssh-7.3p1-msys2-skip-privsep-tests.patch new file mode 100644 index 00000000000..c3bc9e72ae2 --- /dev/null +++ b/openssh/openssh-7.3p1-msys2-skip-privsep-tests.patch @@ -0,0 +1,28 @@ +From 1de7f30668339f2bf3d74f1f1d19dd7714f8ff4d Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Mon, 22 Aug 2016 17:47:05 +0200 +Subject: [PATCH] openssh: skip privilege separation tests + +In MSYS2's context, it does not make sense, as we do not have a +special-purpose 'sshd' user account and also no easy way to make one. + +Signed-off-by: Johannes Schindelin +--- + regress/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/regress/Makefile b/regress/Makefile +index 08fd82d..00cff71 100644 +--- a/regress/Makefile ++++ b/regress/Makefile +@@ -1,6 +1,6 @@ + # $OpenBSD: Makefile,v 1.88 2016/06/03 04:10:41 dtucker Exp $ + +-REGRESS_TARGETS= unit t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t-exec ++REGRESS_TARGETS= unit t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 + tests: prep $(REGRESS_TARGETS) + + # Interop tests are not run by default +-- +2.9.1 +