# https://github.com/influxdata/ci-support/blob/main/ci-packager-next/fs/usr/bin/packager # uses this to calculate the version used for tarball, zip and Linux package # versions and git tags for this repo (https://github.com/influxdata/influxdb) # are used by .circleci/config.yml's 'release_filter' to determine which CI # jobs to run. Be default, packager will set the version to # 3.0.0+snapshot- based on CIRCLE_SHA1. If CIRCLE_TAG matches one of # these, then packager will set the version based on the tag: # # | tag | filename | deb | rpm | # |--------------------|-------------------|-------------------| -------------------------- | # | v3.0.0-0.alpha.1 | 3.0.0-0.alpha.1 | 3.0.0-0.alpha.1 | ver=3.0.0, rel=0.alpha.1 | # | v3.0.0-0.alpha.1.1 | 3.0.0-0.alpha.1.1 | 3.0.0-0.alpha.1.1 | ver=3.0.0, rel=0.alpha.1.1 | # | v3.0.0-0.alpha.2 | 3.0.0-0.alpha.2 | 3.0.0-0.alpha.2 | ver=3.0.0, rel=0.alpha.2 | # | v3.0.0-0.beta.1 | 3.0.0-0.beta.1 | 3.0.0-0.beta.1 | ver=3.0.0, rel=0.beta.1 | # | v3.0.0-0.beta.1.1 | 3.0.0-0.beta.1.1 | 3.0.0-0.beta.1.1 | ver=3.0.0, rel=0.beta.1.1 | # | v3.0.0-0.beta.2 | 3.0.0-0.beta.2 | 3.0.0-0.beta.2 | ver=3.0.0, rel=0.beta.2 | # | v3.0.0-0.rc.1 | 3.0.0-0.rc.1 | 3.0.0-0.rc.1 | ver=3.0.0, rel=0.rc.1 | # | v3.0.0 | 3.0.0 | 3.0.0-1 | ver=3.0.0, rel=1 | # | v3.0.0-2 | 3.0.0-2 | 3.0.0-2 | ver=3.0.0, rel=2 | # # In this manner: # - v3.0.0-0.alpha.1 < v3.0.0-0.alpha.1.1 # - v3.0.0-0.alpha.1.1 < v3.0.0-0.alpha.2 # - v3.0.0-0.alpha.2 < v3.0.0-0.beta.1 # - v3.0.0-0.beta.1 < v3.0.0-0.beta.1.1 # - v3.0.0-0.beta.1.1 < v3.0.0-0.beta.2 # - v3.0.0-0.beta.2 < v3.0.0-0.rc.1 # - v3.0.0-0.rc.1 < v3.0.0 # - v3.0.0 < v3.0.0-2 # # (use 'dpkg --compare-versions X lt Y && echo yes' for debs and # 'rpmdev-vercmp X Y | grep " < " && echo yes' for rpms) # # We use the following tag schema that supports semver as well as Linux package # version semantics (see https://github.com/influxdata/influxdb/pull/24751 for # context): # # v3.M.m[-B[.Q.q.b]] # eg, v3.0.0, v3.0.0-2, v3.0.0-0.beta.1 or v3.0.0-0.beta.1.1 # | | | | | | | # | | | | | | ----------> quality release package build number # | | | | | ------------> quality release number # | | | | --------------> release quality # | | | -----------------> package build number # | | --------------------> influxdb3 micro version # | ----------------------> influxdb3 minor version # ------------------------> major version # # Importantly: # - the tag should start with 'v' (for semver tagging convention) # - changes in v3.M.m follow semver and indicate there are code changes # - '-B' should be omitted for a new v3.M.n released semver (eg, v3.0.0, not # v3.0.0-1); specified starting with '2' for new package builds for this # release semver (eg, v3.0.0-2, v3.0.0-3, etc); and specified with '0' for # pre-release quality builds (eg, v3.0.0-0.rc.1). # - 'Q' is optional but when specified, 'Q' may be one of 'alpha', 'beta' or # 'rc'. Furthermore, when 'Q' is set: # - 'B' and 'q' must also be specified with 'q' starting at '1' (eg, # v3.0.0-0.alpha.1, v3.0.0-0.alpha.2, etc) # - 'b' may also be specified with 'Q' and when specified, should start with # '1' (eg, v3.0.0-0.alpha.1.1, v3.0.0-0.alpha.1.2, etc) # - changes to 'M', 'm', 'Q' and 'q' indicate influxdb code changes compared to # prior tags, while 'B' and 'b' indicate only packaging changes. # # By following these rules, packager should set package versions that are # upgradable (eg, in package repositories). # # The CIRCLE_TAG regex enforces these rules, falling back to # 3.0.0+snapshot- if it doesn't match. version: - match: '^v[0-9]+\.[0-9]+\.[0-9]+(-([2-9]|[1-9][0-9]+|0\.(alpha|beta|rc)\.[1-9][0-9]*(\.[1-9][0-9]*)?))?$' value: '{{env.CIRCLE_TAG[1:]}}' - match: '.*' value: '3.0.0+snapshot-{{env.CIRCLE_SHA1[:8]}}' sources: - binary: /tmp/workspace/artifacts/influxdb3-core_x86_64-unknown-linux-gnu.tar.gz target: artifacts/ arch: amd64 plat: linux - binary: /tmp/workspace/artifacts/influxdb3-core_aarch64-unknown-linux-gnu.tar.gz target: artifacts/ arch: arm64 plat: linux - binary: /tmp/workspace/artifacts/influxdb3-core_aarch64-apple-darwin.tar.gz target: artifacts/ arch: arm64 plat: darwin - binary: /tmp/workspace/artifacts/influxdb3-core_x86_64-pc-windows-gnu.tar.gz target: artifacts/ arch: amd64 plat: windows packages: - name: influxdb3-core description: Monolithic time-series database description_long: | InfluxDB is a database built to collect, process, transform, and store event and time series data. It is ideal for use cases that require real-time ingest and fast query response times to build user interfaces, monitoring, and automation solutions. license: MIT/Apache-2.0 rpm_group: Applications/Databases deb_section: database vendor: InfluxData homepage: https://influxdata.com maintainer: name: support email: support@influxdata.com binaries: # linux, darwin - influxdb3 # windows - influxdb3.exe python-runtimes: - source: python # IMPORTANT: we intentionally use usr/lib/influxdb3 instead of # usr/lib/influxdb3-{core,enterprise} to facilitate upgrades from core # to enterprise and have plugins continue to work after the upgrade. # This is needed since it allows us to specify the same plugin-dir # (/var/lib/influxdb3/plugins) for both and the venvs will still point # to a usable python in /usr/lib/influxdb3/python/... target: usr/lib/influxdb3 extras: - source: LICENSE-APACHE target: usr/share/influxdb3/LICENSE-APACHE doc: true - source: LICENSE-MIT target: usr/share/influxdb3/LICENSE-MIT doc: true perm_overrides: - owner: root group: root perms: 0755 target: usr/lib/influxdb3/sysv-init.sh - owner: root group: root perms: 0755 target: usr/lib/influxdb3/influxdb3-core-generator - owner: root group: root perms: 0644 target: lib/systemd/system/influxdb3-core.service source: .circleci/packages/influxdb3 deb: conflicts: - influxdb3-enterprise depends: - libc6 # for lintian (will pull in libgcc1 so don't need it here) recommends: - influxdata-archive-keyring rpm: # This tells rpm to do 2 things: # 1. add %dir entries for each of these so that the package owns them. # Will descend to add entries for subdirectories # 2. sets the rpm-attr for owner/group/perms for 'rpm -V' (owner/groups # are set in prein) owned_dirs: - owner: root group: influxdb3 perms: 0755 target: etc/influxdb3 - target: usr/lib/influxdb3 - target: usr/share/influxdb3 - owner: influxdb3 group: influxdb3 perms: 0755 target: var/lib/influxdb3 - owner: influxdb3 group: influxdb3 perms: 0755 target: var/log/influxdb3 conflicts: - influxdb3-enterprise recommends: - influxdata-archive-keyring