coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

Provide a standardized method of installation on Windows.

Open RokeJulianLockhart opened this issue 1 year ago • 17 comments

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?

RokeJulianLockhart avatar Jan 22 '23 00:01 RokeJulianLockhart

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

YDX-2147483647 avatar Jan 22 '23 07:01 YDX-2147483647

@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!

RokeJulianLockhart avatar Jan 22 '23 11:01 RokeJulianLockhart

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 avatar Jan 22 '23 14:01 tertsdiepraam

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

tertsdiepraam avatar Jan 23 '23 12:01 tertsdiepraam

@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.

RokeJulianLockhart avatar May 18 '23 17:05 RokeJulianLockhart

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

  • ZIP is fine

    Installer File Manifest Schema v1.5.0 accepts arbitrary archive format, and YamlCreate.ps1 can generate manifests by asking a few questions.

    It's not necessary to submit MSIX.

  • Publish CI is needed

    It looks like that winget can't automatically update manifests like scoop. It's our reponsibility to push/submit new versions. (More research needed)

Questions

  • Name of this project?

    coreutils (as the repo name), uutils coreutils (as in the website and the scoop app), or rust coreutils (as in releases)?

    Both an ID (e.g. WindowsTerminal, case sensitive) and a full name (e.g. Windows Terminal) is needed.

  • Publisher name?

    Is the following OK?

    • Publisher ID: uutils
    • Full publisher name: The uutils project
    • Author: The uutils project contributors
    • Copyright: Copyright (c) Jordi Boggiano and many others (as in LICENSE)
  • Locale?

    Microsoft specifies many locales IDs, should we choose en-US, en-GB, or Australia, Canada, etc.?

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
# 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
# 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
# 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.

YDX-2147483647 avatar Nov 15 '23 13:11 YDX-2147483647

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

  • https://github.com/uutils/coreutils/releases/download/0.0.23/coreutils-0.0.23-i686-pc-windows-msvc.zip
  • https://github.com/uutils/coreutils/releases/download/0.0.23/coreutils-0.0.23-x86_64-pc-windows-gnu.zip
  • https://github.com/uutils/coreutils/releases/download/0.0.23/coreutils-0.0.23-x86_64-pc-windows-msvc.zip

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?

RokeJulianLockhart avatar Nov 15 '23 16:11 RokeJulianLockhart

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 avatar Nov 15 '23 16:11 sylvestre

locale is currently en-us

sylvestre avatar Nov 15 '23 16:11 sylvestre

Copyright: should be Copyright (c) uutils developers

sylvestre avatar Nov 15 '23 16:11 sylvestre

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…

YDX-2147483647 avatar Nov 15 '23 16:11 YDX-2147483647

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 avatar Nov 15 '23 16:11 RokeJulianLockhart

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.

RokeJulianLockhart avatar Nov 15 '23 16:11 RokeJulianLockhart

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.

tertsdiepraam avatar Nov 15 '23 20:11 tertsdiepraam

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.

RokeJulianLockhart avatar Nov 15 '23 20:11 RokeJulianLockhart

📢 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.

Dragon1573 avatar Nov 23 '23 00:11 Dragon1573

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.

tertsdiepraam avatar Dec 15 '23 11:12 tertsdiepraam