[Building Sakai] Merge Patch to Sakai Provider

Steve Swinsburg s.swinsburg at lancaster.ac.uk
Wed May 6 00:16:09 PDT 2009


Hi,

That patch only allows you to set a 'type' for user's that come from  
LDAP. It doesn't add the ability to see these user's in the admin  
User's tool. There was a post last week about work that had been  
started in this area, but if I remember correctly it wasn't complete.  
Have a look back through the replies to your posts from last week and  
you'll find the message. I can find it later if you are having trouble.

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 06/05/2009, at 4:01 AM, queo1987 wrote:

>
> Hi all,
> I have downloaded GNU-Win32 Binnary and set environment var to bin
> directory.
> Then I run with command "patch -p0 --dry-run -i SAK-14618.patch" (I  
> replace
> "<" by "-i")
> This is report error:
> Then I rebuild provider and run server tomcat.
> Each user in ldap still has permission "register" But I still not  
> see any
> user in user's admin tool.
> Please help me
> Thank a lot
>
>
> Adams, David wrote:
>>
>> "patch" is a Unix command and not available on Windows by default.  
>> You
>> can find a Windows version in the zip file on this page:
>> http://unxutils.sourceforge.net/. If you need help getting that to  
>> work,
>> let us know.
>>
>> -dave
>>
>>> -----Original Message-----
>>> From: sakai-dev-bounces at collab.sakaiproject.org [mailto:sakai-dev-
>>> bounces at collab.sakaiproject.org] On Behalf Of Quoc Tan
>>> Sent: Tuesday, May 05, 2009 8:48 AM
>>> To: 'Steve Swinsburg'
>>> Cc: sakai-dev at collab.sakaiproject.org
>>> Subject: Re: [Building Sakai] Merge Patch to Sakai Provider
>>>
>>> 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"
>> _______________________________________________
>> 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"
>>
>>
> http://www.nabble.com/file/p23399245/Error.doc Error.doc
>
> -----
> ----Cheer :drunk: ---
> mail: queo1987 at gmail.com
> Yahoo: queo1987
> -- 
> View this message in context: http://www.nabble.com/Merge-Patch-to-Sakai-Provider-tp23379910p23399245.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"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090506/c03e28b6/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2437 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090506/c03e28b6/attachment.bin 


More information about the sakai-dev mailing list