]> git.proxmox.com Git - mirror_edk2.git/commitdiff
CryptoPkg: Adding OpenSSL as one submodule of EDKII repo
authorLong Qin <qin.long@intel.com>
Tue, 16 Jan 2018 07:03:05 +0000 (15:03 +0800)
committerLong Qin <qin.long@intel.com>
Thu, 18 Jan 2018 06:06:15 +0000 (14:06 +0800)
A submodule allows to keep another Git repository in a subdirectory
of main repository. The submodule repository has its own history, which
does not interfere with the history of the current repository. This can
be used to have external dependencies such as third party libraries.

After the extra patch for EDKII-OpenSSL build was removed, OpenSSL can
be one typical submodule use case in EDKII project. This patch adds the
openssl git repository into EDKII project as one submodule.

One .gitmodules file will be generated with the submodule info:
    [submodule "CryptoPkg/Library/OpensslLib/openssl"]
            path = CryptoPkg/Library/OpensslLib/openssl
            url = https://github.com/openssl/openssl

The user can use the following command to clone both main EDKII repo and
openssl submodule:
   1) Add the "--recursive" flag to their git clone command:
      $ git clone --recursive https://github.com/tianocore/edk2
or 2) Manually initialize and the submodules after the clone operation:
      $ git clone https://github.com/tianocore/edk2
      $ git submodule update -–init -–recursive

For Pull operations, "git pull" will not update the submodule repository.
So the following combined commands can be used to pull the remote submodule
updates (e.g. Updating to new supported OpenSSL release)
  $ git pull –-recurse-submodules && \
    git submodule update -–recursive --remote

Cc: Ye Ting <ting.ye@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
.gitmodules [new file with mode: 0644]
CryptoPkg/.gitignore [deleted file]
CryptoPkg/Library/OpensslLib/OpenSSL-HOWTO.txt
CryptoPkg/Library/OpensslLib/openssl [new submodule]

diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..e4ae0c1
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "CryptoPkg/Library/OpensslLib/openssl"]
+       path = CryptoPkg/Library/OpensslLib/openssl
+       url = https://github.com/openssl/openssl
diff --git a/CryptoPkg/.gitignore b/CryptoPkg/.gitignore
deleted file mode 100644 (file)
index 731c275..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Library/OpensslLib/openssl*/\r
index d1521381290b7271239c97fd106353d555c2c545..ac63d4c077960271df9c3fe0388d35c9f820f393 100644 (file)
@@ -25,21 +25,22 @@ on the cryptography.
 =============================================================================\r
                       HOW to Install OpenSSL for UEFI Building\r
 =============================================================================\r
-1. Clone the latest official OpenSSL release into the directory\r
-     CryptoPkg/Library/OpensslLib/openssl/\r
+  OpenSSL repository was added as one submodule of EDKII project.\r
 \r
-   Use OpenSSL-1.1.0g release as one example:\r
-     (OpenSSL_1_1_0g below is the tag name for the OpenSSL-1.1.0g release)\r
-     > cd CryptoPkg/Library/OpensslLib\r
-     > git clone -b OpenSSL_1_1_0g https://github.com/openssl/openssl openssl\r
-     or\r
-     > git clone https://github.com/openssl/openssl openssl\r
-     > git checkout OpenSSL_1_1_0g\r
-Or\r
-2. Download the latest OpenSSL release package from the official website:\r
-     https://www.openssl.org/source/\r
-   and unpack the OpenSSL source into:\r
-     CryptoPkg/Library/OpensslLib/openssl/\r
+  The user can use the following commands to clone both main EDKII repo and\r
+openssl submodule:\r
+  1) Add the "--recursive" flag to the git clone command:\r
+     $ git clone --recursive https://github.com/tianocore/edk2\r
+or\r
+  2) Manually initialize and update the submodules after the clone operation\r
+     on main project:\r
+     $ git clone https://github.com/tianocore/edk2\r
+     $ git submodule update --init --recursive\r
+\r
+  And use the following combined commands to pull the remote submodule updates\r
+(e.g. Updating the new supported OpenSSL release tag):\r
+     $ git pull --recurse-submodules && \\r
+       git submodule update --recursive --remote\r
 \r
 =============================================================================\r
                       About process_files.pl\r
diff --git a/CryptoPkg/Library/OpensslLib/openssl b/CryptoPkg/Library/OpensslLib/openssl
new file mode 160000 (submodule)
index 0000000..b2758a2
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit b2758a2292aceda93e9f44c219b94fe21bb9a650