Bug 277812 - textproc/libucl: Patch for a regression introduced in 0.9.0
Summary: textproc/libucl: Patch for a regression introduced in 0.9.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-19 17:44 UTC by crest
Modified: 2024-03-19 19:29 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bofh)


Attachments
Fix for the JSON and YAML emitter (699 bytes, patch)
2024-03-19 17:44 UTC, crest
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description crest 2024-03-19 17:44:17 UTC
Created attachment 249308 [details]
Fix for the JSON and YAML emitter

The attached patch fixes a regression in libucl 0.9.0 for which no upstream fix has been released yet. It restores the ability to emit valid JSON and YAML output rather than the invalid output seen in #277666 (incorrectly blamed at uclcmd instead of libucl).
Comment 1 crest 2024-03-19 17:46:16 UTC
Here is an equivalent upstream commit fixing the issue (not yet part of a tagged release): https://github.com/vstakhov/libucl/commit/da7aacb3d46fbc206ec6f2431f503eed843a3039
Comment 2 crest 2024-03-19 17:46:24 UTC
Here is an equivalent upstream commit fixing the issue (not yet part of a tagged release): https://github.com/vstakhov/libucl/commit/da7aacb3d46fbc206ec6f2431f503eed843a3039
Comment 3 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2024-03-19 19:20:46 UTC
I am fixing this but this is not the way of submitting patches in the ports tree. For future references use `make makepatch` in the tree and submit a git diff of the ports tree itself. As an example for this case this would have been something like this:
# cd /usr/ports/textproc/libucl
# make patch
# cp work/libucl-0.9.0/src/ucl_emitter.c{,.orig}
# edit work/libucl-0.9.0/src/ucl_emitter.c
# make makepatch
# git add .
# git commit
# git format-patch -1 HEAD

However when there are upstream patches this is also not required at all.
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-03-19 19:28:20 UTC
A commit in branch main references this bug:

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

commit c75ee5343b9fbe38dd8aeea90a3cf3c9f9801a91
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2024-03-19 19:26:19 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2024-03-19 19:26:19 +0000

    textproc/libucl: Fix non streamlined json emitter

    See for more information:
    https://github.com/vstakhov/libucl/commit/da7aacb3d46fbc206ec6f2431f503eed843a3039

    PR:             277812
    Reported by:    crest@rlwinm.de

 textproc/libucl/Makefile | 16 ++++++++--------
 textproc/libucl/distinfo |  4 +++-
 2 files changed, 11 insertions(+), 9 deletions(-)