Skip to content

Commit 0430f72

Browse files
committed
fixup remove changelog
fixup remove changelog fixup remove changelog fixup remove changelog fixup remove changelog fixup remove changelog fixup remove changelog fixup remove changelog fixup remove changelog fixup remove changelog fixup remove changelog fixup remove changelog fixup remove changelog Migrate from rpkg to packit as rpkg is not available on centos 9 Migrate from rpkg to packit as rpkg is not available on centos 9 Build RPM on CentOS Stream 9 (build on CentOS 8 fails) Build RPM on CentOS Stream 9 (build on CentOS 8 fails) Build RPM on CentOS Stream 9 (build on CentOS 8 fails) Build RPM on CentOS Stream 9 (build on CentOS 8 fails) Build RPM on CentOS Stream 9 (build on CentOS 8 fails) Build RPM on CentOS Stream 9 (build on CentOS 8 fails)
1 parent c4407a5 commit 0430f72

File tree

3 files changed

+71
-30
lines changed

3 files changed

+71
-30
lines changed

.github/workflows/build.yaml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ jobs:
834834
matrix:
835835
os: [ 'ubuntu-20.04' ]
836836
container: [ 'centos' ]
837-
containerTag: [ 'stream8' ]
837+
containerTag: [ 'stream9' ]
838838

839839
container:
840840
image: 'quay.io/${{ matrix.container }}/${{ matrix.container }}:${{ matrix.containerTag }}'
@@ -845,31 +845,40 @@ jobs:
845845
DNF: ${{github.workspace}}/build
846846

847847
steps:
848-
- name: Install build dependencies (1/2)
848+
849+
- name: Enable additional package repositories for CentOS 8
850+
if: ${{ matrix.container == 'centos' && matrix.containerTag == 'stream8' }}
849851
run: |
850-
dnf install -y 'dnf-command(config-manager)'
852+
dnf -y install epel-release 'dnf-command(config-manager)'
851853
dnf config-manager --set-enabled powertools
852-
dnf install --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y epel-release 'dnf-command(copr)' 'dnf-command(builddep)'
853-
dnf copr enable -y clime/rpkg-util
854-
dnf install --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y git rpkg libunwind-devel
854+
855+
- name: Enable additional package repositories for CentOS 9
856+
if: ${{ matrix.container == 'centos' && matrix.containerTag == 'stream9' }}
857+
run: |
858+
dnf -y install epel-release 'dnf-command(config-manager)'
859+
dnf config-manager --set-enabled crb
860+
861+
- name: Install packit
862+
run: |
863+
dnf install --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y epel-release
864+
dnf install --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y git packit
855865
856866
- uses: actions/checkout@v3
857867

858868
- name: Take ownership of the checkout directory (Git CVE-2022-24765)
859869
run: chown --recursive --reference=/ .
860870

861-
- name: Deploy the spec.rpkg file to /
862-
run: ln -s packaging/skupper-router.spec.rpkg ./
863-
864-
- name: Install build dependencies (2/2)
871+
- name: Install srpm build dependencies
865872
run: |
866-
rpkg spec --outdir /tmp/rpkg
867-
dnf builddep --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y /tmp/rpkg/skupper-router.spec
873+
dnf install --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y 'dnf-command(builddep)'
874+
dnf builddep --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y packaging/skupper-router.spec
868875
869-
- name: Build packages
876+
- name: Build skupper-router src.rpm and the rpm packages
870877
run: |
871878
mkdir /tmp/skupper-rpms
872-
rpkg local --nocheck --outdir /tmp/skupper-rpms
879+
880+
packit srpm
881+
rpmbuild --rebuild skupper-router*.src.rpm --nocheck --define '_rpmdir /tmp/skupper-rpms' --define 'debug_package %{nil}'
873882
874883
- name: Install built packages
875884
run: |

.packit.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
# See the documentation for more information:
19+
# https://packit.dev/docs/configuration/
20+
21+
# https://packit.dev/docs/configuration/#top-level-keys
22+
upstream_project_url: https://github.com/skupperproject/skupper-router
23+
issue_repository: https://github.com/skupperproject/skupper-router
24+
25+
specfile_path: packaging/skupper-router.spec
26+
27+
# add or remove files that should be synced
28+
files_to_sync:
29+
- .packit.yaml
30+
31+
# name in upstream package repository/registry (e.g. in PyPI)
32+
upstream_package_name: skupper-router
33+
# downstream (Fedora) RPM package name
34+
downstream_package_name: skupper-router

