At about line 1422 of the install.sub the hostname is checked with a ksh
specific pattern:
cat -n install.sub | sed -ne '/?(http/p'
  1422                  ?(http?(s)://)+([A-Za-z0-9:.\[\]_-]))

With sed(1) I added "@" to the pattern
    cat -n install.sub | sed -ne '/?(http/p'
      1422                  ?(http?(s)://)+([@A-Za-z0-9:.\[\]_-]))

And now the the server name validates as OK:

    Location of sets? (disk http nfs or 'done') [http]
    HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none]
    HTTP Server? (hostname, list#, 'done' or '?') [
wodan:[email protected]]
    Server directory? [pub/OpenBSD/7.1/amd64] OpenBSD/7.1/amd64
    Unable to connect using HTTPS; using HTTP instead.

    Select sets by entering a set name, a file name pattern or 'all'.
De-select
    sets by prepending a '-', e.g.: '-game*'. Selected sets are labelled
'[X]'.
        [X] bsd                 [X] man71.tgz           [X] xfont71.tgz
        [X] bsd.rd              [X] game71.tgz          [X] xserv71.tgz
        [X] base71.tgz          [X] xbase71.tgz         [ ] site71.tgz
        [X] comp71.tgz          [X] xshare71.tgz        [X] site71-df-us.tgz
    Set name(s)? (or 'abort' or 'done') [done] -comp* -game* -x* site* done
    Get/Verify SHA256.sig   100% |**************************|  2144
00:00

So with the addition of '@' as well as using an user name and password that
matches the regex pattern it works well.

A happy camper ....


On Wed, Jul 20, 2022 at 6:06 AM Adriaan <[email protected]> wrote:

> I am testing autoinstall for a VPS hosted in a datacenter. By using an
> OpenBSD native VM on my desktop
> I got all my issues with 'install.conf'  and 'install.site' solved.
>
> To provide some access control I created an '.htaccess' file for my
> local httpd server at 192.168.222.242 and
> for my external  webserver xyz.nl
>
> The retrieval of 'install.conf' as well as the autopartitioning
> template are successful:
>
>     Response file location? [http://192.168.222.10/install.conf]
> https://wodan:[email protected]/install.conf
>     Fetching https://wodan:[email protected]/install.conf
>     Performing non-interactive install...
>     Terminal type? [vt220] vt220
>     [snip]
>
>     URL to autopartitioning template for disklabel? [none]
> https://wodan:[email protected]/7.1/amd64/df-us-40gb.txt
>     Fetching https://wodan:[email protected]/7.1/amd64/df-us-40gb.txt
>
> So far so good....
>
> However the installing of the sets fails with a 'not a valid hostname'
>
>     Location of sets? (disk http nfs or 'done') [http] http
>     HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] none
>     HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
> wodan:[email protected]
>     'wodan:[email protected]' is not a valid hostname.
>
> The same error occurs when I want to install the custom site* sets
> from my non-local xyz.nl server
>
>     HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
> wodan:[email protected]
>     'wodan:[email protected]' is not a valid hostname.
>
> So using an username and password for .htaccess control is accepted by
> bsd.rd for the 'install.conf' and
> autopartioning template, while it errors out when dealing with the install
> sets.
>
> The password '=ilovefreya=' has a leading and trailing '='. Tomorrow I
> will eliminate those '='s and see whether that helps.
>
> Adriaan van Roosmalen
>

Reply via email to