[Building Sakai] Merge Patch to Sakai Provider

Steve Swinsburg s.swinsburg at lancaster.ac.uk
Tue May 5 05:37:51 PDT 2009


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"

-------------- 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/20090505/eebd04e6/attachment.bin 


More information about the sakai-dev mailing list