From 00151562145df50cc65e9902d52d5fa77f89fe50 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 9 Jun 2022 06:52:47 +0200 Subject: Merging upstream version 1.35.0. Signed-off-by: Daniel Baumann --- packaging/repoconfig/build-deb.sh | 17 +++++++++++++++++ packaging/repoconfig/debian/changelog | 6 ++++++ packaging/repoconfig/netdata-repo.spec | 4 +++- 3 files changed, 26 insertions(+), 1 deletion(-) (limited to 'packaging/repoconfig') diff --git a/packaging/repoconfig/build-deb.sh b/packaging/repoconfig/build-deb.sh index f1e0d7266..97f929a68 100755 --- a/packaging/repoconfig/build-deb.sh +++ b/packaging/repoconfig/build-deb.sh @@ -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 diff --git a/packaging/repoconfig/debian/changelog b/packaging/repoconfig/debian/changelog index 61d2e746b..57c12d71b 100644 --- a/packaging/repoconfig/debian/changelog +++ b/packaging/repoconfig/debian/changelog @@ -1,3 +1,9 @@ +netdata-repo (1-2) unstable; urgency=medium + + * Fixed package file naming for repo layout compliance + + -- Netdata Builder Mon, 6 Jun 2022 09:30:00 -0500 + netdata-repo (1-1) unstable; urgency=medium * Initial Release diff --git a/packaging/repoconfig/netdata-repo.spec b/packaging/repoconfig/netdata-repo.spec index 0a26b97c3..3e5f66b81 100644 --- a/packaging/repoconfig/netdata-repo.spec +++ b/packaging/repoconfig/netdata-repo.spec @@ -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 1-2 +- Bump release to keep in sync with DEB package. * Mon Jun 14 2021 Austin Hemmelgarn 1-1 - Initial revision -- cgit v1.2.3