[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2024-05-07 Thread Ulrich Müller
commit: 5196ecf9214c74aec620b0b0580e6264083a184a
Author: Ulrich Müller  gentoo  org>
AuthorDate: Mon Apr 29 16:19:17 2024 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Tue May  7 17:16:52 2024 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=5196ecf9

ebuild-writing/misc-files/patches: Revert wording change

This is referred to as the "Clean patch howto" from several other
places. The wording change would also break links because the section
title is used as fragment identifier.

Signed-off-by: Ulrich Müller  gentoo.org>

 ebuild-writing/misc-files/patches/text.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index c71551b..239fd1b 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -172,7 +172,7 @@ allows them to be applied unconditionally.
 
 
 
-Clean patch guide
+Clean patch howto
 
 
 



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2022-04-06 Thread Ulrich Müller
commit: dcb57d688530aa1af4193aaec350d6d7f571c6cf
Author: Thomas Bracht Laumann Jespersen  laumann  xyz>
AuthorDate: Sun Mar 27 20:17:34 2022 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Apr  6 18:40:39 2022 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=dcb57d68

ebuild-writing/patches: Add "Conditional patching" section

The added section under "Patches" tries to describe what patches are
intended for and why conditional patching should be avoided.

It was pointed out in a PR review that conditional patching in general
should be avoided as it introduces more variance and can make it harder
to debug breakage if a patch is only applied under certain conditions
(USE flags being the primary example).

Signed-off-by: Thomas Bracht Laumann Jespersen  laumann.xyz>
Signed-off-by: Ulrich Müller  gentoo.org>

 ebuild-writing/misc-files/patches/text.xml | 59 ++
 1 file changed, 59 insertions(+)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 05052e6..87b4a7e 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -112,6 +112,65 @@ from the vim patch tarball:
 
 
 
+
+Conditional patching
+
+
+
+Patching is ideally only done to make the package in question build properly,
+and should not be done to modify the runtime behaviour of the package. This is
+what USE flags and features of the package are for. As such, it is preferable 
to
+apply patches unconditionally and avoid conditional patching.
+
+
+
+There are a number of reasons to avoid conditional patching:
+
+
+
+  
+It may go unnoticed that a patch fails to apply, if a package is not being
+tested with a given flag
+  
+  
+More variance is introduced and problems with a package can become much 
more
+difficult to debug
+  
+  
+Patches should preferably be upstreamed, but conditional patches cannot
+  
+
+
+
+Consider the following example src_prepare() implementation:
+
+
+
+src_prepare() {
+   if use threads; then
+   PATCHES+=( "${FILESDIR}"/${P}-mt.patch )
+   fi
+   default
+}
+
+
+
+As this patch is only applied when USE="threads" is set, any developer
+creating new versions of this package might not detect whether the patch 
applies
+successfully if they don't test with the same flag.
+
+
+
+Although conditional patching is discouraged it can be unavoidable and as such,
+it is not considered a banned practice, but, to the extent possible, patches
+should be written such that they affect behaviour correctly based on e.g. build
+time definitions and configuration options rather than USE flags directly. This
+allows them to be applied unconditionally.
+
+
+
+
+
 
 Clean Patch Howto
 



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2021-06-18 Thread Ulrich Müller
commit: 39680e44ae7267f09465cef26f156195e55e6483
Author: Sam James  gentoo  org>
AuthorDate: Sat Apr 10 00:15:09 2021 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Jun 18 06:12:36 2021 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=39680e44

ebuild-writing/misc-files/patches: discourage adding comments within patch

We shouldn't add comments (#) within patch changes to source code
(etc) because it's unnecessary noise. Comments *at the top* of the
patch are, of course, welcoome.

Closes: https://github.com/gentoo/devmanual/pull/217
Signed-off-by: Sam James  gentoo.org>
Signed-off-by: Ulrich Müller  gentoo.org>

 ebuild-writing/misc-files/patches/text.xml | 8 
 1 file changed, 8 insertions(+)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 8d54dfd..05052e6 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -293,6 +293,14 @@ files automatically. Alternatively, you can specify the 
-E option with
 eapply if you want to remove an empty file.
 
 
+
+Removed lines should not appear in the patch because they are commented 
+just remove them entirely. Patches show removed lines by prefixing them with
+a -, so no information is lost by simply deleting lines rather than
+commenting them out (which adds noise). This makes the patch shorter and
+more readable.
+
+
 
 The following function (for your interactive shell, not for the ebuild) will
 help deleting these things:



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2021-06-18 Thread Ulrich Müller
commit: ec24130fc17c4d48574721aeace1493eb25e7dea
Author: Sam James  gentoo  org>
AuthorDate: Sat Apr 10 00:13:22 2021 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Jun 18 06:11:32 2021 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=ec24130f

ebuild-writing/misc-files/patches: modernise patch example

* Drop dates as we now recommend
* Use patch level 1

Signed-off-by: Sam James  gentoo.org>
Signed-off-by: Ulrich Müller  gentoo.org>

 ebuild-writing/misc-files/patches/text.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 7d13588..8d54dfd 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -96,8 +96,8 @@ from the vim patch tarball:
 
 # Detect Gentoo apache files properly. Gentoo bug 83565.
 
 runtime/filetype.vim.orig   2005-03-25 01:44:12.0 +
-+++ runtime/filetype.vim2005-03-25 01:45:15.0 +
+--- a/runtime/filetype.vim
 b/runtime/filetype.vim
 @@ -93,6 +93,9 @@
  " Gentoo apache config file locations (Gentoo bug #76713)
  au BufNewFile,BufRead /etc/apache2/conf/*/* setf apache



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2021-04-07 Thread Ulrich Müller
commit: 0882c4ee932d075beb3f08ead4da97043ffcdcb5
Author: Sam James  gentoo  org>
AuthorDate: Sun Mar 21 04:48:17 2021 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Apr  7 17:28:17 2021 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=0882c4ee

ebuild-writing/misc-files/patches: add reference to ${FILESDIR} in other section

Signed-off-by: Sam James  gentoo.org>
Signed-off-by: Ulrich Müller  gentoo.org>

 ebuild-writing/misc-files/patches/text.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index ea9d607..7d13588 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -30,7 +30,9 @@ mirrored, preferably on the Gentoo Infrastructure. When
 mirroring patches, choosing a name that will not cause conflicts is
 important — the ${P} prefix is highly recommended
 here. Mirrored patches are often compressed with xz or
-bzip2. Remember to list these patches in SRC_URI.
+bzip2. Remember to list these patches in SRC_URI. Please
+see 
+for more information.
 
 
 



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2021-04-07 Thread Ulrich Müller
commit: c7d05225d1a25f8d01e934125953d2990cccabb1
Author: Sam James  gentoo  org>
AuthorDate: Sun Mar 21 02:24:25 2021 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Apr  7 17:28:12 2021 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=c7d05225

ebuild-writing/misc-files/patches: grammatical fix re patch strip level

Signed-off-by: Sam James  gentoo.org>
Signed-off-by: Ulrich Müller  gentoo.org>

 ebuild-writing/misc-files/patches/text.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 91afd33..83d936f 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -38,7 +38,7 @@ Patches included in ${FILESDIR} should never be 
compressed.
 
 
 
-Starting from EAPI=6 a strip patch level was limited to the -p1.
+Starting from EAPI=6, the patch strip level defaults to -p1.
 Although it can be overridden with a eapply -pstrip_level
 command, it is highly recommended to adapt the patch itself to work
 with the -p1 default.



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2021-04-07 Thread Ulrich Müller
commit: 625eed727aff1a87e17e2585b498a650acbce22e
Author: Sam James  gentoo  org>
AuthorDate: Sun Mar 21 02:25:29 2021 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Wed Apr  7 17:28:13 2021 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=625eed72

ebuild-writing/misc-files/patches: slight phrasing tweak re patch source

Signed-off-by: Sam James  gentoo.org>
Signed-off-by: Ulrich Müller  gentoo.org>

 ebuild-writing/misc-files/patches/text.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 83d936f..ea9d607 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -66,8 +66,8 @@ later. Good things to include in comments are:
 What the patch actually does. Bug numbers are good here.
   
   
-Where the patch came from. Is it an upstream VCS pull,
-something from Bugzilla, something you wrote?
+Where the patch came from. For example, is it from an upstream VCS,
+something from Bugzilla, or something you wrote?
   
   
 Whether the patch has been sent upstream, if applicable.



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2021-02-22 Thread Ulrich Müller
commit: 813cdcb601e249093826da01806bad5f81aff3f3
Author: Ulrich Müller  gentoo  org>
AuthorDate: Mon Feb 22 16:50:34 2021 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Feb 22 16:50:34 2021 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=813cdcb6

ebuild-writing/misc-files/patches: Typo

Signed-off-by: Ulrich Müller  gentoo.org>

 ebuild-writing/misc-files/patches/text.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 62b8a04..91afd33 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -40,7 +40,7 @@ Patches included in ${FILESDIR} should never be 
compressed.
 
 Starting from EAPI=6 a strip patch level was limited to the -p1.
 Although it can be overridden with a eapply -pstrip_level
-command, it is higly recommended to adapt the patch itself to work
+command, it is highly recommended to adapt the patch itself to work
 with the -p1 default.
 
 



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2021-02-20 Thread Ulrich Müller
commit: 8ffb4ecb220c9126a9a57ac3d2591a2604cdd438
Author: Ulrich Müller  gentoo  org>
AuthorDate: Tue Feb 16 19:31:37 2021 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Feb 20 07:54:02 2021 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=8ffb4ecb

ebuild-writing/misc-files/patches: Convert to DevBook XML markup

- Start sentences with uppercase letters
- Change some sentences from first-person to third-person
- Less informal/colloquial style
- Modernise the text a little (e.g., eapply instead of epatch)
- Be more in line with GLEP 66 (e.g., "Bug" instead of "Gentoo-Bug-URL")

Closes: https://bugs.gentoo.org/247266
Closes: https://github.com/gentoo/devmanual/pull/192
Signed-off-by: Ulrich Müller  gentoo.org>

 ebuild-writing/misc-files/patches/text.xml | 337 +
 1 file changed, 200 insertions(+), 137 deletions(-)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 21e6ef8..62b8a04 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -114,123 +114,189 @@ from the vim patch tarball:
 Clean Patch Howto
 
 
+
+"Clean patch" does not refer to the patch itself (as in the changes it makes to
+the source code). It refers to all the metadata that exists in the patch to
+make it "maintainable".
+
+
+
+
+
+Why
+
+
+
+This may take more effort "up front", but the amount of effort that it saves
+for everyone else in the future more than makes up for it. This refers to other
+distributions or upstream maintainers who read the patch, or future Gentoo
+maintainers. By keeping all patches "clean", people can quickly and easily
+assess a patch without searching through many other files.
+
+
+
+
+
+
+File Naming
+
+
+
+Your patch name should be short and to the point. When doing a file listing
+(e.g., ls files/), it's a lot easier to be able to scan for relevant
+patches when they have good keywords in their file names.
+
+
+
+It should also include the package name and the version it was written against.
+This way, people searching for patches or who happen to just stumble across the
+file itself have a clue as to what it's for. Stripping out the ${PN}
+(and to a lesser extent, the ${PV}) makes the filename significantly
+less useful. The fact the files are typically stored in
+${CATEGORY}/${PN}/files/ is irrelevant, because the patch may be used
+outside Gentoo.
+
+
+
+
+
+
+How
+
+
+
+Here's a check list of things to keep in the patch header:
+
+
+
+  
+External references
+
+  Upstream mailing archives
+  Upstream bug reports
+  Upstream commit links
+  Upstream ChangeLog entries
+  Gentoo bug reports
+
+  
+  
+Short/medium explanation
+
+  Why is the patch needed?
+  What is it fixing?
+  Why is it fixing it the way it is?
+  Proposal for better fixes in the future?
+  Is it a stop gap measure (workaround)?
+  How was it regression tested?
+  
+Examples of before/after behaviour
+
+  How to reproduce bug without patch
+  How to show bug is fixed after patch
+  
+Maybe upstream fixed it in a different way, so this test can be
+used to show that the patch is no longer needed with newer versions
+  
+
+  
+
+  
+  
+Status
+
+  Was it merged/rejected/postponed/etc. upstream?
+  Is it distribution-specific?
+
+  
+  
+Attribution
+
+  Who found the bug?
+  Who fixed the bug?
+  Who wrote the patch?
+  Who tested the patch?
+  Who gave advice on the patch?
+
+  
+
+
+
+All this information should be in the patch itself. It should never be
+found in something like the ebuild. If you really want to put a comment next
+to a patch in an ebuild, then this is about the only thing that is OK
+(where 93671 is the Gentoo bug number):
+
+
+
+PATCHES=(
+   "${FILESDIR}"/${P}-dont-umask.patch #93671
+)
+
+
+
+When documenting these things, it might be useful to use RFC822/Git-style tags
+to format the metadata. So when documenting the author, use:
+
+
+
+From: Nice Person f...@cow.example.com
+
+
+
+Or when documenting relevant URLs, use something like:
+
+
+
+Bug: https://upstream.example.com/12345
+Bug: https://bugs.gentoo.org/9889
+
+
+
+And if you want to note your copyright signoff, slap on a Signed-off-by tag:
+
+
+
+Signed-off-by: Diligent Developer la...@gentoo.org
+
+
+
+Finally, your patch should be clear of useless cruft. If it was not taken
+straight from an upstream SCM (git format-patch or svn diff -r #
+or cvs diff -r 1.123 -r 1.124), then the metadata is useless. So delete
+it. This refers to things like the diff command used to produce the patch,
+or the timestamps on the files, local revision info, or other similar spam.
+Note that the context info (the stuff that comes after the @@) should
+be left, as that can be invaluable 

[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/, appendices/contributors/

2021-02-20 Thread Ulrich Müller
commit: 6613e9d82f910d77616f15d916ab3d3596f91399
Author: Ulrich Müller  gentoo  org>
AuthorDate: Tue Feb 16 19:27:36 2021 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Feb 20 07:53:57 2021 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=6613e9d8

ebuild-writing/misc-files/patches: Add section about clean patches

Taken from https://dev.gentoo.org/~vapier/clean-patches
(verbatim, except for escaping reserved characters).

Original-Author: Mike Frysinger  gentoo.org>
Bug: https://bugs.gentoo.org/247266
Signed-off-by: Mike Frysinger  gentoo.org>
Signed-off-by: Ulrich Müller  gentoo.org>

 appendices/contributors/text.xml   |   3 +
 ebuild-writing/misc-files/patches/text.xml | 214 +
 2 files changed, 217 insertions(+)

diff --git a/appendices/contributors/text.xml b/appendices/contributors/text.xml
index d822dfa..e80dbcb 100644
--- a/appendices/contributors/text.xml
+++ b/appendices/contributors/text.xml
@@ -122,6 +122,9 @@ Misc
 
   Search functionality
 
+
+  
+
 
 
 

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 87cc328..21e6ef8 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -107,6 +107,220 @@ from the vim patch tarball:
  au BufNewFile,BufRead *.a65setf a65
 
 
+
+
+
+
+Clean Patch Howto
+
+
+
+-
+  CLEAN PATCH HOWTO
+-
+
+when i say "clean patch", i am not referring to the patch itself (as in the
+changes it makes to the source code).  i am referring to all the metadata that
+exists in the patch to make it "maintainable".
+
+---
+  WHY
+---
+
+you might be thinking "wow, this looks like effort".  well you best shut your
+brain hole and do it anyways.  seriously though ...
+
+this may take more effort "up front", but the amount of effort that it saves
+for everyone else in the future more than makes up for it.  i refer to other
+distributions or upstream maintainers that read the patch.  or future Gentoo
+maintainers / developers.  too many hours have i spent staring at a patch
+(whether it be long or tiny) with no documentation and no references as to why
+the changes it is making to a package exist at all.  by keeping all patches
+"clean", people can quickly and easily assess a patch without searching through
+a metric butt ton of other files.
+
+so make your patch clean in the first place and stop screwing others in ways
+they do not enjoy.  stick with the pleasant methods please.
+
+---
+  FILE NAMING
+---
+
+this is quick to do, so let's get it out of the way.  your patch name should be
+short and to the point.  when doing a file listing (e.g. `ls files/`), it's a
+lot easier to be able to scan for relevant patches when they have good keywords
+in their file names.
+
+it should also include the package name and the version it was written against.
+this way people searching for patches or who happen to just stumble across the
+file itself have a clue as to what it's for.  stripping out the $PN (and to a
+lesser extent, the $PV) makes the filename significantly less useful.  the fact
+the files are typically stored in $CATEGORY/$PN/files/ is irrelevant.  we're
+trying to think beyond the Gentoo box here.
+
+it's also more consistent.  consistency matters as minor/pointless deviations
+only serve to slow people down.
+
+---
+  HOW
+---
+
+here's a check list of things to keep in the patch header:
+ - external references
+   - upstream mailing archives
+   - upstream bug reports
+   - upstream commit links
+   - upstream changelog entries
+   - Gentoo bug reports
+ - short / medium explanation
+   - why is the patch needed ?
+   - what is it fixing ?
+   - why is it fixing it the way it is ?
+   - proposal for better fixes in the future ?
+   - is it a stop gap measure (workaround) ?
+   - how was it regression tested ?
+   - examples of before / after behavior
+   - how to reproduce bug w/out patch
+   - how to show bug is fixed after patch
+   - maybe upstream fixed it in a different way, so this test can 
be
+ used to show that the patch is no longer needed w/newer 
versions
+ - status
+   - was it merged/rejected/postponed/etc... upstream ?
+   - is it distribution-specific ?
+ - attribution
+   - who found the bug ?
+   - who fixed the bug ?
+   - who wrote the patch ?
+   - who tested the patch ?
+   - who gave advice on the patch ?
+
+all this information should be *in the patch itself*.  it should never ever be
+found in something like the ebuild.  if you really really want to put a comment
+next to a patch in an ebuild, then this is about the only thing that is OK:
+   epatch "${FILESDIR}"/${P}-fatty-cow.patch #12345
+(where 12345 is the Gentoo bug #)
+
+when 

[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2018-06-22 Thread Ulrich Müller
commit: b50b1ad173ee9ea066231289a5b9f5ee644acfcc
Author: Mikle Kolyada  gentoo  org>
AuthorDate: Fri Jun 15 22:54:15 2018 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Jun 22 18:39:31 2018 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=b50b1ad1

ebuild-writing/../patches: add warning about strip

 ebuild-writing/misc-files/patches/text.xml | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 506871f..fe9f471 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -37,6 +37,13 @@ here. Mirrored patches are often compressed with xz or
 Patches included in ${FILESDIR} should never be compressed.
 
 
+
+Starting from EAPI=6 a strip patch level was limited to the -p1.
+Although it can be overridden with a eapply -pstrip_level
+command, it is higly recommended to adapt the patch itself to work
+with the -p1 default.
+
+
 
 If a package requires many patches, even if they are individually
 small, it is often best to create a patch tarball to avoid cluttering



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2016-06-15 Thread Göktürk Yüksek
commit: 68856e335f66b04722536a899c53459246064174
Author: Göktürk Yüksek  gentoo  org>
AuthorDate: Mon Jun 13 15:52:25 2016 +
Commit: Göktürk Yüksek  gentoo  org>
CommitDate: Thu Jun 16 01:16:13 2016 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=68856e33

ebuild-writing/misc-files/patches: suggest compressing patches with xz

With app-arch/xz-utils being in @system, suggest patches to be
compressed with xz as it achieves higher compression rates than bzip2.

Reported-by: dracwyrm  gmail.com>

 ebuild-writing/misc-files/patches/text.xml | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 4bb8375..f0b1f13 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -24,12 +24,13 @@ number in the patch name as a suffix to the version part 

 
 
 
-Larger patches should be mirrored,
-preferrable on the Gentoo Infrastructure. When mirroring patches, choosing a
-name that will not cause conflicts is important — the ${P}
-prefix is highly recommended here. Mirrored patches are often
-compressed with bzip2. Remember to list these patches in
-SRC_URI.
+Larger patches should be
+
+mirrored, preferably on the Gentoo Infrastructure. When
+mirroring patches, choosing a name that will not cause conflicts is
+important — the ${P} prefix is highly recommended
+here. Mirrored patches are often compressed with xz or
+bzip2. Remember to list these patches in SRC_URI.
 
 
 



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2015-08-21 Thread Justin Lecher
commit: 8fdfbd22b2c3b2863d351ec97322c06cbd29e2ba
Author: Johannes Huber johu AT gentoo DOT org
AuthorDate: Thu Aug 20 09:15:06 2015 +
Commit: Justin Lecher jlec AT gentoo DOT org
CommitDate: Thu Aug 20 09:15:06 2015 +
URL:https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=8fdfbd22

Update patches

Due to git migration.

 ebuild-writing/misc-files/patches/text.xml | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 0be488c..cd85244 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -18,7 +18,7 @@ is conventional. Patches are best named 
c${P}-what-it-does.patch/c (or
 description of what the patch is for. If the patch is to fix a
 specific bug, it is often useful to add in the bug number d/ for
 example, cvim-7.0-cron-vars-79981.patch/c. If the patch is pulled from
-upstream's CVS / SVN repository, it can help to include the revision
+upstream's VCS repository, it can help to include the revision
 number in the patch name as a suffix to the version part d/
 cfluxbox-0.9.12-3860-menu-backups.patch/c.
 /p
@@ -57,7 +57,7 @@ later. Good things to include in comments are:
 What the patch actually does. Bug numbers are good here.
   /li
   li
-Where the patch came from. Is it an upstream CVS/SVN pull,
+Where the patch came from. Is it an upstream VCS pull,
 something from Bugzilla, something you wrote?
   /li
   li
@@ -107,20 +107,16 @@ from the cvim/c patch tarball:
 
 p
 When adding a patch to the tree be sure to check that the patch doesn't have
-CVS keywords in it that will be expanded (such as c$Id$/c).  If the patch
+Git keywords in it that will be expanded (such as c$Id$/c).  If the patch
 contains these, it will break manifests unless you add it to the tree
-correctly.  In the case that it does have the keywords, you should add it by
-doing:
+correctly.  In the case that it does have the keywords, you should remove them.
+Afterwards they can be added like every other file:
 /p
 
 pre
-cvs add -ko files/${P}-the-cool-patch.patch
+git add files/${P}-the-cool-patch.patch
 /pre
 
-p
-c-ko/c disables keyword expansion for that specific file.  If it doesn't
-have keywords in it, then you can add it normally without the extra argument.
-/p
 /body
 /section
 /body



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2014-10-18 Thread Markos Chandras
commit: 1c5e08e0ebc612ce3745ea25ac652ebdd1302565
Author: mudler mudler AT dark-lab DOT net
AuthorDate: Wed Jul 23 11:08:45 2014 +
Commit: Markos Chandras hwoarang AT gentoo DOT org
CommitDate: Wed Jul 23 11:08:45 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=1c5e08e0

fixing a small typo in ebuild-writing/misc-files/patches

---
 ebuild-writing/misc-files/patches/text.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 3704f71..0be488c 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -114,7 +114,7 @@ doing:
 /p
 
 pre
-cvs add -ko files/${P}-the-cool-patch.path
+cvs add -ko files/${P}-the-cool-patch.patch
 /pre
 
 p



[gentoo-commits] proj/devmanual:master commit in: ebuild-writing/misc-files/patches/

2014-07-24 Thread Markos Chandras
commit: 1c5e08e0ebc612ce3745ea25ac652ebdd1302565
Author: mudler mudler AT dark-lab DOT net
AuthorDate: Wed Jul 23 11:08:45 2014 +
Commit: Markos Chandras hwoarang AT gentoo DOT org
CommitDate: Wed Jul 23 11:08:45 2014 +
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=1c5e08e0

fixing a small typo in ebuild-writing/misc-files/patches

---
 ebuild-writing/misc-files/patches/text.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebuild-writing/misc-files/patches/text.xml 
b/ebuild-writing/misc-files/patches/text.xml
index 3704f71..0be488c 100644
--- a/ebuild-writing/misc-files/patches/text.xml
+++ b/ebuild-writing/misc-files/patches/text.xml
@@ -114,7 +114,7 @@ doing:
 /p
 
 pre
-cvs add -ko files/${P}-the-cool-patch.path
+cvs add -ko files/${P}-the-cool-patch.patch
 /pre
 
 p