pkgsrc-Changes archive

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

Re: CVS commit: pkgsrc/mk/fetch



On 15/09/15 23:40, David Sainty wrote:
On 15/09/15 23:29, Greg Troxel wrote:
David Sainty <david.sainty%gmail.com@localhost> writes:

On 14/09/15 03:03, Joerg Sonnenberger wrote:
Module Name:    pkgsrc
Committed By:    joerg
Date:        Sun Sep 13 15:03:57 UTC 2015

Modified Files:
    pkgsrc/mk/fetch: bsd.fetch-vars.mk fetch.mk

Log Message:
Introduce IGNORE_INTERACTIVE_FETCH to allow trying to fetch files from
the override site, even for INTERACTIVE_STATE=stage or FETCH_MESSAGE.
Ignore all backup sites as they won't have the distfile anyway, the
fetch wouldn't be interactive in first place otherwise.
This breaks for PKG_RESUME_TRANSFERS=yes.
Does one of you have a proposed fix?  Or should we back out the above
change, for redoing post freeze?   It sounds like it might not be too
hard/scary to fix - would be good to get a patch to review to tech-pkg.


I haven't tried to fix it, I figure Joerg has a better handle on the nuances of IGNORE_INTERACTIVE_FETCH.

I would probably take the approach of removing the fatal error on zero sites to "fetch". I would guess that would have no real side-effects on existing usage...


This patch is a possible fix. Below are testing results with this patch in-place.

--- mk/fetch/fetch.orig 2015-09-10 13:01:28.886319302 +1200
+++ mk/fetch/fetch      2015-09-16 13:39:32.691135722 +1200
@@ -166,7 +166,7 @@
 fi

 # Process required arguments
-if ${TEST} $# -lt 2; then
+if ${TEST} $# -lt 1; then
        usage
        exit 1
 fi


Behaviour seems consistent. The zero length distfile case is probably the least ideal, but it looks like it's no worse than normal. Ideal would be to detect the checksum mismatch and give the interactive fetch instructions.


With no distfile:

% rm /pkg/pkgdists/jre-8u60-linux-i586.tar.gz
% ( cd lang/oracle-jre8 && make PKG_RESUME_TRANSFERS=no fetch )
=> Bootstrap dependency digest>=20010302: found digest-20121220
===> Checking for vulnerabilities in oracle-jre8-8.0.60
ERROR: ======================================================================
ERROR:
ERROR: The file jre-8u60-linux-i586.tar.gz containing Java Runtime Environment (JRE) 8u60
ERROR:
ERROR:  must be fetched into:
ERROR:  /pkg/pkgdists/jre-8u60-linux-i586.tar.gz
ERROR:  from:
ERROR: http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html
ERROR:  or http://www.oracle.com/technetwork/java/javase/archive-139210.html
ERROR:
ERROR: Click Download for 'Java Runtime Environment (JRE) 8u60', read and accept the
ERROR:  license, then choose 'linux tar.gz file'.
ERROR:
ERROR: As oracle-jre-jce is enabled jce_policy-8.zip is also needed
ERROR:
ERROR: ======================================================================
*** Error code 1

% ( cd lang/oracle-jre8 && make PKG_RESUME_TRANSFERS=yes fetch )
=> Bootstrap dependency digest>=20010302: found digest-20121220
===> Checking for vulnerabilities in oracle-jre8-8.0.60
=> Fetching jce_policy-8.zip
ERROR: ======================================================================
ERROR:
ERROR: The file jre-8u60-linux-i586.tar.gz containing Java Runtime Environment (JRE) 8u60
ERROR:
ERROR:  must be fetched into:
ERROR:  /pkg/pkgdists/jre-8u60-linux-i586.tar.gz
ERROR:  from:
ERROR: http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html
ERROR:  or http://www.oracle.com/technetwork/java/javase/archive-139210.html
ERROR:
ERROR: Click Download for 'Java Runtime Environment (JRE) 8u60', read and accept the
ERROR:  license, then choose 'linux tar.gz file'.
ERROR:
ERROR: As oracle-jre-jce is enabled jce_policy-8.zip is also needed
ERROR:
ERROR: ======================================================================
*** Error code 1


With zero length distfile:

% touch /pkg/pkgdists/jre-8u60-linux-i586.tar.gz
% ( cd lang/oracle-jre8 && make PKG_RESUME_TRANSFERS=yes fetch )
=> Bootstrap dependency digest>=20010302: found digest-20121220
===> Checking for vulnerabilities in oracle-jre8-8.0.60
=> Fetching jce_policy-8.zip
=> Fetching jre-8u60-linux-i586.tar.gz
=> Downloaded size: 0 bytes
=> Total size: 73863653 bytes

