You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by zk...@apache.org on 2023/01/06 04:02:54 UTC

[incubator-devlake-website] branch main updated: fix(plugins): update libgit2 installation (#375)

This is an automated email from the ASF dual-hosted git repository.

zky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 3de36ec3f fix(plugins): update libgit2 installation (#375)
3de36ec3f is described below

commit 3de36ec3fd40d35106bc1faf44a93784751a34fd
Author: Warren Chen <yi...@merico.dev>
AuthorDate: Fri Jan 6 12:02:49 2023 +0800

    fix(plugins): update libgit2 installation (#375)
---
 docs/Plugins/gitextractor.md | 74 ++++++++++++++++++++++++++++++++++++++++++--
 docs/Plugins/refdiff.md      | 74 ++------------------------------------------
 2 files changed, 74 insertions(+), 74 deletions(-)

diff --git a/docs/Plugins/gitextractor.md b/docs/Plugins/gitextractor.md
index c524a616d..a357a845e 100644
--- a/docs/Plugins/gitextractor.md
+++ b/docs/Plugins/gitextractor.md
@@ -58,7 +58,77 @@ For more options (e.g., saving to a csv file instead of a db), please read `plug
 
 ## Development
 
-This plugin depends on `libgit2`, you need to install version 1.3.0 in order to run and debug this plugin on your local
-machine. [Click here](./refdiff.md#Development) for a brief guide.
+This plugin depends on `libgit2`, you need to install version 1.3.0 to run and debug this plugin on your local
+machine.
+
+### Linux
+
+```
+1. require cmake
+[ubuntu]
+apt install cmake -y
+[centos]
+yum install cmake -y
+
+2. compiling
+git clone -b v1.3.0 https://github.com/libgit2/libgit2.git && cd libgit2
+mkdir build && cd build && cmake ..
+make && make install
+
+3.PKG_CONFIG and LD_LIBRARY_PATH
+[centos]
+export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64:/usr/local/lib64/pkgconfig
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64
+[ubuntu]
+export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib:/usr/local/lib/pkgconfig
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
+```
+
+#### Troubleshooting (Linux)
+
+> Q: # pkg-config --cflags -- libgit2 Package libgit2 was not found in the pkg-config search path.
+> Perhaps you should add the directory containing `libgit2.pc` to the PKG_CONFIG_PATH environment variable
+> No package 'libgit2' found pkg-config: exit status 1
+
+> A:
+> Make sure your pkg config path covers the installation:
+> if your libgit2.pc in `/usr/local/lib64/pkgconfig`(like centos)
+>
+> `export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64:/usr/local/lib64/pkgconfig`
+>
+> else if your libgit2.pc in `/usr/local/lib/pkgconfig`(like ubuntu)
+>
+> `export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib:/usr/local/lib/pkgconfig`
+>
+> else consider install pkgconfig or rebuild the libgit2
+
+### MacOS
+
+NOTE: **Do NOT** install libgit2 via `MacPorts` or `homebrew`, install from source instead.
+
+```
+brew install cmake
+git clone https://github.com/libgit2/libgit2.git
+cd libgit2
+git checkout v1.3.0
+mkdir build
+cd build
+cmake ..
+make
+make install
+```
+
+#### Troubleshooting (MacOS)
+
+> Q: I got an error saying: `pkg-config: exec: "pkg-config": executable file not found in $PATH`
+
+> A:
+>
+> 1. Make sure you have pkg-config installed:
+>
+> `brew install pkg-config`
+>
+> 2. Make sure your pkg config path covers the installation:
+     >    `export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib:/usr/local/lib/pkgconfig`
 
 <br/><br/><br/>
diff --git a/docs/Plugins/refdiff.md b/docs/Plugins/refdiff.md
index 5e86ff6c7..01be58de5 100644
--- a/docs/Plugins/refdiff.md
+++ b/docs/Plugins/refdiff.md
@@ -126,77 +126,7 @@ curl 'http://localhost:8080/pipelines' \
 
 ## Development
 
-This plugin depends on `libgit2`, you need to install version 1.3.0 to run and debug this plugin on your local
-machine.
-
-### Linux
-
-```
-1. require cmake
-[ubuntu]
-apt install cmake -y
-[centos]
-yum install cmake -y
-
-2. compiling
-git clone -b v1.3.0 https://github.com/libgit2/libgit2.git && cd libgit2
-mkdir build && cd build && cmake ..
-make && make install
-
-3.PKG_CONFIG and LD_LIBRARY_PATH
-[centos]
-export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64:/usr/local/lib64/pkgconfig
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64
-[ubuntu]
-export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib:/usr/local/lib/pkgconfig
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
-```
-
-#### Troubleshooting (Linux)
-
-> Q: # pkg-config --cflags -- libgit2 Package libgit2 was not found in the pkg-config search path.
-> Perhaps you should add the directory containing `libgit2.pc` to the PKG_CONFIG_PATH environment variable
-> No package 'libgit2' found pkg-config: exit status 1
-
-> A:
-> Make sure your pkg config path covers the installation:
-> if your libgit2.pc in `/usr/local/lib64/pkgconfig`(like centos)
->
-> `export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64:/usr/local/lib64/pkgconfig`
->
-> else if your libgit2.pc in `/usr/local/lib/pkgconfig`(like ubuntu)
->
-> `export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib:/usr/local/lib/pkgconfig`
->
-> else consider install pkgconfig or rebuild the libgit2
-
-### MacOS
-
-NOTE: **Do NOT** install libgit2 via `MacPorts` or `homebrew`, install from source instead.
-
-```
-brew install cmake
-git clone https://github.com/libgit2/libgit2.git
-cd libgit2
-git checkout v1.3.0
-mkdir build
-cd build
-cmake ..
-make
-make install
-```
-
-#### Troubleshooting (MacOS)
-
-> Q: I got an error saying: `pkg-config: exec: "pkg-config": executable file not found in $PATH`
-
-> A:
->
-> 1. Make sure you have pkg-config installed:
->
-> `brew install pkg-config`
->
-> 2. Make sure your pkg config path covers the installation:
->    `export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib:/usr/local/lib/pkgconfig`
+This plugin depends on `libgit2`, you need to install version 1.3.0 in order to run and debug this plugin on your local
+machine. [Click here](./gitextractor.md#Development) for a brief guide.
 
 <br/><br/><br/>