Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
4665303c
Commit
4665303c
authored
Nov 21, 2017
by
Lee Verberne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a version string to pause.c
The version string is based on the TAG and revision. Also: * Bump the TAG to 3.1 * Update the arm compiler binary used in kube-cross
parent
8d24ce11
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
Makefile
build/pause/Makefile
+4
-3
pause.c
build/pause/pause.c
+19
-2
No files found.
build/pause/Makefile
View file @
4665303c
...
@@ -18,14 +18,15 @@ REGISTRY ?= k8s.gcr.io
...
@@ -18,14 +18,15 @@ REGISTRY ?= k8s.gcr.io
IMAGE
=
$(REGISTRY)
/pause-
$(ARCH)
IMAGE
=
$(REGISTRY)
/pause-
$(ARCH)
LEGACY_AMD64_IMAGE
=
$(REGISTRY)
/pause
LEGACY_AMD64_IMAGE
=
$(REGISTRY)
/pause
TAG
=
3.0
TAG
=
3.1
REV
=
$(
shell
git describe
--contains
--always
--match
=
'v*'
)
# Architectures supported: amd64, arm, arm64, ppc64le and s390x
# Architectures supported: amd64, arm, arm64, ppc64le and s390x
ARCH
?=
amd64
ARCH
?=
amd64
ALL_ARCH
=
amd64 arm arm64 ppc64le s390x
ALL_ARCH
=
amd64 arm arm64 ppc64le s390x
CFLAGS
=
-Os
-Wall
-Werror
-static
CFLAGS
=
-Os
-Wall
-Werror
-static
-DVERSION
=
v
$(TAG)
-
$(REV)
KUBE_CROSS_IMAGE
?=
k8s.gcr.io/kube-cross
KUBE_CROSS_IMAGE
?=
k8s.gcr.io/kube-cross
KUBE_CROSS_VERSION
?=
$(
shell
cat
../build-image/cross/VERSION
)
KUBE_CROSS_VERSION
?=
$(
shell
cat
../build-image/cross/VERSION
)
...
@@ -37,7 +38,7 @@ ifeq ($(ARCH),amd64)
...
@@ -37,7 +38,7 @@ ifeq ($(ARCH),amd64)
endif
endif
ifeq
($(ARCH),arm)
ifeq
($(ARCH),arm)
TRIPLE
?=
arm-linux-gnueabi
TRIPLE
?=
arm-linux-gnueabi
hf
endif
endif
ifeq
($(ARCH),arm64)
ifeq
($(ARCH),arm64)
...
...
build/pause/pause.c
View file @
4665303c
...
@@ -17,20 +17,37 @@ limitations under the License.
...
@@ -17,20 +17,37 @@ limitations under the License.
#include <signal.h>
#include <signal.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/wait.h>
#include <unistd.h>
#include <unistd.h>
#define STRINGIFY(x) #x
#define VERSION_STRING(x) STRINGIFY(x)
#ifndef VERSION
#define VERSION HEAD
#endif
static
void
sigdown
(
int
signo
)
{
static
void
sigdown
(
int
signo
)
{
psignal
(
signo
,
"Shutting down, got signal"
);
psignal
(
signo
,
"Shutting down, got signal"
);
exit
(
0
);
exit
(
0
);
}
}
static
void
sigreap
(
int
signo
)
{
static
void
sigreap
(
int
signo
)
{
while
(
waitpid
(
-
1
,
NULL
,
WNOHANG
)
>
0
);
while
(
waitpid
(
-
1
,
NULL
,
WNOHANG
)
>
0
)
;
}
}
int
main
()
{
int
main
(
int
argc
,
char
**
argv
)
{
int
i
;
for
(
i
=
1
;
i
<
argc
;
++
i
)
{
if
(
!
strcasecmp
(
argv
[
i
],
"-v"
))
{
printf
(
"pause.c %s
\n
"
,
VERSION_STRING
(
VERSION
));
return
0
;
}
}
if
(
getpid
()
!=
1
)
if
(
getpid
()
!=
1
)
/* Not an error because pause sees use outside of infra containers. */
/* Not an error because pause sees use outside of infra containers. */
fprintf
(
stderr
,
"Warning: pause should be the first process
\n
"
);
fprintf
(
stderr
,
"Warning: pause should be the first process
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment