diff options
author | Arnstein Ressem <aressem@yahooinc.com> | 2022-07-18 23:54:23 +0200 |
---|---|---|
committer | Arnstein Ressem <aressem@yahooinc.com> | 2022-07-18 23:54:23 +0200 |
commit | 54030f067b4014b4cf3be2f7f7e5bbbed4b6e4dc (patch) | |
tree | 0c18b7b113cd54ba4455652b648644d51605c8e5 | |
parent | 74944c0b3b5941acfff055b9b003e293842285c5 (diff) |
Remove old rpm build system. Update repo definition.
-rw-r--r-- | .copr/Makefile | 6 | ||||
-rw-r--r-- | dist/vespa-engine.repo | 8 | ||||
-rw-r--r-- | docker/.gitignore | 3 | ||||
-rw-r--r-- | docker/OWNERS | 1 | ||||
-rw-r--r-- | docker/README.md | 26 | ||||
-rwxr-xr-x | docker/build-vespa.sh | 18 | ||||
-rwxr-xr-x | docker/build/build-vespa-internal.sh | 45 |
7 files changed, 10 insertions, 97 deletions
diff --git a/.copr/Makefile b/.copr/Makefile index bb37e1c4401..c1d72525053 100644 --- a/.copr/Makefile +++ b/.copr/Makefile @@ -17,7 +17,11 @@ srpm: deps rpmbuild -bs --define "_topdir $(RPMTOPDIR)" $(SPECDIR)/vespa-$(VESPA_VERSION).spec cp -a $(RPMTOPDIR)/SRPMS/* $(outdir) +rpms: srpm + rpmbuild --rebuild $(outdir)/*.src.rpm + cp -a $(RPMTOPDIR)/RPMS/*/*.rpm $(outdir) + clean: -rm -rf $(RPMTOPDIR) -.PHONY: clean deps srpm +.PHONY: clean deps srpm rpms diff --git a/dist/vespa-engine.repo b/dist/vespa-engine.repo index 33d439a9572..de436eb16ad 100644 --- a/dist/vespa-engine.repo +++ b/dist/vespa-engine.repo @@ -1,8 +1,10 @@ -[vespa-engine-stable] -name=vespa-engine-stable -baseurl=https://download.copr.fedorainfracloud.org/results/@vespa/vespa/epel-7-$basearch/ +[copr:copr.fedorainfracloud.org:group_vespa:vespa] +name=Copr repo for vespa owned by @vespa +baseurl=https://download.copr.fedorainfracloud.org/results/@vespa/vespa/centos-stream-8-$basearch/ type=rpm-md +skip_if_unavailable=True gpgcheck=1 gpgkey=https://download.copr.fedorainfracloud.org/results/@vespa/vespa/pubkey.gpg repo_gpgcheck=0 enabled=1 +enabled_metadata=1 diff --git a/docker/.gitignore b/docker/.gitignore deleted file mode 100644 index 712576eb374..00000000000 --- a/docker/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.rpm -logs/ -tmp/ diff --git a/docker/OWNERS b/docker/OWNERS deleted file mode 100644 index 485a8c4be74..00000000000 --- a/docker/OWNERS +++ /dev/null @@ -1 +0,0 @@ -aressem diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 18ab6648f3e..00000000000 --- a/docker/README.md +++ /dev/null @@ -1,26 +0,0 @@ -<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> - -# Building Vespa RPM on Docker (OS X and Linux) - -## Installing docker -[Docker installation](https://docs.docker.com/engine/installation/) - -*On Linux, the default storage device is devicemapper with loopback device and max 10GB container size. This size is too small for a full build. Please see [here](http://www.projectatomic.io/blog/2016/03/daemon_option_basedevicesize/) and [here](http://www.projectatomic.io/blog/2015/06/notes-on-fedora-centos-and-docker-storage-drivers/) to overcome this limitation.* - - -## Building Vespa RPM -Execute ```./build-vespa.sh <Vespa version number>``` to build Vespa from this source code. - -The produced rpms will be available in this folder after compilation. -The version number will be compiled into binaries and must be on the form x.y.z, like 7.1.2 - -but has no other meaning than that. - - -## Troubleshooting -- Use ```docker logs CONTAINER``` for output - useful if the commands above fail. - -- If the build fails, start from scratch and build again. Clean local docker if docker image disk full: - - ```docker rm -v $(docker ps -a -q -f status=exited)``` - - ```docker rmi $(docker images -f "dangling=true" -q)``` - -- _Directory renamed before its status could be extracted_ can be caused by [1219](https://github.com/docker/for-mac/issues/1219) - workaround (from the issue): "It may be an overlay storage driver issue - you can add ```{"storage-driver":"aufs"}``` in the advanced daemon preferences pane and see if that makes a difference." diff --git a/docker/build-vespa.sh b/docker/build-vespa.sh deleted file mode 100755 index f7b106b7800..00000000000 --- a/docker/build-vespa.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -set -e - -if [ $# -ne 1 ]; then - echo "Usage: $0 <vespa version>" - exit 1 -fi - -DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) -cd $DIR - -VESPA_VERSION=$1 -DOCKER_IMAGE="centos:7" - -docker pull ${DOCKER_IMAGE} - -docker run --rm -v $(pwd)/..:/vespa -w /vespa --entrypoint /vespa/docker/build/build-vespa-internal.sh "$DOCKER_IMAGE" "$VESPA_VERSION" "$(id -u)" "$(id -g)" diff --git a/docker/build/build-vespa-internal.sh b/docker/build/build-vespa-internal.sh deleted file mode 100755 index dada151a29f..00000000000 --- a/docker/build/build-vespa-internal.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -set -e - -if [ $# -ne 3 ]; then - echo "Usage: $0 <vespa version> <caller uid> <caller gid>" - echo "This script should not be called manually." - exit 1 -fi -VESPA_VERSION=$1 -CALLER_UID=$2 -CALLER_GID=$3 - -if ! [ -x ./dist.sh ]; then - echo ". is not a vespa-engine/vespa root directory" - exit 1 -fi - -./dist.sh ${VESPA_VERSION} - -yum -y install epel-release -yum -y install centos-release-scl - -if ! yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/g/vespa/vespa/repo/epel-7/group_vespa-vespa-epel-7.repo; then - cat << 'EOF' > /etc/yum.repos.d/vespa-release.repo -[vespa-release] -name=Vespa releases -baseurl=https://verizonmedia.jfrog.io/artifactory/vespa/centos/$releasever/release/$basearch -gpgcheck=0 -enabled=1 -EOF -fi - -yum-builddep -y \ - --setopt="base-source.skip_if_unavailable=true" \ - --setopt="updates-source.skip_if_unavailable=true" \ - --setopt="extras-source.skip_if_unavailable=true" \ - --setopt="epel-source.skip_if_unavailable=true" \ - --setopt="centos-sclo-rh-source.skip_if_unavailable=true" \ - --setopt="centos-sclo-sclo-source.skip_if_unavailable=true" \ - ~/rpmbuild/SPECS/vespa-${VESPA_VERSION}.spec - -rpmbuild -bb ~/rpmbuild/SPECS/vespa-${VESPA_VERSION}.spec -chown ${CALLER_UID}:${CALLER_GID} ~/rpmbuild/RPMS/x86_64/*.rpm -mv ~/rpmbuild/RPMS/x86_64/*.rpm docker |