!6 runc: use git-commit to store commit ID
Merge pull request !6 from Vanient/master
This commit is contained in:
commit
2c74c3d91e
@ -10,6 +10,9 @@ cwd=$PWD
|
||||
src=$cwd/$pkg
|
||||
|
||||
unzip $pkg.zip
|
||||
if [ ! -d patch ];then
|
||||
tar -xzf patch.tar.gz
|
||||
fi
|
||||
|
||||
series=$cwd/series.conf
|
||||
while IPF= read -r line
|
||||
|
||||
12
gen-commit.sh
Executable file
12
gen-commit.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved.
|
||||
# Description: This shell script is used to generate commitID store file.
|
||||
# Author: xiadanni1@huawei.com
|
||||
# Create: 2020-06-09
|
||||
|
||||
changeID=`git log -1 | grep Change-Id | awk '{print $2}'`
|
||||
if [ "${changeID}" = "" ];then
|
||||
changeID=`date | sha256sum | head -c 40`
|
||||
fi
|
||||
echo "${changeID}" > git-commit
|
||||
1
git-commit
Normal file
1
git-commit
Normal file
@ -0,0 +1 @@
|
||||
Ib43bafb0ec680082520d85530ef783b68bc08671
|
||||
28
patch/0119-runc-use-git-commit-to-store-commit-ID.patch
Normal file
28
patch/0119-runc-use-git-commit-to-store-commit-ID.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 0eb0fdb40b1f1a80d07c95c59e391e44ea646b01 Mon Sep 17 00:00:00 2001
|
||||
From: xiadanni1 <xiadanni1@huawei.com>
|
||||
Date: Tue, 9 Jun 2020 01:52:46 +0800
|
||||
Subject: [PATCH] runc: use git-commit to store commit ID
|
||||
|
||||
Change-Id: I9b2e44691dafc2ced0523ed8423f3cb29bebd502
|
||||
Signed-off-by: xiadanni1 <xiadanni1@huawei.com>
|
||||
---
|
||||
Makefile | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index b24c22b..60d1d57 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -10,8 +10,7 @@ GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g")
|
||||
RUNC_IMAGE := runc_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN))
|
||||
PROJECT := github.com/opencontainers/runc
|
||||
BUILDTAGS := seccomp
|
||||
-COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true)
|
||||
-COMMIT := $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}")
|
||||
+COMMIT := $(shell cat ./git-commit | head -c 40)
|
||||
|
||||
MAN_DIR := $(CURDIR)/man/man8
|
||||
MAN_PAGES = $(shell ls $(MAN_DIR)/*.8)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -2,11 +2,16 @@
|
||||
|
||||
Name: docker-runc
|
||||
Version: 1.0.0.rc3
|
||||
Release: 104
|
||||
Release: 105
|
||||
Summary: runc is a CLI tool for spawning and running containers according to the OCI specification.
|
||||
|
||||
License: ASL 2.0
|
||||
Source: %{name}.tar.gz
|
||||
Source0: runc-1.0.0-rc3.zip
|
||||
Source1: patch.tar.gz
|
||||
Source2: apply-patch
|
||||
Source3: series.conf
|
||||
Source4: git-commit
|
||||
Source5: gen-commit.sh
|
||||
|
||||
URL: https://www.opencontainers.org/
|
||||
Vendor: OCI
|
||||
@ -18,10 +23,14 @@ BuildRequires: golang >= 1.8.3 glibc-static make libseccomp-devel libseccomp-sta
|
||||
runc is a CLI tool for spawning and running containers according to the OCI specification.
|
||||
|
||||
%prep
|
||||
%setup -c -n runc
|
||||
cp %{SOURCE0} .
|
||||
cp %{SOURCE1} .
|
||||
cp %{SOURCE2} .
|
||||
cp %{SOURCE3} .
|
||||
cp %{SOURCE4} .
|
||||
|
||||
%install
|
||||
./apply-patch
|
||||
sh ./apply-patch
|
||||
|
||||
mkdir -p .gopath/src/github.com/opencontainers
|
||||
export GOPATH=`pwd`/.gopath
|
||||
|
||||
@ -115,3 +115,4 @@
|
||||
0116-runc-check-nil-pointers-in-cgroup-manager.patch
|
||||
0117-runc-Pass-back-the-pid-of-runc-1-CHILD-so-w.patch
|
||||
0118-runc-rootfs-do-not-permit-proc-mounts-to-no.patch
|
||||
0119-runc-use-git-commit-to-store-commit-ID.patch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user