public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* [PATCH 0/2] Two further fixes for Fedora's spec file issues
@ 2022-09-02 15:38 Stefano Brivio
  2022-09-02 15:38 ` [PATCH 1/2] fedora: Add %dir entries for own SELinux policy directory and documentation Stefano Brivio
  2022-09-02 15:38 ` [PATCH 2/2] fedora: Add selinux-policy Requires: tag Stefano Brivio
  0 siblings, 2 replies; 8+ messages in thread
From: Stefano Brivio @ 2022-09-02 15:38 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

...both reported by Daniel.

Stefano Brivio (2):
  fedora: Add %dir entries for own SELinux policy directory and
    documentation
  fedora: Add selinux-policy Requires: tag

 contrib/fedora/passt.spec | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] fedora: Add %dir entries for own SELinux policy directory and documentation
  2022-09-02 15:38 [PATCH 0/2] Two further fixes for Fedora's spec file issues Stefano Brivio
@ 2022-09-02 15:38 ` Stefano Brivio
  2022-09-02 15:42   ` Daniel P. Berrangé
  2022-09-02 15:38 ` [PATCH 2/2] fedora: Add selinux-policy Requires: tag Stefano Brivio
  1 sibling, 1 reply; 8+ messages in thread
From: Stefano Brivio @ 2022-09-02 15:38 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1328 bytes --]

fedora-review says:

  Note: No known owner of /usr/share/selinux/packages/passt,
  /usr/share/doc/passt

Reported-by: Daniel P. Berrangé <berrange(a)redhat.com>
Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
---
 contrib/fedora/passt.spec | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/contrib/fedora/passt.spec b/contrib/fedora/passt.spec
index 922f584..1e328e2 100644
--- a/contrib/fedora/passt.spec
+++ b/contrib/fedora/passt.spec
@@ -49,7 +49,7 @@ This package adds SELinux enforcement to passt(1) and pasta(1).
 %make_build
 
 %install
-%make_install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_bindir} mandir=%{_mandir} docdir=%{_docdir}/passt
+%make_install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_bindir} mandir=%{_mandir} docdir=%{_docdir}/%{name}
 %ifarch x86_64
 ln -sr %{buildroot}%{_mandir}/man1/passt.1 %{buildroot}%{_mandir}/man1/passt.avx2.1
 ln -sr %{buildroot}%{_mandir}/man1/pasta.1 %{buildroot}%{_mandir}/man1/pasta.avx2.1
@@ -70,6 +70,8 @@ semodule -r passt 2>/dev/null || :
 semodule -r pasta 2>/dev/null || :
 
 %files
+%dir %{_datadir}/selinux/packages/%{name}
+%dir %{_docdir}/%{name}
 %license LICENSES/{AGPL-3.0-or-later.txt,BSD-3-Clause.txt}
 %doc %{_docdir}/passt/README.md
 %doc %{_docdir}/passt/demo.sh
-- 
@@ -49,7 +49,7 @@ This package adds SELinux enforcement to passt(1) and pasta(1).
 %make_build
 
 %install
-%make_install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_bindir} mandir=%{_mandir} docdir=%{_docdir}/passt
+%make_install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_bindir} mandir=%{_mandir} docdir=%{_docdir}/%{name}
 %ifarch x86_64
 ln -sr %{buildroot}%{_mandir}/man1/passt.1 %{buildroot}%{_mandir}/man1/passt.avx2.1
 ln -sr %{buildroot}%{_mandir}/man1/pasta.1 %{buildroot}%{_mandir}/man1/pasta.avx2.1
@@ -70,6 +70,8 @@ semodule -r passt 2>/dev/null || :
 semodule -r pasta 2>/dev/null || :
 
 %files
+%dir %{_datadir}/selinux/packages/%{name}
+%dir %{_docdir}/%{name}
 %license LICENSES/{AGPL-3.0-or-later.txt,BSD-3-Clause.txt}
 %doc %{_docdir}/passt/README.md
 %doc %{_docdir}/passt/demo.sh
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] fedora: Add selinux-policy Requires: tag
  2022-09-02 15:38 [PATCH 0/2] Two further fixes for Fedora's spec file issues Stefano Brivio
  2022-09-02 15:38 ` [PATCH 1/2] fedora: Add %dir entries for own SELinux policy directory and documentation Stefano Brivio
