Package: gopher
Version: 3.0.11
Severity: important
Tags: patch
Hi,
your package failed to autobuild:
Automatic build of gopher_3.0.11 on beethoven by sbuild/hurd-i386 69
Build started at 20051207-1916
******************************************************************************
[...]
Checking correctness of source dependencies...
Toolchain package versions: libc0.3-dev_2.3.5-6 gcc-4.0_4.0.2-4 g++-4.0_4.0.2-4 binutils_2.16.1-2 libstdc++6-4.0-dev_4.0.2-4 libstdc++6_4.0.2-4
------------------------------------------------------------------------------
dpkg-source: extracting gopher in gopher-3.0.11
dpkg-source: unpacking gopher_3.0.11.tar.gz
dpkg-buildpackage: source package is gopher
dpkg-buildpackage: source version is 3.0.11
dpkg-buildpackage: host architecture hurd-i386
[...]
gcc -g -O2 -Wall -I.. -I.. -I../object -DNOBANNER -DCTRLCPROMPTS -DCONTROLX -DGOPHERLIB=\"//etc/gopher\" -DGOPHERHELP=\"//etc/gopher/gopher.hlp\" -DGLOBALRC=\"//etc/gopher/gopher.rc\" -DREMOTERC=\"//etc/gopher/gopherremote.rc\" -c download.c
download.c: In function 'Download_file':
download.c:202: error: 'MAXPATHLEN' undeclared (first use in this function)
download.c:202: error: (Each undeclared identifier is reported only once
download.c:202: error: for each function it appears in.)
download.c:235: warning: null argument where non-null required (argument 2)
download.c:235: warning: null argument where non-null required (argument 2)
download.c:237: warning: null argument where non-null required (argument 2)
download.c:237: warning: null argument where non-null required (argument 2)
download.c: In function 'BuiltinDownload':
download.c:368: error: 'MAXPATHLEN' undeclared (first use in this function)
make[2]: *** [download.o] Error 1
make[2]: Leaving directory `/build/buildd/gopher-3.0.11/gopher'
make[1]: *** [gopher/gopher] Error 2
make[1]: Leaving directory `/build/buildd/gopher-3.0.11'
make: *** [build-stamp] Error 2
******************************************************************************
Build finished at 20051207-1919
FAILED [dpkg-buildpackage died]
MAXPATHLEN is not defined on the GNU system, as there is no maximum path
lenght. The attached patch by Ben Asselstine fixes this. As gopher is
a Debian native package, can I assume that you are upstream as well, so
no further notification is needed?
thanks,
Michael
Source: gopher
Source-Version: 3.0.12
We believe that the bug you reported is fixed in the latest version of
gopher, which is due to be installed in the Debian FTP archive:
gopher_3.0.12.dsc
to pool/main/g/gopher/gopher_3.0.12.dsc
gopher_3.0.12.tar.gz
to pool/main/g/gopher/gopher_3.0.12.tar.gz
gopher_3.0.12_i386.deb
to pool/main/g/gopher/gopher_3.0.12_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
John Goerzen <[email protected]> (supplier of updated gopher package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Tue, 9 May 2006 10:37:49 -0500
Source: gopher
Binary: gopher
Architecture: source i386
Version: 3.0.12
Distribution: unstable
Urgency: low
Maintainer: John Goerzen <[email protected]>
Changed-By: John Goerzen <[email protected]>
Description:
gopher - Distributed Hypertext Client, Gopher protocol
Closes: 346447
Changes:
gopher (3.0.12) unstable; urgency=low
.
* Applied patch to make it build for Hurd. Closes: #346447.
Files:
5f5431867c05b373adebbc4b06019c24 520 net optional gopher_3.0.12.dsc
5d836af6de25f35d4707c68436ed2ed3 318311 net optional gopher_3.0.12.tar.gz
34a2041f292c501ade42c48734f619fe 122568 net optional gopher_3.0.12_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
iD8DBQFEYLfT3PeFtIodmh8RAiv0AJ0R4VRZSSX0RPZDaWDmtI9ayuA4PACgqYuH
sogJ1w5t2iwE9mH9iItHAuc=
=zQmx
-----END PGP SIGNATURE-----
Subject: Re: gopher: FTBFS on hurd-i386: Unconditional use of system limit macros
Date: Mon, 15 Jan 2007 14:12:24 +0100
Hi,
3.0.13 seems to have reverted parts of the Hurd patch we provided
earlier; gopher/download.c now again first checks for HAVE_GETCWD and
then HAVE_GET_CURRENT_DIR_NAME around lines 250 and 400. As the former
is (i) defined on the Hurd but (ii) uses the undefined MAXPATHLEN macro,
it FTBFS again:
gcc -g -O2 -Wall -I.. -I.. -I../object -DNOBANNER -DCTRLCPROMPTS
-DCONTROLX -DGOPHERLIB=\"//etc/gopher\"
-DGOPHERHELP=\"//etc/gopher/gopher.hlp\"
-DGLOBALRC=\"//etc/gopher/gopher.rc\"
-DREMOTERC=\"//etc/gopher/gopherremote.rc\" -c download.c
download.c: In function 'Download_file':
download.c:235: warning: null argument where non-null required (argument
2)
download.c:235: warning: null argument where non-null required (argument
2)
download.c:237: warning: null argument where non-null required (argument
2)
download.c:237: warning: null argument where non-null required (argument
2)
download.c:259: error: 'MAXPATHLEN' undeclared (first use in this
function)
download.c:259: error: (Each undeclared identifier is reported only once
download.c:259: error: for each function it appears in.)
download.c: In function 'BuiltinDownload':
download.c:405: error: 'MAXPATHLEN' undeclared (first use in this
function)
make[2]: *** [download.o] Error 1
Did you revert this by accident, or were there issues with the patch you
fixed? We can send a new patch if you need, or just apply the reverted
hunks from the original patch in this bug report.
thanks,
Michael
Acknowledgement sent
to John Goerzen <[email protected]>:
Extra info received and forwarded to list.
(Thu, 12 Nov 2015 18:27:04 GMT) (full text, mbox, link).
Hello,
I believe that the original patch caused #366560. Perhaps the fix for
#366560 broke this; could you send a new patch atop the current version?
Thanks,
John
Acknowledgement sent
to Andreas Beckmann <[email protected]>:
Extra info received and forwarded to list. Copy sent to John Goerzen <[email protected]>.
(Sat, 09 Jul 2016 17:09:04 GMT) (full text, mbox, link).
control: found -1 3.0.16
On Sun, 29 May 2016 21:18:21 -0500 John Goerzen <[email protected]>
wrote:
> I believe this is no longer relevant due to the newer patch.
gopher does still FTBFS on the HURD.
Andreas
Acknowledgement sent
to "Super Diet" <[email protected]>:
Extra info received and forwarded to list. Copy sent to John Goerzen <[email protected]>.
(Tue, 02 May 2017 05:03:03 GMT) (full text, mbox, link).
X-Debbugs-Cc: [email protected]
Dear Maintainer,
Would you consider the attached patch aiming to address the long standing FTBS
on the Hurd, and allow Hurd users to explore gopher space?
Best regards,
João
Acknowledgement sent
to John Goerzen <[email protected]>:
Extra info received and forwarded to list.
(Fri, 11 Apr 2025 03:27:01 GMT) (full text, mbox, link).
Hi João,
Thank you for sending this patch! I don't believe it's correct,
however.
On line 202, curcwd is malloced. Overwriting it prevents freeing it
later, so this creates a memory leak.
I suspect the later instance also has that issue.
How exactly is getcwd() defined and used on Hurd?
Thanks,
John
On Thu, Apr 10 2025, João Pedro Malhado wrote:
> X-Debbugs-Cc: [email protected]
>
> Dear Maintainer,
>
> Would you consider the attached patch aiming to address the long standing FTBS
> on the Hurd, and allow Hurd users to explore gopher space?
>
> Best regards,
> João
>
> [2. text/x-diff; gopher-3.0.17.4-hurd.patch]...
Acknowledgement sent
to João Pedro Malhado <[email protected]>:
Extra info received and forwarded to list. Copy sent to John Goerzen <[email protected]>.
(Wed, 16 Apr 2025 12:09:02 GMT) (full text, mbox, link).
Hello John,
Thank you for having a look at the patch.
I apologise as the patch is indeed a bit rushed.
On Thu, Apr 10, 2025 at 10:15:02PM -0500, John Goerzen wrote:
> Thank you for sending this patch! I don't believe it's correct,
> however.
>
> On line 202, curcwd is malloced. Overwriting it prevents freeing it
> later, so this creates a memory leak.
>
> I suspect the later instance also has that issue.
I see what you mean. Instead of allocating the memory on line 202, would it not
be possible to dynamically allocate with getcwd(NULL, 0) when that function is
available?
Is there any case that would not be covered by this?
> How exactly is getcwd() defined and used on Hurd?
My understanding is that on Hurd getcwd() is just defined in glibc. Looking at
the comment in
https://sources.debian.org/src/glibc/2.41-7/io/getcwd.c/?hl=39#L25
Many thanks,
João
Acknowledgement sent
to John Goerzen <[email protected]>:
Extra info received and forwarded to list.
(Wed, 16 Apr 2025 12:42:02 GMT) (full text, mbox, link).
On Wed, Apr 16 2025, João Pedro Malhado wrote:
> Hello John,
>
> Thank you for having a look at the patch.
> I apologise as the patch is indeed a bit rushed.
>
> On Thu, Apr 10, 2025 at 10:15:02PM -0500, John Goerzen wrote:
>> Thank you for sending this patch! I don't believe it's correct,
>> however.
>>
>> On line 202, curcwd is malloced. Overwriting it prevents freeing it
>> later, so this creates a memory leak.
>>
>> I suspect the later instance also has that issue.
>
> I see what you mean. Instead of allocating the memory on line 202, would it not
> be possible to dynamically allocate with getcwd(NULL, 0) when that function is
> available?
> Is there any case that would not be covered by this?
I think that would work fine on Linux and Hurd. That behavior, however,
isn't POSIX so wouldn't be portable. Can you clarify what the problem
with getcwd() as written is on Hurd? From the description in glibc, it
sounds like the behavior is the same as on Linux.
- John
>
>
>> How exactly is getcwd() defined and used on Hurd?
>
> My understanding is that on Hurd getcwd() is just defined in glibc. Looking at
> the comment in
> https://sources.debian.org/src/glibc/2.41-7/io/getcwd.c/?hl=39#L25
>
> Many thanks,
> João
Acknowledgement sent
to João Pedro Malhado <[email protected]>:
Extra info received and forwarded to list. Copy sent to John Goerzen <[email protected]>.
(Wed, 16 Apr 2025 13:15:03 GMT) (full text, mbox, link).
Hello John,
On Wed, Apr 16, 2025 at 07:32:22AM -0500, John Goerzen wrote:
> I think that would work fine on Linux and Hurd. That behavior, however,
> isn't POSIX so wouldn't be portable. Can you clarify what the problem
> with getcwd() as written is on Hurd? From the description in glibc, it
> sounds like the behavior is the same as on Linux.
The issue is that MAXPATHLEN is not defined on Hurd. For reference:
https://darnassus.sceen.net/~hurd-web/faq/foo_max/
It is interesting that you mention POSIX compliance, as I have seen
contradictory information about this. The above linked page states that
getcwd(NULL, 0) is part of POSIX 2008.
Best regards,
João
Acknowledgement sent
to John Goerzen <[email protected]>:
Extra info received and forwarded to list.
(Sun, 20 Apr 2025 04:24:01 GMT) (full text, mbox, link).
On Wed, Apr 16 2025, João Pedro Malhado wrote:
> Hello John,
>
> On Wed, Apr 16, 2025 at 07:32:22AM -0500, John Goerzen wrote:
>> I think that would work fine on Linux and Hurd. That behavior, however,
>> isn't POSIX so wouldn't be portable. Can you clarify what the problem
>> with getcwd() as written is on Hurd? From the description in glibc, it
>> sounds like the behavior is the same as on Linux.
>
> The issue is that MAXPATHLEN is not defined on Hurd. For reference:
> https://darnassus.sceen.net/~hurd-web/faq/foo_max/
>
> It is interesting that you mention POSIX compliance, as I have seen
> contradictory information about this. The above linked page states that
> getcwd(NULL, 0) is part of POSIX 2008.
Hi,
Every reference I have seen says it's not part of POSIX. However, Linux
and the BSDs seem to support it, so might as well just assume it will
work. If you have a patch to just go that direction, I'll take it.
- John
Acknowledgement sent
to João Pedro Malhado <[email protected]>:
Extra info received and forwarded to list. Copy sent to John Goerzen <[email protected]>.
(Sun, 20 Apr 2025 21:33:02 GMT) (full text, mbox, link).
Hello John,
On Sat, Apr 19, 2025 at 11:20:11PM -0500, John Goerzen wrote:
> Every reference I have seen says it's not part of POSIX. However, Linux
> and the BSDs seem to support it, so might as well just assume it will
> work. If you have a patch to just go that direction, I'll take it.
Ok, I can send a patch. However I am puzzled by the current code and wanted to
ask you.
Is there not a problem in the case
#if !defined(HAVE_GETCWD) && !defined(HAVE_GET_CURRENT_DIR_NAME)
where getwd(curcwd) would be used but curcwd has not been allocated?
And in the case
#if !defined(HAVE_GETCWD) && defined(HAVE_GET_CURRENT_DIR_NAME)
and get_current_dir_name() is used, but the free(curcwd) is not called
in line 347.
Is this not a memory leak?
Best regards,
João
X-Debbugs-Cc: [email protected]
Hello John,
On Sat, Apr 19, 2025 at 11:20:11PM -0500, John Goerzen wrote:
> Every reference I have seen says it's not part of POSIX. However, Linux
> and the BSDs seem to support it, so might as well just assume it will
> work. If you have a patch to just go that direction, I'll take it.
Please see attached my second attempt at patching gopher.
Best regards,
João
Source: gopher
Source-Version: 3.0.18
Done: John Goerzen <[email protected]>
We believe that the bug you reported is fixed in the latest version of
gopher, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
John Goerzen <[email protected]> (supplier of updated gopher package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Thu, 24 Apr 2025 17:32:53 -0500
Source: gopher
Architecture: source
Version: 3.0.18
Distribution: unstable
Urgency: medium
Maintainer: John Goerzen <[email protected]>
Changed-By: John Goerzen <[email protected]>
Closes: 346447
Changes:
gopher (3.0.18) unstable; urgency=medium
.
* Apply Hurd compatibility patch from João Pedro Malhado.
Closes: #346447.
* Added Vcs lines to debian/control.
* Updated homepage in debian/copyright.
Checksums-Sha1:
54b579264ba9b7f3887a7f02ab975d08afdc5161 1516 gopher_3.0.18.dsc
0d5a2449ed0d30fa186ca90ea0b476315f71c15f 241464 gopher_3.0.18.tar.xz
7cd59b6499b76bb6e6e3ed56827b041cd7e84186 6820 gopher_3.0.18_source.buildinfo
Checksums-Sha256:
14046b2ccbda78805fa21fcbbfc69075883a855556498667ce967aa9226385c1 1516 gopher_3.0.18.dsc
b1cc8e6da3dea9ae331e577531234c1aadfd330d29f7aa302ffbd76c0ddd8dfd 241464 gopher_3.0.18.tar.xz
b332e17656be3e50925b28667a794cba5bae33689f76705ca8f45e7cfb49a3af 6820 gopher_3.0.18_source.buildinfo
Files:
e2b32f7434dc6eb1a58746291f1c1ba3 1516 net optional gopher_3.0.18.dsc
8704ce38cc44af0b8ba9f0a226ac1082 241464 net optional gopher_3.0.18.tar.xz
9dbc92f38eb79e105922d208e63d3537 6820 net optional gopher_3.0.18_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEJ217d7abdWx8toZp3Sn4hEKDntMFAmgKvTkACgkQ3Sn4hEKD
ntOrAQ//eWnm6c6uDwEeSiFKPLH61F/RuC30umVBVPkE6ORD7wvjFEGipN2/shBg
+lN11SQ7QrvcG2xDPee1GDku/xr2+uHVFpgwt945vAXyLBbrq1ep0z6RSxiOPxsV
mGmUKvVwzVuhwbzNGOJqc4J5b6nw9APz7qtj1XFRwhtpXrf2SyGzPnBgQ/yskdwO
ZS9WG3mJnphq1RBQgjisLTZUeyF60bdtRNwtqRaOUSf7qBW9Yf3+Yaam7ghgqc93
t9PQD9tppGYiGpTXOPe94yoFX5oOsNwQefIfj7SZ47hXtUVQtCW30OhOnIOWgs9O
fb+GHQKTJvxSCe2AngbWbp079SGSglkQ8yqgHyR3y+gmYBNCtPgbifVeBkQj5uDQ
831QqnL55qLYJfVlGE7n/4V0g4SQNGZoMXrXaUrecls7mSviQcn2ES5FPL99Ixwi
uA+GO2ECFucHEtkrMD+lKqAUmD9i2jnueBsKCY/E2RNdgqJn289xpmYdFxmnlYaG
BAjSRw6xAnea0lTcpf9J9icdaeaLUWffgKCs4ioAU0XzMsXVizX/vXi2iAUlW+VG
kU6UEJxutRuKuSUtznNsSKVXlV2/yIsdnVlqHuCJRdIPqoqszeSVgeQ0Q8MwEXmO
lIo16dT8ENWs1CdtRUeivmHL42l4NtO/4Iljk+VsbzAXhBw1il0=
=qDU5
-----END PGP SIGNATURE-----
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.