Skip to content

Commit

Permalink
Move python code from contrib to it's own repo python-podman
Browse files Browse the repository at this point in the history
Signed-off-by: Jhon Honce <[email protected]>
  • Loading branch information
jwhonce committed Jan 10, 2019
1 parent 2169b9f commit 45fb935
Show file tree
Hide file tree
Showing 103 changed files with 5 additions and 7,767 deletions.
12 changes: 0 additions & 12 deletions .papr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ pwd
# -t integration test
# -u unit test
# -v validate
# -p run python tests

build=0
install=0
integrationtest=0
unittest=0
validate=0
runpython=0
options=0
install_tools_made=0

Expand All @@ -44,9 +42,6 @@ while getopts "biptuv" opt; do
i) install=1
options=1
;;
p) runpython=1
options=1
;;
t) integrationtest=1
options=1
;;
Expand Down Expand Up @@ -124,18 +119,11 @@ if [ $install -eq 1 ]; then
make TAGS="${TAGS}" install.man PREFIX=/usr ETCDIR=/etc
make TAGS="${TAGS}" install.cni PREFIX=/usr ETCDIR=/etc
make TAGS="${TAGS}" install.systemd PREFIX=/usr ETCDIR=/etc
if [ $runpython -eq 1 ]; then
make TAGS="${TAGS}" install.python PREFIX=/usr ETCDIR=/etc
fi

fi

# Run integration tests
if [ $integrationtest -eq 1 ]; then
make TAGS="${TAGS}" test-binaries
make varlink_generate GOPATH=/go
if [ $runpython -eq 1 ]; then
make clientintegration GOPATH=/go
fi
make ginkgo GOPATH=/go $INTEGRATION_TEST_ENVS
fi
4 changes: 1 addition & 3 deletions .papr_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ set -xeuo pipefail
DIST=${DIST:=Fedora}
CONTAINER_RUNTIME=${CONTAINER_RUNTIME:=docker}
IMAGE=fedorapodmanbuild
PYTHON=python3
if [[ ${DIST} != "Fedora" ]]; then
IMAGE=centospodmanbuild
PYTHON=python
fi

# Since CRIU 3.11 has been pushed to Fedora 28 the checkpoint/restore
Expand All @@ -21,4 +19,4 @@ modprobe iptable_nat || :
${CONTAINER_RUNTIME} build -t ${IMAGE} -f Dockerfile.${DIST} . 2>build.log

# Run the tests
${CONTAINER_RUNTIME} run --rm --privileged --net=host -v $PWD:/go/src/github.com/containers/libpod:Z --workdir /go/src/github.com/containers/libpod -e CGROUP_MANAGER=cgroupfs -e PYTHON=$PYTHON -e STORAGE_OPTIONS="--storage-driver=vfs" -e CRIO_ROOT="/go/src/github.com/containers/libpod" -e PODMAN_BINARY="/usr/bin/podman" -e CONMON_BINARY="/usr/libexec/podman/conmon" -e DIST=$DIST -e CONTAINER_RUNTIME=$CONTAINER_RUNTIME $IMAGE sh ./.papr.sh -b -i -t
${CONTAINER_RUNTIME} run --rm --privileged --net=host -v $PWD:/go/src/github.com/containers/libpod:Z --workdir /go/src/github.com/containers/libpod -e CGROUP_MANAGER=cgroupfs -e STORAGE_OPTIONS="--storage-driver=vfs" -e CRIO_ROOT="/go/src/github.com/containers/libpod" -e PODMAN_BINARY="/usr/bin/podman" -e CONMON_BINARY="/usr/libexec/podman/conmon" -e DIST=$DIST -e CONTAINER_RUNTIME=$CONTAINER_RUNTIME $IMAGE sh ./.papr.sh -b -i -t
9 changes: 0 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ RUN apt-get update && apt-get install -y \
libudev-dev \
protobuf-c-compiler \
protobuf-compiler \
python-minimal \
libglib2.0-dev \
libapparmor-dev \
btrfs-tools \
Expand All @@ -37,11 +36,6 @@ RUN apt-get update && apt-get install -y \
liblzma-dev \
netcat \
socat \
python3-pip \
python3-dateutil \
python3-setuptools \
python3-psutil \
python3-pytoml \
lsof \
xz-utils \
--no-install-recommends \
Expand Down Expand Up @@ -129,9 +123,6 @@ COPY cni/87-podman-bridge.conflist /etc/cni/net.d/87-podman-bridge.conflist
# Make sure we have some policy for pulling images
RUN mkdir -p /etc/containers && curl https://raw.githubusercontent.com/projectatomic/registries/master/registries.fedora -o /etc/containers/registries.conf

# Install python3 varlink module from pypi
RUN pip3 install varlink