% ( cd lang/oracle-jre8 && make PKG_RESUME_TRANSFERS=no fetch )
=> Bootstrap dependency digest>=20010302: found digest-20121220
===> Checking for vulnerabilities in oracle-jre8-8.0.60


With real distfile:

% mv /pkg/pkgdists/jre-8u60-linux-i586.tar.gz.orig /pkg/pkgdists/jre-8u60-linux-i586.tar.gz
% ( cd lang/oracle-jre8 && make PKG_RESUME_TRANSFERS=yes fetch )
=> Bootstrap dependency digest>=20010302: found digest-20121220
===> Checking for vulnerabilities in oracle-jre8-8.0.60
=> Fetching jce_policy-8.zip
=> Fetching jre-8u60-linux-i586.tar.gz

% ( cd lang/oracle-jre8 && make PKG_RESUME_TRANSFERS=no fetch )
=> Bootstrap dependency digest>=20010302: found digest-20121220
===> Checking for vulnerabilities in oracle-jre8-8.0.60


Non-interactive fetch, resume = no:

% rm /pkg/pkgdists/Net-SMTP-SSL*
% ( cd mail/p5-Net-SMTP-SSL && make PKG_RESUME_TRANSFERS=no fetch )
=> Bootstrap dependency digest>=20010302: found digest-20121220
===> Checking for vulnerabilities in p5-Net-SMTP-SSL-1.03
=> Fetching Net-SMTP-SSL-1.03.tar.gz
=> Total size: 2271 bytes
--2015-09-16 14:07:13-- ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module/Net/Net-SMTP-SSL-1.03.tar.gz
           => 'Net-SMTP-SSL-1.03.tar.gz'
Resolving ftp.funet.fi... 193.166.3.2
Connecting to ftp.funet.fi|193.166.3.2|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/languages/perl/CPAN/modules/by-module/Net ... done.
==> SIZE Net-SMTP-SSL-1.03.tar.gz ... 2271
==> PASV ... done.    ==> RETR Net-SMTP-SSL-1.03.tar.gz ... done.

    [ <=> ] 2,271       --.-K/s   in 0.02s

2015-09-16 14:07:17 (124 KB/s) - 'Net-SMTP-SSL-1.03.tar.gz' saved [2271]

% ( cd mail/p5-Net-SMTP-SSL && make PKG_RESUME_TRANSFERS=no fetch )
=> Bootstrap dependency digest>=20010302: found digest-20121220
===> Checking for vulnerabilities in p5-Net-SMTP-SSL-1.03


Non-interactive fetch, resume = yes:

% rm /pkg/pkgdists/Net-SMTP-SSL*
% ( cd mail/p5-Net-SMTP-SSL && make PKG_RESUME_TRANSFERS=yes fetch )
=> Bootstrap dependency digest>=20010302: found digest-20121220
===> Checking for vulnerabilities in p5-Net-SMTP-SSL-1.03
=> Fetching Net-SMTP-SSL-1.03.tar.gz
=> Downloaded size: 0 bytes
=> Total size: 2271 bytes
--2015-09-16 14:07:31-- ftp://ftp.fi.muni.cz/pub/CPAN/modules/by-module/Net/Net-SMTP-SSL-1.03.tar.gz
           => 'Net-SMTP-SSL-1.03.tar.gz.pkgsrc.resume'
Resolving ftp.fi.muni.cz... 147.251.48.205
Connecting to ftp.fi.muni.cz|147.251.48.205|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/CPAN/modules/by-module/Net ... done.
==> SIZE Net-SMTP-SSL-1.03.tar.gz ... 2271
==> PASV ... done.    ==> RETR Net-SMTP-SSL-1.03.tar.gz ... done.
Length: 2271 (2.2K) (unauthoritative)

100%[=====================================================================>] 2,271 --.-K/s in 0.03s

2015-09-16 14:07:38 (81.6 KB/s) - 'Net-SMTP-SSL-1.03.tar.gz.pkgsrc.resume' saved [2271]

% ( cd mail/p5-Net-SMTP-SSL && make PKG_RESUME_TRANSFERS=yes fetch )
=> Bootstrap dependency digest>=20010302: found digest-20121220
===> Checking for vulnerabilities in p5-Net-SMTP-SSL-1.03
=> Fetching Net-SMTP-SSL-1.03.tar.gz




Home | Main Index | Thread Index | Old Index