@ 2022-09-02 15:38 ` Stefano Brivio
  2022-09-02 15:43   ` Daniel P. Berrangé
  1 sibling, 1 reply; 8+ messages in thread
From: Stefano Brivio @ 2022-09-02 15:38 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]

fedora-review says:

  Note: Directories without known owners:
  /usr/share/selinux/packages/passt, /usr/share/doc/passt,
  /usr/share/selinux, /usr/share/selinux/packages

and selinux-policy owns those two last ones.

Reported-by: Daniel P. Berrangé <berrange(a)redhat.com>
Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
---
 contrib/fedora/passt.spec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/fedora/passt.spec b/contrib/fedora/passt.spec
index 1e328e2..f9fd0ab 100644
--- a/contrib/fedora/passt.spec
+++ b/contrib/fedora/passt.spec
@@ -34,7 +34,7 @@ requiring any capabilities or privileges.
 %package    selinux
 BuildArch:  noarch
 Summary:    SELinux support for passt and pasta
-Requires:   %{name} = %{version}-%{release}
+Requires:   selinux-policy, %{name} = %{version}-%{release}
 Requires(post): policycoreutils, %{name}
 Requires(preun): policycoreutils, %{name}
 
-- 
@@ -34,7 +34,7 @@ requiring any capabilities or privileges.
 %package    selinux
 BuildArch:  noarch
 Summary:    SELinux support for passt and pasta
-Requires:   %{name} = %{version}-%{release}
+Requires:   selinux-policy, %{name} = %{version}-%{release}
 Requires(post): policycoreutils, %{name}
 Requires(preun): policycoreutils, %{name}
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] fedora: Add %dir entries for own SELinux policy directory and documentation
  2022-09-02 15:38 ` [PATCH 1/2] fedora: Add %dir entries for own SELinux policy directory and documentation Stefano Brivio
@ 2022-09-02 15:42   ` Daniel P. Berrangé
  2022-09-02 15:58     ` Stefano Brivio
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel P. Berrangé @ 2022-09-02 15:42 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1932 bytes --]

On Fri, Sep 02, 2022 at 05:38:41PM +0200, Stefano Brivio wrote:
> fedora-review says:
> 
>   Note: No known owner of /usr/share/selinux/packages/passt,
>   /usr/share/doc/passt
> 
> Reported-by: Daniel P. Berrangé <berrange(a)redhat.com>
> Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
> ---
>  contrib/fedora/passt.spec | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/contrib/fedora/passt.spec b/contrib/fedora/passt.spec
> index 922f584..1e328e2 100644
> --- a/contrib/fedora/passt.spec
> +++ b/contrib/fedora/passt.spec
> @@ -49,7 +49,7 @@ This package adds SELinux enforcement to passt(1) and pasta(1).
>  %make_build
>  
>  %install
> -%make_install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_bindir} mandir=%{_mandir} docdir=%{_docdir}/passt
> +%make_install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_bindir} mandir=%{_mandir} docdir=%{_docdir}/%{name}
>  %ifarch x86_64
>  ln -sr %{buildroot}%{_mandir}/man1/passt.1 %{buildroot}%{_mandir}/man1/passt.avx2.1
>  ln -sr %{buildroot}%{_mandir}/man1/pasta.1 %{buildroot}%{_mandir}/man1/pasta.avx2.1
> @@ -70,6 +70,8 @@ semodule -r passt 2>/dev/null || :
>  semodule -r pasta 2>/dev/null || :
>  
>  %files
> +%dir %{_datadir}/selinux/packages/%{name}

This needs to be in the -selinux package %files list

> +%dir %{_docdir}/%{name}

If you're going to use %{name} here...

>  %license LICENSES/{AGPL-3.0-or-later.txt,BSD-3-Clause.txt}

I'd suggest keeping this as the first item in %files

>  %doc %{_docdir}/passt/README.md
>  %doc %{_docdir}/passt/demo.sh

..then be consistent here too

> -- 
> 2.35.1
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] fedora: Add selinux-policy Requires: tag
  2022-09-02 15:38 ` [PATCH 2/2] fedora: Add selinux-policy Requires: tag Stefano Brivio
@ 2022-09-02 15:43   ` Daniel P. Berrangé
  2022-09-02 15:47     ` Stefano Brivio
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel P. Berrangé @ 2022-09-02 15:43 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]

