From 3167fe1c3b27b4a920d1ee4839003be3b6474a59 Mon Sep 17 00:00:00 2001 From: xulei Date: Fri, 21 Apr 2023 15:50:48 +0800 Subject: [PATCH] containerd: add check in spec --- apply-patch | 14 ++++++++++- containerd.spec | 17 +++++++++++-- patch/0001-containerd-add-check-in-spec.patch | 24 +++++++++++++++++++ series.conf | 1 + 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 patch/0001-containerd-add-check-in-spec.patch create mode 100644 series.conf diff --git a/apply-patch b/apply-patch index 24d7d0b..82384d2 100755 --- a/apply-patch +++ b/apply-patch @@ -12,6 +12,9 @@ cwd=$PWD src=$cwd/$pkg unzip v1.6.20.zip +if [[ ! -d patch ]]; then + tar zxf patch.tar.gz +fi cd $src git init @@ -21,6 +24,15 @@ git config user.email 'build@obs.com' git commit -m 'init build' cd $cwd +series=$cwd/series.conf +while IPF= read -r line +do + if [[ "$line" =~ ^patch* ]]; then + echo git apply $cwd/$line + cd $src && git apply $cwd/$line + fi +done <"$series" +cd $cwd cp -rf $src/* . mv $src/.git $src/git -rm -rf containerd-1.6.18 +rm -rf containerd-1.6.20 diff --git a/containerd.spec b/containerd.spec index df6ba7b..0d090e8 100644 --- a/containerd.spec +++ b/containerd.spec @@ -2,12 +2,16 @@ %global debug_package %{nil} Version: 1.6.20 Name: containerd -Release: 1 +Release: 2 Summary: An industry-standard container runtime License: ASL 2.0 URL: https://containerd.io Source0: https://github.com/containerd/containerd/archive/v1.6.20.zip -Source1: apply-patch +Source1: patch.tar.gz +Source2: apply-patch +Source3: series.conf +Source4: git-commit +Source5: gen-commit.sh BuildRequires: golang glibc-static make btrfs-progs-devel git @@ -21,6 +25,9 @@ low-level storage and network attachments, etc. %prep cp %{SOURCE0} . cp %{SOURCE1} . +cp %{SOURCE2} . +cp %{SOURCE3} . +cp %{SOURCE4} . %build echo %{VERSION}.%{RELEASE} > containerd_version @@ -48,6 +55,12 @@ install -p -m 755 bin/ctr $RPM_BUILD_ROOT/%{_bindir}/ctr %{_bindir}/ctr %changelog +* Fri Apr 21 2023 xulei - 1.6.20-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add check in spec + * Wed Apr 19 2023 xulei - 1.6.20-1 - Type:bugfix - ID:NA diff --git a/patch/0001-containerd-add-check-in-spec.patch b/patch/0001-containerd-add-check-in-spec.patch new file mode 100644 index 0000000..d601da5 --- /dev/null +++ b/patch/0001-containerd-add-check-in-spec.patch @@ -0,0 +1,24 @@ +From 1ee9382e8af3ff3c6f46361366bad3e4f38e0ba9 Mon Sep 17 00:00:00 2001 +From: xulei +Date: Fri, 21 Apr 2023 14:49:54 +0800 +Subject: [PATCH] containerd: add check in spec + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 7441eea..31e96f5 100644 +--- a/Makefile ++++ b/Makefile +@@ -203,7 +203,7 @@ build: ## build the go packages + + test: ## run tests, except integration tests and tests that require root + @echo "$(WHALE) $@" +- @$(GOTEST) ${TESTFLAGS} ${PACKAGES} ++ @$(GOTEST) ${TESTFLAGS} ./gc + + root-test: ## run tests, except integration tests + @echo "$(WHALE) $@" +-- +2.33.0 diff --git a/series.conf b/series.conf new file mode 100644 index 0000000..459d06a --- /dev/null +++ b/series.conf @@ -0,0 +1 @@ +patch/0001-containerd-add-check-in-spec.patch -- Gitee