Bug 1952329 - Review Request: src - Simple Revision Control
Summary: Review Request: src - Simple Revision Control
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-22 04:50 UTC by Bob Hepple
Modified: 2021-05-14 21:11 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-05-14 17:49:33 UTC
Type: ---
Embargoed:
code: fedora-review+


Attachments (Terms of Use)
Backported patch referenced in review feedback (776 bytes, patch)
2021-04-29 16:51 UTC, Ben Beasley
no flags Details | Diff

Description Bob Hepple 2021-04-22 04:50:12 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/wef/src/fedora-rawhide-x86_64/02144706-src/src.spec

SRPM URL: https://download.copr.fedorainfracloud.org/results/wef/src/fedora-rawhide-x86_64/02144706-src/src-1.28-1.fc35.src.rpm

Description: 

Simple Revision Control is RCS reloaded with a modern UI, designed to
manage single-file solo projects kept more than one to a directory.
Has a modern, svn/hg/git-like UI

Fedora Account System Username: wef

Comment 1 Ben Beasley 2021-04-29 16:50:16 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

===== ISSUES =====

- Should have

    Requires:       git-core

  for “git config --get …” in fast_export_method() and “git rev-parse HEAD” in
  version_method().

- Instead of src-prefix.patch, just change

    %make_install

  to

    %make_install prefix=%{_prefix}

- Instead of src-python-version.patch, just add

    %py3_shebang_fix src

  to %prep after %autosetup. See
  https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_macros.

- Change

    Requires:      python3 >= 3.3

  to

    Requires:      python3

  because
  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_package_dependencies
  says:

    Versioned dependencies (build-time or runtime) SHOULD ONLY be used when
    actually necessary to guarantee that the proper version of a package is
    present. If a versioned dependency would be satisfied by a version present
    in three previous Fedora releases then the then a versioned dependency is
    not needed and a regular unversioned dependency SHOULD be used instead.

- I don’t see any good reason not to run the tests. See
  https://docs.fedoraproject.org/en-US/packaging-guidelines/#_test_suites.

  Add:

    BuildRequires:  rcs
    BuildRequires:  git-core

  and:

    # Redirecting and capturing stderr keeps the test script from detecting the
    # terminal size, which affects the output and can cause failures.
    result="$(./srctest -b rcs -p %{python3} 2>&1)"
    echo "${result}"

  Note that upstream also runs the tests with the scss backend, which will not
  be available, and with Python 2, which will not be supported; so you must run
  the srctest script manually rather than relying on “make check”.

  Capturing the output first and then echoing it rather than, say, piping
  through cat ensures that test failues will still stop the build, while still
  preventing the test process from detecting the terminal dimensions.

  Next, to fix the failing “fast-export roundtrip” test, backport upstream
  commit 1bbebb4a34a4d76a769fe4d70ed735af599add71, like:

    # Backport upstream commit 1bbebb4a34a4d76a769fe4d70ed735af599add71:
    #
    # Stop issuing branch-tip resets when fast-exporting.
    # 
    # At some point git-fast-export stopped issuing branch-tip resets.
    # Synchronize with it.
    #
    # Fixes test failure:
    #  --- Expected
    #  +++ Actual
    #  @@ -45,6 +45,3 @@
    #   from :4
    #   M 100644 :5 testfile1
    #  
    #  -reset refs/heads/master
    #  -from :6
    #  -
    #  srctest (/usr/bin/python3 rcs): fast-export roundtrip: filename failed'
    Patch0:         src-1.28-backport-1bbebb4a.patch

  You can easily make this patch yourself but I will upload mine for convenience.

  Now we get:

    srctest (/usr/bin/python3 rcs): author date from RFC 822 header succeeded
    src: execution of '\''git config --get user.name'\'' failed: Command '\''git config --get user.name'\'' returned non-zero exit status 1.
    1,2d0
    < author Eric Sunshine <sunshine> 1509732768 -0500
    < committer Roy G. Biv <spectrum> 1511228715 +0000
    srctest (/usr/bin/python3 rcs): fast-export: consult RFC 822 headers failed'
    error: Bad exit status from /var/tmp/rpm-tmp.xBsqsA (%check)

  which is because the tests implicitly expect git author information to be
  configured. Since we don’t want to mess with the real user’s home-directory
  files in the RPM scripts, we can use environment variables to work around
  this; see https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables.

    %check
    # We must provide a valid git user configuration for the tests to pass.
    mkdir git-home
    cat > git-home/.gitconfig <<'EOF'
    [user]  
            name = Bogus Example
            email = bogus
    EOF
    # Redirecting and capturing stderr keeps the test script from detecting the
    # terminal size, which affects the output and can cause failures.
    result="$(HOME="${PWD}/git-home" ./srctest -b rcs -p %{python3} -t 2>&1)"
    echo "${result}"

  Voilà, working tests.

