git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 7/2] Support for NO_OPENSSL

From
Petr Baudis <pasky@suse.cz>
Date
Jul 29, 2005, 15:50 UTC
Message-ID
<20050729155051.GJ21909@pasky.ji.cz>
In-Reply-To
<20050729085819.GL24895@pasky.ji.cz>

Support for completely OpenSSL-less builds. FSF considers distributing GPL binaries with OpenSSL linked in as a legal problem so this is trouble e.g. for Debian, or some people might not want to install OpenSSL anyway. If you

	make NO_OPENSSL=1

you get completely OpenSSL-less build, disabling --merge-order and using Mozilla's SHA1 implementation.

Ported from Cogito.
Signed-off-by: Petr Baudis <pasky@ucw.cz>

--- commit cd2182ac0e0635faeca6467b68decf8ab9625f4c tree d0c704c203d2319a77cd8fd9ee8fda8adc2d27b4 parent 656a66fe63898954dbc40854dd049dc76eb9b841 author Petr Baudis <pasky@suse.cz> Fri, 29 Jul 2005 17:42:32 +0200 committer Petr Baudis <xpasky@machine.sinus.cz> Fri, 29 Jul 2005 17:42:32 +0200

 Makefile   |    8 +++++++-
 rev-list.c |    6 +++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,7 @@ LIB_H=cache.h object.h blob.h tree.h com
 	pack.h pkt-line.h refs.h
 LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \
 	 tag.o date.o index.o diff-delta.o patch-delta.o entry.o path.o \
-	 epoch.o refs.o csum-file.o pack-check.o pkt-line.o connect.o ident.o
+	 refs.o csum-file.o pack-check.o pkt-line.o connect.o ident.o
 
 LIB_H += rev-cache.h
 LIB_OBJS += rev-cache.o
@@ -105,6 +105,12 @@ LIB_OBJS += server-info.o
 LIBS = $(LIB_FILE)
 LIBS += -lz
 
+ifndef NO_OPENSSL
+	LIB_OBJS += epoch.o
+else
+	CFLAGS += '-DNO_OPENSSL'
+	MOZILLA_SHA1=1
+endif
 ifdef MOZILLA_SHA1
   SHA1_HEADER="mozilla-sha1/sha1.h"
   LIB_OBJS += mozilla-sha1/sha1.o
diff --git a/rev-list.c b/rev-list.c
--- a/rev-list.c
+++ b/rev-list.c
@@ -537,9 +537,13 @@ int main(int argc, char **argv)
 			sort_in_topological_order(&list);
 		show_commit_list(list);
 	} else {
+#ifndef NO_OPENSSL
 		if (sort_list_in_merge_order(list, &process_commit)) {
-			  die("merge order sort failed\n");
+			die("merge order sort failed\n");
 		}
+#else
+		die("merge order sort unsupported, OpenSSL not linked");
+#endif
 	}
 
 	return 0;
Previous: Petr BaudisNext: Linus Torvalds
Message 12 of 21 in “Bits from git-pb”
  1. 0/2 Bits from git-pbPetr Baudis, Jul 29, 2005
  2. 1/2 Trivial tidyupsPetr Baudis, Jul 29, 2005
  3. 2/2 Unify usage strings declarationPetr Baudis, Jul 29, 2005
  4. Junio C HamanoJul 30, 2005
  5. Matthias UrlichsJul 30, 2005
  6. 3/2 git-merge-cache -q doesn't complain about failing merge programPetr Baudis, Jul 29, 2005
  7. Junio C HamanoJul 30, 2005
  8. 4/2 Improve the compilation-time settings interfacePetr Baudis, Jul 29, 2005
  9. Petr BaudisJul 29, 2005
  10. 5/2 Remove the explicit Makefile dependencies descriptionPetr Baudis, Jul 29, 2005
  11. 6/2 Reorder Makefile rulesPetr Baudis, Jul 29, 2005
  12. 7/2 Support for NO_OPENSSLPetr Baudis, Jul 29, 2005
  13. Linus TorvaldsJul 30, 2005
  14. Junio C HamanoJul 30, 2005
  15. Under NO_OPENSSL -lssl should not be usedJunio C Hamano, Jul 30, 2005
  16. Linus TorvaldsJul 30, 2005
  17. Jon SeymourAug 2, 2005
  18. 8/2 Build commands through object filesPetr Baudis, Jul 29, 2005
  19. Petr BaudisJul 30, 2005
  20. Junio C HamanoJul 30, 2005
  21. Junio C HamanoJul 30, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.