168 Commits

Author SHA1 Message Date
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
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 9a37bb560a94ab9c
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