[Building Sakai] Merge Patch to Sakai Provider

Quoc Tan queo1987 at gmail.com
Tue May 5 09:00:25 PDT 2009


Dear all,
I am use window Vista 64bit.
Please help me
Main problem: map user from ldap to sakai (map successful but not see any
user in user's tool admin)
Solution: run patch file SAK-14648.patch
I cant run file patch in window vista with command : " patch -p0 --dry-run <
SAK-14648.patch"
Please help me
Thank a  lot
-----Original Message-----
From: Steve Swinsburg [mailto:s.swinsburg at lancaster.ac.uk] 
Sent: Tuesday, May 05, 2009 10:54 PM
To: Quoc Tan
Cc: 'Kevin P. Foote'; 'Adams, David'
Subject: Re: [Building Sakai] Merge Patch to Sakai Provider

Hi Quoc,

Looks like it crashed. Maybe the parameters are not valid for the  
Windows version, is there any documentation for it?


cheers,
Steve

---
Steve Swinsburg
Portal Systems Developer
Centre for e-Science
Lancaster University
Lancaster
LA1 4YT

email: s.swinsburg at lancaster.ac.uk
phone: +44 (0) 1524 594870







On 5 May 2009, at 16:47, Quoc Tan wrote:

> Hi all,
> Yeah I run , But It has a eror following ( file uploaded)
> Please help me
> Thank a lot
>
>
> -----Original Message-----
> From: Steve Swinsburg [mailto:s.swinsburg at lancaster.ac.uk]
> Sent: Tuesday, May 05, 2009 9:35 PM
> To: Quoc Tan
> Cc: 'Kevin P. Foote'; 'Adams, David'
> Subject: Re: [Building Sakai] Merge Patch to Sakai Provider
>
> Hi Quoc,
>
> Thats ok, thats what the lists are for :)
>
> You'll need to add the location where you have the exe files from that
> package you downloaded to your Windows path so you can just run it
> without specifying the full path to it.
>
> http://www.cs.usask.ca/~wew036/latex/env.html
>
> Append the path to the package in your PATH variable:
> so it will be something like PATH=.;c:\current\stuff;c:\unixutils
>
> Then you should be able to run 'patch' from the command line and it
> will work.
>
> cheers,
> Steve
>
> ---
> Steve Swinsburg
> Portal Systems Developer
> Centre for e-Science
> Lancaster University
> Lancaster
> LA1 4YT
>
> email: s.swinsburg at lancaster.ac.uk
> phone: +44 (0) 1524 594870
>
>
>
>
>
>
>
> On 5 May 2009, at 15:25, Quoc Tan wrote:
>
>> Dear all,
>> I really sorry because I ask too much.
>> But I want to know all ( I am beginner).
>> I have downloaded file that David required but I don't know use it
>> for my
>> situation (run file patch).
>> How run command for provider: " patch -p0 --dry-run <
>>> SAK-14648.patch"
>> How to use UnxUtils.
>> Please help me
>> Thank a lot
>> How use
>> -----Original Message-----
>> From: Steve Swinsburg [mailto:s.swinsburg at lancaster.ac.uk]
>> Sent: Tuesday, May 05, 2009 8:15 PM
>> To: Kevin P. Foote
>> Cc: Quoc Tan
>> Subject: Re: [Building Sakai] Merge Patch to Sakai Provider
>>
>> Hi Kevin and Quc,
>>
>> Yes, sorry I didn't realise you were on a Windows machine. Those
>> commands are relevant for Mac and Linux. David Adams posted a link  
>> on-
>> list to the patch.exe for Windows. Get that going and give it another
>> try.
>>
>> cheers,
>> Steve
>>
>> ---
>> Steve Swinsburg
>> Portal Systems Developer
>> Centre for e-Science
>> Lancaster University
>> Lancaster
>> LA1 4YT
>>
>> email: s.swinsburg at lancaster.ac.uk
>> phone: +44 (0) 1524 594870
>>
>>
>>
>>
>>
>>
>>
>> On 5 May 2009, at 13:57, Kevin P. Foote wrote:
>>
>>> Ouoc Tan -
>>>
>>> I believe Steve guessed you were using a linux box as your sakai  
>>> host
>>> etc.. patch will be available by default on linux hosts and probably
>>> mac
>>> hosts as well..
>>>
>>> Apparently you are on a Windows system there for you will need to
>>> locate
>>> a patch exe for this to complete or use eclipse or some other ide  
>>> you
>>> are comfortable with.
>>>
>>> ------
>>> thanks
>>> kevin.foote
>>>
>>> On Tue, 5 May 2009, Quoc Tan wrote:
>>>
>>> -> Dear all,
>>> -> I try many time with command " patch -p0 --dry-run <
>>> SAK-14648.patch", But
>>> -> It always have a error "
>>> -> 'patch' is not recognized as an internal or external command,
>>> -> operable program or batch file."
>>> -> It cant run.
>>> -> Please help me
>>> -> Thank a lot
>>> ->
>>> -> C:\Users\QuocTan\Desktop\THESIS\SAKAI\sakai-src-2.5.4\providers>
>>> ->
>>> -> -----Original Message-----
>>> -> From: Steve Swinsburg [mailto:s.swinsburg at lancaster.ac.uk]
>>> -> Sent: Tuesday, May 05, 2009 7:38 PM
>>> -> To: queo1987
>>> -> Cc: sakai-dev at collab.sakaiproject.org
>>> -> Subject: Re: [Building Sakai] Merge Patch to Sakai Provider
>>> ->
>>> -> Hi,
>>> ->
>>> -> You replaced "/path/to/the/patch" with the actual path to the
>>> patch
>>> -> file right?
>>> -> If you saved it to the providers directory you can just use the
>>> name
>>> -> of the patch ie SAK-14648.patch
>>> ->
>>> -> So your command will be:
>>> ->
>>> -> "patch -p0 --dry-run < SAK-14648.patch"
>>> ->
>>> -> then again without --dry-run if no errors.
>>> ->
>>> ->
>>> -> cheers,
>>> -> Steve
>>> ->
>>> -> ---
>>> -> Steve Swinsburg
>>> -> Portal Systems Developer
>>> -> Centre for e-Science
>>> -> Lancaster University
>>> -> Lancaster
>>> -> LA1 4YT
>>> ->
>>> -> email: s.swinsburg at lancaster.ac.uk
>>> -> phone: +44 (0) 1524 594870
>>> ->
>>> ->
>>> ->
>>> ->
>>> ->
>>> ->
>>> ->
>>> -> On 5 May 2009, at 13:29, queo1987 wrote:
>>> ->
>>> -> >
>>> -> > Hi,
>>> -> > I have done as you said.
>>> -> > in step 3, when I run command "patch -p0 --dry-run < /path/to/
>>> the/
>>> -> > patch", It
>>> -> > warning a error "patch is not recognized".
>>> -> > My file patch is store directory providers.
>>> -> > Please help me
>>> -> > thank a lot
>>> -> >
>>> -> >
>>> -> > Steve Swinsburg-2 wrote:
>>> -> >>
>>> -> >> Hi,
>>> -> >>
>>> -> >> Ok firstly you should read up on how the patch command works
>>> as it
>>> -> >> will help you in the future - blindly patching code isn't a
>>> good
>>> -> >> idea,
>>> -> >> especially if it fails somewhere. But here's the steps:
>>> -> >> 1. Get patch, remember where you save it.
>>> -> >> 2. cd SAKAI-SRC/providers (ie your Sakai source code directory
>>> then
>>> -> >> the providers directory)
>>> -> >> 3. Simulate the patch in case we get errors:
>>> -> >> 	patch -p0 --dry-run < /path/to/the/patch
>>> -> >>
>>> -> >> It will output something like this:
>>> -> >> patching file component/src/webapp/WEB-INF/jldap-beans.xml
>>> -> >> Hunk #1 succeeded at 167 (offset -36 lines).
>>> -> >> Hunk #2 succeeded at 185 (offset -36 lines).
>>> -> >> patching file jldap/README_JLDAP.txt
>>> -> >> patching file jldap/src/test/edu/amc/sakai/user/
>>> -> >> StringUserTypeMapperTest.java
>>> -> >> patching file jldap/src/test/edu/amc/sakai/user/
>>> -> >> EmptyStringUserTypeMapperTest.java
>>> -> >> patching file jldap/src/java/edu/amc/sakai/user/
>>> -> >> StringUserTypeMapper.java
>>> -> >> patching file jldap/src/java/edu/amc/sakai/user/
>>> -> >> EmptyStringUserTypeMapper.java
>>> -> >>
>>> -> >> If you have multiple sections of a single file that need to be
>>> -> >> patched, you get the Hunks for those files. If you just have
>>> one
>>> -> >> section for each file then you just get the 'patching file'
>>> for that
>>> -> >> file.
>>> -> >>
>>> -> >> Since this looks good, lets really do it.
>>> -> >>
>>> -> >> 4. Run the patch for real:
>>> -> >> 	patch -p0 < /patch/to/the/patch
>>> -> >>
>>> -> >> Same output but this time it really did something.
>>> -> >>
>>> -> >> Assuming no errors, lets rebuild:
>>> -> >>
>>> -> >> 5. Run 'mvn clean install sakai:deploy' from the providers
>>> project.
>>> -> >> Build ok?
>>> -> >> 6. Start tomcat.
>>> -> >>
>>> -> >> Bear in mind that this patch is for the issue you were having
>>> where
>>> -> >> the users from LDAP were not assigned a user type. This allows
>>> you to
>>> -> >> set, in jldap-beans.xml, the type for these accounts:
>>> -> >> Uncomment the property, set your value, make sure you have a
>>> -> >> matching !
>>> -> >> user.template.TYPE in Sakai (ie !user.type.registered), and
>>> rebuild.
>>> -> >>
>>> -> >> <bean id="edu.amc.sakai.user.StringUserTypeMapper"
>>> -> >> 	class="edu.amc.sakai.user.StringUserTypeMapper"
>>> -> >> 	singleton="true">
>>> -> >>  		
>>> -> >> 	<!--  property name="userType">
>>> -> >> 		<value>Registered</value>
>>> -> >> 	</property -->
>>> -> >> </bean>
>>> -> >>
>>> -> >> There was another post about showing provided (ie LDAP) users
>>> in the
>>> -> >> Admin Users tool, but IIRC it wasn't complete? Might need some
>>> work
>>> -> >> here.
>>> -> >>
>>> -> >>
>>> -> >> cheers,
>>> -> >> Steve
>>> -> >>
>>> -> >> ---
>>> -> >> Steve Swinsburg
>>> -> >> Portal Systems Developer
>>> -> >> Centre for e-Science
>>> -> >> Lancaster University
>>> -> >> Lancaster
>>> -> >> LA1 4YT
>>> -> >>
>>> -> >> email: s.swinsburg at lancaster.ac.uk
>>> -> >> phone: +44 (0) 1524 594870
>>> -> >>
>>> -> >> On 05/05/2009, at 3:14 AM, queo1987 wrote:
>>> -> >>
>>> -> >>>
>>> -> >>> Hi all,
>>> -> >>> I use LDAP for sakai 2.5.4.
>>> -> >>> I login successful, but I cant see any user in User Tool
>>> Admin in
>>> -> >>> sakai
>>> -> >>> (only show internal user)
>>> -> >>> After many time find out , I find a file patch
>>> -> >>> http://jira.sakaiproject.org/jira/browse/SAK-14648  
>>> SAK-14648 .
>>> -> >>> But I dont know how to merge patch into sakai provider.
>>> -> >>>
>>> -> >>> Main problem for this topic: how see user in sakai (map from
>>> ldap
>>> -> >>> server)
>>> -> >>>
>>> -> >>> Please help me
>>> -> >>> Thank a lot
>>> -> >>> --
>>> -> >>> View this message in context:
>>> -> >>>
>>> ->
>>
>
http://www.nabble.com/Merge-Patch-to-Sakai-Provider-tp23379910p23379910.html
>>> -> >>> Sent from the Sakai - Development mailing list archive at
>>> -> >>> Nabble.com.
>>> -> >>>
>>> -> >>> _______________________________________________
>>> -> >>> sakai-dev mailing list
>>> -> >>> sakai-dev at collab.sakaiproject.org
>>> -> >>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>> -> >>>
>>> -> >>> TO UNSUBSCRIBE: send email to
>>> -> >>> sakai-dev-unsubscribe at collab.sakaiproject.org
>>> -> >>> with a subject of "unsubscribe"
>>> -> >>
>>> -> >>
>>> -> >>
>>> -> >> _______________________________________________
>>> -> >> sakai-dev mailing list
>>> -> >> sakai-dev at collab.sakaiproject.org
>>> -> >> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>> -> >>
>>> -> >> TO UNSUBSCRIBE: send email to
>>> -> >> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject  
>>> of
>>> -> >> "unsubscribe"
>>> -> >>
>>> -> >
>>> -> > --
>>> -> > View this message in context:
>>> ->
>>
>
http://www.nabble.com/Merge-Patch-to-Sakai-Provider-tp23379910p23386531.html
>>> -> > Sent from the Sakai - Development mailing list archive at
>>> Nabble.com.
>>> -> >
>>> -> > _______________________________________________
>>> -> > sakai-dev mailing list
>>> -> > sakai-dev at collab.sakaiproject.org
>>> -> > http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>> -> >
>>> -> > TO UNSUBSCRIBE: send email to
>>> -> sakai-dev-unsubscribe at collab.sakaiproject.org
>>> -> >  with a subject of "unsubscribe"
>>> ->
>>> ->
>>> -> _______________________________________________
>>> -> sakai-dev mailing list
>>> -> sakai-dev at collab.sakaiproject.org
>>> -> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>> ->
>>> -> TO UNSUBSCRIBE: send email to
>> sakai-dev-unsubscribe at collab.sakaiproject.org
>>> with a subject of "unsubscribe"
>>> ->
>>
>>
>
> <Error.doc>




More information about the sakai-dev mailing list