Package Details: fluent-bit 1.5.6-1

Git Clone URL: https://aur.archlinux.org/fluent-bit.git (read-only, click to copy)
Package Base: fluent-bit
Description: Collect data/logs from different sources, unify and send them to multiple destinations.
Upstream URL: https://fluentbit.io/
Keywords: elasticsearch fluentd
Licenses: Apache
Submitter: jjm
Maintainer: jjm
Last Packager: jjm
Votes: 2
Popularity: 0.000104
First Submitted: 2018-08-13 11:24
Last Updated: 2020-09-12 14:28

Pinned Comments

jjm commented on 2020-06-07 13:05

Hi people, pull requests welcome at https://github.com/j0057/fluent-bit-pkgbuild.

The reason updates have been slow is that I can't fix an error that is not happening on my system -- on my system the build output lands in /usr/lib64, whereas on other system it lands in /usr/lib. I think it's good to have more broad review, we can do so in the github pull requests.

Latest Comments

1 2 Next › Last »

bastelfreak commented on 2020-06-07 21:14

Hi, my PKGBUILD works fine for me. I use extra-x86_64-build to build the package. As far as I can tell that's the recommended way for building packages in a clean environment. Also this seems to be the correct version:

$ sudo pacman -U fluent-bit-1.4.5-1-x86_64.pkg.tar.zst
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) fluent-bit-1.4.5-1

Total Installed Size:  7.32 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                                                                 [########################################################################################] 100%
(1/1) checking package integrity                                                                                                               [########################################################################################] 100%
(1/1) loading package files                                                                                                                    [########################################################################################] 100%
(1/1) checking for file conflicts                                                                                                              [########################################################################################] 100%
(1/1) checking available disk space                                                                                                            [########################################################################################] 100%
:: Processing package changes...
(1/1) installing fluent-bit                                                                                                                    [########################################################################################] 100%
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
(2/2) Arming ConditionNeedsUpdate...
$ sudo systemctl start fluent-bit.service 
$ sudo systemctl status fluent-bit.service 
● fluent-bit.service - Fluent Bit
     Loaded: loaded (/usr/lib/systemd/system/fluent-bit.service; disabled; vendor preset: disabled)
     Active: active (running) since Sun 2020-06-07 23:11:08 CEST; 2s ago
   Main PID: 431969 (fluent-bit)
      Tasks: 2 (limit: 19035)
     Memory: 896.0K
     CGroup: /system.slice/fluent-bit.service
             └─431969 /usr/bin/fluent-bit -c /etc/fluent-bit/fluent-bit.conf

Jun 07 23:11:08  fluent-bit[431969]: Fluent Bit v1.4.5
Jun 07 23:11:08  fluent-bit[431969]: * Copyright (C) 2019-2020 The Fluent Bit Authors
Jun 07 23:11:08  fluent-bit[431969]: * Copyright (C) 2015-2018 Treasure Data
Jun 07 23:11:08  fluent-bit[431969]: * Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
Jun 07 23:11:08  fluent-bit[431969]: * https://fluentbit.io
Jun 07 23:11:08  fluent-bit[431969]: [2020/06/07 23:11:08] [ info] [storage] version=1.0.3, initializing...
Jun 07 23:11:08  fluent-bit[431969]: [2020/06/07 23:11:08] [ info] [storage] in-memory
Jun 07 23:11:08  fluent-bit[431969]: [2020/06/07 23:11:08] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
Jun 07 23:11:08  fluent-bit[431969]: [2020/06/07 23:11:08] [ info] [engine] started (pid=431969)
Jun 07 23:11:08  fluent-bit[431969]: [2020/06/07 23:11:08] [ info] [sp] stream processor started
$ 

jjm commented on 2020-06-07 13:42

@bastelfreak, that PKGBUILD as is doesn't build, because the download urls don't match up. In addition to updating to 1.4.5, it also changes a number of other things, for this reason I've made this into the first pull request, can you confirm it also works for you?

jjm commented on 2020-06-07 13:05

Hi people, pull requests welcome at https://github.com/j0057/fluent-bit-pkgbuild.

The reason updates have been slow is that I can't fix an error that is not happening on my system -- on my system the build output lands in /usr/lib64, whereas on other system it lands in /usr/lib. I think it's good to have more broad review, we can do so in the github pull requests.

TheGoliath commented on 2020-06-07 12:13

I'd like to help with the package maintenance. May I be added as a co-maintainer :)

bastelfreak commented on 2020-06-07 12:02

Hi I updated the PKGBUILD to support 1.4.5:

# Maintainer: Joost Molenaar <jjm@j0057.nl>
# Contributor: Tim Meusel <tim@bastelfreak.de>
pkgname=fluent-bit

_pkgmaj=1.4
pkgver="${_pkgmaj}.5"
pkgrel=1
pkgdesc='Collect data/logs from different sources, unify and send them to multiple destinations.'
arch=(x86_64)
url='https://fluentbit.io/'
license=('Apache')
depends=('systemd-libs')
# PostgreSQL_TYPE_INCLUDE_DIR is provided by postgresql, this is currently a bug
makedepends=('cmake' 'postgresql-libs' 'postgresql' 'python' 'valgrind' 'gcc8')
checkdepends=('gtest' 'doxygen' 'graphviz')
backup=('etc/fluent-bit/fluent-bit.conf'
        'etc/fluent-bit/parsers.conf')
source=("${url}/releases/${pkgmaj}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('98a971c62913db7b7689889c9365234e9d68e220dd510d45522150806cf1e23b208208f765b3d51519753071068114f6a3fc25f499688551a3b63df37c7f516e')

build() {
  cd "${pkgname}-${pkgver}/build"
  export CC=/usr/bin/gcc-8
  export CXX=/usr/bin/gcc-8
  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_SYSCONFDIR=/etc \
    -DFLB_TESTS_INTERNAL=Yes \
    -DFLB_IN_MQTT=Yes \
    -DFLB_TLS=Yes \
    -DFLB_ALL=Yes \
    -DFLB_OUT_NATS=Yes \
    ..
  make
}

check() {
  cd "${pkgname}-${pkgver}/build"
  make test
}

package() {
  cd "${pkgname}-${pkgver}/build"

  make DESTDIR="$pkgdir/" install

  mkdir -p "${pkgdir}/usr/lib/systemd/system"
  mv "${pkgdir}/lib/systemd/system/fluent-bit.service" "${pkgdir}/usr/lib/systemd/system"
  rm -rf "${pkgdir}/lib"
  cd "${srcdir}/${pkgname}-${pkgver}"
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
  install -Dm 644 README.md README.Dockerfile.md MAINTAINERS.md CODE_OF_CONDUCT.md  CONTRIBUTING.md DEVELOPER_GUIDE.md GOLANG_OUTPUT_PLUGIN.md Dockerfile Dockerfile.debug -t "${pkgdir}/usr/share/doc/${pkgname}"
}

TheGoliath commented on 2020-05-25 04:45

I'd like to participate in package maintenance. May I be added as a co-maintainer?

seishinryohosha commented on 2019-09-11 16:42

Current build 1.2.2-4 fails. Used git bisect (current bad, 0fafc28 (1.0.4-1) good) Last version building is 1.2.2-1.

1.2.2-2 introduced: (see git diff master~3 master~2)

+    mv $pkgdir/usr/lib64/* $pkgdir/usr/lib
+    rmdir $pkgdir/usr/lib64

Downloading the tarball from https://fluentbit.io/releases/1.2/fluent-bit-1.2.2.tar.gz and compiling it manually (same md5sum as in PKGBUILD) and installing it showed that no lib64 directory gets created thus the 'stat' error from mv is genuine. Commenting out the moving of nonexistent files solved this release.

1.2.2-3 Still commenting out the mv from 1.2.2-2. Does not break anything as only make parameter got removed (-j8).

1.2.2-4

+    mkdir -p $pkgdir/usr/lib/systemd
+    mv $pkgdir/usr/lib/system $pkgdir/usr/lib/systemd

Still commenting out the mv from 1.2.2-2. Now the also nonexistent /usr/lib/system in the tarball triggers the same error as in 1.2.2-2 thus also a genuine error. The tarball has a service-file under $pkgdir/lib/systemd/system/. Commenting this line also out solved the building error and the package got cleanly installed.

It seems libfluent-bit.so depends on libsystemd/systemd-libs and zlib. They're both inlcuded as many base packages need zlib and libsystemd is provided by systemd but it doesn't hurt. libsystemd seems only needed if journald support is needed. (cmake includes it if systemd detected)

Custom variables should start with an underscore. Either pkgmaj should be _pkgmaj or use ${$pkgver%.2} in the url to strip the patchnumber.

If you want to get rid of the WARNING reference to $srcdir contact upstream and ask them why they hardcode path references in their binary. As this is not a big issue (as far as known) you can leave the warning be.

A suggested PKGBUILD diff is shown below.

Notice: For testing purposes, before running makepkg, I executed each time git clean -xdf to make sure no artifacts would conflict.

diff:

diff --git a/PKGBUILD b/PKGBUILD
index 5ff1dc1..18e49e9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,9 +2,8 @@

 pkgname=fluent-bit

-pkgmaj=1.2
 pkgver=1.2.2
-pkgrel=4
+pkgrel=5
 epoch=

 pkgdesc='Collect data/logs from different sources, unify and send them to multiple destinations.'
@@ -13,7 +12,7 @@ url='https://fluentbit.io/'
 license=('Apache')
 groups=()

-depends=()
+depends=(libsystemd zlib)
 makedepends=(cmake)
 checkdepends=()
 optdepends=()
@@ -27,7 +26,7 @@ backup=('etc/fluent-bit/fluent-bit.conf'
 options=()
 install=
 changelog=
-source=("https://fluentbit.io/releases/$pkgmaj/$pkgname-$pkgver.tar.gz")
+source=("https://fluentbit.io/releases/${pkgver%.2}/$pkgname-$pkgver.tar.gz")
 noextract=()
 validpgpkeys=()

@@ -49,20 +48,11 @@ check() {

 package() {
     cd $pkgname-$pkgver/build
-
     make DESTDIR="$pkgdir/" install

-    # put /lib/* in /usr/lib
+    # put /lib/* in /usr/lib to fix symlink errors
     mv $pkgdir/lib/* $pkgdir/usr/lib
     rmdir $pkgdir/lib
-
-    # also put /usr/lib64/* in /usr/lib
-    mv $pkgdir/usr/lib64/* $pkgdir/usr/lib
-    rmdir $pkgdir/usr/lib64
-
-    # put /usr/lib/system/* in /usr/lib/systemd/system/* so that systemd can actually find it ...
-    mkdir -p $pkgdir/usr/lib/systemd
-    mv $pkgdir/usr/lib/system $pkgdir/usr/lib/systemd
 }

 md5sums=('761ca237b4a96491fa157f1dd9d0d09e')

jjm commented on 2019-09-08 19:13

@WRMSR - that is strange because not only is the version number the same, the MD5 sum of the tarball is the same as well, meaning they did not release a new version 1.2.2.

I suppose this has to do with the system being built on..?

WRMSR commented on 2019-09-04 13:57

Hi,

it seems, that the source package has been fixed, although w/o releasing a new version, just repacking the existing version, because the package did not build for me anymore. There's no /usr/lib64 anymore, and they renamed the /usr/lib/system to the correct name /usr/lib/systemd.

Changing package() to just:

package() {
    cd $pkgname-$pkgver/build

    make DESTDIR="$pkgdir/" install

    # put /lib/* in /usr/lib
    mv $pkgdir/lib/* $pkgdir/usr/lib
    rmdir $pkgdir/lib
}

does the trick now with a cleanBuild.

WRMSR commented on 2019-08-09 21:12

Hi,

your package installs the "fluent-bit.service" file to "/lib/system" and not "/lib/systemd/system".

It's not in the systemd search path thus you can't enable this unit w/o copying it to another location (or enabling it via absolute path).