Bug 147268

Summary: Imporve Porters Handbook section 4.4 - Patching
Product: Documentation Reporter: Aldis Berjoza <aldis>
Component: Books & ArticlesAssignee: Gabor Pali <pgj>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch.txt
none
147268_1.diff none

Description Aldis Berjoza 2010-06-01 05:40:03 UTC
While original Porters Handbooks is good, I faced 1 problem yesterday, when I was creating patch (4.4 Patching) for freeglut 2.6 and couldn't solve this for few hours.

The problem is that if file name that I want to patch contains underscore (_) patch needs to have two underscores instead.

For example I want to patch src/freeglut_joystick.c patch should be named patch-src-freeglut__joustick.c

I'm sure that if such info was available on porters handbook, it would help many other porters :)


Also It would be very nice if Section 4.4 would contain info about make makepatch :)

porter can copy original files, that he wants to patch to same filename with .orig file extension, modify original file and then in ports directory run make make patch. This will create patch files for all *.orig files :)


I think such information would be super helpful.
Comment 1 Jason Helfman 2010-09-02 21:21:14 UTC
--- book.sgml	2010-08-25 02:55:41.000000000 -0700
+++ book.sgml	2010-09-02 13:18:58.000000000 -0700
@@ -735,6 +735,16 @@
 
 	<programlisting>USE_DOS2UNIX=    yes
 DOS2UNIX_REGEX=  .*\.(c|cpp|h)</programlisting>
+
+	<para>If you want to create a patch file based off of an original 
+	 file, you can copy the original file to a <emphasis>.orig</emphasis>
+	 extension and then modify the original file. Run <maketarget>makepatch
+	 </maketarget>, and this will write out an appropriate patch file 
+	 to the files directory of the port. If you feel the &os; community 
+	 would benefit from your patch, you
+	 may <ulink
+	 url="&url.base;/send-pr.html">submit a problem report</ulink> for 
+	 consideration.</para>
       </sect1>
 
       <sect1 id="slow-configure">
Comment 2 Gabor Pali freebsd_committer freebsd_triage 2010-09-02 23:13:36 UTC
Responsible Changed
From-To: freebsd-doc->pgj

I take this.
Comment 3 Gabor Pali freebsd_committer freebsd_triage 2010-09-03 16:08:25 UTC
Hey Jason,

I have reviewed and refined your patch.  Please take a look at it.


:g
Comment 4 dfilter service freebsd_committer freebsd_triage 2010-09-05 18:26:39 UTC
pgj         2010-09-05 17:26:26 UTC

  FreeBSD doc repository

  Modified files:
    en_US.ISO8859-1/books/porters-handbook book.sgml 
  Log:
  - Add more information on patching, i.e. how to:
    - Escape underscores in patch file names
    - Create patches by using the "makepatch" make(1) target
  
  PR:             docs/147268
  Submitted by:   Aldis Berjoza <aldis@bsdroot.lv>
  Patch by:       Jason Helfman <jhelfman@e-e.com>
  
  Revision  Changes    Path
  1.1074    +15 -1     doc/en_US.ISO8859-1/books/porters-handbook/book.sgml
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Gabor Pali freebsd_committer freebsd_triage 2010-09-05 18:32:12 UTC
State Changed
From-To: open->closed

Some text has been added to address these issues.  Thank you for your
submission!