Changes

From SME Server
Jump to navigationJump to search
Added Template Outdated to mezzanine sections
Line 26: Line 26:     
====Add some useful aliases====
 
====Add some useful aliases====
 
+
{{Outdated}}
 
Mezzanine needs to know to use the SourceForge CVS repository in order to checkout/get or import a package. Once a package is checked out from SourceForge, mezzanine/CVS will remember where it came from and check it back into the same CVS repository. You should not set the CVSROOT environment variable as it makes it too easy to accidentally import code into the wrong CVS repository when working with multiple repositories.
 
Mezzanine needs to know to use the SourceForge CVS repository in order to checkout/get or import a package. Once a package is checked out from SourceForge, mezzanine/CVS will remember where it came from and check it back into the same CVS repository. You should not set the CVSROOT environment variable as it makes it too easy to accidentally import code into the wrong CVS repository when working with multiple repositories.
   Line 53: Line 53:     
====Create your work area====
 
====Create your work area====
 
+
{{Outdated}}
 
It is a good idea to perform all of your checkouts in a standard directory hierarchy. This makes it easier to move around between the packages. On a shared build server, it also makes it easier for people to recover your work if required (for example when you are on holidays). If you want to use filesharing to edit files from a networked PC, you might like to use <tt class="FILENAME">~/home/smeserver/</tt>. On a shared build server, you might even use something like <tt class="FILENAME">/builds/users/$LOGNAME/smeserver/</tt> so the files are not in your home directory and are accessible to all developers.
 
It is a good idea to perform all of your checkouts in a standard directory hierarchy. This makes it easier to move around between the packages. On a shared build server, it also makes it easier for people to recover your work if required (for example when you are on holidays). If you want to use filesharing to edit files from a networked PC, you might like to use <tt class="FILENAME">~/home/smeserver/</tt>. On a shared build server, you might even use something like <tt class="FILENAME">/builds/users/$LOGNAME/smeserver/</tt> so the files are not in your home directory and are accessible to all developers.
 
{{Note box|msg=Reminder: All files must be checked in using Unix text format.}}
 
{{Note box|msg=Reminder: All files must be checked in using Unix text format.}}
Line 97: Line 97:     
====mzgetsf_anon: SourceForge anonymous CVS checkout====
 
====mzgetsf_anon: SourceForge anonymous CVS checkout====
 
+
{{Outdated}}
 
You can now retrieve one of the packages from SourceForge. In this case, we want to modify the <var class="LITERAL">smeserver-yum</var> package, so let's retrieve it from SourceForge:
 
You can now retrieve one of the packages from SourceForge. In this case, we want to modify the <var class="LITERAL">smeserver-yum</var> package, so let's retrieve it from SourceForge:
   Line 112: Line 112:     
====Mezzanine package hierarchy====
 
====Mezzanine package hierarchy====
 
+
{{Outdated}}
 
  [gordonr@smebuild smeserver]$ cd smeserver-yum/
 
  [gordonr@smebuild smeserver]$ cd smeserver-yum/
 
   
 
   
Line 138: Line 138:     
====mzclean: Clean out modified files====
 
====mzclean: Clean out modified files====
 
+
{{Outdated}}
 
Before making changes to a package, you should ensure that you have a clean copy of the latest sources. Remember - other people may also be working on the package and making changes in SourceForge. You can perform a "merge" when you check in your changes, but it is easiest to start with an up-to-date copy. It is even possible that someone else has already fixed the bug you are working on!
 
Before making changes to a package, you should ensure that you have a clean copy of the latest sources. Remember - other people may also be working on the package and making changes in SourceForge. You can perform a "merge" when you check in your changes, but it is easiest to start with an up-to-date copy. It is even possible that someone else has already fixed the bug you are working on!
   Line 161: Line 161:     
====mzprep: Build working tree====
 
====mzprep: Build working tree====
 
+
{{Outdated}}
 
