Problem with patching pjproject for Guix
Hello @sblin ,
I'm trying to update Jami to 20201103.2.b584daa on Guix, but applying "0013-Assign-unique-local-preferences-for-candidates-with-.patch" fails, don't know why. We apply two patches to our pjproject package:
And then all the patches for pjproject-jami:
"0001-rfc6544"
"0002-rfc2466"
"0003-add-tcp-keep-alive"
"0004-multiple_listeners"
"0005-fix_ebusy_turn"
"0006-ignore_ipv6_on_transport_check"
"0007-pj_ice_sess"
"0008-fix_ioqueue_ipv6_sendto"
"0009-add-config-site"
;; Note: The base pjproject is already patched with
;; "0010-fix-pkgconfig".
"0011-fix-tcp-death-detection"
"0012-fix-turn-shutdown-crash"
"0013-Assign-unique-local-preferences-for-candidates-with-"
"0014-Add-new-compile-time-setting-PJ_ICE_ST_USE_TURN_PERM"
"0015-update-local-preference-for-peer-reflexive-candidate"
"0016-use-addrinfo-instead-CFHOST"
This is the error I get:
Hunk #1 succeeded at 1492 (offset 96 lines).
patching file pjnath/src/pjnath/ice_session.c
Hunk #1 succeeded at 1506 (offset 209 lines).
patching file pjnath/src/pjnath/ice_strans.c
Hunk #1 succeeded at 460 (offset 42 lines).
Hunk #2 succeeded at 529 with fuzz 2 (offset 49 lines).
Hunk #3 succeeded at 589 with fuzz 1 (offset 49 lines).
Hunk #4 FAILED at 680.
1 out of 4 hunks FAILED -- saving rejects to file pjnath/src/pjnath/ice_strans.c.rej
command "patch" "--force" "-p1" "-i" "sfl-patches/0013-Assign-unique-local-preferences-for-candidates-with-.patch" failed with status 1
The ./pjnath/src/pjnath/ice_strans.c.rej file:
--- pjnath/src/pjnath/ice_strans.c
+++ pjnath/src/pjnath/ice_strans.c
@@ -680,7 +681,7 @@ static pj_status_t add_stun_and_host(pj_ice_strans *ice_st,
cand->type = PJ_ICE_CAND_TYPE_HOST;
cand->status = PJ_SUCCESS;
- cand->local_pref = HOST_PREF;
+ cand->local_pref = (pj_uint16_t)(HOST_PREF - *cand_cnt);
cand->transport_id = CREATE_TP_ID(TP_STUN, idx);
cand->comp_id = (pj_uint8_t) comp->comp_id;
pj_sockaddr_cp(&cand->addr, addr);
By the way, in the article announcing the "Together" release, there's a typo: "GNU/Jami is an application unlike any other." Should be "GNU Jami is an application unlike any other." because the first one suggests Jami is a kernel :)