Skip to content

Commit

Permalink
Update build, add Ubuntu 20.10, add SOVERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
Addvilz committed Jun 25, 2020
1 parent 3757de7 commit b1ed9c1
Show file tree
Hide file tree
Showing 16 changed files with 133 additions and 35 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* Wed Jun 25 2020 Matiss Treinis <[email protected]> - 1.1.1
- Update build configuration, define SOVERSION. No functional changes.

* Wed Mar 11 2020 Matiss Treinis <[email protected]> - 1.1.0
- Logging timer no longer reports nonsense values (#1).
- Environment name is now available from within scripts (#2).
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
52 changes: 29 additions & 23 deletions DOWNLOAD.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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.
Expand All @@ -26,59 +27,64 @@ 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)
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)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Binary builds are available for:

- **CentOS** and **RHEL** versions [7<sup>1</sup>](./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.
Expand Down
14 changes: 14 additions & 0 deletions build-dist-docker-clean.sh
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions build-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dist/centos/8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion dist/debian/10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion dist/debian/11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion dist/debian/9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion dist/ubuntu/1804/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion dist/ubuntu/1910/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion dist/ubuntu/2004/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
19 changes: 19 additions & 0 deletions dist/ubuntu/2010/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
44 changes: 44 additions & 0 deletions dist/ubuntu/2010/build-dist.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion libkafe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b1ed9c1

Please sign in to comment.