[1/7] Rename 'hello2.spec.' -> 'hello2.spec' 'hello3.spec.' -> 'hello3.spec'

Message ID 20220920084307.1696-2-luoyonggang@gmail.com
State Superseded
Headers
Series Enable building libelf of elfutils on win32 |

Commit Message

Yonggang Luo Sept. 20, 2022, 8:43 a.m. UTC
  These filenames are invalid on win32

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 tests/Makefile.am                                   | 2 +-
 tests/debuginfod-rpms/{hello2.spec. => hello2.spec} | 0
 tests/debuginfod-rpms/{hello3.spec. => hello3.spec} | 0
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename tests/debuginfod-rpms/{hello2.spec. => hello2.spec} (100%)
 rename tests/debuginfod-rpms/{hello3.spec. => hello3.spec} (100%)
  

Comments

Mark Wielaard Oct. 14, 2022, 8:35 p.m. UTC | #1
Hi,

On Tue, Sep 20, 2022 at 04:43:01PM +0800, Yonggang Luo via Elfutils-devel wrote:
> These filenames are invalid on win32

This looks ok to me, but I don't really know why these files were
named this way in the first place.

The files themselves are not directly used, they are there to recreate
the hello3*rpm test files.

Frank, would you mind if these are just renamed to normal *.spec?

Thanks,

Mark

> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  tests/Makefile.am                                   | 2 +-
>  tests/debuginfod-rpms/{hello2.spec. => hello2.spec} | 0
>  tests/debuginfod-rpms/{hello3.spec. => hello3.spec} | 0
>  3 files changed, 1 insertion(+), 1 deletion(-)
>  rename tests/debuginfod-rpms/{hello2.spec. => hello2.spec} (100%)
>  rename tests/debuginfod-rpms/{hello3.spec. => hello3.spec} (100%)
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 85514898..fc2235f4 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -563,7 +563,7 @@ 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.spec \
>  	     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.spec
> similarity index 100%
> rename from tests/debuginfod-rpms/hello2.spec.
> rename to tests/debuginfod-rpms/hello2.spec
> diff --git a/tests/debuginfod-rpms/hello3.spec. b/tests/debuginfod-rpms/hello3.spec
> similarity index 100%
> rename from tests/debuginfod-rpms/hello3.spec.
> rename to tests/debuginfod-rpms/hello3.spec
> -- 
> 2.36.1.windows.1
>
  
lilydjwg--- via Elfutils-devel Oct. 19, 2022, 6:45 p.m. UTC | #2
I really want this to be merged :) ping Frank,
as this would stop me clone elfutils on windows

On Sat, Oct 15, 2022 at 4:35 AM Mark Wielaard <mark@klomp.org> wrote:
>
> Hi,
>
> On Tue, Sep 20, 2022 at 04:43:01PM +0800, Yonggang Luo via Elfutils-devel
wrote:
> > These filenames are invalid on win32
>
> This looks ok to me, but I don't really know why these files were
> named this way in the first place.
>
> The files themselves are not directly used, they are there to recreate
> the hello3*rpm test files.
>
> Frank, would you mind if these are just renamed to normal *.spec?
>
> Thanks,
>
> Mark
>
> > Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> > ---
> >  tests/Makefile.am                                   | 2 +-
> >  tests/debuginfod-rpms/{hello2.spec. => hello2.spec} | 0
> >  tests/debuginfod-rpms/{hello3.spec. => hello3.spec} | 0
> >  3 files changed, 1 insertion(+), 1 deletion(-)
> >  rename tests/debuginfod-rpms/{hello2.spec. => hello2.spec} (100%)
> >  rename tests/debuginfod-rpms/{hello3.spec. => hello3.spec} (100%)
> >
> > diff --git a/tests/Makefile.am b/tests/Makefile.am
> > index 85514898..fc2235f4 100644
> > --- a/tests/Makefile.am
> > +++ b/tests/Makefile.am
> > @@ -563,7 +563,7 @@ 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.spec \
> >            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.spec
> > similarity index 100%
> > rename from tests/debuginfod-rpms/hello2.spec.
> > rename to tests/debuginfod-rpms/hello2.spec
> > diff --git a/tests/debuginfod-rpms/hello3.spec.
b/tests/debuginfod-rpms/hello3.spec
> > similarity index 100%
> > rename from tests/debuginfod-rpms/hello3.spec.
> > rename to tests/debuginfod-rpms/hello3.spec
> > --
> > 2.36.1.windows.1
> >



