182 Commits

Author SHA1 Message Date
Christoph Reiter
f64742bde4 filesystem: update checksum 2025-07-25 21:20:27 +02:00
Vincent Wang
1adb0bef55 Fix a spelling mistake dot.bashrc 2025-07-25 21:20:05 +02:00
Christoph Reiter
960dc62938 filesystem: switch MSYSTEM_CHOST from x86_64-pc-msys to x86_64-pc-cygwin 2025-06-17 22:54:29 +02:00
jeremyd2019
dc17e6ed9e
filesystem: make msystems pluggable. (#5381)
The /etc/msystem script sources /etc/msystem.d/${MSYSTEM,,} (but using
only POSIX shell features rather than a bash-ism to lower-case since
/etc/msystem is included in /etc/profile, so may be used by a non-bash
shell).  /usr/bin/shell validates an MSYSTEM by checking for the
existence of that file.
2025-05-20 08:02:41 +02:00
LEE,SEUNGMIN
6bc90f727a
msys2_shell: fix typo in warning (#5330)
* msys2_shell: fix typo in warning

* update checksums

---------

Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
2025-04-17 08:40:05 +02:00
LIU Hao
71d24745af
filesystem: Remove /etc/bash.bash_logout (#5221)
* filesystem: Remove /etc/bash.bash_logout

By adding `Hold=always` in ~/.minttyrc, it is possible to keep MinTTY open
after all processes in it have terminated, which is useful for examination
of outputs. However this script used to clear the screen, leaving a blank
window, and causing confusion.

Another reason for removing this script is that it's not found on fresh
installation of Debian or Ubuntu.

Reference: https://superuser.com/questions/1262655/mintty-how-to-keep-my-output-visible-after-processes-terminate/1263001#1263001
Signed-off-by: LIU Hao <lh_mouse@126.com>

* Update PKGBUILD

---------

Signed-off-by: LIU Hao <lh_mouse@126.com>
Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
2025-02-23 09:52:26 +01:00
مهدي شينون (Mehdi Chinoune)
d4ddcaa805 filesystem: drop clang32 2024-12-19 06:10:43 +01:00
Christoph Reiter
429e4f476e filesystem: upate checksums; bump pkgrel 2024-11-25 20:39:10 +01:00
Nahor
f482a5d523 filesystem: fix HISTCONTROL list separator
HISTCONTROL is a colon-separated list, NOT a comma-separated one
2024-11-25 20:39:10 +01:00
James Wilkinson
7f6cd96067 Update checksum 2024-08-28 17:00:42 -04:00
James Wilkinson
41156ba329
Fix spelling error in dot.bash_profile 2024-08-28 16:21:32 -04:00
Simon Sobisch
3d4a075d75 msys2_shell help update: add clang32 clangarm64
follow-up to 489a8aacde7ff649c77874838bf4e6a79d436e15
2024-05-31 17:53:55 +02:00
Christoph Reiter
11a162b0e5 repo: make file executable permissions match the cygwin derived status
In case we have a git clone from Linux that is accessed via cygwin git
the files executable status will be derived from the file content (shebang)
and won't match the git repo, leading to a initially dirty tree.

This can be worked around by setting "core.filemode=false", but let's try
to match the cygwin permissions with the in-repo permissions so this isn't
needed.
2024-04-14 15:17:42 +02:00
Christoph Reiter
ee51cd62b4 Get rid of msys2_internal
It only affects the references atm, so just make it a special key there instead.
Less confusing.
2024-01-24 08:24:55 +01:00
Christoph Reiter
1f1a74cb26 Port everything away from PKGMETA
keep an empty PKGMETA.yml for now until all users are adjusted and
deployed.
2023-09-17 20:40:26 +02:00
Christoph Reiter
6af3e543a4 filesystem: update the win7/8 login message
We have dropped support now, so let's make the message reflect that.
2023-02-07 15:57:26 +01:00
Christoph Reiter
46e6c35c42 filesystem: update url and license
sourceforge is no longer used; switch to spdx
2023-02-07 07:56:19 +01:00
Christoph Reiter
8b9ce4f389 filesystem: move pkgver to a full date
as suggested by elieux
2023-02-06 18:14:20 +01:00
Christoph Reiter
57226453f6 filesystem: remove lowercase tmp/temp env vars
As pointed out in the removed comments, this doesn't seem to do
what it was added for. The initial motivation comes from
http://cygwin.com/ml/cygwin/2012-01/msg00201.html but the lower
case tmp/temp don't seem to affect Windows programs.

GetTempPath() and GetEnvironmentStrings() see the uppercase version
here, so do perl and ruby. Only python for some reason prefers
the lowercase version.

Also cygwin and git-for-windows removed this long ago.

Avoid the confusion and remove both env vars.
2023-02-06 18:14:20 +01:00
Christoph Reiter
f7d14586f1 filesystem: remove ~/.inputrc and remove the restart warning
We now provide ~/.inputrc as /etc/inputrc since fd25584fe30bc4fc

This means that on the first start we will execute /profile, which
writes various  bash related files to $HOME, which bash will execute
after /profile is finished.

So with ~/.inputrc out of the way the environment on the first start
should be the same as the second one, so we can remove the restart
warning at the beginning.

The question remains if we should still call "clear" at the end, hiding
the setup process. I decided for removing it and enclosing the setup with
some colored status message. This hopefully is not too confusing for
users seeing the intial process and still allows an easy way to see the logs
if something goes wrong.
2023-02-06 18:14:20 +01:00
Christoph Reiter
de5c153803 filesystem: /etc/profile: remove unused print_flags() function 2023-02-06 18:14:20 +01:00
Christoph Reiter
d048656c0d filesystem: move MAYBE_FIRST_START out of the post-install scripts
The main reason we have the first install warning still is that we
fill $HOME with bash related scripts that will only get executed
on the next login shell.

Simplify things by keeping MAYBE_FIRST_START logic in one file
and make it depend on wether $HOME was missing at the beginning.
2023-02-06 18:14:20 +01:00
Christoph Reiter
c5555d5473 filesystem: avoid calling update-ca-trust on first start
This gets run as a post-install script of ca-certificates
when creating the installer chroot, so there is no need
to run it again on the first start.
2023-02-06 18:14:20 +01:00
Christoph Reiter
f0fb7f2ab9 filesystem: remove 08-xml-catalog.post
This gets called in the post install script of libxml2
when we create the installer chroot.

No need to run this in post-install again
2023-02-06 18:14:20 +01:00
Christoph Reiter
36d4fd7577 filesystem: clean up maybe_create_winetc
Inline the call to cygpath into the loop to avoid it being
called in case all files already exist.

Remove call to chmod, it doesn't do anything in MSYS2.

Saves ~20ms here
2023-02-06 18:14:20 +01:00
Christoph Reiter
8812d66d09 filesystem: avoid a sed call when extracting the windows version
saves 10ms

v2 based on dscho's suggestion:
https://github.com/msys2/MSYS2-packages/pull/3491#discussion_r1092472598
2023-02-06 18:14:18 +01:00
Christoph Reiter
499a434fe7 filesystem: remove dep-search command
It is undocumented and hasn't been touched in 8+ years.

If someone is missing it we can include it in dev-tools or
some other msys2 developer oriented package.
2023-02-06 17:57:58 +01:00
Christoph Reiter
956e59a28f filesystem: remove setup code for restoring /dev
Current cygwin fails to delete or create /dev, since it's always
available as a virtual directory. rm fails because it's not empty
and mkdir fails because it already exists.

We could shell out to cmd.exe, but let's just continue to assume that
/dev exists in the installer base.

Also saves a useless mkdir call.
2023-02-06 17:57:58 +01:00
Christoph Reiter
4db9852fc2 filesystem: pkgrel bump 2023-01-11 20:56:44 +01:00
Christoph Reiter
d78597e5fc filesystem: avoid calling uname twice 2023-01-11 20:56:24 +01:00
Christoph Reiter
02d9b52df2 filesystem: remove code to create /dev/<fd/stdin/stdout/stderr> files
This is no longer requires since
https://github.com/cygwin/cygwin/commit/4ec08891a005c040da5bf7c38ae4

All four commands take around 50ms here, on every login shell.
2023-01-11 19:46:29 +01:00
Christoph Reiter
532e1b3737 filesystem: drop agm2 function
This was added in e259adce916745c3934

(1) this isn't executed if bash_profile exists, which is the default
and (2) I don't think we should include msys2 development related functions
here
2023-01-11 09:18:27 +01:00
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 051eb1c8769638a7c8145cc2b497c622cdd1648b.

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