Spec URL: https://github.com/copart/restic-rpm/blob/master/SPECS/restic.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/copart/restic/fedora-27-x86_64/00765617-restic/restic-0.9.1-1.fc27.src.rpm Description: restic is a backup program that is fast, efficient and secure. Fedora Account System Username: copart copr: https://copr.fedorainfracloud.org/coprs/copart/restic/ koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=27596143 This is my first package and will NEED a SPONSOR. I have been maintaining this package in copr for a few months now. My package was written about twice in Fedora Mangizone. https://fedoramagazine.org/use-restic-encrypted-backups/ and https://fedoramagazine.org/4-cool-copr-february-2018/.
Successful koji build task: https://koji.fedoraproject.org/koji/taskinfo?taskID=27599755 I had to remove the ppc64 architecture due to go/golang incompatibility.
- Take a look at https://fedoraproject.org/wiki/More_Go_packaging to package Go apps - You need to unbundle vendor/ first, which implies packaging several libraries. Use gofed to help you (install and use the version from updates-testing if you're on F27). -Shouldn't be necessary: %define debug_package %{nil} - Don't do that: #Gzip man pages /usr/bin/gzip %{_builddir}/%{name}-%{version}/doc/man/* Compressing man pages is handled by the packaging process - Don't put .gz as the compression can change in the future: %{_mandir}/man1/restic*.* - Don't mark man pages as doc - Own the directories you create with %dir: %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/_restic %dir %{_datadir}/bash-completion/ %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/rest - Don't install doc that way, just use %doc directly with the files: %files devel -f devel.file-list %license LICENSE %doc GOVERNANCE.md CONTRIBUTING.md CHANGELOG.md README.rst - Don't install from %{_builddir}/%{name}-%{version}/ : when you are in %build or %install, you are in the folder where the archive has been extracted, so you have access directly to the files you wanna install. Here's a sample I've created based on the Gofed output. I have not tested it. # https://github.com/restic/restic %global goipath github.com/restic/restic Version: 0.9.1 %gometa Name: restic Release: 1%{?dist} Summary: Fast, secure, efficient backup program License: BSD URL: %{gourl} Source0: %{gosource} BuildRequires: golang(bazil.org/fuse) BuildRequires: golang(bazil.org/fuse/fs) BuildRequires: golang(github.com/Azure/azure-sdk-for-go/storage) BuildRequires: golang(github.com/cenkalti/backoff) BuildRequires: golang(github.com/elithrar/simple-scrypt) BuildRequires: golang(github.com/google/go-cmp/cmp) BuildRequires: golang(github.com/juju/ratelimit) BuildRequires: golang(github.com/kurin/blazer/b2) BuildRequires: golang(github.com/mattn/go-isatty) BuildRequires: golang(github.com/minio/minio-go) BuildRequires: golang(github.com/minio/minio-go/pkg/credentials) BuildRequires: golang(github.com/ncw/swift) BuildRequires: golang(github.com/pkg/errors) BuildRequires: golang(github.com/pkg/sftp) BuildRequires: golang(github.com/pkg/xattr) BuildRequires: golang(github.com/restic/chunker) BuildRequires: golang(golang.org/x/crypto/poly1305) BuildRequires: golang(golang.org/x/crypto/scrypt) BuildRequires: golang(golang.org/x/crypto/ssh/terminal) BuildRequires: golang(golang.org/x/net/context) BuildRequires: golang(golang.org/x/net/context/ctxhttp) BuildRequires: golang(golang.org/x/net/http2) BuildRequires: golang(golang.org/x/oauth2/google) BuildRequires: golang(golang.org/x/sync/errgroup) BuildRequires: golang(golang.org/x/sys/unix) BuildRequires: golang(golang.org/x/text/encoding/unicode) BuildRequires: golang(google.golang.org/api/googleapi) BuildRequires: golang(google.golang.org/api/storage/v1) BuildRequires: golang(gopkg.in/tomb.v2) %description %{summary} %prep %gosetup -q %build %gobuildroot %gobuild -o _bin/%{name} %{goipath} %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}%{_datarootdir}/zsh/site-functions mkdir -p %{buildroot}%{_datarootdir}/bash-completion/completions install -p -m 755 _bin/%{name} %{buildroot}%{_bindir} install -p -m 644 doc/man/* %{buildroot}%{_mandir}/man1/ #zsh completion install -p -m 644 doc/zsh-completion.zsh %{buildroot}%{_datarootdir}/zsh/site-functions/_restic #Bash completion install -p -m 644 doc/bash-completion.sh %{buildroot}%{_datarootdir}/bash-completion/completions/restic %check %gochecks %files devel -f devel.file-list %license LICENSE %doc GOVERNANCE.md CONTRIBUTING.md CHANGELOG.md README.rst %{_bindir}/%{name} %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/_restic %dir %{_datadir}/bash-completion/ %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/restic %{_mandir}/man1/restic*.* %changelog * Wed Jun 13 2018 Steve Miller <copart> - 0.9.1-1 - First package for Fedora - You can look at: https://eclipseo.fedorapeople.org/golang/ for more examples if you need help packaging the dependencies. Search on https://src.fedoraproject.org/ to see what dependencies are already packaged and which one are missing. I suggest trying to build all deps within your COPR and see if restic builds then. Don't hesitate to contact me for help on my email.
Also I'm not able to sponsor, try introducing yourself to the devel mailing list and do some informal reviews to show that you understand the guidelines
You don't have to be a sponsor to approve a review ticket from someone who needs a sponsor. See the end of https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group#Submitting_quality_new_packages
I now have the build working in Copr with the information/help provided by Robert-André. I created FIVE new packages that restic depends on that are not already in the repos. These five new packages do not build in EPEL since the new Go macros are not available yet. Dependencies: golang-github-elithrar-simple-scrypt-devel github-kurin-blazer-devel golang-github-minio-minio-go-devel github-pkg-xattr-devel golang-github-restic-chunker-devel All spec files: https://github.com/copart/restic-rpm/tree/master/SPECS Packages in Copr: https://copr.fedorainfracloud.org/coprs/copart/restic/packages/ I cannot test building restic in koji due to the dependencies. I am open to ALL feedback. Thank you to all those that already responded to this request!
Each SPEC requires their own review request. File a bug for each. Quick notes though: https://github.com/copart/restic-rpm/blob/master/SPECS/golang-github-elithrar-simple-scrypt.spec https://github.com/copart/restic-rpm/blob/master/SPECS/golang-github-kurin-blazer.spec https://github.com/copart/restic-rpm/blob/master/SPECS/golang-github-pkg-xattr.spec https://github.com/copart/restic-rpm/blob/master/SPECS/golang-github-restic-chunker.spec → split the description to stay below 80 characters per line → Version: 1.3.0 should be after goipath and before %gometa https://github.com/copart/restic-rpm/blob/master/SPECS/golang-github-minio-minio-go.spec → %gochecks probably won't work as there is no internet access when building from within Koji or Mock
Robert-André I added review requests for all dependencies. I also update the SPECs as you suggested. Thank you!
Updated SPEC and SRPM Spec URL: https://copart.fedorapeople.org/restic/restic.spec SRPM URL: https://copart.fedorapeople.org/restic/restic-0.9.1-2.fc29.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=27838154 ALL dependencies are now available in rawhide and this package builds. Therefore, I believe this is ready for review.
- Add a new line between each changelog entries - rm -rf vendor in %prep - build fails, probably because of: BUILDSTDERR: # github.com/restic/restic/internal/backend BUILDSTDERR: internal/backend/backend_retry.go:37:23: undefined: backoff.WithMaxRetries WithMaxRetries was added in version 2.0.0 of golang-github-cenkalti-backoff, latest version packaged in Fedora is 1.1.0. The problem wasn't apparent because you didn't remove vendor. I'll see if I can do a PR to update it and get back to you.
https://src.fedoraproject.org/rpms/golang-github-cenkalti-backoff/pull-request/1
Dependency golang-github-pkg-sftp requires a bump with upstream to support restic. Submitted a PR to update it. The restic package needs an update to use WithMaxRetries https://bugzilla.redhat.com/show_bug.cgi?id=1590921#c9 PR: https://src.fedoraproject.org/rpms/golang-github-pkg-sftp/pull-request/1
Updated SPEC and SRPM Spec URL: https://copart.fedorapeople.org/restic/restic.spec SRPM URL: https://copart.fedorapeople.org/restic/restic-0.9.1-2.fc29.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=28665487 ALL dependencies are now available in rawhide, vendor folder is removed, and this package builds. Therefore, I believe this is ready for review.
- Add OFL to the license list for the provided Lemon font, and add a comment explaining the license breakdown. Package otherwise approved. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed ===== 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. [!]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "BSD (2 clause)", "SIL (v1.1)", "Unknown or generated". 569 files have unknown license. Detailed output of licensecheck in /home/bob/packaging/review/restic/review-restic/licensecheck.txt [x]: License file installed when any subpackage combination is installed. [x]: Package does not own files or directories owned by other packages. Note: Dirs in package are owned also by: /usr/share/bash- completion(nnn, falkon, cmake-data, fedpkg, unar, kmod, dnf, libmbim, ripgrep, subversion, python3-pip, git-core, rfpkg, rpmdevtools, ModemManager, libqmi, bash-completion, fd-find, licensecheck, bubblewrap, exa, mtr, mercurial, python2-pip, rpmlint, yum, filesystem, flatpak, glib2), /usr/share/zsh/site-functions(nnn, fd- find, exa, mercurial, ddgr, pulseaudio, ripgrep, flatpak, googler, imgp, curl, fzf), /usr/share/bash-completion/completions(nnn, falkon, cmake-data, fedpkg, unar, kmod, dnf, libmbim, ripgrep, subversion, python3-pip, tig, git-core, rfpkg, rpmdevtools, ModemManager, libqmi, bash-completion, fd-find, licensecheck, bubblewrap, exa, mtr, mercurial, python2-pip, firewalld, libappstream-glib, rpmlint, yum, filesystem, flatpak, glib2) [x]: %build honors applicable compiler flags or justifies otherwise. [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]: Useful -debuginfo package or justification otherwise. [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 81920 bytes in 4 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 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 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). [-]: Fully versioned dependency in subpackages if applicable. Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in restic- debuginfo , restic-debugsource [?]: 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. [-]: Description and summary sections in the package spec file contains translations for supported Non-English languages, if available. [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]: Package should compile and build into binary rpms on all supported architectures. [x]: Spec use %global instead of %define unless justified. ===== EXTRA items ===== Generic: [x]: Rpmlint is run on debuginfo package(s). Note: No rpmlint messages. [x]: Rpmlint is run on all installed packages. Note: There are rpmlint messages (see attachment). [x]: Large data in /usr/share should live in a noarch subpackage if package is arched. [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: restic-0.9.1-2.fc29.x86_64.rpm restic-debuginfo-0.9.1-2.fc29.x86_64.rpm restic-debugsource-0.9.1-2.fc29.x86_64.rpm restic-0.9.1-2.fc29.src.rpm restic.x86_64: W: spelling-error %description -l en_US rclone -> clone, r clone restic.src: W: spelling-error %description -l en_US rclone -> clone, r clone 4 packages and 0 specfiles checked; 0 errors, 2 warnings. Rpmlint (debuginfo) ------------------- Checking: restic-debuginfo-0.9.1-2.fc29.x86_64.rpm 1 packages and 0 specfiles checked; 0 errors, 0 warnings.
provided Lemon font is not in rpm binary, only in upstreams tarbar, therefore, update to LICENSE is not needed.
(fedscm-admin): Do not repeat package name in summary
Updated SPEC and SRPM Spec URL: https://copart.fedorapeople.org/restic/restic.spec SRPM URL: https://copart.fedorapeople.org/restic/restic-0.9.1-2.fc29.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=28665487
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/restic
restic-0.9.2-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d7d48f43e1
restic-0.9.2-1.fc28 has been pushed to the Fedora 28 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-2018-d7d48f43e1
restic-0.9.2-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.