https://bugzilla.redhat.com/show_bug.cgi?id=1872867 --- Comment #3 from Clark Williams <williams@xxxxxxxxxx> --- (In reply to Jaroslav Škarvada from comment #2) > I took a first look: > > - Version: %(grep ^VERSION ../Makefile | awk '{print $3}') > This is not acceptable because there is no ../Makefile before the sources > are downloaded and unpacked. The version tag has to be evaluable all the > time even without sources. Ugh. I'll hard-code it to a versions string now. Still want to find a way to only maintain version info in one place, without being Fedora-specific (has to run on Debian as well). > > - Source0: %{name}-%{version}.tar.xz > This has to be full URL parseable by e.g. the 'spectool -g stalld.spec', for > github you can e.g. use: > Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz > > This will work if there is upstream github release with the tag > 'v%{version}'. > > If there is no upstream github release you can still package the snapshot, > but it's bit more tricky, example: > I'm about to move the cannonical location to git.kernel.org, so I'll fix this today after that's successfull. > > # git hash of the snapshot > > %global git_commit f3905d3510dfb3851f946f097a9e2ddaa5fb333b > > # date when the snapshot was checked out / added to the spec > > %global git_date 20200828 > > > > %global git_short_commit %(echo %{git_commit} | cut -c -8) > > %global git_suffix %{git_date}git%{git_short_commit} > > > > ... > > > > # for pre-release and no upstream version, use 0 > > Version: 0 > > # for pre-releases use 0.1, 0.2, .... > > Release: 0.1.%{git_suffix}%{?dist} > > ... > > URL: https://github.com/bristot/stalld > > Source0: %{url}/archive/%{git_commit}/%{name}-%{git_suffix}.tar.gz > > Again 'spectool -g stalld.spec' has to handle it. > > - BuildRequires needs to have 'all' requirements, e.g. the following are > missing: > gcc, make > > - you shouldn't use 'rm -rf $RPM_BUILD_ROOT' just drop the line > > - make DESTDIR=$RPM_BUILD_ROOT install > make DESTDIR=$RPM_BUILD_ROOT -C redhat install > > you should use: > %make_install > %make_install -C redhat > > - I think you should support systemd presets (even if not used by your > service) [1], i.e. add the following to the spec: > BuildRequires: systemd-rpm-macros > > ... > %post > %systemd_post %{name}.service > > %preun > %systemd_preun %{name}.service > > %postun > %systemd_postun_with_restart %{name}.service > > > [1] > https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/ > #_systemd Thanks Jaroslav, I'll push another round this weekend. -- 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