Skip to content

Commit

Permalink
Merge pull request #5195 from nalind/entrypoint
Browse files Browse the repository at this point in the history
internal/mkcw/embed/entrypoint.gz: compress with -n9
  • Loading branch information
openshift-merge-bot[bot] authored Nov 29, 2023
2 parents bf4eb90 + 1f91035 commit 4176dba
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@ static:
mkdir -p ./bin
cp -rfp ./result/bin/* ./bin/

bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint.gz
bin/buildah: $(SOURCES) cmd/buildah/*.go internal/mkcw/embed/entrypoint_amd64.gz
$(GO_BUILD) $(BUILDAH_LDFLAGS) $(GO_GCFLAGS) "$(GOGCFLAGS)" -o $@ $(BUILDFLAGS) ./cmd/buildah

ifneq ($(shell as --version | grep x86_64),)
internal/mkcw/embed/entrypoint.gz: internal/mkcw/embed/entrypoint
$(RM) $@
gzip -k $^
internal/mkcw/embed/entrypoint_amd64.gz: internal/mkcw/embed/entrypoint_amd64
gzip -k9nf $^

internal/mkcw/embed/entrypoint: internal/mkcw/embed/entrypoint.s
internal/mkcw/embed/entrypoint_amd64: internal/mkcw/embed/entrypoint_amd64.s
$(AS) -o $(patsubst %.s,%.o,$^) $^
$(LD) -o $@ $(patsubst %.s,%.o,$^)
strip $@
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ msg:
.globl _start
.type _start,@function
_start:
movq $1, %rax # write
movq $2, %rdi # fd=stderr_fileno
movq $msg, %rsi # message
movq $75, %rdx # length
movq $1, %rax # write
movq $2, %rdi # fd=stderr_fileno
movq $msg, %rsi # message
movq $75, %rdx # length
syscall
movq $60, %rax # exit
movq $1, %rdi # status=1
movq $60, %rax # exit
movq $1, %rdi # status=1
syscall
.section .note.GNU-stack,"",@progbits
2 changes: 1 addition & 1 deletion internal/mkcw/entrypoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package mkcw

import _ "embed"

//go:embed "embed/entrypoint.gz"
//go:embed "embed/entrypoint_amd64.gz"
var entrypointCompressedBytes []byte
4 changes: 2 additions & 2 deletions tests/run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function configure_and_check_user() {

# Create the container.
_prefetch alpine
run_buildah from $WITH_POLICY_JSON alpine
run_buildah from --quiet --pull=false $WITH_POLICY_JSON alpine
ctr="$output"

# Test user can create file in the mounted volume.
Expand All @@ -387,7 +387,7 @@ function configure_and_check_user() {

# Create the container.
_prefetch alpine
run_buildah from $WITH_POLICY_JSON alpine
run_buildah from --quiet --pull=false $WITH_POLICY_JSON alpine
ctr="$output"

# Run with uid:gid 1000:1000 and verify if gid is present in additional groups
Expand Down

0 comments on commit 4176dba

Please sign in to comment.