From da5eef1e8f7f2db95e7680d1bddb3b09c2a08205 Mon Sep 17 00:00:00 2001 From: Daniel Salzman Date: Wed, 26 May 2021 18:17:24 +0200 Subject: [PATCH] ci: udapt to changes for apkg --- .gitlab-ci.yml | 5 +++-- distro/pkg/arch/PKGBUILD | 4 ++-- scripts/build-in-obs.sh | 6 +++--- scripts/make-distrofiles.sh | 7 ++++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a1214a2f..54224a07a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -128,8 +128,9 @@ docker:knot-dns:fedora: .pkg_symbols: &pkg_symbols stage: test script: - - ln -s distro/deb debian - - sed -i "s/__VERSION__/99/g" distro/deb/changelog + - ln -s distro/pkg/deb debian + - sed -i "s/{{ version }}/99/g" distro/pkg/deb/changelog + - sed -i "s/{{ release }}/1/g" distro/pkg/deb/changelog - dpkg-gensymbols -c4 -esrc/.libs/$LIB_NAME.so.$LIB_ABI -P. -p$LIB_NAME$LIB_ABI allow_failure: true except: diff --git a/distro/pkg/arch/PKGBUILD b/distro/pkg/arch/PKGBUILD index f8d68eaef..96584a51b 100644 --- a/distro/pkg/arch/PKGBUILD +++ b/distro/pkg/arch/PKGBUILD @@ -65,6 +65,6 @@ package() { mv "${pkgdir}"/etc/knot/{knot.sample.conf,knot.conf} install -Dm644 distro/common/${pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/ - install -Dm644 distro/arch/${pkgname}.tmpfiles.arch "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf - install -Dm644 distro/arch/${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf + install -Dm644 distro/pkg/arch/${pkgname}.tmpfiles.arch "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf + install -Dm644 distro/pkg/arch/${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf } diff --git a/scripts/build-in-obs.sh b/scripts/build-in-obs.sh index 983cab793..ac3b84d60 100755 --- a/scripts/build-in-obs.sh +++ b/scripts/build-in-obs.sh @@ -21,9 +21,9 @@ fi osc co "${project}" "${package}" pushd "${project}/${package}" osc del * ||: -cp -L ../../*.orig.tar.xz ../../*.debian.tar.xz ../../*.dsc ./ -cp -rL ../../distro/rpm/* ./ -cp -rL ../../distro/arch/* ./ +cp -L ../../*.tar.xz ../../*.dsc ./ +cp -rL ../../distro/pkg/rpm/* ./ +cp -rL ../../distro/pkg/arch/* ./ osc addremove osc ci -n popd diff --git a/scripts/make-distrofiles.sh b/scripts/make-distrofiles.sh index 277771555..c1e1462c2 100755 --- a/scripts/make-distrofiles.sh +++ b/scripts/make-distrofiles.sh @@ -27,9 +27,10 @@ if [[ $(echo "${version}" | grep '^[[:alnum:].]$') -ne 0 ]]; then fi # Fill in VERSION field in distribution specific files -files="distro/rpm/${package}.spec distro/deb/changelog distro/arch/PKGBUILD" +files="distro/pkg/rpm/${package}.spec distro/pkg/deb/changelog distro/pkg/arch/PKGBUILD" for file in ${files}; do - sed -i "s/__VERSION__/${version}/g" "${file}" + sed -i "s/{{ version }}/${version}/g" "${file}" + sed -i "s/{{ release }}/1/g" "${file}" done # Rename archive to debian format @@ -40,7 +41,7 @@ ln -s "${pkgname}.tar.xz" "${debname}.tar.xz" # Prepare clean debian-specific directory tar -xf "${debname}.tar.xz" pushd "${pkgname}" > /dev/null -cp -arL ../distro/deb debian +cp -arL ../distro/pkg/deb debian # Optionally remove symbols file if [ "$withsymbols" = false ]; then