Skip to contentSkip to conversation

lsof cleanup and fetch timeout fix

PATCH New Andre McCurdy 1 participant 4 messages Jul 6, 2017

lore
Share & tools
lore
#0 lore raw

cover lsof cleanup and fetch timeout fix

For many (?) users, lsof do_fetch() results in a 90 second timeout followed by a fallback to http://downloads.yoctoproject.org. Try to fix that by updating SRC_URI and associated entries in mirrors.bbclass + misc cleanup along the way.

Andre McCurdy (3):
lsof: minor recipe cleanups
lsof: update SRC_URI
mirrors.bbclass: remove stale lsof ftp mirrors

 meta/classes/mirrors.bbclass            | 11 +----------
 meta/recipes-extended/lsof/lsof_4.89.bb | 24 ++++++++++++++----------
 2 files changed, 15 insertions(+), 20 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/3 lsof: minor recipe cleanup

- Add HOMEPAGE
- Remove ${S} from LIC_FILES_CHKSUM path
- Use tabs consistently to indent do_configure()
- Re-order LIC_FILES_CHKSUM definition to follow OE style guide

---
 meta/recipes-extended/lsof/lsof_4.89.bb | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
meta/recipes-extended/lsof/lsof_4.89.bb +8 -7
index 650b34c..0c38e97 100644
@@ -1,8 +1,10 @@
 SUMMARY = "LiSt Open Files tool"
 DESCRIPTION = "Lsof is a Unix-specific diagnostic tool. \
 Its name stands for LiSt Open Files, and it does just that."
+HOMEPAGE = "http://people.freebsd.org/~abe/"
 SECTION = "devel"
 LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a"
 
 SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
 
@@ -12,9 +14,8 @@ SRC_URI[sha256sum] = "81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a36
 UPSTREAM_CHECK_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof"
 
 LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
-S = "${WORKDIR}/lsof_${PV}_src"
 
-LIC_FILES_CHKSUM = "file://${S}/00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a"
+S = "${WORKDIR}/lsof_${PV}_src"
 
 python do_unpack () {
     # temporarily change S for unpack
@@ -36,11 +37,11 @@ export LSOF_INCLUDE = "${STAGING_INCDIR}"
 do_configure () {
 	export LSOF_AR="${AR} cr"
 	export LSOF_RANLIB="${RANLIB}"
-        if [ "x${GLIBCVERSION}" != "x" ];then
-                LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'`
-                LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}"
-                export LINUX_CLIB
-        fi
+	if [ "x${GLIBCVERSION}" != "x" ]; then
+		LINUX_CLIB=`echo ${GLIBCVERSION} |sed -e 's,\.,,g'`
+		LINUX_CLIB="-DGLIBCV=${LINUX_CLIB}"
+		export LINUX_CLIB
+	fi
 	yes | ./Configure linux
 }
 
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/3 lsof: update SRC_URI

In reply to Andre McCurdy

Upstream lsof releases are hosted on an ftp server which times out download attempts from hosts for which it can not perform a DNS reverse-lookup. See:

https://people.freebsd.org/~abe/

http://www.mirrorservice.org seems to be the most commonly used alternative (and using it for SRC_URI allows the custom UPSTREAM_CHECK_URI to be removed).

---
 meta/recipes-extended/lsof/lsof_4.89.bb | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
meta/recipes-extended/lsof/lsof_4.89.bb +6 -3
index 0c38e97..29245b1 100644
@@ -6,13 +6,16 @@ SECTION = "devel"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://00README;beginline=645;endline=679;md5=964df275d26429ba3b39dbb9f205172a"
 
-SRC_URI = "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
+# Upstream lsof releases are hosted on an ftp server which times out download
+# attempts from hosts for which it can not perform a DNS reverse-lookup (See:
+# https://people.freebsd.org/~abe/ ). http://www.mirrorservice.org seems to be
+# the most commonly used alternative.
+
+SRC_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_${PV}.tar.bz2"
 
 SRC_URI[md5sum] = "1b9cd34f3fb86856a125abbf2be3a386"
 SRC_URI[sha256sum] = "81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718"
 
-UPSTREAM_CHECK_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof"
-
 LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
 
 S = "${WORKDIR}/lsof_${PV}_src"
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/3 mirrors.bbclass: remove stale lsof ftp mirrors

In reply to Andre McCurdy

Replace with an mapping for http://www.mirrorservice.org to align with recent changes to SRC_URI in the lsof recipe and allow non-current lsof tar files to be found in the /OLD subdirectory.

---
 meta/classes/mirrors.bbclass | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
meta/classes/mirrors.bbclass +1 -10
index de2c2b9..9b72473 100644
@@ -30,16 +30,7 @@ ftp://dante.ctan.org/tex-archive http://ctan.unsw.edu.au/ \n \
 ftp://ftp.gnutls.org/gcrypt/gnutls ${GNUPG_MIRROR}/gnutls \n \
 http://ftp.info-zip.org/pub/infozip/src/ http://mirror.switch.ch/ftp/mirror/infozip/src/ \n \
 http://ftp.info-zip.org/pub/infozip/src/ ftp://sunsite.icm.edu.pl/pub/unix/archiving/info-zip/src/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://ftp.tau.ac.il/pub/unix/admin/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://ftp.cert.dfn.de/pub/tools/admin/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://ftp.kaizo.org/pub/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://ftp.tu-darmstadt.de/pub/sysadmin/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://ftp.tux.org/pub/sites/vic.cc.purdue.edu/tools/unix/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ \n \
-ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://the.wiretapped.net/pub/security/host-security/lsof/ \n \
+http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/ http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/ \n \
 ${APACHE_MIRROR}  http://www.us.apache.org/dist \n \
 ${APACHE_MIRROR}  http://archive.apache.org/dist \n \
 http://downloads.sourceforge.net/watchdog/ http://fossies.org/linux/misc/ \n \
Signature · 1 line
2.7.4