From 52faa0ef5c4397fb5f8aa03b7beffede916ff655 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Thu, 2 Oct 2014 00:31:09 +0100 Subject: [PATCH] msys2-runtime: Add dependencies + new WIP patch --- ...entry-ensure-native_root-ends-with-a.patch | 28 ++++++++++++++++ msys2-runtime/PKGBUILD | 32 ++++++++++++++++--- 2 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 msys2-runtime/0006-In-create_root_entry-ensure-native_root-ends-with-a.patch diff --git a/msys2-runtime/0006-In-create_root_entry-ensure-native_root-ends-with-a.patch b/msys2-runtime/0006-In-create_root_entry-ensure-native_root-ends-with-a.patch new file mode 100644 index 00000000..c915cb31 --- /dev/null +++ b/msys2-runtime/0006-In-create_root_entry-ensure-native_root-ends-with-a.patch @@ -0,0 +1,28 @@ +From 90d13a556d561c4153f5c8db48b8df531a9fa4b5 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly +Date: Wed, 1 Oct 2014 19:55:18 +0100 +Subject: [PATCH] In create_root_entry, ensure native_root ends with a '/' + +--- + winsup/cygwin/mount.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc +index 80e39b6..14a8f93 100644 +--- a/winsup/cygwin/mount.cc ++++ b/winsup/cygwin/mount.cc +@@ -450,6 +450,11 @@ mount_info::create_root_entry (const PWCHAR root) + The entry is immutable, unless the "override" option is given in /etc/fstab. */ + char native_root[PATH_MAX]; + sys_wcstombs (native_root, PATH_MAX, root); ++ /* Ensure that native_root ends with a / since src and dst entries in the ++ mount table must end consistently - otherwise a path conversion of '/' ++ will not end with '/' and things will break. */ ++ if (strlen(native_root) < PATH_MAX - 1) ++ strcat(native_root, "/"); + assert (*native_root != '\0'); + if (add_item (native_root, "/", + MOUNT_SYSTEM | MOUNT_BINARY | MOUNT_IMMUTABLE | MOUNT_AUTOMATIC | MOUNT_NOACL) +-- +2.1.0 + diff --git a/msys2-runtime/PKGBUILD b/msys2-runtime/PKGBUILD index a63c79ce..0e973e0c 100644 --- a/msys2-runtime/PKGBUILD +++ b/msys2-runtime/PKGBUILD @@ -4,25 +4,36 @@ pkgname=('msys2-runtime' 'msys2-runtime-devel') _ver_base=2.0 pkgver=2.0.16224.6393980 -pkgrel=3 +pkgrel=4 pkgdesc="Cygwin POSIX emulation engine" arch=('i686' 'x86_64') url="" license=('GPL') groups=('base') depends=() -makedepends=('cocom' 'git' 'perl' 'gcc' 'mingw-w64-cross-gcc' 'mingw-w64-cross-zlib') +makedepends=('cocom' + 'git' + 'perl' + 'gcc' + 'make' + 'mingw-w64-cross-gcc' + 'mingw-w64-cross-zlib' + 'zlib-devel' + 'gettext-devel' + 'diffutils') #options=('debug' '!strip') source=('msys2-runtime'::'git+https://github.com/Alexpux/Cygwin.git#branch=develop' '0001-Expand-CYGWIN-error_start-processing.patch' '0003-Add-msys2_path_conv.patch' '0004-Fix-cygwin-path_conv-of-root.patch' - '0005-mount-Add-longest_native_sorted-and-longest_posix_so.patch') + '0005-mount-Add-longest_native_sorted-and-longest_posix_so.patch' + '0006-In-create_root_entry-ensure-native_root-ends-with-a.patch') md5sums=('SKIP' '6981bc9722f8b4342c318577edfb559c' '154e9e3fa5f3bb15e729ff11441efd87' '05fb05fe24d39b47162dfaa71146bd3b' - '09e5636e21bb7f6aa1c67ee9ab1c0b5a') + 'eaffd1281a8a8d6b971c077d4b5b9e59' + '42a150ff2b7bf8c7bfc96f4deccda444') pkgver() { cd "$srcdir/msys2-runtime" #printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" @@ -37,6 +48,10 @@ prepare() { git am ${srcdir}/0003-Add-msys2_path_conv.patch git am ${srcdir}/0004-Fix-cygwin-path_conv-of-root.patch # git am ${srcdir}/0005-mount-Add-longest_native_sorted-and-longest_posix_so.patch + # Also WIP + # See failure in https://github.com/Alexpux/path_convert (once I get write access!) + # '/' should -> 'C:/msys32/' but instead -> 'C:/msys32' + # git am ${srcdir}/0006-In-create_root_entry-ensure-native_root-ends-with-a.patch } build() { @@ -92,3 +107,12 @@ package_msys2-runtime-devel() { rm -f $pkgdir/usr/include/unctrl.h cp -rLf ${srcdir}/dest/usr/${CHOST}/lib $pkgdir/usr/ } + +# return 0 +# To hack on this: +# cd /e/m2/repo-MSYS2/msys2-runtime/ +# pushd src/build-i686-pc-msys +# LANG=C make && make -j1 DESTDIR=/e/m2/repo-MSYS2/msys2-runtime/src/dest install +# popd +# makepkg -sRLf +# pacman -U msys2-runtime*.xz