Hi,
Today, I will highlights a brand new mechanism in slack-get : how to add your
FTP credentials to the medias.xml confniguration file.
First let's remind how was the ftp authentification mechanism before.
In the old ages, you had to fill a section in the config.xml file. The section
look like that :
<network-parameters>
<ftp>
<login><![CDATA[anonymous]]>
</login>
<password><![CDATA[slack-get@infinityperl.org]]>
</password>
</ftp>
</network-parameters>
This section (in the <common> configuration bloc) is (still) used by the
sg_daemon to authenticate himself on FTP server (this is the global
credentials).
But you may have to provide particular credentials for one ftp server, so I
added the possibility to use the standard URL syntax in the medias.xml
file.
So starting from the svn revision 198, you can use the
ftp://<login>:<password>@<some ftp server>
syntax in your medias.xml file.
The specific credentials, of course, prevails on the globals ones.
On a developper side now, this trick is done by the
Slackware::Slackget::Network::Connection->parse_url() method. This is a
specific case of the ftp so far but I can easily make it available for any
protocols if there is a need to do so.
I plan on testing, in this parse_url() method, the availability of a
__parse_url() method drivers' specific. This could help to develop specific
drivers with specific url format.
I will think about that.
That's all for today ! Enjoy the end of the week end !
Arnaud Dupuis