19 upstream release

Sandboxing mechanism changed from systemd-nspawn to bubblewrap,
change requirements accordingly.
Drop no-floats-in-sources.patch, included in the release.
This commit is contained in:
Christian Kellner 2020-08-07 13:43:35 +02:00
parent 66d587483a
commit 1b9080add6
4 changed files with 11 additions and 59 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@
/osbuild-16.tar.gz
/osbuild-17.tar.gz
/osbuild-18.tar.gz
/osbuild-19.tar.gz

View File

@ -1,53 +0,0 @@
From 7b0db90c76c6b0de6a4d481e63450e8f0d1a1d9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Budai?= <obudai@redhat.com>
Date: Thu, 25 Jun 2020 09:56:30 +0200
Subject: [PATCH] sources/files: do not pass floats to --max-time
curl uses strtod from the C standard library to convert the --max-time's value
from string to double. However, this is what strtod expects:
nonempty sequence of decimal digits optionally containing decimal-point
character (as determined by the current C locale)
Yeah, unfortunately, the decimal-point character is determined by the current
C locale. For example, Czech and German locale uses a comma as the
decimal-point character.
For reasons I don't fully understand, Python thinks it's running on en_US
locale, even though LC_NUMERIC is set to cs_CZ, so it uses a full stop as the
decimal-point character when converting float to string. However, as written
before, curl fails to parse this because it expects comma.
The fix I chose is simple: Use math.ceil, so only an integer can be passed to
curl. Why ceil? Because --max-time == 0 sounds fishy. math.ceil should return
an integer (and it does in Python 3.8) but the documentation is not 100% clear
on this topic, so let's be paranoid and also convert it to int after the
ceiling.
---
sources/org.osbuild.files | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sources/org.osbuild.files b/sources/org.osbuild.files
index 42ff6ca..13ce9b8 100755
--- a/sources/org.osbuild.files
+++ b/sources/org.osbuild.files
@@ -17,6 +17,7 @@ import concurrent.futures
import glob
import itertools
import json
+import math
import os
import subprocess
import sys
@@ -102,7 +103,7 @@ def fetch(url, checksum, directory):
curl_command = [
"curl",
"--silent",
- "--max-time", f"{300 - elapsed_time}",
+ "--max-time", f"{int(math.ceil(300 - elapsed_time))}",
"--connect-timeout", "60",
"--fail",
"--location",
--
2.26.2

View File

@ -1,7 +1,7 @@
%global forgeurl https://github.com/osbuild/osbuild
%global selinuxtype targeted
Version: 18
Version: 19
%forgemeta
@ -9,13 +9,12 @@ Version: 18
%global pkgdir %{_prefix}/lib/%{pypi_name}
Name: %{pypi_name}
Release: 3%{?dist}
Release: 1%{?dist}
License: ASL 2.0
URL: %{forgeurl}
Source0: %{forgesource}
Patch0: no-floats-in-sources.patch
BuildArch: noarch
Summary: A build system for OS images
@ -24,6 +23,7 @@ BuildRequires: python3-devel
BuildRequires: python3-docutils
Requires: bash
Requires: bubblewrap
Requires: coreutils
Requires: curl
Requires: dnf
@ -32,7 +32,6 @@ Requires: glibc
Requires: policycoreutils
Requires: qemu-img
Requires: systemd
Requires: systemd-container
Requires: tar
Requires: util-linux
Requires: python3-%{pypi_name} = %{version}-%{release}
@ -80,7 +79,6 @@ containers it uses to build OS artifacts.
%prep
%forgesetup
%patch0 -p1
%build
%py3_build
@ -173,6 +171,12 @@ fi
%selinux_relabel_post -s %{selinuxtype}
%changelog
* Fri Aug 7 2020 Christian Kellner <ckellner@redhat.com> - 19-1
- Upstream release 19
- Drop no-floats-in-sources.patch included in release 19
- bubblewrap replaced systemd-nspawn for sandboxing; change the
requirements accordingly.
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 18-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (osbuild-18.tar.gz) = 0fda0cde9da80828069e8f1e7a9fd77d356f54ef95a19308b9dd46ab6e3411d1908a7e8d1f5ec7011711ee163e99b9c64ea851a494d272fa19599eccedda88dc
SHA512 (osbuild-19.tar.gz) = 88d3851b4034930a73dddd175521be58cba5be6bb9a66ebb7264b1f4df1dc1fac3dba480c136e689abf25c651f81ec9241078a90a84fe047e5e78de6165d1b23