--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
  
Frank Ch. Eigler Oct. 19, 2022, 7:49 p.m. UTC | #3
Hi -

> 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.  But I don't understand the problem - my windows machines have
no problem with files named "hello2.spec2." with two periods.

- FChE
  
lilydjwg--- via Elfutils-devel Oct. 19, 2022, 9:23 p.m. UTC | #4
On Thu, Oct 20, 2022 at 3:49 AM Frank Ch. Eigler <fche@redhat.com> wrote:
>
> Hi -
>
> > 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.  But I don't understand the problem - my windows machines have
> no problem with files named "hello2.spec2." with two periods.
>
Hi, Frank, `git clone` can not checkout the file, I didn't know why

> - FChE
>


--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
  
lilydjwg--- via Elfutils-devel Oct. 19, 2022, 9:27 p.m. UTC | #5
> If it doesn't break "make rpm" (or at least rpm -ts elfutils*.tar.bz2),
> it's fine.  But I don't understand the problem - my windows machines have
> no problem with files named "hello2.spec2." with two periods.
>
> - FChE

This is the error log:
```
C:\Users\lygstate>cd /d C:\work\xemu\elfutils

C:\work\xemu\elfutils>git reset --hard
4cc429d2761846967678fb8cf5868d311d1f7862
error: invalid path 'tests/debuginfod-rpms/hello2.spec.'
fatal: Could not reset index file to revision
'4cc429d2761846967678fb8cf5868d311d1f7862'.

C:\work\xemu\elfutils>
```



--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
  
Mark Wielaard Oct. 20, 2022, 4:07 p.m. UTC | #6
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
  
Frank Ch. Eigler Oct. 21, 2022, 3:45 p.m. UTC | #7
Hi -

> C:\work\xemu\elfutils>git reset --hard
> 4cc429d2761846967678fb8cf5868d311d1f7862
> error: invalid path 'tests/debuginfod-rpms/hello2.spec.'
> fatal: Could not reset index file to revision
> '4cc429d2761846967678fb8cf5868d311d1f7862'.

Sounds like a git-induced problem.  Maybe try a different git client?

- FChE
  
Mark Wielaard Oct. 31, 2022, 1:29 p.m. UTC | #8
Hi,

On Thu, 2022-10-20 at 18:07 +0200, Mark Wielaard wrote:
> 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?

I pushed this. Please let me know if it works for you.

Thanks,

Mark
  
lilydjwg--- via Elfutils-devel Nov. 24, 2022, 8:27 a.m. UTC | #9
Thanks, works fine

On Mon, Oct 31, 2022 at 9:29 PM Mark Wielaard <aegon@wildebeest.org> wrote:
>
> Hi,
>
> On Thu, 2022-10-20 at 18:07 +0200, Mark Wielaard wrote:
> > 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?
>
> I pushed this. Please let me know if it works for you.
>
> Thanks,
>
> Mark



--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo
  

Patch

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 85514898..fc2235f4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -563,7 +563,7 @@  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.spec \
 	     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.spec
similarity index 100%
rename from tests/debuginfod-rpms/hello2.spec.
rename to tests/debuginfod-rpms/hello2.spec
diff --git a/tests/debuginfod-rpms/hello3.spec. b/tests/debuginfod-rpms/hello3.spec
similarity index 100%
rename from tests/debuginfod-rpms/hello3.spec.
rename to tests/debuginfod-rpms/hello3.spec