summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-11-04 15:37:43 +0000
committerRoy Marples <roy@marples.name>2016-11-04 15:37:43 +0000
commitf5bbda3ca9b8787610dcb16be84fc05626fff2a4 (patch)
treea493fbda38500d92cff9afc6fde8d2df8f7afdc3
parent9aa114876fd6e041abd80af801f1f5b04b8bfc0b (diff)
downloaddhcpcd-f5bbda3ca9b8787610dcb16be84fc05626fff2a4.tar.xz
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.
-rw-r--r--Makefile14
-rwxr-xr-xconfigure3
2 files changed, 16 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0f01ce80..fc988578 100644
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,10 @@ FOSSILID?= current
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} ${DISTINFO} ${DISTINFOSIGN}
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 602560e2..19c17131 100755
--- a/configure
+++ b/configure
@@ -429,6 +429,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