Compare commits
10 Commits
e1f29dd5f9
...
17485fda51
Author | SHA1 | Date | |
---|---|---|---|
|
17485fda51 | ||
|
ad515a0516 | ||
|
e88e13f9b2 | ||
|
1d039861f9 | ||
|
0d5634349c | ||
|
ac55ee8114 | ||
|
efec9bddb2 | ||
|
57a7f7bd1b | ||
|
3bf00ed6b6 | ||
|
c6115a7f58 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@
|
||||
/scl-utils-2.0.1.tar.bz2
|
||||
/scl-utils-2.0.2.tar.bz2
|
||||
/scl-utils-2.0.2.tar.gz
|
||||
/scl-utils-2.0.3.tar.gz
|
||||
|
61
BZ-2056462-do-not-error-out-on-SIGINT.patch
Normal file
61
BZ-2056462-do-not-error-out-on-SIGINT.patch
Normal file
@ -0,0 +1,61 @@
|
||||
From 9147d3b66e0a263c2eb427b7892b34c925363854 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Domonkos <mdomonko@redhat.com>
|
||||
Date: Thu, 17 Feb 2022 17:36:00 +0100
|
||||
Subject: [PATCH] Don't error out when command receives SIGINT
|
||||
|
||||
Interrupting a running command isn't really an execution problem so
|
||||
don't print an error or return a non-zero exit status.
|
||||
|
||||
This is also how it worked in versions older than 2.0.
|
||||
|
||||
Resolves: rhbz#1967686
|
||||
---
|
||||
src/fallback.c | 3 +++
|
||||
src/scllib.c | 3 +++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/fallback.c b/src/fallback.c
|
||||
index 4b9c8fd..c907a34 100644
|
||||
--- a/src/fallback.c
|
||||
+++ b/src/fallback.c
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
+#include <signal.h>
|
||||
|
||||
#include "scllib.h"
|
||||
#include "sclmalloc.h"
|
||||
@@ -229,6 +230,8 @@ scl_rc fallback_run_command(char * const colnames[], const char *cmd, bool exec)
|
||||
xasprintf(&bash_cmd, "/bin/bash %s", tmp);
|
||||
status = system(bash_cmd);
|
||||
if (status == -1 || !WIFEXITED(status)) {
|
||||
+ if (WIFSIGNALED(status) && WTERMSIG(status) == SIGINT)
|
||||
+ goto exit;
|
||||
debug("Problem with executing command \"%s\"\n", bash_cmd);
|
||||
ret = ERUN;
|
||||
goto exit;
|
||||
diff --git a/src/scllib.c b/src/scllib.c
|
||||
index a182194..2ba8df8 100644
|
||||
--- a/src/scllib.c
|
||||
+++ b/src/scllib.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <rpm/rpmcli.h>
|
||||
#include <errno.h>
|
||||
#include <wordexp.h>
|
||||
+#include <signal.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "errors.h"
|
||||
@@ -341,6 +342,8 @@ scl_rc run_command(char * const colnames[], const char *cmd, bool exec)
|
||||
|
||||
status = system(cmd);
|
||||
if (status == -1 || !WIFEXITED(status)) {
|
||||
+ if (WIFSIGNALED(status) && WTERMSIG(status) == SIGINT)
|
||||
+ goto exit;
|
||||
debug("Problem with executing program \"%s\"\n", cmd);
|
||||
ret = ERUN;
|
||||
goto exit;
|
||||
--
|
||||
2.35.1
|
||||
|
21
BZ-2091000-remove-tmp-file.patch
Normal file
21
BZ-2091000-remove-tmp-file.patch
Normal file
@ -0,0 +1,21 @@
|
||||
From 864844ecc11f8cf65cd97bcffdb803211f7edaa4 Mon Sep 17 00:00:00 2001
|
||||
From: Piotr Wilkosz <piotr.wilkosz@gmail.com>
|
||||
Date: Mon, 23 May 2022 16:14:13 +0200
|
||||
Subject: [PATCH] remove tmp file at exit
|
||||
|
||||
---
|
||||
src/fallback.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/fallback.c b/src/fallback.c
|
||||
index c907a34..e67654a 100644
|
||||
--- a/src/fallback.c
|
||||
+++ b/src/fallback.c
|
||||
@@ -246,6 +246,7 @@ scl_rc fallback_run_command(char * const colnames[], const char *cmd, bool exec)
|
||||
enable_path = _free(enable_path);
|
||||
colpath = _free(colpath);
|
||||
bash_cmd = _free(bash_cmd);
|
||||
+ unlink(tmp);
|
||||
|
||||
return ret;
|
||||
}
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
@ -1,54 +0,0 @@
|
||||
From 3538686a21279c60c916e82ece02efcd88ae95b9 Mon Sep 17 00:00:00 2001
|
||||
From: Joe Orton <jorton@redhat.com>
|
||||
Date: Thu, 8 Aug 2019 09:26:00 +0100
|
||||
Subject: [PATCH] Fix crashes in "scl list-enabled":
|
||||
|
||||
* src/lib_common.c (merge_string_arrays):
|
||||
Ensure elements of returned array are strdup()ed.
|
||||
|
||||
* src/scllib.c (get_enabled_collections):
|
||||
Ensure all elements of returned array are strdup()ed.
|
||||
|
||||
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1728450
|
||||
---
|
||||
src/lib_common.c | 5 +++++
|
||||
src/scllib.c | 2 +-
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib_common.c b/src/lib_common.c
|
||||
index 1aa49a0..2e7d116 100644
|
||||
--- a/src/lib_common.c
|
||||
+++ b/src/lib_common.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <wordexp.h>
|
||||
+#include <assert.h>
|
||||
|
||||
#include "errors.h"
|
||||
#include "scllib.h"
|
||||
@@ -269,6 +270,10 @@ char **merge_string_arrays(char *const *array1, char *const *array2)
|
||||
}
|
||||
merged_array[++prev] = NULL;
|
||||
|
||||
+ for (int i = 0; i < prev; i++) {
|
||||
+ merged_array[i] = xstrdup(merged_array[i]);
|
||||
+ }
|
||||
+
|
||||
return merged_array;
|
||||
}
|
||||
|
||||
diff --git a/src/scllib.c b/src/scllib.c
|
||||
index ce8df90..3c32d65 100644
|
||||
--- a/src/scllib.c
|
||||
+++ b/src/scllib.c
|
||||
@@ -107,8 +107,8 @@ scl_rc get_enabled_collections(char ***_enabled_collections)
|
||||
sizeof(SCL_MODULES_PATH - 1))){
|
||||
|
||||
enabled_collections[i] += sizeof(SCL_MODULES_PATH);
|
||||
- enabled_collections[i] = xstrdup(enabled_collections[i]);
|
||||
}
|
||||
+ enabled_collections[i] = xstrdup(enabled_collections[i]);
|
||||
}
|
||||
|
||||
}
|
@ -3,8 +3,8 @@
|
||||
|
||||
Name: scl-utils
|
||||
Epoch: 1
|
||||
Version: 2.0.2
|
||||
Release: 19%{?dist}
|
||||
Version: 2.0.3
|
||||
Release: 4%{?dist}
|
||||
Summary: Utilities for alternative packaging
|
||||
|
||||
License: GPLv2+
|
||||
@ -12,14 +12,14 @@ URL: https://github.com/sclorg/scl-utils
|
||||
Source0: https://github.com/sclorg/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: macros.scl-filesystem
|
||||
BuildRequires: gcc make
|
||||
Buildrequires: cmake
|
||||
Buildrequires: rpm-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: rpm-devel
|
||||
BuildRequires: libcmocka libcmocka-devel environment-modules
|
||||
Requires: %{_bindir}/modulecmd
|
||||
|
||||
Patch1: 0003-Scl-utils-layout-patch-from-fedora-famillecollet.com.patch
|
||||
|
||||
# https://github.com/sclorg/scl-utils/pull/25
|
||||
Patch100: scl-utils-2.0.2-rhbz-1728450.patch
|
||||
Patch2: BZ-2056462-do-not-error-out-on-SIGINT.patch
|
||||
Patch3: BZ-2091000-remove-tmp-file.patch
|
||||
|
||||
%description
|
||||
Run-time utility for alternative packaging.
|
||||
@ -55,7 +55,11 @@ mkdir modulefiles
|
||||
mkdir prefixes
|
||||
ln -s prefixes conf
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
%files
|
||||
%dir %{_sysconfdir}/scl
|
||||
%dir %{_sysconfdir}/scl/modulefiles
|
||||
%dir %{_sysconfdir}/scl/prefixes
|
||||
%{_sysconfdir}/scl/conf
|
||||
@ -78,9 +82,27 @@ ln -s prefixes conf
|
||||
%{_rpmconfigdir}/brp-scl-python-bytecompile
|
||||
|
||||
%changelog
|
||||
* Tue Dec 13 2022 Florian Festi <ffesti@redhat.com> - 1:2.0.3-4
|
||||
- Remove tmp file (#2151261)
|
||||
|
||||
* Mon Feb 21 2022 Michal Domonkos <mdomonko@redhat.com> - 1:2.0.3-3
|
||||
- Don't error out when command receives SIGINT (#2056462)
|
||||
|
||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1:2.0.3-2
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Mon Jul 26 2021 Michal Domonkos <mdomonko@redhat.com> - 1:2.0.3-1
|
||||
- Rebase to 2.0.3 (#1986085)
|
||||
|
||||
* Mon Jul 26 2021 Michal Domonkos <mdomonko@redhat.com> - 1:2.0.2-21
|
||||
- Own directory /etc/scl (#1986040)
|
||||
|
||||
* Fri Jul 23 2021 Honza Horak <hhorak@redhat.com> - 1:2.0.2-20
|
||||
- Fix problem with python version in the byte compilation script (#1984598)
|
||||
|
||||
* Wed May 12 2021 Michal Domonkos <mdomonko@redhat.com> - 1:2.0.2-19
|
||||
- Fix dist tag syntax
|
||||
- Resolves: #1958982
|
||||
- Fix dist tag syntax (#1958982)
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:2.0.2-18
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (scl-utils-2.0.2.tar.gz) = 87a89942060c7103c5ff5b1c870ce9b8f82538da96849306b9c3ce8ff13754a3a43273fde4830e618b1b6ecdf834cadf8949eab337016092b6a520f23d8babff
|
||||
SHA512 (scl-utils-2.0.3.tar.gz) = 3d18a435003d37264afbbac83c1cbd533b76b44661f613ac9e28f8ed1c08b00cda90e567573711fc8f101174d8937ddab320961b1da4fbdfa137a1f50c3f4486
|
||||
|
Loading…
Reference in New Issue
Block a user