Package Details: fluent-bit 3.0.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-2.0
Submitter: jjm
Maintainer: jjm
Last Packager: jjm
Votes: 7
Popularity: 0.037092
First Submitted: 2018-08-13 11:24 (UTC)
Last Updated: 2024-06-06 21:26 (UTC)

Pinned Comments

jjm commented on 2024-07-11 07:06 (UTC)

Current versions are not building, there are branches for 3.0.7, 3.1.0 and 3.1.1 at https://gitlab.com/j0057-git/aur/fluent-bit -- feel free to dig in and propose fixes.

Latest Comments

« First ‹ Previous 1 2 3

bastelfreak commented on 2020-06-07 12:02 (UTC)

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}"
}

seishinryohosha commented on 2019-09-11 16:42 (UTC) (edited on 2019-09-11 16:47 (UTC) by seishinryohosha)

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 (UTC) (edited on 2019-09-08 19:13 (UTC) by jjm)

@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 (UTC) (edited on 2019-09-04 19:31 (UTC) by WRMSR)

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 (UTC) (edited on 2019-08-09 21:16 (UTC) by WRMSR)

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).

jjm commented on 2019-08-08 05:16 (UTC)

Thanks for the heads-up, fixed in 1.2.2-3.

yaroot commented on 2019-08-08 00:22 (UTC)

please don't hard code job parallelism in PKGBUILD, users may want use the value they've set in makepkg.conf