The '''mzprep''' command runs '''rpmbuild -bp''' on your SPEC file, sources and patches to generate a working tree. You can make changes in the working tree and use mezzanine to generate the patches between the previous version and your new files.
 
The '''mzprep''' command runs '''rpmbuild -bp''' on your SPEC file, sources and patches to generate a working tree. You can make changes in the working tree and use mezzanine to generate the patches between the previous version and your new files.
   Line 228: Line 228:     
====Modifying a file====
 
====Modifying a file====
 
+
{{Outdated}}
 
OK - now we can actually make a change. We want to modify the file which will be installed as <tt class="FILENAME">/etc/e-smith/events/actions/yum-import-keys</tt>, so the actual file we need to modify is: <tt class="FILENAME">work/smeserver-yum-1.2.0/root/etc/e-smith/events/actions/yum-import-keys</tt>.
 
OK - now we can actually make a change. We want to modify the file which will be installed as <tt class="FILENAME">/etc/e-smith/events/actions/yum-import-keys</tt>, so the actual file we need to modify is: <tt class="FILENAME">work/smeserver-yum-1.2.0/root/etc/e-smith/events/actions/yum-import-keys</tt>.
   Line 249: Line 249:     
====mzpatch: Create a patch====
 
====mzpatch: Create a patch====
 
+
{{Outdated}}
 
Mezzanine automates the creation of patches through the '''mzpatch''' command.
 
Mezzanine automates the creation of patches through the '''mzpatch''' command.
 
{{Note box|msg=Always run '''mzpatch''' from the top-level directory of your package (e.g. <tt class="FILENAME">~/smeserver/smeserver-yum/</tt>).}}
 
{{Note box|msg=Always run '''mzpatch''' from the top-level directory of your package (e.g. <tt class="FILENAME">~/smeserver/smeserver-yum/</tt>).}}
Line 362: Line 362:     
=====mzbuild: Build a new package=====
 
=====mzbuild: Build a new package=====
 
+
{{Outdated}}
 
With all that done, you should be able to build a new package using '''mzbuild'''<nowiki>:</nowiki>
 
With all that done, you should be able to build a new package using '''mzbuild'''<nowiki>:</nowiki>
   Line 468: Line 468:     
====mzgetsf: SourceForge developer CVS checkout====
 
====mzgetsf: SourceForge developer CVS checkout====
 
+
{{Outdated}}
 
Once you have SourceForge CVS access, you can use '''mzgetsf''' (instead of '''mzgetsf_anon''') to retrieve the sources. Your copy will be writable and you will be able to put changes back to CVS. When you run '''mzpatch''' you should not see an error during the '''cvs add''' step.
 
Once you have SourceForge CVS access, you can use '''mzgetsf''' (instead of '''mzgetsf_anon''') to retrieve the sources. Your copy will be writable and you will be able to put changes back to CVS. When you run '''mzpatch''' you should not see an error during the '''cvs add''' step.
   Line 481: Line 481:     
====mzput: Put the changes back to CVS====
 
====mzput: Put the changes back to CVS====
 
+
{{Outdated}}
 
Instead of attaching the patch to the Bugzilla entry, you will be able to put it back to CVS. Mezzanine normally edits the <tt class="FILENAME">ChangeLog</tt>, but we don't need to do that as we keep the changes in the <var class="LITERAL">%changelog</var> section of the <tt class="FILENAME">SPEC</tt> file. The <var class="LITERAL">-m</var> option to '''mzput''' allows a simple comment to be appended, which is all that is required:
 
Instead of attaching the patch to the Bugzilla entry, you will be able to put it back to CVS. Mezzanine normally edits the <tt class="FILENAME">ChangeLog</tt>, but we don't need to do that as we keep the changes in the <var class="LITERAL">%changelog</var> section of the <tt class="FILENAME">SPEC</tt> file. The <var class="LITERAL">-m</var> option to '''mzput''' allows a simple comment to be appended, which is all that is required:
  

Navigation menu