#foswiki 2016-09-19,Mon

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
***gac410 has left [04:16]
................. (idle for 1h24mn)
ChanServ sets mode: +o CDot [05:40]
..... (idle for 20mn)
ChanServ sets mode: +o MichaelDaum [06:00]
....................................................... (idle for 4h31mn)
MiaAxtellhello, was wondering if anyone could let me know where to find the {PermittedRedirectHostUrls} and if not how I need to configure this for it to work? [10:31]
....... (idle for 34mn)
jastMiaAxtell: you can edit it in the /bin/configure web interface, or on the server in lib/LocalSite.cfg (below the Foswiki base dir) [11:05]
............ (idle for 56mn)
MiaAxtellThank you, is there any documentation for it? I couldn't find anything useful before [12:01]
***ChanServ sets mode: +o gac410
ChanServ sets mode: +o MichaelDaum
[12:14]
....... (idle for 34mn)
gac410Hi all ... just a reminder. Release meeting in #foswiki-release ... 10 minute warning. Foswiki:Development/ReleaseMeeting02x02_20160919 [12:51]
FoswikiBothttps://foswiki.org/Development/ReleaseMeeting02x02_20160919 [ ReleaseMeeting02x02_20160919 ] [12:51]
gac410Release Meeting starting now in #foswiki-release
CDot can you attend?
Everyone is welcome!
[12:59]
CDotgood grief, is that the time [13:01]
.... (idle for 17mn)
***ChanServ sets mode: +o Lynnwood [13:18]
gac410ping vrurg
Lynnwood: Release meeting?
[13:23]
Lynnwoodsure [13:23]
............. (idle for 1h1mn)
vrurgjomo: I would soon leave for ~1hr. Will you be here in 1.5-2hrs? [14:24]
jomonot planned be here - but if need - of course could :)
so, no problem - will be here ;)
[14:25]
vrurgjomo: We can postpone for tomorrow or some other day. It's no rush. [14:33]
jomono problem - just ping me in the channel - best 2-3 hours before - me monitoring the channel - not reguraly but often :) :)
anyway - this is the best intro: http://advent.plackperl.org/2009/12/day-23-write-your-own-middleware.html (also here is an "INLINE middleware example) http://foswiki.org/Development/QuoVadisPsgiFoswiki#How_the_middlewares_works
[14:34]
FoswikiBot[ QuoVadisPsgiFoswiki ] [14:35]
jomomkdir -p /fw/Item14152 [14:44]
FoswikiBothttps://foswiki.org/Tasks/Item14152 [ Item14152: Implement OONewPluginModel proposal ] [14:44]
jomocd /fw/Item14152/
git clone https://github.com/foswiki/distro.git foswiki
cd foswiki
git checkout Item14152
cd core
perl pseudo-install.pl default
cd bin
plackup foswiki.psgi
#going to http://localhost:5000/ - and it dies...
Failed to opendir file /fw/Item14152/foswiki/core/lib/: No such file or directory at /fw/Item14152/foswiki/core/lib/ line 61 at /fw/Item14152/foswiki/core/lib/Foswiki/App.pm line 502
vrurg: just tried the above... any idea?
[14:44]
vrurgjomo: Sorry, I have to leave now. Quick suggestion – PERL5LIB must point to the lib.
But I didn't test this branch in the wild, as a server. Too much focus on the test case.
[14:46]
jomojust want test-run the branch .... ok, will check the PERL5LIB.... hm... [14:47]
gac410jomo, vrurg. Do you use "plackup" or do you just run perl bin/foswiki_debug.psgi from the shell. [14:49]
jomogac410: if something has the .psgi extension - it is supposed to run via "plackup"...
if it should be runneble from shell - it should have .pl extension or no extension at all...
the setting the PERL5LIB isn't helped - so, maybe tomorrow will ask vrug again, how to run the branch....
[14:50]
gac410I had it working here at one point. It starts fine with plackup ... but first request to localhost:5000 dies with
Failed to opendir file /var/www/foswiki/distro/core/lib/: No such file or directory at /var/www/foswiki/distro/core/lib/ line 96 at /var/www/foswiki/distro/core/lib/Foswiki/App.pm line 502.
[14:54]
jomoexactly as i wrote above :)
Failed to opendir file /fw/Item14152/foswiki/core/lib/: No such file or directory at /fw/Item14152/foswiki/core/lib/ line 61 at /fw/Item14152/foswiki/core/lib/Foswiki/App.pm line 502
[14:54]
gac410yes ... same thing.
Okay ... y, it's vrurg's issue I think. Checkout Item13897 which is the OO branch without the new extensions. plackup works fine.
[14:54]
FoswikiBothttps://foswiki.org/Tasks/Item13897 [ Item13897: Implement ImproveOOModel proposal. ] [14:56]
gac410Though it needs an apache proxy to be useful. [14:56]
jomowhy? [14:56]
gac410Can't serve /pub/... files.
Either that or bootstrap needs to detect and write all pub links as bin/viewfile/ ... which is dog slow
[14:56]
jomohm... just wondering why can't ... starnge. [14:57]
gac410Or the plack config needs something to serve /pub directly. Foswiki code doesn't normally serve /pub files. [14:58]
jomostarman foswiki.psgi - should "just work" - ofcourse with static files too... [14:58]
gac410Error while loading /var/www/foswiki/distro/core/bin/foswiki_debug.psgi: failed to listen to port 5000: Address already in use at /usr/share/perl5/HTTP/Server/PSGI.pm line 94. [15:00]
jomoplackup (starman) has nothing with foswiki - besides it exectutes the code-reference... starman is an full-features web-server.... probably enough add to the foswiki.psgi some middlewares... [15:00]
gac410So foswiki_debug.psgi attempts to listen to 5000, which starman binds first. [15:00]
jomoAddress already in use - did you stopped the previously started one? [15:00]
gac410yes
plackup foswiki.psgi starts a web server on 5000.
[15:00]
jomoyes - it shoudl [15:01]
gac410starman also starts a web server on 5000 [15:01]
jomoyes... (or on any other port) [15:02]
gac410Ah... no. foswiki_debug.psgi opens a web server on 5000
okay. cd core/bin starman foswiki.psgi *does* come up fine. But bootstrap code fails
so request dies with internal server error.
[15:02]
jomoso, i checked out Item13897 [15:05]
gac410Anyway.... I have to run. Appointment soon.
Sorry jomo can't stay.
[15:05]
jomook
cu - sometimes :)
[15:05]
gac410If you have a proxy to serve pub files, then plackup bin/foswiki_debug.psgi works
But starman foswiki.psgi fails due to some bootstrap issues.
[15:05]
jomoyes - fails with AUTOCONFIG: WARNING: both ,v and ,pfv files were found in data or pub, suggesting that both PlainFile and RCS have been used at some point. Unable to autoconfigure - please resolve the histories manually.
at (eval 255) line 58 at /fw/Item14152/foswiki/core/lib/Foswiki/App.pm line 491
[15:06]
gac410I get something completely different. Undefined strings, and a unable to use FindBin [15:09]
jomolooks like, it needs some cleaning :) [15:10]
gac410But in your case, if you indeed have ,v and ,pvf files/directories, then bootstrap will never work. [15:11]
jomothis is an fresh clone - so nothing is here - just what i cloned from the github... [15:11]
gac410well that's sure strange. We never check in or ship ,* files [15:12]
jomoREPO - the above (all commands what i did is in the chat-history :D :D)
later we talk more - now me going to leveling some world of warcraft character... :D
cu later ! :)
[15:12]
gac410cu [15:14]
.......... (idle for 47mn)
vrurggac410: My setup doesn't fail with plackup. I may need some help to isolate the problem. [16:01]
gac410It's a very common issue with the OO branch, It comes & goes and seems to be config related?
I think it needs some additional checking?
I get uninitialized variables in the login manager, followed by (in cleanup) Can't locate .pm in @INC
I've encountered it several times, and then poke at it a bit, clean, pseudo-install again, etc. and it goes away.
What I just did was cd .../distro git clean -fdx git clean -fdx cd core ./pseudo_install.pl developer cd bin starman foswiki.psgi then visit http://localhost:5000
If I generate a configuration, then try starman, the error goes away. But starman is unable to serve the /pub files so still no go.
[16:01]
vrurgstartman... I didn't try it this time. Ok, could be the key point.
Thanks!
I'm trying to incorporate Plack::Middleware::Static.
Would act as a backup plan if /pub wasn't captured by a proxy.
[16:16]
gac410No idea how to make starman work. may want to wait for jomo who knows about it.
BTW, the other failure - seems to happen when LocalSite.cfg does not exists, rather than bootstrapping, the App runs with undefined cfg variables.
Phase 2 bootstrap maybe is not being invoked?
[16:17]
vrurgI started with starman. Will test when succeed with the static.
The cfg issue – is it in 13897 or 14152 branch?
[16:18]
gac41013897 ... 14152 had other issues iirc.
let me try 14152 again.
[16:19]
vrurgI think I need to cherry peek a patch from 14152. There was an issue with imrpoper unaliasing of the global %Foswiki::cfg by config destructor. [16:21]
gac410Y. 14152 branch. plackup foswiki_debug.psgi fails on first request
Failed to opendir file /var/www/foswiki/distro/core/lib/: No such file or directory at /var/www/foswiki/distro/core/lib/ line 96 at /var/www/foswiki/distro/core/lib/Foswiki/App.pm line 502.
at /var/www/foswiki/distro/core/lib/Foswiki/Class.pm line 98.
[16:21]
vrurgCould you pleas have FOSWIKI_ASSERTS on and send me the full stack trace? [16:22]
gac410hold on. [16:22]
vrurgMine just works. With or without LSC. [16:22]
gac410http://pastebin.com/AsudAGqr [16:24]
vrurgThanks, hope it'll help. [16:24]
gac410That's *with* an LSC
Looks like same faillure without LSC either.
[16:24]
vrurgDo you actually have the directory? [16:25]
gac410what directory /var/www/foswiki/distro/core/lib/ ??? [16:26]
vrurgYes. But generally I think I know what's the problem is. [16:26]
gac410Definitely. That's in my git checkout [16:26]
...... (idle for 26mn)
GithubBot[distro] vrurg pushed 1 new commit to Item13897: https://git.io/viMHK
distro/Item13897 d5fa688 Vadim Belman: Item13897: Added support for serving static files....
[16:52]
***GithubBot has left [16:52]
FoswikiBothttps://foswiki.org/Tasks/Item13897 [ Item13897: Implement ImproveOOModel proposal. ] [16:52]
.... (idle for 19mn)
gac410vrurg: no go here. git checkout Item13897, git clean -fdx git pull ./pseudo_install.pl developer plackup bin/foswiki.psgi
and the server loops 1000's of errors: Error while loading /var/www/foswiki/distro/core/bin/foswiki.psgi: Can't locate Foswiki/App.pm in @INC (you may need to install the Foswiki::App module) (@INC contains: /lib /var/www/foswiki/distro/BuildCont
rib/lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/
local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /var/www/foswiki/distro/core/bin/foswiki.psgi line 20.
BEGIN failed--compilation aborted at /var/www/foswiki/distro/core/bin/foswiki.psgi line 20.
[17:11]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::App [17:11]
gac410FOSWIKI_LIBS and FOSWIKI_HOME are both set. [17:12]
....... (idle for 33mn)
vrurggac410: Yep, I forgot about pre-set PERL5LIB while testing. My bad. Fixed already but no commit yet. [17:45]
gac410no problem / no hurry. ;) [17:45]
GithubBot[distro] vrurg pushed 1 new commit to Item13897: https://git.io/viMpF
distro/Item13897 d48bdb3 Vadim Belman: Item13897: Fixing the previous commit....
[17:49]
***GithubBot has left [17:49]
FoswikiBothttps://foswiki.org/Tasks/Item13897 [ Item13897: Implement ImproveOOModel proposal. ] [17:49]
vrurgIn addition to this I was ignoring FOSWIKI_HOME. It now makes use of it. [17:50]
gac410Hm Failing with FindBin errors. cd to core, then starman bin/foswiki.psgi No localsite.cfg exists. [17:51]
vrurgStarts for me. I [17:52]
gac410First error: Cannot find current script 'starman worker bin/foswiki.psgi' at /usr/share/perl/5.22/FindBin.pm line 166. [17:52]
vrurgI'll try complete cleanup once again.
Gotcha!
Have the error.
[17:52]
gac410Okay good. [17:53]
......... (idle for 40mn)
vrurggac410: I'd like to apply several patches from Item14152 to Item13897. They're mostly parts of complex commits. Cherry picking won't be of much help. Though I can pick a commit and manually remove excess changes. But have a feeling this would have no good impact on future merging. [18:33]
FoswikiBothttps://foswiki.org/Tasks/Item14152 [ Item14152: Implement OONewPluginModel proposal ] https://foswiki.org/Tasks/Item13897 [ Item13897: Implement ImproveOOModel proposal. ] [18:33]
vrurgAny advise? [18:33]
gac410ugh. parts of commits? not sure if there is any way. maybe jast would have ideas. [18:34]
jastcherry-pick doesn't have a patch option yet, unfortunately
but with partial merges you always make more work for future merges, so it really doesn't matter what you do...
[18:35]
vrurgMy stupid lazyness. I new these changes are to be done in 13897 and then merged back, but didn't wont to loose time on all this... :( [18:36]
gac410cherry-pick is at a single commit level. you might try cherry-pick <the commit> --no-commit ??? not sure I've never tried it. [18:36]
vrurgI'd probably generate and apply patches. [18:37]
gac410But if the "conflict" created by a partial commit in future merges is actually identical code on both sides, I think it will automatcially resolve it. [18:37]
jastcherry-pick -n, then checkout -p to do a partial revert [18:37]
vrurggac410: I'm trying it now. But there are some confusing things going on.
Ok, thanks! Will play on my local repo and check the results.
[18:37]
gac410A sequence of smaller commits with specific purpose is usually easier than a mega-commit when it comes to cherry picking stuff. but too late now ;) [18:39]
jasthindsight is 20:20, right :) [18:39]
gac410gac410 is very good with 20:20 hindsight. And proves it over and over again. :P [18:40]
jastit's a great skill to have :P [18:40]
gac410vrurg from a merge strategy, ( -> == "merge into") Release02x01 -> master -> Item13897 -> Item14152 should be pretty safe.
When there are conflicts (or if you know you need to tweak the merge) use the --no-commit option to the merge. You can then edit the files fixing conflicts or other "adjustments" and then commit.
When you see a "merge commit" in the log and show that commit <hash> and you see nothing... That says the merge went without conflicts or modifications.
[18:45]
vrurggac410: The problem is to move changes from Item14152 into Item13897 cleanly. [18:47]
gac410So when you do your cherry/picks and fixup's to Item13897, you could consider merging 13897 -> 14152
yeah. that's the harder part because 14152 is a "feature" branch and has to be incorporated all or nothing when merging back into it's parent
[18:47]
vrurgI'm gonna try picking, then branch the result and see what happens with merge from 14152. The problem I expect is that a commit adds a new file. Then I remove that file upon cherry pick. Wonder what happens with final merge from Item14152.
This is why I consider generating a set of manual patches. It's easier to resolve conflicts – if there be any.
[18:49]
gac410When you cherry-pick the commit-ID changes. so I *think* it will be about the same as a manual patch ... not sure though. But unlike a merge, where the commit ID's are identical, git won't see the duplicate ID and ignore the commit in a future merge. [18:51]
GithubBot[distro] gac410 pushed 1 new commit to master: https://git.io/viDLM
distro/master 57cad54 George Clark: Merge branch 'Release02x01'
[18:52]
***GithubBot has left [18:52]
........ (idle for 35mn)
vrurgI see where ',v and ,pfv' error comes from. [19:27]
gac410hm. that code works fine on master / Release02x01 did it get broken in my master merges? [19:28]
vrurgBootstrap detects plackup as the startup script and starts looking for other directories using it's full path. [19:28]
gac410Ah.... [19:28]
vrurgFor the moment I have no idea how to get around this. [19:29]
gac410FindBin can get tricky __FILE__ sometimes is useful. But IIRC it had troubles in some installations as well.
The problem with using __FILE__ in .pm files vs the CGI script itself is that the libraries on some installations can exist off in the /var/lib instead of /var/www
[19:30]
vrurgI'm already locating correct script path in foswiki.psgi. Will inject FOSWIKI_ROOT into the env passed into app. [19:32]
gac410The bootstrap code gets tricky because ... libraries can be in /var/lib outside of the root, and CGI files can be off in a cgi_bin directory somewhere rather than in foswiki/bin
I doubt that we handle all the corner cases.
[19:33]
vrurgFor that kind of installation a FOSWIKI_LIBS must be correctly set. [19:33]
gac410And it gets even harder. apache SuexecUserGroup used so the cgi scripts can execute under control of user rather than the web server, blocks ALL but a select few ENV variables. [19:34]
vrurgBut OTOH, separate libs on those must already be included into PERL5LIB. What is worse is if scripts and data are separated. [19:34]
gac410Compiled into the mod_suexec
Anyway, it may be that we just cannot bootstrap certain combinations. If we can hit >> 80% I'd be real happy
[19:35]
vrurgWe must be happy as soon as we have correctly set up FOSWIKI_HOME/FOSWIKI_LIBS.
But Config.pm doesn't use them. Why?
[19:36]
gac410When under apache, that won't work for me. I'm firmly in the suexec camp
Not possible to pass ENV to apache under suexec.
[19:37]
vrurgI'm not proposing to enforce them. But IF they exists – why not to skip the detection phase and simply use them? [19:38]
gac410yes. good. [19:38]
vrurgSame way as FOSWIKI_SCRIPTS is used. [19:38]
gac410well FOSWIKI_ACTION is available as that is set in the perl code anyway.
Ah... yeah FOSWIKI_SCRIPTS ... that's specific to mod_perl I think.
[19:39]
vrurgHowever it can be used any time. It's not really bound to mod_perl only. [19:41]
jomoping vrurg [19:53]
vrurgHi jomo! [19:53]
jomohi :) so logged in. :) [19:54]
vrurg10pm on your side? [19:54]
jomo22:00
for me am/pm is confusing :)
[19:54]
vrurgI'm getting used to american style...
Would get to it if live here for 2 years. :)
[19:54]
jomosure :) so - what abou the middlewares?
or more precisely - what do you want solve using middleware?
[19:55]
vrurgWe have a small issue with the new branch. Previously Foswiki was relying on site.cfg to preset some variables before config is actually available.
I don't like this approach as non-flexible. But would like some middleware to take care of certain early configuration details.
Looking for any ideas.
[19:56]
jomoit isn't exactly a job for a middleware ... middlewares are (usually something universal) - this is app-specific thing - could be done directly in the app - WHEN the a $foswiki is get instancied. Or it could be done directly from the app.psgi.
sec
[19:59]
vrurgI want it as a middleware to have it as a part of new extensions. I.e. to allow an extension to install it's own middleware module. If we hardcode it into foswiki.psgi then, well – it's hard-coded.
For example, an extensions could implement its own Foswiki::Config which would store configuration in a DB. Then its middleware would be capable to pre-read some crucial config settings and pass them over to the application as part of the env for early initialization allowing custom paths, set of enabled/disabled extensions, etc.
[20:01]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Config [20:03]
vrurgBTW, I found where your ',v and ,pfv' error comes from. [20:04]
jomoso, in the QuoVadisPsgiFoswiki at the end is the "app.psgi" what me using everyday for the foswiki development. It uses some inline middleware (inline just for the simplicity) and show how to hack the cfg. (setting the admin password to "q") :D - maybe you will get some ideas... [20:07]
BhargavaSanahi gac410! [20:09]
gac410Hi BhargavaSana [20:09]
BhargavaSanaAre you available for a little help with foswiki installation? [20:09]
gac410I can try. Generally on IRC, just ask and someone will answer if they know the answer. You can also check back later in http://irclogs.foswiki.org/bin/irclogger_log/foswiki [20:11]
BhargavaSanaThank you [20:11]
jomovrurg: cool, i just checked out today first time your branches. and after trying to run the "plackup foswiki.psgi" got some weird errors. Also found than you're missing some crucial parts from the foswiki.psgi (for example the Static middleware for serving static files - and therefore gac still need the apache to run the PSGI foswiki - which is (ofc) veird a bit - especially for the development) [20:11]
BhargavaSanaHi All: I am trying to setup foswiki (CGI) for the first time and I having problems with setting up email [20:13]
vrurgjomo: Static is there already. [20:13]
jomohm not in my checkout (and cloned today) [20:13]
gac410okay. BhargavaSana is your server already set up to send email, like cron job and other root notifications. [20:14]
vrurgThe problem you get is because plackup confuses FindBin and bootstrap detects it as the main script and sets up incorrect root dir.
jomo: I've commited changes recently. But not into 14152 branch.
[20:14]
jomoah so - the need checkout the 13897? [20:14]
vrurgWanna fix the ',v vs ,pfv' issue in 13897 first. [20:15]
jomook [20:15]
vrurgYes. But it won't help you because bootstrap won't pass. [20:15]
BhargavaSanagac410: Unfortunately I am not sure. This "server" is a virtual machine setup with the sole purpose of hosting foswiki
Is it advisable to set it up to send email?
[20:15]
jomovrurg: and when i will edit the LSC manually? it will run? [20:16]
gac410BhargavaSana: Ah... even virtual machines should probably be able to send email ... so that it can notify of issues. logwatch and other monitoring tools. but thats not neede for foswiki. [20:16]
jomovrurg: nwm -going to check ;) [20:16]
gac410If your server cannot send email, then foswiki can use the Perl modules to send directly to a SMTP server. [20:16]
vrurgjomo: It shall. [20:17]
BhargavaSanagac410: I am trying to move our old setup which is foswiki 1.1.5
yes, I tried gmail smtp but gmail rejected it
[20:17]
gac410The config has changed a lot. [20:17]
vrurggac410: Well, bootstrap is using FindBin which is not recommended under mod_perl. Hm... [20:17]
BhargavaSanaSomeone just tried to sign in to your Google Account from an app that doesn't meet modern security standards. [20:18]
gac410vrurg: I did just test bootstrap under mod_perl and it was working fine.
BhargavaSana: Ah... yeah, you would need to change the gmail security to permit logins from userid/password authentication ... which google considers not "modern security" :P
[20:18]
jomovrurg: YES! the today version of the foswiki.psgi contains teh Static :) cool!!! [20:19]
gac410Is your corp email based upon gmail? [20:19]
BhargavaSanagac410: Should I just try and setup up our server to send email instead?
gac410: yes our corp is based on gmail
[20:19]
gac410hm Does your old server permit sending email via gmail? (That's surprising ... 1.1.5 had difficulties with gmail iirc)
Foswiki *definitely* can send directly to gmail using Net::SMTP with a TLS connection. But first gmail needs to allow userid/password connections. you might be able to set up an "Application specific" password so that your web server is not storing a valuable password.
[20:20]
BhargavaSanagac410: unfortunately, I don't have admin access to old server (I can get it from my supervisor though, who is current webmaster). [20:23]
vrurggac410: Don't know how mod_perl handles it, but with plackup FindBin in Config.pm returns path to plackup, not to foswiki.psgi.
vrurg is looking for a workaround.
jomo: You can try manually setting FOSWIKI_SCRIPTS – must help bootstrap correctly.
[20:23]
gac410BhargavaSana: You'll really need to be able to review the configuration if you expect to duplicate it onto a new system.
vrurg: I've definitely seen reports of bootstrap issues on mod_perl, but on my test VM anyway, it's been working fine for me. Not sure why.
[20:24]
BhargavaSanagac410: yes, I will get admin access to old server since I am realizing that it is quite important. Our goal was to install 2.1.2 and just move all data
gac410: i want to do what is best practice with the latest version
[20:25]
gac410that is indeed the normal path. But still, there are configuration things in the old server that you'll want to know on the new one. Like how it's configured to send email.
Or if it's using LDAP for login auth, etc. It's not "just" the data.
[20:26]
BhargavaSanagac410: i am able to login to the old wiki system with my global windows username and password
all users in my corp can do that
[20:27]
gac410For the data, the CharsetConverterContrib is probably more forgiving than the bulk copy utilty, which needs both the old and new system runnign.
locally
Okay, then for sure you must get the LocalSite.cfg file from the old system. That sounds for sure like you are using LDAP auth, and that is very tricky to set up.
[20:27]
BhargavaSanaI have access to curent LocalSite.cfg
Please tell me how I can check to confirm that we are using LDAP
[20:28]
jomovrurg: yeah, youre right - using FindBin isn't recommented under persistent perls... http://perldoc.perl.org/FindBin.html - workaroud (maybe) is : delete $INC{'FindBin.pm'}; and require FindBin; before every usage... ;( [20:30]
BhargavaSanathe current LocalSite.cfg does not look very customized to me [20:30]
gac410(ActiveDirectory does have an LDAP connector. For Foswiki to access is a very complex config. [20:30]
vrurgFindBin::again() must be fixing the issue. But doesn't help with plackup. [20:31]
gac410grep Manager} lib/LocalSite.cfg That should dump out the Mapping, Password and Login managers. [20:31]
jomonew versions of the FindBin doesn;t have the "again" [20:31]
vrurgI'm working on setting FOSWIKI_SCRIPTS with what I find in foswiki.psgi. Must do the job. [20:31]
gac410WHAT No "again" That makes it almost unusable
Unless it no longer caches its decision
[20:31]
vrurggac410: My bootstrap lags behind the master perhaps? It has ::again [20:32]
jomosorry
bad reading - the FORMER versions hasn't again... the LATTERs has... my bad
[20:32]
BhargavaSanagac410: there is no lib/LocalSite.cfg, but I found the file in our "bin" folder [20:32]
gac410Right It does use again. jomo was delivering very bad news if true
Nope. bin has a LocalLib.cfg lib should have a LocalSite.cfg
Those have been around since Foswiki was known as twiki
unless your system is modified somehow ...
[20:32]
jomono no - just forget what i said. wrong reading by me - the FORMER versions HAS the "again"...:) [20:34]
vrurggac410: You forgot. I don't load LocalLib.cfg. [20:34]
gac410If there is no LocalSite.cfg, then *maybe* it was installed with an old debian packaged version of foswiki. And it might in /etc/Foswiki.cfg or something like that. I'm not sure. Foswiki itself never not used lib/LocalSite.cfg
vrurg: Not for you.... talking to BhargavaSana about a migration from 1.1.5
[20:35]
vrurgDamn close subjects... ;) [20:35]
jomo:) [20:35]
BhargavaSanagac410: here is what is in the lib direction
administrator@Intranet:/var/www/wiki-2016-Aug-26/lib$ ls -al total 252 drwxr-xr-x 5 www-data www-data 4096 Jun 6 2012 . drwxr-xr-x 10 root root 4096 Aug 26 10:50 .. -rw-r--r-- 1 www-data www-data 3499 Apr 10 2012 Assert.pm drwxr-xr-x 3 www-data www-data 4096 Jun 6 2012 CPAN drwxr-xr-x 25 www-data www-data 4096 Jun 6 2012 Foswiki -rw-r--r-- 1 www-data www-data 123691 Apr 10 2012 Foswiki.pm -rw-r--r
Sorry, it does not look readable
http://pastebin.com/12npNVFz
[20:36]
gac410No idea. That is what we ship. But it appears to not have the configuration. Maybe somehow it's been moved elsewhere. [20:38]
BhargavaSanagac410: Foswiki,spec? [20:38]
gac410Foswiki.spec is the "specifications" for what gets written into LocalSite.cfg
It should *never* be edited directly.
And given it's the same timestamp as Foswiki.pm it's probably not modified. Your old system is non-standard it appears. All I can guess is to look around in /etc for anythng Foswiki related, if it contains lines beginning $Foswiki::cfg{blah}="some values"; that's the configuration
vrurg. In 2.1.2, mod_perl configuratino, the tools/mod_perl_startup.pl searches %INC for mod_perl_starup.pl and uses that location to "find" the foswiki root.
[20:38]
vrurgSame approach on my side.
I take __FILE__, trying to locate it in %INC. If it's not there then looking for a key matching qr{/foswiki.*.psgi$}
[20:44]
gac410IIRC there are some environments where __FILE__ does not have the full path. Again security anal systems. Don't let code find out where they exist. But that's a really vague memory now.
in the deep dark past, there was a huge kerfluffle over making the bin/blah scripts truly portable. Some systems FindBin failed, some __FILE__ was borked. I don't recall the history now.
IIRC it's one reason we insert "." into the @INC in some cases. It's the only way to become operational
It's been a really long time. I think Babar might have been the one who wrangled that snake into submission.
[20:46]
uebera||Ad "."--lest I forget: https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html ("Upcoming change to perl: current directory in @INC")
(Now you all can remind me in case of need :p)
[20:53]
jomovrurg: i thinking about the config-values. The configuration should be loaded even before the foswiki.psgi is processed. Because you need some config values directly in the foswiki.psgi. (for example the $root for the Static middleware - later probably also for authentication (OAuth2) and such middlewares.) So, the one of first statements in the foswiki.psgi could be someting like; use Foswiki::Config qw($cfg); (and the after this the $cfg) should [20:54]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Config [20:54]
jomocontain the (bootstrapped) configuration object... [20:54]
vrurgThis is an chicken/egg problem. Foswiki::Config is an app object and depends on correctly initialized application. Additionally, I wan't it to be loaded _after_ the new extensions – to make it possible to replace the default configuration framework with a custom one.
But the custom framework may define it's middleware which would pre-fetch necessary config values and use them for early configuration.
[20:56]
jomoxactly. chicken-egg. And because the config is the first-citizen (needed to correct app-run) - therefore it should be loaded even before the app.psgi is processed. [20:57]
vrurgSounds a bit complicated but it would allow to have configuration completely incorporated into Foswiki.
Into foswiki UI is what I meant.
[20:58]
jomoalso, i talking exactly about this config problem here: http://foswiki.org/Development/QuoVadisPsgiFoswiki#Common_40real_world_41_61_61app.psgi_61_61 :) :) [21:00]
GithubBot[distro] vrurg pushed 4 new commits to Item13897: https://git.io/viDuS
distro/Item13897 3a0d9d8 Vadim Belman: Item14152: (cherry picked from commit 5bb22fa3ce3603352b477f5614cce5406d2ab0e0)
distro/Item13897 8d05d64 Vadim Belman: Item14152: Cherry picked of some changes from commit 505aef1830b277690371b854e0ed6d3dfcea62c1...
distro/Item13897 23a12a5 Vadim Belman: Item13897: Removed forgotten `extensible' feature....
[21:00]
***GithubBot has left [21:00]
FoswikiBothttps://foswiki.org/Tasks/Item13897 [ Item13897: Implement ImproveOOModel proposal. ] [21:00]
gac410I think this discussion hits why LocalLib.cfg and LocalSite.cfg were separate. LocalLib is needed really really early before foswiki gets control. It sets some critical ENV settings, libs, etc.
LocalSite then follows up with all the fine tuning
tbh if plack middleware can clean up this mess and deal with paths, etc. that would be a great win.
[21:01]
vrurgIf I get my approach implemented then an extension would only store a minimal set of data locally (like DB server/name/user/password for a DB based-config) and it would allow preloading necessary set of configuration from LSC. Foswiki wouldn't even care how and where the extenion keeps that information.
LocaLib was more extensive and tried to do more than necessary.
[21:05]
gac410Just be careful. the LSC and configure were carefully protected ... letting plugins directly manage passwords etc. for db backends is a risk for exposures. Actually it's another really good reason to kill $Foswiki::cfg global and encapsulate cfg access
separation of responsibilities. Access to configure exposes sensitive info that should never be accessible to wiki admins.
[21:07]
jomoagain - you need the configuration (at least some of it's parts) even before the app.psgi is processed. As i already told - for example - you need the $root for the Static middleware. So, you need get the $root BEFORE the compiler hits the enable "Static".... [21:08]
GithubBot[distro] vrurg pushed 2 new commits to Item14152: https://git.io/viDg2
distro/Item14152 8151e0d Vadim Belman: Item14152: Merge commit 'd48bdb3e52f1c1df6f158dcf493ad17144333145' into Item14152...
distro/Item14152 82bcacf Vadim Belman: Item14152: Merge commit '3e701d4fe490defa2e527623e379c8eb01d1620d' into Item14152...
[21:09]
***GithubBot has left [21:09]
FoswikiBothttps://foswiki.org/Tasks/Item14152 [ Item14152: Implement OONewPluginModel proposal ] [21:09]
gac410Oh... and another thing to think about. (sorry) is that some hosted sites just don't have access to configure anything other than those files explicitly in the foswiki path. ENV is out of the question.
We cannot count on *requiring* ENV settings to get fw to run.
[21:09]
vrurgjomo: See, you're in conflic with what gac410 says. Incapsulated cfg doesn't fit well into independent config. So, config must be app-dependant anyway. How do we fetch info from it on early stages – that's the question I'm trying to resolve.
Ok, dinner time.
[21:11]
gac410okay vrurg ... eat well. [21:11]
vrurgjomo: I merged foswiki.psgi into the extensions branch too. Shall work but didn't test it.
gac410: thanks!
Perhaps will be back later today but rather tomorrow. cu, guys! Thanks for the discussion!
[21:12]
gac410cu vrurg
jomo, unfortunately I've not paid the $$ to try things like godaddy hosting, Bluehost, dreamhost, and any other blahHost sites. But those are the places were it's a real bear to get foswiki running.
cpanel integration. etc.
[21:12]
jomoimho not - but youre the developer. The BEST config system is app independent - so one config system could serve many psgi-apps. looks like nobody reads the http://foswiki.org/Development/QuoVadisPsgiFoswiki#Common_40real_world_41_61_61app.psgi_61_61 - anyway - no problem. :D i just blabbing here a bit - and will be offline again for a month soo...
gac410: i understand. Looks like nobody really reads my topics.
Foswiki ISNnT the only system who solving such problems
[21:14]
gac410There is a differernce between reading and *understanding* I don't know what I don't know.
things like cpanel and dreamhosts are great mysteries to me.
[21:15]
jomohm...
:D
as i said - for me is ok anything... :D
[21:15]
gac410reading your link above, I just don't get how starman or plackup could apply to a hosted site like dreamhost. or any other sites where user has ftp access, no shell, and no ability to "start" anything. But again I've never used any of them. [21:17]
jomomany systems already solved such problems. The config-onject should be 1st loaded - and it should capable serving more different apps. because this is how the psgi works. you can (and users usually does) MOUNT more "$apps" in ONE app.psgi. And those apps needs many times an common config. For example for some common middlewares (like Static, authentication, session etc...) [21:18]
gac410gac410 goes to google cpanel and psgi. [21:19]
jomoon the dreamhost is possible to use uwsgi which is capable to run any PSGI app... so, no problem... IF the app.psgi is correct! [21:19]
gac410and dreamhost is cpanel based. So can we infer that any hosting site using cpanel is all set if we write a proper PSGI app [21:24]
jomocpanel is just an admin-system. it allows to configure many things. not every cpanel installation is "same". Some hostings (using cpanel) allows uwsgi, some not... [21:25]
gac410So if cpanel does not support uwsgi, does that infer that those sites would no longer support foswiki? Sorry... you are talking to the utterly ignorant. [21:26]
jomosimply: moving away from the CGI - the users need to use more advanced hostings. Of course, PSGI could be executes as CGI-script too (but usually it is dog-slow). [21:26]
gac410dog-slow would not be good. [21:27]
jomocpanel = admin system. could contain whatever the hosting-site allows. [21:27]
gac410cool... with vrurg's latest commits, plackup bin/foswiki.psgi is working fine including the static files. with or without LocalSite.cfg. [21:31]
jomothink about the cpanel as: hosting site defines which services want serve. They configure their cpanel to allow for their user configure those services. So, the "cpanel" is only the admin part. For example the user could install wordpress using cpanel (if the hosting site want allow this)
cool :) - so finally you don't need the "apache" for serving static files :) :)
[21:31]
gac410yup. But bootstrap fails. :( It assumes a /bin/... directory in the url path. but vrurg has eliminated /bin/... just wants "mysite/configure or mysite/edit ...
But once you get to configure, it correctly bootstraps the url.
its just the initial link generated as bin/configure which is incorrect. But no possible way to guess that.
[21:33]
jomoas i said - today i checked out first time vrurg's branches. And got some "mixed feelings" about. At the first and very quick check - it doen't brings too much news in the "spagehty". It just moofied the spagethy. But maybe i'm wrong. Need check it more deeply. :) [21:35]
gac410There is only so much that one person can rewrite. Getting it into a framework is a good start. [21:36]
jomobut probaby it is very good start-point to move further.
yes - exactly
[21:36]
gac410As it is, in my opinion, it's a superhuman effort. Nobody else here would/could have tackled such a massive rewrite. CDot's configure rewrite is a similar effort. [21:36]
jomoyeah - massive - the my only "comment" is. Using the right tools (read: grabbing some already done psgi-web framework + the already existing midlewares coudl REDUCE the foswiki codebase to 40% (my estimate)... so MUCH less code to maintain. But currently even vrurg moves everything to Moo (and not cutting away things what are already solved). [21:39]
gac410One step at a time. [21:40]
jomoright - maybe here isn't simpler way. :) [21:41]
gac410There are a lot of areas that can probably be moved to the middleware. I *assume* all of the login side of things. (but not the mappers or ACLs for now) [21:41]
jomosure not the mappers nor ACL (these are app-specific). But SURE the whole authentification. The "viewfile" (aka XSENDFILE), the session management and many mant other things - YES. :) [21:43]
gac410Yup... was just thinking about sessions. and viewfile for sure needs to be killed
though can't lose the ACL aspects of it.
[21:43]
jomonot need be killed - just used in "right way" - MichaelDaum knows the XSENDFLE way... [21:44]
gac410I think once we have a stable base, then pieces like that can be tackled by other developers. But right now it's a one-person effort.
we all need a stable base, and then wider adoption among the devs, and then we can tackle the other pieces ... remodeling an airplane in flight.
Lots of docs needed too ... many of us are pretty lost. and got much further lost with the extension discussion today.
I still don't know Moo well enough to actually code a subroutine or object/method related change.
[21:45]
jomoi didn't got the main point of the extensions discussion [21:47]
gac410I've tried and just gotten lost.
vrurg has a new OO model for extensions that is implemented in Moo objects. but no sample code, and we are all utterly lost.
[21:47]
jomogac410: youre don't bother yourself with "don't know moo" - it is JUST perl. Everything what you usually does with perl - you can do with moo too...
sec
[21:48]
gac410utterly lost. around ??? when do I around => when do I sub { [21:49]
jomogac410: you really should check this: http://www.slideshare.net/Chankey007/a-very-nice-presentation-on-moose?qid=3dc290a4-8299-4ca1-bd98-5e0fbe45a9c8&v=&b=&from_search=1 - it is an BIG (600 page) presentaiion - but WORTH clicking thru. It is wonderful - really check it. [21:51]
gac410okay will do... Thanks.
At some point something will "click" but so far it's been me wondering if it's the same language.
[21:53]
jomofor exactly this question gives teh answer the first few slides. :) [21:55]
gac410gac410 is clicking now. ... doesn't like line by line buildups but ... meh [21:55]
jomookay - one more thing- everyhing will be easier if you realises that for example the "has 'some' => (..." is JUST an function call. So, you can write it as has('something'). Just the parenthesis aren't necessary. [21:58]
gac410Thanks for the reference jomo. Looks very interesting. I'll work through it. But need to step away for a bit. Time for a walk before supper. gotta run.
sorry. and thanks.
[21:59]
jomonp - cu later. :) [21:59]
gac410cu later. [21:59]
jomoonce when got time just type : perl -MO=Deparse -Moose -E 'has "something" => (is => "rw", isa => "Str")' - and you will get the pure perl-ish deparsed form. Probably much easier to understand. :) [22:02]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)