From: Arvin Schnell Date: Wed, 16 Dec 2020 11:57:39 +0000 (+0100) Subject: - remove Travis support (replaced by GitHub Actions) X-Git-Tag: v0.8.15~2^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=4b0212617b4206eedc43020a4c028ef3ba048dbc;p=thirdparty%2Fsnapper.git - remove Travis support (replaced by GitHub Actions) --- diff --git a/.travis.debian.sh b/.travis.debian.sh deleted file mode 120000 index 5dd578c3..00000000 --- a/.travis.debian.sh +++ /dev/null @@ -1 +0,0 @@ -.travis.ubuntu.sh \ No newline at end of file diff --git a/.travis.fedora.sh b/.travis.fedora.sh deleted file mode 100755 index ae33c6e2..00000000 --- a/.travis.fedora.sh +++ /dev/null @@ -1,36 +0,0 @@ -#! /bin/bash - -set -e -x - -make -f Makefile.repo -make package - -# Build the binary package locally, use plain "rpmbuild" to make it simple. -# "osc build" is too resource hungry (builds a complete chroot from scratch). -# Moreover it does not work in a Docker container (it fails when trying to mount -# /proc and /sys in the chroot). -mkdir -p /root/rpmbuild/SOURCES -cp package/* /root/rpmbuild/SOURCES -rpmbuild -bb --with coverage -D "fedora_version $DOCKER_TAG" -D "jobs `nproc`" package/*.spec - -# test the %pre/%post scripts by installing/updating/removing the built packages -# ignore the dependencies to make the test easier, as a smoke test it's good enough -rpm -iv --force --nodeps /root/rpmbuild/RPMS/*/*.rpm -rpm -Uv --force --nodeps /root/rpmbuild/RPMS/*/*.rpm - -# smoke test, make sure snapper at least starts -snapper --version - -# Run the integration test -# Running it in the source tree ensures that the coverage report finds it -pushd /root/rpmbuild/BUILD/snapper-*/testsuite-real -./setup-and-run-all -popd - -# Coverage report -pushd /root/rpmbuild/BUILD/snapper-* -make coverage -popd - -# get the plain package names and remove all packages at once -rpm -ev --nodeps `rpm -q --qf '%{NAME} ' -p /root/rpmbuild/RPMS/**/*.rpm` diff --git a/.travis.leap.sh b/.travis.leap.sh deleted file mode 120000 index f8ff96b9..00000000 --- a/.travis.leap.sh +++ /dev/null @@ -1 +0,0 @@ -.travis.tumbleweed.sh \ No newline at end of file diff --git a/.travis.tumbleweed.sh b/.travis.tumbleweed.sh deleted file mode 100755 index ca96404b..00000000 --- a/.travis.tumbleweed.sh +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/bash - -set -e -x - -make -f Makefile.repo -make package - -# run the osc source validator to check the .spec and .changes locally -(cd package && /usr/lib/obs/service/source_validator) - -# Build the binary package locally, use plain "rpmbuild" to make it simple. -# "osc build" is too resource hungry (builds a complete chroot from scratch). -# Moreover it does not work in a Docker container (it fails when trying to mount -# /proc and /sys in the chroot). -cp package/* /usr/src/packages/SOURCES/ -rpmbuild -bb --with coverage -D "jobs `nproc`" package/*.spec - -# test the %pre/%post scripts by installing/updating/removing the built packages -# ignore the dependencies to make the test easier, as a smoke test it's good enough -rpm -iv --force --nodeps /usr/src/packages/RPMS/*/*.rpm -rpm -Uv --force --nodeps /usr/src/packages/RPMS/*/*.rpm - -# smoke test, make sure snapper at least starts -snapper --version - -# Run the integration test -# Running it in the source tree ensures that the coverage report finds it -pushd /usr/src/packages/BUILD/snapper-*/testsuite-real -./setup-and-run-all -popd - -# Coverage report -pushd /usr/src/packages/BUILD/snapper-* -make coverage -popd -# Must call coveralls-lcov from the git directory -BUILDDIR=(/usr/src/packages/BUILD/snapper-*) # expand glob -make -f Makefile.repo coveralls BUILDDIR="${BUILDDIR[@]}" - -# get the plain package names and remove all packages at once -rpm -ev --nodeps `rpm -q --qf '%{NAME} ' -p /usr/src/packages/RPMS/**/*.rpm` diff --git a/.travis.ubuntu.sh b/.travis.ubuntu.sh deleted file mode 100755 index 18f8d04d..00000000 --- a/.travis.ubuntu.sh +++ /dev/null @@ -1,18 +0,0 @@ -#! /bin/bash - -set -e -x - -make -f Makefile.repo - -# copy the Debian files to the expected place -cp -a dists/debian debian - -# build binary packages -dpkg-buildpackage -j`nproc` -rfakeroot -b - -# install the built packages -dpkg -i ../*.deb - -# smoke test, make sure snapper at least starts -snapper --version - diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d6c706d4..00000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: required -language: bash -services: - - docker - -# define the build matrix -env: - - BUILD_FLAVOR=tumbleweed DOCKER_TAG=latest YAST_REPO=openSUSE_Tumbleweed - - BUILD_FLAVOR=leap DOCKER_TAG=15.1 YAST_REPO=openSUSE_Leap_15.1_Update - - BUILD_FLAVOR=fedora DOCKER_TAG=31 - - BUILD_FLAVOR=ubuntu DOCKER_TAG=19.10 - - BUILD_FLAVOR=debian DOCKER_TAG=10 - -before_install: - # use the Dockerfile. file for building the image - - docker build -f Dockerfile.$BUILD_FLAVOR -t snapper-devel --build-arg BUILD_FLAVOR=$BUILD_FLAVOR --build-arg DOCKER_TAG=$DOCKER_TAG --build-arg YAST_REPO=$YAST_REPO . - -script: - # run the respective .travis..sh script - # (--privileged: integration tests mount a loopback device etc.) - - docker run --privileged -it -e COVERALLS_TOKEN="$COVERALLS_TOKEN" -e DOCKER_TAG=$DOCKER_TAG snapper-devel ./.travis.$BUILD_FLAVOR.sh diff --git a/Dockerfile.debian b/Dockerfile.debian deleted file mode 120000 index fd45f0f7..00000000 --- a/Dockerfile.debian +++ /dev/null @@ -1 +0,0 @@ -Dockerfile.ubuntu \ No newline at end of file diff --git a/Dockerfile.fedora b/Dockerfile.fedora deleted file mode 100644 index f3f127d4..00000000 --- a/Dockerfile.fedora +++ /dev/null @@ -1,36 +0,0 @@ -# https://docs.docker.com/engine/reference/builder/#from -ARG BUILD_FLAVOR -ARG DOCKER_TAG - -FROM ${BUILD_FLAVOR}:${DOCKER_TAG} - -RUN dnf -y install \ - acl \ - autoconf \ - automake \ - boost-devel \ - btrfs-progs \ - dbus-devel \ - docbook-style-xsl \ - e2fsprogs-devel \ - gcc-c++ \ - gettext \ - glibc-langpack-de \ - glibc-langpack-en \ - json-c-devel \ - lcov \ - libacl-devel \ - libmount-devel \ - libtool \ - libxml2-devel \ - libxslt \ - make \ - pam-devel \ - pkgconfig \ - rpm-build \ - systemd - -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app - -COPY . /usr/src/app diff --git a/Dockerfile.leap b/Dockerfile.leap deleted file mode 120000 index 7070851f..00000000 --- a/Dockerfile.leap +++ /dev/null @@ -1 +0,0 @@ -Dockerfile.tumbleweed \ No newline at end of file diff --git a/Dockerfile.tumbleweed b/Dockerfile.tumbleweed deleted file mode 100644 index eab35e35..00000000 --- a/Dockerfile.tumbleweed +++ /dev/null @@ -1,62 +0,0 @@ -# Leap and Tumbleweed images differ only in the base image, -# so use a parametrized Dockerfile. See -# https://docs.docker.com/engine/reference/builder/#from -ARG BUILD_FLAVOR -ARG DOCKER_TAG - -# Build the latest openSUSE Tumbleweed or Leap image -FROM opensuse/${BUILD_FLAVOR}:${DOCKER_TAG} - -# this one needs to be defined after "FROM" so the value is available in "RUN" later -ARG YAST_REPO - -# the NON-OSS repo is not needed, save the network bandwidth and some time (~5 seconds) for each refresh -RUN zypper mr -d repo-non-oss - -# we need to install Ruby first to define the %{rb_ver} RPM macro -# see https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#run -# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/build-cache -# why we need "zypper clean -a" at the end -RUN zypper --non-interactive in --no-recommends --force-resolution util-linux ruby && zypper clean -a - -# add the YaST repository - we need rubygem-coveralls-lcov -RUN zypper ar -f http://download.opensuse.org/repositories/YaST:/Head/${YAST_REPO}/ yast -RUN RUBY_VERSION=ruby:`rpm --eval '%{rb_ver}'` && \ - zypper --non-interactive --gpg-auto-import-keys \ - in --no-recommends \ - "rubygem($RUBY_VERSION:coveralls-lcov)" \ - && zypper clean -a - -RUN RUBY_VERSION=ruby:`rpm --eval '%{rb_ver}'` && \ - zypper --non-interactive in --no-recommends \ - acl \ - autoconf \ - automake \ - dbus-1-devel \ - docbook-xsl-stylesheets \ - e2fsprogs-devel \ - gcc-c++ \ - git-core \ - grep \ - lcov \ - libacl-devel \ - libboost_system-devel \ - libboost_test-devel \ - libboost_thread-devel \ - libbtrfs-devel \ - libjson-c-devel \ - libmount-devel \ - libtool \ - libxml2-devel \ - libxslt \ - obs-service-source_validator \ - pam-devel \ - perl-JSON \ - rpm-build \ - "rubygem($RUBY_VERSION:ruby-dbus)" \ - which - -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app - -COPY . /usr/src/app diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu deleted file mode 100644 index 0cd35dd7..00000000 --- a/Dockerfile.ubuntu +++ /dev/null @@ -1,48 +0,0 @@ -# Ubuntu and Debian images are similar -# so use a parametrized Dockerfile. See -# https://docs.docker.com/engine/reference/builder/#from -ARG BUILD_FLAVOR -ARG DOCKER_TAG - -FROM ${BUILD_FLAVOR}:${DOCKER_TAG} -# Pre-FROM ARG and Post-FROM ARG have to be declared separately: -# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interatc -ARG BUILD_FLAVOR - -# see https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/run -RUN apt-get update && \ - case "${BUILD_FLAVOR}" in \ - debian) MORE_PACKAGES="locales-all";; \ - ubuntu) MORE_PACKAGES="language-pack-de language-pack-en";; \ - esac; \ - apt-get install -y --no-install-recommends \ - ${MORE_PACKAGES} \ - acl-dev \ - autoconf \ - automake \ - build-essential \ - dbus \ - debhelper \ - devscripts \ - docbook-xsl \ - fakeroot \ - g++ \ - gettext \ - libboost-dev \ - libboost-system-dev \ - libboost-test-dev \ - libboost-thread-dev \ - libdbus-1-dev \ - libjson-c-dev \ - libmount-dev \ - libpam-dev \ - libtool \ - libxml2-dev \ - libz-dev \ - ruby-dbus \ - xsltproc - -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app - -COPY . /usr/src/app diff --git a/Makefile.repo b/Makefile.repo index 3cb6fba6..0db54d95 100644 --- a/Makefile.repo +++ b/Makefile.repo @@ -27,14 +27,3 @@ reconf: all ./config.status --recheck ./config.status -# This needs access to the build (and test) results so you would expect it -# in Makefile.am -# But the coveralls tool needs info from the Git checkout. -COVERAGE_INFO=$(BUILDDIR)/coverage/coverage.info -coveralls: - # Strip the absolute path prefix from the coverage data - # so coveralls.io can find the source files at GitHub. - sed -i -e 's#^SF:'"$${BUILDDIR?}"'/\(.*\)#SF:\1#' "$(COVERAGE_INFO)" - # Send the code coverage to coveralls.io - # COVERALLS_TOKEN is set in Travis config and passed via .travis.yml - LC_ALL=en_US.UTF-8 coveralls-lcov --repo-token "$${COVERALLS_TOKEN}" "$(COVERAGE_INFO)" diff --git a/README.Travis.md b/README.Travis.md deleted file mode 100644 index 77b47998..00000000 --- a/README.Travis.md +++ /dev/null @@ -1,31 +0,0 @@ -# Travis CI - -By default Travis uses Ubuntu 14.04 LTS for building, but it is possible to run -the build in any Linux distribution using [Docker](https://www.docker.com/). - -## Setup - -For each target distribution there is a `Dockerfile` and the respective -`.travis.sh` script. The `Dockerfile` defines the steps needed for building -the Docker image, the script runs the build in the specific distribution. - -The `.travis.yml` file defines the build matrix which runs builds for all -configured distributions in parallel. It is defined in the `env` section, -see more details in the [Travis documentation]( -https://docs.travis-ci.com/user/customizing-the-build#Build-Matrix). - -## Running the Build Locally - -- [Install and start Docker](https://docs.docker.com/engine/installation/linux/) -- Run (as `root`) the same commands as in the `.travis.yml` file, that means: -- First build the docker image locally, e.g. `docker build -f - Dockerfile.tumbleweed -t snapper-devel .`, the Docker image automatically - includes also the copy of the current Snapper sources. -- Then run the build: `docker run -it --rm snapper-devel ./.travis.tumbleweed.sh` - (The `--rm` will cleanup the new Docker image layer created by the build, - if you want to inspect the build artifacts then remove it.) -- If you need to debug a failure then run `bash` instead of the Travis script - and run the build steps manually. If you need an editor or some other tool - you can install them via the respective packaging tool, see the `Dockerfile` - for examples. - diff --git a/README.md b/README.md index 110492df..ca113c6a 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,6 @@ Snapper ======= -[![Build Status](https://travis-ci.org/openSUSE/snapper.svg?branch=master)](https://travis-ci.org/openSUSE/snapper) -[![Coverage Status](https://coveralls.io/repos/github/openSUSE/snapper/badge.svg?branch=HEAD)](https://coveralls.io/github/openSUSE/snapper?branch=HEAD) - Snapper is a tool for Linux file system snapshot management. Apart from the obvious creation and deletion of snapshots it can compare snapshots and revert differences between them. In simple terms, this allows root and @@ -34,9 +31,6 @@ sudo zypper install git libmount-devel dbus-1-devel libacl-devel \ docbook-xsl-stylesheets libxml2-devel libbtrfs-devel ``` -Alternatively you can use a [Docker](https://www.docker.com/) container, -see [README.Travis.md](README.Travis.md) file for some hints. - ### Building Snapper You can download the sources and build Snapper by using these commands: