]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
make distinfo now produces a .distinfo file which contains checksum(s) of
authorRoy Marples <roy@marples.name>
Fri, 4 Nov 2016 15:31:14 +0000 (15:31 +0000)
committerRoy Marples <roy@marples.name>
Fri, 4 Nov 2016 15:31:14 +0000 (15:31 +0000)
the dist file. This distinfo file is then signed with a PGP key.

Makefile
configure

index 9d8257193ba7290ad2a3b402ea5bb6db400c71a8..015ec368aae484e1d7f3cc66392c64b9c913b4c8 100644 (file)
--- 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}
index b47f91e13bcbfab13b4a8b4ca4e33842b3f91847..0bb936241b6f1a372548646bcda3c4a42b2c9a10 100755 (executable)
--- a/configure
+++ b/configure
@@ -423,6 +423,9 @@ linux*)
        echo "#include          <asm/types.h> /* fix broken headers */" >>$CONFIG_H
        echo "#include          <sys/socket.h> /* fix broken headers */" >>$CONFIG_H
        echo "#include          <linux/rtnetlink.h>" >>$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