Difference between revisions of "Simple Package Modification"
Line 8: | Line 8: | ||
− | You will need to alter your user account to enable regular login. If you want to enable account "builder", then you would type the following commands from the root account: | + | * You will need to alter your user account to enable regular login. If you want to enable account "builder", then you would type the following commands from the root account: |
chsh -s /bin/bash builder | chsh -s /bin/bash builder | ||
+ | |||
db accounts setprop builder Shell /bin/bash | db accounts setprop builder Shell /bin/bash | ||
− | Install CVS | + | * Install CVS |
yum install cvs | yum install cvs | ||
− | create a development directory, eg ~/home/smeserver | + | |
+ | * create a development directory, eg ~/home/smeserver | ||
mkdir ~/home/smeserver | mkdir ~/home/smeserver | ||
+ | |||
cd ~/home/smeserver | cd ~/home/smeserver | ||
− | Download the module you want to work on, eg e-smith-base | + | * Download the module you want to work on, eg e-smith-base |
cvs -z3 -d:pserver:anonymous@smeserver.cvs.sourceforge.net:/cvsroot/smeserver checkout -P e-smith-base | cvs -z3 -d:pserver:anonymous@smeserver.cvs.sourceforge.net:/cvsroot/smeserver checkout -P e-smith-base | ||
− | Alternatively retrieve the whole CVS tree | + | * Alternatively retrieve the whole CVS tree |
− | + | ||
− | + | cd ~/home/smeserver | |
+ | |||
+ | cvs -z3 -d:pserver:anonymous@smeserver.cvs.sourceforge.net:/cvsroot/smeserver co -P rpms | ||
You can now retrieve one of the packages from SourceForge. In this case, we want to modify the e-smith-base package for SME8, 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 e-smith-base package for SME8, so let's retrieve it from SourceForge: | ||
− | Change to work directory | + | * Change to work directory |
cd ~/home/smeserver/rpms/e-smith-base/sme8 | cd ~/home/smeserver/rpms/e-smith-base/sme8 | ||
Line 39: | Line 44: | ||
cvs update -dPA | cvs update -dPA | ||
+ | |||
make clean | make clean | ||
+ | |||
make prep | make prep | ||
− | Save a copy of the original files | + | * Save a copy of the original files |
+ | |||
cp -R e-smith-base-5.2.0 e-smith-base-5.2.0.old | cp -R e-smith-base-5.2.0 e-smith-base-5.2.0.old | ||
<Now make the changes needed to the files in e-smith-base-5.2.0> | <Now make the changes needed to the files in e-smith-base-5.2.0> | ||
− | Create a patch | + | * Create a patch |
+ | |||
diff -urN smeserver-foo-2.0.0.old smeserver-yum-2.0.0 > smeserver-yum-2.0.0-importKeys.patch | diff -urN smeserver-foo-2.0.0.old smeserver-yum-2.0.0 > smeserver-yum-2.0.0-importKeys.patch | ||
− | Now to make a build to test if it works: | + | * Now to make a build to test if it works: |
− | Update the spec file | + | * Update the spec file |
− | #increase the release | + | <pre>#increase the release |
%define release 15 | %define release 15 | ||
Line 66: | Line 75: | ||
#apply the patch in %setup | #apply the patch in %setup | ||
%patch2 -p1 | %patch2 -p1 | ||
− | + | </pre> | |
CHECK: that the changelog version really matches the RPM version. | CHECK: that the changelog version really matches the RPM version. | ||
CHECK: Is the spec file correct, look at the changes | CHECK: Is the spec file correct, look at the changes | ||
+ | |||
cvs diff e-smith-base.spec | cvs diff e-smith-base.spec | ||
Have you updated the release? Is that new release in the changelog? | Have you updated the release? Is that new release in the changelog? | ||
Have you included the patch, Patch1: e-smith-proftpd-2.2.0-persistent_passwd.patch | Have you included the patch, Patch1: e-smith-proftpd-2.2.0-persistent_passwd.patch | ||
Is the changelog correct | Is the changelog correct | ||
+ | <pre> | ||
* Tue Jan 22 2013 Ian Wells <esmith@wellsi.com> 2.2.0-4.sme | * Tue Jan 22 2013 Ian Wells <esmith@wellsi.com> 2.2.0-4.sme | ||
- Remove previous change [SME: 7129] | - Remove previous change [SME: 7129] | ||
+ | </pre> | ||
There must be a bugzilla number in this format [SME: 7129] | There must be a bugzilla number in this format [SME: 7129] | ||
Is the date really correct? Both day and date. | Is the date really correct? Both day and date. | ||
Line 82: | Line 94: | ||
CHECK: what would be committed | CHECK: what would be committed | ||
+ | |||
cvs update | cvs update | ||
* M modified, will be committed | * M modified, will be committed | ||
Line 90: | Line 103: | ||
CHECK: has the patch files been added? cvs add e-smith-quota-2.0.0-badlyformattedie8.patch | CHECK: has the patch files been added? cvs add e-smith-quota-2.0.0-badlyformattedie8.patch | ||
+ | |||
CHECK: are the files UNIX or do they have DOS endings (bad) | CHECK: are the files UNIX or do they have DOS endings (bad) | ||
Build the rpm locally to test, (note, this deletes the working tree!) | Build the rpm locally to test, (note, this deletes the working tree!) | ||
+ | |||
make local | make local | ||
Line 101: | Line 116: | ||
--- this simple package modification ends here --- | --- this simple package modification ends here --- | ||
− | *** If you have CVS access then | + | ***If you have CVS access then |
Once you are satisfied and want to submit the package to the build server commit your changes. (Please use descriptive comments so that other developers are aware of what is happening. Comments will appear on the subject line of the commit email that get send to the other developers.) | Once you are satisfied and want to submit the package to the build server commit your changes. (Please use descriptive comments so that other developers are aware of what is happening. Comments will appear on the subject line of the commit email that get send to the other developers.) | ||
Line 107: | Line 122: | ||
cvs commit -m '' <-- copy this then add changelog line | cvs commit -m '' <-- copy this then add changelog line | ||
− | *** If you have build access then | + | ***If you have build access then |
− | + | Build it (from either the sme7 or sme8 dir): | |
make tag | make tag | ||
make build | make build |
Revision as of 07:29, 23 January 2013
The simplest package modification is for someone to access the code via anonymous CVS and produce a patch to put into Bugzilla. This can be done on SME 8 by installing only cvs as follows.
Using SME 8
Create a new user, eg builder
- You will need to alter your user account to enable regular login. If you want to enable account "builder", then you would type the following commands from the root account:
chsh -s /bin/bash builder
db accounts setprop builder Shell /bin/bash
- Install CVS
yum install cvs
- create a development directory, eg ~/home/smeserver
mkdir ~/home/smeserver
cd ~/home/smeserver
- Download the module you want to work on, eg e-smith-base
cvs -z3 -d:pserver:anonymous@smeserver.cvs.sourceforge.net:/cvsroot/smeserver checkout -P e-smith-base
- Alternatively retrieve the whole CVS tree
cd ~/home/smeserver
cvs -z3 -d:pserver:anonymous@smeserver.cvs.sourceforge.net:/cvsroot/smeserver co -P rpms
You can now retrieve one of the packages from SourceForge. In this case, we want to modify the e-smith-base package for SME8, so let's retrieve it from SourceForge:
- Change to work directory
cd ~/home/smeserver/rpms/e-smith-base/sme8
To prepare a tree
cvs update -dPA
make clean
make prep
- Save a copy of the original files
cp -R e-smith-base-5.2.0 e-smith-base-5.2.0.old
<Now make the changes needed to the files in e-smith-base-5.2.0>
- Create a patch
diff -urN smeserver-foo-2.0.0.old smeserver-yum-2.0.0 > smeserver-yum-2.0.0-importKeys.patch
- Now to make a build to test if it works:
- Update the spec file
#increase the release %define release 15 #add the patch Patch2: smeserver-foo-1.2-widget.patch #update the changelog, include the bug number * Fri Jan 11 2008 John Smith <smith@foo.net> 1.2-15 - fixed foo to create bar [SME 3470] #apply the patch in %setup %patch2 -p1
CHECK: that the changelog version really matches the RPM version.
CHECK: Is the spec file correct, look at the changes
cvs diff e-smith-base.spec
Have you updated the release? Is that new release in the changelog? Have you included the patch, Patch1: e-smith-proftpd-2.2.0-persistent_passwd.patch Is the changelog correct
* Tue Jan 22 2013 Ian Wells <esmith@wellsi.com> 2.2.0-4.sme - Remove previous change [SME: 7129]
There must be a bugzilla number in this format [SME: 7129] Is the date really correct? Both day and date. The version should follow after the email address
CHECK: what would be committed
cvs update
* M modified, will be committed * U file has been updated since you last checked it out * A added, will be added on commit * D deleted, will be deleted on commit * ? egregious file not part of CVS record for this dir
CHECK: has the patch files been added? cvs add e-smith-quota-2.0.0-badlyformattedie8.patch
CHECK: are the files UNIX or do they have DOS endings (bad)
Build the rpm locally to test, (note, this deletes the working tree!)
make local
Once the patch works, attach the patch to the bugzilla entry.
--- this simple package modification ends here ---
- If you have CVS access then
Once you are satisfied and want to submit the package to the build server commit your changes. (Please use descriptive comments so that other developers are aware of what is happening. Comments will appear on the subject line of the commit email that get send to the other developers.) cvs commit -m 'your descriptive commit message here' cvs commit -m <-- copy this then add changelog line
- If you have build access then
Build it (from either the sme7 or sme8 dir):
make tag make build