Skip to content

Commit f5774b1

Browse files
committed
builder: Correct the RPM packaging script
Signed-off-by: cfc4n <cfc4n.cs@gmail.com>
1 parent 10913ba commit f5774b1

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
make env
5353
make -f builder/Makefile.release release SNAPSHOT_VERSION=${{ steps.get_tags.outputs.VERSION }}
5454
55-
build-on-ubuntu2004-arm64:
55+
build-on-ubuntu2204-arm64:
5656
runs-on: ubuntu-22.04
5757
name: build on ubuntu-22.04 arm64
5858
# Run steps on a matrix of 3 arch/distro combinations

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ TAG := $(shell git describe --abbrev=0 --tags ${TAG_COMMIT} 2>/dev/null || true)
134134
COMMIT := $(shell git rev-parse --short HEAD)
135135
DATE := $(shell git log -1 --format=%cd --date=format:"%Y%m%d")
136136
LAST_GIT_TAG := $(TAG:v%=%)-$(DATE)-$(COMMIT)
137+
RPM_RELEASE := $(DATE).$(COMMIT)
137138
#ifneq ($(COMMIT), $(TAG_COMMIT))
138139
# LAST_GIT_TAG := $(LAST_GIT_TAG)-prev-$(TAG_COMMIT)
139140
#endif
@@ -251,13 +252,13 @@ env:
251252
@echo ---------------------------------------
252253

253254
ECAPTURE_NAME = $(shell $(CMD_GREP) "Name:" builder/rpmBuild.spec | $(CMD_AWK) '{print $$2}')
254-
RPM_SOURCE0 = $(ECAPTURE_NAME)-$(ECAPTURE_VERSION).tar.gz
255+
RPM_SOURCE0 = $(ECAPTURE_NAME)-$(TAG).tar.gz
255256

256257
.PHONY:rpm
257258
rpm:
258259
@$(CMD_RPM_SETUP_TREE)
259-
$(CMD_SED) -i '0,/^Version:.*$$/s//Version: $(VERSION)/' builder/rpmBuild.spec
260-
$(CMD_SED) -i '0,/^Release:.*$$/s//Release: $(RELEASE)/' builder/rpmBuild.spec
260+
$(CMD_SED) -i '0,/^Version:.*$$/s//Version: $(TAG)/' builder/rpmBuild.spec
261+
$(CMD_SED) -i '0,/^Release:.*$$/s//Release: $(RPM_RELEASE)/' builder/rpmBuild.spec
261262
$(CMD_TAR) zcvf ~/rpmbuild/SOURCES/$(RPM_SOURCE0) ./
262263
$(CMD_RPMBUILD) -ba builder/rpmBuild.spec
263264

builder/rpmBuild.spec

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: ecapture
2-
Version:
3-
Release:
2+
Version: v0.0.1
3+
Release: 2023%{?dist}
44
Summary: capture SSL/TLS text content without CA cert using eBPF
55
License: AGPL-3.0
66
URL: https://ecapture.cc
@@ -11,6 +11,9 @@ Source0: %{name}-%{version}.tar.gz
1111

1212
BuildRequires: make
1313
BuildRequires: clang
14+
BuildRequires: golang
15+
BuildRequires: elfutils
16+
1417

1518
%description
1619
SSL/TLS plaintext capture,
@@ -34,13 +37,24 @@ make
3437
rm -rf %{buildroot}
3538
mkdir -p %{buildroot}/usr/local/bin/
3639
install -m 755 bin/ecapture %{buildroot}/usr/local/bin/ecapture
40+
eu-strip %{buildroot}/usr/local/bin/ecapture
41+
42+
%post
43+
echo "eCapture has been installed in the /usr/local/bin directory."
44+
echo "Please ensure that /usr/local/bin is in your \$PATH.Or used /usr/local/bin/ecapture instead."
3745

3846
%files
3947
/usr/local/bin/ecapture
4048

4149
%changelog
42-
* Sun Apr 2 2023 BellaZhang <bella@cclinux.org> - 0.5.0-1
43-
- Support for capturing plaintext communication of TLS/HTTPS encrypted
44-
programs written in Golang.
45-
- Refactored the way parameters are obtained from Golang
46-
ABI (supports two types of ABI on registers-based and stack-based).
50+
* Sat Dec 30 2023 CFC4N <cfc4ncs@gmail.com> - 0.7.0-1
51+
- Split `nss/gnutls/openssl` into three separate submodules. Corresponding to the `./ecapture nss`, `./ecapture gnutls`, `ecapture tls` commands.
52+
- Support `keylog` mode, equivalent to the functionality of the `SSLKEYLOGFILE` environment variable. Captures SSL/TLS communication keys directly without the need for changes in the target process.
53+
- Refactor the mode parameters supported by the `openssl`(aka tls) module using the `-m`parameter, with values `text`, `pcap`,`keylog`.
54+
- `pcap` mode: Set with `-m pcap` or `-m pcapng` parameters. When using this mode, it is necessary to specify `--pcapfile` and `-i` parameters. The default value for the `--pcapfile` parameter is `ecapture_openssl.pcapng`.
55+
- `keylog` mode: Set with `-m keylog` or `-m key` parameters. When using this mode, it is necessary to specify `--keylogfile`, defaulting to `ecapture_masterkey.log`.
56+
- `text` mode: Default mode when `-m` parameter is unspecified. Outputs all plaintext packets in text form. (As of v0.7.0, no longer captures communication keys, please use `keylog` mode instead.)
57+
- Refactor the mode parameters supported by the `gotls` module, similar to the `openssl` module, without further details.
58+
- Optimize the memory size of eBPF Map, specify with the `--mapsize` parameter, defaulting to 5120 KB.
59+
- Remove the `-w` parameter, use `--pcapfile` parameter instead.
60+
- Change `log-addr` parameter to `logaddr`, with unchanged functionality.

0 commit comments

Comments
 (0)