<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/172782bdc8b9eb59fa88bc578a7fb6b2aa12bf29">https://github.com/macports/macports-base/commit/172782bdc8b9eb59fa88bc578a7fb6b2aa12bf29</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 172782bdc8b9eb59fa88bc578a7fb6b2aa12bf29
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Sep 7 12:41:06 2019 +1000
<span style='display:block; white-space:pre;color:#404040;'> Add codesign target
</span>---
Makefile.in | 11 ++++++++++-
src/codesign.sh | 32 ++++++++++++++++++++++++++++++++
src/darwintracelib1.0/Makefile.in | 5 ++++-
src/machista1.0/Makefile.in | 2 ++
src/macports1.0/Makefile.in | 3 +++
src/pextlib1.0/Makefile.in | 5 ++++-
src/programs/daemondo/Makefile.in | 3 +++
src/registry2.0/Makefile.in | 5 ++++-
vendor/Makefile.in | 3 +++
9 files changed, 65 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/Makefile.in b/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index d971ecc..9b52b64 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -152,4 +152,13 @@ docs:
</span>
test::
<span style='display:block; white-space:pre;background:#ffe0e0;'>-.PHONY: dist _gettag _pkgdist _dopkg docs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Order of subdirs is important, e.g. pextlib depends on registry. We don't
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# want things getting rebuilt after they're signed just because a dependency
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# has a later mtime because it was also signed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+codesign::
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @for subdir in vendor src/darwintracelib1.0 src/machista1.0 src/macports1.0 src/registry2.0 src/pextlib1.0 src/programs/daemondo ; do\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo ===\> making $@ in ${DIRPRFX}$$subdir; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ( cd $$subdir && $(MAKE) DIRPRFX=${DIRPRFX}$$subdir/ $@) || exit 1; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ done
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+.PHONY: dist _gettag _pkgdist _dopkg docs codesign
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/codesign.sh b/src/codesign.sh
</span>new file mode 100755
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..29e3655
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/codesign.sh
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,32 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#!/bin/sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [ -z "$CODESIGN_ID" ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if [ -f "${HOME}/.macports/codesign_id" ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CODESIGN_ID=`cat "${HOME}/.macports/codesign_id"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo "No codesigning identity specified"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [ `id -u` -eq 0 -a -n "$SUDO_USER" ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SUDO=sudo -u "$SUDO_USER"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ SUDO=
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+for f in "$@"; do
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if [ -n "$SUDO" ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ DIR=`dirname "$f"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FILE_OWNER=`stat -f %u "$f"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ DIR_OWNER=`stat -f %u "$DIR"`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ chown "$SUDO_USER" "$f" "$DIR"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $SUDO /usr/bin/codesign --sign "$CODESIGN_ID" --identifier=org.macports.base --options=runtime --timestamp --verbose "$f"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if [ -n "$SUDO" ]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ chown "$FILE_OWNER" "$f"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ chown "$DIR_OWNER" "$DIR"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+done
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/darwintracelib1.0/Makefile.in b/src/darwintracelib1.0/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 28deaf8..be77bdf 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/darwintracelib1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/darwintracelib1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -49,7 +49,7 @@ endif
</span> %.d : %.c
$(CC) -MM -MP $(CPPFLAGS) $< > $@
<span style='display:block; white-space:pre;background:#ffe0e0;'>-.PHONY: all clean distclean install test
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+.PHONY: all clean distclean install test codesign
</span> all:: $(SHLIB_NAME)
# Copy sip_copy_proc.{c,h} from pextlib1.0 where they are also needed
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -82,3 +82,6 @@ ifeq (,$(findstring clean,$(MAKECMDGOALS)))
</span> # Include dependency information
-include $(SRCS:%.c=%.d)
endif
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+codesign:: $(SHLIB_NAME)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ../codesign.sh $?
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/machista1.0/Makefile.in b/src/machista1.0/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 6b5874c..c0d20a9 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/machista1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/machista1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -55,3 +55,5 @@ test:: ${TESTS}
</span> tests/libmachista-test: tests/libmachista-test.c libmachista.h libmachista.o hashmap.o
$(CC) $(CFLAGS) -D_POSIX_SOURCE -o $@ -I. $< libmachista.o hashmap.o
<span style='display:block; white-space:pre;background:#e0ffe0;'>+codesign:: $(SHLIB_NAME)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ../codesign.sh $?
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/Makefile.in b/src/macports1.0/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index c851221..4af9700 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -48,3 +48,6 @@ install:: all
</span>
include $(srcdir)/../../Mk/macports.tea.mk
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+codesign:: $(SHLIB_NAME)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ../codesign.sh $?
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/Makefile.in b/src/pextlib1.0/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 26ea251..10ccdda 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -59,7 +59,7 @@ SHLIB_LDFLAGS+= -install_name ${INSTALLDIR}/${SHLIB_NAME}
</span> ${SHLIB_NAME}: ../registry2.0/registry${SHLIB_SUFFIX}
endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-.PHONY: test
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+.PHONY: test codesign
</span>
test:: ${SHLIB_NAME}
${TCLSH} $(srcdir)/tests/checksums.tcl ./${SHLIB_NAME}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -73,3 +73,6 @@ test:: ${SHLIB_NAME}
</span>
distclean::
rm -f Makefile
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+codesign:: $(SHLIB_NAME)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ../codesign.sh $?
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/programs/daemondo/Makefile.in b/src/programs/daemondo/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 1858770..e220368 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/programs/daemondo/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/programs/daemondo/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -37,3 +37,6 @@ install: daemondo
</span> ${INSTALL} -o "${DSTUSR}" -g "${DSTGRP}" -m 555 "${PROGRAM}" "${DESTDIR}${bindir}"
test:
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+codesign:: ${PROGRAM}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ../../codesign.sh $?
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/Makefile.in b/src/registry2.0/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index defcb96..7ab536f 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/registry2.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -28,7 +28,7 @@ endif
</span>
${SHLIB_NAME}: ../cregistry/cregistry.a
<span style='display:block; white-space:pre;background:#ffe0e0;'>-.PHONY: test
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+.PHONY: test codesign
</span>
test:: ${SHLIB_NAME}
${TCLSH} $(srcdir)/tests/entry.tcl ./${SHLIB_NAME}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -48,3 +48,6 @@ install:: all $(SHLIB_NAME)
</span> $(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 "$$file" "${DESTDIR}${INSTALLDIR}/$$file"; \
done
$(INSTALL) -o "${DSTUSR}" -g "${DSTGRP}" -m 444 pkgIndex.tcl "${DESTDIR}${INSTALLDIR}"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+codesign:: $(SHLIB_NAME)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ../codesign.sh $?
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/vendor/Makefile.in b/vendor/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 921d70a..fe047ec 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/vendor/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/vendor/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -101,3 +101,6 @@ distclean: distclean-tcl distclean-tcllib distclean-tclx distclean-tclthread
</span> rm -f Makefile
rm -rf vendor-destroot
rm -f tclsh
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+codesign:: tcl/unix/tclsh tcl/unix/libtcl8.5.dylib thread/libthread2.7.3.dylib tclx/libtclx8.4.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ../src/codesign.sh $?
</span></pre><pre style='margin:0'>
</pre>