Architecture specific change in rpms/vmaf.git
by githook-noreply@fedoraproject.org
The package rpms/vmaf.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/vmaf.git/commit/?id=d299c8241a163....
Change:
-%ifarch i686
Thanks.
Full change:
============
commit d299c8241a1635245a9a1b3597a6eca62269cdfd
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Wed Mar 4 22:40:51 2020 +0000
Update to 1.5.1
diff --git a/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch b/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch
deleted file mode 100644
index f55eba3..0000000
--- a/0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 870de42512805dcdd469ef0301476b3fc0e4bc95 Mon Sep 17 00:00:00 2001
-From: Nicolas Chauvet <kwizart(a)gmail.com>
-Date: Sat, 7 Apr 2018 12:32:54 +0200
-Subject: [PATCH] Use PREFIX and LIBDIR build variable instead of custom ones
-
----
- wrapper/Makefile | 29 +++++++++++++++--------------
- 1 file changed, 15 insertions(+), 14 deletions(-)
-
-diff --git a/wrapper/Makefile b/wrapper/Makefile
-index 9317515..868b13f 100644
---- a/wrapper/Makefile
-+++ b/wrapper/Makefile
-@@ -8,7 +8,8 @@ SRCDIR = $(TOP)/src
- OBJDIR = $(TOP)/obj
- FEATURESRCDIR = $(TOP)/../feature/src
- PTOOLSDIR = $(TOP)/../ptools
--INSTALL_PREFIX = /usr/local
-+PREFIX ?= /usr/local
-+LIBDIR ?= $(PREFIX)/lib
- INCLUDES += -I$(TOP)/../feature/src
- INCLUDES += -I$(TOP)/../feature/src/common
-
-@@ -168,24 +169,24 @@ vmafossexec: $(OBJDIR)/main.o $(LIBVMAF)
-
- .PHONY: install
- install:
-- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/lib
-- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/include
-- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/share
-- mkdir -p $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig
-- cp $(LIBVMAF) $(DESTDIR)$(INSTALL_PREFIX)/lib/$(LIBVMAF)
-- cp src/libvmaf.h $(DESTDIR)$(INSTALL_PREFIX)/include/
-- cp -r ../model $(DESTDIR)$(INSTALL_PREFIX)/share/
-- cp libvmaf.pc $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig/
-+ mkdir -p $(DESTDIR)$(LIBDIR)
-+ mkdir -p $(DESTDIR)$(PREFIX)/include
-+ mkdir -p $(DESTDIR)$(PREFIX)/share
-+ mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
-+ cp $(LIBVMAF) $(DESTDIR)$(LIBDIR)/$(LIBVMAF)
-+ cp src/libvmaf.h $(DESTDIR)$(PREFIX)/include/
-+ cp -r ../model $(DESTDIR)$(PREFIX)/share/
-+ cp libvmaf.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
-
- .PHONY: uninstall
- uninstall:
-- rm -f $(DESTDIR)$(INSTALL_PREFIX)/lib/$(LIBVMAF)
-- rm -f $(DESTDIR)$(INSTALL_PREFIX)/include/libvmaf.h
-- rm -fr $(DESTDIR)$(INSTALL_PREFIX)/share/model
-- rm -f $(DESTDIR)$(INSTALL_PREFIX)/lib/pkgconfig/libvmaf.pc
-+ rm -f $(DESTDIR)$(LIBDIR)/$(LIBVMAF)
-+ rm -f $(DESTDIR)$(PREFIX)/include/libvmaf.h
-+ rm -fr $(DESTDIR)$(PREFIX)/share/model
-+ rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/libvmaf.pc
-
- testlib: $(SRCDIR)/main.cpp
-- $(CXX) -s -o $@ $(CXXFLAGS) $^ -I $(FEATURESRCDIR) -I $(FEATURESRCDIR)/common -I $(DESTDIR)$(INSTALL_PREFIX)/include -L$(DESTDIR)$(INSTALL_PREFIX)/lib -lvmaf -pthread
-+ $(CXX) -s -o $@ $(CXXFLAGS) $^ -I $(FEATURESRCDIR) -I $(FEATURESRCDIR)/common -I $(DESTDIR)$(PREFIX)/include -L$(DESTDIR)$(LIBDIR) -lvmaf -pthread
-
- .PHONY: clean
- clean:
---
-2.17.2
-
diff --git a/0001-Use-better-FLAGS-for-ptools.patch b/0001-Use-better-FLAGS-for-ptools.patch
new file mode 100644
index 0000000..cd6bd9b
--- /dev/null
+++ b/0001-Use-better-FLAGS-for-ptools.patch
@@ -0,0 +1,35 @@
+From 4adfd8064dbaad0e7d48e6668de322213ed621c8 Mon Sep 17 00:00:00 2001
+From: Leigh Scott <leigh123linux(a)gmail.com>
+Date: Wed, 4 Mar 2020 21:43:41 +0000
+Subject: [PATCH 1/4] Use better FLAGS for ptools
+
+---
+ libvmaf/src/third_party/ptools/Makefile.Linux | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/libvmaf/src/third_party/ptools/Makefile.Linux b/libvmaf/src/third_party/ptools/Makefile.Linux
+index 73d8241..99d4e83 100644
+--- a/libvmaf/src/third_party/ptools/Makefile.Linux
++++ b/libvmaf/src/third_party/ptools/Makefile.Linux
+@@ -10,7 +10,8 @@ CC = g++
+ OC = ./opencontainers_1_8_4
+ OCINC = $(OC)/include
+
+-CFLAGS = -Wall -Wextra -fpic -O -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT
++CFLAGS_COMMON = -Wall -Wextra -fpic -O
++CFLAGS = $(CFLAGS) -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT
+
+ ## How to build with OCString
+ ##CFLAGS = -Wall -O4 -DLINUX_ -DOC_USE_OC_STRING -DOC_USE_OC_EXCEPTIONS -DOC_ONLY_NEEDED_STL -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC)
+@@ -30,7 +31,7 @@ all: midasyeller_ex midastalker_ex midastalker_ex2 httpclient_ex midasserver_ex
+ $(CC) $(CFLAGS) -c $<
+
+ libptools.so : $(COM_OBJS)
+- $(CC) $(CCFLAGS) $(COM_OBJS) -shared -o libptools.so
++ $(CC) $(CCFLAGS) $(COM_OBJS) $(LDFLAGS) -shared -Wl,-soname,libptools.so.0 -o libptools.so
+
+ midasserver_ex : $(COM_OBJS) midasserver_ex.o
+ $(CC) $(CCFLAGS) $(COM_OBJS) midasserver_ex.o -pthread -o midasserver_ex
+--
+2.24.1
+
diff --git a/0002-Unbundle-pugixml.patch b/0002-Unbundle-pugixml.patch
index fd43ec2..ee469f3 100644
--- a/0002-Unbundle-pugixml.patch
+++ b/0002-Unbundle-pugixml.patch
@@ -1,38 +1,58 @@
-From a6765396684ddd62fe660cb914e495e61a4dcab9 Mon Sep 17 00:00:00 2001
-From: Nicolas Chauvet <kwizart(a)gmail.com>
-Date: Sat, 7 Apr 2018 13:43:48 +0200
-Subject: [PATCH] Unbundle pugixml
+From 79d6313628216f9c5d6e758d8d113c97df152ad9 Mon Sep 17 00:00:00 2001
+From: Leigh Scott <leigh123linux(a)gmail.com>
+Date: Wed, 4 Mar 2020 21:49:48 +0000
+Subject: [PATCH 2/4] Unbundle pugixml
---
- wrapper/Makefile | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
+ libvmaf/src/meson.build | 7 +++++--
+ libvmaf/src/vmaf.cpp | 2 +-
+ 2 files changed, 6 insertions(+), 3 deletions(-)
-diff --git a/wrapper/Makefile b/wrapper/Makefile
-index 868b13f..4a891e1 100644
---- a/wrapper/Makefile
-+++ b/wrapper/Makefile
-@@ -43,9 +43,9 @@ OBJS = \
- $(OBJDIR)/vmaf.o \
- $(OBJDIR)/darray.o \
- $(OBJDIR)/libvmaf.o \
-- $(OBJDIR)/pugixml.o \
- $(OBJDIR)/blur_array.o \
-- $(OBJDIR)/cpu_info.o
-+ $(OBJDIR)/cpu_info.o \
-+ $(NULL)
+diff --git a/libvmaf/src/meson.build b/libvmaf/src/meson.build
+index 74047d2..9f723d8 100644
+--- a/libvmaf/src/meson.build
++++ b/libvmaf/src/meson.build
+@@ -31,6 +31,7 @@ ptools_sources = [
+ ]
- AVX_OBJS := \
- $(OBJDIR)/convolution_avx.o \
-@@ -158,9 +158,6 @@ $(OBJDIR)/vmaf.o: $(SRCDIR)/vmaf.cpp
- $(OBJDIR)/%.o: $(SRCDIR)/%.c
- $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $<
+ thread_lib = dependency('threads')
++pugixml_lib = dependency('pugixml')
+ math_lib = cc.find_library('m', required : false)
--$(OBJDIR)/%.o: $(SRCDIR)/pugixml/%.cpp
-- $(CXX) -c -o $@ $(CXXFLAGS) $(CPPFLAGS) $<
--
- $(LIBVMAF): $(OBJS) $(wildcard ../ptools/*.o)
- ar rcs $@ $^
+ libptools = shared_library(
+@@ -115,7 +116,6 @@ libvmaf_feature_static_lib = static_library(
+ )
+ vmaf_sources = [
+- third_party_dir + 'pugixml/pugixml.cpp',
+ src_dir + 'mem.c',
+ src_dir + 'combo.c',
+ src_dir + 'cpu_info.c',
+@@ -131,7 +131,10 @@ libvmaf = both_libraries(
+ include_directories : vmaf_include,
+ c_args : vmaf_cflags_common,
+ cpp_args : vmaf_cflags_common,
+- dependencies : thread_lib,
++ dependencies : [
++ thread_lib,
++ pugixml_lib,
++ ],
+ objects : [
+ convolution_and_psnr_avx_static_lib.extract_all_objects(),
+ libptools.extract_all_objects(),
+diff --git a/libvmaf/src/vmaf.cpp b/libvmaf/src/vmaf.cpp
+index 64bcf5f..c9cab57 100644
+--- a/libvmaf/src/vmaf.cpp
++++ b/libvmaf/src/vmaf.cpp
+@@ -28,7 +28,7 @@
+
+ #include "vmaf.h"
+ #include "combo.h"
+-#include "third_party/pugixml/pugixml.hpp"
++#include <pugixml.hpp>
+ #include "timer.h"
+ #include "jsonprint.h"
+ #include "debug.h"
--
-2.17.2
+2.24.1
diff --git a/0003-Drop-AVX-when-not-relevant.patch b/0003-Drop-AVX-when-not-relevant.patch
deleted file mode 100644
index 5d68f52..0000000
--- a/0003-Drop-AVX-when-not-relevant.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From bd90f8e5d7bb1d323ec35d8326915ded41cce587 Mon Sep 17 00:00:00 2001
-From: Nicolas Chauvet <kwizart(a)gmail.com>
-Date: Sat, 7 Apr 2018 13:44:42 +0200
-Subject: [PATCH 03/11] Drop AVX when not relevant
-
----
- feature/Makefile | 9 +++++++++
- wrapper/Makefile | 17 ++++++++++++++---
- 2 files changed, 23 insertions(+), 3 deletions(-)
-
-diff --git a/feature/Makefile b/feature/Makefile
-index 111d07c..c786a27 100644
---- a/feature/Makefile
-+++ b/feature/Makefile
-@@ -10,13 +10,22 @@ LIBVMAF = $(TOP)/../wrapper/libvmaf.a
- CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic
- # CFLAGS_COMMON = -g -O0 -fPIC -Wall -Wextra -pedantic
-
-+UNAME := $(shell uname -m)
- CFLAGS := -std=c99 $(CFLAGS_COMMON) $(CFLAGS)
- CXXFLAGS := -std=c++11 $(CFLAGS_COMMON) $(CXXFLAGS)
- CPPFLAGS := $(CPPFLAGS)
- LIBS := $(LIBS) -lm
- LDFLAGS := $(LDFLAGS)
-
-+ifeq ($(UNAME), x86_64)
-+ USE_AVX = 1
-+endif
-+ifeq ($(UNAME), i386)
-+ USE_AVX = 1
-+endif
-+ifeq ($(USE_AVX), 1)
- $(AVX_OBJS): EXTRA_CFLAGS := -mavx
-+endif
-
- $(OBJDIR)/vmaf_main.o: $(SRCDIR)/vmaf_main.c
- $(CC) $(EXTRA_CFLAGS) -c -o $@ $(CFLAGS) $(CPPFLAGS) $<
-diff --git a/wrapper/Makefile b/wrapper/Makefile
-index 985a30f..62bde27 100644
---- a/wrapper/Makefile
-+++ b/wrapper/Makefile
-@@ -3,6 +3,7 @@ LIBVMAF = libvmaf.a
- .PHONY: all
- all: $(LIBVMAF) vmafossexec
-
-+UNAME := $(shell uname -m)
- TOP = $(shell pwd)
- SRCDIR = $(TOP)/src
- OBJDIR = $(TOP)/obj
-@@ -11,6 +12,18 @@ PTOOLSDIR = $(TOP)/../ptools
- PREFIX ?= /usr/local
- LIBDIR ?= $(PREFIX)/lib
-
-+ifeq ($(UNAME), x86_64)
-+ USE_AVX = 1
-+endif
-+ifeq ($(UNAME), i386)
-+ USE_AVX = 1
-+endif
-+ifeq ($(USE_AVX), 1)
-+AVX_OBJS := \
-+ $(OBJDIR)/convolution_avx.o \
-+
-+endif
-+
- OBJS = \
- $(OBJDIR)/alloc.o \
- $(OBJDIR)/alignment.o \
-@@ -44,11 +57,9 @@ OBJS = \
- $(OBJDIR)/libvmaf.o \
- $(OBJDIR)/blur_array.o \
- $(OBJDIR)/cpu_info.o \
-+ $(AVX_OBJS) \
- $(NULL)
-
--AVX_OBJS := \
-- $(OBJDIR)/convolution_avx.o \
--
- CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic -D MULTI_THREADING
- # CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic -D MULTI_THREADING -D PRINT_PROGRESS
- # CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic
---
-2.17.1
-
diff --git a/0003-Fix-soname.patch b/0003-Fix-soname.patch
new file mode 100644
index 0000000..2196456
--- /dev/null
+++ b/0003-Fix-soname.patch
@@ -0,0 +1,24 @@
+From 564d4c50e35bbb7428cab8ae58d31313fdfe065b Mon Sep 17 00:00:00 2001
+From: Leigh Scott <leigh123linux(a)gmail.com>
+Date: Wed, 4 Mar 2020 21:52:08 +0000
+Subject: [PATCH 3/4] Fix soname
+
+---
+ libvmaf/src/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libvmaf/src/meson.build b/libvmaf/src/meson.build
+index 9f723d8..1295b71 100644
+--- a/libvmaf/src/meson.build
++++ b/libvmaf/src/meson.build
+@@ -129,6 +129,7 @@ libvmaf = both_libraries(
+ 'vmaf',
+ vmaf_sources,
+ include_directories : vmaf_include,
++ soversion: 0,
+ c_args : vmaf_cflags_common,
+ cpp_args : vmaf_cflags_common,
+ dependencies : [
+--
+2.24.1
+
diff --git a/0004-Avoid-x86cpudetection-code-when-not-relevant.patch b/0004-Avoid-x86cpudetection-code-when-not-relevant.patch
new file mode 100644
index 0000000..bbc3fe0
--- /dev/null
+++ b/0004-Avoid-x86cpudetection-code-when-not-relevant.patch
@@ -0,0 +1,39 @@
+From f6acf39e17ce3d1e607be243c263dffbac9cb862 Mon Sep 17 00:00:00 2001
+From: Leigh Scott <leigh123linux(a)gmail.com>
+Date: Wed, 4 Mar 2020 22:06:51 +0000
+Subject: [PATCH 4/4] Avoid x86cpudetection code when not relevant
+
+---
+ libvmaf/src/feature/common/cpu.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/libvmaf/src/feature/common/cpu.c b/libvmaf/src/feature/common/cpu.c
+index ff96ddc..efcb8ec 100644
+--- a/libvmaf/src/feature/common/cpu.c
++++ b/libvmaf/src/feature/common/cpu.c
+@@ -16,9 +16,10 @@
+ *
+ */
+
+-#include "cpudetect.h"
+ #include "cpu.h"
+
++#if defined(__i386__) || defined(__x86_64)
++#include "cpudetect.h"
+
+ enum vmaf_cpu cpu_autodetect()
+ {
+@@ -31,3 +32,10 @@ enum vmaf_cpu cpu_autodetect()
+ else
+ return VMAF_CPU_NONE;
+ }
++
++#else
++enum vmaf_cpu cpu_autodetect()
++{
++ return VMAF_CPU_NONE;
++}
++#endif
+--
+2.24.1
+
diff --git a/0004-Use-better-FLAGS-for-ptools.patch b/0004-Use-better-FLAGS-for-ptools.patch
deleted file mode 100644
index 3f45ac5..0000000
--- a/0004-Use-better-FLAGS-for-ptools.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 1f85e97f791709405d5b38981d1786727c229bc0 Mon Sep 17 00:00:00 2001
-From: Nicolas Chauvet <kwizart(a)gmail.com>
-Date: Sat, 7 Apr 2018 13:54:40 +0200
-Subject: [PATCH 04/11] Use better FLAGS for ptools
-
----
- ptools/Makefile.Linux | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/ptools/Makefile.Linux b/ptools/Makefile.Linux
-index 73d8241..890141b 100644
---- a/ptools/Makefile.Linux
-+++ b/ptools/Makefile.Linux
-@@ -10,7 +10,8 @@ CC = g++
- OC = ./opencontainers_1_8_4
- OCINC = $(OC)/include
-
--CFLAGS = -Wall -Wextra -fpic -O -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT
-+CFLAGS_COMMON = -Wall -Wextra -fpic -O
-+CFLAGS = $(CFLAGS_COMMON) -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT
-
- ## How to build with OCString
- ##CFLAGS = -Wall -O4 -DLINUX_ -DOC_USE_OC_STRING -DOC_USE_OC_EXCEPTIONS -DOC_ONLY_NEEDED_STL -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC)
-@@ -30,7 +31,7 @@ all: midasyeller_ex midastalker_ex midastalker_ex2 httpclient_ex midasserver_ex
- $(CC) $(CFLAGS) -c $<
-
- libptools.so : $(COM_OBJS)
-- $(CC) $(CCFLAGS) $(COM_OBJS) -shared -o libptools.so
-+ $(CC) $(CCFLAGS) $(COM_OBJS) $(LDFLAGS) -shared -Wl,-soname,libptools.so.0 -o libptools.so
-
- midasserver_ex : $(COM_OBJS) midasserver_ex.o
- $(CC) $(CCFLAGS) $(COM_OBJS) midasserver_ex.o -pthread -o midasserver_ex
---
-2.17.1
-
diff --git a/0005-Switch-pugixml-include.patch b/0005-Switch-pugixml-include.patch
deleted file mode 100644
index 0eb5708..0000000
--- a/0005-Switch-pugixml-include.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 80053ca29abc26ff6129ea5cb5c7e7545519b625 Mon Sep 17 00:00:00 2001
-From: Nicolas Chauvet <kwizart(a)gmail.com>
-Date: Sat, 7 Apr 2018 13:57:00 +0200
-Subject: [PATCH] Switch pugixml include
-
----
- wrapper/src/vmaf.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/wrapper/src/vmaf.cpp b/wrapper/src/vmaf.cpp
-index fa1dce9..3e193bc 100644
---- a/wrapper/src/vmaf.cpp
-+++ b/wrapper/src/vmaf.cpp
-@@ -29,7 +29,7 @@
-
- #include "vmaf.h"
- #include "combo.h"
--#include "pugixml/pugixml.hpp"
-+#include <pugixml.hpp>
- #include "timer.h"
- #include "jsonprint.h"
- #include "debug.h"
---
-2.17.2
-
diff --git a/0006-Switch-to-shared-library-for-libvmaf.patch b/0006-Switch-to-shared-library-for-libvmaf.patch
deleted file mode 100644
index 08a3293..0000000
--- a/0006-Switch-to-shared-library-for-libvmaf.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From f3b0da9d64e0ad5e668abc97137635f3c5da2d8f Mon Sep 17 00:00:00 2001
-From: Nicolas Chauvet <kwizart(a)gmail.com>
-Date: Sat, 7 Apr 2018 14:33:30 +0200
-Subject: [PATCH] Switch to shared library for libvmaf
-
----
- feature/Makefile | 2 +-
- wrapper/.gitignore | 1 +
- wrapper/Makefile | 4 ++--
- 3 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/feature/Makefile b/feature/Makefile
-index 111d07c..86ced7d 100644
---- a/feature/Makefile
-+++ b/feature/Makefile
-@@ -5,7 +5,7 @@ TOP = $(shell pwd)
- SRCDIR = $(TOP)/src
- OBJDIR = $(TOP)/obj
- TOOLDIR = $(TOP)/tool
--LIBVMAF = $(TOP)/../wrapper/libvmaf.a
-+LIBVMAF = $(TOP)/../wrapper/libvmaf.so
-
- CFLAGS_COMMON = -g -O3 -fPIC -w -Wextra -pedantic
- # CFLAGS_COMMON = -g -O0 -fPIC -Wall -Wextra -pedantic
-diff --git a/wrapper/.gitignore b/wrapper/.gitignore
-index b721ec4..16e4e57 100644
---- a/wrapper/.gitignore
-+++ b/wrapper/.gitignore
-@@ -1,6 +1,7 @@
- *.o
- vmafossexec
- libvmaf.a
-+libvmaf.so*
- testlib
- .cproject
- .project
-diff --git a/wrapper/Makefile b/wrapper/Makefile
-index 4a891e1..2aeaf66 100644
---- a/wrapper/Makefile
-+++ b/wrapper/Makefile
-@@ -1,4 +1,4 @@
--LIBVMAF = libvmaf.a
-+LIBVMAF = libvmaf.so
-
- .PHONY: all
- all: $(LIBVMAF) vmafossexec
-@@ -159,7 +159,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c
- $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $<
-
- $(LIBVMAF): $(OBJS) $(wildcard ../ptools/*.o)
-- ar rcs $@ $^
-+ $(CC) $(LDFLAGS) $^ -shared -Wl,-soname,libvmaf.so.0 -o $@
-
- vmafossexec: $(OBJDIR)/main.o $(LIBVMAF)
- $(CXX) -s -o $@ $(LDFLAGS) $^ -pthread
---
-2.17.2
-
diff --git a/0007-Unbundle-libsvm.patch b/0007-Unbundle-libsvm.patch
deleted file mode 100644
index c69f535..0000000
--- a/0007-Unbundle-libsvm.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1b1b5db051e99bd7070fd996d46af4f88d030452 Mon Sep 17 00:00:00 2001
-From: Nicolas Chauvet <kwizart(a)gmail.com>
-Date: Sat, 7 Apr 2018 14:35:50 +0200
-Subject: [PATCH] Unbundle libsvm
-
----
- Makefile | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 5a13baa..d2ba5cc 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,5 @@
- TARGETS = \
- ptools \
-- libsvm \
- wrapper \
- feature
-
-@@ -9,8 +8,6 @@ all:
- cd $${dir}; $(MAKE); cd ..; \
- done
-
-- cd libsvm; $(MAKE) lib; cd ..;
--
- clean:
- -for dir in $(TARGETS); do \
- cd $${dir}; $(MAKE) clean; cd ..; \
---
-2.17.2
-
diff --git a/0008-Add-pugixml-LIBS.patch b/0008-Add-pugixml-LIBS.patch
deleted file mode 100644
index 30cb36e..0000000
--- a/0008-Add-pugixml-LIBS.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From b0fbd280173737102f1814e59452545c6d116cb1 Mon Sep 17 00:00:00 2001
-From: Nicolas Chauvet <kwizart(a)gmail.com>
-Date: Sat, 7 Apr 2018 14:43:21 +0200
-Subject: [PATCH] Add pugixml LIBS
-
----
- wrapper/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/wrapper/Makefile b/wrapper/Makefile
-index 2aeaf66..ac6decc 100644
---- a/wrapper/Makefile
-+++ b/wrapper/Makefile
-@@ -159,7 +159,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c
- $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) -I $(FEATURESRCDIR) $<
-
- $(LIBVMAF): $(OBJS) $(wildcard ../ptools/*.o)
-- $(CC) $(LDFLAGS) $^ -shared -Wl,-soname,libvmaf.so.0 -o $@
-+ $(CC) $(LDFLAGS) $^ -shared -Wl,-soname,libvmaf.so.0 -lpugixml -pthread -o $@
-
- vmafossexec: $(OBJDIR)/main.o $(LIBVMAF)
- $(CXX) -s -o $@ $(LDFLAGS) $^ -pthread
---
-2.17.2
-
diff --git a/0009-Avoid-x86cpudetection-code-when-not-relevant.patch b/0009-Avoid-x86cpudetection-code-when-not-relevant.patch
deleted file mode 100644
index 95e336d..0000000
--- a/0009-Avoid-x86cpudetection-code-when-not-relevant.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 02e035cfe70c8c89e7b0f7ac8e9dd0548cfcab56 Mon Sep 17 00:00:00 2001
-From: Nicolas Chauvet <kwizart(a)gmail.com>
-Date: Sat, 7 Apr 2018 18:00:25 +0200
-Subject: [PATCH] Avoid x86cpudetection code when not relevant
-
----
- feature/src/common/cpu.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/feature/src/common/cpu.c b/feature/src/common/cpu.c
-index 85156f8..3d48dcd 100644
---- a/feature/src/common/cpu.c
-+++ b/feature/src/common/cpu.c
-@@ -16,9 +16,10 @@
- *
- */
-
--#include "cpudetect.h"
- #include "cpu.h"
-
-+#if defined(__i386__) || defined(__x86_64)
-+#include "cpudetect.h"
-
- enum vmaf_cpu cpu_autodetect()
- {
-@@ -31,3 +32,10 @@ enum vmaf_cpu cpu_autodetect()
- else
- return VMAF_CPU_NONE;
- }
-+
-+#else
-+enum vmaf_cpu cpu_autodetect()
-+{
-+ return VMAF_CPU_NONE;
-+}
-+#endif
---
-2.17.2
-
diff --git a/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch b/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch
deleted file mode 100644
index 44ecab3..0000000
--- a/0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 8b4d74a98a95aa12d58f9ebaded2c562b62111f7 Mon Sep 17 00:00:00 2001
-From: Nicolas Chauvet <kwizart(a)gmail.com>
-Date: Sat, 7 Apr 2018 19:16:00 +0200
-Subject: [PATCH] Fix libvmaf.pc to use Libs.private for pthread m
-
-This avoid to link to pthread and m when not needed
-Also avoid to link to a specitic libstdc++
-(as reported in https://github.com/Netflix/vmaf/issues/122)
-
-Signed-off-by: Nicolas Chauvet <kwizart(a)gmail.com>
----
- wrapper/libvmaf.pc | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/wrapper/libvmaf.pc b/wrapper/libvmaf.pc
-index e48d5a8..416d327 100644
---- a/wrapper/libvmaf.pc
-+++ b/wrapper/libvmaf.pc
-@@ -10,6 +10,6 @@ URL: https://github.com/Netflix/vmaf
- Requires:
- Requires.private:
- Conflicts:
--Libs: -L${libdir} -lvmaf -lstdc++ -lpthread -lm
--Libs.private:
-+Libs: -L${libdir} -lvmaf
-+Libs.private: -lpthread -lm
- Cflags: -I${includedir}
---
-2.17.2
-
diff --git a/0011-Add-msse2-for-i686.patch b/0011-Add-msse2-for-i686.patch
deleted file mode 100644
index e34b259..0000000
--- a/0011-Add-msse2-for-i686.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From c4af3c8270c8f498601d7dd68426c4bd52583006 Mon Sep 17 00:00:00 2001
-From: Nicolas Chauvet <kwizart(a)gmail.com>
-Date: Sat, 7 Apr 2018 19:30:49 +0200
-Subject: [PATCH 11/11] Add -msse2 for i686
-
-With x86_64 -msse2 is implicit, but not i686
-Both asm option needs to be enabled there
-
-Signed-off-by: Nicolas Chauvet <kwizart(a)gmail.com>
----
- wrapper/Makefile | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/wrapper/Makefile b/wrapper/Makefile
-index ceba5dc..a38d35b 100644
---- a/wrapper/Makefile
-+++ b/wrapper/Makefile
-@@ -14,9 +14,11 @@ LIBDIR ?= $(PREFIX)/lib
-
- ifeq ($(UNAME), x86_64)
- USE_AVX = 1
-+ ASM_CFLAGS = -mavx
- endif
- ifeq ($(UNAME), i386)
- USE_AVX = 1
-+ ASM_CFLAGS = -msse -msse2 -mavx
- endif
- ifeq ($(USE_AVX), 1)
- AVX_OBJS := \
-@@ -70,7 +72,7 @@ CXXFLAGS := -std=c++11 $(CFLAGS_COMMON) $(CXXFLAGS)
- CPPFLAGS := $(CPPFLAGS)
- LDFLAGS := $(LDFLAGS)
-
--$(AVX_OBJS): EXTRA_CFLAGS := -mavx
-+$(AVX_OBJS): EXTRA_CFLAGS := $(ASM_CFLAGS)
-
- $(OBJDIR)/alloc.o: $(FEATURESRCDIR)/common/alloc.c
- $(CC) -c -o $@ $(CFLAGS) $(CPPFLAGS) $<
---
-2.17.1
-
diff --git a/sources b/sources
index e1d2544..d6f9e45 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (vmaf-1.3.15.tar.gz) = 48dd07e7cf0bca0133739d788e0dab016304cb3b33c72db5a2bc55a55768c3efac6b85c413e8471bfa362bf6ce3bd20994bf996af9cf09c37f2be977791c08c6
+SHA512 (vmaf-1.5.1.tar.gz) = f587c70fd830a491e9c75f65bc4f4bff137218c504aab7d3d4f2eba1affaac8a32eb6049ec00ad8db6a4f26079c555da3d5803f14f9dd01c199cc89df2e4a975
diff --git a/vmaf.spec b/vmaf.spec
index 932d039..f2ea755 100644
--- a/vmaf.spec
+++ b/vmaf.spec
@@ -1,25 +1,21 @@
Name: vmaf
-Version: 1.3.15
-Release: 2%{?dist}
+Version: 1.5.1
+Release: 1%{?dist}
Summary: Video Multi-Method Assessment Fusion
-License: ASL 2.0
+License: BSD-2-Clause-Patent
URL: https://github.com/netflix/vmaf
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
-Patch0: 0001-Use-PREFIX-and-LIBDIR-build-variable-instead-of-cust.patch
+Patch0: 0001-Use-better-FLAGS-for-ptools.patch
Patch1: 0002-Unbundle-pugixml.patch
-Patch3: 0004-Use-better-FLAGS-for-ptools.patch
-Patch4: 0005-Switch-pugixml-include.patch
-Patch5: 0006-Switch-to-shared-library-for-libvmaf.patch
-Patch6: 0007-Unbundle-libsvm.patch
-Patch7: 0008-Add-pugixml-LIBS.patch
-Patch8: 0009-Avoid-x86cpudetection-code-when-not-relevant.patch
-Patch9: 0010-Fix-libvmaf.pc-to-use-Libs.private-for-pthread-m.patch
+Patch3: 0003-Fix-soname.patch
+Patch4: 0004-Avoid-x86cpudetection-code-when-not-relevant.patch
# This project relies on AVX
ExclusiveArch: x86_64
BuildRequires: gcc-c++
+BuildRequires: meson
BuildRequires: libsvm-devel
BuildRequires: pugixml-devel
@@ -64,35 +60,25 @@ developing applications that use %{name}.
%prep
%autosetup -p1
# Unbundle
-rm -rf wrapper/src/pugixml
-rm -rf libsvm
-
-# Tweak libvmaf.pc
-sed -i -e 's|/usr/local|%{_prefix}|g' wrapper/libvmaf.pc
-sed -i -e 's|/usr/lib|%{_libdir}|g' wrapper/libvmaf.pc
-
+rm -rf libvmaf/src/third_party/pugixml
+rm -rf third_party/libsvm
%build
-%ifarch i686
-export ASM_CFLAGS="-msse -msse2 -mavx"
-%endif
-%make_build CFLAGS_COMMON="%{optflags} ${ASM_CFLAGS} -fPIC" LDFLAGS="%{__global_ldflags}" V=1
-
+pushd libvmaf
+%meson
+%meson_build
+popd
%install
-%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
+pushd libvmaf
+%meson_install
+popd
-mv %{buildroot}%{_libdir}/libvmaf.so \
+mv %{buildroot}%{_libdir}/libvmaf.so.0 \
%{buildroot}%{_libdir}/libvmaf.so.0.0.0
ln -s libvmaf.so.0.0.0 \
%{buildroot}%{_libdir}/libvmaf.so.0
-ln -s libvmaf.so.0 \
- %{buildroot}%{_libdir}/libvmaf.so
-
-# Install vmafossexec
-mkdir -p %{buildroot}%{_bindir}
-install -pm 0755 wrapper/vmafossexec \
- %{buildroot}%{_bindir}
+rm -f %{buildroot}%{_libdir}/libvmaf.a
#RPM Macros support
mkdir -p %{buildroot}%{rpmmacrodir}
@@ -119,12 +105,15 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name}
%files -n libvmaf-devel
%doc CONTRIBUTING.md
%{rpmmacrodir}/macros.%{name}
-%{_includedir}/libvmaf.h
+%{_includedir}/libvmaf/
%{_libdir}/*.so
%{_libdir}/pkgconfig/libvmaf.pc
%changelog
+* Tue Mar 03 2020 Leigh Scott <leigh123linux(a)gmail.com> - 1.5.1-1
+- Update to 1.5.1
+
* Fri Jan 31 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.3.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4 years, 2 months
Architecture specific change in rpms/ceph.git
by githook-noreply@fedoraproject.org
The package rpms/ceph.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/ceph.git/commit/?id=de4da99414a1b....
Change:
-%ifarch x86_64
Thanks.
Full change:
============
commit afd1749306ce4741a380c2a0c17ea5d4739564e8
Merge: 8fba3c4 f30bd24
Author: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Date: Wed Mar 4 16:20:05 2020 -0500
Merge remote-tracking branch 'origin/f32' into f31
commit f30bd24a7b8db81f3a849b257293625dcd3dc9e4
Author: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Date: Wed Mar 4 10:31:51 2020 -0500
ceph 14.2.8 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
diff --git a/0005-cmake-modules-CheckCxxAtomic.cmake.patch b/0005-cmake-modules-CheckCxxAtomic.cmake.patch
new file mode 100644
index 0000000..71b7045
--- /dev/null
+++ b/0005-cmake-modules-CheckCxxAtomic.cmake.patch
@@ -0,0 +1,39 @@
+--- a/cmake/modules/CheckCxxAtomic.cmake 2020-03-02 12:49:20.000000000 -0500
++++ b/cmake/modules/CheckCxxAtomic.cmake 2020-01-29 12:53:56.952149798 -0500
+@@ -10,18 +10,29 @@
+ check_cxx_source_compiles("
+ #include <atomic>
+ #include <cstdint>
++
++#if __s390x__
++// Boost needs 16-byte atomics for tagged pointers.
++// These are implemented via inline instructions on the platform
++// if 16-byte alignment can be proven, and are delegated to libatomic
++// library routines otherwise. Whether or not alignment is provably
++// OK for a std::atomic unfortunately depends on compiler version and
++// optimization levels, and also on the details of the expression.
++// We specifically test access via an otherwise unknown pointer here
++// to ensure we get the most complex case. If this access can be
++// done without libatomic, then all accesses can be done.
++bool atomic16(std::atomic<unsigned __int128> *ptr)
++{
++ return *ptr != 0;
++}
++#endif
++
+ int main() {
+ std::atomic<uint8_t> w1;
+ std::atomic<uint16_t> w2;
+ std::atomic<uint32_t> w4;
+ std::atomic<uint64_t> w8;
+-#ifdef __s390x__
+- // Boost needs 16-byte atomics for tagged pointers.
+- std::atomic<unsigned __int128> w16;
+-#else
+- #define w16 0
+-#endif
+- return w1 + w2 + w4 + w8 + w16;
++ return w1 + w2 + w4 + w8;
+ }
+ " ${var})
+ endfunction(check_cxx_atomics)
diff --git a/ceph.spec b/ceph.spec
index 8002d20..8087bd5 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -128,6 +128,7 @@ Source0: %{?_remote_tarball_prefix}ceph-%{version}.tar.gz
Patch002: 0002-src-common-CMakeLists.txt.patch
Patch003: 0003-src-common-bitstr.h.patch
Patch004: 0004-src-librbd-api-PoolMetadata.h.patch
+Patch005: 0005-cmake-modules-CheckCxxAtomic.cmake.patch
# ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787
ExcludeArch: i686 armv7hl
#################################################################################
commit de4da99414a1bda4f2ec6ec65832a6277e5eae8c
Author: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Date: Tue Mar 3 09:38:35 2020 -0500
ceph 14.2.8 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
diff --git a/0005-mount.ceph-remove-arbitrary-limit-on-size-of-name-op.patch b/0005-mount.ceph-remove-arbitrary-limit-on-size-of-name-op.patch
deleted file mode 100644
index 3d951ea..0000000
--- a/0005-mount.ceph-remove-arbitrary-limit-on-size-of-name-op.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 8db2a44c9438749be98d41fb309f10d5084805df Mon Sep 17 00:00:00 2001
-From: Jeff Layton <jlayton(a)redhat.com>
-Date: Fri, 17 Jan 2020 07:48:12 -0500
-Subject: [PATCH] mount.ceph: remove arbitrary limit on size of name= option
-
-Aaron was getting back -ERANGE errors when trying to mount using
-a long name= option. The issue is that the destination buffer for the
-"key=" string is not big enough to hold long names.
-
-When I overhauled the mount.ceph code recently, I made this buffer much
-smaller than before figuring that it didn't need to be any larger than
-the length of "secret=<base64 encoded key>".
-
-In the case where the secret is set in the keyring though, this buffer
-needs to be able to hold a string like "key=client.<cephx name>". The
-cephx name can be of arbitrary length, however.
-
-Rework the code to just safe_cat the strings directly into the options
-buffer, eliminating an extra copy and the need for an arbitrary limit.
-This also allows us to remove get_secret_option() from the the common
-code as well.
-
-Fixes: https://tracker.ceph.com/issues/43649
-Reported-by: Aaron <aarongmldt(a)gmail.com>
-Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
----
- src/common/secret.h | 7 ------
- src/mount/mount.ceph.c | 45 ++++++++++++++++++++++++-------------
- src/mount/mount.ceph.h | 3 ---
- 4 files changed, 30 insertions(+), 75 deletions(-)
-
-diff --git a/src/common/secret.h b/src/common/secret.h
-index b681fa1ec7..5d2ad179dd 100644
---- a/src/common/secret.h
-+++ b/src/common/secret.h
-@@ -7,13 +7,6 @@ extern "C" {
-
- int read_secret_from_file(const char *filename, char *secret, size_t max_len);
-
--/*
-- * Attempts to add the secret to the kernel, but falls back to
-- * the old secret= option if the kernel is too old.
-- */
--int get_secret_option(const char *secret, const char *key_name,
-- char *secret_option, size_t secret_option_len);
--
- int set_kernel_secret(const char *secret, const char *key_name);
-
- int is_kernel_secret(const char *key_name);
-diff --git a/src/mount/mount.ceph.c b/src/mount/mount.ceph.c
-index e970648c59..133bc554f5 100644
---- a/src/mount/mount.ceph.c
-+++ b/src/mount/mount.ceph.c
-@@ -425,24 +425,39 @@ static void ceph_mount_info_free(struct ceph_mount_info *cmi)
- free(cmi->cmi_conf);
- }
-
--static int finalize_options(struct ceph_mount_info *cmi)
-+static int append_key_or_secret_option(struct ceph_mount_info *cmi)
- {
-- int pos;
-+ int pos = strlen(cmi->cmi_opts);
-
-- if (cmi->cmi_secret[0] || is_kernel_secret(cmi->cmi_name)) {
-- int ret;
-- char secret_option[SECRET_OPTION_BUFSIZE];
-+ if (!cmi->cmi_secret[0] && !is_kernel_secret(cmi->cmi_name))
-+ return 0;
-
-- ret = get_secret_option(cmi->cmi_secret, cmi->cmi_name,
-- secret_option, sizeof(secret_option));
-- if (ret < 0)
-+ if (pos)
-+ pos = safe_cat(&cmi->cmi_opts, &cmi->cmi_opts_len, pos, ",");
-+
-+ /* when parsing kernel options (-o remount) we get '<hidden>' as the secret */
-+ if (cmi->cmi_secret[0] && (strcmp(cmi->cmi_secret, "<hidden>") != 0)) {
-+ int ret = set_kernel_secret(cmi->cmi_secret, cmi->cmi_name);
-+ if (ret < 0) {
-+ if (ret == -ENODEV || ret == -ENOSYS) {
-+ /* old kernel; fall back to secret= in options */
-+ pos = safe_cat(&cmi->cmi_opts,
-+ &cmi->cmi_opts_len, pos,
-+ "secret=");
-+ pos = safe_cat(&cmi->cmi_opts,
-+ &cmi->cmi_opts_len, pos,
-+ cmi->cmi_secret);
-+ return 0;
-+ }
-+ fprintf(stderr, "adding ceph secret key to kernel failed: %s\n",
-+ strerror(-ret));
- return ret;
--
-- pos = strlen(cmi->cmi_opts);
-- if (pos)
-- pos = safe_cat(&cmi->cmi_opts, &cmi->cmi_opts_len, pos, ",");
-- pos = safe_cat(&cmi->cmi_opts, &cmi->cmi_opts_len, pos, secret_option);
-+ }
- }
-+
-+ pos = safe_cat(&cmi->cmi_opts, &cmi->cmi_opts_len, pos, "key=");
-+ pos = safe_cat(&cmi->cmi_opts, &cmi->cmi_opts_len, pos, cmi->cmi_name);
-+
- return 0;
- }
-
-@@ -493,9 +508,9 @@ int main(int argc, char *argv[])
- /* Ensure the ceph key_type is available */
- modprobe();
-
-- retval = finalize_options(&cmi);
-+ retval = append_key_or_secret_option(&cmi);
- if (retval) {
-- fprintf(stderr, "couldn't finalize options: %d\n", retval);
-+ fprintf(stderr, "couldn't append secret option: %d\n", retval);
- retval = EX_USAGE;
- goto out;
- }
-diff --git a/src/mount/mount.ceph.h b/src/mount/mount.ceph.h
-index c563597c43..b61176923d 100644
---- a/src/mount/mount.ceph.h
-+++ b/src/mount/mount.ceph.h
-@@ -21,9 +21,6 @@ extern "C" {
- /* Max Including null terminator */
- #define SECRET_BUFSIZE (MAX_SECRET_LEN + 1)
-
--/* Buffer size for secret= option */
--#define SECRET_OPTION_BUFSIZE (sizeof("secret=") + MAX_SECRET_LEN + 1)
--
- /* 2k should be enough for anyone? */
- #define MON_LIST_BUFSIZE 2048
-
---
-2.24.1
-
diff --git a/ceph.spec b/ceph.spec
index 8301f46..8002d20 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -108,8 +108,8 @@
# main package definition
#################################################################################
Name: ceph
-Version: 14.2.7
-Release: 2%{?dist}
+Version: 14.2.8
+Release: 1%{?dist}
%if 0%{?fedora} || 0%{?rhel}
Epoch: 2
%endif
@@ -128,7 +128,6 @@ Source0: %{?_remote_tarball_prefix}ceph-%{version}.tar.gz
Patch002: 0002-src-common-CMakeLists.txt.patch
Patch003: 0003-src-common-bitstr.h.patch
Patch004: 0004-src-librbd-api-PoolMetadata.h.patch
-Patch005: 0005-mount.ceph-remove-arbitrary-limit-on-size-of-name-op.patch
# ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787
ExcludeArch: i686 armv7hl
#################################################################################
@@ -158,12 +157,8 @@ BuildRequires: fuse-devel
%if 0%{?rhel} == 7
# devtoolset offers newer make and valgrind-devel, but the old ones are good
# enough.
-%ifarch x86_64
BuildRequires: devtoolset-8-gcc-c++ >= 8.2.1
%else
-BuildRequires: devtoolset-7-gcc-c++ >= 7.3.1-5.13
-%endif
-%else
BuildRequires: gcc-c++
%endif
BuildRequires: gdbm
@@ -296,6 +291,7 @@ BuildRequires: python%{_python_buildid}-PyJWT
BuildRequires: python%{_python_buildid}-Routes
BuildRequires: python%{_python_buildid}-Werkzeug
BuildRequires: python%{_python_buildid}-numpy-devel
+BuildRequires: rpmbuild
BuildRequires: xmlsec1-devel
%endif
%endif
@@ -1544,6 +1540,7 @@ fi
%files mgr
%{_bindir}/ceph-mgr
%dir %{_datadir}/ceph/mgr
+%{_datadir}/ceph/mgr/alerts
%{_datadir}/ceph/mgr/ansible
%{_datadir}/ceph/mgr/balancer
%{_datadir}/ceph/mgr/crash
@@ -2268,6 +2265,9 @@ exit 0
%endif
%changelog
+* Tue Mar 3 2020 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 2:14.2.8-1
+- ceph 14.2.8 GA
+
* Mon Feb 3 2020 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 2:14.2.7-2
- ceph 14.2.7 python3-remoto #1784216
diff --git a/sources b/sources
index d574db2..eb20e86 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (ceph-14.2.7.tar.gz) = 59f475e56053ba5e7e3a482a3a91b4d44272e6ec8051b92783de76c09c0d967a7ef76676db998968a709e48f08e90828dd8f86bd96a7c3fd111d48bfb7fd93b1
+SHA512 (ceph-14.2.8.tar.gz) = 38b0c6df58579377528c8f8e06d0cbc40f471f6eb2fb4a05b395f6fddbd3f2117674545b2147d8730973b01967ddcd4322a769ba03f9c625417ed35cc39f195a
4 years, 2 months
Architecture specific change in rpms/ceph.git
by githook-noreply@fedoraproject.org
The package rpms/ceph.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/ceph.git/commit/?id=de4da99414a1b....
Change:
-%ifarch x86_64
Thanks.
Full change:
============
commit afd1749306ce4741a380c2a0c17ea5d4739564e8
Merge: 8fba3c4 f30bd24
Author: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Date: Wed Mar 4 16:20:05 2020 -0500
Merge remote-tracking branch 'origin/f32' into f31
commit f30bd24a7b8db81f3a849b257293625dcd3dc9e4
Author: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Date: Wed Mar 4 10:31:51 2020 -0500
ceph 14.2.8 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
diff --git a/0005-cmake-modules-CheckCxxAtomic.cmake.patch b/0005-cmake-modules-CheckCxxAtomic.cmake.patch
new file mode 100644
index 0000000..71b7045
--- /dev/null
+++ b/0005-cmake-modules-CheckCxxAtomic.cmake.patch
@@ -0,0 +1,39 @@
+--- a/cmake/modules/CheckCxxAtomic.cmake 2020-03-02 12:49:20.000000000 -0500
++++ b/cmake/modules/CheckCxxAtomic.cmake 2020-01-29 12:53:56.952149798 -0500
+@@ -10,18 +10,29 @@
+ check_cxx_source_compiles("
+ #include <atomic>
+ #include <cstdint>
++
++#if __s390x__
++// Boost needs 16-byte atomics for tagged pointers.
++// These are implemented via inline instructions on the platform
++// if 16-byte alignment can be proven, and are delegated to libatomic
++// library routines otherwise. Whether or not alignment is provably
++// OK for a std::atomic unfortunately depends on compiler version and
++// optimization levels, and also on the details of the expression.
++// We specifically test access via an otherwise unknown pointer here
++// to ensure we get the most complex case. If this access can be
++// done without libatomic, then all accesses can be done.
++bool atomic16(std::atomic<unsigned __int128> *ptr)
++{
++ return *ptr != 0;
++}
++#endif
++
+ int main() {
+ std::atomic<uint8_t> w1;
+ std::atomic<uint16_t> w2;
+ std::atomic<uint32_t> w4;
+ std::atomic<uint64_t> w8;
+-#ifdef __s390x__
+- // Boost needs 16-byte atomics for tagged pointers.
+- std::atomic<unsigned __int128> w16;
+-#else
+- #define w16 0
+-#endif
+- return w1 + w2 + w4 + w8 + w16;
++ return w1 + w2 + w4 + w8;
+ }
+ " ${var})
+ endfunction(check_cxx_atomics)
diff --git a/ceph.spec b/ceph.spec
index 8002d20..8087bd5 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -128,6 +128,7 @@ Source0: %{?_remote_tarball_prefix}ceph-%{version}.tar.gz
Patch002: 0002-src-common-CMakeLists.txt.patch
Patch003: 0003-src-common-bitstr.h.patch
Patch004: 0004-src-librbd-api-PoolMetadata.h.patch
+Patch005: 0005-cmake-modules-CheckCxxAtomic.cmake.patch
# ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787
ExcludeArch: i686 armv7hl
#################################################################################
commit de4da99414a1bda4f2ec6ec65832a6277e5eae8c
Author: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
Date: Tue Mar 3 09:38:35 2020 -0500
ceph 14.2.8 GA
Signed-off-by: Kaleb S. KEITHLEY <kkeithle(a)redhat.com>
diff --git a/0005-mount.ceph-remove-arbitrary-limit-on-size-of-name-op.patch b/0005-mount.ceph-remove-arbitrary-limit-on-size-of-name-op.patch
deleted file mode 100644
index 3d951ea..0000000
--- a/0005-mount.ceph-remove-arbitrary-limit-on-size-of-name-op.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 8db2a44c9438749be98d41fb309f10d5084805df Mon Sep 17 00:00:00 2001
-From: Jeff Layton <jlayton(a)redhat.com>
-Date: Fri, 17 Jan 2020 07:48:12 -0500
-Subject: [PATCH] mount.ceph: remove arbitrary limit on size of name= option
-
-Aaron was getting back -ERANGE errors when trying to mount using
-a long name= option. The issue is that the destination buffer for the
-"key=" string is not big enough to hold long names.
-
-When I overhauled the mount.ceph code recently, I made this buffer much
-smaller than before figuring that it didn't need to be any larger than
-the length of "secret=<base64 encoded key>".
-
-In the case where the secret is set in the keyring though, this buffer
-needs to be able to hold a string like "key=client.<cephx name>". The
-cephx name can be of arbitrary length, however.
-
-Rework the code to just safe_cat the strings directly into the options
-buffer, eliminating an extra copy and the need for an arbitrary limit.
-This also allows us to remove get_secret_option() from the the common
-code as well.
-
-Fixes: https://tracker.ceph.com/issues/43649
-Reported-by: Aaron <aarongmldt(a)gmail.com>
-Signed-off-by: Jeff Layton <jlayton(a)redhat.com>
----
- src/common/secret.h | 7 ------
- src/mount/mount.ceph.c | 45 ++++++++++++++++++++++++-------------
- src/mount/mount.ceph.h | 3 ---
- 4 files changed, 30 insertions(+), 75 deletions(-)
-
-diff --git a/src/common/secret.h b/src/common/secret.h
-index b681fa1ec7..5d2ad179dd 100644
---- a/src/common/secret.h
-+++ b/src/common/secret.h
-@@ -7,13 +7,6 @@ extern "C" {
-
- int read_secret_from_file(const char *filename, char *secret, size_t max_len);
-
--/*
-- * Attempts to add the secret to the kernel, but falls back to
-- * the old secret= option if the kernel is too old.
-- */
--int get_secret_option(const char *secret, const char *key_name,
-- char *secret_option, size_t secret_option_len);
--
- int set_kernel_secret(const char *secret, const char *key_name);
-
- int is_kernel_secret(const char *key_name);
-diff --git a/src/mount/mount.ceph.c b/src/mount/mount.ceph.c
-index e970648c59..133bc554f5 100644
---- a/src/mount/mount.ceph.c
-+++ b/src/mount/mount.ceph.c
-@@ -425,24 +425,39 @@ static void ceph_mount_info_free(struct ceph_mount_info *cmi)
- free(cmi->cmi_conf);
- }
-
--static int finalize_options(struct ceph_mount_info *cmi)
-+static int append_key_or_secret_option(struct ceph_mount_info *cmi)
- {
-- int pos;
-+ int pos = strlen(cmi->cmi_opts);
-
-- if (cmi->cmi_secret[0] || is_kernel_secret(cmi->cmi_name)) {
-- int ret;
-- char secret_option[SECRET_OPTION_BUFSIZE];
-+ if (!cmi->cmi_secret[0] && !is_kernel_secret(cmi->cmi_name))
-+ return 0;
-
-- ret = get_secret_option(cmi->cmi_secret, cmi->cmi_name,
-- secret_option, sizeof(secret_option));
-- if (ret < 0)
-+ if (pos)
-+ pos = safe_cat(&cmi->cmi_opts, &cmi->cmi_opts_len, pos, ",");
-+
-+ /* when parsing kernel options (-o remount) we get '<hidden>' as the secret */
-+ if (cmi->cmi_secret[0] && (strcmp(cmi->cmi_secret, "<hidden>") != 0)) {
-+ int ret = set_kernel_secret(cmi->cmi_secret, cmi->cmi_name);
-+ if (ret < 0) {
-+ if (ret == -ENODEV || ret == -ENOSYS) {
-+ /* old kernel; fall back to secret= in options */
-+ pos = safe_cat(&cmi->cmi_opts,
-+ &cmi->cmi_opts_len, pos,
-+ "secret=");
-+ pos = safe_cat(&cmi->cmi_opts,
-+ &cmi->cmi_opts_len, pos,
-+ cmi->cmi_secret);
-+ return 0;
-+ }
-+ fprintf(stderr, "adding ceph secret key to kernel failed: %s\n",
-+ strerror(-ret));
- return ret;
--
-- pos = strlen(cmi->cmi_opts);
-- if (pos)
-- pos = safe_cat(&cmi->cmi_opts, &cmi->cmi_opts_len, pos, ",");
-- pos = safe_cat(&cmi->cmi_opts, &cmi->cmi_opts_len, pos, secret_option);
-+ }
- }
-+
-+ pos = safe_cat(&cmi->cmi_opts, &cmi->cmi_opts_len, pos, "key=");
-+ pos = safe_cat(&cmi->cmi_opts, &cmi->cmi_opts_len, pos, cmi->cmi_name);
-+
- return 0;
- }
-
-@@ -493,9 +508,9 @@ int main(int argc, char *argv[])
- /* Ensure the ceph key_type is available */
- modprobe();
-
-- retval = finalize_options(&cmi);
-+ retval = append_key_or_secret_option(&cmi);
- if (retval) {
-- fprintf(stderr, "couldn't finalize options: %d\n", retval);
-+ fprintf(stderr, "couldn't append secret option: %d\n", retval);
- retval = EX_USAGE;
- goto out;
- }
-diff --git a/src/mount/mount.ceph.h b/src/mount/mount.ceph.h
-index c563597c43..b61176923d 100644
---- a/src/mount/mount.ceph.h
-+++ b/src/mount/mount.ceph.h
-@@ -21,9 +21,6 @@ extern "C" {
- /* Max Including null terminator */
- #define SECRET_BUFSIZE (MAX_SECRET_LEN + 1)
-
--/* Buffer size for secret= option */
--#define SECRET_OPTION_BUFSIZE (sizeof("secret=") + MAX_SECRET_LEN + 1)
--
- /* 2k should be enough for anyone? */
- #define MON_LIST_BUFSIZE 2048
-
---
-2.24.1
-
diff --git a/ceph.spec b/ceph.spec
index 8301f46..8002d20 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -108,8 +108,8 @@
# main package definition
#################################################################################
Name: ceph
-Version: 14.2.7
-Release: 2%{?dist}
+Version: 14.2.8
+Release: 1%{?dist}
%if 0%{?fedora} || 0%{?rhel}
Epoch: 2
%endif
@@ -128,7 +128,6 @@ Source0: %{?_remote_tarball_prefix}ceph-%{version}.tar.gz
Patch002: 0002-src-common-CMakeLists.txt.patch
Patch003: 0003-src-common-bitstr.h.patch
Patch004: 0004-src-librbd-api-PoolMetadata.h.patch
-Patch005: 0005-mount.ceph-remove-arbitrary-limit-on-size-of-name-op.patch
# ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787
ExcludeArch: i686 armv7hl
#################################################################################
@@ -158,12 +157,8 @@ BuildRequires: fuse-devel
%if 0%{?rhel} == 7
# devtoolset offers newer make and valgrind-devel, but the old ones are good
# enough.
-%ifarch x86_64
BuildRequires: devtoolset-8-gcc-c++ >= 8.2.1
%else
-BuildRequires: devtoolset-7-gcc-c++ >= 7.3.1-5.13
-%endif
-%else
BuildRequires: gcc-c++
%endif
BuildRequires: gdbm
@@ -296,6 +291,7 @@ BuildRequires: python%{_python_buildid}-PyJWT
BuildRequires: python%{_python_buildid}-Routes
BuildRequires: python%{_python_buildid}-Werkzeug
BuildRequires: python%{_python_buildid}-numpy-devel
+BuildRequires: rpmbuild
BuildRequires: xmlsec1-devel
%endif
%endif
@@ -1544,6 +1540,7 @@ fi
%files mgr
%{_bindir}/ceph-mgr
%dir %{_datadir}/ceph/mgr
+%{_datadir}/ceph/mgr/alerts
%{_datadir}/ceph/mgr/ansible
%{_datadir}/ceph/mgr/balancer
%{_datadir}/ceph/mgr/crash
@@ -2268,6 +2265,9 @@ exit 0
%endif
%changelog
+* Tue Mar 3 2020 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 2:14.2.8-1
+- ceph 14.2.8 GA
+
* Mon Feb 3 2020 Kaleb S. KEITHLEY <kkeithle[at]redhat.com> - 2:14.2.7-2
- ceph 14.2.7 python3-remoto #1784216
diff --git a/sources b/sources
index d574db2..eb20e86 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (ceph-14.2.7.tar.gz) = 59f475e56053ba5e7e3a482a3a91b4d44272e6ec8051b92783de76c09c0d967a7ef76676db998968a709e48f08e90828dd8f86bd96a7c3fd111d48bfb7fd93b1
+SHA512 (ceph-14.2.8.tar.gz) = 38b0c6df58579377528c8f8e06d0cbc40f471f6eb2fb4a05b395f6fddbd3f2117674545b2147d8730973b01967ddcd4322a769ba03f9c625417ed35cc39f195a
4 years, 2 months
Architecture specific change in rpms/imagefactory.git
by githook-noreply@fedoraproject.org
The package rpms/imagefactory.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/imagefactory.git/commit/?id=bad36....
Change:
-ExcludeArch: i386 ppc64
Thanks.
Full change:
============
commit bad367d8d622885c8ba287021ab368697304fd80
Author: Peter Robinson <pbrobinson(a)gmail.com>
Date: Wed Mar 4 20:37:21 2020 +0000
add patch
Signed-off-by: Peter Robinson <pbrobinson(a)gmail.com>
diff --git a/container-github-pr434.patch b/container-github-pr434.patch
new file mode 100644
index 0000000..a32fb2b
--- /dev/null
+++ b/container-github-pr434.patch
@@ -0,0 +1,54 @@
+From 12156b34856828e63f0278b38c807842d489aa78 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jakub=20=C4=8Cajka?= <jcajka(a)redhat.com>
+Date: Tue, 25 Feb 2020 14:26:01 +0100
+Subject: [PATCH] plugin docker: Fix arch string used for container metadata to
+ be compliant with the standard Fixes: RHBZ#1793927
+
+---
+ imagefactory_plugins/Docker/Docker.py | 18 +++++++++++-------
+ 1 file changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/imagefactory_plugins/Docker/Docker.py b/imagefactory_plugins/Docker/Docker.py
+@@ -46,6 +46,15 @@
+ "gzip": "gzip -c %s > %s",
+ "bzip2": "bzip2 -c %s > %s" }
+
++ # In image metadata, Go arch is used to identify the architecture
++ # https://docs.docker.com/registry/spec/manifest-v2-2/
++ goarchs = { "x86_64": "amd64",
++ "aarch64": "arm64",
++ "armv7hl": "armhfp",
++ "riscv64": "riscv64",
++ "ppc64le": "ppc64le",
++ "s390x": "s390x"}
++
+ # The templates below allow us to generate base images without a running docker locally
+
+ # imcleod(a)redhat.com - 26-Aug-2014
+@@ -391,7 +400,7 @@
+ if set_arch_label:
+ if label == 'null':
+ label = dict()
+- label["architecture"] = tldobj.arch
++ label["architecture"] = goarchs[tdlobj.arch]
+
+ rdict = { repository: { tag: docker_image_id } }
+
+@@ -400,16 +409,11 @@
+ raise Exception("No docker JSON template available for specified docker version (%s)" % (dockerversion))
+ docker_json_template=self.docker_templates_dict[dockerversion]
+
+- arch = tdlobj.arch
+- if arch == "x86_64":
+- arch = "amd64"
+- elif arch == "armv7hl":
+- arch = "armhfp"
+ tdict = { }
+ tdict['commentstring'] = parameters.get('comment', 'Created by Image Factory')
+ tdict['os'] = parameters.get('os', 'linux')
+ tdict['createdtime'] = datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
+- tdict['arch'] = arch
++ tdict['arch'] = goarchs[tdlobj.arch]
+ tdict['idstring'] = docker_image_id
+ tdict['cmd'] = cmd
+ tdict['env'] = env
diff --git a/imagefactory.spec b/imagefactory.spec
index fc78af4..f578f6f 100644
--- a/imagefactory.spec
+++ b/imagefactory.spec
@@ -1,23 +1,20 @@
-%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
-%global use_systemd 1
-%else
-%global use_systemd 0
-# This is, of course, not set in older RPMs and is needed below
-%global _unitdir /usr/lib/systemd/system
-%endif
-
-Summary: System image generation tool
Name: imagefactory
Version: 1.1.14
-Release: 2%{?dist}
-Source0: https://github.com/redhat-imaging/imagefactory/archive/imagefactory-%{ver...
+Release: 3%{?dist}
+Summary: System image generation tool
License: ASL 2.0
-Group: Applications/System
URL: https://github.com/redhat-imaging/imagefactory
+
+Source0: https://github.com/redhat-imaging/imagefactory/archive/imagefactory-%{ver...
+Patch0: container-github-pr434.patch
BuildArch: noarch
-%if 0%{?rhel} == 6
-ExcludeArch: i386 ppc64
-%endif
+
+BuildRequires: python3
+BuildRequires: python3-setuptools
+BuildRequires: python3-rpm-macros
+BuildRequires: python-rpm-macros
+BuildRequires: systemd-units
+
Requires: python3-pycurl
Requires: python3-libguestfs
Requires: python3-zope-interface
@@ -28,23 +25,10 @@ Requires: python3-oauth2
Requires: python3-libs
Requires: oz
-%if %{use_systemd}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
-BuildRequires: systemd-units
-%else
-Requires(post): chkconfig
-Requires(preun): chkconfig
-# This is for /sbin/service
-Requires(preun): initscripts
-%endif
-
-BuildRequires: python3
-BuildRequires: python3-setuptools
-BuildRequires: python3-rpm-macros
-BuildRequires: python-rpm-macros
# TODO: Any changes to the _internal_ API must increment this version or, in
# the case of backwards compatible changes, add a new version (RPM
# allows multiple version "=" lines for the same package or
@@ -57,7 +41,7 @@ and cloud providers from a single template definition. See
https://github.com/redhat-imaging/imagefactory for more information.
%prep
-%setup -q -n imagefactory-imagefactory-%{version}-1
+%autosetup -p1 -n imagefactory-imagefactory-%{version}-1
%build
%py3_build
@@ -67,25 +51,17 @@ https://github.com/redhat-imaging/imagefactory for more information.
%py3_install
-%{__install} -d %{buildroot}/%{_sysconfdir}/imagefactory/jeos_images
-%{__install} -d %{buildroot}/%{_localstatedir}/lib/imagefactory/images
-%{__install} -d %{buildroot}/%{_sysconfdir}/imagefactory/plugins.d
-%{__install} -d %{buildroot}/%{_sysconfdir}/logrotate.d
+install -d %{buildroot}/%{_sysconfdir}/imagefactory/jeos_images
+install -d %{buildroot}/%{_localstatedir}/lib/imagefactory/images
+install -d %{buildroot}/%{_sysconfdir}/imagefactory/plugins.d
+install -d %{buildroot}/%{_sysconfdir}/logrotate.d
#sed -i '/\/usr\/bin\/env python/d' %{buildroot}/%{python_sitelib}/imgfac/*.py
-%{__install} -m0600 conf/sysconfig/imagefactoryd %{buildroot}/%{_sysconfdir}/sysconfig/imagefactoryd
-%{__install} -m0600 conf/logrotate.d/imagefactoryd %{buildroot}/%{_sysconfdir}/logrotate.d/imagefactoryd
+install -m0600 conf/sysconfig/imagefactoryd %{buildroot}/%{_sysconfdir}/sysconfig/imagefactoryd
+install -m0600 conf/logrotate.d/imagefactoryd %{buildroot}/%{_sysconfdir}/logrotate.d/imagefactoryd
-# setup.py installs both of these which I suppose is OK
-# delete the one we don't want here
-%if %{use_systemd}
rm -f %{buildroot}/%{_initddir}/imagefactoryd
-%else
-rm -f %{buildroot}/%{_unitdir}/imagefactoryd.service
-%endif
-
-%if %{use_systemd}
%post
%systemd_post imagefactoryd.service
@@ -96,26 +72,10 @@ rm -f %{buildroot}/%{_unitdir}/imagefactoryd.service
%postun
%systemd_postun imagefactoryd.service
-%else
-
-%post
-/sbin/chkconfig --add imagefactoryd
-
-%preun
-if [ $1 = 0 ] ; then
- /sbin/service imagefactoryd stop >/dev/null 2>&1
- /sbin/chkconfig --del imagefactoryd
-fi
-
-%endif
%files
-%doc COPYING
-%if %{use_systemd}
+%license COPYING
%{_unitdir}/imagefactoryd.service
-%else
-%{_initddir}/imagefactoryd
-%endif
%config(noreplace) %{_sysconfdir}/imagefactory/imagefactory.conf
%config(noreplace) %{_sysconfdir}/sysconfig/imagefactoryd
%config(noreplace) %{_sysconfdir}/logrotate.d/imagefactoryd
@@ -132,6 +92,11 @@ fi
%{_bindir}/imagefactoryd
%changelog
+* Wed Mar 04 2020 Peter Robinson <pbrobinson(a)fedoraproject.org> - 1.1.14-3
+- Upstream patch for container fixes
+- Drop non systemd support as it requires python3 of which older distros won't have
+- Spec cleanup
+
* Wed Jan 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.1.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4 years, 2 months
Architecture specific change in rpms/imagefactory-plugins.git
by githook-noreply@fedoraproject.org
The package rpms/imagefactory-plugins.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/imagefactory-plugins.git/commit/?....
Change:
-ExcludeArch: i386 ppc64
Thanks.
Full change:
============
commit daa8ef506e972e3f0e02fa182a5165ef8ff30f6c
Author: Peter Robinson <pbrobinson(a)gmail.com>
Date: Wed Mar 4 20:49:32 2020 +0000
fix for RHBZ#1793927
diff --git a/container-github-pr434.patch b/container-github-pr434.patch
new file mode 100644
index 0000000..23ad385
--- /dev/null
+++ b/container-github-pr434.patch
@@ -0,0 +1,57 @@
+From 12156b34856828e63f0278b38c807842d489aa78 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jakub=20=C4=8Cajka?= <jcajka(a)redhat.com>
+Date: Tue, 25 Feb 2020 14:26:01 +0100
+Subject: [PATCH] plugin docker: Fix arch string used for container metadata to
+ be compliant with the standard Fixes: RHBZ#1793927
+
+---
+ Docker/Docker.py | 18 +++++++++++-------
+ 1 file changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/Docker/Docker.py b/Docker/Docker.py
+index 16d928d..d31c527 100644
+--- a/Docker/Docker.py
++++ b/Docker/Docker.py
+@@ -40,6 +40,15 @@ class Docker(object):
+ "gzip": "gzip -c %s > %s",
+ "bzip2": "bzip2 -c %s > %s" }
+
++ # In image metadata, Go arch is used to identify the architecture
++ # https://docs.docker.com/registry/spec/manifest-v2-2/
++ goarchs = { "x86_64": "amd64",
++ "aarch64": "arm64",
++ "armv7hl": "armhfp",
++ "riscv64": "riscv64",
++ "ppc64le": "ppc64le",
++ "s390x": "s390x"}
++
+ # The templates below allow us to generate base images without a running docker locally
+
+ # imcleod(a)redhat.com - 26-Aug-2014
+@@ -385,7 +394,7 @@ def _run_guestmount(g):
+ if set_arch_label:
+ if label == 'null':
+ label = dict()
+- label["architecture"] = tdlobj.arch
++ label["architecture"] = goarchs[tdlobj.arch]
+
+ rdict = { repository: { tag: docker_image_id } }
+
+@@ -394,16 +403,11 @@ def _run_guestmount(g):
+ raise Exception("No docker JSON template available for specified docker version (%s)" % (dockerversion))
+ docker_json_template=self.docker_templates_dict[dockerversion]
+
+- arch = tdlobj.arch
+- if arch == "x86_64":
+- arch = "amd64"
+- elif arch == "armv7hl":
+- arch = "armhfp"
+ tdict = { }
+ tdict['commentstring'] = parameters.get('comment', 'Created by Image Factory')
+ tdict['os'] = parameters.get('os', 'linux')
+ tdict['createdtime'] = datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
+- tdict['arch'] = arch
++ tdict['arch'] = goarchs[tdlobj.arch]
+ tdict['idstring'] = docker_image_id
+ tdict['cmd'] = cmd
+ tdict['env'] = env
diff --git a/imagefactory-plugins.spec b/imagefactory-plugins.spec
index 7d31833..b1094a0 100644
--- a/imagefactory-plugins.spec
+++ b/imagefactory-plugins.spec
@@ -32,19 +32,18 @@ fi \
exit 0
-Summary: Default plugins for the Image Factory system image generation tool
Name: imagefactory-plugins
Version: 1.1.15
-Release: 3%{?dist}
-Source0: https://github.com/redhat-imaging/imagefactory/archive/imagefactory-%{ver...
-Patch0: imagefactory-1.1.14-utf8-config-id.patch
+Release: 4%{?dist}
+Summary: Default plugins for the Image Factory system image generation tool
License: ASL 2.0
-Group: Applications/System
URL: https://github.com/redhat-imaging/imagefactory
+
+Source0: https://github.com/redhat-imaging/imagefactory/archive/imagefactory-%{ver...
+Patch0: imagefactory-1.1.14-utf8-config-id.patch
+Patch1: container-github-pr434.patch
+
BuildArch: noarch
-%if 0%{?rhel} == 6
-ExcludeArch: i386 ppc64
-%endif
BuildRequires: python3
BuildRequires: python3-setuptools
BuildRequires: python3-rpm-macros
@@ -65,7 +64,6 @@ https://github.com/redhat-imaging/imagefactory for more information.
%package ovfcommon
Summary: common utilities to manipulate ovf-related objects
-License: ASL 2.0
Requires: oz >= 0.7.0
Requires: imagefactory-plugins
@@ -75,7 +73,6 @@ plugins.
%package OVA
Summary: Cloud plugin for generating OVA archives
-License: ASL 2.0
Requires: oz >= 0.7.0
Requires: imagefactory-plugins
Requires: imagefactory-plugins-ovfcommon
@@ -87,7 +84,6 @@ archive from.
%package IndirectionCloud
Summary: Cloud plugin for allowing images to modify other images
-License: ASL 2.0
Requires: oz >= 0.12.0
Requires: imagefactory-plugins
Requires: imagefactory-plugin-api = 1.0
@@ -101,7 +97,6 @@ arbitrary host OS and package selection for the actual media creation tools.
%package TinMan
Summary: OS plugin for Fedora
-License: ASL 2.0
Requires: oz >= 0.12.0
Requires: imagefactory-plugins
Requires: imagefactory-plugin-api = 1.0
@@ -112,7 +107,6 @@ An OS plugin to support Fedora OSes
%if 0%{include_openstack}
%package OpenStack
Summary: Cloud plugin for OpenStack running on KVM
-License: ASL 2.0
Requires: python3-glanceclient
Requires: imagefactory-plugins
Requires: imagefactory-plugin-api = 1.0
@@ -122,7 +116,6 @@ A Cloud plugin to support OpenStack running on top of KVM.
%package Rackspace
Summary: Cloud plugin for Rackspace
-License: ASL 2.0
Requires: python-novaclient
Requires: python-pyrax
Requires: imagefactory-plugins
@@ -143,7 +136,6 @@ can be used to do "snapshot" style builds.
%if 0%{include_nova_image_builder}
%package Nova
Summary: OS plugin that allows imagefactory to use Nova instances to build base images.
-License: ASL 2.0
Requires: python3-novaclient
Requires: oz >= 0.12.0
Requires: imagefactory-plugins
@@ -156,7 +148,6 @@ An alternative to the TinMan plugin for creating base images using an OpenStack
%if 0%{?build_mock}
%package MockOS
Summary: Mock OS plugin
-License: ASL 2.0
Requires: imagefactory-plugins
Requires: imagefactory-plugin-api = 1.0
@@ -168,7 +159,6 @@ For testing use only.
%package MockCloud
Summary: Mock Cloud plugin
-License: ASL 2.0
Requires: imagefactory-plugins
Requires: imagefactory-plugin-api = 1.0
@@ -182,7 +172,6 @@ For testing use only.
%package RHEVM
Summary: RHEVM Cloud plugin
-License: ASL 2.0
Requires: imagefactory-plugins
Requires: imagefactory-plugins-ovfcommon
#Make optional for now to allow core coversion features to work
@@ -195,7 +184,6 @@ A plugin for RHEVM "clouds"
%package vSphere
Summary: vSphere Cloud plugin
-License: ASL 2.0
Requires: imagefactory-plugins
#This has been made conditional in the plugin - will need to be replaced
#Requires: python-psphere
@@ -208,7 +196,6 @@ A plugin for vSphere "clouds"
%package Docker
Summary: Cloud plugin for Docker
-License: ASL 2.0
Requires: tar
%description Docker
@@ -216,7 +203,6 @@ A Cloud plugin to support Docker
%package HyperV
Summary: Cloud plugin for HyperV
-License: ASL 2.0
Requires: qemu-img
%description HyperV
@@ -224,7 +210,6 @@ A Cloud plugin to support HyperV
%package GCE
Summary: Cloud plugin for GCE
-License: ASL 2.0
Requires: qemu-img
Requires: tar
@@ -238,6 +223,7 @@ rm -rf *
mv ../imagefactory_plugins/* .
rmdir ../imagefactory_plugins/
%patch0 -p1
+%patch1 -p1
%build
%py3_build
@@ -342,7 +328,7 @@ rm -rf %{buildroot}%{python3_sitelib}/imagefactory_plugins/EC2
%auto_register_macro_postun GCE
%files
-%doc COPYING
+%license COPYING
%dir %{python3_sitelib}/imagefactory_plugins
%{python3_sitelib}/imagefactory_plugins/__init__.py*
%{python3_sitelib}/imagefactory_plugins/__pycache__/*.py*
@@ -415,6 +401,9 @@ rm -rf %{buildroot}%{python3_sitelib}/imagefactory_plugins/EC2
%{python3_sitelib}/imagefactory_plugins/GCE/*
%changelog
+* Wed Mar 04 2020 Peter Robinson <pbrobinson(a)fedoraproject.org> - 1.1.15-4
+- fix for RHBZ#1793927
+
* Fri Feb 07 2020 Kevin Fenzi <kevin(a)scrye.com> - 1.1.15-3
- Drop EC2 plugin as it uses euca2ools which is python2 and no longer in Fedora. Fixes bug #1762327
4 years, 2 months
Architecture specific change in rpms/imagefactory-plugins.git
by githook-noreply@fedoraproject.org
The package rpms/imagefactory-plugins.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/imagefactory-plugins.git/commit/?....
Change:
-ExcludeArch: i386 ppc64
Thanks.
Full change:
============
commit daa8ef506e972e3f0e02fa182a5165ef8ff30f6c
Author: Peter Robinson <pbrobinson(a)gmail.com>
Date: Wed Mar 4 20:49:32 2020 +0000
fix for RHBZ#1793927
diff --git a/container-github-pr434.patch b/container-github-pr434.patch
new file mode 100644
index 0000000..23ad385
--- /dev/null
+++ b/container-github-pr434.patch
@@ -0,0 +1,57 @@
+From 12156b34856828e63f0278b38c807842d489aa78 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jakub=20=C4=8Cajka?= <jcajka(a)redhat.com>
+Date: Tue, 25 Feb 2020 14:26:01 +0100
+Subject: [PATCH] plugin docker: Fix arch string used for container metadata to
+ be compliant with the standard Fixes: RHBZ#1793927
+
+---
+ Docker/Docker.py | 18 +++++++++++-------
+ 1 file changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/Docker/Docker.py b/Docker/Docker.py
+index 16d928d..d31c527 100644
+--- a/Docker/Docker.py
++++ b/Docker/Docker.py
+@@ -40,6 +40,15 @@ class Docker(object):
+ "gzip": "gzip -c %s > %s",
+ "bzip2": "bzip2 -c %s > %s" }
+
++ # In image metadata, Go arch is used to identify the architecture
++ # https://docs.docker.com/registry/spec/manifest-v2-2/
++ goarchs = { "x86_64": "amd64",
++ "aarch64": "arm64",
++ "armv7hl": "armhfp",
++ "riscv64": "riscv64",
++ "ppc64le": "ppc64le",
++ "s390x": "s390x"}
++
+ # The templates below allow us to generate base images without a running docker locally
+
+ # imcleod(a)redhat.com - 26-Aug-2014
+@@ -385,7 +394,7 @@ def _run_guestmount(g):
+ if set_arch_label:
+ if label == 'null':
+ label = dict()
+- label["architecture"] = tdlobj.arch
++ label["architecture"] = goarchs[tdlobj.arch]
+
+ rdict = { repository: { tag: docker_image_id } }
+
+@@ -394,16 +403,11 @@ def _run_guestmount(g):
+ raise Exception("No docker JSON template available for specified docker version (%s)" % (dockerversion))
+ docker_json_template=self.docker_templates_dict[dockerversion]
+
+- arch = tdlobj.arch
+- if arch == "x86_64":
+- arch = "amd64"
+- elif arch == "armv7hl":
+- arch = "armhfp"
+ tdict = { }
+ tdict['commentstring'] = parameters.get('comment', 'Created by Image Factory')
+ tdict['os'] = parameters.get('os', 'linux')
+ tdict['createdtime'] = datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
+- tdict['arch'] = arch
++ tdict['arch'] = goarchs[tdlobj.arch]
+ tdict['idstring'] = docker_image_id
+ tdict['cmd'] = cmd
+ tdict['env'] = env
diff --git a/imagefactory-plugins.spec b/imagefactory-plugins.spec
index 7d31833..b1094a0 100644
--- a/imagefactory-plugins.spec
+++ b/imagefactory-plugins.spec
@@ -32,19 +32,18 @@ fi \
exit 0
-Summary: Default plugins for the Image Factory system image generation tool
Name: imagefactory-plugins
Version: 1.1.15
-Release: 3%{?dist}
-Source0: https://github.com/redhat-imaging/imagefactory/archive/imagefactory-%{ver...
-Patch0: imagefactory-1.1.14-utf8-config-id.patch
+Release: 4%{?dist}
+Summary: Default plugins for the Image Factory system image generation tool
License: ASL 2.0
-Group: Applications/System
URL: https://github.com/redhat-imaging/imagefactory
+
+Source0: https://github.com/redhat-imaging/imagefactory/archive/imagefactory-%{ver...
+Patch0: imagefactory-1.1.14-utf8-config-id.patch
+Patch1: container-github-pr434.patch
+
BuildArch: noarch
-%if 0%{?rhel} == 6
-ExcludeArch: i386 ppc64
-%endif
BuildRequires: python3
BuildRequires: python3-setuptools
BuildRequires: python3-rpm-macros
@@ -65,7 +64,6 @@ https://github.com/redhat-imaging/imagefactory for more information.
%package ovfcommon
Summary: common utilities to manipulate ovf-related objects
-License: ASL 2.0
Requires: oz >= 0.7.0
Requires: imagefactory-plugins
@@ -75,7 +73,6 @@ plugins.
%package OVA
Summary: Cloud plugin for generating OVA archives
-License: ASL 2.0
Requires: oz >= 0.7.0
Requires: imagefactory-plugins
Requires: imagefactory-plugins-ovfcommon
@@ -87,7 +84,6 @@ archive from.
%package IndirectionCloud
Summary: Cloud plugin for allowing images to modify other images
-License: ASL 2.0
Requires: oz >= 0.12.0
Requires: imagefactory-plugins
Requires: imagefactory-plugin-api = 1.0
@@ -101,7 +97,6 @@ arbitrary host OS and package selection for the actual media creation tools.
%package TinMan
Summary: OS plugin for Fedora
-License: ASL 2.0
Requires: oz >= 0.12.0
Requires: imagefactory-plugins
Requires: imagefactory-plugin-api = 1.0
@@ -112,7 +107,6 @@ An OS plugin to support Fedora OSes
%if 0%{include_openstack}
%package OpenStack
Summary: Cloud plugin for OpenStack running on KVM
-License: ASL 2.0
Requires: python3-glanceclient
Requires: imagefactory-plugins
Requires: imagefactory-plugin-api = 1.0
@@ -122,7 +116,6 @@ A Cloud plugin to support OpenStack running on top of KVM.
%package Rackspace
Summary: Cloud plugin for Rackspace
-License: ASL 2.0
Requires: python-novaclient
Requires: python-pyrax
Requires: imagefactory-plugins
@@ -143,7 +136,6 @@ can be used to do "snapshot" style builds.
%if 0%{include_nova_image_builder}
%package Nova
Summary: OS plugin that allows imagefactory to use Nova instances to build base images.
-License: ASL 2.0
Requires: python3-novaclient
Requires: oz >= 0.12.0
Requires: imagefactory-plugins
@@ -156,7 +148,6 @@ An alternative to the TinMan plugin for creating base images using an OpenStack
%if 0%{?build_mock}
%package MockOS
Summary: Mock OS plugin
-License: ASL 2.0
Requires: imagefactory-plugins
Requires: imagefactory-plugin-api = 1.0
@@ -168,7 +159,6 @@ For testing use only.
%package MockCloud
Summary: Mock Cloud plugin
-License: ASL 2.0
Requires: imagefactory-plugins
Requires: imagefactory-plugin-api = 1.0
@@ -182,7 +172,6 @@ For testing use only.
%package RHEVM
Summary: RHEVM Cloud plugin
-License: ASL 2.0
Requires: imagefactory-plugins
Requires: imagefactory-plugins-ovfcommon
#Make optional for now to allow core coversion features to work
@@ -195,7 +184,6 @@ A plugin for RHEVM "clouds"
%package vSphere
Summary: vSphere Cloud plugin
-License: ASL 2.0
Requires: imagefactory-plugins
#This has been made conditional in the plugin - will need to be replaced
#Requires: python-psphere
@@ -208,7 +196,6 @@ A plugin for vSphere "clouds"
%package Docker
Summary: Cloud plugin for Docker
-License: ASL 2.0
Requires: tar
%description Docker
@@ -216,7 +203,6 @@ A Cloud plugin to support Docker
%package HyperV
Summary: Cloud plugin for HyperV
-License: ASL 2.0
Requires: qemu-img
%description HyperV
@@ -224,7 +210,6 @@ A Cloud plugin to support HyperV
%package GCE
Summary: Cloud plugin for GCE
-License: ASL 2.0
Requires: qemu-img
Requires: tar
@@ -238,6 +223,7 @@ rm -rf *
mv ../imagefactory_plugins/* .
rmdir ../imagefactory_plugins/
%patch0 -p1
+%patch1 -p1
%build
%py3_build
@@ -342,7 +328,7 @@ rm -rf %{buildroot}%{python3_sitelib}/imagefactory_plugins/EC2
%auto_register_macro_postun GCE
%files
-%doc COPYING
+%license COPYING
%dir %{python3_sitelib}/imagefactory_plugins
%{python3_sitelib}/imagefactory_plugins/__init__.py*
%{python3_sitelib}/imagefactory_plugins/__pycache__/*.py*
@@ -415,6 +401,9 @@ rm -rf %{buildroot}%{python3_sitelib}/imagefactory_plugins/EC2
%{python3_sitelib}/imagefactory_plugins/GCE/*
%changelog
+* Wed Mar 04 2020 Peter Robinson <pbrobinson(a)fedoraproject.org> - 1.1.15-4
+- fix for RHBZ#1793927
+
* Fri Feb 07 2020 Kevin Fenzi <kevin(a)scrye.com> - 1.1.15-3
- Drop EC2 plugin as it uses euca2ools which is python2 and no longer in Fedora. Fixes bug #1762327
4 years, 2 months
Architecture specific change in rpms/imagefactory.git
by githook-noreply@fedoraproject.org
The package rpms/imagefactory.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/imagefactory.git/commit/?id=bad36....
Change:
-ExcludeArch: i386 ppc64
Thanks.
Full change:
============
commit bad367d8d622885c8ba287021ab368697304fd80
Author: Peter Robinson <pbrobinson(a)gmail.com>
Date: Wed Mar 4 20:37:21 2020 +0000
add patch
Signed-off-by: Peter Robinson <pbrobinson(a)gmail.com>
diff --git a/container-github-pr434.patch b/container-github-pr434.patch
new file mode 100644
index 0000000..a32fb2b
--- /dev/null
+++ b/container-github-pr434.patch
@@ -0,0 +1,54 @@
+From 12156b34856828e63f0278b38c807842d489aa78 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jakub=20=C4=8Cajka?= <jcajka(a)redhat.com>
+Date: Tue, 25 Feb 2020 14:26:01 +0100
+Subject: [PATCH] plugin docker: Fix arch string used for container metadata to
+ be compliant with the standard Fixes: RHBZ#1793927
+
+---
+ imagefactory_plugins/Docker/Docker.py | 18 +++++++++++-------
+ 1 file changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/imagefactory_plugins/Docker/Docker.py b/imagefactory_plugins/Docker/Docker.py
+@@ -46,6 +46,15 @@
+ "gzip": "gzip -c %s > %s",
+ "bzip2": "bzip2 -c %s > %s" }
+
++ # In image metadata, Go arch is used to identify the architecture
++ # https://docs.docker.com/registry/spec/manifest-v2-2/
++ goarchs = { "x86_64": "amd64",
++ "aarch64": "arm64",
++ "armv7hl": "armhfp",
++ "riscv64": "riscv64",
++ "ppc64le": "ppc64le",
++ "s390x": "s390x"}
++
+ # The templates below allow us to generate base images without a running docker locally
+
+ # imcleod(a)redhat.com - 26-Aug-2014
+@@ -391,7 +400,7 @@
+ if set_arch_label:
+ if label == 'null':
+ label = dict()
+- label["architecture"] = tldobj.arch
++ label["architecture"] = goarchs[tdlobj.arch]
+
+ rdict = { repository: { tag: docker_image_id } }
+
+@@ -400,16 +409,11 @@
+ raise Exception("No docker JSON template available for specified docker version (%s)" % (dockerversion))
+ docker_json_template=self.docker_templates_dict[dockerversion]
+
+- arch = tdlobj.arch
+- if arch == "x86_64":
+- arch = "amd64"
+- elif arch == "armv7hl":
+- arch = "armhfp"
+ tdict = { }
+ tdict['commentstring'] = parameters.get('comment', 'Created by Image Factory')
+ tdict['os'] = parameters.get('os', 'linux')
+ tdict['createdtime'] = datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ')
+- tdict['arch'] = arch
++ tdict['arch'] = goarchs[tdlobj.arch]
+ tdict['idstring'] = docker_image_id
+ tdict['cmd'] = cmd
+ tdict['env'] = env
diff --git a/imagefactory.spec b/imagefactory.spec
index fc78af4..f578f6f 100644
--- a/imagefactory.spec
+++ b/imagefactory.spec
@@ -1,23 +1,20 @@
-%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
-%global use_systemd 1
-%else
-%global use_systemd 0
-# This is, of course, not set in older RPMs and is needed below
-%global _unitdir /usr/lib/systemd/system
-%endif
-
-Summary: System image generation tool
Name: imagefactory
Version: 1.1.14
-Release: 2%{?dist}
-Source0: https://github.com/redhat-imaging/imagefactory/archive/imagefactory-%{ver...
+Release: 3%{?dist}
+Summary: System image generation tool
License: ASL 2.0
-Group: Applications/System
URL: https://github.com/redhat-imaging/imagefactory
+
+Source0: https://github.com/redhat-imaging/imagefactory/archive/imagefactory-%{ver...
+Patch0: container-github-pr434.patch
BuildArch: noarch
-%if 0%{?rhel} == 6
-ExcludeArch: i386 ppc64
-%endif
+
+BuildRequires: python3
+BuildRequires: python3-setuptools
+BuildRequires: python3-rpm-macros
+BuildRequires: python-rpm-macros
+BuildRequires: systemd-units
+
Requires: python3-pycurl
Requires: python3-libguestfs
Requires: python3-zope-interface
@@ -28,23 +25,10 @@ Requires: python3-oauth2
Requires: python3-libs
Requires: oz
-%if %{use_systemd}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
-BuildRequires: systemd-units
-%else
-Requires(post): chkconfig
-Requires(preun): chkconfig
-# This is for /sbin/service
-Requires(preun): initscripts
-%endif
-
-BuildRequires: python3
-BuildRequires: python3-setuptools
-BuildRequires: python3-rpm-macros
-BuildRequires: python-rpm-macros
# TODO: Any changes to the _internal_ API must increment this version or, in
# the case of backwards compatible changes, add a new version (RPM
# allows multiple version "=" lines for the same package or
@@ -57,7 +41,7 @@ and cloud providers from a single template definition. See
https://github.com/redhat-imaging/imagefactory for more information.
%prep
-%setup -q -n imagefactory-imagefactory-%{version}-1
+%autosetup -p1 -n imagefactory-imagefactory-%{version}-1
%build
%py3_build
@@ -67,25 +51,17 @@ https://github.com/redhat-imaging/imagefactory for more information.
%py3_install
-%{__install} -d %{buildroot}/%{_sysconfdir}/imagefactory/jeos_images
-%{__install} -d %{buildroot}/%{_localstatedir}/lib/imagefactory/images
-%{__install} -d %{buildroot}/%{_sysconfdir}/imagefactory/plugins.d
-%{__install} -d %{buildroot}/%{_sysconfdir}/logrotate.d
+install -d %{buildroot}/%{_sysconfdir}/imagefactory/jeos_images
+install -d %{buildroot}/%{_localstatedir}/lib/imagefactory/images
+install -d %{buildroot}/%{_sysconfdir}/imagefactory/plugins.d
+install -d %{buildroot}/%{_sysconfdir}/logrotate.d
#sed -i '/\/usr\/bin\/env python/d' %{buildroot}/%{python_sitelib}/imgfac/*.py
-%{__install} -m0600 conf/sysconfig/imagefactoryd %{buildroot}/%{_sysconfdir}/sysconfig/imagefactoryd
-%{__install} -m0600 conf/logrotate.d/imagefactoryd %{buildroot}/%{_sysconfdir}/logrotate.d/imagefactoryd
+install -m0600 conf/sysconfig/imagefactoryd %{buildroot}/%{_sysconfdir}/sysconfig/imagefactoryd
+install -m0600 conf/logrotate.d/imagefactoryd %{buildroot}/%{_sysconfdir}/logrotate.d/imagefactoryd
-# setup.py installs both of these which I suppose is OK
-# delete the one we don't want here
-%if %{use_systemd}
rm -f %{buildroot}/%{_initddir}/imagefactoryd
-%else
-rm -f %{buildroot}/%{_unitdir}/imagefactoryd.service
-%endif
-
-%if %{use_systemd}
%post
%systemd_post imagefactoryd.service
@@ -96,26 +72,10 @@ rm -f %{buildroot}/%{_unitdir}/imagefactoryd.service
%postun
%systemd_postun imagefactoryd.service
-%else
-
-%post
-/sbin/chkconfig --add imagefactoryd
-
-%preun
-if [ $1 = 0 ] ; then
- /sbin/service imagefactoryd stop >/dev/null 2>&1
- /sbin/chkconfig --del imagefactoryd
-fi
-
-%endif
%files
-%doc COPYING
-%if %{use_systemd}
+%license COPYING
%{_unitdir}/imagefactoryd.service
-%else
-%{_initddir}/imagefactoryd
-%endif
%config(noreplace) %{_sysconfdir}/imagefactory/imagefactory.conf
%config(noreplace) %{_sysconfdir}/sysconfig/imagefactoryd
%config(noreplace) %{_sysconfdir}/logrotate.d/imagefactoryd
@@ -132,6 +92,11 @@ fi
%{_bindir}/imagefactoryd
%changelog
+* Wed Mar 04 2020 Peter Robinson <pbrobinson(a)fedoraproject.org> - 1.1.14-3
+- Upstream patch for container fixes
+- Drop non systemd support as it requires python3 of which older distros won't have
+- Spec cleanup
+
* Wed Jan 29 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.1.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
4 years, 2 months
Architecture specific change in rpms/fwupd.git
by githook-noreply@fedoraproject.org
The package rpms/fwupd.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/fwupd.git/commit/?id=30c1eec20cac....
Change:
+%ifarch i686 x86_64 armv7hl aarch64 ppc64le
Thanks.
Full change:
============
commit 30c1eec20cac20d66258941a58980ada192d9764
Author: Richard Hughes <richard(a)hughsie.com>
Date: Wed Mar 4 16:38:30 2020 +0000
New upstream release
diff --git a/.gitignore b/.gitignore
index e8c00cf..064f262 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,3 +61,4 @@
/fwupd-1.3.6.tar.xz
/fwupd-1.3.7.tar.xz
/fwupd-1.3.8.tar.xz
+/fwupd-1.3.9.tar.xz
diff --git a/fwupd.spec b/fwupd.spec
index cc2fc9c..13be7d0 100644
--- a/fwupd.spec
+++ b/fwupd.spec
@@ -17,6 +17,11 @@
%global have_uefi 1
%endif
+# flashrom is only available on these arches
+%ifarch i686 x86_64 armv7hl aarch64 ppc64le
+%global have_flashrom 1
+%endif
+
# redfish is only available on this arch
%ifarch x86_64
%global have_redfish 1
@@ -34,7 +39,7 @@
Summary: Firmware update daemon
Name: fwupd
-Version: 1.3.8
+Version: 1.3.9
Release: 1%{?dist}
License: LGPLv2+
URL: https://github.com/fwupd/fwupd
@@ -71,6 +76,9 @@ BuildRequires: json-glib-devel >= %{json_glib_version}
BuildRequires: vala
BuildRequires: bash-completion
BuildRequires: git-core
+%if 0%{?have_flashrom}
+BuildRequires: flashrom-devel >= 1.2-2
+%endif
%if 0%{?have_modem_manager}
BuildRequires: ModemManager-glib-devel >= 1.10.0
@@ -151,7 +159,11 @@ Data files for installed tests.
%else
-Dplugin_dummy=false \
%endif
+%if 0%{?have_flashrom}
+ -Dplugin_flashrom=true \
+%else
-Dplugin_flashrom=false \
+%endif
-Dplugin_thunderbolt=true \
%if 0%{?have_redfish}
-Dplugin_redfish=true \
@@ -224,6 +236,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/fwupd
%doc README.md AUTHORS
%license COPYING
%config(noreplace)%{_sysconfdir}/fwupd/daemon.conf
+%config(noreplace)%{_sysconfdir}/fwupd/upower.conf
%if 0%{?have_uefi}
%config(noreplace)%{_sysconfdir}/fwupd/uefi.conf
%endif
@@ -233,17 +246,17 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/fwupd
%config(noreplace)%{_sysconfdir}/fwupd/thunderbolt.conf
%dir %{_libexecdir}/fwupd
%{_libexecdir}/fwupd/fwupd
-%{_libexecdir}/fwupd/fwupdtool
-%{_libexecdir}/fwupd/fwupdagent
%{_libexecdir}/fwupd/fwupdoffline
%if 0%{?have_uefi}
%{_libexecdir}/fwupd/efi/*.efi
%{_libexecdir}/fwupd/efi/*.efi.signed
-%{_libexecdir}/fwupd/fwupdate
-%{_libexecdir}/fwupd/fwupdtpmevlog
+%{_bindir}/fwupdate
+%{_bindir}/fwupdtpmevlog
%endif
%{_bindir}/dfu-tool
%{_bindir}/fwupdmgr
+%{_bindir}/fwupdtool
+%{_bindir}/fwupdagent
%dir %{_sysconfdir}/fwupd
%dir %{_sysconfdir}/fwupd/remotes.d
%if 0%{?have_dell}
@@ -259,6 +272,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/fwupd
%{_datadir}/bash-completion/completions/fwupdmgr
%{_datadir}/bash-completion/completions/fwupdtool
%{_datadir}/bash-completion/completions/fwupdagent
+%{_datadir}/fish/vendor_completions.d/fwupdmgr.fish
%{_datadir}/fwupd/metainfo/org.freedesktop.fwupd*.metainfo.xml
%if 0%{?have_dell}
%{_datadir}/fwupd/remotes.d/dell-esrt/metadata.xml
@@ -268,8 +282,14 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/fwupd
%{_datadir}/polkit-1/actions/org.freedesktop.fwupd.policy
%{_datadir}/polkit-1/rules.d/org.freedesktop.fwupd.rules
%{_datadir}/dbus-1/system-services/org.freedesktop.fwupd.service
+%{_datadir}/man/man1/fwupdtool.1.gz
+%{_datadir}/man/man1/fwupdagent.1.gz
%{_datadir}/man/man1/dfu-tool.1.gz
%{_datadir}/man/man1/fwupdmgr.1.gz
+%if 0%{?have_uefi}
+%{_datadir}/man/man1/fwupdate.1.gz
+%{_datadir}/man/man1/fwupdtpmevlog.1.gz
+%endif
%{_datadir}/metainfo/org.freedesktop.fwupd.metainfo.xml
%{_datadir}/icons/hicolor/scalable/apps/org.freedesktop.fwupd.svg
%{_datadir}/fwupd/firmware_packager.py
@@ -308,6 +328,9 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/fwupd
%{_libdir}/fwupd-plugins-3/libfu_plugin_ebitdo.so
%{_libdir}/fwupd-plugins-3/libfu_plugin_emmc.so
%{_libdir}/fwupd-plugins-3/libfu_plugin_fastboot.so
+%if 0%{?have_flashrom}
+%{_libdir}/fwupd-plugins-3/libfu_plugin_flashrom.so
+%endif
%{_libdir}/fwupd-plugins-3/libfu_plugin_fresco_pd.so
%{_libdir}/fwupd-plugins-3/libfu_plugin_jabra.so
%if 0%{?have_modem_manager}
@@ -345,6 +368,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/fwupd
%{_libdir}/fwupd-plugins-3/libfu_plugin_uefi.so
%{_libdir}/fwupd-plugins-3/libfu_plugin_uefi_recovery.so
%endif
+%{_libdir}/fwupd-plugins-3/libfu_plugin_logind.so
%{_libdir}/fwupd-plugins-3/libfu_plugin_logitech_hidpp.so
%{_libdir}/fwupd-plugins-3/libfu_plugin_upower.so
%{_libdir}/fwupd-plugins-3/libfu_plugin_vli.so
@@ -376,6 +400,25 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/fwupd
%config(noreplace)%{_sysconfdir}/fwupd/remotes.d/fwupd-tests.conf
%changelog
+* Wed Mar 04 2020 Richard Hughes <richard(a)hughsie.com> 1.3.9-1
+- New upstream release
+- Added completion script for fish shell
+- Always check for PLAIN when doing vercmp() operations
+- Always return AppStream markup for remote agreements
+- Apply UEFI capsule update even with single valid capsule
+- Check the device protocol before de-duping devices
+- Copy the version and format from donor device in get-details
+- Correctly append the release to devices in `fwupdtool get-details`
+- Decrease minimum battery requirement to 10%
+- Discard the reason upgrades aren't available
+- Do not fail loading in /etc/machine-id is not available
+- Fix a critical warning when installing some firmware
+- For the `get-details` command make sure to always show devices
+- Inhibit all power management actions using logind when updating
+- Set the MSP430 version format to pair
+- Switch off the ATA verbose logging by default
+- Use unknown for version format by default on get-details
+
* Thu Feb 13 2020 Richard Hughes <richard(a)hughsie.com> 1.3.8-1
- New upstream release
- Add an extra instance ID to disambiguate USB hubs
diff --git a/sources b/sources
index 0fafd6f..9041427 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (fwupd-1.3.8.tar.xz) = 66f6b0df9e2b4171bf926a6453790f5ea34e02a7f9b227a2c2e55841ffb94160299793a5558a854a27b7fd50a51a28de7060a0a5b6b9cfe862bd4cf4dd34aafc
+SHA512 (fwupd-1.3.9.tar.xz) = 1268ebf1ba67be1af83a10d354c0cb59dae772f2e46acf7f53796e050a40b8f0b0f23ac0ffec5145623549254a2eaa96251044d138568c6424c592327fe8655e
4 years, 2 months
Architecture specific change in rpms/golang-github-alangpierce-forceexport.git
by githook-noreply@fedoraproject.org
The package rpms/golang-github-alangpierce-forceexport.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/golang-github-alangpierce-forceex....
Change:
+%ifnarch s390x
Thanks.
Full change:
============
commit 3fc3dd8e5bfc41e6a6a5b9d69476b2244c046105
Author: Robert-Andr Mauchin <zebob.m(a)gmail.com>
Date: Wed Mar 4 17:36:02 2020 +0100
Disable s390x tests
Signed-off-by: Robert-Andr Mauchin <zebob.m(a)gmail.com>
diff --git a/golang-github-alangpierce-forceexport.spec b/golang-github-alangpierce-forceexport.spec
index 40708ea..f0311a8 100644
--- a/golang-github-alangpierce-forceexport.spec
+++ b/golang-github-alangpierce-forceexport.spec
@@ -1,5 +1,7 @@
# Generated by go2rpm 1
+%ifnarch s390x
%bcond_without check
+%endif
# https://github.com/alangpierce/go-forceexport
%global goipath github.com/alangpierce/go-forceexport
commit b00e300feb1f4f6c39fe0a957965cdcb76f6082e
Author: Robert-Andr Mauchin <zebob.m(a)gmail.com>
Date: Wed Mar 4 17:23:08 2020 +0100
Initial import (#1802343)
Signed-off-by: Robert-Andr Mauchin <zebob.m(a)gmail.com>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..61ef4ca
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/go-forceexport-8f1d6941cd755b975763ddb1f836561edddac2b8.tar.gz
diff --git a/0001-Fixes-the-edge-case.patch b/0001-Fixes-the-edge-case.patch
new file mode 100644
index 0000000..d2fcb91
--- /dev/null
+++ b/0001-Fixes-the-edge-case.patch
@@ -0,0 +1,132 @@
+From af893c8a7b58060faaafaa545ac4d1e8874a3b44 Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Wed, 25 Apr 2018 01:29:49 -0400
+Subject: [PATCH 1/3] Fixes the edge case on the last function symbol that has
+ a nil datap
+
+---
+ forceexport.go | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/forceexport.go b/forceexport.go
+index 73714af..5b911e5 100644
+--- a/forceexport.go
++++ b/forceexport.go
+@@ -59,6 +59,21 @@ func FindFuncWithName(name string) (uintptr, error) {
+ for moduleData := &Firstmoduledata; moduleData != nil; moduleData = moduleData.next {
+ for _, ftab := range moduleData.ftab {
+ f := (*runtime.Func)(unsafe.Pointer(&moduleData.pclntable[ftab.funcoff]))
++
++ // (*Func).Name() assumes that the *Func was created by some exported
++ // method that would have returned a nil *Func pointer IF the
++ // desired function's datap resolves to nil.
++ // (a.k.a. if findmoduledatap(pc) returns nil)
++ // Since the last element of the moduleData.ftab has a datap of nil
++ // (from experimentation), .Name() Seg Faults on the last element.
++ //
++ // If we instead ask the external function FuncForPc to fetch
++ // our *Func object, it will check the datap first and give us
++ // a proper nil *Func, that .Name() understands.
++ // The down side of doing this is that internally, the
++ // findmoduledatap(pc) function is called twice for every element
++ // we loop over.
++ f = runtime.FuncForPC(f.Entry())
+ if f.Name() == name {
+ return f.Entry(), nil
+ }
+
+From c453a2d8bacf5220393a99021007d7e40a4cb821 Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Wed, 25 Apr 2018 01:30:41 -0400
+Subject: [PATCH 2/3] Updated Moduledata to look more like go 1.10's ModuleData
+
+---
+ forceexport.go | 35 +++++++++++++++++++++++++++++++++--
+ 1 file changed, 33 insertions(+), 2 deletions(-)
+
+diff --git a/forceexport.go b/forceexport.go
+index 5b911e5..23dfda7 100644
+--- a/forceexport.go
++++ b/forceexport.go
+@@ -101,19 +101,50 @@ type Moduledata struct {
+ bss, ebss uintptr
+ noptrbss, enoptrbss uintptr
+ end, gcdata, gcbss uintptr
++ types, etypes uintptr
+
+- // Original type was []*_type
+- typelinks []interface{}
++ textsectmap []Textsect
++ typelinks []int32 // offsets from types
++ // Original type was []*itab
++ itablinks []*struct{}
++
++ ptab []PtabEntry
++
++ pluginpath string
++ // Original type was []modulehash
++ pkghashes []interface{}
+
+ modulename string
+ // Original type was []modulehash
+ modulehashes []interface{}
+
++ hasmain uint8 // 1 if module contains the main function, 0 otherwise
++
+ gcdatamask, gcbssmask Bitvector
+
++ // Original type was map[typeOff]*_type
++ typemap map[typeOff]*struct{}
++
++ bad bool // module failed to load and should be ignored
++
+ next *Moduledata
+ }
+
++type Textsect struct {
++ vaddr uintptr // prelinked section vaddr
++ length uintptr // section length
++ baseaddr uintptr // relocated section address
++}
++
++type nameOff int32
++type typeOff int32
++type textOff int32
++
++type PtabEntry struct {
++ name nameOff
++ typ typeOff
++}
++
+ type Functab struct {
+ entry uintptr
+ funcoff uintptr
+
+From 37ebe5b408f3c0e25d88a4b7980d633b88cb84a0 Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Wed, 25 Apr 2018 01:34:03 -0400
+Subject: [PATCH 3/3] Updated README.MD to indicate working status on GNU/Linux
+ Go 1.10rc2
+
+---
+ README.md | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/README.md b/README.md
+index 7e415e0..2c6aa04 100644
+--- a/README.md
++++ b/README.md
+@@ -10,9 +10,10 @@ by name.
+ As you might expect, this library is **unsafe** and **fragile** and probably
+ shouldn't be used in production. See "Use cases and pitfalls" below.
+
+-It has only been tested on Mac OS X with Go 1.6. If you find that it works or
+-breaks on other platforms, feel free to submit a pull request with a fix and/or
+-an update to this paragraph.
++It has only been tested on Mac OS X with Go 1.6 and on GNU/Linux with
++Go 1.10rc2.
++If you find that it works or breaks on other platforms, feel free to submit
++a pull request with a fix and/or an update to this paragraph.
+
+ ## Installation
+
diff --git a/0001-Minor-syntax-errors-in-test.patch b/0001-Minor-syntax-errors-in-test.patch
new file mode 100644
index 0000000..4dfc54d
--- /dev/null
+++ b/0001-Minor-syntax-errors-in-test.patch
@@ -0,0 +1,107 @@
+From 34e2680236725e6a4da1ca253c01afc173f66d0d Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Tue, 24 Apr 2018 23:34:21 -0400
+Subject: [PATCH 1/3] Minor syntax errors in test - t.Error to t.Errorf
+
+---
+ forceexport_test.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/forceexport_test.go b/forceexport_test.go
+index 49b0f0e..32edf3c 100644
+--- a/forceexport_test.go
++++ b/forceexport_test.go
+@@ -41,7 +41,7 @@ func TestGetSelf(t *testing.T) {
+ var getFunc func(interface{}, string) error
+ err := GetFunc(&getFunc, "github.com/alangpierce/go-forceexport.GetFunc")
+ if err != nil {
+- t.Error("Error: %s", err)
++ t.Errorf("Error: %s", err)
+ }
+ // The two functions should share the same code pointer, so they should
+ // have the same string representation.
+@@ -51,7 +51,7 @@ func TestGetSelf(t *testing.T) {
+ // Call it again on itself!
+ err = getFunc(&getFunc, "github.com/alangpierce/go-forceexport.GetFunc")
+ if err != nil {
+- t.Error("Error: %s", err)
++ t.Errorf("Error: %s", err)
+ }
+ if fmt.Sprint(getFunc) != fmt.Sprint(GetFunc) {
+ t.Errorf("Expected ")
+
+From a717f53cda07c750b3c58a305128deb8694872b6 Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Wed, 25 Apr 2018 01:06:22 -0400
+Subject: [PATCH 2/3] Evade go vet's error about function in fmt.Sprint
+
+---
+ forceexport_test.go | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/forceexport_test.go b/forceexport_test.go
+index 32edf3c..8dd518f 100644
+--- a/forceexport_test.go
++++ b/forceexport_test.go
+@@ -2,9 +2,16 @@ package forceexport
+
+ import (
+ "fmt"
++ "reflect"
++ "runtime"
+ "testing"
+ )
+
++// funcName resolves the name of a given function
++func funcName(f interface{}) string {
++ return runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name()
++}
++
+ func TestTimeNow(t *testing.T) {
+ var timeNowFunc func() (int64, int32)
+ GetFunc(&timeNowFunc, "time.now")
+@@ -45,7 +52,7 @@ func TestGetSelf(t *testing.T) {
+ }
+ // The two functions should share the same code pointer, so they should
+ // have the same string representation.
+- if fmt.Sprint(getFunc) != fmt.Sprint(GetFunc) {
++ if fmt.Sprint(funcName(getFunc)) != fmt.Sprint(funcName(GetFunc)) {
+ t.Errorf("Expected ")
+ }
+ // Call it again on itself!
+@@ -53,7 +60,7 @@ func TestGetSelf(t *testing.T) {
+ if err != nil {
+ t.Errorf("Error: %s", err)
+ }
+- if fmt.Sprint(getFunc) != fmt.Sprint(GetFunc) {
++ if fmt.Sprint(funcName(getFunc)) != fmt.Sprint(funcName(GetFunc)) {
+ t.Errorf("Expected ")
+ }
+ }
+
+From 5e795da1275d6bb103537d21d91c6310f24ffe9f Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Wed, 25 Apr 2018 01:08:58 -0400
+Subject: [PATCH 3/3] Added rough benchmark
+
+---
+ forceexport_test.go | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/forceexport_test.go b/forceexport_test.go
+index 8dd518f..89edfb2 100644
+--- a/forceexport_test.go
++++ b/forceexport_test.go
+@@ -75,3 +75,12 @@ func TestInvalidFunc(t *testing.T) {
+ t.Error("Expected a nil function.")
+ }
+ }
++
++// BenchmarkGetMainInit check how long it takes to find the symbol main.init,
++// which is typically the last func symbol(by experiment).
++func BenchmarkGetMainInit(b *testing.B) {
++ for i := 0; i < b.N; i++ {
++ var main_init func()
++ GetFunc(&main_init, "main.init")
++ }
++}
diff --git a/golang-github-alangpierce-forceexport.spec b/golang-github-alangpierce-forceexport.spec
new file mode 100644
index 0000000..40708ea
--- /dev/null
+++ b/golang-github-alangpierce-forceexport.spec
@@ -0,0 +1,56 @@
+# Generated by go2rpm 1
+%bcond_without check
+
+# https://github.com/alangpierce/go-forceexport
+%global goipath github.com/alangpierce/go-forceexport
+%global commit 8f1d6941cd755b975763ddb1f836561edddac2b8
+
+%gometa
+
+%global common_description %{expand:
+Go-forceexport is a golang package that allows access to any module-level
+function, even ones that are not exported. You give it the string name of a
+function , like "time.now", and gives you a function value that calls that
+function. More generally, it can be used to achieve something like reflection on
+top-level functions, whereas the reflect package only lets you access methods by
+name.}
+
+%global golicenses LICENSE
+%global godocs README.md
+
+Name: %{goname}
+Version: 0
+Release: 0.1%{?dist}
+Summary: Access unexported functions from other packages
+
+License: MIT
+URL: %{gourl}
+Source0: %{gosource}
+# Minor syntax errors in test
+Patch0: https://patch-diff.githubusercontent.com/raw/alangpierce/go-forceexport/p...
+# Fixes the edge case
+Patch1: https://patch-diff.githubusercontent.com/raw/alangpierce/go-forceexport/p...
+
+%description
+%{common_description}
+
+%gopkg
+
+%prep
+%goprep
+%patch0 -p1
+%patch1 -p1
+
+%install
+%gopkginstall
+
+%if %{with check}
+%check
+%gocheck
+%endif
+
+%gopkgfiles
+
+%changelog
+* Wed Mar 04 17:20:04 CET 2020 Robert-Andr Mauchin <zebob.m(a)gmail.com> - 0-0.1.20200304git8f1d694
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..0b6ccc9
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (go-forceexport-8f1d6941cd755b975763ddb1f836561edddac2b8.tar.gz) = c292043842a6b4a9db10410533bfe05b86cdf697a785fc4d0321a76be91b8c712d79dc086bdde55a6ac8b90d95587e94d4bd6a2592df4445000292d0c8c532a0
4 years, 2 months
Architecture specific change in rpms/golang-github-alangpierce-forceexport.git
by githook-noreply@fedoraproject.org
The package rpms/golang-github-alangpierce-forceexport.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/golang-github-alangpierce-forceex....
Change:
+%ifnarch s390x
Thanks.
Full change:
============
commit 3fc3dd8e5bfc41e6a6a5b9d69476b2244c046105
Author: Robert-Andr Mauchin <zebob.m(a)gmail.com>
Date: Wed Mar 4 17:36:02 2020 +0100
Disable s390x tests
Signed-off-by: Robert-Andr Mauchin <zebob.m(a)gmail.com>
diff --git a/golang-github-alangpierce-forceexport.spec b/golang-github-alangpierce-forceexport.spec
index 40708ea..f0311a8 100644
--- a/golang-github-alangpierce-forceexport.spec
+++ b/golang-github-alangpierce-forceexport.spec
@@ -1,5 +1,7 @@
# Generated by go2rpm 1
+%ifnarch s390x
%bcond_without check
+%endif
# https://github.com/alangpierce/go-forceexport
%global goipath github.com/alangpierce/go-forceexport
commit b00e300feb1f4f6c39fe0a957965cdcb76f6082e
Author: Robert-Andr Mauchin <zebob.m(a)gmail.com>
Date: Wed Mar 4 17:23:08 2020 +0100
Initial import (#1802343)
Signed-off-by: Robert-Andr Mauchin <zebob.m(a)gmail.com>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..61ef4ca
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/go-forceexport-8f1d6941cd755b975763ddb1f836561edddac2b8.tar.gz
diff --git a/0001-Fixes-the-edge-case.patch b/0001-Fixes-the-edge-case.patch
new file mode 100644
index 0000000..d2fcb91
--- /dev/null
+++ b/0001-Fixes-the-edge-case.patch
@@ -0,0 +1,132 @@
+From af893c8a7b58060faaafaa545ac4d1e8874a3b44 Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Wed, 25 Apr 2018 01:29:49 -0400
+Subject: [PATCH 1/3] Fixes the edge case on the last function symbol that has
+ a nil datap
+
+---
+ forceexport.go | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/forceexport.go b/forceexport.go
+index 73714af..5b911e5 100644
+--- a/forceexport.go
++++ b/forceexport.go
+@@ -59,6 +59,21 @@ func FindFuncWithName(name string) (uintptr, error) {
+ for moduleData := &Firstmoduledata; moduleData != nil; moduleData = moduleData.next {
+ for _, ftab := range moduleData.ftab {
+ f := (*runtime.Func)(unsafe.Pointer(&moduleData.pclntable[ftab.funcoff]))
++
++ // (*Func).Name() assumes that the *Func was created by some exported
++ // method that would have returned a nil *Func pointer IF the
++ // desired function's datap resolves to nil.
++ // (a.k.a. if findmoduledatap(pc) returns nil)
++ // Since the last element of the moduleData.ftab has a datap of nil
++ // (from experimentation), .Name() Seg Faults on the last element.
++ //
++ // If we instead ask the external function FuncForPc to fetch
++ // our *Func object, it will check the datap first and give us
++ // a proper nil *Func, that .Name() understands.
++ // The down side of doing this is that internally, the
++ // findmoduledatap(pc) function is called twice for every element
++ // we loop over.
++ f = runtime.FuncForPC(f.Entry())
+ if f.Name() == name {
+ return f.Entry(), nil
+ }
+
+From c453a2d8bacf5220393a99021007d7e40a4cb821 Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Wed, 25 Apr 2018 01:30:41 -0400
+Subject: [PATCH 2/3] Updated Moduledata to look more like go 1.10's ModuleData
+
+---
+ forceexport.go | 35 +++++++++++++++++++++++++++++++++--
+ 1 file changed, 33 insertions(+), 2 deletions(-)
+
+diff --git a/forceexport.go b/forceexport.go
+index 5b911e5..23dfda7 100644
+--- a/forceexport.go
++++ b/forceexport.go
+@@ -101,19 +101,50 @@ type Moduledata struct {
+ bss, ebss uintptr
+ noptrbss, enoptrbss uintptr
+ end, gcdata, gcbss uintptr
++ types, etypes uintptr
+
+- // Original type was []*_type
+- typelinks []interface{}
++ textsectmap []Textsect
++ typelinks []int32 // offsets from types
++ // Original type was []*itab
++ itablinks []*struct{}
++
++ ptab []PtabEntry
++
++ pluginpath string
++ // Original type was []modulehash
++ pkghashes []interface{}
+
+ modulename string
+ // Original type was []modulehash
+ modulehashes []interface{}
+
++ hasmain uint8 // 1 if module contains the main function, 0 otherwise
++
+ gcdatamask, gcbssmask Bitvector
+
++ // Original type was map[typeOff]*_type
++ typemap map[typeOff]*struct{}
++
++ bad bool // module failed to load and should be ignored
++
+ next *Moduledata
+ }
+
++type Textsect struct {
++ vaddr uintptr // prelinked section vaddr
++ length uintptr // section length
++ baseaddr uintptr // relocated section address
++}
++
++type nameOff int32
++type typeOff int32
++type textOff int32
++
++type PtabEntry struct {
++ name nameOff
++ typ typeOff
++}
++
+ type Functab struct {
+ entry uintptr
+ funcoff uintptr
+
+From 37ebe5b408f3c0e25d88a4b7980d633b88cb84a0 Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Wed, 25 Apr 2018 01:34:03 -0400
+Subject: [PATCH 3/3] Updated README.MD to indicate working status on GNU/Linux
+ Go 1.10rc2
+
+---
+ README.md | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/README.md b/README.md
+index 7e415e0..2c6aa04 100644
+--- a/README.md
++++ b/README.md
+@@ -10,9 +10,10 @@ by name.
+ As you might expect, this library is **unsafe** and **fragile** and probably
+ shouldn't be used in production. See "Use cases and pitfalls" below.
+
+-It has only been tested on Mac OS X with Go 1.6. If you find that it works or
+-breaks on other platforms, feel free to submit a pull request with a fix and/or
+-an update to this paragraph.
++It has only been tested on Mac OS X with Go 1.6 and on GNU/Linux with
++Go 1.10rc2.
++If you find that it works or breaks on other platforms, feel free to submit
++a pull request with a fix and/or an update to this paragraph.
+
+ ## Installation
+
diff --git a/0001-Minor-syntax-errors-in-test.patch b/0001-Minor-syntax-errors-in-test.patch
new file mode 100644
index 0000000..4dfc54d
--- /dev/null
+++ b/0001-Minor-syntax-errors-in-test.patch
@@ -0,0 +1,107 @@
+From 34e2680236725e6a4da1ca253c01afc173f66d0d Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Tue, 24 Apr 2018 23:34:21 -0400
+Subject: [PATCH 1/3] Minor syntax errors in test - t.Error to t.Errorf
+
+---
+ forceexport_test.go | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/forceexport_test.go b/forceexport_test.go
+index 49b0f0e..32edf3c 100644
+--- a/forceexport_test.go
++++ b/forceexport_test.go
+@@ -41,7 +41,7 @@ func TestGetSelf(t *testing.T) {
+ var getFunc func(interface{}, string) error
+ err := GetFunc(&getFunc, "github.com/alangpierce/go-forceexport.GetFunc")
+ if err != nil {
+- t.Error("Error: %s", err)
++ t.Errorf("Error: %s", err)
+ }
+ // The two functions should share the same code pointer, so they should
+ // have the same string representation.
+@@ -51,7 +51,7 @@ func TestGetSelf(t *testing.T) {
+ // Call it again on itself!
+ err = getFunc(&getFunc, "github.com/alangpierce/go-forceexport.GetFunc")
+ if err != nil {
+- t.Error("Error: %s", err)
++ t.Errorf("Error: %s", err)
+ }
+ if fmt.Sprint(getFunc) != fmt.Sprint(GetFunc) {
+ t.Errorf("Expected ")
+
+From a717f53cda07c750b3c58a305128deb8694872b6 Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Wed, 25 Apr 2018 01:06:22 -0400
+Subject: [PATCH 2/3] Evade go vet's error about function in fmt.Sprint
+
+---
+ forceexport_test.go | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/forceexport_test.go b/forceexport_test.go
+index 32edf3c..8dd518f 100644
+--- a/forceexport_test.go
++++ b/forceexport_test.go
+@@ -2,9 +2,16 @@ package forceexport
+
+ import (
+ "fmt"
++ "reflect"
++ "runtime"
+ "testing"
+ )
+
++// funcName resolves the name of a given function
++func funcName(f interface{}) string {
++ return runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name()
++}
++
+ func TestTimeNow(t *testing.T) {
+ var timeNowFunc func() (int64, int32)
+ GetFunc(&timeNowFunc, "time.now")
+@@ -45,7 +52,7 @@ func TestGetSelf(t *testing.T) {
+ }
+ // The two functions should share the same code pointer, so they should
+ // have the same string representation.
+- if fmt.Sprint(getFunc) != fmt.Sprint(GetFunc) {
++ if fmt.Sprint(funcName(getFunc)) != fmt.Sprint(funcName(GetFunc)) {
+ t.Errorf("Expected ")
+ }
+ // Call it again on itself!
+@@ -53,7 +60,7 @@ func TestGetSelf(t *testing.T) {
+ if err != nil {
+ t.Errorf("Error: %s", err)
+ }
+- if fmt.Sprint(getFunc) != fmt.Sprint(GetFunc) {
++ if fmt.Sprint(funcName(getFunc)) != fmt.Sprint(funcName(GetFunc)) {
+ t.Errorf("Expected ")
+ }
+ }
+
+From 5e795da1275d6bb103537d21d91c6310f24ffe9f Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig(a)hesling.com>
+Date: Wed, 25 Apr 2018 01:08:58 -0400
+Subject: [PATCH 3/3] Added rough benchmark
+
+---
+ forceexport_test.go | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/forceexport_test.go b/forceexport_test.go
+index 8dd518f..89edfb2 100644
+--- a/forceexport_test.go
++++ b/forceexport_test.go
+@@ -75,3 +75,12 @@ func TestInvalidFunc(t *testing.T) {
+ t.Error("Expected a nil function.")
+ }
+ }
++
++// BenchmarkGetMainInit check how long it takes to find the symbol main.init,
++// which is typically the last func symbol(by experiment).
++func BenchmarkGetMainInit(b *testing.B) {
++ for i := 0; i < b.N; i++ {
++ var main_init func()
++ GetFunc(&main_init, "main.init")
++ }
++}
diff --git a/golang-github-alangpierce-forceexport.spec b/golang-github-alangpierce-forceexport.spec
new file mode 100644
index 0000000..40708ea
--- /dev/null
+++ b/golang-github-alangpierce-forceexport.spec
@@ -0,0 +1,56 @@
+# Generated by go2rpm 1
+%bcond_without check
+
+# https://github.com/alangpierce/go-forceexport
+%global goipath github.com/alangpierce/go-forceexport
+%global commit 8f1d6941cd755b975763ddb1f836561edddac2b8
+
+%gometa
+
+%global common_description %{expand:
+Go-forceexport is a golang package that allows access to any module-level
+function, even ones that are not exported. You give it the string name of a
+function , like "time.now", and gives you a function value that calls that
+function. More generally, it can be used to achieve something like reflection on
+top-level functions, whereas the reflect package only lets you access methods by
+name.}
+
+%global golicenses LICENSE
+%global godocs README.md
+
+Name: %{goname}
+Version: 0
+Release: 0.1%{?dist}
+Summary: Access unexported functions from other packages
+
+License: MIT
+URL: %{gourl}
+Source0: %{gosource}
+# Minor syntax errors in test
+Patch0: https://patch-diff.githubusercontent.com/raw/alangpierce/go-forceexport/p...
+# Fixes the edge case
+Patch1: https://patch-diff.githubusercontent.com/raw/alangpierce/go-forceexport/p...
+
+%description
+%{common_description}
+
+%gopkg
+
+%prep
+%goprep
+%patch0 -p1
+%patch1 -p1
+
+%install
+%gopkginstall
+
+%if %{with check}
+%check
+%gocheck
+%endif
+
+%gopkgfiles
+
+%changelog
+* Wed Mar 04 17:20:04 CET 2020 Robert-Andr Mauchin <zebob.m(a)gmail.com> - 0-0.1.20200304git8f1d694
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..0b6ccc9
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (go-forceexport-8f1d6941cd755b975763ddb1f836561edddac2b8.tar.gz) = c292043842a6b4a9db10410533bfe05b86cdf697a785fc4d0321a76be91b8c712d79dc086bdde55a6ac8b90d95587e94d4bd6a2592df4445000292d0c8c532a0
4 years, 2 months