[Midnightbsd-cvs] mports: mports/Mk: Add a third hash algorithm to the fray.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Mar 27 01:30:38 EDT 2009


Log Message:
-----------
Add a third hash algorithm to the fray.  New distinfo files will contain and check rmd160 in addition to md5/sha256. 

Tested on ports with and without rmd160 present.

Also remove check for ancient ports.  This was a very old method of describing ports that we've never used.  While it might be vaguely useful when basing ports on those from openbsd, etc. it doesn't makes sense for most cases.

Modified Files:
--------------
    mports/Mk:
        bsd.mport.mk (r1.144 -> r1.145)
    mports/Mk/docs:
        bsd.mport.mk.pod (r1.8 -> r1.9)

-------------- next part --------------
Index: bsd.mport.mk
===================================================================
RCS file: /home/cvs/mports/Mk/bsd.mport.mk,v
retrieving revision 1.144
retrieving revision 1.145
diff -L Mk/bsd.mport.mk -L Mk/bsd.mport.mk -u -r1.144 -r1.145
--- Mk/bsd.mport.mk
+++ Mk/bsd.mport.mk
@@ -341,12 +341,6 @@
 PACKAGES?=		${PORTSDIR}/Packages/${ARCH}
 TEMPLATES?=		${PORTSDIR}/Templates
 
-.if (!defined(PKGDIR) && exists(${MASTERDIR}/pkg/DESCR)) || \
-	(!defined(MD5_FILE) && exists(${MASTERDIR}/files/md5))
-check-makefile::
-	@${ECHO_MSG} "Makefile error: your port uses an old layout.  Please update it to match this bsd.port.mk.  If you have updated your ports collection via cvsup and are still getting this error, see Q12 and Q13 in the cvsup FAQ on http://www.polstra.com for further information."
-	@${FALSE}
-.endif
 PATCHDIR?=		${MASTERDIR}/files
 FILESDIR?=		${MASTERDIR}/files
 SCRIPTDIR?=		${MASTERDIR}/scripts
@@ -896,8 +890,15 @@
 .else
 SHA256?=		NO
 .endif
+.if exists(/sbin/rmd160)
+RMD160?=                /sbin/rmd160
+.elif exists(${LOCALBASE_REL}/sbin/rmd160)
+RMD160?=                ${LOCALBASE_REL}/sbin/rmd160
+.else
+RMD160?=                NO
+.endif
 
-CHECKSUM_ALGORITHMS?= md5 sha256
+CHECKSUM_ALGORITHMS?= md5 sha256 rmd160
 
 MD5_FILE?=		${MASTERDIR}/distinfo
 
@@ -3087,6 +3088,7 @@
 	done; \
 
 checksum_init=\
+	RMD160=${RMD160}; \
 	SHA256=${SHA256}; \
 	MD5=${MD5};
 
Index: bsd.mport.mk.pod
===================================================================
RCS file: /home/cvs/mports/Mk/docs/bsd.mport.mk.pod,v
retrieving revision 1.8
retrieving revision 1.9
diff -L Mk/docs/bsd.mport.mk.pod -L Mk/docs/bsd.mport.mk.pod -u -r1.8 -r1.9
--- Mk/docs/bsd.mport.mk.pod
+++ Mk/docs/bsd.mport.mk.pod
@@ -1404,7 +1404,7 @@
 Different checksum algorithms to check for verifying the integrity of the
 distfiles. The absence of the algorithm in distinfo doesn't make it fail.
 
-Default: md5 sha256
+Default: md5 sha256 rmd160
 
 =item NO_CHECKSUM
 


More information about the Midnightbsd-cvs mailing list