Re: [Dnsmasq-discuss] v2.88rc2 segmentation fault with config "local=//"
After further tests, `dnsmasq -d --local=//` OK `dnsmasq -d -H file --local=//` Segmentation fault On Fri, 18 Nov 2022 at 02:26, Johnny S. Lee <_...@jsl.io> wrote: > > "local=//" means "Do not forward unqualified names to any upstream > servers", right? > It has not generated any kind of error until I updated to v2.88rc2. > The last build I've been using was built against > d3c21c596ef96027429b11216fcdbf65c9434afa ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] v2.88rc2 segmentation fault with config "local=//"
"local=//" means "Do not forward unqualified names to any upstream servers", right? It has not generated any kind of error until I updated to v2.88rc2. The last build I've been using was built against d3c21c596ef96027429b11216fcdbf65c9434afa ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] v2.88rc1 build errors on BSD
When building on FreeBSD: option.c:970:7: error: use of undeclared identifier 'source_addr' source_addr->in.sin_len = addr->in.sin_len = sizeof(struct sockaddr_in); ^ option.c:970:33: error: use of undeclared identifier 'addr' source_addr->in.sin_len = addr->in.sin_len = sizeof(struct sockaddr_in); ^ option.c:1019:83: error: use of undeclared identifier 'addr' sdetails->addr->in6.sin6_len = sdetails->source_addr->in6.sin6_len = sizeof(addr->in6); ^ 3 errors generated. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] v2.88rc1 build errors on BSD
Adding 'sdetails->' to all three of them seems to fix the errors. On Thu, 17 Nov 2022 at 07:50, Johnny S. Lee <_...@jsl.io> wrote: > > When building on FreeBSD: > > option.c:970:7: error: use of undeclared identifier 'source_addr' > source_addr->in.sin_len = addr->in.sin_len = sizeof(struct sockaddr_in); > ^ > option.c:970:33: error: use of undeclared identifier 'addr' > source_addr->in.sin_len = addr->in.sin_len = sizeof(struct sockaddr_in); > ^ > option.c:1019:83: error: use of undeclared identifier 'addr' > sdetails->addr->in6.sin6_len = > sdetails->source_addr->in6.sin6_len = sizeof(addr->in6); > >^ > 3 errors generated. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Snapshot archives downloaded from gitweb are not versioned properly
How about something like the following? diff --git a/VERSION b/VERSION index 998eb1f..29a22f8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -$Format:%d$ +$Format:%d;%(describe)$ diff --git a/bld/get-version b/bld/get-version index 1f51768..4ba3646 100755 --- a/bld/get-version +++ b/bld/get-version @@ -24,13 +24,19 @@ if which git >/dev/null 2>&1 && \ ([ -d .git ] || grep '^gitdir:' .git >/dev/null 2>&1) && \ git describe >/dev/null 2>&1; then git describe | sed 's/^v//' -elif grep '\$Format:%d\$' $1/VERSION >/dev/null 2>&1; then +elif grep '\$Format:%d;%(describe)\$' $1/VERSION >/dev/null 2>&1; then # unsubstituted VERSION, but no git available. echo UNKNOWN else - vers=`cat $1/VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep ^v[0-9]` + vers=`cut -d';' -f1 $1/VERSION | sed 's/[(), ]/,/ g' | tr ',' '\n' | grep ^v[0-9]` + ret=$? - if [ $? -eq 0 ]; then + if [ ${ret} -ne 0 ]; then + vers=`cut -d';' -f2 $1/VERSION | grep ^v[0-9]` + ret=$? + fi + + if [ ${ret} -eq 0 ]; then echo "${vers}" | sort -k1.2,1.5Vr -k1.6,1.6 -k1.8,1.9Vr -k1.10,1.11Vr | head -n 1 | sed 's/^v//' else cat $1/VERSION This appends ";%(describe)" to the format. The script will try to parse the contents of %d first, then %(describe). This should have minimal impact. On Tue, 13 Sept 2022 at 06:52, Johnny S. Lee <_...@jsl.io> wrote: > > > I'm not clear what the difference between that and %(describe) is. The > > substituted value is used subtly in get-version as part of the > > build-process, so we need to be a little careful about changing things. > > $ git log -10 --format="'%d'" > ' (HEAD -> master, origin/master, origin/HEAD)' > ' (tag: v2.87rc1)' > '' > '' > '' > '' > '' > '' > '' > ' (tag: v2.87test9)' > $ git log -10 --format="'%(describe)'" > 'v2.87rc1-1-gc4b9bc6' > 'v2.87rc1' > 'v2.87test9-7-g04cc2ae' > 'v2.87test9-6-g32588c7' > 'v2.87test9-5-g84a6d07' > 'v2.87test9-4-gd6c69f6' > 'v2.87test9-3-gce37291' > 'v2.87test9-2-g09d741f' > 'v2.87test9-1-g0666ae3' > 'v2.87test9' > > Output of get-version should be the same for tagged commits. > Note that the %(describe) placeholder is rather new. It was added in > Git 2.32 last year. > > > On Mon, 12 Sept 2022 at 23:19, Simon Kelley wrote: > > > > > > The current format is %d, which is > > > > "ref names, like the --decorate option of git-log[1]" > > > > according to git help log. > > > > I'm not clear what the difference between that and %(describe) is. The > > substituted value is used subtly in get-version as part of the > > build-process, so we need to be a little careful about changing things. > > > > When the build runs on a fully-fledged git repo, rather than a tar file > > extracted from one, get-version does run "git describe". This isn't the > > case during the automated build, however. > > > > > > Simon. > > > > > > On 12/09/2022 04:51, Johnny S. Lee via Dnsmasq-discuss wrote: > > > The contents of file VERSION from the tar.gz files of the latest 3 > > > commits: > > > > > > dnsmasq-c4b9bc6/VERSION: (HEAD -> master) > > > dnsmasq-4447d48/VERSION: (tag: v2.87rc1, origin/master, origin/HEAD) > > > dnsmasq-04cc2ae/VERSION: > > > > > > Would it be better adding "%(describe)" to the format in file VERSION? > > > > > > ___ > > > Dnsmasq-discuss mailing list > > > Dnsmasq-discuss@lists.thekelleys.org.uk > > > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss > > > > > > > ___ > > Dnsmasq-discuss mailing list > > Dnsmasq-discuss@lists.thekelleys.org.uk > > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Snapshot archives downloaded from gitweb are not versioned properly
> I'm not clear what the difference between that and %(describe) is. The > substituted value is used subtly in get-version as part of the > build-process, so we need to be a little careful about changing things. $ git log -10 --format="'%d'" ' (HEAD -> master, origin/master, origin/HEAD)' ' (tag: v2.87rc1)' '' '' '' '' '' '' '' ' (tag: v2.87test9)' $ git log -10 --format="'%(describe)'" 'v2.87rc1-1-gc4b9bc6' 'v2.87rc1' 'v2.87test9-7-g04cc2ae' 'v2.87test9-6-g32588c7' 'v2.87test9-5-g84a6d07' 'v2.87test9-4-gd6c69f6' 'v2.87test9-3-gce37291' 'v2.87test9-2-g09d741f' 'v2.87test9-1-g0666ae3' 'v2.87test9' Output of get-version should be the same for tagged commits. Note that the %(describe) placeholder is rather new. It was added in Git 2.32 last year. On Mon, 12 Sept 2022 at 23:19, Simon Kelley wrote: > > > The current format is %d, which is > > "ref names, like the --decorate option of git-log[1]" > > according to git help log. > > I'm not clear what the difference between that and %(describe) is. The > substituted value is used subtly in get-version as part of the > build-process, so we need to be a little careful about changing things. > > When the build runs on a fully-fledged git repo, rather than a tar file > extracted from one, get-version does run "git describe". This isn't the > case during the automated build, however. > > > Simon. > > > On 12/09/2022 04:51, Johnny S. Lee via Dnsmasq-discuss wrote: > > The contents of file VERSION from the tar.gz files of the latest 3 commits: > > > > dnsmasq-c4b9bc6/VERSION: (HEAD -> master) > > dnsmasq-4447d48/VERSION: (tag: v2.87rc1, origin/master, origin/HEAD) > > dnsmasq-04cc2ae/VERSION: > > > > Would it be better adding "%(describe)" to the format in file VERSION? > > > > ___ > > Dnsmasq-discuss mailing list > > Dnsmasq-discuss@lists.thekelleys.org.uk > > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss > > > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Snapshot archives downloaded from gitweb are not versioned properly
> How often is the VERSION file changed? It changes from "(HEAD -> master)" to blank when there is a new commit. Checksum of the archive of the same commit probably changes too. > Is the VERSION file meaningful only at the time of a release and can change > 'drastically' between releases? It's meaningful when the source directory is not a git repo. When building from a git repo, `git describe` is run for getting the version. I would expect snapshot archives to have the same. On Mon, 12 Sept 2022 at 15:22, wrote: > > On Mon, 12 Sep 2022 08:26:14 +0200 > Geert Stappers via Dnsmasq-discuss > wrote: > > > Hello Johnny, > > ( Cc: dnsmasq-discuss@lists.thekelleys.org.uk ) > > > > > > On Mon, Sep 12, 2022 at 11:51:22AM +0800, Johnny S. Lee via Dnsmasq-discuss > > wrote: > > > The contents of file VERSION from the tar.gz files of the latest 3 > > > commits: > > > > > > dnsmasq-c4b9bc6/VERSION: (HEAD -> master) > > > dnsmasq-4447d48/VERSION: (tag: v2.87rc1, origin/master, origin/HEAD) > > > dnsmasq-04cc2ae/VERSION: > > > > I do read "there is something wrong", but I don't get what. > > Hopefully do others understand it. If not, elaborate the inconvenience. > > *I* might expect the displayed version info to contain reasonably consistent > information. How often is the VERSION file changed? Is the VERSION file > meaningful only at the time of a release and can change 'drastically' between > releases? Or should it contain data like "tag: v2.87rc1, origin/master, > origin/HEAD" through the life of rc1 (for example)? > > N > > > > > > > > Would it be better adding "%(describe)" to the format in file VERSION? > > > > I do read that as "I might have a solution for it". > > I tried to understand it and my attempt did bring: > > > > --- a/VERSION > > +++ b/VERSION > > @@ -1 +1 @@ > > -$Format:%d$ > > +$Format:%d %(describe)$ > > > > > > Is that what you are trying to say? > > > > > > > > Groeten > > Geert Stappers > ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Snapshot archives downloaded from gitweb are not versioned properly
Hello Geert, On Mon, 12 Sept 2022 at 14:26, Geert Stappers wrote: > > Hello Johnny, > ( Cc: dnsmasq-discuss@lists.thekelleys.org.uk ) > > > On Mon, Sep 12, 2022 at 11:51:22AM +0800, Johnny S. Lee via Dnsmasq-discuss > wrote: > > The contents of file VERSION from the tar.gz files of the latest 3 commits: > > > > dnsmasq-c4b9bc6/VERSION: (HEAD -> master) > > dnsmasq-4447d48/VERSION: (tag: v2.87rc1, origin/master, origin/HEAD) > > dnsmasq-04cc2ae/VERSION: > > I do read "there is something wrong", but I don't get what. > Hopefully do others understand it. If not, elaborate the inconvenience. > > I mean VERSION files in snapshot archives downloaded from https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=summary are not always filled with meaningful contents, unless the commit is tagged. When you run `dnsmasq --version` using binary built from those archives, it might show '(HEAD -> master)' or blank as the version. > > Would it be better adding "%(describe)" to the format in file VERSION? > > I do read that as "I might have a solution for it". > I tried to understand it and my attempt did bring: > > --- a/VERSION > +++ b/VERSION > @@ -1 +1 @@ > -$Format:%d$ > +$Format:%d %(describe)$ > > > Is that what you are trying to say? > > Right, something like that. bld/get-version should also be updated though. > > Groeten > Geert Stappers > -- > Silence is hard to parse ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Snapshot archives downloaded from gitweb are not versioned properly
The contents of file VERSION from the tar.gz files of the latest 3 commits: dnsmasq-c4b9bc6/VERSION: (HEAD -> master) dnsmasq-4447d48/VERSION: (tag: v2.87rc1, origin/master, origin/HEAD) dnsmasq-04cc2ae/VERSION: Would it be better adding "%(describe)" to the format in file VERSION? ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] v2.87test7 compile error on BSD
The following error occurred when compiling on FreeBSD 13 dhcp.c:461:60: error: incompatible operand types ('in_addr_t' (aka 'unsigned int') and 'struct in_addr') dest.sin_addr.s_addr = (ntohs(mess->flags) & 0x8000) ? INADDR_BROADCAST : mess->yiaddr; ^ Changing the line to the following code if (ntohs(mess->flags) & 0x8000) dest.sin_addr.s_addr = INADDR_BROADCAST; else dest.sin_addr = mess->yiaddr; fixes it, but I'm not sure if that's correct or not. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss