Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: update_version.sh handles copyright year and BB files #8073

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

patrick-stephens
Copy link
Contributor

@patrick-stephens patrick-stephens commented Oct 20, 2023

Resolves #7988 and #8020 (review)

update_version.sh should now ensure the copyright date is always the current year along with fixing the Bitbake version correctly.
This script is automatically called after each release to create a PR with all the updates to the new version in. This means after each release we should get a PR with copyright and version correct.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing

$ export DISABLE_COMMIT=yes
$ export NEW_COPYRIGHT_YEAR=2025
$ export NEW_VERSION=9.9.9
$ ./update_version.sh 
Valid version string: 9.9.9
renamed '/home/pat/github/fluent/fluent-bit/fluent-bit-2.2.0.bb' -> 'fluent-bit-9.9.9.bb'
Skipping commits
Updated version successfully
$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 991093094..f8b8ec2fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,9 +6,9 @@ cmake_policy(SET CMP0069 NEW)
 set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
 
 # Fluent Bit Version
-set(FLB_VERSION_MAJOR  2)
-set(FLB_VERSION_MINOR  2)
-set(FLB_VERSION_PATCH  0)
+set(FLB_VERSION_MAJOR  9)
+set(FLB_VERSION_MINOR  9)
+set(FLB_VERSION_PATCH  9)
 set(FLB_VERSION_STR "${FLB_VERSION_MAJOR}.${FLB_VERSION_MINOR}.${FLB_VERSION_PATCH}")
 
 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile
index 322734377..42da6c742 100644
--- a/dockerfiles/Dockerfile
+++ b/dockerfiles/Dockerfile
@@ -11,7 +11,7 @@
 # docker buildx build --platform "linux/amd64,linux/arm64,linux/arm/v7" -f ./dockerfiles/Dockerfile.multiarch --build-arg FLB_TARBALL=https://github.com/fluent/fluent-bit/archive/v1.8.11.tar.gz ./dockerfiles/
 
 # Set this to the current release version: it gets done so as part of the release.
-ARG RELEASE_VERSION=2.2.0
+ARG RELEASE_VERSION=9.9.9
 
 # For multi-arch builds - assumption is running on an AMD64 host
 FROM multiarch/qemu-user-static:x86_64-arm as qemu-arm32
diff --git a/fluent-bit-2.2.0.bb b/fluent-bit-2.2.0.bb
deleted file mode 100644
index 82de646b6..000000000
--- a/fluent-bit-2.2.0.bb
+++ /dev/null
@@ -1,57 +0,0 @@
-# Fluent Bit - Yocto / Bitbake
-# ============================
-# The following Bitbake package the latest Fluent Bit stable release.
-
-SUMMARY = "Fast Log processor and Forwarder"
-DESCRIPTION = "Fluent Bit is a data collector, processor and  \
-forwarder for Linux. It supports several input sources and \
-backends (destinations) for your data. \
-"
-
-HOMEPAGE = "http://fluentbit.io"
-BUGTRACKER = "https://github.com/fluent/fluent-bit/issues"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
-SECTION = "net"
-
-PR = "r0"
-PV = "2.2.0"
-
-SRCREV = "v${PV}"
-SRC_URI = "git://github.com/fluent/fluent-bit.git;nobranch=1"
-
-S = "${WORKDIR}/git"
-DEPENDS = "zlib bison-native flex-native"
-INSANE_SKIP_${PN}-dev += "dev-elf"
-
-# Use CMake 'Unix Makefiles' generator
-OECMAKE_GENERATOR ?= "Unix Makefiles"
-
-# Fluent Bit build options
-# ========================
-
-# Host related setup
-EXTRA_OECMAKE += "-DGNU_HOST=${HOST_SYS} "
-
-# Disable LuaJIT and filter_lua support
-EXTRA_OECMAKE += "-DFLB_LUAJIT=Off -DFLB_FILTER_LUA=Off "
-
-# Disable Library and examples
-EXTRA_OECMAKE += "-DFLB_SHARED_LIB=Off -DFLB_EXAMPLES=Off "
-
-# Systemd support (optional)
-DEPENDS += "systemd"
-EXTRA_OECMAKE += "-DFLB_IN_SYSTEMD=On "
-
-# Kafka Output plugin (disabled by default): note that when
-# enabling Kafka output plugin, the backend library librdkafka
-# requires 'openssl' as a dependency.
-#
-# DEPENDS += "openssl "
-# EXTRA_OECMAKE += "-DFLB_OUT_KAFKA=On "
-
-inherit cmake systemd
-
-SYSTEMD_SERVICE_${PN} = "fluent-bit.service"
-TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}"
diff --git a/include/fluent-bit/flb_version.h.in b/include/fluent-bit/flb_version.h.in
index 351f6bb33..cf9c1bcb9 100644
--- a/include/fluent-bit/flb_version.h.in
+++ b/include/fluent-bit/flb_version.h.in
@@ -2,7 +2,7 @@
 
 /*  Fluent Bit
  *  ==========
- *  Copyright (C) 2015-2022 The Fluent Bit Authors
+ *  Copyright (C) 2015-2025 The Fluent Bit Authors
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -80,7 +80,7 @@ static inline void flb_version_banner()
     fprintf(stderr,
             "%sFluent Bit v%s%s\n", bold_color, FLB_VERSION_STR, reset_color);
 #endif
-    fprintf(stderr, "* %sCopyright (C) 2015-2023 The Fluent Bit Authors%s\n",
+    fprintf(stderr, "* %sCopyright (C) 2015-2025 The Fluent Bit Authors%s\n",
             copyright_color, reset_color);
     fprintf(stderr, "* Fluent Bit is a CNCF sub-project under the "
             "umbrella of Fluentd\n");
$ cat fluent-bit-9.9.9.bb
# Fluent Bit - Yocto / Bitbake
# ============================
# The following Bitbake package the latest Fluent Bit stable release.

SUMMARY = "Fast Log processor and Forwarder"
DESCRIPTION = "Fluent Bit is a data collector, processor and  \
forwarder for Linux. It supports several input sources and \
backends (destinations) for your data. \
"

HOMEPAGE = "http://fluentbit.io"
BUGTRACKER = "https://github.com/fluent/fluent-bit/issues"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
SECTION = "net"

PR = "r0"
PV = "9.9.9"

SRCREV = "v${PV}"
SRC_URI = "git://github.com/fluent/fluent-bit.git;nobranch=1"

S = "${WORKDIR}/git"
DEPENDS = "zlib bison-native flex-native"
INSANE_SKIP_${PN}-dev += "dev-elf"

# Use CMake 'Unix Makefiles' generator
OECMAKE_GENERATOR ?= "Unix Makefiles"

# Fluent Bit build options
# ========================

# Host related setup
EXTRA_OECMAKE += "-DGNU_HOST=${HOST_SYS} "

# Disable LuaJIT and filter_lua support
EXTRA_OECMAKE += "-DFLB_LUAJIT=Off -DFLB_FILTER_LUA=Off "

# Disable Library and examples
EXTRA_OECMAKE += "-DFLB_SHARED_LIB=Off -DFLB_EXAMPLES=Off "

# Systemd support (optional)
DEPENDS += "systemd"
EXTRA_OECMAKE += "-DFLB_IN_SYSTEMD=On "

# Kafka Output plugin (disabled by default): note that when
# enabling Kafka output plugin, the backend library librdkafka
# requires 'openssl' as a dependency.
#
# DEPENDS += "openssl "
# EXTRA_OECMAKE += "-DFLB_OUT_KAFKA=On "

inherit cmake systemd

SYSTEMD_SERVICE_${PN} = "fluent-bit.service"
TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}"

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.


@patrick-stephens patrick-stephens marked this pull request as ready for review October 20, 2023 10:53
@patrick-stephens patrick-stephens merged commit 752f695 into master Nov 3, 2023
37 of 38 checks passed
@patrick-stephens patrick-stephens deleted the update_version_script_for_year_and_bb branch November 3, 2023 12:20
leonardo-albertovich pushed a commit that referenced this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release updates: bitbake file don't update the version
1 participant