[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic linux support #62

Open
jayvdb opened this issue Jun 22, 2019 · 3 comments
Open

Basic linux support #62

jayvdb opened this issue Jun 22, 2019 · 3 comments

Comments

@jayvdb
Copy link
Contributor
jayvdb commented Jun 22, 2019

Seems like there is a few problems preventing the basics from working. (Note I dont have choco installed yet, so that should be the first error I see)

$ pwsh -c ". assets/fudge/Fudge.ps1 list"
Fudge v$version$
Error checking user administrator priviledges
Windows Principal functionality is not supported on this platform.
Must be running with administrator priviledges for Fudge to fully function

Duration: 00:00:00.4940592
$ pwsh -c ". assets/fudge/Fudge.ps1 pack -fudgefile .ci/Fudgefile.appveyor"
Fudge v$version$
Error checking user administrator priviledges
Windows Principal functionality is not supported on this platform.
Must be running with administrator priviledges for Fudge to fully function

Duration: 00:00:00.2603162
@Badgerati
Copy link
Owner

Oh yeah, there will be - Admin checking is a big one, as it only works on Windows. Also that Chocolately isn't for nix as well.

This is one that will be resolved via #61 and #53 - For rewriting Fudge as a module, I'm looking at using classes - to make multiple providers easier to support.

@jayvdb
Copy link
Contributor Author
jayvdb commented Jun 22, 2019

Also that Chocolately isn't for nix as well.

I have a reasonably working choco with chocolatey/choco#1827

I'm going to hack around the Fudge admin checking and see what else doesnt work. Im especially keen on seeing fudge/choco pack working, as that can be used to create fake empty packages that can be installed on Linux for mock/test/development purposes.

@jayvdb
Copy link
Contributor Author
jayvdb commented Jun 22, 2019

List of initial problems:

  • Test-Chocolatey invokes choco, but on linux it will be choco.exe which is not executable. I've created a shell script choco to workaround this. Instead, Test-Chocolatey could fall back to looking for mono, and/or invoking something like mono choco.exe. The user then needs to set MONO_PATH appropriately, but this isnt working for me yet.

  • Test-AdminUser fails badly with

    Error checking user administrator priviledges
    Windows Principal functionality is not supported on this platform.
    Must be running with administrator priviledges for Fudge to fully function

    Easy workaround is for Test-AdminUser to just return false on linux.

  • choco on linux replies with

    Chocolatey v0.10.14-beta-83-g501397c5 Custom unofficial builds are not allowed by default. To override this behavior, explicitly set --allow-unofficial.

    Fudge needs to add that --allow-unofficial , always on Linux, or just always always assuming it doesnt break anything. How silly that it needs a flag to run. That is a solution to a non-problem if I ever saw one.

    One possible workaround is for the user to add -args '--allow-unofficial' when invoking fudge, and then adding -Arguments $Arguments everywhere, as #47: Use cli passed arguments on install/upgrade paths #56 only added it to most of the actions. pack is one with a different Invoke-Chocolatey, so the CLI args need to be passed through to choco pack. choco -v doesnt need '--allow-unofficial'; there might be a few more which dont. Other actions that use Invoke-Chocolatey(Action) and dont pass args from the CLI: Remove-Fudgefile, Restore-Fudgefile, New-Fudgefile, Invoke-FudgePrune, Invoke-FudgeClean. The alternative is for Invoke-Chocolatey to add --allow-unofficial. If it can always be added without side-effects, this is a good option. If it should only be added in some circumstances, then checking those circumstances here could be an annoying overhead.

  • action pack should not require admin privileges. Seems this is just an oversight, and needs to be added to the list $isAdminAction = @(... It seems to work ok without admin privs.

  • Most of the Write-Notice in Fudge.ps1 should be Write-Fail and should return an exit code

jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 23, 2019
This function is Windows specific.  Bypass it until
a suitable implementation is needed.

Related to Badgerati#62
jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 23, 2019
Custom built chocolatey fails if --allow-unofficial is not used

Related to Badgerati#62
jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 23, 2019
jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 27, 2019
This function is Windows specific.  Bypass it until
a suitable implementation is needed.

Related to Badgerati#62
jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 27, 2019
Custom built chocolatey fails if --allow-unofficial is not used

Related to Badgerati#62
jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 27, 2019
jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 27, 2019
This function is Windows specific.  Bypass it until
a suitable implementation is needed.

Related to Badgerati#62
jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 27, 2019
Custom built chocolatey fails if --allow-unofficial is not used

Related to Badgerati#62
jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 27, 2019
jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 28, 2019
This function is Windows specific.  Bypass it until
a suitable implementation is needed.

Related to Badgerati#62
jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 28, 2019
Custom built chocolatey fails if --allow-unofficial is not used

Related to Badgerati#62
jayvdb added a commit to jayvdb/Fudge that referenced this issue Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants