Bug 286566 - net/minidlna: fix use of quoted literals following sqlite new string quoting policy
Summary: net/minidlna: fix use of quoted literals following sqlite new string quoting ...
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: Gleb Smirnoff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-04 08:40 UTC by Matthieu Volat
Modified: 2025-05-07 15:26 UTC (History)
0 users

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


Attachments
Fix string literals quoting for sqlite > 3.41.0 (1.16 KB, patch)
2025-05-04 08:40 UTC, Matthieu Volat
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthieu Volat 2025-05-04 08:40:21 UTC
Created attachment 260140 [details]
Fix string literals quoting for sqlite > 3.41.0

Hi,

A few months ago, a new sqlite3 version in ports to forbid to use double-quotes for strings fields, something previously allowed and used in many codebases (https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted for more information).

This also impacts net/minidlna which will work with previously scanned files, but won't add new ones and output sqlite errors in the log file.

I've tracked the error messages and updated the queries to use single-quote for string literals in queries, things are working as far as I use minidlna, see attached patch file. It did not touch any new file in pkg-list-ing, but here's poudriere output:

====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
=>> Checking for staging violations... done

Have a nice day,
Comment 1 Gleb Smirnoff freebsd_committer freebsd_triage 2025-05-07 03:54:45 UTC
Due to very slow response times with upstream I maintain all the patches
in my github fork of minidlna.  Next time please create a pull request there.
Easier for both of us.

I have added your patch to my github branch.  However, I decided to stick
to the charcat() internal function.  Any reason to switch strcatf()?  Can
you please test and confirm that my branch works as intended and once you
confirmed I will update the port:

https://github.com/glebius/minidlna
Comment 2 Matthieu Volat 2025-05-07 07:00:17 UTC
Thanks!

> Due to very slow response times with upstream I maintain all the patches
in my github fork of minidlna.

Sorry, I did not notice the port was not pulling the upstream repositories. I'll do that if I notice other issues.

> Any reason to switch strcatf()?

I forgot to comment on this: in the other occurrences of single-quote concatenation, the source code use strcatf(), not sure why (to avoid escaping?). I just mimicked this for the sake of following the convention.

> Can you please test and confirm that my branch works

Yes, works as expected!
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-05-07 15:26:51 UTC
A commit in branch main references this bug:

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

commit bf79848d181b33bd910b15b1a12990dd67a863c4
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-05-07 15:18:27 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-05-07 15:18:27 +0000

    net/minidlna: fix another place that used double quotes for SQLite

    PR:             286566
    Submitted by:   Matthieu Volat <mazhe alkumuna.eu>

 net/minidlna/Makefile | 4 ++--
 net/minidlna/distinfo | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)