Bug 1721564

Summary: Review Request: rust-zincati - Update agent for Fedora CoreOS
Product: [Fedora] Fedora Reporter: Robert Fairley <rfairley>
Component: Package ReviewAssignee: Robert-André Mauchin 🐧 <eclipseo>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: eclipseo, jlebon, lucab, package-review, rfairley
Target Milestone: ---Flags: eclipseo: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-07 15:23:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robert Fairley 2019-06-18 14:49:31 UTC
Spec URL: https://rfairley.fedorapeople.org/package-review/rust-zincati.spec
SRPM URL: https://rfairley.fedorapeople.org/package-review/rust-zincati-0.0.1-1.fc31.src.rpm
Description: Update agent for Fedora CoreOS.
Fedora Account System Username: rfairley

Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=35615242

Comment 1 Robert Fairley 2019-06-18 14:52:35 UTC
This package will be present in Fedora 30 - most likely will need a module creating with a `rolling` branch following the latest release of the `zincati` crate.

Comment 2 Robert Fairley 2019-06-18 14:53:21 UTC
FCOS tracker ticket for context: https://github.com/coreos/fedora-coreos-tracker/issues/190

Comment 3 Robert-André Mauchin 🐧 2019-06-18 16:26:20 UTC
Don't you need to install the SystemD file too?


 - License ok
 - Latest version packaged
 - Builds in mock
 - No rpmlint errors
 - Conforms to Packaging Guidelines

Package approved.

Comment 4 Robert Fairley 2019-06-18 16:49:19 UTC
(In reply to Robert-André Mauchin from comment #3)
> Don't you need to install the SystemD file too?
> 

Right yes, adding this in, as well as the config files in https://github.com/coreos/zincati/tree/master/dist. Will update here.

Comment 5 Robert-André Mauchin 🐧 2019-06-18 18:02:49 UTC
In that case don't forget to add the SystemD scriptlet:

https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd

Comment 6 Robert Fairley 2019-06-19 15:19:30 UTC
Thanks for the review! I have updated the specfile and SRPM.

Updated specfile: https://rfairley.fedorapeople.org/package-review/rust-zincati-02/rust-zincati.spec
Updated SRPM: https://rfairley.fedorapeople.org/package-review/rust-zincati-02/rust-zincati-0.0.1-1.fc31.src.rpm

Diff of the specfile changes: https://gist.github.com/rfairley/9b46cca7c5cf00cda6560a670c3aeeaf
Updated Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=35633106

Also tested installation in an FCOS build - the `zincati` binary and the files are installed correctly.

rpmlint shows the following:

```
# rpmlint rust-zincati.spec 
rust-zincati.spec:38: E: hardcoded-library-path in %{_prefix}/lib/%{crate}/config.d
rust-zincati.spec:39: E: hardcoded-library-path in %{_prefix}/lib/%{crate}/config.d/50-fedora-coreos-cincinnati.toml
rust-zincati.spec:67: E: hardcoded-library-path in %{_prefix}/lib/%{crate}/config.d
cat: 50-zincati.conf: No such file or directory
0 packages and 1 specfiles checked; 3 errors, 0 warnings.
```

However `50-zincati.conf` is installed where it should:

```
$ rpm -qf /usr/lib/sysusers.d/50-zincati.conf 
zincati-0.0.1-1.fc31.x86_64
```

For the library paths, these must be under `/usr/lib/zincati/config.d` as `zincati` reads configs from there, and I didn't see a macro that enforces `/usr/lib` listed here [1], however can change it if there is one.

If this looks good, I can request an SCM repo.

[1] https://docs.fedoraproject.org/en-US/packaging-guidelines/RPMMacros/#_macros_for_paths_set_and_used_by_build_systems

Comment 7 Robert-André Mauchin 🐧 2019-06-19 16:40:13 UTC
%{__install}, %{__mkdir_p} are not useful macros, use install and mkdir -p. As a general rule any macro starting with two underscores are for rpm private use, not public use.

Comment 8 Robert Fairley 2019-06-19 20:28:03 UTC
(In reply to Robert-André Mauchin from comment #7)
> %{__install}, %{__mkdir_p} are not useful macros, use install and mkdir -p.
> As a general rule any macro starting with two underscores are for rpm
> private use, not public use.

Thanks, will keep this in mind for next time (just saw the fedora-devel thread on this from earlier).

I updated the specfile and SRPM:

New specfile: https://rfairley.fedorapeople.org/package-review/rust-zincati-03/rust-zincati.spec
New SRPM: https://rfairley.fedorapeople.org/package-review/rust-zincati-03/rust-zincati-0.0.1-1.fc31.src.rpm

Specfile diff: https://gist.github.com/rfairley/9b46cca7c5cf00cda6560a670c3aeeaf#gistcomment-2948589
Updated Kojo scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=35636349

Comment 9 Robert Fairley 2019-06-20 16:51:21 UTC
SCM repo request: https://pagure.io/releng/fedora-scm-requests/issue/12524

Comment 10 Gwyn Ciesla 2019-06-20 17:47:37 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/rust-zincati

Comment 11 Fedora Update System 2019-07-09 20:41:35 UTC
FEDORA-MODULAR-2019-74e36a7052 has been submitted as an update to Fedora 30 Modular. https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2019-74e36a7052

Comment 12 Fedora Update System 2019-07-10 02:16:42 UTC
zincati-rolling-3020190704205121.a23e773d has been pushed to the Fedora 30 Modular testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2019-74e36a7052

Comment 13 Fedora Update System 2019-07-11 01:55:52 UTC
zincati-rolling-3020190704205121.a23e773d has been pushed to the Fedora 30 Modular stable repository. If problems still persist, please make note of it in this bug report.