uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.53k stars 1.26k forks source link

Provide a standardized method of installation on Windows. #4291

Open RokeJulianLockhart opened 1 year ago

RokeJulianLockhart commented 1 year ago

Providing an installer (ideally with a basic updater) would significantly lessen the burden of evaluating new releases. Currently, .deb releases are provided, so these tools are certainly ready for installation.

The .msix, .appx, .msi, and mere .exe formats (.msix being the most desirable) are viable alternatives to the current .zip packaging. However, if maintenance of such an installer is undesirable, perhaps submitting the zip files (since this https://github.com/microsoft/winget-cli/issues/140 is complete) to the official Windows Package Manager, (winget's) repository (per https://github.com/microsoft/winget-pkgs/blob/4c9bd7f275225fa97db5300e86c2b22d2be9c720/README.md#submitting-a-package) is superior?

YDX-2147483647 commented 1 year ago

Note: Before winget, we can use scoop as mentioned in the documentation.

RokeJulianLockhart commented 1 year ago

@YDX-2147483647, indeed! Apologies. I suppose that I should refile this as separate issues requesting submission to winget and MSIX support.

Is either proposition something that the development team is willing to tackle? I solely ask so that I don't waste time submitting a proposition that is of no interest.

Thanks!

tertsdiepraam commented 1 year ago

I like both suggestions. Maybe we could have some publish CI that pushes a release to the winget repo. However, this requires some thought about how much we want to take on. Most uutils packages for the package managers in the documentation are managed by third-parties, so we don't really have to maintain them ourselves.

MSIX sounds good as long as we can automate it.

mere .exe formats

Note that the .zip is just .exe + README.md + LICENSE. So providing the exe separately does not provide much benefit.

Edit: I'm also not on Windows so I can't do most of this, but I'd be happy to accept PRs.

tertsdiepraam commented 1 year ago

This is also related to https://github.com/uutils/coreutils/issues/2758

RokeJulianLockhart commented 1 year ago

@tertsdiepraam, it's definitely relevant, since uploading a package to the Microsoft Store would also allow users to use winget to install this via the commandline, via the msstore repository that it exposes.

YDX-2147483647 commented 9 months ago

I research it today. More work is needed, but let's do it step by step.

Questions

Current work (others can start here)

The following files should be put under https://github.com/microsoft/winget-pkgs/tree/master/manifests/u/ uutils/coreutils/0.0.23/.

uutils.coreutils.yaml ```yaml # Created with YamlCreate.ps1 v2.2.10 $debug=MDSU.CRLF.7-3-9.Win32NT # yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.5.0.schema.json PackageIdentifier: uutils.coreutils PackageVersion: 0.0.23 DefaultLocale: en-US ManifestType: version ManifestVersion: 1.5.0 ```
uutils.coreutils.installer.yaml ```yaml # Created with YamlCreate.ps1 v2.2.10 $debug=MDSU.CRLF.7-3-9.Win32NT # yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.5.0.schema.json PackageIdentifier: uutils.coreutils PackageVersion: 0.0.23 InstallerLocale: en-US InstallerType: zip InstallModes: - silent Installers: - Architecture: x64 NestedInstallerType: portable NestedInstallerFiles: - RelativeFilePath: coreutils-0.0.23-x86_64-pc-windows-msvc\coreutils.exe InstallerUrl: https://github.com/uutils/coreutils/releases/download/0.0.23/coreutils-0.0.23-x86_64-pc-windows-msvc.zip InstallerSha256: 6A09488F926F1462E6D80070473580B194534C3DD7E38E15DC6C4733DA46252E ManifestType: installer ManifestVersion: 1.5.0 ```
uutils.coreutils.locale.en-US.yaml ```yaml # Created with YamlCreate.ps1 v2.2.10 $debug=MDSU.CRLF.7-3-9.Win32NT # yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.5.0.schema.json PackageIdentifier: uutils.coreutils PackageVersion: 0.0.23 PackageLocale: en-US Publisher: The uutils project PublisherUrl: https://uutils.github.io PublisherSupportUrl: https://github.com/uutils/coreutils/issues # PrivacyUrl: Author: The uutils project contributors PackageName: uutils coreutils PackageUrl: https://uutils.github.io/coreutils/ License: MIT LicenseUrl: https://github.com/uutils/coreutils/blob/main/LICENSE Copyright: Copyright (c) Jordi Boggiano and many others CopyrightUrl: https://github.com/uutils/coreutils/blob/main/LICENSE ShortDescription: Cross-platform Rust rewrite of the GNU coreutils Description: | uutils coreutils is a cross-platform reimplementation of the GNU coreutils in Rust. While all programs have been implemented, some options might be missing or different behavior might be experienced. uutils aims to be a drop-in replacement for the GNU utils. Differences with GNU are treated as bugs. uutils aims to work on as many platforms as possible, to be able to use the same utils on Linux, Mac, Windows and other platforms. This ensures, for example, that scripts can be easily transferred between platforms. Please see https://uutils.github.io/coreutils/book/ for user manual Moniker: coreutils Tags: - busybox - command-line-tool - coreutils - cross-platform - gnu-coreutils - rust # ReleaseNotes: ReleaseNotesUrl: https://github.com/uutils/coreutils/releases/tag/0.0.23 # PurchaseUrl: # InstallationNotes: Documentations: - DocumentLabel: User Manual DocumentUrl: https://uutils.github.io/coreutils/book/ ManifestType: defaultLocale ManifestVersion: 1.5.0 ```

Next step: Submitting a Package / Author a manifest / Validation.

> gh repo clone microsoft/winget-pkgs && gh fork
> .\Tools\YamlCreate.ps1 -PackageIdentifier uutils.coreutils -PackageVersion 0.0.23 -Mode 3 # 3 = Edit metadata
# Just press Enter and Enter and Enter…
# The script will validate manifests at the end.
RokeJulianLockhart commented 9 months ago

Now that https://github.com/microsoft/winget-cli/issues/140#event-7470611247 has been completed, perhaps we can submit

to https://github.com/microsoft/winget-pkgs/issues/new?assignees=&labels=Help-Wanted%2CPackage-Request&projects=&template=package_request.yml&title=%5BPackage+Request%5D%3A+ immediately?

sylvestre commented 9 months ago

please call the project uutils-coreutils or rust-coreutils like the other projects: https://github.com/uutils/coreutils/blob/main/docs/src/installation.md

sylvestre commented 9 months ago

locale is currently en-us

sylvestre commented 9 months ago

Copyright: should be Copyright (c) uutils developers

YDX-2147483647 commented 9 months ago

Yes we can submit once the maintainer agrees on the manifests.

And we should set up a CI if we don't want to calculate SHA256 and submit manually in the future…

RokeJulianLockhart commented 9 months ago

To confirm, https://github.com/microsoft/winget-pkgs/issues/118259#issue-1870446535 is entirely separate, right? It won't conflict in any way we can predict? (It's blocked currently anyway.) If it's irrelevant, I'll file a request. What should the reverse DNS package ID be though? UUtilsDevelopers.Coreutils?

RokeJulianLockhart commented 9 months ago

https://github.com/uutils/coreutils/issues/4291#issuecomment-1812878695

I've filed https://github.com/microsoft/winget-pkgs/issues/126833#issue-1995149254. Please provide feedback over there.

tertsdiepraam commented 9 months ago

please call the project uutils-coreutils or rust-coreutils like the other projects:

By the way, I prefer uutils-coreutils since I think that's a bit more specific, but yeah, both are fine.

RokeJulianLockhart commented 9 months ago

https://github.com/uutils/coreutils/issues/4291#issuecomment-1813211832

See https://github.com/microsoft/winget-pkgs/issues/126833#issuecomment-1813243536. Per https://github.com/uutils/coreutils/issues/4291#issuecomment-1812890237,

Please provide feedback over there.

Dragon1573 commented 9 months ago

📢 Notes

This package is submitted to microsoft/winget-pkgs and available in winget.exe, users can easily install this package with winget install uutils.coreutils.

tertsdiepraam commented 8 months ago

I've just put up a PR to document that: https://github.com/uutils/coreutils/pull/5648

I still think there's something we could do for this issue: use cargo-dist. That should be able to make an msi for us. And in the future it might even do more, taking away some of the maintenance work people are doing for us in all the various repositories.