Commit Graph
113 Commits
Author SHA1 Message Date
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
Alexey Pavlov 04fc2d6020 filesystem: Add clang mount points for future use 2018-12-15 21:47:05 +03:00
jannick0 7a975b1508 main-config.site: set default value of var 'as_echo' to 'echo' (#1519)
The variable 'as_echo' is not set in a virgin shell, but by 'autoconf'
and friends. Setting the default value to 'echo' facilitates running
'configure' in a virgin shell.

* filesystem/main-config.site: see above.
* filesystem/mingw32-config.site: see above.
* filesystem/mingw64-config.site: see above.

Fixes #1518
2018-12-15 20:31:32 +03:00
Rafael Kitover c31f18202d better support for Win10 OpenSSH server (#1375)
If msys2 bash is set as the DefaultShell for the Win10 OpenSSH server,
there is no way to pass -l to make it a login shell, so /etc/profile is
not sourced, PATH is not set, and the bashrc produces errors.

Detect this case in /etc/bash.bashrc, by checking for the SSH_CONNECTION
environment variable and PATH not having msys2 elements, and source
/etc/profile.
2018-08-08 08:46:00 +03:00
Alexey Pavlov 6950837a05 filesystem: Fix checksums. Rebuild 2018-06-04 09:44:35 +03:00
pchemguy 45151d01c6 Add support for more than 9 shell command line arguments
Adds a loop collecting all command line arguments remaining after msys2_shell.cmd processing
2018-05-29 15:24:56 +03:00
Henrik Jensen 714549756f Make CHERE_INVOKING visible for users.
Enables users to take action (e.g. in `~/.bash_profile`) if msys was invoked with `CHERE_INVOKING` set.
Example usage (start in same directory as at last logout) :
Add to ~/.bash_profile:
  # Change to pwd at last logout unless $CHERE_INVOKING was set
  if [ ! -z "${CHERE_INVOKING_VISIBLE_FOR_USER}" ]; then
    unset CHERE_INVOKING_VISIBLE_FOR_USER
  else
    [ -s ~/.lastdirectory ] && cd `cat ~/.lastdirectory`
  fi
Add to ~/.bash_logout:
  pwd > ~/.lastdirectory
2018-05-06 06:33:38 +02:00
Alexey Pavlov e9e36738be filesystem: Update pkgsums, rebuild 2018-04-19 13:43:47 +03:00
Алексей 688944cee3 Merge pull request #1205 from niklasholm/patch-5
filesystem: Include /mingwXX/local/man on MANPATH
2018-04-19 07:41:18 +03:00
Алексей 885d5ba144 Merge pull request #1214 from AeliusSaionji/patch-1
remove minor bashism from /etc/profile
2018-04-19 07:40:27 +03:00
Алексей dc3d9f2c6a Merge pull request #1169 from jd28/master
filesystem: Add -shell parameter to msys2_shell.cmd
2018-04-19 07:39:48 +03:00
Aelius 950791306b remove minor bashism from /etc/profile
Noticed this when using `dash` as my shell.

https://wiki.ubuntu.com/DashAsBinSh#source
2018-04-04 15:28:06 -04:00
Niklas Holm 95bf733902 filesystem: Include /mingwXX/local/man on MANPATH 2018-03-14 09:33:26 +01:00
Mehrdad 086e08a092 /etc/post-install and /etc/profile.d script optimizations 2018-03-11 22:44:23 -07:00
jmd ab784fea52 filesystem: Add -shell parameter to msys2_shell.cmd
Allow setting the login shell via command line parameter.  e.g,

    msys2_shell -shell fish -mintty
2018-02-19 21:30:00 -08:00
Niklas Holm dd6ecd174e filesystem: fix regression from previous patch 2018-02-14 17:15:30 +01:00
Niklas Holm c780fd8d1b Use $SHLVL to trigger cd instead 2018-02-14 15:51:07 +01:00
Niklas Holm b3da2d9a8e Revert "Fix issue #1107"
This reverts commit fb4ed54980.
2018-02-14 15:19:53 +01:00
Niklas Holm ce9c6ada55 Revert "Change comment and always unset CD_HOME"
This reverts commit 000e81ffcb.
2018-02-14 15:19:42 +01:00
Alexey Pavlov cad4f8002b filesystem: Fix checksums 2018-02-14 13:15:10 +03:00
Niklas Holm 83afbb1e11 Bump pkgver 2018-02-14 10:07:25 +01:00
Niklas Holm 032e31971f cd back to current dir after copying skeleton 2018-02-14 09:59:22 +01:00
Niklas Holm 000e81ffcb Change comment and always unset CD_HOME 2018-02-14 09:58:32 +01:00
Niklas Holm fb4ed54980 Fix issue #1107
- Only cd to $HOME when started from msys2_shell.cmd
2018-02-13 19:09:05 +01:00
Shea Parkes 7ca94b0abd Correct spelling in msys2_shell.cmd
Do this so the help docs are clearer.
2017-11-20 21:31:23 -05:00
Evgeny Grin (karlson2k) 677a01138d msys2_shell.cmd: added option for executing command and returning result to batch caller 2017-05-03 21:00:10 +03:00
Evgeny Grin (karlson2k) c21d3c018f msys2_shell.cmd: use "title" directly with mintty 2017-05-03 18:56:14 +03:00
Evgeny Grin (karlson2k) 1aa446ea7e msys2_shell.cmd: removed unused Console2 options 2017-05-03 18:46:20 +03:00
Алексей 8a2863f5f3 Revert "Taskbar-pinnable mintty" 2017-04-14 07:52:21 +03:00
Mihail Konev 59bd390b5e filesystem: add terminal cwd sequence to PS1 2017-03-05 22:07:26 +05:00
Alethea Rose bf0c061f17 Also source /etc/profile.d/*.sh for zsh 2017-02-13 22:06:22 -05:00
David Macek 9e1d71b9bd filesystem: Remove the transitional post-install message about removing old .bat files 2017-02-05 12:45:32 +01:00
David Macek 74f9468ce4 filesystem: Fix case when getent isn't installed 2017-01-31 09:25:55 +01:00
David Macek ae10fd86dd filesystem: Vary the prompt between regular '$' and bold '#'
Show '#' only if we can detect that the current process is
elevated.  It requires `group: db` enabled in /etc/nsswitch.conf.
2017-01-29 12:41:09 +01:00
Karlson2k 9f39c75117 filesystem: bump version and update checksums 2016-07-16 22:18:25 +03:00
Karlson2k 648db9106c msys2_shell.cmd: fixed processing specified working directory 2016-07-16 22:15:10 +03:00
Karlson2k 9f7a93a620 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.
2016-07-16 19:20:44 +03:00
Karlson2k 705a468108 msys2_shell.cmd: Fixed return value - printing help is not an error. 2016-07-16 19:11:50 +03:00