Skip to content

Linux: Initial support for Gentoo installations. - #11429

Merged
Travis Plunk (TravisEz13) merged 1 commit into
PowerShell:masterfrom
rkitover:gentoo-support
Apr 15, 2020
Merged

Travis Plunk (TravisEz13) merged 1 commit into
PowerShell:masterfrom
rkitover:gentoo-support

Conversation

@rkitover

@rkitover Rafael Kitover (rkitover) commented Dec 24, 2019 •

Copy link
Copy Markdown
Contributor

Add Gentoo to list of supported distributions and add a
tools/installpsh-gentoo.sh script which installs the Ubuntu 18.04
powershell or powershell-preview .deb using the Gentoo dpkg port.

If -includeide is specified, also installs Visual Studio Code via
flatpak, installing flatpak-overlay and flatpak if necessary.

This should work for most Gentoo users with a relatively recent system.

Also fix sudo check and pwsh-preview test in tools/installpsh-debian.sh.

Signed-off-by: Rafael Kitover rkitover@gmail.com

@msftclas

Microsoft Contribution License Agreements (msftclas) commented Dec 24, 2019 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@rkitover

Copy link
Copy Markdown
Contributor Author

Fixed removing the temp directory and made the output nicer.

@rkitover

Copy link
Copy Markdown
Contributor Author

Added support for -includeide via flatpak.

@rkitover

Copy link
Copy Markdown
Contributor Author

Made more improvements, it now finds the latest ubuntu dist automatically and doesn't use /tmp.

@rkitover

Copy link
Copy Markdown
Contributor Author

I am pretty much done with this. I know it's the holidays and everything, but can someone take a look please? I can work on other stuff separately.

@rkitover
Rafael Kitover (rkitover) force-pushed the gentoo-support branch 2 times, most recently from db4f35d to 6bcf18f Compare January 3, 2020 03:33
@daxian-dbw

Copy link
Copy Markdown
Member

Andrew (@anmenaga) Could you please review this PR? Thanks!

@rkitover

Copy link
Copy Markdown
Contributor Author

Dongbo Wang (@daxian-dbw) I realize I made some opinionated decisions here, but horrible hacks are often the best solution on gentoo. I might work on a proper ebuild in the main gentoo repository for this, but I think this solution is not terrible for the time being and will work for most gentoo users.

Also this code does not affect the other installers much, so there is little potential for breakage.

I am also happy to contribute to these scripts in the future.

Let me know if you need anything else.

@daxian-dbw

Copy link
Copy Markdown
Member

Rafael Kitover (@rkitover) My apology for the delay. I will drive the review process on our side. Thank you for your patience!

@daxian-dbw

Copy link
Copy Markdown
Member

Andrew (@anmenaga) Travis Plunk (@TravisEz13) Can you please review this PR after the 7.0.0-rc.3 release? Thank you!

@daxian-dbw

Copy link
Copy Markdown
Member

Andrew (@anmenaga) Travis Plunk (@TravisEz13) A gentle ping :) Please take a look at this PR, thanks!

@anmenaga Andrew (anmenaga) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly fine to me except that it pulls some stuff from 3rd parties:

  1. https://github.com/fosero/...
  2. https://raw.githubusercontent.com/DarwinJS/...

Travis Plunk (@TravisEz13) can you please look at this? Thank you.

Add Gentoo to list of supported distributions and add a
tools/installpsh-gentoo.sh script which installs the latest Ubuntu
powershell or powershell-preview .deb using the Gentoo dpkg port.

If -includeide is specified, also installs Visual Studio Code via
flatpak, installing flatpak-overlay and flatpak if necessary.

This should work for most Gentoo users with a relatively recent system.

Also fix sudo check and pwsh-preview test in tools/installpsh-debian.sh.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
@rkitover

Copy link
Copy Markdown
Contributor Author

Thank you very much for looking at this, it's not very important of course, but I might do more work on these scripts too.

Just a note that the DarwinJS URL is taken straight from the debian script for the vscode extension.

@rkitover

Rafael Kitover (rkitover) commented Apr 14, 2020 •

Copy link
Copy Markdown
Contributor Author

Dongbo Wang (@daxian-dbw) ping,

I have one review.

Explanation of URLs:

URL Description
https://github.com/fosero/flatpak-overlay.git This is a third party repository for gentoo, it has the flatpak ebuild which is not in core gentoo.
https://raw.githubusercontent.com/DarwinJS/CloudyWindowsAutomationCode/master/pshcoredevenv/testpowershell.ps1 This is taken straight from installpsh-debian.sh, it's a script to test the Visual Studio Code PowerShell plugin installation.

I'd like to get more involved in this project, I have been waiting on this PR.

Thank you!

GitHub
A Gentoo ebuild overlay for flatpak. Contribute to fosero/flatpak-overlay development by creating an account on GitHub.


#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution

VERSION="1.2.0"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if you added a test for this, but you need a gentoo container that will work in azure devops.

meaning it needs node, sudo, and adduser (I might be forgetting some, here is what we check for, some are for our tests, https://github.com/PowerShell/PowerShell-Docker/blob/master/tests/container.tests.ps1#L567-L578)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will look into this, I've never worked with azure but I've done work with docker containers etc.. And it looks like some base images for gentoo are available.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You would probably have to build it.

@TravisEz13 Travis Plunk (TravisEz13) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Apr 15, 2020
@TravisEz13
Travis Plunk (TravisEz13) merged commit b7c66ab into PowerShell:master Apr 15, 2020
@rkitover
Rafael Kitover (rkitover) deleted the gentoo-support branch April 15, 2020 19:44
@ghost

Copy link
Copy Markdown

🎉v7.1.0-preview.2 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants