[Bug 1969450] Review Request: cockpit-certificates - Cockpit user interface for certificates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1969450



--- Comment #2 from Katerina Koukiou <kkoukiou@xxxxxxxxxx> ---
(In reply to Robert-André Mauchin 🐧 from comment #1)
>  - the git info version should only be in Releases not Version;
> 
> Version:        1.5
> 
>  - Where does the 1.5 come from?  I only see 1 in the tagged releases.

Fixed upstream with
https://github.com/skobyda/cockpit-certificates/pull/56/commits/93e2b4196f840bdc89e2a6ffc0c627f544f3c8b8

> 
>  - The Release tag is weird, it should be something like;
> 
> Release:        1.20210608gitgccba50c%{?dist}

This was just added by packit [1] because the build was generated from a PR,
not a real release

Release:     1%{?dist}

is the original:
https://github.com/skobyda/cockpit-certificates/blob/master/cockpit-certificates.spec.in#L3

> 
>  - This should either be a URL, or you should add a comment explaining how
> the tarball was generated;
> 
> Source0:        cockpit-certificates-1.5.gccba50c.tar.gz

I use packit [1] which creates a COPR build for each PR. To create the tarball
packit runs the command as specified in the configuration file here:
https://github.com/skobyda/cockpit-certificates/blob/master/packit.yml#L11

`make dist-gzip`

Running this command will generate the above tarball. 

The original cockpit-certificates.spec.in has the link to the github release
artifact as seen here:
https://github.com/skobyda/cockpit-certificates/blob/master/cockpit-certificates.spec.in#L8

[1] https://packit.dev/

> 
>  - You can't ship the js already minified, you must provide the unminified
> versions and then minify them in the build section
> 
> See
> https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/
> #_compilationminification
> 

That will not work. Building requires internet access, npm install, etc., which
is not allowed in package builds.
(note that we do the same in cockpit, cockpit-ostree, cockpit-podman,
cockpit-machines, see for example
https://src.fedoraproject.org/rpms/cockpit-machines/blob/rawhide/f/cockpit-machines.spec)

Also, keep in mind cockpit-* packages are not JS libs for other packages to
consume, rather JS apps.

>  - The license field should represent all the bundled JS too
> 
>  - BuildRequires:  libappstream-glib is included twice
> 

Fixed upstream:
https://github.com/skobyda/cockpit-certificates/pull/56/commits/b694e7562627474c6a39b3d75e120a9d28a717fa

> 
> Here is my spec proposal to address the minify issue:
> 
> =============================================================================
> =========
> %global commit          ebd19355d3dca00f49f2def2f2e573fc50db0d99
> %global shortcommit     %(c=%{commit}; echo ${c:0:7})
> %global snapshotdate    20210611
> 
> Name:           cockpit-certificates
> Version:        1.5
> Release:        1.%{snapshotdate}git%{shortcommit}%{?dist}
> Summary:        Cockpit user interface for certificates
> License:        0BSD and AFL and ASL 2.0 and BSD and CC0 and CC-BY and ISC
> and LGPLv2+ and MIT and Unlicense
> URL:            https://github.com/skobyda/cockpit-certificates
> 
> Source0:        %url/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
> Source1:        cockpit-lib.tar.gz
> Source2:        %{name}-%{version}-nm.tgz
> Source3:        %{name}-%{version}-bundled-licenses.txt
> Source10:       get-cockpit-lib.sh
> Source11:       packages-bundler.sh
> 
> BuildArch:      noarch
> BuildRequires:  libappstream-glib
> BuildRequires:  nodejs-devel
> BuildRequires:  sassc
> 
> Requires: cockpit-bridge
> Requires: certmonger
> 
> %description
> Cockpit component for managing certificates with certmonger.
> 
> %prep
> %setup -q -a 1 -n %{name}-%{commit}
> cp %{S:2} %{S:3} .
> 
> %build
> tar xfz %{SOURCE2}
> ./node_modules/.bin/webpack-cli
> 
> %install
> mkdir -p %{buildroot}%{_datadir}/cockpit/%{name}
> cp -a dist/* %{buildroot}%{_datadir}/cockpit/%{name}/
> mkdir -p %{buildroot}%{_metainfodir}
> cp -a org.cockpit-project.certificates.metainfo.xml
> %{buildroot}%{_metainfodir}/
> appstream-util validate-relax --nonet
> %{buildroot}%{_metainfodir}/org.cockpit-project.certificates.metainfo.xml
> 
> %files
> %doc README.md
> %license LICENSE %{name}-%{version}-bundled-licenses.txt
> %{_datadir}/cockpit/%{name}/
> %{_datadir}/metainfo/org.cockpit-project.certificates.metainfo.xml
> 
> # The changelog is automatically generated and merged
> %changelog
> =============================================================================
> =========
> 
> SPEC:
> https://eclipseo.fedorapeople.org/cockpit-certificates/cockpit-certificates.
> spec
> SRPM:
> https://eclipseo.fedorapeople.org/cockpit-certificates/cockpit-certificates-
> 1.5-1.20210611gitebd1935.fc35.src.rpm


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux