Diff for /wikisrc/pkgsrc/how_to_update_a_package_in_pkgsrc.mdwn between versions 1.1 and 1.2

version 1.1, 2011/11/20 20:28:27 version 1.2, 2012/02/05 07:14:36
Line 1 Line 1
 This article describes by examples how a [[pkgsrc/pkgsrc]] developer can update a package to a later version.  This article describes by examples how a [[pkgsrc/pkgsrc]] developer can update a package to a later version. 
   
 You may be looking for [[pkgsrc/How to update a package with pkgsrc]]  You may be looking for [[pkgsrc/How to update a package with pkgsrc]]
   
   
 **Contents**  **Contents**
   
 [[!toc levels=3]]  [[!toc levels=3]]
   
 #  Preparation  #  Preparation 
   
 Please install pkgtools/pkgdiff. This tools helps creating patches for pkgsrc. It contains pkgvi, mkpatches and patchdiff.  Please install pkgtools/pkgdiff. This tools helps creating patches for pkgsrc. It contains pkgvi, mkpatches and patchdiff. 
   
 #  Trivial: games/gogui from 0.9.1 to 0.9.3  #  Trivial: games/gogui from 0.9.1 to 0.9.3 
   
 ##  Part 1: Get the new package to build  ##  Part 1: Get the new package to build 
   
   * Change the version number in the DISTNAME variable to 0.9.3.    * Change the version number in the DISTNAME variable to 0.9.3. 
   * Run make mdi to download the new distfile and regenerate the checksums.    * Run make mdi to download the new distfile and regenerate the checksums. 
   * Run make.    * Run make. 
   * Wait until the build has finished ...    * Wait until the build has finished ... 
   
 ##  Part 2: Install the new package  ##  Part 2: Install the new package 
   
   * Run make deinstall to remove the old package.    * Run make deinstall to remove the old package. 
   * Run make install PKG_DEVELOPER=yes, hoping that the list of installed files has not changed.    * Run make install PKG_DEVELOPER=yes, hoping that the list of installed files has not changed. 
   * There is no document describing the changes. Only on the SourceForge project page, there are two comments about minor bugfixes. Keep them in mind for later.    * There is no document describing the changes. Only on the SourceForge project page, there are two comments about minor bugfixes. Keep them in mind for later. 
   * The package has installed without any failures. That's good.    * The package has installed without any failures. That's good. 
   * Run make package clean to finish the work.    * Run make package clean to finish the work. 
   
 ##  Part 3: Committing the update  ##  Part 3: Committing the update 
   
   * Run pkglint -Wall to see if the package looks good.    * Run pkglint -Wall to see if the package looks good. 
   * Run cvs ci to commit the update.    * Run cvs ci to commit the update. 
   
     * The text of the commit message is Updated gogui to 0.9.3, followed by an empty line, followed by a comment about the changes.      * The text of the commit message is Updated gogui to 0.9.3, followed by an empty line, followed by a comment about the changes. 
   
   * Run (cd ../../doc && cvs up)    * Run (cd ../../doc && cvs up)
   * Run make changes-entry    * Run make changes-entry
   * Run (cd ../../doc && cvs ci CHANGES-*).    * Run (cd ../../doc && cvs ci CHANGES-*). 
   
     * The text of the commit message is Updated gogui to 0.9.3.      * The text of the commit message is Updated gogui to 0.9.3. 
   
 #  Simple: devel/rapidsvn from 0.9.3 to 0.9.4  #  Simple: devel/rapidsvn from 0.9.3 to 0.9.4 
   
 ##  Part 1: Get the new package to build  ##  Part 1: Get the new package to build 
   
   * Change the version number in the DISTNAME variable to 0.9.4.    * Change the version number in the DISTNAME variable to 0.9.4. 
   * Run make mdi to download the new distfile and regenerate the checksums.    * Run make mdi to download the new distfile and regenerate the checksums. 
          
          
     ...      ...
     fetch: Unable to fetch expected file rapidsvn-0.9.4.tar.gz      fetch: Unable to fetch expected file rapidsvn-0.9.4.tar.gz
          
   
   * Look at the homepage (see HOMEPAGE) to see where the distfile is.    * Look at the homepage (see HOMEPAGE) to see where the distfile is. 
   * Change MASTER_SITES accordingly.    * Change MASTER_SITES accordingly. 
   * Run make mdi again.    * Run make mdi again. 
   * Run make and hope that the old patches still apply.    * Run make and hope that the old patches still apply. 
          
          
     ...      ...
     => Applying pkgsrc patches for rapidsvn-0.9.4      => Applying pkgsrc patches for rapidsvn-0.9.4
     1 out of 1 hunks failed--saving rejects to configure.rej      1 out of 1 hunks failed--saving rejects to configure.rej
     Patch /home/roland/proj/NetBSD/pkgsrc/devel/rapidsvn/patches/patch-ab failed      Patch /home/roland/proj/NetBSD/pkgsrc/devel/rapidsvn/patches/patch-ab failed
     ERROR: Patching failed due to modified or broken patch file(s):      ERROR: Patching failed due to modified or broken patch file(s):
     ERROR:  /home/roland/proj/NetBSD/pkgsrc/devel/rapidsvn/patches/patch-ab      ERROR:  /home/roland/proj/NetBSD/pkgsrc/devel/rapidsvn/patches/patch-ab
          
   
   * They don't. :(    * They don't. :( 
   * Look at patches/patch-ab to see which file it is applied to. It's the configure script, so have a look at that.    * Look at patches/patch-ab to see which file it is applied to. It's the configure script, so have a look at that. 
   * Hmmm, it looks quite different. Let's see if the old line still exists.    * Hmmm, it looks quite different. Let's see if the old line still exists. 
   * Look for "$GXX" ==. It's in line 19749.    * Look for "$GXX" ==. It's in line 19749. 
   * So we need to remove one of the equals characters, since that's what the patch did.    * So we need to remove one of the equals characters, since that's what the patch did. 
   * Change to the work directory ($WRKOBJDIR) and edit the file(s) you need to patch with pkgvi, make the changes and save it. pkgvi will automatically create a diff.    * Change to the work directory ($WRKOBJDIR) and edit the file(s) you need to patch with pkgvi, make the changes and save it. pkgvi will automatically create a diff. 
   * Change back to the package directory (e.g. .../pkgsrc/devel/rapidsvn/ and run mkpatches. This will create the new patches from the new diffs in $WRKOBJDIR/.newpatches/    * Change back to the package directory (e.g. .../pkgsrc/devel/rapidsvn/ and run mkpatches. This will create the new patches from the new diffs in $WRKOBJDIR/.newpatches/ 
   * Now copy the new patch(es) from $WRKOBJDIR/.newpatches/ to `patches/` in the package directory.    * Now copy the new patch(es) from $WRKOBJDIR/.newpatches/ to `patches/` in the package directory. 
   * Run make patches to regenerate the patches from the working directory.    * Run make patches to regenerate the patches from the working directory. 
   * Look at the patches to see if they contain more than they should, or expanded strings (for example, /usr/pkg instead of @PREFIX@.    * Look at the patches to see if they contain more than they should, or expanded strings (for example, /usr/pkg instead of @PREFIX@. 
   * Run make mps to regenerate the checksums.    * Run make mps to regenerate the checksums. 
   * Run make clean; make to try again.    * Run make clean; make to try again. 
   * In the mean time, create a patch for configure.in, since that's the source of the code which got patched in the configure script.    * In the mean time, create a patch for configure.in, since that's the source of the code which got patched in the configure script. 
   * Wait until the build has finished ...    * Wait until the build has finished ... 
   
 ##  Part 2: Install the new package  ##  Part 2: Install the new package 
   
   * Run make deinstall to remove the old package.    * Run make deinstall to remove the old package. 
   * Run make install PKG_DEVELOPER=yes, hoping that the list of installed files has not changed.    * Run make install PKG_DEVELOPER=yes, hoping that the list of installed files has not changed. 
   * Meanwhile, look at the NEWS, ChangeLog and CHANGES files in the WRKSRC to see what has changed between 0.9.3 and 0.9.4. Save that text to later include it in the commit message.    * Meanwhile, look at the NEWS, ChangeLog and CHANGES files in the WRKSRC to see what has changed between 0.9.3 and 0.9.4. Save that text to later include it in the commit message. 
   * The package has installed without any failures. That's good.    * The package has installed without any failures. That's good. 
   * Run make package clean to finish the work.    * Run make package clean to finish the work. 
   
 ##  Part 3: Committing the update  ##  Part 3: Committing the update 
   
   * Run pkglint -Wall to see if the package looks good.    * Run pkglint -Wall to see if the package looks good. 
   * Run cvs ci to commit the update.    * Run cvs ci to commit the update. 
   
     * The text of the commit message is Updated rapidsvn to 0.9.4, followed by an empty line, followed by the text from the CHANGES file.      * The text of the commit message is Updated rapidsvn to 0.9.4, followed by an empty line, followed by the text from the CHANGES file. 
   
   * Run (cd ../../doc && cvs up)    * Run (cd ../../doc && cvs up)
   * Run make changes-entry    * Run make changes-entry
   * Edit ../../doc/TODO to remove the line of the requested update.    * Edit ../../doc/TODO to remove the line of the requested update. 
   * Run (cd ../../doc && cvs ci CHANGES-* TODO).    * Run (cd ../../doc && cvs ci CHANGES-* TODO). 
   
     * The text of the commit message is Updated rapidsvn to 0.9.4, without all the details.      * The text of the commit message is Updated rapidsvn to 0.9.4, without all the details. 
   
 ##  Part 4: Sending the patches to the upstream authors  ##  Part 4: Sending the patches to the upstream authors 
   
   * Look at the homepage of the project to see where to send bug reports.    * Look at the homepage of the project to see where to send bug reports. 
   * Register an account, if needed.    * Register an account, if needed. 
   * Submit a bug report. <http://rapidsvn.tigris.org/issues/show_bug.cgi?id=497>    * Submit a bug report. <http://rapidsvn.tigris.org/issues/show_bug.cgi?id=497>
   * That's all.    * That's all. 
   
   

Removed from v.1.1  
changed lines
  Added in v.1.2


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb