Bug 269301 - devel/mongo-c-driver: update to 1.23.2
Summary: devel/mongo-c-driver: update to 1.23.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL: https://github.com/mongodb/mongo-c-dr...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-03 08:48 UTC by Krzysztof
Modified: 2023-02-11 18:16 UTC (History)
3 users (show)

See Also:


Attachments
poudriere testport log (958.47 KB, text/plain)
2023-02-03 08:48 UTC, Krzysztof
no flags Details
update patch (107.80 KB, patch)
2023-02-03 08:50 UTC, Krzysztof
ports: maintainer-approval+
Details | Diff
update patch (107.79 KB, patch)
2023-02-04 00:58 UTC, Krzysztof
no flags Details | Diff
update patch (110.56 KB, patch)
2023-02-05 22:16 UTC, Krzysztof
ports: maintainer-approval+
Details | Diff
poudriere testport log (939.13 KB, text/plain)
2023-02-05 22:17 UTC, Krzysztof
no flags Details
update patch (111.80 KB, patch)
2023-02-08 22:07 UTC, Krzysztof
ports: maintainer-approval+
Details | Diff
poudriere testport log (950.95 KB, text/plain)
2023-02-08 22:08 UTC, Krzysztof
no flags Details
regenerated the patch (112.67 KB, patch)
2023-02-09 10:18 UTC, Hiroo Ono
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof 2023-02-03 08:48:15 UTC
Created attachment 239871 [details]
poudriere testport log

There is new version of devel/mongo-c-driver. As mentioned in bug#269293 this should be updated with devel/libbson (libbson is part of mongo-c-driver).

Path was made by Hiroo Ono (thank you for your work). And was tested with poudriere - log from poudriere is attached also.
Comment 1 Krzysztof 2023-02-03 08:50:00 UTC
Created attachment 239872 [details]
update patch

A patch for port update
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2023-02-03 22:52:17 UTC
This dependency does not look good:

+		libbson-1.0.so:devel/libbson.1232 \

Even in bug #269293 the port does not change name.
Comment 3 Krzysztof 2023-02-04 00:58:55 UTC
Created attachment 239893 [details]
update patch

Oooops - I've forgot to remove '.1232' after testing build. This new patch corrects this.
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2023-02-04 11:40:53 UTC
(In reply to Krzysztof from comment #3)
This now fails to patch...

===>  Patching for mongo-c-driver-1.23.2
===>  Applying FreeBSD patches for mongo-c-driver-1.23.2 from /data/fernape_data/FreeBSD-repos/ports/devel/mongo-c-driver/files
File to patch: 

Is the patch in files/ necessary?
Comment 5 Krzysztof 2023-02-04 21:51:31 UTC
(In reply to Fernando Apesteguía from comment #4)
No, it is not nessesary. I've tested new version with different name of directory. It is my mistake that I don't checked this was from previous version.

Do you remove files/ during commit or I should make a new patch?
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2023-02-05 14:35:53 UTC
(In reply to Krzysztof from comment #5)
Removing the patch makes it build int 12.4 amd64 and i386 but fails in 13.1. Please, could you use poudriere to test the patches?

https://docs.freebsd.org/en/books/porters-handbook/testing/
Comment 7 Krzysztof 2023-02-05 22:16:32 UTC
Created attachment 239933 [details]
update patch

New version of patch which was checked and tested with poudriere in 12.4
Comment 8 Krzysztof 2023-02-05 22:17:53 UTC
Created attachment 239934 [details]
poudriere testport log

And poudriere testport log. I have no 13.x bx available - only 12.4. So I'm not able to test new patches with 13.x poudriere
Comment 9 Hiroo Ono 2023-02-07 21:46:17 UTC
(In reply to Fernando Apesteguía from comment #6)
Confirmed the compile error in 13.1R.
The sched.h header file and the sched_getcpu() function appeared in 2021 in head and merged to stable/13 in 2022, but never appeared in stable/12.
https://cgit.freebsd.org/src/log/include/sched.h
https://cgit.freebsd.org/src/log/include/sched.h?h=stable/13
https://cgit.freebsd.org/src/tree/include?h=stable/12

I will talk with the maintainer to cope with this problem. As there seems to be another problem with 12.3R, we should merge our work.
Comment 10 Hiroo Ono 2023-02-07 21:53:32 UTC
(In reply to Hiroo Ono from comment #9)

I am checking the bsd.port.mk and the porter's handbook, but if you know how to exclude or include a patch on certain FreeBSD version, please teach me.
Comment 11 Hiroo Ono 2023-02-07 21:56:36 UTC
(In reply to Hiroo Ono from comment #10)

Sorry, I found the answer.
https://docs.freebsd.org/en/books/porters-handbook/slow-porting/#slow-patch
4.4.4 Patching Conditionally
Comment 12 Krzysztof 2023-02-08 22:07:23 UTC
Created attachment 240006 [details]
update patch

So Hiroo Ono spent some time to fix build of mongo-c-driver on different versions of FreeBSD (12.x, 13.x). I've checked this with poudriere on 12.4 - I have no other jails available. It shold compile with another versions
Comment 13 Krzysztof 2023-02-08 22:08:39 UTC
Created attachment 240007 [details]
poudriere testport log

And poudriere testport log after last changes. Once again: thank you very much Hiroo
Comment 14 Fernando Apesteguía freebsd_committer freebsd_triage 2023-02-08 22:25:28 UTC
I'll try an test tomorrow.

Thanks!
Comment 15 Fernando Apesteguía freebsd_committer freebsd_triage 2023-02-09 09:46:44 UTC
I don't think this is right yet. The Makefile references an extra patch named extra-patch-src_libmongoc_src_mongoc_mongoc-counters-private.h but no such file is added to the port.
Comment 16 Hiroo Ono 2023-02-09 10:18:06 UTC
Created attachment 240022 [details]
regenerated the patch

Sorry, regenerated the patch.
Comment 17 Krzysztof 2023-02-11 12:37:35 UTC
Comment on attachment 240022 [details]
regenerated the patch

I approve just in case...
Comment 18 Fernando Apesteguía freebsd_committer freebsd_triage 2023-02-11 18:16:26 UTC
Committed,

Thanks for your work!
Comment 19 commit-hook freebsd_committer freebsd_triage 2023-02-11 18:16:57 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9c7fb31603bc82a493f9cf70d25e39eed7fd2dfd

commit 9c7fb31603bc82a493f9cf70d25e39eed7fd2dfd
Author:     Hiroo Ono <hiroo.ono+freebsd@gmail.com>
AuthorDate: 2023-02-11 17:24:46 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-02-11 18:11:53 +0000

    devel/mongo-c-driver: update to 1.23.2

    ChangeLog: https://github.com/mongodb/mongo-c-driver/releases/tag/1.23.2

    PR:             269301
    Reported by:    ports@bsdserwis.com
    Reviewed by:    hiroo.ono+freebsd@gmail.com

 devel/mongo-c-driver/Makefile                      |   71 +-
 devel/mongo-c-driver/distinfo                      |    6 +-
 ...ngoc_src_mongoc_mongoc-counters-private.h (new) |   12 +
 .../patch-tests-test-mongoc-topology.c (gone)      |   45 -
 devel/mongo-c-driver/pkg-plist                     | 1511 +++++++++++++++++++-
 5 files changed, 1544 insertions(+), 101 deletions(-)