Changes

Jump to navigation Jump to search
→‎Update the CVSROOT: - Correct cvs path
Line 23: Line 23:  
There is a nice web based interface through which you can browse the development of SME Server contribs and you can find it [http://smeserver.cvs.sourceforge.net/viewvc/smeserver/rpms/ here for SME_Server] and [http://smeserver.cvs.sourceforge.net/viewvc/smecontribs/rpms/ here for SME_Contribs].
 
There is a nice web based interface through which you can browse the development of SME Server contribs and you can find it [http://smeserver.cvs.sourceforge.net/viewvc/smeserver/rpms/ here for SME_Server] and [http://smeserver.cvs.sourceforge.net/viewvc/smecontribs/rpms/ here for SME_Contribs].
   −
===Sourceforge access===
+
===koozali.org access===
This chapter is used only by developers who aim to be granted in write access to the source code on Sourceforge, you don't need it if you want to only make patch or modify code in your build environment. You can see [[Package_Modification]] for more informations.
+
This chapter is used only by developers who aim to be granted in write access to the source code on koozali.org, you don't need it if you want to only make patch or modify code in your build environment. You can see [[Package_Modification]] for more informations.
* SME Server code is stored in the CVS on  http://SourceForge.net. To be able to work on your code in the SME Server CVS repository you need an account on SourceForge. With this account the development team can give you access to the CVS repository. More information can be found here:
+
* SME Server code is stored in the CVS on  http://shell.koozali.org. To be able to work on your code in the SME Server CVS repository you need an account on koozali.org. With this account the development team can give you access to the CVS repository.  
[http://sourceforge.net/apps/trac/sourceforge/wiki/Register%20a%20user%20account Registering a User Account]
+
* After you have created your koozali.org account you can ask the development team to give you developer access to smecontribs. Create a bug in the Bug Tracker as usual.
[http://sourceforge.net/apps/trac/sourceforge/wiki/CVS CVS (Version Control for Source Code)]
  −
[http://sourceforge.net/apps/trac/sourceforge/wiki/SSH%20keys SSH Key Generation and Usage]
     −
* After you have created your SourceForge account you can ask the development team to give you developer access to smecontribs. Create a bug in the Bug Tracker as usual.
+
* Links to manage your SSH keys on koozali.org may be found on the ''to be advised''.  
   −
* Links to manage your SSH keys on SourceForge may be found on the [http://sourceforge.net/account/services SourceForge Account Services page].
+
* If local username is different to shell.koozali.org username edit ~/.ssh/config:
 
  −
* If local username is different to sf.net username edit ~/.ssh/config:
   
   
 
   
  Host  smeserver.cvs.sourceforge.net
+
  Host  shell.koozali.org
  User  sfusername ''(without @shell.sf.net)''
+
  User  koozaliusername ''(without @shell.koozali.org)''
  Host  smecontribs.cvs.sourceforge.net
+
  Host  shell.koozali.org
  User  sfusername ''(without @shell.sf.net)''
+
  User  koozaliusername ''(without @shell.koozali.org)''
 +
port 222
    
* Don't forget to set the proper privileges on the file
 
* Don't forget to set the proper privileges on the file
 
   
 
   
 
  chmod 600 ~/.ssh/config
 
  chmod 600 ~/.ssh/config
 +
 +
If you have a number of different keys ssh/cvs may try and use the wrong one.
 +
 +
You can add the following to your ~/.ssh/config file to specify the correct key:
 +
 +
Host  shell.koozali.org
 +
User koozaliusername
 +
port 222
 +
IdentityFile ~/.ssh/my.private.key
    
==Workflow==
 
==Workflow==
 
The basic workflow is to first setup your development environment this is described in [[Package Modification]]. After that you need to get a copy of the source of a package by checking out the source. Than you can make your modifications by making a copy with a suffix (patchname) and make your modification to the original. You can refer to this page [[Rpm_build_example_using_cvs/mock]] to see many examples of mock/cvs usage
 
The basic workflow is to first setup your development environment this is described in [[Package Modification]]. After that you need to get a copy of the source of a package by checking out the source. Than you can make your modifications by making a copy with a suffix (patchname) and make your modification to the original. You can refer to this page [[Rpm_build_example_using_cvs/mock]] to see many examples of mock/cvs usage
 
After that we first need to test what we did, therefore we need to make a local build  
 
After that we first need to test what we did, therefore we need to make a local build  
  make local
+
  make mockbuild
 
and install and test the created package:
 
and install and test the created package:
 
  sudo -u root yum localinstall /path/to/packagename
 
  sudo -u root yum localinstall /path/to/packagename
Line 60: Line 66:  
====Check out====
 
====Check out====
 
To get a local copy of a package we need to retrieve the source from the repository, this is called a check out. To check out a package from the SME Contribs repository take a look at [[Package_Modification]].
 
To get a local copy of a package we need to retrieve the source from the repository, this is called a check out. To check out a package from the SME Contribs repository take a look at [[Package_Modification]].
To be able to work on your code in the SME Server CVS repository you need an account on SourceForge.  If you do not have an account at CVS, retrieving is performed as an anonymous user and changes cannot be saved.  
+
To be able to work on your code in the SME Server CVS repository you need an account on koozali.org.  If you do not have an account at CVS, retrieving is performed as an anonymous user and changes cannot be saved.  
    
===== Registered Users =====
 
===== Registered Users =====
 
- To retrieve a package or a full tree as a registered user, cd into a work directory and issue following commands:
 
- To retrieve a package or a full tree as a registered user, cd into a work directory and issue following commands:
 
* for smeserver
 
* for smeserver
  cvs -z3 -d:ext:smeserver.cvs.sourceforge.net:/cvsroot/smeserver co -P packagename [individual package]
+
  cvs -z3 -d:ext:shell.koozali.org:/cvs/smeserver co -P packagename [individual package]
  cvs -z3 -d:ext:smeserver.cvs.sourceforge.net:/cvsroot/smeserver co -P rpms [full tree]
+
  cvs -z3 -d:ext:shell.koozali.org:/cvs/smeserver co -P rpms [full tree]
 
* for smecontribs
 
* for smecontribs
  cvs -z3 -d:ext:smecontribs.cvs.sourceforge.net:/cvsroot/smecontribs co -P packagename [individual package]
+
  cvs -z3 -d:ext:shell.koozali.org:/cvs/smecontribs co -P packagename [individual package]
  cvs -z3 -d:ext:smecontribs.cvs.sourceforge.net:/cvsroot/smecontribs co -P rpms [full tree]
+
  cvs -z3 -d:ext:shell.koozali.org:/cvs/smecontribs co -P rpms [full tree]
    
===== Anonymous users =====
 
===== Anonymous users =====
 
- To retrieve a package or a full tree as an anonymous user, cd into a work directory and issue following commands:
 
- To retrieve a package or a full tree as an anonymous user, cd into a work directory and issue following commands:
 
* for smeserver
 
* for smeserver
  cvs -z3 -d:pserver:anonymous@smeserver.cvs.sourceforge.net:/cvsroot/smeserver checkout -P packagename [individual package]
+
  cvs -z3 -d:pserver:anonymous@shell.koozali.org:/cvs/smeserver checkout -P packagename [individual package]
  cvs -z3 -d:pserver:anonymous@smeserver.cvs.sourceforge.net:/cvsroot/smeserver co -P rpms [full tree]
+
  cvs -z3 -d:pserver:anonymous@shell.koozali.org:/cvs/smeserver co -P rpms [full tree]
    
* for smecontribs
 
* for smecontribs
  cvs -z3 -d:pserver:anonymous@smecontribs.cvs.sourceforge.net:/cvsroot/smecontribs checkout -P packagename [individual package]
+
  cvs -z3 -d:pserver:anonymous@shell.koozali.org:/cvs/smecontribs checkout -P packagename [individual package]
  cvs -z3 -d:pserver:anonymous@smecontribs.cvs.sourceforge.net:/cvsroot/smecontribs co -P rpms [full tree]
+
  cvs -z3 -d:pserver:anonymous@shell.koozali.org:/cvs/smecontribs co -P rpms [full tree]
    
====Retrieving the latest version====
 
====Retrieving the latest version====
Line 94: Line 100:     
====Check in or committing====
 
====Check in or committing====
To upload your source code into the repository (check in) you need to have a user account on the SourceForge system that is hosting the SME Server core and SME Server contribs repositories.
+
To upload your source code into the repository (check in) you need to have a user account on the koozali.org system that is hosting the SME Server core and SME Server contribs repositories.
 
Check in is quite simple
 
Check in is quite simple
 
  cvs commit -m 'message'
 
  cvs commit -m 'message'
 +
 +
for example the commit message should be the relevant modified changelog
 +
 +
cvs commit -m ' * Wed Jan 23 2013 John Doe <jdoe@foo.net> 5.2.0-68.sme
 +
- just a test to see if I can do this [SME: 7129]'
 +
 +
=====Keyword substitution=====
 +
 +
RCS uses a mechanism known as [http://keyword%20substitution http://web.mit.edu/gnu/doc/html/cvs_17.html#SEC73] (or keyword expansion) to help identifying the files. Embedded strings of the form $keyword$ and $keyword:...$ in a file are replaced with strings of the form $keyword:value$ whenever you obtain a new revision of the file. This will lead that your patch won't be well applied any more after strings will be substituted.
 +
 +
If you have patch with strings substituted do
 +
 +
cvs admin -kk <file>
 +
cvs update -dPA
 +
 
====Adding/removing files====
 
====Adding/removing files====
 
Since files under source control are not aware of the local file system we need to add and remove them with special commands:
 
Since files under source control are not aware of the local file system we need to add and remove them with special commands:
Line 162: Line 183:     
====Update the CVSROOT====
 
====Update the CVSROOT====
when you create a new cvs module on the buildsrv (by cvs add foldername) you must update the CVSROOT/modules files and add the name of your contribs (in the alphabetically sorted list). If you don't do that, when you will requested a build by plague, you will have a fail whereas you can build locally on your server.
+
When you create a new CVS module on the buildsrv (by importing a new source with cvs add foldername) you must update the CVSROOT/modules files and add the name of your contribs (in the alphabetically sorted list). If you don't do that, when you will requested a build by plague, you will have a fail whereas you can build locally on your server.
    
first you need to checkout the CVSROOT, of course you need to be granted as developer
 
first you need to checkout the CVSROOT, of course you need to be granted as developer
  cvs -z3 -d:ext:smecontribs.cvs.sourceforge.net:/cvsroot/smecontribs co -P CVSROOT
+
  cvs -z3 -d:ext:shell.koozali.org:/cvs/smecontribs co -P CVSROOT
 
or if it is not a contrib
 
or if it is not a contrib
  cvs -z3 -d:ext:smeserver.cvs.sourceforge.net:/cvsroot/smeserver co -P CVSROOT
+
  cvs -z3 -d:ext:shell.koozali.org:/cvs/smeserver co -P CVSROOT
    
then  
 
then  
Line 222: Line 243:  
  rm -rf  packagename/root/usr/lib/
 
  rm -rf  packagename/root/usr/lib/
 
* make an archive
 
* make an archive
  tar Jcvf {newsource}.tar.xz {newsourcedir}
+
  tar cvzf {newsource}.tar.xz {newsourcedir}
    
  vi *.spec
 
  vi *.spec
Line 257: Line 278:  
when you need to import a new version of an archive, these steps are done at the buildserver level. Once the the new source created, you can retrieve the cvs update in your personal build box and request via plague a build.
 
when you need to import a new version of an archive, these steps are done at the buildserver level. Once the the new source created, you can retrieve the cvs update in your personal build box and request via plague a build.
 
===== These following steps need shell access to the buildserver (buildsrv) =====
 
===== These following steps need shell access to the buildserver (buildsrv) =====
on the buildsrv
+
'''on the buildsrv (you must be granted)'''
 +
 
 +
* If you work directly from the cvs sources
 
  cd smeserver-contrib/contribs8
 
  cd smeserver-contrib/contribs8
 
  make prep
 
  make prep
Line 267: Line 290:  
  make new-sources FILES="smeserver-contribs-1.1.2.tar.gz"
 
  make new-sources FILES="smeserver-contribs-1.1.2.tar.gz"
 
  cvs commit -m 'modified source smeserver-contribs-1.1.2.tar.gz'
 
  cvs commit -m 'modified source smeserver-contribs-1.1.2.tar.gz'
 +
 +
* If you work from an already existent srpm
 +
 +
wget http://your.src.rpm
 +
rpm2cpio  *.src.rpm | cpio -idmv --no-absolute-filenames
 +
make new-sources FILES=*.?z
 +
rm -rf *.src.rpm *.?z *.spec
 +
cvs commit -m 'new source commited for the smeserver-contrib'
 +
 
===== These following steps need developer access (shell)=====
 
===== These following steps need developer access (shell)=====
 
on your local build server retrieve the cvs upgrade
 
on your local build server retrieve the cvs upgrade
Line 526: Line 558:  
Add a new package to bugzilla
 
Add a new package to bugzilla
 
  http://bugs.contribs.org/editvalues.cgi?action=add&field=cf_package
 
  http://bugs.contribs.org/editvalues.cgi?action=add&field=cf_package
 
+
[[Category:Howto]]
+
 
+
[[Category:Howto]]
[[Category:Developer]]
+
 +
 +
[[Category:Developer]]

Navigation menu