@linxin666/dsh-win-bash 0.0.0-stage → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/PROVENANCE.md +215 -0
- package/README.i18n.yaml +6 -0
- package/README.md +264 -2
- package/README.zh.md +221 -0
- package/cordis.patch.yml +13 -0
- package/lib/index.js +2756 -0
- package/lib/types/background.d.ts +169 -0
- package/lib/types/config.d.ts +130 -0
- package/lib/types/gate.d.ts +179 -0
- package/lib/types/index.d.ts +104 -0
- package/lib/types/protocol.d.ts +90 -0
- package/lib/types/pwsh-replacement.d.ts +140 -0
- package/lib/types/runtime.d.ts +115 -0
- package/lib/types/shell.d.ts +184 -0
- package/lib/types/tool.d.ts +123 -0
- package/package.json +58 -3
- package/runtime/win32-x64/checksums.sha256 +91 -0
- package/runtime/win32-x64/etc/bash.bashrc +69 -0
- package/runtime/win32-x64/etc/fstab +6 -0
- package/runtime/win32-x64/etc/msystem +27 -0
- package/runtime/win32-x64/etc/msystem.d/CLANG64 +7 -0
- package/runtime/win32-x64/etc/msystem.d/CLANGARM64 +7 -0
- package/runtime/win32-x64/etc/msystem.d/MINGW32 +7 -0
- package/runtime/win32-x64/etc/msystem.d/MINGW64 +7 -0
- package/runtime/win32-x64/etc/msystem.d/MSYS +4 -0
- package/runtime/win32-x64/etc/msystem.d/UCRT64 +7 -0
- package/runtime/win32-x64/etc/nsswitch.conf +12 -0
- package/runtime/win32-x64/etc/package-versions.txt +67 -0
- package/runtime/win32-x64/etc/profile +146 -0
- package/runtime/win32-x64/etc/profile.d/bash_profile.sh +11 -0
- package/runtime/win32-x64/etc/profile.d/lang.sh +19 -0
- package/runtime/win32-x64/licenses/GPL-2.0.txt +338 -0
- package/runtime/win32-x64/licenses/GPL-3.0.txt +674 -0
- package/runtime/win32-x64/licenses/LGPL-2.1.txt +501 -0
- package/runtime/win32-x64/licenses/LGPL-3.0.txt +165 -0
- package/runtime/win32-x64/licenses/expat-COPYING.txt +21 -0
- package/runtime/win32-x64/licenses/gcc-libs-RUNTIME.LIBRARY.EXCEPTION.txt +73 -0
- package/runtime/win32-x64/licenses/gettext-runtime-COPYING.LIB.txt +501 -0
- package/runtime/win32-x64/licenses/gettext-runtime-COPYING.txt +13 -0
- package/runtime/win32-x64/licenses/git-for-windows-LICENSE.txt +360 -0
- package/runtime/win32-x64/licenses/heimdal-LICENSE.txt +33 -0
- package/runtime/win32-x64/licenses/libcbor-LICENSE.md +21 -0
- package/runtime/win32-x64/licenses/libffi-LICENSE.txt +21 -0
- package/runtime/win32-x64/licenses/libfido2-LICENSE.txt +26 -0
- package/runtime/win32-x64/licenses/libiconv-COPYING.LIB.txt +501 -0
- package/runtime/win32-x64/licenses/libiconv-COPYING.txt +674 -0
- package/runtime/win32-x64/licenses/libopenssl-LICENSE.txt +177 -0
- package/runtime/win32-x64/licenses/libpcre-LICENCE.txt +93 -0
- package/runtime/win32-x64/licenses/libsqlite-LICENSE +25 -0
- package/runtime/win32-x64/licenses/ncurses-LICENSE +29 -0
- package/runtime/win32-x64/licenses/openssh-LICENCE.txt +412 -0
- package/runtime/win32-x64/licenses/zlib-LICENSE +22 -0
- package/runtime/win32-x64/usr/bin/awk.exe +0 -0
- package/runtime/win32-x64/usr/bin/b2sum.exe +0 -0
- package/runtime/win32-x64/usr/bin/basename.exe +0 -0
- package/runtime/win32-x64/usr/bin/basenc.exe +0 -0
- package/runtime/win32-x64/usr/bin/bash.exe +0 -0
- package/runtime/win32-x64/usr/bin/cat.exe +0 -0
- package/runtime/win32-x64/usr/bin/cmp.exe +0 -0
- package/runtime/win32-x64/usr/bin/comm.exe +0 -0
- package/runtime/win32-x64/usr/bin/cp.exe +0 -0
- package/runtime/win32-x64/usr/bin/cut.exe +0 -0
- package/runtime/win32-x64/usr/bin/dash.exe +0 -0
- package/runtime/win32-x64/usr/bin/date.exe +0 -0
- package/runtime/win32-x64/usr/bin/diff.exe +0 -0
- package/runtime/win32-x64/usr/bin/diff3.exe +0 -0
- package/runtime/win32-x64/usr/bin/dirname.exe +0 -0
- package/runtime/win32-x64/usr/bin/echo.exe +0 -0
- package/runtime/win32-x64/usr/bin/env.exe +0 -0
- package/runtime/win32-x64/usr/bin/expr.exe +0 -0
- package/runtime/win32-x64/usr/bin/false.exe +0 -0
- package/runtime/win32-x64/usr/bin/find.exe +0 -0
- package/runtime/win32-x64/usr/bin/grep.exe +0 -0
- package/runtime/win32-x64/usr/bin/head.exe +0 -0
- package/runtime/win32-x64/usr/bin/ls.exe +0 -0
- package/runtime/win32-x64/usr/bin/mkdir.exe +0 -0
- package/runtime/win32-x64/usr/bin/mktemp.exe +0 -0
- package/runtime/win32-x64/usr/bin/msys-2.0.dll +0 -0
- package/runtime/win32-x64/usr/bin/msys-gcc_s-seh-1.dll +0 -0
- package/runtime/win32-x64/usr/bin/msys-gmp-10.dll +0 -0
- package/runtime/win32-x64/usr/bin/msys-iconv-2.dll +0 -0
- package/runtime/win32-x64/usr/bin/msys-intl-8.dll +0 -0
- package/runtime/win32-x64/usr/bin/msys-mpfr-6.dll +0 -0
- package/runtime/win32-x64/usr/bin/msys-ncursesw6.dll +0 -0
- package/runtime/win32-x64/usr/bin/msys-pcre-1.dll +0 -0
- package/runtime/win32-x64/usr/bin/msys-readline8.dll +0 -0
- package/runtime/win32-x64/usr/bin/mv.exe +0 -0
- package/runtime/win32-x64/usr/bin/pathchk.exe +0 -0
- package/runtime/win32-x64/usr/bin/printf.exe +0 -0
- package/runtime/win32-x64/usr/bin/pwd.exe +0 -0
- package/runtime/win32-x64/usr/bin/readlink.exe +0 -0
- package/runtime/win32-x64/usr/bin/rm.exe +0 -0
- package/runtime/win32-x64/usr/bin/rmdir.exe +0 -0
- package/runtime/win32-x64/usr/bin/sdiff.exe +0 -0
- package/runtime/win32-x64/usr/bin/sed.exe +0 -0
- package/runtime/win32-x64/usr/bin/seq.exe +0 -0
- package/runtime/win32-x64/usr/bin/sh.exe +0 -0
- package/runtime/win32-x64/usr/bin/sleep.exe +0 -0
- package/runtime/win32-x64/usr/bin/sort.exe +0 -0
- package/runtime/win32-x64/usr/bin/tail.exe +0 -0
- package/runtime/win32-x64/usr/bin/test.exe +0 -0
- package/runtime/win32-x64/usr/bin/touch.exe +0 -0
- package/runtime/win32-x64/usr/bin/tr.exe +0 -0
- package/runtime/win32-x64/usr/bin/true.exe +0 -0
- package/runtime/win32-x64/usr/bin/uname.exe +0 -0
- package/runtime/win32-x64/usr/bin/uniq.exe +0 -0
- package/runtime/win32-x64/usr/bin/wc.exe +0 -0
- package/runtime/win32-x64/usr/bin/xargs.exe +0 -0
- package/src/background.ts +270 -0
- package/src/config.ts +209 -0
- package/src/gate.ts +308 -0
- package/src/index.ts +277 -0
- package/src/protocol.ts +130 -0
- package/src/pwsh-replacement.ts +435 -0
- package/src/runtime.ts +240 -0
- package/src/shell.ts +630 -0
- package/src/tool.ts +481 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/PROVENANCE.md
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# PROVENANCE - vendored bash runtime
|
|
2
|
+
|
|
3
|
+
This file records exactly what ships in `runtime/win32-x64/`, where it
|
|
4
|
+
came from, how it was reduced, and what licenses apply. Nothing here is
|
|
5
|
+
generated at install time: the payload is committed to the repository and
|
|
6
|
+
verified by SHA256 on every mount.
|
|
7
|
+
|
|
8
|
+
## Upstream
|
|
9
|
+
|
|
10
|
+
The payload has TWO source assets. Both come from the same Git for Windows
|
|
11
|
+
release, `v2.56.0.windows.2` (latest stable, not a prerelease, published
|
|
12
|
+
2026-10-05), and both are downloaded from the same release page prefix
|
|
13
|
+
`https://github.com/git-for-windows/git/releases/download/v2.56.0.windows.2/`.
|
|
14
|
+
|
|
15
|
+
| Asset | What it supplies | Bytes | SHA256 |
|
|
16
|
+
| --- | --- | --- | --- |
|
|
17
|
+
| `MinGit-2.56.0.2-64-bit.zip` | the shell and the rest of the userland: every payload file EXCEPT `usr/bin/sleep.exe` and `usr/bin/seq.exe` | 39806486 | `da35e72aa21c005a5a0d298cfbae110bc1609a815730ea0dde84b01a1b3cd3be` |
|
|
18
|
+
| `Git-2.56.0.2-64-bit.tar.bz2` | `usr/bin/sleep.exe` and `usr/bin/seq.exe` only | 118485193 | `16ca394bdb94b372267d79e1e10b68763674f73e03e0648202a7971a8a730a84` |
|
|
19
|
+
|
|
20
|
+
MinGit is the upstream's own minimal, redistributable Git for Windows build, but
|
|
21
|
+
it is not a complete `usr/bin`: it ships only the slice of each MSYS2 package
|
|
22
|
+
its own tooling needs. `coreutils` is declared in the MinGit archive's
|
|
23
|
+
`etc/package-versions.txt` (8.32-5) while `sleep.exe` and `seq.exe` are simply
|
|
24
|
+
absent from the archive, so those two files cannot be taken from MinGit. The
|
|
25
|
+
full Git for Windows installer archive carries the same release's complete
|
|
26
|
+
`usr/bin`, and is the pinned, digest-addressed place they come from.
|
|
27
|
+
|
|
28
|
+
Extraction is mechanical in both cases: the zip is unpacked with the system
|
|
29
|
+
`tar` (bsdtar reads zip) and the `.tar.bz2` is decompressed with `bzip2` and
|
|
30
|
+
unpacked with `tar`. No patching, no recompilation and no binary rewriting is
|
|
31
|
+
performed on any file below; every byte ships as the upstream release wrote it.
|
|
32
|
+
|
|
33
|
+
## What ships
|
|
34
|
+
|
|
35
|
+
`runtime/win32-x64/` holds a CURATED subset of the two upstream trees
|
|
36
|
+
described above - the payload must be large enough to be a usable shell and
|
|
37
|
+
small enough to belong to a plugin package - plus the license texts the
|
|
38
|
+
redistributed components require:
|
|
39
|
+
|
|
40
|
+
| Path | Contents |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| `usr/bin/bash.exe` | The upstream `usr/bin/sh.exe` byte-for-byte (upstream ships bash under both names; `bash.exe` is the name kept so the shell's own `$BASH` resolves to `/usr/bin/bash`) |
|
|
43
|
+
| `usr/bin/sh.exe` | The same bytes, kept under the upstream name |
|
|
44
|
+
| `usr/bin/*.exe` | The payload's userland: bash plus the shell/scripting/text helpers this tool promises |
|
|
45
|
+
| `usr/bin/sleep.exe`, `usr/bin/seq.exe` | The two files MinGit does not ship. Taken from the same release's full `Git-2.56.0.2-64-bit.tar.bz2` at `usr/bin/`, byte-for-byte; `coreutils` 8.32-5 (GPL-3.0-or-later), see Licensing |
|
|
46
|
+
| `usr/bin/msys-*.dll` | The MSYS2 runtime and exactly the DLL closure those executables import |
|
|
47
|
+
| `etc/` | The MSYS2 runtime configuration that makes the payload self-contained (see below) |
|
|
48
|
+
| `licenses/` | License texts for everything redistributed (see Licensing) |
|
|
49
|
+
| `checksums.sha256` | SHA256 of every other file in this directory, in `sha256sum -c` format |
|
|
50
|
+
|
|
51
|
+
### Payload inventory
|
|
52
|
+
|
|
53
|
+
| Fact | Value |
|
|
54
|
+
| --- | --- |
|
|
55
|
+
| Registered payload files | 91 |
|
|
56
|
+
| Payload bytes | 16873759 (16.09 MiB) |
|
|
57
|
+
| `usr/bin` regular files | 56 |
|
|
58
|
+
| `usr/bin/sleep.exe` SHA256 | `3dfa2435317339e861121c1bd22e57b7b67c204705f00a88b5ac10a0cba87514` |
|
|
59
|
+
| `usr/bin/sleep.exe` bytes | 36003 |
|
|
60
|
+
| `usr/bin/seq.exe` SHA256 | `6e5c79fce1d50d888b38f5a0a02a314265e733f151e8b9d2c953b363a60d27d0` |
|
|
61
|
+
| `usr/bin/seq.exe` bytes | 68488 |
|
|
62
|
+
| `bash.exe` SHA256 | `5490d0da5e7cf9d92068cc48fcc590f2bcf8564add8ff91c3b5fe541eb2d72e3` |
|
|
63
|
+
| `bash.exe` bytes | 2449886 |
|
|
64
|
+
| `msys-2.0.dll` SHA256 | `2a89b7c31b323c42e2fb37900af087aeb27417694e630a210bc75b0369410bc7` |
|
|
65
|
+
| Shell version | GNU bash 5.3.15(2)-release (x86_64-pc-cygwin) |
|
|
66
|
+
|
|
67
|
+
### Why the payload is curated rather than the whole upstream trees
|
|
68
|
+
|
|
69
|
+
The full MinGit `usr/bin` carries a second, unrelated tool family (OpenSSH,
|
|
70
|
+
with the whole Heimdal/Kerberos/OpenSSL closure - about 9 MiB of `msys-*.dll`).
|
|
71
|
+
`ssh` is not what this plugin provides, and shipping it would put a
|
|
72
|
+
credential-bearing network client inside a DSH profile for no reason. The
|
|
73
|
+
vendored set is the shell plus its userland; anything else is reachable from
|
|
74
|
+
the session's own tools.
|
|
75
|
+
|
|
76
|
+
The excluded executables are exactly: `ssh.exe`, `ssh-add.exe`, `ssh-agent.exe`,
|
|
77
|
+
`rebase.exe`, `rebaseall`, `chattr.exe`, `lsattr.exe`, `getfacl.exe`,
|
|
78
|
+
`gencat.exe`, `getopt.exe`, `gmondump.exe`, `newgrp.exe`, `profiler.exe`,
|
|
79
|
+
`cygwin-console-helper.exe`, plus the DLLs only those import:
|
|
80
|
+
`msys-crypto-3`, `msys-asn1-8`, `msys-cbor-0.11`, `msys-com_err-1`, `msys-crypt-2`,
|
|
81
|
+
`msys-fido2-1`, `msys-gssapi-3`, `msys-hcrypto-4`, `msys-heimbase-1`, `msys-heimntlm-0`,
|
|
82
|
+
`msys-hx509-5`, `msys-krb5-26`, `msys-roken-18`, `msys-sqlite3-0`, `msys-wind-0` and `msys-z`.
|
|
83
|
+
|
|
84
|
+
The reduction was verified by PE-import analysis, not by guessing: the import
|
|
85
|
+
table of every kept executable was walked transitively, and every non-kept DLL
|
|
86
|
+
appears in no kept file's closure. The kept DLLs are exactly `msys-2.0`,
|
|
87
|
+
`msys-gcc_s-seh-1`, `msys-gmp-10`, `msys-iconv-2`, `msys-intl-8`, `msys-mpfr-6`,
|
|
88
|
+
`msys-ncursesw6`, `msys-pcre-1` and `msys-readline8`.
|
|
89
|
+
|
|
90
|
+
Two files are taken from the second source asset rather than MinGit, because
|
|
91
|
+
MinGit does not contain them at all: `usr/bin/sleep.exe` and `usr/bin/seq.exe`
|
|
92
|
+
(`coreutils` 8.32-5). Their import tables were walked the same way and resolve
|
|
93
|
+
entirely inside the payload - `msys-intl-8.dll`, `msys-2.0.dll` and
|
|
94
|
+
`KERNEL32.dll` - so they add two executables and no DLL. The selection rule for
|
|
95
|
+
the second asset stays a named-file rule, never a wildcard: the full installer
|
|
96
|
+
archive carries far more than the payload needs (Perl, Tcl/Tk, vim, mintty,
|
|
97
|
+
OpenSSH, curl and their whole dependency closure), and only `usr/bin/sleep.exe`
|
|
98
|
+
and `usr/bin/seq.exe` are taken from it.
|
|
99
|
+
|
|
100
|
+
### Why `etc/` is part of the payload
|
|
101
|
+
|
|
102
|
+
The MSYS2 runtime resolves its own root from the executable's location. Two
|
|
103
|
+
files decide whether the payload is a self-contained userland or a shell that
|
|
104
|
+
resolves its tools against the host:
|
|
105
|
+
|
|
106
|
+
- `etc/fstab` declares the `usertemp` mount for `/tmp`. Without it, `/tmp` does
|
|
107
|
+
not resolve and MSYS prints `bash.exe: warning: could not find /tmp,
|
|
108
|
+
please create!` on every start, losing a working scratch directory.
|
|
109
|
+
- Everything else under `etc/` keeps the payload's own configuration
|
|
110
|
+
(`profile`, `bash.bashrc`, `nsswitch.conf`, `msystem`, and the
|
|
111
|
+
`msystem.d/` and `profile.d/` fragments) inside the package instead of
|
|
112
|
+
inheriting whatever a host Git for Windows install left behind.
|
|
113
|
+
|
|
114
|
+
`etc/ssh` is deliberately NOT vendored: the payload ships no ssh client, so
|
|
115
|
+
its configuration would be dead weight.
|
|
116
|
+
|
|
117
|
+
### Payload integrity
|
|
118
|
+
|
|
119
|
+
- `runtime/win32-x64/checksums.sha256` registers every file in the directory
|
|
120
|
+
except itself, in `sha256sum -c` format.
|
|
121
|
+
- The host half verifies the whole manifest BEFORE the tool is registered
|
|
122
|
+
(`resolveRuntime` in `src/runtime.ts`). A mismatch refuses the mount with the
|
|
123
|
+
first offending path; a tampered or half-installed payload never runs a
|
|
124
|
+
model-authored command.
|
|
125
|
+
- The repository `.gitattributes` pins the payload's binaries (`*.exe`,
|
|
126
|
+
`*.dll`) as `binary`, so a Windows checkout cannot rewrite the bytes the
|
|
127
|
+
digests cover.
|
|
128
|
+
|
|
129
|
+
## Licensing
|
|
130
|
+
|
|
131
|
+
Git for Windows is a distribution of many upstream projects, and the parts of
|
|
132
|
+
it this package redistributes are licensed under GPL-2.0-or-later and
|
|
133
|
+
GPL-3.0-or-later among others. The corresponding texts ship with the payload
|
|
134
|
+
in `runtime/win32-x64/licenses/`, so the vendored binaries are never distributed
|
|
135
|
+
without their notices.
|
|
136
|
+
|
|
137
|
+
The Git for Windows umbrella license (`git-for-windows-LICENSE.txt`) is
|
|
138
|
+
reproduced verbatim from the upstream archive, together with every license
|
|
139
|
+
text that archive itself ships for the components below. For components whose
|
|
140
|
+
MSYS2 package ships no license text inside the MinGit archive (bash,
|
|
141
|
+
msys2-runtime, coreutils, sed, grep, gawk, findutils, diffutils and dash), the
|
|
142
|
+
canonical upstream text of the license named by the MSYS2 package is vendored
|
|
143
|
+
instead and listed as such.
|
|
144
|
+
|
|
145
|
+
`sleep.exe` and `seq.exe` belong to `coreutils` (8.32-5, the version the MinGit
|
|
146
|
+
archive itself declares in `etc/package-versions.txt`), which is
|
|
147
|
+
GPL-3.0-or-later. Neither source archive ships a coreutils license text - the
|
|
148
|
+
MinGit zip has none, and the full `Git-2.56.0.2-64-bit.tar.bz2` carries license
|
|
149
|
+
files for many of its bundled packages but none for coreutils - so taking the
|
|
150
|
+
two binaries from the second asset adds no new license obligation to satisfy
|
|
151
|
+
and no new license file to vendor. The already-vendored canonical
|
|
152
|
+
`GPL-3.0.txt` covers them exactly as it already covered the other coreutils
|
|
153
|
+
members of the payload (`sort`, `head`, `tail`, `wc`, `uniq`, `tr`, `expr`,
|
|
154
|
+
`test`, `cp`, `mv`, `rm`, `cat`), which come from the same MSYS2 package.
|
|
155
|
+
|
|
156
|
+
| Vendored file | Applies to | License |
|
|
157
|
+
| --- | --- | --- |
|
|
158
|
+
| `git-for-windows-LICENSE.txt` | the Git for Windows distribution as a whole | GPL-2.0 |
|
|
159
|
+
| `GPL-3.0.txt` | bash, msys2-runtime (Cygwin), coreutils (including `sleep.exe` and `seq.exe` from the full Git tarball), sed, grep, gawk, findutils, diffutils | GPL-3.0-or-later |
|
|
160
|
+
| `GPL-2.0.txt` | dash, gmp, and the GPLv2 components of the distribution | GPL-2.0 |
|
|
161
|
+
| `LGPL-2.1.txt` | libiconv, libintl (gettext-runtime), libxcrypt | LGPL-2.1-or-later |
|
|
162
|
+
| `LGPL-3.0.txt` | mpfr, gmp (dual) | LGPL-3.0-or-later |
|
|
163
|
+
| `gcc-libs-RUNTIME.LIBRARY.EXCEPTION.txt` | libgcc_s (msys-gcc_s-seh-1.dll) | GCC Runtime Library Exception |
|
|
164
|
+
| `ncurses-LICENSE` | ncurses (msys-ncursesw6.dll) | MIT-style |
|
|
165
|
+
| `libpcre-LICENCE.txt` | PCRE1 (msys-pcre-1.dll) | BSD-3-Clause |
|
|
166
|
+
| `libiconv-COPYING.txt`, `libiconv-COPYING.LIB.txt` | libiconv (msys-iconv-2.dll) | LGPL-2.1-or-later |
|
|
167
|
+
| `gettext-runtime-COPYING.txt`, `gettext-runtime-COPYING.LIB.txt` | GNU gettext runtime (msys-intl-8.dll) | LGPL-2.1-or-later |
|
|
168
|
+
| `libffi-LICENSE.txt` | libffi | MIT |
|
|
169
|
+
| `expat-COPYING.txt` | Expat | MIT |
|
|
170
|
+
| `zlib-LICENSE` | zlib | Zlib |
|
|
171
|
+
| `libcbor-LICENSE.md` | libcbor | MIT |
|
|
172
|
+
| `libfido2-LICENSE.txt` | libfido2 | BSD-2-Clause |
|
|
173
|
+
| `heimdal-LICENSE.txt` | Heimdal | BSD-3-Clause |
|
|
174
|
+
| `libopenssl-LICENSE.txt` | OpenSSL | Apache-2.0 |
|
|
175
|
+
| `libsqlite-LICENSE` | SQLite | Public domain |
|
|
176
|
+
| `openssh-LICENCE.txt` | OpenSSH (carried because the MinGit archive ships it for the runtime family; no ssh client is vendored here) | BSD-style |
|
|
177
|
+
|
|
178
|
+
The package's own source code is Apache-2.0, matching the rest of this
|
|
179
|
+
repository. The vendored payload keeps its own licenses; the two do not mix,
|
|
180
|
+
which is why the payload sits in its own directory with its own `licenses/`
|
|
181
|
+
tree rather than being folded into the package's source.
|
|
182
|
+
|
|
183
|
+
## Reproducing this payload
|
|
184
|
+
|
|
185
|
+
Both assets are required; the payload cannot be rebuilt from either one alone.
|
|
186
|
+
|
|
187
|
+
1. Download `MinGit-2.56.0.2-64-bit.zip` from
|
|
188
|
+
`https://github.com/git-for-windows/git/releases/download/v2.56.0.windows.2/MinGit-2.56.0.2-64-bit.zip`
|
|
189
|
+
and verify its SHA256 is
|
|
190
|
+
`da35e72aa21c005a5a0d298cfbae110bc1609a815730ea0dde84b01a1b3cd3be`.
|
|
191
|
+
2. Download `Git-2.56.0.2-64-bit.tar.bz2` from
|
|
192
|
+
`https://github.com/git-for-windows/git/releases/download/v2.56.0.windows.2/Git-2.56.0.2-64-bit.tar.bz2`
|
|
193
|
+
and verify its SHA256 is
|
|
194
|
+
`16ca394bdb94b372267d79e1e10b68763674f73e03e0648202a7971a8a730a84`.
|
|
195
|
+
A snapshot whose digest does not match is unusable: stop rather than
|
|
196
|
+
reselecting bytes.
|
|
197
|
+
3. Extract the zip with `tar -xf <zip> -C <dir>` (bsdtar handles zip).
|
|
198
|
+
4. Copy `usr/bin/*` EXCEPT the excluded names listed above, copy
|
|
199
|
+
`usr/bin/sh.exe` to `usr/bin/bash.exe`, and copy `etc/` minus `etc/ssh`.
|
|
200
|
+
5. Extract exactly the two extra files from the tarball, naming them (no
|
|
201
|
+
wildcard):
|
|
202
|
+
`bzip2 -dc Git-2.56.0.2-64-bit.tar.bz2 | tar -xf - -C <dir> usr/bin/sleep.exe usr/bin/seq.exe`
|
|
203
|
+
and copy them into `usr/bin/`. Confirm `sleep.exe` is 36003 bytes /
|
|
204
|
+
`3dfa2435317339e861121c1bd22e57b7b67c204705f00a88b5ac10a0cba87514` and
|
|
205
|
+
`seq.exe` is 68488 bytes /
|
|
206
|
+
`6e5c79fce1d50d888b38f5a0a02a314265e733f151e8b9d2c953b363a60d27d0`.
|
|
207
|
+
6. Copy the license texts into `licenses/`. `GPL-3.0.txt` already covers the
|
|
208
|
+
`coreutils` files, including the two just added; step 5 adds no new license
|
|
209
|
+
text.
|
|
210
|
+
7. Regenerate `checksums.sha256` over the result, in LF, so it registers 91
|
|
211
|
+
files and 16873759 bytes.
|
|
212
|
+
|
|
213
|
+
A packaging-time verification script that performs steps 1-7 and checks the
|
|
214
|
+
result against a committed manifest is listed as follow-up work in the package
|
|
215
|
+
README; this file records what the committed payload IS.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# node scripts/verify-docs.mjs --write <dir>
|
|
5
|
+
README.md: 72ffe20a242382e5b7f93004a4fdbf0e600c3977
|
|
6
|
+
README.zh.md: 5bb459bfa258ebf3da9a6fa81b27e57d16fbcb85
|