On Fri, Sep 02, 2022 at 05:38:42PM +0200, Stefano Brivio wrote:
> fedora-review says:
> 
>   Note: Directories without known owners:
>   /usr/share/selinux/packages/passt, /usr/share/doc/passt,
>   /usr/share/selinux, /usr/share/selinux/packages
> 
> and selinux-policy owns those two last ones.
> 
> Reported-by: Daniel P. Berrangé <berrange(a)redhat.com>
> Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
> ---
>  contrib/fedora/passt.spec | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/contrib/fedora/passt.spec b/contrib/fedora/passt.spec
> index 1e328e2..f9fd0ab 100644
> --- a/contrib/fedora/passt.spec
> +++ b/contrib/fedora/passt.spec
> @@ -34,7 +34,7 @@ requiring any capabilities or privileges.
>  %package    selinux
>  BuildArch:  noarch
>  Summary:    SELinux support for passt and pasta
> -Requires:   %{name} = %{version}-%{release}
> +Requires:   selinux-policy, %{name} = %{version}-%{release}

It isn't a requirement, but my preference would be separate Requires
line for each dep, as it makes the spec more readable.

>  Requires(post): policycoreutils, %{name}
>  Requires(preun): policycoreutils, %{name}


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] fedora: Add selinux-policy Requires: tag
  2022-09-02 15:43   ` Daniel P. Berrangé
@ 2022-09-02 15:47     ` Stefano Brivio
  2022-09-02 15:51       ` Daniel P. Berrangé
  0 siblings, 1 reply; 8+ messages in thread
From: Stefano Brivio @ 2022-09-02 15:47 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]

On Fri, 2 Sep 2022 16:43:39 +0100
Daniel P. Berrangé <berrange(a)redhat.com> wrote:

> On Fri, Sep 02, 2022 at 05:38:42PM +0200, Stefano Brivio wrote:
> > fedora-review says:
> > 
> >   Note: Directories without known owners:
> >   /usr/share/selinux/packages/passt, /usr/share/doc/passt,
> >   /usr/share/selinux, /usr/share/selinux/packages
> > 
> > and selinux-policy owns those two last ones.
> > 
> > Reported-by: Daniel P. Berrangé <berrange(a)redhat.com>
> > Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
> > ---
> >  contrib/fedora/passt.spec | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/contrib/fedora/passt.spec b/contrib/fedora/passt.spec
> > index 1e328e2..f9fd0ab 100644
> > --- a/contrib/fedora/passt.spec
> > +++ b/contrib/fedora/passt.spec
> > @@ -34,7 +34,7 @@ requiring any capabilities or privileges.
> >  %package    selinux
> >  BuildArch:  noarch
> >  Summary:    SELinux support for passt and pasta
> > -Requires:   %{name} = %{version}-%{release}
> > +Requires:   selinux-policy, %{name} = %{version}-%{release}  
> 
> It isn't a requirement, but my preference would be separate Requires
> line for each dep, as it makes the spec more readable.
> 
> >  Requires(post): policycoreutils, %{name}
> >  Requires(preun): policycoreutils, %{name}  

...for consistency, should I then change these two (post, preun) as
well? It starts looking a bit "long" though. Or are those special
somehow?

-- 
Stefano


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] fedora: Add selinux-policy Requires: tag
  2022-09-02 15:47     ` Stefano Brivio
@ 2022-09-02 15:51       ` Daniel P. Berrangé
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel P. Berrangé @ 2022-09-02 15:51 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 2119 bytes --]

On Fri, Sep 02, 2022 at 05:47:34PM +0200, Stefano Brivio wrote:
> On Fri, 2 Sep 2022 16:43:39 +0100
> Daniel P. Berrangé <berrange(a)redhat.com> wrote:
> 
> > On Fri, Sep 02, 2022 at 05:38:42PM +0200, Stefano Brivio wrote:
> > > fedora-review says:
> > > 
> > >   Note: Directories without known owners:
> > >   /usr/share/selinux/packages/passt, /usr/share/doc/passt,
> > >   /usr/share/selinux, /usr/share/selinux/packages
> > > 
> > > and selinux-policy owns those two last ones.
> > > 
> > > Reported-by: Daniel P. Berrangé <berrange(a)redhat.com>
> > > Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
> > > ---
> > >  contrib/fedora/passt.spec | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/contrib/fedora/passt.spec b/contrib/fedora/passt.spec
> > > index 1e328e2..f9fd0ab 100644
> > > --- a/contrib/fedora/passt.spec
> > > +++ b/contrib/fedora/passt.spec
> > > @@ -34,7 +34,7 @@ requiring any capabilities or privileges.
> > >  %package    selinux
> > >  BuildArch:  noarch
> > >  Summary:    SELinux support for passt and pasta
> > > -Requires:   %{name} = %{version}-%{release}
> > > +Requires:   selinux-policy, %{name} = %{version}-%{release}  
> > 
> > It isn't a requirement, but my preference would be separate Requires
> > line for each dep, as it makes the spec more readable.
> > 
> > >  Requires(post): policycoreutils, %{name}
> > >  Requires(preun): policycoreutils, %{name}  
> 
> ...for consistency, should I then change these two (post, preun) as
> well? It starts looking a bit "long" though. Or are those special
> somehow?

I would split them yes. Length isn't really a concern - if anything,
the more packages you have in Requires, the more important it is to
split them each on one line, and even alphabetically sort them
(though I'd keep %{name} first if sorting as its special)


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] fedora: Add %dir entries for own SELinux policy directory and documentation
  2022-09-02 15:42   ` Daniel P. Berrangé
