Re: redirection error with file externals - possible bug

2023-04-02 Thread Daniel Sahlberg
I've spent some time today looking at the issue. I've been able to
reproduce it, but my reproduction is not in a shape where I can share it.

Basically I've setup a server where the repository was hosted at
http://localhost/repo, configured an external. Then reconfigured the server
so the repository is at http://localhost/r2 with http://localhost/repo
issuing a http level redirect to /r2.

I'm then able to reproduce the issue.

Den sön 12 mars 2023 kl 22:42 skrev Nathan Hartman :

> On Sat, Mar 11, 2023 at 4:29 PM Daniel Sahlberg <
> daniel.l.sahlb...@gmail.com> wrote:
>
>> Den lör 11 mars 2023 kl 13:06 skrev Pál Kovács <81.kovacs...@gmail.com>:
>>
>>>
>>>
>>> Dear All,
>>>
>>> I'd like to setup http traffic to be redirected to https on our svn
>>> server.
>>> Redirection works all right in most of the cases, except when we have a
>>> file-external with http in the url.
>>> For file-externals, svn export works as expected (in the export log it
>>> is visible that there was a redirection and the file is fetched).
>>> However when trying to checkout a working copy, file-externals are not
>>> downloaded, the log shows errors like this:
>>>
>>> Redirecting to URL '
>>> https://myserver/svn/myrepo/TestFolder/Project2/test.txt':
>>> Fetching external item into 'checkout_target\test.txt':
>>> svn: warning: W200035: sqlite[S19]: NOT NULL constraint failed:
>>> EXTERNALS.def_repos_relpath
>>>
>>
This error occurs in subversion/libsvn_wc/wc_db.c line 3365 (as of
r1908925), where ieb->recorded_repos_relpath is null for a file external.
For a folder external, it contains the folder name.

I didn't check where recorded_repos_relpath came from but I think this is
the logical next step.


> I found a similar bug report for folder-externals, which was fixed in SVN
>>> 1.8.5
>>>
>>> https://issues.apache.org/jira/browse/SVN-4428
>>>
>>
I'm running out of time to check r1525902 (as referenced by this issue) but
maybe this problem was fixed for folders and a similar fix can be applied
also for files.

Kind regards,
Daniel Sahlberg


Re: Test suite fails when run in parallel for i686-linux

2023-04-02 Thread Daniel Sahlberg
Den sön 2 apr. 2023 kl 05:01 skrev Maxim Cournoyer <
maxim.courno...@gmail.com>:
[...]

> The OS is Guix System; I'm currently running the 5.15.103 kernel.  I was
> testing on the staging branch, which has 1.14.2.  Assuming you have Guix
> installed on your GNU/Linux system:
>
> --8<---cut here---start->8---
> wget -O guix-install.sh https://guix-install.sh
> chmod +x guix-insall.sh
> yes | sudo ./guix-install.sh
> # Quit, then reopen your session
> guix pull   # update Guix itself
> --8<---cut here---end--->8---
>
> You should be able to reproduce on a x86_64 system with:
>
> --8<---cut here---start->8---
> guix build --no-substitutes --no-grafts --system=i686-linux subversion
> --8<---cut here---end--->8---
>

Now this is slightly off-topic, but since I'l like to see the reproduction
of this error, I spent the better part of the day waiting for the build to
complete, however run into problems with openssl test 80-test_ssl_new.t.
Any ideas how to get past that one?

Kind regards,
Daniel Sahlberg


Re: redirection error with file externals - possible bug

2023-04-02 Thread Daniel Sahlberg
Den sön 2 apr. 2023 kl 20:08 skrev Daniel Sahlberg <
daniel.l.sahlb...@gmail.com>:

> I've spent some time today looking at the issue. I've been able to
> reproduce it, but my reproduction is not in a shape where I can share it.
>
> Basically I've setup a server where the repository was hosted at
> http://localhost/repo, configured an external. Then reconfigured the
> server so the repository is at http://localhost/r2 with
> http://localhost/repo issuing a http level redirect to /r2.
>
> I'm then able to reproduce the issue.
>
> Den sön 12 mars 2023 kl 22:42 skrev Nathan Hartman <
> hartman.nat...@gmail.com>:
>
>> On Sat, Mar 11, 2023 at 4:29 PM Daniel Sahlberg <
>> daniel.l.sahlb...@gmail.com> wrote:
>>
>>> Den lör 11 mars 2023 kl 13:06 skrev Pál Kovács <81.kovacs...@gmail.com>:
>>>


 Dear All,

 I'd like to setup http traffic to be redirected to https on our svn
 server.
 Redirection works all right in most of the cases, except when we have a
 file-external with http in the url.
 For file-externals, svn export works as expected (in the export log it
 is visible that there was a redirection and the file is fetched).
 However when trying to checkout a working copy, file-externals are not
 downloaded, the log shows errors like this:

 Redirecting to URL '
 https://myserver/svn/myrepo/TestFolder/Project2/test.txt':
 Fetching external item into 'checkout_target\test.txt':
 svn: warning: W200035: sqlite[S19]: NOT NULL constraint failed:
 EXTERNALS.def_repos_relpath

