Skip to content

Commit 79f7156

Browse files
install: update install script to handle Rocky/Alma repos now
Signed-off-by: Patrick Stephens <[email protected]>
1 parent 0ff2f66 commit 79f7156

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

install.sh

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ cat /etc/yum.repos.d/fluent-bit.repo
7373
$INSTALL_CMD_PREFIX yum -y $YUM_PARAMETERS install $INSTALL_PACKAGE_NAME$YUM_VERSION
7474
SCRIPT
7575
;;
76-
centos|centoslinux|rhel|redhatenterpriselinuxserver|fedora|rocky|almalinux)
76+
centos|centoslinux|rhel|redhatenterpriselinuxserver|fedora)
7777
# We need variable expansion and non-expansion on the URL line to pick up the base URL.
7878
# Therefore we combine things with sed to handle it.
7979
$SUDO sh <<SCRIPT
@@ -91,6 +91,43 @@ EOF
9191
sed -i 's|VERSION_SUBSTR|\$releasever/|g' /etc/yum.repos.d/fluent-bit.repo
9292
cat /etc/yum.repos.d/fluent-bit.repo
9393
$INSTALL_CMD_PREFIX yum -y $YUM_PARAMETERS install $INSTALL_PACKAGE_NAME$YUM_VERSION
94+
SCRIPT
95+
;;
96+
# For Rocky and AlmaLinux, we provide new repos now CentOS no longer tracks downstream.
97+
almalinux)
98+
$SUDO sh <<SCRIPT
99+
rpm --import $RELEASE_KEY
100+
cat << EOF > /etc/yum.repos.d/fluent-bit.repo
101+
[fluent-bit]
102+
name = Fluent Bit
103+
# Legacy server style
104+
baseurl = $RELEASE_URL/$OS/VERSION_SUBSTR
105+
gpgcheck=1
106+
repo_gpgcheck=1
107+
gpgkey=$RELEASE_KEY
108+
enabled=1
109+
EOF
110+
sed -i 's|VERSION_SUBSTR|\$releasever/|g' /etc/yum.repos.d/fluent-bit.repo
111+
cat /etc/yum.repos.d/fluent-bit.repo
112+
$INSTALL_CMD_PREFIX yum -y $YUM_PARAMETERS install $INSTALL_PACKAGE_NAME$YUM_VERSION
113+
SCRIPT
114+
;;
115+
rocky|rockylinux)
116+
$SUDO sh <<SCRIPT
117+
rpm --import $RELEASE_KEY
118+
cat << EOF > /etc/yum.repos.d/fluent-bit.repo
119+
[fluent-bit]
120+
name = Fluent Bit
121+
# Legacy server style
122+
baseurl = $RELEASE_URL/rockylinux/VERSION_SUBSTR
123+
gpgcheck=1
124+
repo_gpgcheck=1
125+
gpgkey=$RELEASE_KEY
126+
enabled=1
127+
EOF
128+
sed -i 's|VERSION_SUBSTR|\$releasever/|g' /etc/yum.repos.d/fluent-bit.repo
129+
cat /etc/yum.repos.d/fluent-bit.repo
130+
$INSTALL_CMD_PREFIX yum -y $YUM_PARAMETERS install $INSTALL_PACKAGE_NAME$YUM_VERSION
94131
SCRIPT
95132
;;
96133
ubuntu|debian)

0 commit comments

Comments
 (0)