non port: Mk/Scripts/smart_makepatch.sh |
Number of commits found: 17 |
Wednesday, 14 Jul 2021
|
16:15 Po-Chuan Hsieh (sunpoet)
Mk/Scripts/smart_makepatch.sh: Force diff to produce the patch file instead of
"Binary files ... differ" message
It helps avoid generating wrong patches, e.g. patch-grpc.gemspec in r567838 [1].
from diff manpage:
-a --text
Treat all files as ASCII text. Normally diff will simply print
"Binary files ... differ" if files contain binary characters.
Use of this option forces diff to produce a diff.
[1]
https://cgit.FreeBSD.org/ports/diff/net/rubygem-grpc130/files/patch-grpc.gemspec?id=073c1c710a0c7254820adab9920c1903ace83fae
PR: 257027
Approved by: mat (portmgr)
fcb34fa |
Tuesday, 6 Apr 2021
|
14:27 Mathieu Arnold (mat)
framework: Remove $FreeBSD$
Where appropriate fiddle with a few other things.
5d33e04 |
Wednesday, 11 Nov 2020
|
13:29 mat
Add set pipefail in most framework scripts.
set pipefail changes the pipeline return status from being the return
status of the last command to the last non 0 exit status of any command
in the pipeline. This is needed to make sure all the commands in a
pipeline did actually return a non 0 status and not only the last one.
PR: 250723
Exp-run by: antoine
Reviewed by: bapt
Approved by: bapt
Differential Revision: https://reviews.freebsd.org/D27007
|
Thursday, 5 Nov 2020
|
16:51 mat
Backout r554139.
|
16:42 mat
Add set pipefail in most framework scripts.
set pipefail changes the pipeline return status from being the return
status of the last command to the last non 0 exit status of any command
in the pipeline. This is needed to make sure all the commands in a
pipeline did actually return a non 0 status and not only the last one.
|
Thursday, 23 Jan 2020
|
08:55 mat
Unbreak make makepatch.
The glob in `find ./*` is handled by the shell and actually sorts the
files, so one needs to to ask find to sort the result, using `find -s`.
`find ./* -maxdepth 0` is not equivalent to `find . -maxdepth 0`, the
depth increases by one as `./x` is on level deeper than `.`.
Pointy hat: bdrewery
|
Tuesday, 21 Jan 2020
|
20:36 bdrewery
find(1) doesn't need a glob to search for patches.
This change also avoids cmdline length errors and other subst
parsing issues that were previously targeted.
Sponsored by: DellEMC
|
Monday, 20 May 2019
|
13:04 mat
Have makepatch ignore "C function prototype".
This will reduce the churn when base system diff subtly changes what is
put in that field.
|
Friday, 8 Jun 2018
|
09:26 mat
SC1004: This backslash+linefeed is literal. Break outside single quotes if you
just want to break the line.
You have a single quoted string containing a backslash followed by a
linefeed (newline). Unlike double quotes or unquoted strings, this has
no special meaning. The string will contain a literal backslash and a
linefeed.
If you wanted to break the line but not add a linefeed to the string,
stop the single quote, break the line, and reopen it.
PR: 227109
Submitted by: mat
Sponsored by: Absolight
|
09:26 mat
SC2035: Use ./*glob* or -- *glob* so names with dashes won't become options.
Since files and arguments are strings passed the same way, programs
can't properly determine which is which, and rely on dashes to determine
what's what.
A file named -f (touch -- -f) will not be deleted by the problematic
code. It will instead be interpreted as a command line option, and rm
will even report success.
Using ./* will instead cause the glob to be expanded into ./-f, which no
program will treat as an option.
It is not possible to use `-f *` because -f only forces the next
argument to be a directory, a later directory named -delete would mess
things up.
PR: 227109
Submitted by: mat
Sponsored by: Absolight
|
09:26 mat
SC2046: Quote this to prevent word splitting.
When command expansions are unquoted, word splitting and globbing will
occur. This often manifests itself by breaking when filenames contain
spaces.
Trying to fix it by adding quotes or escapes to the data will not work.
Instead, quote the command substitution itself.
If the command substitution outputs multiple pieces of data, use a loop
instead.
Add an exception when using set -- where splitting is intended.
PR: 227109
Submitted by: mat
Exp-run by: antoine
Sponsored by: Absolight
|
Friday, 1 Jun 2018
|
16:20 mat
SC2155: Declare and assign separately to avoid masking return values.
In the original code, the return value of mycmd is ignored, and export
will instead always return true. This may prevent conditionals, set -e
and traps from working correctly.
PR: 227109
Submitted by: mat
Sponsored by: Absolight
|
Monday, 22 Jan 2018
|
16:42 kevans
`make makepatch`: Don't replace patches with only metadata changes
Rather than replacing patches that are effectively the same but with
different timestamps, drop the new version and let the old version remain in
place. This yields a `make makepatch` that doesn't try and produce unwanted
churn.
Approved by: portmgr (mat)
Differential Revision: https://reviews.freebsd.org/D13960
|
Friday, 20 May 2016
|
19:01 mat
Ease debugging of Mk/Scripts scripts.
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D6474
|
Thursday, 21 Jan 2016
|
10:25 rakuco
smart_makepatch: Quote PATCH_WRKSRC when regenerating patches.
Put ${PATCH_WRSKRC} within quotes so that expanding it works properly when it
contains spaces. This is required for `make makepatch' to work with
audio/quimup or any other port that has WRKSRC with spaces. Before the patch:
% make -dl makepatch
cd: too many arguments
cd: too many arguments
and the port would be left with an empty files/ directory.
Reviewed by: marino
Approved by: portmgr (mat)
Differential Revision: https://reviews.freebsd.org/D5011
|
Sunday, 22 Nov 2015
|
09:18 marino
Mk/Scripts/smart_makepatch.sh: Fix multi-patch file and locals bug
There were two issues with the new smart_makepatch script.
1) use of "local" declaration
All function variables were declared "local" during the review. This
caused the script to break, at least on FreeBSD 9.2. Given that it's
not being seen on 9.3R or later, it might be a bug in Bourne shell that
has since been fixed.
e.g. This resulted in stderr error on second iteration:
local contains=$(grep "^+++ " ${existing_patch} | awk '{x++; print x}')
however, this works fine:
local contains
contains=$(grep "^+++ " ${existing_patch} | awk '{x++; print x}')
To be safe, all local variables are assigned with $(<shell cmd>) on
separate lines now.
2) The comment extraction was flawed for files that contain multiple
patches. It was not counting the hunk lines properly which caused some
portion of a patch to be considered as a comment for the next patch. The
hunk traversal algorithm has been fixed.
Since 1) involved the introduction of local declarations that broke the
script and since only Scripts/smart_makepatch.sh is touched, I will
piggy-back on the original approval. The fix was tested with devel/nspr,
the port listed in the PR, which uses multi-patch files.
Approved by: portmgr
Differential Revision: D4136
PR: 204725
|
Sunday, 15 Nov 2015
|
15:25 marino
Enhance "make makepatch" to address two major deficiencies
This update to the "makepatch" target adds the following enhancements:
1) Conserves comments
If the existing patch has comments, they will be transferred to the
regenerated patch.
2) Supports multiple patches per file
If the patch file contains concatenated patches, the makepatch
target will keep these patches together. It may change the order
of the patches the first time, but every time after the multi-patch
will be assembled in the same order.
Behavioral changes: (Only the first 15 lines of the commit message are shown above )
|
Number of commits found: 17 |