Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CircleLinux rpm and mannul build support #345

Merged
merged 1 commit into from
Apr 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*.dll
*.so
*.dylib
*.d
*.o

# Test binary, built with `go test -c`
*.test
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,26 @@ Linux Kernel: >= 4.18.
* kernel config:CONFIG_DEBUG_INFO_BTF=y (Optional, 2022-04-17)

## command

### Circle Linux
If you are using CircleLinux 8 or latest versions, you can use a dnf or yum to install it or compile it.

- dnf or yum
```
dnf install -y ecapture
```

- Build it mannul
```
dnf install clang golang make

make

./bin/ecapture --help

```


### ubuntu
If you are using Ubuntu 20.04 or later versions, you can use a single command to complete the initialization of the compilation environment.
```shell
Expand Down
18 changes: 18 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,24 @@ ps -ef | grep foo

## 编译环境

### Circle Linux
如果您使用 CircleLinux 8 及以上版本,这里提供两种安装方式:

- rpm包安装方式,可以在CircleLinux官方源安装
```
dnf install -y ecapture
```

- 源码编译安装
```
dnf install clang golang make

make

./bin/ecapture --help

```

### ubuntu
如果你使用的是ubuntu 20.04以及更新版本,可以使用一条命令即可完成编译环境的初始化。
```shell
Expand Down
18 changes: 12 additions & 6 deletions builder/rpmBuild.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ License: AGPL-3.0
URL: https://ecapture.cc
Source0: %{name}-%{version}.tar.gz

BuildRequires: make,clang
%global _missing_build_ids_terminate_build 0
%define debug_package %{nil}

BuildRequires: make
BuildRequires: clang
BuildRequires: golang

%description
SSL/TLS plaintext capture,
Expand All @@ -22,8 +27,8 @@ MySQL query SQL audit, support mysqld 5.6/5.7/8.0, and mariadDB.

%prep
%setup -c

%build
cd ../
make

%install
Expand All @@ -35,7 +40,8 @@ install -m 755 bin/ecapture %{buildroot}/usr/local/bin/ecapture
/usr/local/bin/ecapture

%changelog
* Sun Apr 2 2023 ecapture - 0.5.0
- Support for capturing plaintext communication of TLS/HTTPS encrypted programs written in Golang.
- Refactored the way parameters are obtained from Golang ABI (supports two types of ABI on registers-based and stack-based).
%autochangelog
* Sun Apr 2 2023 BellaZhang <[email protected]> - 0.5.0-1
- Support for capturing plaintext communication of TLS/HTTPS encrypted
programs written in Golang.
- Refactored the way parameters are obtained from Golang
ABI (supports two types of ABI on registers-based and stack-based).
4 changes: 2 additions & 2 deletions builder/rpm_build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ rpmdev-setuptree
name=$(grep "Name:" rpmBuild.spec | awk '{print $2}')
version=$(grep "Version:" rpmBuild.spec | awk '{print $2}')
source0=$name-$version.tar.gz
tar zcvf ~/rpmbuild/SOURCES/$source0 ./
rpmbuild -bb rpmBuild.spec
tar zcvf ~/rpmbuild/SOURCES/$source0 ../
rpmbuild -ba rpmBuild.spec