[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Fri Nov 23 11:41:31 UTC 2018


The branch master has been updated
       via  8d9535ec3e317641b8e551973c8cfe2ee1c89296 (commit)
       via  8c209eeef426ded66ce99048f535f35d08b88462 (commit)
      from  4b801fdcf4c25f44374eb18cb18f36d904975edd (commit)


- Log -----------------------------------------------------------------
commit 8d9535ec3e317641b8e551973c8cfe2ee1c89296
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Nov 22 21:29:02 2018 +0100

    Remove all 'make dist' artifacts
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/7692)

commit 8c209eeef426ded66ce99048f535f35d08b88462
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Nov 22 21:17:47 2018 +0100

    Change tarball making procedure
    
    Since recently, OpenSSL tarballs are produced with 'make tar' rather
    than 'make dist', as the latter has turned out to be more troublesome
    than useful.
    
    The next step to look at is why we would need to configure at all to
    produce a Makefile just to produce a tarball.  After all, the tarball
    should now only contain source files that are present even without
    configuring.
    
    Furthermore, the current method for producing tarballs is a bit
    complex, and can be greatly simplified with the right tools.  Since we
    have everything versioned with git, we might as well use the tool that
    comes with it.
    
    Added: util/mktar.sh, a simple script to produce OpenSSL tarballs.  It
    takes the options --name to modify the prefix of the distribution, and
    --tarfile tp modify the tarball file name specifically.
    
    This also adds a few entries in .gitattributes to specify files that
    should never end up in a distribution tarball.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/7692)

-----------------------------------------------------------------------

Summary of changes:
 .gitattributes                    |  5 +++++
 .travis-create-release.sh         | 10 +---------
 Configurations/dist.conf          | 12 ------------
 Configurations/unix-Makefile.tmpl | 31 +------------------------------
 util/mktar.sh                     | 27 +++++++++++++++++++++++++++
 5 files changed, 34 insertions(+), 51 deletions(-)
 delete mode 100644 Configurations/dist.conf
 create mode 100755 util/mktar.sh

diff --git a/.gitattributes b/.gitattributes
index 15121c8..912b4ae 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,8 @@
 *.der binary
 /fuzz/corpora/** binary
 *.pfx binary
+
+# For git archive
+fuzz/corpora/**                         export-ignore
+Configurations/*.norelease.conf         export-ignore
+.*                                      export-ignore
diff --git a/.travis-create-release.sh b/.travis-create-release.sh
index b39a001..3407de7 100644
--- a/.travis-create-release.sh
+++ b/.travis-create-release.sh
@@ -1,11 +1,3 @@
 #! /bin/sh
 
-# $1 is expected to be $TRAVIS_OS_NAME
-
-./Configure dist
-if [ "$1" == osx ]; then
-    make NAME='_srcdist' TARFILE='_srcdist.tar' \
-         TAR_COMMAND='$(TAR) $(TARFLAGS) -cf -' tar
-else
-    make TARFILE='_srcdist.tar' NAME='_srcdist' dist
-fi
+./util/mktar.sh --name=_srcdist
diff --git a/Configurations/dist.conf b/Configurations/dist.conf
deleted file mode 100644
index 2a458bc..0000000
--- a/Configurations/dist.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-## -*- mode: perl; -*-
-## Build configuration targets for openssl-team members
-
-# This is to support 'make dist'
-my %targets = (
-    "dist" => {
-        inherit_from     => [ 'BASE_unix' ],
-        CC               => "cc",
-        CFLAGS           => "-O",
-        thread_scheme    => "(unknown)",
-    },
-);
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index c64c154..b5c6991 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -872,37 +872,8 @@ tags TAGS: FORCE
 
 # Release targets (note: only available on Unix) #####################
 
-# If your tar command doesn't support --owner and --group, make sure to
-# use one that does, for example GNU tar
-TAR_COMMAND=$(TAR) $(TARFLAGS) --owner 0 --group 0 -cf -
-PREPARE_CMD=:
 tar:
-	set -e; \
-	TMPDIR=/var/tmp/openssl-copy.$$$$; \
-	DISTDIR=$(NAME); \
-	mkdir -p $$TMPDIR/$$DISTDIR; \
-	(cd $(SRCDIR); \
-	 excl_re=`git submodule status | sed -e 's/^.//' | cut -d' ' -f2`; \
-	 excl_re="^(fuzz/corpora|Configurations/.*\.norelease\.conf|`echo $$excl_re | sed -e 's/ /$$|/g'`\$$)"; \
-	 echo "$$excl_re"; \
-	 git ls-tree -r --name-only --full-tree HEAD \
-	 | egrep -v "$$excl_re" \
-	 | while read F; do \
-	       mkdir -p $$TMPDIR/$$DISTDIR/`dirname $$F`; \
-	       cp $$F $$TMPDIR/$$DISTDIR/$$F; \
-	   done); \
-	(cd $$TMPDIR/$$DISTDIR; \
-	 $(PREPARE_CMD); \
-	 find . -type d -print | xargs chmod 755; \
-	 find . -type f -print | xargs chmod a+r; \
-	 find . -type f -perm -0100 -print | xargs chmod a+x); \
-	(cd $$TMPDIR; $(TAR_COMMAND) $$DISTDIR) \
-	| (cd $(SRCDIR); gzip --best > $(TARFILE).gz); \
-	rm -rf $$TMPDIR
-	cd $(SRCDIR); ls -l $(TARFILE).gz
-
-dist:
-	@$(MAKE) PREPARE_CMD='$(PERL) ./Configure dist' TARFILE="$(TARFILE)" NAME="$(NAME)" tar
+	$(SRCDIR)/util/mktar.sh --name='$(NAME)' --tarfile='$(TARFILE)'
 
 # Helper targets #####################################################
 
diff --git a/util/mktar.sh b/util/mktar.sh
new file mode 100755
index 0000000..0848b7b
--- /dev/null
+++ b/util/mktar.sh
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+HERE=`dirname $0`
+
+version=`grep 'OPENSSL_VERSION_TEXT  *"OpenSSL' $HERE/../include/openssl/opensslv.h | sed -e 's|.*"OpenSSL ||' -e 's| .*||'`
+basename=openssl
+
+NAME="$basename-$version"
+
+while [ $# -gt 0 ]; do
+    case "$1" in
+        --name=* ) NAME=`echo "$1" | sed -e 's|[^=]*=||'`       ;;
+        --name ) shift; NAME="$1"                               ;;
+        --tarfile=* ) TARFILE=`echo "$1" | sed -e 's|[^=]*=||'` ;;
+        --tarfile ) shift; TARFILE="$1"                         ;;
+        * ) echo >&2 "Could not parse '$1'"; exit 1             ;;
+    esac
+    shift
+done
+
+if [ -z "$TARFILE" ]; then TARFILE="$NAME.tar"; fi
+
+# This counts on .gitattributes to specify what files should be ignored
+git archive --worktree-attributes --format=tar --prefix="$NAME/" -v HEAD \
+    | gzip -9 > "$TARFILE.gz"
+
+ls -l "$TARFILE.gz"


More information about the openssl-commits mailing list