COPY test/policy.json /etc/containers/policy.json
COPY test/redhat_sigstore.yaml /etc/containers/registries.d/registry.access.redhat.com.yaml

Expand Down
4 changes: 0 additions & 4 deletions Dockerfile.CentOS
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ RUN yum -y install btrfs-progs-devel \
runc \
make \
ostree-devel \
python \
python3-dateutil \
python3-psutil \
python3-pytoml \
lsof \
which\
golang-github-cpuguy83-go-md2man \
Expand Down
4 changes: 0 additions & 4 deletions Dockerfile.Fedora
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ RUN dnf -y install btrfs-progs-devel \
runc \
make \
ostree-devel \
python \
python3-dateutil \
python3-psutil \
python3-pytoml \
lsof \
which\
golang-github-cpuguy83-go-md2man \
Expand Down
29 changes: 2 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ ifneq (,$(findstring varlink,$(BUILDTAGS)))
endif
CONTAINER_RUNTIME := $(shell command -v podman 2> /dev/null || echo docker)

HAS_PYTHON3 := $(shell command -v python3 2>/dev/null)

BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions
OCIUMOUNTINSTALLDIR=$(PREFIX)/share/oci-umount/oci-umount.d

Expand Down Expand Up @@ -88,9 +86,6 @@ endif
lint: .gopathok varlink_generate
@echo "checking lint"
@./.tool/lint
# Not ready
# @$(MAKE) -C contrib/python/podman lint
# @$(MAKE) -C contrib/python/pypodman lint

gofmt:
find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+
Expand Down Expand Up @@ -122,12 +117,6 @@ bin/podman.cross.%: .gopathok
GOARCH="$${TARGET##*.}" \
$(GO) build -ldflags '$(LDFLAGS_PODMAN)' -tags '$(BUILDTAGS_CROSS)' -o "$@" $(PROJECT)/cmd/podman

python:
ifdef HAS_PYTHON3
$(MAKE) -C contrib/python/podman python-podman
$(MAKE) -C contrib/python/pypodman python-pypodman
endif

clean:
rm -rf \
.gopathok \
Expand All @@ -147,8 +136,6 @@ clean:
$(MANPAGES) ||:
find . -name \*~ -delete
find . -name \#\* -delete
$(MAKE) -C contrib/python/podman clean
$(MAKE) -C contrib/python/pypodman clean

libpodimage:
${CONTAINER_RUNTIME} build -t ${LIBPOD_IMAGE} .
Expand Down Expand Up @@ -181,18 +168,14 @@ localunit: test/goecho/goecho varlink_generate
ginkgo:
ginkgo -v -tags "$(BUILDTAGS)" -cover -flakeAttempts 3 -progress -trace -noColor test/e2e/.

localintegration: varlink_generate test-binaries clientintegration ginkgo
localintegration: varlink_generate test-binaries ginkgo

localsystem: .install.ginkgo .install.gomega
ginkgo -v -noColor test/system/

system.test-binary: .install.ginkgo .install.gomega
$(GO) test -c ./test/system

clientintegration:
$(MAKE) -C contrib/python/podman integration
$(MAKE) -C contrib/python/pypodman integration

perftest:
$ cd contrib/perftest;go build

Expand Down Expand Up @@ -230,7 +213,7 @@ changelog:
$(shell cat $(TMPFILE) >> changelog.txt)
$(shell rm $(TMPFILE))

install: .gopathok install.bin install.man install.cni install.systemd install.python
install: .gopathok install.bin install.man install.cni install.systemd

install.bin:
install ${SELINUXOPT} -d -m 755 $(BINDIR)
Expand Down Expand Up @@ -268,19 +251,13 @@ install.systemd:
install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.service ${SYSTEMDDIR}/io.podman.service
install ${SELINUXOPT} -m 644 contrib/varlink/podman.conf ${TMPFILESDIR}/podman.conf

install.python:
$(MAKE) DESTDIR=${DESTDIR} -C contrib/python/podman install
$(MAKE) DESTDIR=${DESTDIR} -C contrib/python/pypodman install

uninstall:
for i in $(filter %.1,$(MANPAGES)); do \
rm -f $(MANDIR)/man1/$$(basename $${i}); \
done; \
for i in $(filter %.5,$(MANPAGES)); do \
rm -f $(MANDIR)/man5/$$(basename $${i}); \
done
$(MAKE) -C contrib/python/pypodman uninstall
$(MAKE) -C contrib/python/podman uninstall

.PHONY: .gitvalidation
.gitvalidation: .gopathok
Expand Down Expand Up @@ -382,5 +359,3 @@ build-all-new-commits:
changelog \
validate \
install.libseccomp.sudo \
python \
clientintegration
5 changes: 0 additions & 5 deletions contrib/python/.gitignore

This file was deleted.

Loading

0 comments on commit 45fb935

Please sign in to comment.