mirror of
https://github.com/netdata/netdata.git
synced 2025-04-10 08:07:34 +00:00
Fix handling of DEB package naming in CI. (#13076)
* Fix handling of DEB package naming in CI. * Bump repoconfig package versions. To ensure naming consistency. * Fix repoconfig package renaming.
This commit is contained in:
parent
05da6a27a2
commit
1e9d602ad5
4 changed files with 27 additions and 2 deletions
2
.github/scripts/pkg-test.sh
vendored
2
.github/scripts/pkg-test.sh
vendored
|
@ -7,7 +7,7 @@ install_debian_like() {
|
|||
apt-get update
|
||||
|
||||
# Install Netdata
|
||||
apt-get install -y /netdata/artifacts/netdata_"${VERSION}"_*.deb || exit 1
|
||||
apt-get install -y /netdata/artifacts/netdata_"${VERSION}"*_*.deb || exit 1
|
||||
|
||||
# Install testing tools
|
||||
apt-get install -y --no-install-recommends curl netcat jq || exit 1
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Extract distro info from /etc/os-release
|
||||
DISTVERS="$(awk -F'"' '/VERSION_ID=/ {print $2}' /etc/os-release)"
|
||||
DISTNAME="$(awk -F'=' '/^ID=/ {print $2}' /etc/os-release)"
|
||||
|
||||
# Needed because dpkg is stupid and tries to configure things interactively if it sees a terminal.
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
@ -21,6 +25,19 @@ else
|
|||
dpkg-buildpackage -b -us -uc || exit 1
|
||||
fi
|
||||
|
||||
# Embed distro info in package name.
|
||||
# This is required to make the repo actually standards compliant wthout packageclouds hacks.
|
||||
distid="${DISTNAME}${DISTVERS}"
|
||||
for pkg in /usr/src/*.deb; do
|
||||
pkgname="$(basename "${pkg}" .deb)"
|
||||
name="$(echo "${pkgname}" | cut -f 1 -d '_')"
|
||||
version="$(echo "${pkgname}" | cut -f 2 -d '_')"
|
||||
arch="$(echo "${pkgname}" | cut -f 3 -d '_')"
|
||||
|
||||
newname="$(dirname "${pkg}")/${name}_${version}+${distid}_${arch}.deb"
|
||||
mv "${pkg}" "${newname}"
|
||||
done
|
||||
|
||||
# Copy the built packages to /netdata/artifacts (which may be bind-mounted)
|
||||
# Also ensure /netdata/artifacts exists and create it if it doesn't
|
||||
[ -d /netdata/artifacts ] || mkdir -p /netdata/artifacts
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
netdata-repo (1-2) unstable; urgency=medium
|
||||
|
||||
* Fixed package file naming for repo layout compliance
|
||||
|
||||
-- Netdata Builder <bot@netdata.cloud> Mon, 6 Jun 2022 09:30:00 -0500
|
||||
|
||||
netdata-repo (1-1) unstable; urgency=medium
|
||||
|
||||
* Initial Release
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Name: netdata-repo
|
||||
Version: 1
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Netdata stable repositories configuration.
|
||||
|
||||
Group: System Environment/Base
|
||||
|
@ -96,5 +96,7 @@ This package contains the official Netdata package repository configuration for
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jun 6 2022 Austin Hemmelgarn <austin@netdata.cloud> 1-2
|
||||
- Bump release to keep in sync with DEB package.
|
||||
* Mon Jun 14 2021 Austin Hemmelgarn <austin@netdata.cloud> 1-1
|
||||
- Initial revision
|
||||
|
|
Loading…
Add table
Reference in a new issue