Solved Help with patch(1)

grahamperrin

Son of Beastie

Reaction score: 1,018
Messages: 3,432

patch(1)

Below, how should I respond?

Code:
root@mowa219-gjp4-8570p-freebsd:~ # patch --dry-run -ruN -d /usr/local/poudriere/ports/default/deskutils/recoll < /tmp/229328.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|From 735c3d25476b76e17d778044a30346381ac4b216 Mon Sep 17 00:00:00 2001
|From: "Jose G. Juanino" <jjuanino@…>
|Date: Fri, 5 Nov 2021 19:32:11 +0100
|Subject: [PATCH] deskutils/recoll: Update to 1.31.1
|
|Software release notes:
|
|https://www.lesbonscomptes.com/recoll/pages/release-history.html
|
|Specific changes to this port version:
|
|- Update filters according to new version
|- X11MON option is not longer broken, fixed in Makefile.in patch
|---
| deskutils/recoll/Makefile                     | 13 ++---
| deskutils/recoll/distinfo                     |  6 +--
| deskutils/recoll/files/patch-Makefile.in      | 15 ++++--
| .../recoll/files/patch-utils_fileudi.cpp      |  4 +-
| .../recoll/files/patch-utils_fstreewalk.cpp   |  4 +-
| deskutils/recoll/pkg-plist                    | 48 +++++++++++--------
| 6 files changed, 52 insertions(+), 38 deletions(-)
|
|diff --git a/deskutils/recoll/Makefile b/deskutils/recoll/Makefile
|index 29ab15f43281..dc894ae5d4ae 100644
|--- a/deskutils/recoll/Makefile
|+++ b/deskutils/recoll/Makefile
--------------------------
Patching file Makefile using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 28.
Hunk #3 succeeded at 71.
Hunk #4 succeeded at 79.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/deskutils/recoll/distinfo b/deskutils/recoll/distinfo
|index 3ba03e177c9f..66d624881573 100644
|--- a/deskutils/recoll/distinfo
|+++ b/deskutils/recoll/distinfo
--------------------------
Patching file distinfo using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/deskutils/recoll/files/patch-Makefile.in b/deskutils/recoll/files/patch-Makefile.in
|index 89f52f8ac242..0be98671cc8b 100644
|--- a/deskutils/recoll/files/patch-Makefile.in
|+++ b/deskutils/recoll/files/patch-Makefile.in
--------------------------
File to patch:



Background

FreeBSD bug 259679 – deskutils/recoll: update to 1.31.2 ◀ <https://forums.FreeBSD.org/posts/539952>
 

cmoerz

Active Member

Reaction score: 76
Messages: 167

Is your ports tree up to date? Either portsnap fetch update, svnlite up or git pull - whichever way you keep your ports tree up to date.

That code looks like, you are missing /usr/ports/desktuils/recoll/files/patch-Makefile.in?
 

diizzy

Aspiring Daemon

Reaction score: 210
Messages: 601

fetch "https://bz-attachments.freebsd.org/attachment.cgi?id=229328" && patch -p1 --dry-run -E --posix -d /usr/local/poudriere/ports/default < attachment.cgi\?id=229328
This works as long as all modified files exist (see man page) and doesn't leave .orig files
 
OP
grahamperrin

grahamperrin

Son of Beastie

Reaction score: 1,018
Messages: 3,432

Is your ports tree up to date?

Yes.

poudriere ports -u

… looks like, you are missing /usr/ports/desktuils/recoll/files/patch-Makefile.in?

It's present, in the tree that's used by poudriere-devel:

Code:
% file /usr/local/poudriere/ports/default/deskutils/recoll/files/patch-Makefile.in
/usr/local/poudriere/ports/default/deskutils/recoll/files/patch-Makefile.in: unified diff output, ASCII text
%

fetch "https://bz-attachments.freebsd.org/attachment.cgi?id=229328" && patch -p1 --dry-run -E --posix -d /usr/local/poudriere/ports/default < attachment.cgi\?id=229328

Now I see, I specified the wrong path. Too deep.

Corrected:

patch --dry-run -ruN -d /usr/local/poudriere/ports/default < /tmp/229328.patch
 

Zirias

Son of Beastie

Reaction score: 1,768
Messages: 3,005

This is btw a patch in git format-patch format. Although it's compatible with classic "unified diff", it's much easier to apply with git am (you'll get the original commit on the branch you're doing it on).
 
Top