[packit] 58 upstream release

Upstream tag: v58
Upstream commit: 2b6faea3

Signed-off-by: Packit <hello@packit.dev>
This commit is contained in:
Packit 2022-07-27 08:37:35 +00:00 committed by Tomas Hozza
parent b5a1ca189d
commit e075645d7a
No known key found for this signature in database
GPG Key ID: C5887AD51D9F3C2D
7 changed files with 3314 additions and 16 deletions

1
.gitignore vendored
View File

@ -46,3 +46,4 @@
/osbuild-composer-55.tar.gz
/osbuild-composer-56.tar.gz
/osbuild-composer-57.tar.gz
/osbuild-composer-58.tar.gz

View File

@ -0,0 +1,47 @@
From c20e1e53c4bc174f63533b5d572dec86657cd5a0 Mon Sep 17 00:00:00 2001
From: Achilleas Koutsou <achilleas@koutsou.net>
Date: Mon, 25 Jul 2022 11:26:16 +0200
Subject: [PATCH 1/7] osbuild: use path as secondary sort key for fstab
Most filesystems entries in fstab don't have a PassNo, which makes the
order of those entries dependent on the sorting algorithm. Changes in
the algorithm can introduce changes in the sort order, which we don't
like.
Add a secondary sorting key, the Path, which is guaranteed unique, to
guarantee stable ordering.
---
internal/osbuild/fstab_stage.go | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/internal/osbuild/fstab_stage.go b/internal/osbuild/fstab_stage.go
index 72ecb59bb..d0cc66a22 100644
--- a/internal/osbuild/fstab_stage.go
+++ b/internal/osbuild/fstab_stage.go
@@ -1,6 +1,7 @@
package osbuild
import (
+ "fmt"
"sort"
"github.com/osbuild/osbuild-composer/internal/disk"
@@ -64,10 +65,14 @@ func NewFSTabStageOptions(pt *disk.PartitionTable) *FSTabStageOptions {
return nil
}
+ key := func(fs *FSTabEntry) string {
+ return fmt.Sprintf("%d%s", fs.PassNo, fs.Path)
+ }
+
_ = pt.ForEachMountable(genOption) // genOption always returns nil
// sort the entries by PassNo to maintain backward compatibility
sort.Slice(options.FileSystems, func(i, j int) bool {
- return options.FileSystems[i].PassNo < options.FileSystems[j].PassNo
+ return key(options.FileSystems[i]) < key(options.FileSystems[j])
})
return &options
}
--
2.35.3

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,81 @@
From 9def5455708f7e247fe4103d47e00a7beb52169b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Budai?= <ondrej@budai.cz>
Date: Wed, 27 Jul 2022 13:35:08 +0200
Subject: [PATCH 3/7] dbjobqueue: fix bad errors.As usages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
errors.As is meant to check whether err (or other error in its chain) can
be assigned to the value that target is pointing at.
Let's consider this example:
errors.As(err, &pgx.ErrNoRows)
pgx.ErrNoRows (and pgx.ErrTxClosed) is typed as error, thus in all
errors.As calls, the target is typed as *error. Err is always an error.
So this call is basically asking whether error can be assigned to error.
If err != nil, this is always true, thus this check doesn't make any sense
over a plain err != nil.
Go 1.19 now checks this issue and if it's found, it refuses to compile the
code, see:
https://go-review.googlesource.com/c/tools/+/339889
This commit changes usages of errors.As() to errors.Is(). The Is() method
doesn't check assignability but equality (the only different between Is()
and a plain old == operator is that Is() also inspects the whole error chain).
This fixes the check because now, we are basically checking if err (or
any other error in its chain) == pgx.ErrTxClosed which is exactly what we
want.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
---
pkg/jobqueue/dbjobqueue/dbjobqueue.go | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pkg/jobqueue/dbjobqueue/dbjobqueue.go b/pkg/jobqueue/dbjobqueue/dbjobqueue.go
index 4c1e60105..25231224f 100644
--- a/pkg/jobqueue/dbjobqueue/dbjobqueue.go
+++ b/pkg/jobqueue/dbjobqueue/dbjobqueue.go
@@ -18,6 +18,7 @@ import (
"github.com/jackc/pgtype"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgxpool"
+
"github.com/osbuild/osbuild-composer/pkg/jobqueue"
logrus "github.com/sirupsen/logrus"
@@ -229,7 +230,7 @@ func (q *DBJobQueue) Enqueue(jobType string, args interface{}, dependencies []uu
}
defer func() {
err := tx.Rollback(context.Background())
- if err != nil && !errors.As(err, &pgx.ErrTxClosed) {
+ if err != nil && !errors.Is(err, pgx.ErrTxClosed) {
logrus.Error("error rolling back enqueue transaction: ", err)
}
}()
@@ -283,7 +284,7 @@ func (q *DBJobQueue) Dequeue(ctx context.Context, jobTypes []string, channels []
if err == nil {
break
}
- if err != nil && !errors.As(err, &pgx.ErrNoRows) {
+ if err != nil && !errors.Is(err, pgx.ErrNoRows) {
return uuid.Nil, uuid.Nil, nil, "", nil, fmt.Errorf("error dequeuing job: %v", err)
}
@@ -384,7 +385,7 @@ func (q *DBJobQueue) FinishJob(id uuid.UUID, result interface{}) error {
}
defer func() {
err = tx.Rollback(context.Background())
- if err != nil && !errors.As(err, &pgx.ErrTxClosed) {
+ if err != nil && !errors.Is(err, pgx.ErrTxClosed) {
logrus.Errorf("error rolling back finish job transaction for job %s: %v", id, err)
}
--
2.35.3

View File

@ -1,3 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 0.54.1.dev2+g26d336d.
The file was generated using packit 0.55.1.dev8+g432e38d.

View File

@ -9,7 +9,7 @@
%global goipath github.com/osbuild/osbuild-composer
Version: 57
Version: 58
%gometa
@ -22,7 +22,7 @@ It is compatible with composer-cli and cockpit-composer clients.
}
Name: osbuild-composer
Release: 2%{?dist}
Release: 1%{?dist}
Summary: An image building service based on osbuild
# osbuild-composer doesn't have support for building i686 and armv7hl images
@ -33,6 +33,10 @@ License: ASL 2.0
URL: %{gourl}
Source0: %{gosource}
# https://github.com/osbuild/osbuild-composer/pull/2860
Patch0: 0001-osbuild-use-path-as-secondary-sort-key-for-fstab.patch
Patch1: 0002-test-regenerate-manifests.patch
Patch2: 0003-dbjobqueue-fix-bad-errors.As-usages.patch
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
BuildRequires: systemd
@ -216,9 +220,6 @@ Conflicts: lorax-composer
Obsoletes: lorax-composer < 34.3
%endif
# remove when F34 is EOL
Obsoletes: osbuild-composer-koji <= 23
%description
%{common_description}
@ -227,6 +228,7 @@ Obsoletes: osbuild-composer-koji <= 23
%forgeautosetup -p1
%else
%goprep -k
%autopatch -p1
%endif
%build
@ -353,7 +355,6 @@ install -m 0755 -vp tools/gen-ssh.sh %{buildroot}%
install -m 0755 -vp tools/image-info %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/run-koji-container.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/koji-compose.py %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/koji-compose-v2.py %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/libvirt_test.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/s3_test.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/generic_s3_test.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
@ -461,16 +462,12 @@ The core osbuild-composer binary. This is suitable both for spawning in containe
Summary: The worker for osbuild-composer
Requires: systemd
Requires: qemu-img
Requires: osbuild >= 55
Requires: osbuild-ostree >= 55
Requires: osbuild-lvm2 >= 55
Requires: osbuild-luks2 >= 55
Requires: osbuild >= 62
Requires: osbuild-ostree >= 62
Requires: osbuild-lvm2 >= 62
Requires: osbuild-luks2 >= 62
Requires: %{name}-dnf-json = %{version}-%{release}
# remove in F34
Obsoletes: golang-github-osbuild-composer-worker < %{version}-%{release}
Provides: golang-github-osbuild-composer-worker = %{version}-%{release}
%description worker
The worker for osbuild-composer
@ -580,6 +577,41 @@ Integration tests to be run on a pristine-dedicated system to test the osbuild-c
%endif
%changelog
* Wed Jul 27 2022 Packit <hello@packit.dev> - 58-1
Changes with 58
----------------
* Add support for container embedding (#2814)
* CI: drop /tmp/artifacts upload to Gitlab (#2857)
* COMPOSER-1623: Enable Fedora 36 testing (#2782)
* Container embedding: support accessing protected resources (#2849)
* Embedding container in OSTree commits (#2848)
* Filesystems test update (#2843)
* Improvements for gen-manifests tool and Manifest-diff test (#2821)
* Koji cloud upload fixups (#2852)
* Regenerate fedora-35 manifests + switch RHOS-01 to non ssd (#2825)
* Remove centos-8 repos (#2827)
* Remove image info from all test manifests (#2855)
* Remove koji API and the osbuild-koji job (#2822)
* Remove osbuild1 package (#2823)
* Support cloud upload for Koji composes (#2844)
* Tests: Use unified diff format - easier to read (#2820)
* Update snapshots to 20220715 (#2835)
* blueprint: Hash all user passwords (#2834)
* build(deps): bump actions/setup-go from 2 to 3 (#2815)
* ci/tests: Change the way artifacts are collected (#2474)
* image: introduce an ImageKind abstraction (#2813)
* jobqueue: store an expiry date (#2816)
* tag created vmare VMs (#2819)
* templates: update dashboards to include tenant (#2756)
* test: Install package sssd in all edge images for BZ#2088459 (#2681)
* test: Update test for push container image to registry (#2831)
Contributions from: Achilleas Koutsou, Alexander Todorov, Brian C. Lane, Chloe Kaubisch, Christian Kellner, Gianluca Zuccarelli, Jakub Rusz, Juan Abia, Ondřej Budai, Simon de Vlieger, Tom Gundersen, Tomas Hozza, Xiaofeng Wang, dependabot[bot], schutzbot
Somewhere on the Internet, 2022-07-27
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 57-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (osbuild-composer-57.tar.gz) = 10cc9c284e08fd1674f71cf379596fc7c4b207b9ecdb280c908f7510c364fd621617ef8c2e7a1008e65ee4360b41e52c5dab373bb11fde97ec0bcb3b6d399771
SHA512 (osbuild-composer-58.tar.gz) = 8e58cf424a10b294453703d86a928cc0f011a17cd6af98515c205e39821d175dd3e4881124dab43e2ffbe52751f0e29d05ac32eebc853927ea8178b5833f5020