>>>
> This error occurs in subversion/libsvn_wc/wc_db.c line 3365 (as of
> r1908925), where ieb->recorded_repos_relpath is null for a file external.
> For a folder external, it contains the folder name.
>
> I didn't check where recorded_repos_relpath came from but I think this is
> the logical next step.
>
>
>> I found a similar bug report for folder-externals, which was fixed in SVN
 1.8.5

 https://issues.apache.org/jira/browse/SVN-4428

>>>
> I'm running out of time to check r1525902 (as referenced by this issue)
> but maybe this problem was fixed for folders and a similar fix can be
> applied also for files.
>

r1525902 indeed fixed the problem but only for directory externals. The
same fix could be applied for file externals and I've committed a fix as
r1908926.

I will also nominate this fix for backport to 1.14.

Kind regards,
Daniel Sahlberg


Re: Checkout problem via http with file external pointing at redirected URL

2023-04-02 Thread Daniel Sahlberg
Den sön 12 mars 2023 kl 22:46 skrev Nathan Hartman :

> On Tue, Feb 7, 2023 at 9:05 AM Baldauf Christoph
>  wrote:
> >
> > Hi,
> >
> > I think, I encountered a problem with the handling of file externals
> > that point to a redirected URL.
> > It looks to me like this issue is related to
> > https://issues.apache.org/jira/browse/SVN-4428, with the difference,
> > that file externals are involved instead of normal externals.
> > When doing a checkout of a project that contains such file externals,
> > the command line client returns the following error message:
>

[...]


> Thanks for the report.
>
> The issue is confirmed to still exist in 1.14.2: See the mail Pál
> Kovács to users@s.a.o with title "redirection error with file
> externals - possible bug" dated Saturday, March 11, 2023, archived
> https://lists.apache.org/thread/go4r3lflzy7yvq7bt4rnofyc46n59whh (and
> other places).
>
> I have filed this issue as SVN-4911:
> https://issues.apache.org/jira/browse/SVN-4911
>
> Until it is fixed, have you found any kind of workaround that might
> benefit other users?
>
> Thanks,
> Nathan
>

For the benefit of everyone watching this thread I'm cross posting what
I've already written in the other thread:

The issue #4428 was fixed in r1525902 but only for directory externals. The
same fix could be applied for file externals and I've committed a fix as
r1908926.

I will also nominate this fix for backport to 1.14.

Kind regards,
Daniel Sahlberg


Re: redirection error with file externals - possible bug

2023-04-02 Thread Pál Kovács
Hi,

Thank you for your help.
br,
Pal

On Sun, 2 Apr 2023, 22:26 Daniel Sahlberg, 
wrote:

> Den sön 2 apr. 2023 kl 20:08 skrev Daniel Sahlberg <
> daniel.l.sahlb...@gmail.com>:
>
>> I've spent some time today looking at the issue. I've been able to
>> reproduce it, but my reproduction is not in a shape where I can share it.
>>
>> Basically I've setup a server where the repository was hosted at
>> http://localhost/repo, configured an external. Then reconfigured the
>> server so the repository is at http://localhost/r2 with
>> http://localhost/repo issuing a http level redirect to /r2.
>>
>> I'm then able to reproduce the issue.
>>
>> Den sön 12 mars 2023 kl 22:42 skrev Nathan Hartman <
>> hartman.nat...@gmail.com>:
>>
>>> On Sat, Mar 11, 2023 at 4:29 PM Daniel Sahlberg <
>>> daniel.l.sahlb...@gmail.com> wrote:
>>>
 Den lör 11 mars 2023 kl 13:06 skrev Pál Kovács <81.kovacs...@gmail.com
 >:

>
>
> Dear All,
>
> I'd like to setup http traffic to be redirected to https on our svn
> server.
> Redirection works all right in most of the cases, except when we have
> a file-external with http in the url.
> For file-externals, svn export works as expected (in the export log it
> is visible that there was a redirection and the file is fetched).
> However when trying to checkout a working copy, file-externals are not
> downloaded, the log shows errors like this:
>
> Redirecting to URL '
> https://myserver/svn/myrepo/TestFolder/Project2/test.txt':
> Fetching external item into 'checkout_target\test.txt':
> svn: warning: W200035: sqlite[S19]: NOT NULL constraint failed:
> EXTERNALS.def_repos_relpath
>

>> This error occurs in subversion/libsvn_wc/wc_db.c line 3365 (as of
>> r1908925), where ieb->recorded_repos_relpath is null for a file external.
>> For a folder external, it contains the folder name.
>>
>> I didn't check where recorded_repos_relpath came from but I think this is
>> the logical next step.
>>
>>
>>> I found a similar bug report for folder-externals, which was fixed in
> SVN 1.8.5
>
> https://issues.apache.org/jira/browse/SVN-4428
>

>> I'm running out of time to check r1525902 (as referenced by this issue)
>> but maybe this problem was fixed for folders and a similar fix can be
>> applied also for files.
>>
>
> r1525902 indeed fixed the problem but only for directory externals. The
> same fix could be applied for file externals and I've committed a fix as
> r1908926.
>
> I will also nominate this fix for backport to 1.14.
>
> Kind regards,
> Daniel Sahlberg
>