===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "BSD 2-clause "Simplified" License", "Unknown or generated". 12
     files have unknown license. Detailed output of licensecheck in
     /home/reviewer/1952329-src/licensecheck.txt
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[!]: Requires correct, justified where necessary.

     Should have

       Requires: git-core

     for “git config --get …” in fast_export_method() and “git rev-parse HEAD”
     in version_method().

[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 51200 bytes in 3 files.
[x]: Package complies to the Packaging Guidelines

     (except as otherwise noted)

[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[!]: Final provides and requires are sane (see attachments).

     See previous comment regarding git-core.

[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[!]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.

     See issues; existing patches can be replaced with simple spec file
     additions that do not require separate justification.

[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[!]: %check is present and all tests pass.

     Let’s fix this.

[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: src-1.28-1.fc35.noarch.rpm
          src-1.28-1.fc35.src.rpm
src.noarch: W: spelling-error %description -l en_US svn -> sen, sin, son
src.noarch: W: spelling-error %description -l en_US hg -> Hg, jg, hf
src.src: W: spelling-error %description -l en_US svn -> sen, sin, son
src.src: W: spelling-error %description -l en_US hg -> Hg, jg, hf
2 packages and 0 specfiles checked; 0 errors, 4 warnings.




Rpmlint (installed packages)
----------------------------
src.noarch: W: spelling-error %description -l en_US svn -> sen, sin, son
src.noarch: W: spelling-error %description -l en_US hg -> Hg, jg, hf
1 packages and 0 specfiles checked; 0 errors, 2 warnings.



Source checksums
----------------
https://gitlab.com/esr/src/-/archive/1.28/src-1.28.tar.bz2 :
  CHECKSUM(SHA256) this package     : e0517114393662f6efdc7ede27328c198730062434a42dede38b6347a36e440c
  CHECKSUM(SHA256) upstream package : e0517114393662f6efdc7ede27328c198730062434a42dede38b6347a36e440c


Requires
--------
src (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python3
    rcs



Provides
--------
src:
    src



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1952329
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic
Disabled plugins: PHP, Perl, Ruby, SugarActivity, Ocaml, Haskell, R, fonts, Python, Java, C/C++
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 2 Ben Beasley 2021-04-29 16:51:12 UTC
Created attachment 1777228 [details]
Backported patch referenced in review feedback

Comment 3 Ben Beasley 2021-04-29 16:54:02 UTC
> result="$(HOME="${PWD}/git-home" ./srctest -b rcs -p %{python3} -t 2>&1)"

Oops; I had added “-t” for debugging, which uses a hard-coded /tmp/srctest directory that it does not clean up. I don’t think you should use “-t” in the real spec file.

Comment 4 Bob Hepple 2021-05-02 07:43:04 UTC
Hi Ben,

Firstly thanks for the detailed review, much appreciated.

Secondly, apologies for the delay - I've had surgery etc but that's another story.

I hope to get back to it this coming week, in the meantime a question about 'Requires: git-core'

git is not needed for most core operations in 'src', just for the fairly exotic git import and export operations. If git is not installed, we get the error message:

$ src fast-export tamborine.org 
/bin/sh: git: command not found
src: execution of 'git config --get user.name' failed: Command 'git config --get user.name' returned non-zero exit status 127.

... the remedy for which is pretty clear.

Would this be a case for a hint such as 'Suggests: git-core' instead?

Comment 5 Ben Beasley 2021-05-02 11:16:04 UTC
> Secondly, apologies for the delay - I've had surgery etc but that's another story.

I’m not in a hurry! :-) Best wishes on your recovery.

> git is not needed for most core operations in 'src', just for the fairly exotic git import and export operations. […] Would this be a case for a hint such as 'Suggests: git-core' instead?

If the parts that use git are not essential functionality, and it degrades gracefully, as you noted, then I think it would be a good fit for a weak dependency (Recommends:). That way git-core is installed by default but people wanting minimal installations can use “dnf --setopt=install_weak_deps=False” to avoid it. Fedora suggests weak dependencies for, e.g., “Plug-ins or add-ons (Support for file formats, Support for protocols, …)” (https://docs.fedoraproject.org/en-US/packaging-guidelines/WeakDependencies/#_weak_dependencies), which is pretty close to this case.

Looking at https://docs.fedoraproject.org/en-US/packaging-guidelines/WeakDependencies/#_hints, it’s not clear if Fedora exactly forbids using a hint here (is this part of “the main use cases of a package”)? But in practice a hint does very little for users. I think a weak dependency is more useful and more consistent with how weak dependencies and hints are used in the rest of the distribution.

Comment 7 Ben Beasley 2021-05-04 13:10:53 UTC
Looks great! Package approved.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "BSD 2-clause "Simplified" License", "Unknown or generated". 12
     files have unknown license. Detailed output of licensecheck in
     /home/reviewer/1952329-src/re-review/1952329-src/licensecheck.txt
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 51200 bytes in 3 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: src-1.28-2.fc35.noarch.rpm
          src-1.28-2.fc35.src.rpm
src.noarch: W: spelling-error %description -l en_US svn -> sen, sin, son
src.noarch: W: spelling-error %description -l en_US hg -> Hg, jg, hf
src.src: W: spelling-error %description -l en_US svn -> sen, sin, son
src.src: W: spelling-error %description -l en_US hg -> Hg, jg, hf
2 packages and 0 specfiles checked; 0 errors, 4 warnings.




Rpmlint (installed packages)
----------------------------
src.noarch: W: spelling-error %description -l en_US svn -> sen, sin, son
src.noarch: W: spelling-error %description -l en_US hg -> Hg, jg, hf
1 packages and 0 specfiles checked; 0 errors, 2 warnings.



Source checksums
----------------
https://gitlab.com/esr/src/-/archive/1.28/src-1.28.tar.bz2 :
  CHECKSUM(SHA256) this package     : e0517114393662f6efdc7ede27328c198730062434a42dede38b6347a36e440c
  CHECKSUM(SHA256) upstream package : e0517114393662f6efdc7ede27328c198730062434a42dede38b6347a36e440c


Requires
--------
src (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python3
    rcs



Provides
--------
src:
    src



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1952329
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: fonts, C/C++, Haskell, Java, SugarActivity, PHP, Perl, Ruby, Ocaml, Python, R
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 8 Tomas Hrcka 2021-05-05 08:52:34 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/src

Comment 9 Fedora Update System 2021-05-06 09:12:47 UTC
FEDORA-2021-a80b22ad6b has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a80b22ad6b

Comment 10 Fedora Update System 2021-05-06 10:12:04 UTC
FEDORA-2021-5ffe2d0f40 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-5ffe2d0f40

Comment 11 Fedora Update System 2021-05-07 02:07:28 UTC
FEDORA-2021-5ffe2d0f40 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-5ffe2d0f40 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-5ffe2d0f40

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2021-05-07 02:14:21 UTC
FEDORA-2021-a80b22ad6b has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2021-a80b22ad6b \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a80b22ad6b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2021-05-14 17:49:33 UTC
FEDORA-2021-5ffe2d0f40 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2021-05-14 21:11:52 UTC
FEDORA-2021-a80b22ad6b has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.