tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fetching an https: URL


On Wed, 27 Oct 2010 23:41:39 +0900, Hauke Fath 
<> wrote:

teaching a pkg to fetch a distfile from an SSL web server, I get the
impression that nobody @ pkgsrc has done this before...

I have a plan, but not doing yet because my packages have only http and ftp

1) define supported protocols for tech fetch command
FETCH_SUPPORTED_PROTOCOL.wget= ftp http https

2) change FETCH_USING to allow multiple fetch command
   with preferred order
FETCH_USING= ftp wget curl

3) get required protocol from MASTER_SITES

4) define fetch commands for each protocols

.  for c in ${FETCH_USING}
.    if ${FETCH_SUPPORTED_PROTOCOL.${c}:M${p}}
_FETCH_USING.${p}?=     ${c}
.    endif
.  endfor

5) add bootstrap dependency for all required fetch command

6) use _FETCH_USING.${protocol} for fetching distfile

Setting FETCH_CMD doesn't do anything, it's FETCH_USING you need to set.
But even then it is impossible to set
FETCH_BEFORE_ARGS=--no-check-certificate to actually fetch a file over
https. Looking at mk/fetch/, none of the FETCH*.${FETCH_USING}
variables are user-settable. What was the idea behind that?

Two plan:

1) always ignore certs

2) define certs and use it, like wip/mk/

We have already own hash checksum, so 1) may be sufficient,
but for PKG_DEVELOPERS, 2) may be required.

OBATA Akio /

Home | Main Index | Thread Index | Old Index