Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

Initial support for .run packages. #651

Closed
wants to merge 1 commit into from
Closed

Initial support for .run packages. #651

wants to merge 1 commit into from

Conversation

andulv
Copy link

@andulv andulv commented Jan 4, 2015

.run Packages ara packages that are not "installed", effectively turning them into script-packages. The packages are not installed to lib\ folder, but in every other aspects they are identical to ordinary packages.

When a package has the extension '.run' this happens upon install:

  1. The package is downloaded to lib-run
  2. tools\chocolateyinstall.ps1 script is executed
  3. Package is removed from lib-run

One of the main advantages of .run packages as part of Chocolatey is dependencies. .run packages can depend on ordinary packages (or other .run packages). Ordinary packages can depend on .run packages.

Scenario 1 - AdvancedScriptPackage.run

  • Depends on scriptcs.
  • Includes AdvancedScript.cs in tools folder.
  • chocolateyinstall.ps1 does nothing but invoke 'scriptcs AdvancedScript.cs'.

Scenario 2 - CustomBusinessApplication (ordinary package)

  • Depends on EnsureComputerMeetsCorporateStandards.run
  • Depends on CleanUpOldLegacyApplication.run

I have done basic testing, and the changes seems to be working as intended.

If necessary I can do more testing and try to write some unit tests.

…, effectively turning them into script-packages)
@ferventcoder
Copy link
Contributor

Howdy,
Posh is deprecated. Choco has been rewritten in c# and will be out in a
few weeks. Why don't we close this and pick up a discussion (mailing list)
on why these type of packages would be necessary? Then if we agree it's
good we can move forward with a pull request against that. Thanks!

Note: We do have a contributors.md that pops up when you try to submit a
pull request or issue, in there we ask that you contact us before beginning
new work.

On Sunday, January 4, 2015, andulv [email protected] wrote:

.run Packages ara packages that are not "installed", effectively turning
them into script-packages. The packages are not installed to lib\ folder,
but in every other aspects they are identical to ordinary packages.

When a package has the extension '.run' this happens upon install:

  1. The package is downloaded to lib-run
  2. tools\chocolateyinstall.ps1 script is executed
  3. Package is removed from lib-run

One of the main advantages of .run packages as part of Chocolatey is
dependencies. .run packages can depend on ordinary packages (or other .run
packages). Ordinary packages can depend on .run packages.

Scenario 1 - AdvancedScriptPackage.run

  • Depends on scriptcs.
  • Includes AdvancedScript.cs in tools folder.
  • chocolateyinstall.ps1 does nothing but invoke 'scriptcs
    AdvancedScript.cs'.

Scenario 2 - CustomBusinessApplication (ordinary package)

  • Depends on EnsureComputerMeetsCorporateStandards.run
  • Depends on CleanUpOldLegacyApplication.run

I have done basic testing, and the changes seems to be working as intended.

If necessary I can do more testing and try to write some unit tests.

You can merge this Pull Request by running

git pull https://github.com/andulv/chocolatey run-package

Or view, comment on, or merge it at:

#651
Commit Summary

  • Initial support for .run packages. (Packages that are not
    "installed", effectively turning them into script-packages)

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#651.

Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@andulv
Copy link
Author

andulv commented Jan 4, 2015

Thanks for the feedback.

I have read the contributors.md and totally understand that you might not accept this PR.

I implemented this feature for own use. We are in the process of deploying Chocolatey against a private repository, and needed a way to enable clients to execute centrally administered scripts.

We will be rolling out this modified version of Chocolatey to our clients, but figured we would like to contribute our efforts upstreams.

Consider this pull request as my first "feature request" for this feature. I will follow up on mailing list. :)

If the feature is accepted I can reimplement it in the new C# version.

@ferventcoder
Copy link
Contributor

Awesome. Thanks for understanding. I'm trying to understand why you would want to remove traces of the install. We have similar packages that only run once, but you keep them around in case there are updates to the packages and you want to deploy that new functionality out.

@ferventcoder
Copy link
Contributor

Pending discussion a PR may be issued against new choco.

@andulv
Copy link
Author

andulv commented Jan 4, 2015

Just filed a issue (#652) where I tried to explain this feature and why we see the need for it.

I also posted to the mailing list (Google group). But my post just disappeared upon submit. Dont know if was session timeout or something, or if the group is moderated and the post will show up later? (I dont have much experience with Google groups).

@gep13
Copy link
Member

gep13 commented Jan 4, 2015

Dont know if was session timeout or something, or if the group is moderated and the post will show up later?

Yes, the forums are moderated. I don't see it in the queue for moderation though. Hopefully it will turn up, and if/when it does, it will get approved. Thanks for taking the time to explain this further.

@gep13
Copy link
Member

gep13 commented Jan 4, 2015

@andulv I have just approved your Google Groups post 👍

@andulv
Copy link
Author

andulv commented Jan 4, 2015

@gep13 Thanks. Waiting for response. Hopefully others will agree with me, or someone comes up with a better way to achieve the same result.

BTW: If you guys have read the use-case in the issue I filed, you have probably noticed that we are a potential fit for your business licenses. I also noticed that even though the Kickstarter is funded and closed, that you have sold very few of the larger business pledges.

Would it be possible to go for one of these pledges even though the Kickstarter is closed?

Send me an e-mail at [email protected] if you want to discuss it.

@gep13
Copy link
Member

gep13 commented Jan 4, 2015

Would it be possible to go for one of these pledges even though the Kickstarter is closed?

Sorry, I am going to have to leave that question for @ferventcoder. I know that he is out just now, but he will definitely follow up with you.

@ferventcoder
Copy link
Contributor

I also noticed that even though the Kickstarter is funded and closed, that you have sold very few of the larger business pledges.

I think this is mostly in part due to a short 30 day window, no guarantee that the kickstarter was going to be successful (until about 3 days out when it funded), businesses usually want to remain private, and most businesses go through a PO to do amounts over $1,000 (the PO process is usually longer than 10 days - they are not going to do it through a kickstarter).

Would you guys have funded with your name on the public backers page and been able to do so with a credit card (not a PO)? That question is mostly curiosity, because most of the businesses I talked to indicated one or more of the above.

@ferventcoder
Copy link
Contributor

I wouldn't hold much water in the low amount of business licenses sold. I'd reserve that for when we have a billing system set up and what the potential is going to be. I'd imagine that we are going to see a few that I probably won't be able to name. :)

@ferventcoder
Copy link
Contributor

Would it be possible to go for one of these pledges even though the Kickstarter is closed?

Unfortunately, once a Kickstarter is over, you can't back the project. However next summer we will have a system set up for accepting payments and generating licenses.

@andulv
Copy link
Author

andulv commented Jan 4, 2015

Credit card would be no problem for us, as long as we get at an invoice / receipt that specifies that we have paid for software/support or something similar. But we are a small three-person company so not much bureucracy needed.

But, guess we'll have to wait then. Judging from the amount of free support I have received today I believe we will manage without paid support for a while. :)

Anyway, I think our use case might be a interesting niche for you. We support a lot of standalone desktop computers that are not on the same network or in a domain.

There exists tons of solutions for distributing / updating desktop applications and configurations, but all/most of them are based on network shares, login scripts, remote powershell or similar.

Juding by the success of TeamViewer and similar software, there are quite a lof of small companies like us that support non-corporate-networked desktops.

The focus (and userbase) of Chocolatey today seems to be prosumers/developers for desktops and enterprise / developers on servers. Our use case is something of a mix between them.

I.e. a business license that is valid only for internal use in one company, would probably be impossible for us and other similar shops. A license that allows us to deploy on customers computers would be needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants