Hi,

On Wed, 2022-10-19 at 15:49 -0400, Frank Ch. Eigler via Elfutils-devel
wrote:
> I really want this to be merged :) ping Frank,
> > as this would stop me clone elfutils on windows
> 
> If it doesn't break "make rpm" (or at least rpm -ts
> elfutils*.tar.bz2),
> it's fine.

make rpm doesn't work because of:

rpmbuild -ts --sign elfutils-0.187.tar.bz2
error: rpmbuild --sign is no longer supported. Use the rpmsign command
instead!
make: *** [Makefile:971: rpm] Error 1

Maybe just remove the --sign?

But then, with the rename, you'll get:

rpmbuild -ts elfutils-0.187.tar.bz2
error: Found more than one spec file in elfutils-0.187.tar.bz2
make: *** [Makefile:971: rpm] Error 1

So maybe we just should rename them to .specfile?
That is what the attached patch does, plus some other cleanups.
- We forgot to include the hello3.specfile
- Remove the --sign from rpmbuild
- escape the % in spec comments

That makes make rpm work out of the box without warnings.
Does it also help the windows git thing?

Cheers,

Mark
From f7bd331326a03108095b7593bb48d7482690501f Mon Sep 17 00:00:00 2001
From: Yonggang Luo <luoyongg...@gmail.com>
Date: Tue, 20 Sep 2022 16:43:01 +0800
Subject: [PATCH] Rename 'hello{2,3}.spec.' -> 'hello{2,3}.specfile'

These filenames are invalid on win32.
We don't want to include multiple .spec files for make rpm.
rpmbuild --sign is not supported anymore.
Also include hello3.specfile in EXTRA_DIST.
Escape some macros in the elfutils.spec.in file comments.

Signed-off-by: Yonggang Luo <luoyongg...@gmail.com>
Signed-off-by: Mark Wielaard <m...@klomp.org>
---
 ChangeLog                                               | 4 ++++
 Makefile.am                                             | 2 +-
 config/ChangeLog                                        | 4 ++++
 config/elfutils.spec.in                                 | 6 +++---
 tests/ChangeLog                                         | 9 +++++++++
 tests/Makefile.am                                       | 3 ++-
 tests/debuginfod-rpms/{hello2.spec. => hello2.specfile} | 0
 tests/debuginfod-rpms/{hello3.spec. => hello3.specfile} | 0
 8 files changed, 23 insertions(+), 5 deletions(-)
 rename tests/debuginfod-rpms/{hello2.spec. => hello2.specfile} (100%)
 rename tests/debuginfod-rpms/{hello3.spec. => hello3.specfile} (100%)

diff --git a/ChangeLog b/ChangeLog
index 60624183..2bf99c71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2022-10-20  Mark Wielaard  <m...@klomp.org>
+
+	* Makefile.am (rpm): Remove --sign.
+
 2022-09-13  Aleksei Vetrov  <vvv...@google.com>
 
 	* NEWS (libdwfl): Add dwfl_report_offline_memory.
diff --git a/Makefile.am b/Makefile.am
index 8643312a..e92e05c2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,7 +44,7 @@ distcheck-hook:
 	chmod -R u+w $(distdir)
 
 rpm: dist
-	rpmbuild -ts --sign elfutils-@PACKAGE_VERSION@.tar.bz2
+	rpmbuild -ts elfutils-@PACKAGE_VERSION@.tar.bz2
 
 if GCOV
 
diff --git a/config/ChangeLog b/config/ChangeLog
index 1265f399..4c7164e5 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,7 @@
+2022-10-20  Mark Wielaard  <m...@klomp.org>
+
+	* elfutils.spec.in: Escape % in comments.
+
 2022-08-17  Martin Liska  <mli...@suse.cz>
 
 	* debuginfod.service: Add new debuginfod.sysconfig
diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in
index 54599159..3282de26 100644
--- a/config/elfutils.spec.in
+++ b/config/elfutils.spec.in
@@ -263,18 +263,18 @@ fi
 %dir %{_includedir}/elfutils
 %{_includedir}/elfutils/elf-knowledge.h
 %{_includedir}/elfutils/known-dwarf.h
-#%{_includedir}/elfutils/libasm.h
+#%%{_includedir}/elfutils/libasm.h
 %{_includedir}/elfutils/libdw.h
 %{_includedir}/elfutils/libdwfl.h
 %{_includedir}/elfutils/libdwelf.h
 %{_includedir}/elfutils/version.h
-#%{_libdir}/libasm.so
+#%%{_libdir}/libasm.so
 %{_libdir}/libdw.so
 %{_libdir}/pkgconfig/libdw.pc
 
 %files devel-static
 %{_libdir}/libdw.a
-#%{_libdir}/libasm.a
+#%%{_libdir}/libasm.a
 
 %files libelf
 %license COPYING-GPLV2 COPYING-LGPLV3
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 0ea1df3d..31f4d0e4 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,12 @@
+2022-09-20  Yonggang Luo  <luoyongg...@gmail.com>
+
+	* Makefile.am (EXTRA_DIST): Remove debuginfod-rpms/hello2.spec.
+	Add debuginfod-rpms/hello{2,3}.specfile.
+	* tests/debuginfod-rpms/hello2.spec.: Renamed to...
+	* tests/debuginfod-rpms/hello2.specfile: ...this.
+	* tests/debuginfod-rpms/hello3.spec.: Renamed to...
+	* tests/debuginfod-rpms/hello3.specfile: ...this.
+
 2022-10-16  Mark Wielaard  <m...@klomp.org>
 
 	* dwfl-report-offline-memory.c: Include config.h first.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f680d3e1..ced4a826 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -566,7 +566,8 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \
 	     debuginfod-rpms/fedora31/hello3-debugsource-1.0-2.x86_64.rpm \
 	     debuginfod-rpms/fedora31/hello3-two-1.0-2.x86_64.rpm \
 	     debuginfod-rpms/fedora31/hello3-two-debuginfo-1.0-2.x86_64.rpm \
-	     debuginfod-rpms/hello2.spec. \
+	     debuginfod-rpms/hello2.specfile \
+	     debuginfod-rpms/hello3.specfile \
 	     debuginfod-rpms/rhel6/hello2-1.0-2.i686.rpm \
 	     debuginfod-rpms/rhel6/hello2-1.0-2.src.rpm \
 	     debuginfod-rpms/rhel6/hello2-debuginfo-1.0-2.i686.rpm \
diff --git a/tests/debuginfod-rpms/hello2.spec. b/tests/debuginfod-rpms/hello2.specfile
similarity index 100%
rename from tests/debuginfod-rpms/hello2.spec.
rename to tests/debuginfod-rpms/hello2.specfile
diff --git a/tests/debuginfod-rpms/hello3.spec. b/tests/debuginfod-rpms/hello3.specfile
similarity index 100%
rename from tests/debuginfod-rpms/hello3.spec.
rename to tests/debuginfod-rpms/hello3.specfile
-- 
2.18.4

Reply via email to