packaging/skupper-router.spec.rpkg renamed to packaging/skupper-router.spec

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@
1919

2020
# Tutorial for .spec files is available at https://rpm-packaging-guide.github.io
2121

22-
# This .spec file uses `rpkg` (https://pagure.io/rpkg-util) to provide
22+
# This .spec file uses `packit` (https://packit.dev/docs/cli/srpm/) to provide
2323
# pleasant user experience to developers.
24-
# rpkg-util v3 is required, v2 will fail to recognize some macros in this file.
2524
#
26-
# Command Description
27-
# `rpkg srpm` Creates a *.src.rpm file in /tmp/rpkg (exact path is printed)
28-
# `rpkg local --nocheck` Builds a *.rpm for your system in /tmp/rpkg (exact path is printed)
25+
# Command Description
26+
# `packit srpm` Creates a *.src.rpm file in the local directory (exact path is printed)
27+
# `packit build locally` Builds a *.rpm for your system in the local directory (exact path is printed)
2928
#
30-
# See `man rpkg` for more commands. See `man rpkg-macros` for explanation of the triple-{ macros.
29+
# See `man packit` for more commands. See https://packit.dev/docs/actions/#fix-spec-file for explanation of "actions".
3130

3231
# not undefine, that would break COPR, https://pagure.io/rpkg-util/issue/44
3332
%define _disable_source_fetch 0
@@ -45,12 +44,11 @@
4544
%global libunwind_minimum_version 1.3.1
4645

4746
Name: skupper-router
48-
Version: {{{ git_dir_version }}}
49-
Release: 2.0.0%{?dist}
47+
Version: 2.x.y
48+
Release: 1%{?dist}
5049
Summary: The skrouterd router daemon for Skupper.io
5150
License: ASL 2.0
5251
URL: https://skupper.io
53-
VCS: {{{ git_dir_vcs }}}
5452

5553
Requires: python3
5654
Requires: skupper-router-common == %{version}
@@ -81,15 +79,15 @@ BuildRequires: openssl-devel
8179
BuildRequires: cyrus-sasl-devel
8280

8381
# skupper-router sources
84-
Source0: {{{ git_dir_pack }}}
82+
Source0: packit-placeholder-value.tar.gz
8583
# vendored qpid-proton
8684
Source1: https://www.apache.org/dist/qpid/proton/%{proton_vendored_version}/qpid-proton-%{proton_vendored_version}.tar.gz
8785

8886
%description
8987
A lightweight message router, written in C and built on Qpid Proton, that provides flexible and scalable interconnect backend for Skupper.io Level 7 Virtual Application Network.
9088

9189
%prep
92-
{{{ git_dir_setup_macro }}}
90+
%setup -T -b 0 -q -n skupper-router
9391
%setup -q -D -b 1 -n qpid-proton-%{proton_vendored_version}
9492

9593
%build
@@ -103,12 +101,12 @@ cd %{_builddir}/qpid-proton-%{proton_vendored_version}
103101
-DBUILD_BINDINGS=OFF \
104102
-DBUILD_TLS=ON -DSSL_IMPL=openssl \
105103
-DBUILD_STATIC_LIBS=ON \
106-
-DCMAKE_POLICY_DEFAULT_CMP0069=NEW -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
104+
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
107105
-DCMAKE_INSTALL_PREFIX=%{proton_install_prefix}
108106
%__cmake --build "%{__cmake_builddir}" %{?_smp_mflags} --verbose
109107
%__cmake --install "%{__cmake_builddir}"
110108

111-
cd %{_builddir}/skupper-router
109+
cd %{_builddir}/skupper-router-%{version}
112110
%cmake \
113111
-DVERSION="%{version}" \
114112
-DPython_EXECUTABLE=%{python3} \
@@ -118,11 +116,11 @@ cd %{_builddir}/skupper-router
118116
%cmake_build --target all --target man
119117

120118
%install
121-
cd %{_builddir}/skupper-router
119+
cd %{_builddir}/skupper-router-%{version}
122120
%cmake_install
123121

124122
%check
125-
cd %{_builddir}/skupper-router
123+
cd %{_builddir}/skupper-router-%{version}
126124
%ctest
127125

128126
%files
@@ -197,4 +195,4 @@ BuildArch: noarch
197195
%license /usr/share/doc/skupper-router/LICENSE
198196

199197
%changelog
200-
{{{ git_dir_changelog }}}
198+
%autochangelog

0 commit comments

Comments
 (0)