diff --git a/CHANGELOG b/CHANGELOG index 7bff80e..63b8820 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +* Wed Jun 25 2020 Matiss Treinis - 1.1.1 +- Update build configuration, define SOVERSION. No functional changes. + * Wed Mar 11 2020 Matiss Treinis - 1.1.0 - Logging timer no longer reports nonsense values (#1). - Environment name is now available from within scripts (#2). diff --git a/CMakeLists.txt b/CMakeLists.txt index 57867c3..54a7694 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,9 @@ cmake_minimum_required(VERSION 3.11.4) # IMPORTANT: updating version might require update in package dependencies at the end of this file. -set(KAFE_VERSION "1.1.0") -set(KAFE_VERSION_INT 10) +set(KAFE_VERSION "1.1.1") +set(KAFE_SOVERSION "1.1") +set(KAFE_VERSION_INT 11) set(KAFE_VERSION_DEP_NEXT_MAJOR "2.0.0") project(kafe_all VERSION ${KAFE_VERSION} LANGUAGES CXX C) diff --git a/DOWNLOAD.md b/DOWNLOAD.md index f032e9d..0e20dd2 100644 --- a/DOWNLOAD.md +++ b/DOWNLOAD.md @@ -1,5 +1,5 @@ ### Latest stable release downloads -#### Latest stable build is v1.1.0 +#### Latest stable build is v1.1.1 Here you can find links to latest binary packages for all supported operating systems. @@ -14,6 +14,7 @@ Here you can find links to latest binary packages for all supported operating sy - [Ubuntu 18.04](#ubuntu-1804) - [Ubuntu 19.10](#ubuntu-1910) - [Ubuntu 20.04](#ubuntu-2004) +- [Ubuntu 20.10](#ubuntu-2010) *NOTE:* macOS is supported, but there are no binary builds available. See [README](./README.md#building-on-macos) on how to build macOS binaries from source. @@ -26,8 +27,8 @@ including development headers. #### CentOS and RHEL 7 -- [kafe-cli-1.1.0-1.x86_64.el7.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.0/kafe-cli-1.1.0-1.x86_64.el7.rpm) -- [libkafe-1.1.0-1.x86_64.el7.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.0/libkafe-1.1.0-1.x86_64.el7.rpm) +- [kafe-cli-1.1.1-1.x86_64.el7.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli-1.1.1-1.x86_64.el7.rpm) +- [libkafe-1.1.1-1.x86_64.el7.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe-1.1.1-1.x86_64.el7.rpm) **IMPORTANT:** Kafe requires Lua version 5.3, a dependency not available in EL7 by default. You can either build the package yourself or use [Cheese](http://www.nosuchhost.net/~cheese/fedora/packages/epel-7/x86_64/cheese-release.html) @@ -35,50 +36,55 @@ repository to obtain compatible Lua package. #### CentOS and RHEL 8 -- [kafe-cli-1.1.0-1.x86_64.el8.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.0/kafe-cli-1.1.0-1.x86_64.el8.rpm) -- [libkafe-1.1.0-1.x86_64.el8.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.0/libkafe-1.1.0-1.x86_64.el8.rpm) +- [kafe-cli-1.1.1-1.x86_64.el8.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli-1.1.1-1.x86_64.el8.rpm) +- [libkafe-1.1.1-1.x86_64.el8.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe-1.1.1-1.x86_64.el8.rpm) #### Debian 9 -- [kafe-cli_1.1.0_amd64.deb9.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/kafe-cli_1.1.0_amd64.deb9.deb) -- [libkafe_1.1.0_amd64.deb9.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/libkafe_1.1.0_amd64.deb9.deb) +- [kafe-cli_1.1.1_amd64.deb9.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli_1.1.1_amd64.deb9.deb) +- [libkafe_1.1.1_amd64.deb9.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe_1.1.1_amd64.deb9.deb) #### Debian 10 -- [kafe-cli_1.1.0_amd64.deb10.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/kafe-cli_1.1.0_amd64.deb10.deb) -- [libkafe_1.1.0_amd64.deb10.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/libkafe_1.1.0_amd64.deb10.deb) +- [kafe-cli_1.1.1_amd64.deb10.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli_1.1.1_amd64.deb10.deb) +- [libkafe_1.1.1_amd64.deb10.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe_1.1.1_amd64.deb10.deb) #### Debian 11 -- [kafe-cli_1.1.0_amd64.deb11.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/kafe-cli_1.1.0_amd64.deb11.deb) -- [libkafe_1.1.0_amd64.deb11.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/libkafe_1.1.0_amd64.deb11.deb) +- [kafe-cli_1.1.1_amd64.deb11.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli_1.1.1_amd64.deb11.deb) +- [libkafe_1.1.1_amd64.deb11.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe_1.1.1_amd64.deb11.deb) #### Fedora 31 -- [kafe-cli-1.1.0-1.x86_64.f31.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.0/kafe-cli-1.1.0-1.x86_64.f31.rpm) -- [libkafe-1.1.0-1.x86_64.f31.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.0/libkafe-1.1.0-1.x86_64.f31.rpm) +- [kafe-cli-1.1.1-1.x86_64.f31.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli-1.1.1-1.x86_64.f31.rpm) +- [libkafe-1.1.1-1.x86_64.f31.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe-1.1.1-1.x86_64.f31.rpm) #### Fedora 32 -- [kafe-cli-1.1.0-1.x86_64.f32.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.0/kafe-cli-1.1.0-1.x86_64.f32.rpm) -- [libkafe-1.1.0-1.x86_64.f32.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.0/libkafe-1.1.0-1.x86_64.f32.rpm) +- [kafe-cli-1.1.1-1.x86_64.f32.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli-1.1.1-1.x86_64.f32.rpm) +- [libkafe-1.1.1-1.x86_64.f32.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe-1.1.1-1.x86_64.f32.rpm) #### Fedora 33 -- [kafe-cli-1.1.0-1.x86_64.f33.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.0/kafe-cli-1.1.0-1.x86_64.f33.rpm) -- [libkafe-1.1.0-1.x86_64.f33.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.0/libkafe-1.1.0-1.x86_64.f33.rpm) +- [kafe-cli-1.1.1-1.x86_64.f33.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli-1.1.1-1.x86_64.f33.rpm) +- [libkafe-1.1.1-1.x86_64.f33.rpm](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe-1.1.1-1.x86_64.f33.rpm) #### Ubuntu 18.04 -- [kafe-cli_1.1.0_amd64.ubu1804.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/kafe-cli_1.1.0_amd64.ubu1804.deb) -- [libkafe_1.1.0_amd64.ubu1804.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/libkafe_1.1.0_amd64.ubu1804.deb) +- [kafe-cli_1.1.1_amd64.ubu1804.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli_1.1.1_amd64.ubu1804.deb) +- [libkafe_1.1.1_amd64.ubu1804.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe_1.1.1_amd64.ubu1804.deb) #### Ubuntu 19.10 -- [kafe-cli_1.1.0_amd64.ubu1910.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/kafe-cli_1.1.0_amd64.ubu1910.deb) -- [libkafe_1.1.0_amd64.ubu1910.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/libkafe_1.1.0_amd64.ubu1910.deb) +- [kafe-cli_1.1.1_amd64.ubu1910.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli_1.1.1_amd64.ubu1910.deb) +- [libkafe_1.1.1_amd64.ubu1910.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe_1.1.1_amd64.ubu1910.deb) #### Ubuntu 20.04 -- [kafe-cli_1.1.0_amd64.ubu2004.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/kafe-cli_1.1.0_amd64.ubu2004.deb) -- [libkafe_1.1.0_amd64.ubu2004.deb](https://github.com/libkafe/kafe/releases/download/v1.1.0/libkafe_1.1.0_amd64.ubu2004.deb) +- [kafe-cli_1.1.1_amd64.ubu2004.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli_1.1.1_amd64.ubu2004.deb) +- [libkafe_1.1.1_amd64.ubu2004.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe_1.1.1_amd64.ubu2004.deb) + +#### Ubuntu 20.10 + +- [kafe-cli_1.1.1_amd64.ubu2010.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/kafe-cli_1.1.1_amd64.ubu2010.deb) +- [libkafe_1.1.1_amd64.ubu2010.deb](https://github.com/libkafe/kafe/releases/download/v1.1.1/libkafe_1.1.1_amd64.ubu2010.deb) diff --git a/README.md b/README.md index 60bb4eb..f8176c8 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Binary builds are available for: - **CentOS** and **RHEL** versions [71](./DOWNLOAD.md#centos-and-rhel-7), [8](./DOWNLOAD.md#centos-and-rhel-8) - **Fedora** versions [31](./DOWNLOAD.md#fedora-31), [32](./DOWNLOAD.md#fedora-32), [33](./DOWNLOAD.md#fedora-33) -- **Ubuntu** versions [18.04](./DOWNLOAD.md#ubuntu-1804), [19.10](./DOWNLOAD.md#ubuntu-1910), [20.04](./DOWNLOAD.md#ubuntu-2004) +- **Ubuntu** versions [18.04](./DOWNLOAD.md#ubuntu-1804), [19.10](./DOWNLOAD.md#ubuntu-1910), [20.04](./DOWNLOAD.md#ubuntu-2004), [20.10](./DOWNLOAD.md#ubuntu-2010) - **Debian** versions [9](./DOWNLOAD.md#debian-9), [10](./DOWNLOAD.md#debian-10), [11](./DOWNLOAD.md#debian-11) You should be able to use these binary packages for any derivative distributions. diff --git a/build-dist-docker-clean.sh b/build-dist-docker-clean.sh new file mode 100644 index 0000000..9b688b4 --- /dev/null +++ b/build-dist-docker-clean.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +docker rmi kafe/centos:7-build +docker rmi kafe/centos:8-build +docker rmi kafe/debian:9-build +docker rmi kafe/debian:10-build +docker rmi kafe/debian:11-build +docker rmi kafe/ubuntu:1804-build +docker rmi kafe/ubuntu:1910-build +docker rmi kafe/ubuntu:2004-build +docker rmi kafe/ubuntu:2010-build +docker rmi kafe/fedora:31-build +docker rmi kafe/fedora:32-build +docker rmi kafe/fedora:33-build \ No newline at end of file diff --git a/build-dist.sh b/build-dist.sh index 6c69c5f..299f070 100755 --- a/build-dist.sh +++ b/build-dist.sh @@ -94,6 +94,17 @@ cp build/ubuntu/2004/kafe-cli*.deb build-artifact/ubuntu-2004/ cp build/ubuntu/2004/libkafe*.deb build-artifact/ubuntu-2004/ for f in build-artifact/ubuntu-2004/*; do mv -v "$f" $(echo "$f" | sed "s/\.deb/\.ubu2004\.deb/"); done +# Ubuntu 20.10 +if [[ "$(docker images -q "kafe/ubuntu:2010-build" 2> /dev/null)" == "" ]]; then + docker build -t kafe/ubuntu:2010-build dist/ubuntu/2010 +fi + +docker run -it --rm -v `pwd`:/kafe kafe/ubuntu:2010-build +mkdir -p build-artifact/ubuntu-2010/ +cp build/ubuntu/2010/kafe-cli*.deb build-artifact/ubuntu-2010/ +cp build/ubuntu/2010/libkafe*.deb build-artifact/ubuntu-2010/ +for f in build-artifact/ubuntu-2010/*; do mv -v "$f" $(echo "$f" | sed "s/\.deb/\.ubu2010\.deb/"); done + # Fedora 31 if [[ "$(docker images -q "kafe/fedora:31-build" 2> /dev/null)" == "" ]]; then docker build -t kafe/fedora:31-build dist/fedora/31 diff --git a/dist/centos/8/Dockerfile b/dist/centos/8/Dockerfile index 0228719..87d0af1 100644 --- a/dist/centos/8/Dockerfile +++ b/dist/centos/8/Dockerfile @@ -15,7 +15,7 @@ RUN yum -y update && \ libssh-devel \ libgit2-devel -ENV CC /usr/bin/clang-8 -ENV CXX /usr/bin/clang++-8 +ENV CC /usr/bin/clang-9 +ENV CXX /usr/bin/clang++-9 CMD /kafe/dist/centos/8/build-dist.sh \ No newline at end of file diff --git a/dist/debian/10/Dockerfile b/dist/debian/10/Dockerfile index 4a3cccb..106e9b0 100644 --- a/dist/debian/10/Dockerfile +++ b/dist/debian/10/Dockerfile @@ -2,7 +2,7 @@ FROM debian:10 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y -y \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ wget \ cmake \ build-essential \ diff --git a/dist/debian/11/Dockerfile b/dist/debian/11/Dockerfile index 8e0e15c..764d910 100644 --- a/dist/debian/11/Dockerfile +++ b/dist/debian/11/Dockerfile @@ -2,7 +2,7 @@ FROM debian:bullseye RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y -y \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ wget \ cmake \ build-essential \ diff --git a/dist/debian/9/Dockerfile b/dist/debian/9/Dockerfile index 3e39648..078aec2 100644 --- a/dist/debian/9/Dockerfile +++ b/dist/debian/9/Dockerfile @@ -2,7 +2,7 @@ FROM debian:9 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y -y \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ wget \ build-essential \ clang-7 \ diff --git a/dist/ubuntu/1804/Dockerfile b/dist/ubuntu/1804/Dockerfile index eda0d18..8651434 100644 --- a/dist/ubuntu/1804/Dockerfile +++ b/dist/ubuntu/1804/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:18.04 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y -y \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ wget \ cmake \ build-essential \ diff --git a/dist/ubuntu/1910/Dockerfile b/dist/ubuntu/1910/Dockerfile index 78b6126..64535a7 100644 --- a/dist/ubuntu/1910/Dockerfile +++ b/dist/ubuntu/1910/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:19.10 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y -y \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ wget \ cmake \ build-essential \ diff --git a/dist/ubuntu/2004/Dockerfile b/dist/ubuntu/2004/Dockerfile index 9fdaf6b..846c026 100644 --- a/dist/ubuntu/2004/Dockerfile +++ b/dist/ubuntu/2004/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:20.04 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y -y \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ wget \ cmake \ build-essential \ diff --git a/dist/ubuntu/2010/Dockerfile b/dist/ubuntu/2010/Dockerfile new file mode 100644 index 0000000..24b9d3a --- /dev/null +++ b/dist/ubuntu/2010/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:20.10 + +RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y \ + wget \ + cmake \ + build-essential \ + clang-10 \ + liblua5.3-dev \ + libcurl4-gnutls-dev \ + libarchive-dev \ + libssh-dev \ + libgit2-dev + +ENV CC /usr/bin/clang-10 +ENV CXX /usr/bin/clang++-10 + +CMD /kafe/dist/ubuntu/2010/build-dist.sh \ No newline at end of file diff --git a/dist/ubuntu/2010/build-dist.sh b/dist/ubuntu/2010/build-dist.sh new file mode 100755 index 0000000..60487ef --- /dev/null +++ b/dist/ubuntu/2010/build-dist.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +set -e + +# Clean existing build workspace +rm -rf /kafe/build/ubuntu/2010 2> /dev/null + +# Create build workspace +mkdir -p /kafe/build/ubuntu/2010/ + +# Warp to build workspace +cd /kafe/build/ubuntu/2010/ + +# Prepare build +cmake -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=DEB ../../../ + +# Compile project +make + +# Package project +cpack + +# Test install +apt-get install -y ./kafe-cli*.deb ./libkafe*.deb +env kafe about + +# Fix permissions +cd / + +WHO=/kafe/ + +stat $WHO > /dev/null || (echo You must mount a file to "$WHO" in order to properly assume user && exit 1) + +USERID=$(stat -c %u $WHO) +GROUPID=$(stat -c %g $WHO) + +if [ "$USERID" -eq "0" ]; then + USERID=1000 +fi + +if [ "$GROUPID" -eq "0" ]; then + GROUPID=1000 +fi + +chown -Rf $USERID:$GROUPID /kafe/build \ No newline at end of file diff --git a/libkafe/CMakeLists.txt b/libkafe/CMakeLists.txt index e0d4d9e..42ec5a0 100644 --- a/libkafe/CMakeLists.txt +++ b/libkafe/CMakeLists.txt @@ -41,7 +41,7 @@ file(GLOB_RECURSE _SOURCES "src/*.[hc]pp") add_library(kafe_lib_shared SHARED ${_HEADERS} ${_SOURCES}) add_library(kafe_lib_static STATIC ${_HEADERS} ${_SOURCES}) -set_target_properties(kafe_lib_shared PROPERTIES OUTPUT_NAME "kafe") +set_target_properties(kafe_lib_shared PROPERTIES OUTPUT_NAME "kafe" SOVERSION ${KAFE_SOVERSION}) set_target_properties(kafe_lib_static PROPERTIES OUTPUT_NAME "kafe") if (LUA_VERSION_MAJOR EQUAL 5 AND LUA_VERSION_MINOR EQUAL 4)