[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Richard Levitte levitte at openssl.org
Fri Nov 23 11:46:13 UTC 2018


The branch OpenSSL_1_1_0-stable has been updated
       via  b97cbe05a3a4bf18b6bd6262dbda04b87256a54c (commit)
       via  f68bfdf62805f1f3af4330754c7f141fa521b6dd (commit)
      from  0fbe8491fc05d280a1f00bfc26dd3c3a6c63f04a (commit)


- Log -----------------------------------------------------------------
commit b97cbe05a3a4bf18b6bd6262dbda04b87256a54c
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)
    
    (cherry picked from commit 8d9535ec3e317641b8e551973c8cfe2ee1c89296)

commit f68bfdf62805f1f3af4330754c7f141fa521b6dd
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)
    
    (cherry picked from commit 8c209eeef426ded66ce99048f535f35d08b88462)

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

Summary of changes:
 .gitattributes                    |  5 +++++
 .travis-create-release.sh         | 10 +---------
 Configurations/dist.conf          | 12 ------------
 Configurations/unix-Makefile.tmpl | 30 +-----------------------------
 util/mktar.sh                     | 27 +++++++++++++++++++++++++++
 5 files changed, 34 insertions(+), 50 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 311cedd..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) -cvf -' 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 4f58dad..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'
-%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 7254478..b35db4f 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -665,36 +665,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 -cvf -
-PREPARE_CMD=:
 tar:
-	set -e; \
-	TMPDIR=/var/tmp/openssl-copy.$$$$; \
-	DISTDIR=$(NAME); \
-	mkdir -p $$TMPDIR/$$DISTDIR; \
-	(cd $(SRCDIR); \
-	 excl_re="^(fuzz/corpora|Configurations/.*\.norelease\.conf)"; \
-	 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' 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