@ 2022-09-02 15:58     ` Stefano Brivio
  0 siblings, 0 replies; 8+ messages in thread
From: Stefano Brivio @ 2022-09-02 15:58 UTC (permalink / raw)
  To: passt-dev

[-- Attachment #1: Type: text/plain, Size: 1899 bytes --]

On Fri, 2 Sep 2022 16:42:41 +0100
Daniel P. Berrangé <berrange(a)redhat.com> wrote:

> On Fri, Sep 02, 2022 at 05:38:41PM +0200, Stefano Brivio wrote:
> > fedora-review says:
> > 
> >   Note: No known owner of /usr/share/selinux/packages/passt,
> >   /usr/share/doc/passt
> > 
> > Reported-by: Daniel P. Berrangé <berrange(a)redhat.com>
> > Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
> > ---
> >  contrib/fedora/passt.spec | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/contrib/fedora/passt.spec b/contrib/fedora/passt.spec
> > index 922f584..1e328e2 100644
> > --- a/contrib/fedora/passt.spec
> > +++ b/contrib/fedora/passt.spec
> > @@ -49,7 +49,7 @@ This package adds SELinux enforcement to passt(1) and pasta(1).
> >  %make_build
> >  
> >  %install
> > -%make_install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_bindir} mandir=%{_mandir} docdir=%{_docdir}/passt
> > +%make_install DESTDIR=%{buildroot} prefix=%{_prefix} bindir=%{_bindir} mandir=%{_mandir} docdir=%{_docdir}/%{name}
> >  %ifarch x86_64
> >  ln -sr %{buildroot}%{_mandir}/man1/passt.1 %{buildroot}%{_mandir}/man1/passt.avx2.1
> >  ln -sr %{buildroot}%{_mandir}/man1/pasta.1 %{buildroot}%{_mandir}/man1/pasta.avx2.1
> > @@ -70,6 +70,8 @@ semodule -r passt 2>/dev/null || :
> >  semodule -r pasta 2>/dev/null || :
> >  
> >  %files
> > +%dir %{_datadir}/selinux/packages/%{name}  
> 
> This needs to be in the -selinux package %files list

Oops, indeed.

> > +%dir %{_docdir}/%{name}  
> 
> If you're going to use %{name} here...
> 
> >  %license LICENSES/{AGPL-3.0-or-later.txt,BSD-3-Clause.txt}  
> 
> I'd suggest keeping this as the first item in %files

Moved it back.

> >  %doc %{_docdir}/passt/README.md
> >  %doc %{_docdir}/passt/demo.sh  
> 
> ..then be consistent here too

Right, I missed those.

-- 
Stefano


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-02 15:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02 15:38 [PATCH 0/2] Two further fixes for Fedora's spec file issues Stefano Brivio
2022-09-02 15:38 ` [PATCH 1/2] fedora: Add %dir entries for own SELinux policy directory and documentation Stefano Brivio
2022-09-02 15:42   ` Daniel P. Berrangé
2022-09-02 15:58     ` Stefano Brivio
2022-09-02 15:38 ` [PATCH 2/2] fedora: Add selinux-policy Requires: tag Stefano Brivio
2022-09-02 15:43   ` Daniel P. Berrangé
2022-09-02 15:47     ` Stefano Brivio
2022-09-02 15:51       ` Daniel P. Berrangé

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).