From: Roy Marples Date: Fri, 4 Nov 2016 15:31:14 +0000 (+0000) Subject: make distinfo now produces a .distinfo file which contains checksum(s) of X-Git-Tag: v6.11.6~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9085d20b656cc3c3f7b8ad71c85158a9fd526d6c;p=thirdparty%2Fdhcpcd.git make distinfo now produces a .distinfo file which contains checksum(s) of the dist file. This distinfo file is then signed with a PGP key. --- diff --git a/Makefile b/Makefile index 9d825719..015ec368 100644 --- a/Makefile +++ b/Makefile @@ -51,11 +51,15 @@ SED_SYS= -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' DEPEND!= test -e .depend && echo ".depend" || echo "" VERSION!= sed -n 's/\#define VERSION[[:space:]]*"\(.*\)".*/\1/p' defs.h -FOSSILID?= current +FOSSILID?= dhcpcd-6 DISTPREFIX?= ${PROG}-${VERSION} DISTFILEGZ?= ${DISTPREFIX}.tar.gz DISTFILE?= ${DISTPREFIX}.tar.xz +DISTINFO= ${DISTFILE}.distinfo +DISTINFOSIGN= ${DISTINFO}.asc +CKSUM?= cksum -a SHA256 +PGP?= netpgp HOST_SH?= /bin/sh @@ -141,13 +145,21 @@ clean: for x in ${SUBDIRS} test; do cd $$x; ${MAKE} $@; cd ..; done distclean: clean - rm -f .depend config.h config.mk config.log + rm -f .depend config.h config.mk config.log \ + ${DISTFILE} ${DISTFILEGZ} ${DISTFILESUM} ${DISTFILESIGN} dist: fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ} gunzip -c ${DISTFILEGZ} | xz >${DISTFILE} rm ${DISTFILEGZ} +distinfo: dist + ${CKSUM} ${DISTFILE} >${DISTINFO} + #printf "SIZE (${DISTFILE}) = %s\n" $$(wc -c <${DISTFILE}) >>${DISTINFO} + ${PGP} --sign --detach --armor --output=${DISTINFOSIGN} ${DISTINFO} + chmod 644 ${DISTINFOSIGN} + ls -l ${DISTFILE} ${DISTINFO} ${DISTINFOSIGN} + snapshot: rm -rf /tmp/${DISTPREFIX} ${INSTALL} -d /tmp/${DISTPREFIX} diff --git a/configure b/configure index b47f91e1..0bb93624 100755 --- a/configure +++ b/configure @@ -423,6 +423,9 @@ linux*) echo "#include /* fix broken headers */" >>$CONFIG_H echo "#include /* fix broken headers */" >>$CONFIG_H echo "#include " >>$CONFIG_H + # cksum does't support -a and netpgp is rare + echo "CKSUM= sha256sum --tag" >>$CONFIG_MK + echo "PGP= gpg2" >>$CONFIG_MK ;; qnx*) echo "CPPFLAGS+= -D__EXT" >>$CONFIG_MK