Changes

Jump to navigation Jump to search
4,864 bytes removed ,  22:33, 18 November 2018
no edit summary
Line 1: Line 1: −
SME Server code is stored in the CVS on http://SourceForge.net in two repositories '''smeserver''' and '''smecontribs'''
+
{{Languages|:Package_Modification}}
 +
{{Level|Developer}}
   −
This page is to help you make changes to the base or contribs package stored on sourceforge.
+
{{:SME_Server:Documentation:Developers_Manual:Chapter14}}
   −
===Set up===
+
===Move contribs from SME(n-1) to SME(n) ===
   −
====Local environment====
+
Here is an example for SME7 to SME8:
* We now use cvs without needing mezzanine, check you have it installed
  −
yum install cvs
     −
* Setup CVS to use ssh
+
'''Do a clean checkout of smeserver-mycontrib (This is very important, must be a completely clean tree)'''
  /etc/profile.d/smebuild.sh
+
  rm -rf ~/smecontribs/rpms/smeserver-mycontrib
 +
cd ~/smecontribs/rpms
 +
cvs co smeserver-mycontrib
 +
cd smeserver-mycontrib
 
   
 
   
  # Developer environment
+
Then you can copy (DO NOT MODIFY ANYTHING before committing!!!):
  # This gets symlinked into /etc/profile.d
+
  cp -a contribs7 contribs8
 +
  rm -rf contribs8/CVS
 +
cvs add contribs8
 +
find contribs8 -mindepth 1 -name CVS -prune -o -print | xargs cvs add
 +
cvs commit -m 'Initial import'
 
   
 
   
export CVS_RSH=ssh # tell CVS to use ssh
+
Finally you can make your first build
  −
# DO NOT set CVSROOT
  −
  −
alias rm='rm -i'
  −
alias cp='cp -i --preserve=timestamps'
  −
alias mv='mv -i'
  −
 
  −
====Access to build system====
  −
Check updates/status on the build server: http://buildsys.contribs.org
  −
 
  −
Ask admin@contribs.org for certificates, give the email address to use for notifications
  −
yum install --enablerepo=smedev plague-client
  −
  −
Copy certificates and config file to ~/
  −
.plague-client.cfg
  −
.username.pem
  −
.contribs-upload-ca.pem
  −
.contribs-server-ca.pem
  −
  −
chmod 600 .username.pem
  −
  −
Check it's working
  −
plague-client list_builders
  −
  −
Builders:
  −
------------------------------------------------------------------------------------------
  −
  build64-1.contribs.org      x86_64 amd64 ia32e noarch i386 i486 i586 i686 athlon available
  −
  build32-1.contribs.org      i386 i486 i586 i686 athlon noarch  available
     −
====Sourceforge access====
+
  cd contribs8
* 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:
  −
[http://sourceforge.net/docman/display_doc.php?docid=11123&group_id=1 B04: Registering a User Account]
  −
[http://sourceforge.net/docman/display_doc.php?docid=29894&group_id=1 E04: CVS (Version Control for Source Code)]
  −
[http://sourceforge.net/docs/F02/en/#top F02: 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.
  −
 
  −
* Copy your local public SSH key to SourceForge https://sourceforge.net/account/editsshkeys.php 
  −
 
  −
* If local username is different to sf.net username
  −
~/.ssh/config
  −
  −
Host  smeserver.cvs.sourceforge.net
  −
User  sfusername
  −
Host  smecontribs.cvs.sourceforge.net
  −
User  sfusername
  −
  −
chmod 600 ~/.ssh/config
  −
 
  −
===Usage===
  −
====Import cvs====
  −
This is just cvs information, not source code.
  −
 
  −
You can use ~/home/smeserver or whatever suits.
  −
 
  −
mkdir ~/smeserver
  −
cd ~/smeserver
  −
cvs -z3 -d:ext:smeserver.cvs.sourceforge.net:/cvsroot/smeserver co -P rpms
  −
cd rpms
  −
cvs -z3 -d:ext:smeserver.cvs.sourceforge.net:/cvsroot/smeserver co -P common
  −
  −
mkdir ~/smecontribs
  −
  cd ~/smecontribs
  −
cvs -z3 -d:ext:smecontribs.cvs.sourceforge.net:/cvsroot/smecontribs co -P rpms
  −
cd rpms
  −
cvs -z3 -d:ext:smecontribs.cvs.sourceforge.net:/cvsroot/smecontribs co -P common
  −
 
  −
To refresh run the following from the rpms directory, or any lower directory with a CVS dir
  −
cvs update -dPA
  −
 
  −
====Modify a package====
  −
Builders have rights to patch packages, tag, and build. 
  −
If you need to upload new source tarballs or versions shad has to do that for now. Email them.
  −
Binary files are stored in a look-aside cache on shads box. CVS isn't great on binary files.
  −
 
  −
Mezzanine, (mzsfget, mzclean, mzprep, mzpatch, mzbuild, mzput) have all be replaced with a new method.
  −
 
  −
Change to work directory
  −
cd smecontribs/rpms/smeserver-foo/contribs7
  −
 
  −
To prepare a tree
  −
cvs update -dPA [optional]
  −
make clean [optional]
  −
make prep
  −
 
  −
Then switch to the tree and make modification.
  −
 
  −
In the prepared dir copy a file you want to modify like so:
  −
 
  −
cp 28UserManagerProxyPass 28UserManagerProxyPass.{patchname}
  −
 
  −
Then modify the original file 28UserManagerProxyPass.
  −
To add new files touch the file.{patchname} so it is empty. (really empty = 0kb, some file manager don't!)
  −
 
  −
Once you have all the files you want patched copied and changed then you can build the patch (from the contribs7 dir) with:
  −
make patch SUFFIX={patchname}
  −
It will build and add the patch for you.  It should be named "name-version-{patchname}.patch"
  −
(man gendiff.  That is what the makefile uses to generate the diff file.)
  −
 
  −
Edit the spec
  −
nano -w smeserver-foo.spec
  −
 
  −
Build the rpm locally to test
   
  make local
 
  make local
  −
Once you are satisfied and want to submit the package to the build server commit your changes.
  −
cvs commit
  −
:q enter [is this right ?? messy]
  −
  −
Then tag all files as belonging to a particular build version
   
  make tag
 
  make tag
  −
Then submit the request to the build server which will checkout the recently tagged version and build it in a chroot (mock) env.
   
  make build
 
  make build
   −
Key things are to always do "make tag" before "make build"
+
<noinclude>[[Category:SME9-Development]]
 
  −
Always ensure you are working with the latest version (cvs update -dPA)
  −
 
  −
You and updatesteam will get an email on successfull build. 
  −
Only you will get an email on failed build.
  −
 
  −
===Workflow===
  −
Once the server successfully builds it will automatically be pulled on the next repo update run
  −
(40 past the even hours MDT). The package will either be put into the smedev (new package) or smetest (exist in higher repo)  After verification the package is manually moved from smedev/smetest to smecontribs/smeupdates-testing
  −
 
  −
===Mailing Lists===
  −
Subscribe yourself to the [http://lists.contribs.org/mailman/listinfo/devinfo devinfo mailinglist]. This is the place to discuss the development of the server and contribs. If you have other questions, not regarding development please use the [http://forums.contribs.org forums].
  −
 
  −
Other lists exist to monitor bugs and the build system, UpdatesTeam + ...
 

Navigation menu