Hi All, Url has been deprecated. What is to be done with the Monticello use of the subclasses of Url? At the moment, ZnUrl has a hardcoded case switch to redirect on the right type of repository [1], but... It's not extendable, and breaks gitfiletree://. [1] https://github.com/pharo-project/pharo-core/blob/e89b4ac70d5cef761667317d58a... Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
Thierry, ZnUrl now implements #mcRepositoryAsUser:withPassword: though it is currently a hack. Do you have a suggestion how to make it extendable ? I will think about it as well, I do have some ideas. Sven On 28 Oct 2013, at 11:18, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Hi All,
Url has been deprecated. What is to be done with the Monticello use of the subclasses of Url?
At the moment, ZnUrl has a hardcoded case switch to redirect on the right type of repository [1], but... It's not extendable, and breaks gitfiletree://.
[1] https://github.com/pharo-project/pharo-core/blob/e89b4ac70d5cef761667317d58a...
Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
Le 28/10/2013 11:18, Sven Van Caekenberghe a écrit :
Thierry,
ZnUrl now implements #mcRepositoryAsUser:withPassword: though it is currently a hack. Do you have a suggestion how to make it extendable ? I will think about it as well, I do have some ideas.
Well, I would just move the schemeName on the repository class and add a fromUrl:asUser:withPassword: in the repository instance creation, and change the mcRepositoryAsUser:withPassword: to search among repository types based on the scheme in the url and dispatch with a call to fromUrl:asUser:withPassword: on the right repository class. Thierry
Sven
On 28 Oct 2013, at 11:18, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Hi All,
Url has been deprecated. What is to be done with the Monticello use of the subclasses of Url?
At the moment, ZnUrl has a hardcoded case switch to redirect on the right type of repository [1], but... It's not extendable, and breaks gitfiletree://.
[1] https://github.com/pharo-project/pharo-core/blob/e89b4ac70d5cef761667317d58a...
Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
-- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
Hi Thierry, On 28 Oct 2013, at 11:31, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Le 28/10/2013 11:18, Sven Van Caekenberghe a écrit :
Thierry,
ZnUrl now implements #mcRepositoryAsUser:withPassword: though it is currently a hack. Do you have a suggestion how to make it extendable ? I will think about it as well, I do have some ideas.
Well, I would just move the schemeName on the repository class and add a fromUrl:asUser:withPassword: in the repository instance creation, and change the mcRepositoryAsUser:withPassword: to search among repository types based on the scheme in the url and dispatch with a call to fromUrl:asUser:withPassword: on the right repository class.
Sounds like an excellent idea/design. The dispatching/searching could be done on all subclasses of MCRepository, maybe using a more general #handlesUrl: method that for now just says ^ url scheme = #http but is general enough for potential special cases in the future. Having an instanciation class method on MCRepository subclasses like #fromUrl: would then do the actual action. The fact that username/password are passed as arguments while they could be part of the url is strange, but maybe necessary since you might not want them in the url proper - but the url can be freely manipulated (like safeUrl := url copy; username: nil; password: nil; yourself). Now, your idea solves the problem entirely external to ZnUrl itself, maybe it will hinder portability of Monticello itself (but the version in Pharo is probably customised anyway) ? My idea was to have some kind of global registry for actions to be performed on ZnUrl, the arguments being the url, an operation name, and an optional argument, ZnUrl>>#performOperation:withArgs: - To register a handler you specify a selection block, ZnUrl class>>#registerOperationWhen:do: For example, there is currently ZnUrl>>#resolve which should work differently on file urls. ZnUrl>>#resolve ^ self performOperation: #resolve withArgs: nil ZnUrl registerOperationWhen: [ :url :operation :args | (url scheme = #http | url scheme = #https) & operation = #resolve ] do: [ :url :args | ZnClient new beOneShot; enforceHttpSuccess: true; get: self ]. ZnUrl registerOperationWhen: [ :url :operation :args | url scheme = #file | operation = #resolve ] do: [ :url :args | url asFileReference contents ]. #performOperation:with: would search for a handler whose condition block matches and then execute it. But I am not 100% sure about this idea myself ;-) It is extendable but is require registration which can be a bit brittle. Sven
Thierry
Sven
On 28 Oct 2013, at 11:18, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Hi All,
Url has been deprecated. What is to be done with the Monticello use of the subclasses of Url?
At the moment, ZnUrl has a hardcoded case switch to redirect on the right type of repository [1], but... It's not extendable, and breaks gitfiletree://.
[1] https://github.com/pharo-project/pharo-core/blob/e89b4ac70d5cef761667317d58a...
Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
-- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
FWIW I also have serious issues with MetacelloToolBox against an FTP repository. Monticello works, but not the automated stuff It is related to the same kind of situation (Pharo 2.0). *MetacelloToolBox * * createDevelopment: '0.1'* * for: 'ConfigurationOfXXX'* * importFromBaseline: '0.1-baseline'* * description: 'initial development version'.* * * *(ConfigurationOfXXX project version: '0.1') load.* * * *(MetacelloToolBox validateConfiguration: ConfigurationOfXXX) explore.* * * *MetacelloToolBox* * updateToLatestPackageVersionsIn: ConfigurationOfXXX* * description: 'Made spinner work for Ajax'.* * * *"Does not seem to work, even if logged int the repository from Monticello"* *Gofer new* * url: 'ftp://ftp.xxx.com/mc';* * package: 'ConfigurationOfXXX';* * commit: 'Gofer test'.* * * *"This one does not work"* *MetacelloToolBox* * saveConfigurationPackageFor: 'ConfigurationOfXXX' description: 'Added config'.* Phil On Mon, Oct 28, 2013 at 11:18 AM, Goubier Thierry <thierry.goubier@cea.fr>wrote:
Hi All,
Url has been deprecated. What is to be done with the Monticello use of the subclasses of Url?
At the moment, ZnUrl has a hardcoded case switch to redirect on the right type of repository [1], but... It's not extendable, and breaks gitfiletree://.
[1] https://github.com/pharo-**project/pharo-core/blob/** e89b4ac70d5cef761667317d58a449**6d443d8a4e/Gofer-Core.package/** extension/ZnUrl/instance/**mcRepositoryAsUser_**withPassword_.st<https://github.com/pharo-project/pharo-core/blob/e89b4ac70d5cef761667317d58a...>
Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
On 28 Oct 2013, at 11:19, phil@highoctane.be wrote:
FWIW I also have serious issues with MetacelloToolBox against an FTP repository.
We should remove FTP. FTP is evil: the passed is passed in the clear, it is old, it makes problems with NAT and firewalls. FTP should *not* be used in 2013! Marcus
FTP is easy, and setting up a monticello repo like this takes no time. Especially on whatever shared hosting account, my NAS, on my own box where I can share the package-cache folder that way. And it can be browsed as well. I am not in the mood of maintaining an STH instance with mongo and friends. I tried filetree and gitfiletree but those weren't supporting my workflow easily enough (and for some reason, I got a corrupt something w/ Bitbucket which let me fight with it for a full damn day). Keep FTP alive. Phil
+1 to FTP. Esteban A. Maringolo 2013/10/28 phil@highoctane.be <phil@highoctane.be>
FTP is easy, and setting up a monticello repo like this takes no time. Especially on whatever shared hosting account, my NAS, on my own box where I can share the package-cache folder that way.
And it can be browsed as well.
I am not in the mood of maintaining an STH instance with mongo and friends.
I tried filetree and gitfiletree but those weren't supporting my workflow easily enough (and for some reason, I got a corrupt something w/ Bitbucket which let me fight with it for a full damn day).
Keep FTP alive.
Phil
On 28 Oct 2013, at 11:22 , Marcus Denker <marcus.denker@inria.fr> wrote:
On 28 Oct 2013, at 11:19, phil@highoctane.be wrote:
FWIW I also have serious issues with MetacelloToolBox against an FTP repository.
We should remove FTP. FTP is evil: the passed is passed in the clear, it is old, it makes problems with NAT and firewalls.
FTP should *not* be used in 2013!
Marcus
By the first criteria, shouldnât we remove HTTP repositories as well? Base64 isnât much less plaintext than normal plaintext :) IMHO, from a security POV theyâre both usable if connecting to a local/VPNâed repository on a properly firewalled network. Which also gives an answer to the NAT/firewall dilemma, you shouldnât use FTP directly over the internet anyways. What *would* be nice, is a warning when you add a repository with an insecure authentication protocol, that it better not be accessed through public networks . Cheers, Henry
participants (6)
-
Esteban A. Maringolo -
Goubier Thierry -
Henrik Johansen -
Marcus Denker -
phil@highoctane.be -
Sven Van Caekenberghe