Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 129: Line 129:  
  $ rpm -qpl package_name.noarch.rpm |grep perl
 
  $ rpm -qpl package_name.noarch.rpm |grep perl
    +
== Patching an upstream package ==
 +
 +
initscripts is an example of a package where we have to patch the upstream package.
 +
 +
Original author [http://lists.contribs.org/pipermail/devinfo/2013-October/011977.html Ian Wells]
 +
 +
Here it is a 3-step process, Analysis, Integration, buildsys update. The majority of the work is in steps 1 & 2 where there needs to be an analysis of what has changed, and then an integration stage where you need to check that the patches still work, update CVS with new and modified files etc. Finally the new source needs updating into the buildsys before the official build will work.
 +
 +
initscripts-8.45.44-3.el5.centos.src.rpm
 +
 +
Steps to update initscripts
 +
 +
===Step 1: Analysis, by anyone===
 +
 +
Check the contents of the SRPMs
 +
 +
$ rpm -qlp initscripts-8.45.44-3.el5.centos.src.rpm
 +
0001-Fix-comments-in-sysctl.conf.ppc-862597.patch
 +
0002-create-tmp-.X11-unix-in-rc.sysinit.patch
 +
initscripts-8.45.44.tar.bz2
 +
initscripts-centos-branding.patch
 +
initscripts.spec
 +
 +
$ rpm -qlp initscripts-8.45.42-2.1.el5.sme.src.rpm
 +
0002-create-tmp-.X11-unix-in-rc.sysinit.patch
 +
initscripts-8.45.38-smepatches.patch
 +
initscripts-8.45.42-kpartx.patch
 +
initscripts-8.45.42.tar.bz2
 +
initscripts-centos-branding.patch
 +
initscripts.spec
 +
 +
 +
Check what is different (do a directory compare)
 +
 +
 +
* Identical
 +
initscripts-centos-branding.patch (content is identical, although files are not)
 +
 +
* Modified
 +
initscripts.spec
 +
0002-create-tmp-.X11-unix-in-rc.sysinit.patch (patch is identical but line numbers changed)
 +
 +
* New
 +
initscripts-8.45.44.tar.bz2 (New source will need to be added to buildsys)
 +
0001-Fix-comments-in-sysctl.conf.ppc-862597.patch (will be added to CVS)
 +
 +
* Obsolete
 +
initscripts-8.45.42-kpartx.patch (can be removed from CVS)
 +
initscripts-8.45.42.tar.bz2
 +
 +
* Not in upstream SRPM as this is an SME Server patch to be applied each time
 +
initscripts-8.45.38-smepatches.patch
 +
 +
 +
So we need the new initscripts-8.45.44.tar.bz2 & 0001-Fix-comments-in-sysctl.conf.ppc-862597.patch, and the updated 0002-create-tmp-.X11-unix-in-rc.sysinit.patch
 +
 +
 +
=== Step 2: Integration : local mock build, can be done by a developer ===
 +
 +
* Remove the obsolete files
 +
 +
* Update the spec file.
 +
Version
 +
Release
 +
Patches
 +
Check the description, don't copy the 'Centos' wording to the SME package
 +
Copy the latest upstream Changelog
 +
Add/modify the changelog regarding SME patches
 +
 +
* Copy the new patch & source to the local directory
 +
 +
* Check that the patches apply cleanly (You don't want to see lines like Hunk #1 succeeded at 890 (offset 1 line).)
 +
make prep
 +
 +
* Try to build it
 +
make mockbuild
 +
 +
* Once it builds cleanly on local mock, commit the changes to CVS. Note that you cannot submit the build yet as it will fail due to the new source.
 +
make commit
 +
 +
=== Step 3: Buildsys access and permissions needed ===
 +
 +
Then add new sources to buildsys ON BUILDSYS
 +
 +
If the above step has already been done then can update to latest in CVS, and retrieve the source tarball.
 +
 +
* get date for import
 +
$ date +%s
 +
1382918459
 +
 +
* fix name/version/release and date in the import.log (I don't have a good explanation for this)
 +
vi import.log*
 +
 +
* import the new source/tarball
 +
make new-sources FILES=*bz2
 +
 +
* Finally commit changes to CVS and build it.
 +
make commit tag build
    
=== Creating a new branch, eg SME 9 ===
 
=== Creating a new branch, eg SME 9 ===

Navigation menu