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 ?