I am writing a .spec file to build my own .rpm. Here it is, non completed:
----------------------------------------------- Name: mattermost Version: 3.4 Release: 1%{?dist} Summary: Mattermost is an open source, self-hosted Slack-alternative URL: http://www.mattermost.org Source0: https://github.com/mattermost/platform/archive/master.zip License: MIT Group: System Environment/Daemons
BuildRequires: go BuildRequires: npm BuildRequires: python BuildRequires: git BuildRequires: mercurial BuildRequires: pngquant Requires: glibc
%description As an alternative to proprietary SaaS messaging, Mattermost brings all your team communication into one p$
%prep %autosetup -n platform-master cd %{_builddir} mkdir -p src/github.com/mattermost cd src/github.com/mattermost rm -f platform ln -s %{_builddir}/platform-master platform cd platform sed -n '1,/cp README.md/p;/^run-server:/,$p' -i Makefile sed -r -i Makefile \ -e 's/^package: build build-client/package: build-linux build-client/' \ -e 's/GOARCH=amd64//' \ -e 's/^BUILD_HASH =.*/BUILD_HASH = none/'
%build cd %{_builddir}/src/github.com/mattermost/platform GOPATH=%{_builddir} BUILD_NUMBER=%{version}-%{release} make %{?_smp_mflags} package
%install
%files
%changelog
---------------------------------------------
Before going further, I want to test, so run:
$ fedpkg --dist f24 local
Everything went fine and was left with the wanted binaries, BUT I have this error at the very end:
<----BUILD-------> + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.92dtaH + umask 022 + cd /home/makerpm/build_package/mattermost + '[' /home/makerpm/rpmbuild/BUILDROOT/mattermost-3.4-1.fc24.x86_64 '!=' / ']' + rm -rf /home/makerpm/rpmbuild/BUILDROOT/mattermost-3.4-1.fc24.x86_64 ++ dirname /home/makerpm/rpmbuild/BUILDROOT/mattermost-3.4-1.fc24.x86_64 + mkdir -p /home/makerpm/rpmbuild/BUILDROOT + mkdir /home/makerpm/rpmbuild/BUILDROOT/mattermost-3.4-1.fc24.x86_64 + cd platform-master + /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /home/makerpm/build_package/mattermost/platform-master /usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32s, 0 CRC32s did match. + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-java-repack-jars Processing files: mattermost-3.4-1.fc24.x86_64 Processing files: mattermost-debuginfo-3.4-1.fc24.x86_64 error: Empty %files file /home/makerpm/build_package/mattermost/platform-master/debugfiles.list
RPM build errors: Empty %files file /home/makerpm/build_package/mattermost/platform-master/debugfiles.list Could not execute local: Non zero exit
------------------------------------------
My %files section is indeed empty as I did not finished writing the .spec file. Shall I overcome for now this error and consider my local build test as successful ?
On Wed, 02 Nov 2016 10:00:13 +0000 arnaud gaboury arnaud.gaboury@gmail.com wrote:
I am writing a .spec file to build my own .rpm. Here it is, non completed:
[snip]
RPM build errors: Empty %files file /home/makerpm/build_package/mattermost/platform-master/debugfiles.list Could not execute local: Non zero exit
My %files section is indeed empty as I did not finished writing the .spec file. Shall I overcome for now this error and consider my local build test as successful ?
I am not knowledgeable about spec files, but I would say yes. However, this question seems more likely to get a good answer on the devel list, where all the packagers hang out.
On 11/02/2016 10:08 AM, stan wrote:
On Wed, 02 Nov 2016 10:00:13 +0000 arnaud gaboury arnaud.gaboury@gmail.com wrote:
I am writing a .spec file to build my own .rpm. Here it is, non completed:
[snip]
RPM build errors: Empty %files file /home/makerpm/build_package/mattermost/platform-master/debugfiles.list Could not execute local: Non zero exit
My %files section is indeed empty as I did not finished writing the .spec file. Shall I overcome for now this error and consider my local build test as successful ?
I am not knowledgeable about spec files, but I would say yes. However, this question seems more likely to get a good answer on the devel list, where all the packagers hang out.
I was hoping someone would point to an interactive tool for building a .spec file; or better yet, a gui util. That would really enable a lot of people, not just the developers.
On 2 November 2016 at 16:37, jd1008 jd1008@gmail.com wrote:
On 11/02/2016 10:08 AM, stan wrote:
On Wed, 02 Nov 2016 10:00:13 +0000 arnaud gaboury arnaud.gaboury@gmail.com wrote:
I am writing a .spec file to build my own .rpm. Here it is, non completed:
[snip]
RPM build errors: Empty %files file /home/makerpm/build_package/mattermost/platform-master/debugfiles.list Could not execute local: Non zero exit
My %files section is indeed empty as I did not finished writing the .spec file. Shall I overcome for now this error and consider my local build test as successful ?
I am not knowledgeable about spec files, but I would say yes. However, this question seems more likely to get a good answer on the devel list, where all the packagers hang out.
I was hoping someone would point to an interactive tool for building a .spec file; or better yet, a gui util. That would really enable a lot of people, not just the developers.
The templates, macros and Fedora Guidelines documentation do make it a lot cleaner and simpler than it was 5-10 years back though...
This was something I wrote about building RPMs that should be applicable - and never forget it's always best to build in mock to ensure a clean build environment
On 11/02/2016 10:46 AM, James Hogarth wrote:
On 2 November 2016 at 16:37, jd1008 jd1008@gmail.com wrote:
On 11/02/2016 10:08 AM, stan wrote:
On Wed, 02 Nov 2016 10:00:13 +0000 arnaud gaboury arnaud.gaboury@gmail.com wrote:
I am writing a .spec file to build my own .rpm. Here it is, non completed:
[snip]
RPM build errors: Empty %files file /home/makerpm/build_package/mattermost/platform-master/debugfiles.list Could not execute local: Non zero exit
My %files section is indeed empty as I did not finished writing the .spec file. Shall I overcome for now this error and consider my local build test as successful ?
I am not knowledgeable about spec files, but I would say yes. However, this question seems more likely to get a good answer on the devel list, where all the packagers hang out.
I was hoping someone would point to an interactive tool for building a .spec file; or better yet, a gui util. That would really enable a lot of people, not just the developers.
The templates, macros and Fedora Guidelines documentation do make it a lot cleaner and simpler than it was 5-10 years back though...
This was something I wrote about building RPMs that should be applicable - and never forget it's always best to build in mock to ensure a clean build environment
Thanx. Reason I mentioned "interactive" or "gui" is because many people see the sheer volume of things to read AND REMEMBER in order to produce the simplest of .spec files. A util that will, for example, scan the source files and ask intelligent questions that the user could answer. Among them might be something like: what is the name and version of the package, that provides header file abcde.h ?
Of course, some of the needed packages can be discerned by the util by running the rpm command to examine all installed packages and what they provide - or even query the repo by using the query "provides". Such a smart app would go a very very long way to speed up the creation of a spec file.
Cheers,
JD
On Wed, 2 Nov 2016 16:46:10 +0000 James Hogarth james.hogarth@gmail.com wrote:
The templates, macros and Fedora Guidelines documentation do make it a lot cleaner and simpler than it was 5-10 years back though...
This was something I wrote about building RPMs that should be applicable - and never forget it's always best to build in mock to ensure a clean build environment
Thanks. That was very clear.