Something like this then? Now the idea i had in my head, was that this
would just be preseeded with apt-setup/local0/netrc  etc. So that for the
next repository, apt-setup/local1/netrc .
Are you suggesting i make this so that people are prompted for the values
if they preseed apt-setup/local/netrc to true, (i've made it a booleon, see
below), or just preseed the values? in which case do i need to use db_input
etc? (for the code).....

Thanks for all your work so far, your teaching me far more than i expected
to learn..
Also, yes password, so need to clear, haven't looked up how yet...(i do
that in the code i'm assuming), also the file /etc/apt/auth.conf is
suggested to be root only read/write so need to set that too.

Template: apt-setup/local/netrc
Type: boolean
Default: false
# :sl3:
#flag:translate!:4
_Description: Use authentication information for the APT server?:
 You chose to use a mirror FTP server that doesn't allow anonymous
 logins but allows authentication with local logins.
 .
 The needed credentials in the syntax described by netrc(5) need to be
supplied.
 In the following example, "<packages.example.org>" is the
 mirror server host name, "<myuser>" is the login to use on this server
 and "<mypass>" is the password for that login:
 .
  machine <packages.example.org> login <myuser> password <mypass>
 .
 This information will be stored in "/etc/apt/auth.conf" on the
 installed machine.

Template: apt-setup/local/netrc/machine
Type: string
_Description: machine for netrc auth.conf
 This supplies the machine hostname as described for apt-setup/local/netrc.
 Please see netrc(5) for details.

Template: apt-setup/local/netrc/username
Type: string
# :sl3:
_Description: username for netrc auth.conf
 This supplies the username as described for apt-setup/local/netrc.
 Please see netrc(5) for details.

Template: apt-setup/local/netrc/password
Type: password
# :sl3:
_Description: username for netrc auth.conf
 This supplies the password as described for apt-setup/local/netrc.
 Please see netrc(5) for details.





On 11 May 2014 07:08, Christian PERRIER <bubu...@debian.org> wrote:

>
> > +Template: apt-setup/local/netrc
> > +Type: string
> > +# :sl3:
> > +_Description: netrc-style entry:
> > + Please enter here your apt host that requires authentication. Please
> use
> > + the format described by man netrc.
> > + .
> > + For instance:
> > +  machine packages.server.org login myuser password mypass
>
> OK, I now better understand what the patch is supposed to do. So let's
> try to cook something.
>
> Template: apt-setup/local/netrc
> Type: string
> # :sl3:
> #flag:translate!:4
> _Description: Authentication information for the APT server:
>  You chose to use a mirror FTP server that doesn't allow anonymous
>  logins but allows authentication with local logins.
>  .
>  Please provide the needed credentials in the syntax described by
>  netrc(5). In the following example, "<packages.example.org>" is the
>  mirror server host name, "<myuser>" is the login to use on this server
>  and "<mypass>" is the password for that login:
>  .
>   machine <packages.example.org> login <myuser> password <mypass>
>  .
>  This information will be stored in "/etc/apt/apt.conf" on the
>  installed machine.
>
> (the "#flag" is described in po-debconf(7) and allows one to specify
> that the 4th string is not translatable (in that case, the example)
>
> By the way, as this contains a password, the patch should make
> provision for the information to not be stored in clear in the debconf
> database, shouldn't it?
>
> A "password" style template would be better but....in such case, the
> entire line won't be shown to users when they type it.
>
> How about prompting three times and then construct the netrc line?
>
> -first prompt about the mirror host name
> -then user information
> -then password
>
>
>

Reply via email to