On Sat, Jan 14, 2017 at 5:57 PM arnaud gaboury <arnaud.gabo...@gmail.com> wrote:
> On Sat, Jan 14, 2017 at 5:17 PM Michael Schwendt <mschwe...@gmail.com> > wrote: > > On Sat, 14 Jan 2017 11:25:07 +0000, arnaud gaboury wrote: > > > + /usr/lib/rpm/brp-python-hardlink > > + /usr/lib/rpm/redhat/brp-java-repack-jars > > error: Bad file: > > /home/makerpm/build_package/mattermost/mattermost-user.conf: No such file > > or directory > > You've not given enough information, unfortunately. Does the output end > there? > > > YES > > If so, it has not reached the %files processing section it seems. > > > > Uploading the full spec file or even the src.rpm would have been a great > idea. > > > Here it goes: > > > > > > %prep > %autosetup -n platform-master > > # many golang binaries are "vendoring" (bundling) sources, so remove them. > Those dependencies need to be packaged independently. > cd %{_builddir} > mkdir -p src/github.com/mattermost > cd src/github.com/mattermost > ln -s %{_builddir}/platform-master platform > # build only for 64 bits > 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/' > sed -i webapp/Makefile \ > -e '/npm install/a \ rm > node_modules/pngquant-bin/vendor/pngquant\n ln -s /usr/bin/pngquant > node_modules/pngquant-bin/vendor/pngquant' > > %build > cd %{_builddir}/src/github.com/mattermost/platform > GOPATH=%{_builddir} BUILD_NUMBER=%{version}-%{release} make > %{?_smp_mflags} package > > %install > cd %{_builddir}/src/github.com/mattermost/platform > rm -rf %{buildroot} > install -dm755 %{buildroot}%{_datadir}/webapps \ > %{buildroot}/var/log/%{name} \ > %{buildroot}%{_sysconfdir}/webapps \ > %{buildroot}%{_datadir}/{licenses,doc}/%{name} > > cp -a dist/mattermost %{buildroot}%{_datadir}/webapps/%{name} > > cd %{buildroot}%{_datadir}/webapps/%{name} > rm -rf logs > ln -s /var/log/%{name} logs > > mkdir -p %{buildroot}%{_sysconfdir}/webapps/%{name} > mv config/config.json %{buildroot}%{_sysconfdir}/webapps/%{name} > ln -s %{_sysconfdir}/webapps/%{name} config > > sed -e 's@"Directory": ".*"@"Directory": "/var/lib/mattermost/"@g' \ > -e 's@tcp(dockerhost:3306)@unix(/run/mysqld/mysqld.sock)@g' \ > -i %{buildroot}%{_sysconfdir}/webapps/%{name}/config.json > > > mv NOTICE.txt README.md %{buildroot}%{_defaultdocdir}/%{name} > > cd %{_builddir} > install -Dm755 bin/platform > %{buildroot}%{_datadir}/webapps/%{name}/bin/platform > > install -Dm755 mattermost.sh %{buildroot}%{_bindir}/mattermost > install -Dm644 mattermost.service > %{buildroot}%{_unitdir}/mattermost.service > install -Dm644 user.conf %{buildroot}%{_sysusersdir}/mattermost.conf > > %files > %{_sysconfdir}/webapps/%{name}/* > > %{_bindir}/%{name} > %{_unitdir}/mattermost.service > %{_sysusersdir}/mattermost.conf > %{_defaultdocdir}/* > %{_datadir}/webapps/%{name}/* > > %post > systemd-sysusers mattermost.conf > if [[ ! -e var/lib/mattermost ]]; then > install -dm700 -o mattermost var/lib/mattermost > fi > > > > a bit about the "build_package" directory below $HOME. > > /home/makerpm is the home of your user. /home/makerpm/rpmbuild is > the home of rpmbuild related files. What is the "build_package" dir? > > > I followed this wiki[0], section First steps. > mkdir ~/build_package/mattermost (in wiki is equivalent to > ~/packaging-work/howdy). > > I will have a closest look as it seems this issue may comes from here. In > my spec there seems to be a confusion between %{_builddir} and > ~/build_package/mattermost . There are the same when they shouldn't. It > seems I have built with TWO build dir! > > Thank you for this remark . I will change and build with only one build > directory > In fact, I realize I am totally confused between the "old" method I used to build .rpm and this new wiki using fedpkg. Before, I used to have BUILD, BUILDROOT, SOURCES etc folders inside rpmbuild. Now, I am not sure how to setup my build directory. > How do you use that dir? Maybe you've added that dir to some RPM macros? > > > > > > _______________________________________________ > users mailing list -- users@lists.fedoraproject.org > To unsubscribe send an email to users-le...@lists.fedoraproject.org > >
_______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org