Commit Graph
150 Commits
Author SHA1 Message Date
Biswapriyo Nath 4eb4e6d06e filesystem: Include mingw info path in INFOPATH variable 2022-12-11 18:37:55 +05:30
Markus Mützel e00b8385a9 filesystem: Set environment variables for pkg-config system paths.
The system include path and system library path are hard-coded into the pkg-config executables as UNIX style paths. That leads to those paths not matching literally in the MinGW environments where paths are converted to Windows paths.
Also set environment variables with the same paths. That works because environment variables are automatically converted for MinGW executables.
2022-10-29 19:28:31 +02:00
Christoph Reiter 800f8b1a76 Some more rebuilds
to get all of base to include SHA256 checksums
2022-06-29 06:59:52 +02:00
Christoph Reiter 41a5a7d824 filesystem: bump pkgrel, more dash compat
use printf for dash compat.
make sure that we stay below 80 chars for the message to avoid wrapping
2022-03-11 12:31:29 +01:00
ah64316 a14269ea72 Remove 'function' keyword from '_warn_deprecated_winver' for compatibility with standard shell
Causes an error when I execute a shell with 'dash'; removing it seems to restore expected behavior (unable to test the actual condition)
2022-02-23 14:50:45 -06:00
Jorge Fabregat 7c3b9b8aab Changed --login to -l in msys_shell.cmd shell invocation to prevent csh from crashing since it does not support --login 2022-02-08 10:14:38 +01:00
Johannes Schindelin 0c3ca441d7 filesystem(bashrc): avoid spawning an external process
In 73e06b9d4c (bash.bashrc: Update PS1 if PS1 wasn't exported. Closes
 #653, 2016-07-14), we updated `/etc/bash.bashrc` to avoid overriding
`PS1`, but the way it was done requires `cut.exe` to be in the `PATH`.

Now, while _most_ of the time we're running inside a login Bash where
the `PATH` has been appropriately modified, sometimes we don't. In that
case, `cut.exe` is not in the `PATH`.

We should not spawn a new process, anyway, as spawning processes is
really expensive in the MSYS2 runtime because of all the contortions
necessary to emulate the POSIX syscall `fork()`.

Let's just avoid that extra process by using `case`, which is a Bash
built-in and therefore won't cost much time to run.

This fixes https://github.com/git-for-windows/git/issues/3652

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2022-02-01 17:18:40 +01:00
Christoph Reiter b34d311819 filesystem: warn users that Windows 7/8 support is going away
This will be shown on a login shell, so the first two lines when
users open a MSYS2 terminal.
2022-01-30 15:12:14 +01:00
Mitchell Hentges 9b03596ad6 filesystem: Avoid trying to chmod /dev/{shm,mqueue} during mkdir
When launching a custom msys2 environment, and it does "first-run"
operations, it complains that: "cannot change permissions of
'/dev/shm': Permission denied".

This is related to the previous work in this area that happened
in #2337: Since "/" is mounted with noacl and chmod() is a no-op,
this error is cosmetic and can be removed.

However, in #2337, the access modifying behaviour was not removed
from the "mkdir" branch, which this patch aims to address.
2021-11-23 12:07:42 -05:00
Jeremy Drake 489a8aacde filesystem: add clang32 and clangarm64 icons and script support 2021-11-08 21:57:59 -08:00
Evgeny Grin d0e7aa00af filesystem/main-config.site: fixed missing newline 2021-09-19 17:13:41 +03:00
Jeremy Drake c50eb37207 filesystem: add /etc/os-release
Used by etc-update to tell if a system is "Arch-like"
2021-06-04 13:11:18 -07:00
Christoph Reiter 9246acfd60 Revert "filesystem: remove empty mingw root directories"
This reverts commit 051eb1c876.

See https://github.com/msys2/MSYS2-packages/issues/2502
2021-05-14 20:13:48 +02:00
Christoph Reiter 051eb1c876 filesystem: remove empty mingw root directories
I don't think they are actually needed anymore
2021-05-13 18:35:58 +02:00
Christoph Reiter 86141654fa filesystem: bump pkgrel, update checksums 2021-05-09 20:29:47 +02:00
Koichi Murase 796df420b7 filesystem/dot.inputrc: remove an unused and incorrect keybinding 2021-05-09 12:19:41 +09:00
Christoph Reiter e8d696bbc4 filesystem: set XDG_DATA_DIRS for mingw bash-completion
This adds a new profile.d/ script where we can add stuff without changing
/etc/profile and triggering a pacman backup.

Fixes #2438
2021-04-23 10:52:43 +02:00
Christoph Reiter 62f08f4fbc filesystem, gnupg, msys2-keyring: avoid keeping gpg-agent/dirmngr around
They get started in the background and stay around which comes with various problems:
* The files can't be deleted until they are stopped
* Some CI systems wait until all programs are stopped
* On a cygwin update we have to restart everything or forking will be broken
  (though pacman takes care of that now by killing everything cygwin-like on a core update)

Ideally though they would just exit in a controlled way after we no longer need them.

The reason this uses GNUPGHOME instead of passing --home to gpgconf is that dirmngr started by
"pacman-key --refresh-keys" somehow couldn't be killed that way.
Maybe because gpg doesn't forward --homedir in that case. Setting GNUPGHOME helped.
2021-04-18 21:14:38 +02:00
Jeremy Drake e6cfdf08a5 add CLANGARM64 MSYSTEM/MINGW_ARCH 2021-04-07 21:38:50 -07:00
Christoph Reiter e9007a72e6 filesystem: update icons, finish support for ucrt64/clang64
Fixes #2406
2021-03-31 19:46:53 +02:00
Christoph Reiter e1b769b0e4 filesystem: fix missing CONFIG_SITE breaking configure host detection
We want configure to always go through our config.site. It first
looks at CONFIG_SITE, then the prefix if there is one and then falls
back to our default. But this means if a prefix is set it wouldn't
use it.

Fix this by setting CONFIG_SITE always like before.

Broken by 9a37bb560a
2021-03-24 22:29:10 +01:00
Christoph Reiter 1072c33404 filesystem: more ucrt things 2021-03-21 17:54:35 +01:00
Christoph Reiter 1869c1e238 filesystem: typo.. 2021-03-21 17:36:06 +01:00
Christoph Reiter 9c4cb76f7b filesystem: add ucrt64 2021-03-21 09:02:43 +01:00
Christoph Reiter 9a37bb560a filesystem: Clean up CONFIG_SITE usage
Just depend on the MSYSTEM_ env vars being set properly. This allows
us to have one config.site file that handles all cases.
2021-03-21 07:41:21 +01:00
David Macek f77906b4a3 filesystem: Avoid trying to chmod /dev/{shm,mqueue}
Although the default and most used way to install MSYS2 is to have it
user-writable, some users prefer to have the root writable only to
admins.  In that case, the 01-devices.post script would always print out
two failures on "login" when trying to chmod /dev/{shm,mqueue}.  Since
the only supported configuration for MSYS2 is to mount `/` with noacl
where chmod() is a no-op, the failure is purely cosmetic, as is the
chmod invocation itself.  For these reasons, let's not chmod at all.

I'm aware the non-user-writable root configuration itself is not
officially supported either, but I've been using it like that for years
now and this is the only issue I know of, so I think it's reasonable to
resolve this.
2021-02-10 13:44:44 +01:00
jeremyd2019 8f47f0ac89 filesystem: update sha256sums 2021-01-03 00:15:12 -08:00
jeremyd2019 516a0b8318 filesystem: update pkgver 2021-01-03 00:09:33 -08:00
jeremyd2019 932687a742 filesystem: add CLANG32 and CLANG64 to msystem 2021-01-03 00:08:07 -08:00
jeremyd2019 6f2e18300f filesystem: deduplicate MSYSTEM handling
also add handling for CLANG* in addition to MINGW* MSYSTEM values
2020-12-31 16:02:39 -08:00
Christoph Reiter d88c4706bd Use zstd for all packages now
It's been long enough and everyone should have a pacman that supports it
2020-12-19 17:48:10 +01:00
Miloš Komarčević 8481dd948d filesystem: bump version 2020-10-12 09:22:21 +02:00
Miloš Komarčević 082493ae57 filesystem: use matching icon for console
Helps identifying window thumbnails when switching between MSYS and MINGW64 consoles
2020-10-09 13:35:45 +02:00
fauxpark 3471304f54 Bump pkgrel 2020-08-13 06:52:06 +10:00
fauxpark 7530d8e962 Override %SHELL% for bash 2020-08-13 06:50:17 +10:00
Christoph Reiter 8a7ada7fbf filesystem: add mingw32.ico and mingw64.ico
Fixes #2081
2020-08-06 00:00:09 +02:00
Christoph Reiter 9f3943b8e4 filesystem: remove rege-info.sh (#2044)
It calls install-info on all info files on the first MSYS2 start, but all
the info files are already installed in our current installer.

I'm not 100% sure why this was added, but I guess because of #1998 the installer
created in a chroot didn't install the info files properly and thus they were
missing on a fresh install. This is no longer the case now.

regen-info.sh is called in /etc/profile and part of the "backup" array in the PKGBUILD
so the call might not be removed if the user has changed /etc/profile. Since it is only
called in the first MSYS2 session this shouldn't lead to any problems.
2020-07-17 10:16:01 +03:00
Christoph Reiter 20f306e94d filesystem: fix upgrade (#2022)
msys2-base was removed from dash and filesystem, but filesystem gets updated
first and then fails beause it would break dash which hasn't been updated yet.

So add the provides back.

This fixes:

error: failed to prepare transaction (could not satisfy dependencies)
:: installing filesystem (2020.02-3) breaks dependency 'msys2-base' required by dash
2020-06-25 08:38:16 +03:00
Yasuhiro KIMURAandYasuhiro KIMURA 4a6f6a1511 filesystem: Make msystem compatible with POSIX compliant shells. (#2009)
Behavior about the value of HOSTTYPE and MACHTYPE is not compatible
between various POSIX compliant shells. For example zsh doesn't set
HOSTTYPE at all and set MACHTYPE to that of HOSTTYPE in bash. I
checked source tree of bash and found that HOSTTYPE is set to the
result of `uname -m` and that MACHTYPE is set to the result of `uname
-m` plus "-pc-msys".So change code accordingly.

This fixes issue #2008.

Co-authored-by: Yasuhiro KIMURA <yasu@utahime.org>
2020-06-23 08:11:26 +03:00
David Macek 19bd06b131 [RFC] Cleanup (#1984)
* Remove msys2-runtime dependencies

* Remove `base` group

* Remove some packages from `base-devel` group
2020-06-02 09:28:40 +03:00
Christoph Reiter fa38d385cf Switch to zstd by default except for core packages (#1969)
PKGEXT in PKGBUILD wins over the value set in makepkg.conf
2020-05-22 08:51:02 +03:00
Alexey Pavlov 0213401e91 filesystem: Rebuild 2020-02-24 21:51:37 +03:00
hiroakit 7476bdd9b4 Remove double quotes of the LOGINSHELL (#1868)
* Remove double quotes of the LOGINSHELL

When set shell arguments, LOGINSHELL has double quotes.
In the default, L6: set "LOGINSHELL=bash". 
I followed the format it.

* Add value to $SHELL for zsh

Issue:
1. Run, C:\msys64\msys2_shell.cmd -mingw64 -shell zsh
2. echo $SHELL
3. Nothing
2020-02-24 10:34:24 +03:00
Alexey Pavlov 0d665cc45b filesystem: Rebuild 2020-02-06 11:27:53 +03:00
Tanzinul Islam 1ea229850a Fix msys2_shell.cmd argument-handling with spaces (#1836)
* Fix msys2_shell.cmd argument-handling with spaces

Commit 11ba641bed intended to preserve [`cmd.exe` delimiter characters](https://ss64.com/nt/syntax-esc.html#delimiters) in the command line passed on to `bash`, but broke the handling of `-where` directories with spaces in them. Fix this by:

 - Incrementing `shiftCounter` with any quoted arguments treated as separate words, because the `FOR /F ... IN`-loop at the end cannot treat them (in the full command) as single parameters.
 - Using the full list of `cmd.exe` delimiters in the `FOR /F ... IN`-loop when skipping the initial tokens.

Tested this with:

```
C:\msys2\msys2_shell.cmd -defterm -no-start -mingw64 -where <DIR> -shell bash -c $@ -- echo hello there, --world=windows
```

where `<DIR>` is the following:

 - C:\Users
 - C:\Progra~1
 - "C:\Program Files"
 - "C:\Program Files (x86)"
 - "C:\Users\T-17\Documents\Projects and Learning\test,dir"

Fixes #1826

* Clean up `FOR /F ... IN`-command

* Clean up working variables

* Adhere to lowercase CALL convention

* Prefix working variables with `msys2_` to prevent collisions with user-defined variables

* Don't clobber quotes and parentheses in final Bash command line

* Prevent warning trace on no arguments

* Handle cmd.exe metacharacters (e.g. parentheses) in Bash command line
2020-02-06 08:05:49 +03:00
Alexey Pavlov 001fb00426 filesystem: Fix checksums 2020-01-16 10:17:59 +03:00
Alexey Pavlov fa59bbbb0e filesystem: Rebuild 2020-01-15 16:09:34 +03:00
Tanzinul Islam 11ba641bed msys2_shell.cmd: Avoid argument splitting by cmd.exe (#1795)
Consider this inline invocation in a Windows Command Prompt:

```
C:\msys2\msys2_shell.cmd -defterm -no-start -mingw64 -here -c $@ -- echo hello there, --world=windows
```

This currently produces:

>hello there, --world windows

Note the absence of the `=` character. This is due to the word-splitting done by `cmd.exe` to form the positional parameters (`%1` - `%9`). The same word-splitting is not done on the `%*` special variable, so derive the remaining command line arguments.

With this fix, the above command produces:

>hello there, --world=windows
2020-01-13 07:46:14 +03:00
Viktor Szakats 7f7316ba9b use HTTPS in URLs where supported (#1741) 2019-09-30 09:33:57 +03:00
Niklas Holm 4ae39f3c2e filesystem: minor fix (#1557)
Minor fix, I'm guessing this was the original intention.
2019-01-22 13:50:19 +03:00