Skip to content

Conversation

@rkitover
Copy link
Contributor

@rkitover rkitover commented Dec 24, 2019

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
Copy link

msftclas commented Dec 24, 2019

CLA assistant check
All CLA requirements met.

@rkitover
Copy link
Contributor Author

Fixed removing the temp directory and made the output nicer.

@rkitover
Copy link
Contributor Author

Added support for -includeide via flatpak.

@rkitover
Copy link
Contributor Author

rkitover commented Jan 1, 2020

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

@rkitover
Copy link
Contributor Author

rkitover commented Jan 2, 2020

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 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
Member

@anmenaga Could you please review this PR? Thanks!

@rkitover
Copy link
Contributor Author

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

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

@daxian-dbw
Copy link
Member

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

@daxian-dbw
Copy link
Member

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

Copy link

@anmenaga anmenaga left a comment

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

@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
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
Copy link
Contributor Author

rkitover commented Apr 14, 2020

@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
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
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
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 TravisEz13 assigned TravisEz13 and unassigned daxian-dbw Apr 15, 2020
@TravisEz13 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 TravisEz13 added this to the 7.1.0-preview.2 milestone Apr 15, 2020
@TravisEz13 TravisEz13 merged commit b7c66ab into PowerShell:master Apr 15, 2020
@rkitover rkitover deleted the gentoo-support branch April 15, 2020 19:44
@ghost
Copy link

ghost commented Apr 23, 2020

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

Handy links:

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