Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPM building errors #130

Open
donpellegrino opened this issue Sep 8, 2015 · 4 comments
Open

RPM building errors #130

donpellegrino opened this issue Sep 8, 2015 · 4 comments

Comments

@donpellegrino
Copy link

rpmlint 4store.spec
4store.spec:9: W: hardcoded-prefix-tag /usr/local
4store.spec: W: invalid-url Source0: 4store-1.0.tar.gz
0 packages and 1 specfiles checked; 0 errors, 2 warnings.

@donpellegrino donpellegrino changed the title rpmlint reports hardcoded-prefix-tag and invalid-url warnings against 4store.spec RPM building errors Sep 8, 2015
@donpellegrino
Copy link
Author

rpmbuild fails with missing header files. Adding the files to noinst_HEADERS seems to address the issue:

diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index f589ef4..3354e69 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -4,7 +4,7 @@ noinst_PROGRAMS = hashtest datatypestest

 nodist_pkginclude_HEADERS = 4store.h 4s-datatypes.h 4s-hash.h

-noinst_HEADERS = 4s-internals.h 4store.h 4s-datatypes.h 4s-hash.h server.h error.h md5.h params.h rdf-constants.h rijndael-alg-fst.h sort.h timing.h umac.h gnu-options.h bit_arr.h
+noinst_HEADERS = 4s-internals.h 4s-store-root.h 4store.h 4s-datatypes.h 4s-hash.h server.h error.h md5.h params.h rdf-constants.h rijndael-alg-fst.h sort.h timing.h umac.h gnu-options.h bit_arr.h uuid.h

 AM_CFLAGS = -std=gnu99 -fno-strict-aliasing -Wall -g -O2 -I..  -DGIT_REV=@GIT_REV@ @GLIB_CFLAGS@ @MDNS_CFLAGS@ -DFS_BIN_DIR=\"$(bindir)\"
 LIBS = @MDNS_LIBS@

Started over with 4store.spec. The Source0 parameter still need to be cleaned up so that it is general for all builds:

Summary: RDF storage and SPARQL query engine
Name: 4store
Version: v1.1.6
Release: 9
Source0: %{name}-%{version}-%{release}-g6e2b4a7.tar.gz
License: GPLv3+
Group: Applications/Databases
BuildRoot: %{_builddir}/%{name}-root

%description
4store is a distributed RDF storage engine and SPARQL query engine. 4store runs
on a single node, or a loose cluster of machines.
%prep
%setup -qn %{name}-%{version}-%{release}-g6e2b4a7

%build
%configure
make %{_smp_mflags}

%install
rm -rf %{buildroot}
%make_install

# The "number-comparison" test is failing.
#%check
#make test

%clean
rm -rf %{buildroot}

%files
%attr(0755, root, root) %{_bindir}/*
%attr(0755, root, root) %{_includedir}/4store
%attr(0644, root, root) %{_includedir}/4store/*
%attr(0755, root, root) %{_libdir}/*
%attr(0644, root, root) %{_libdir}/pkgconfig/*

%attr(0644, root, root) %doc %{_mandir}/man1/*
%attr(0644, root, root) %doc %{_mandir}/man5/*
%attr(0644, root, root) %doc %{_mandir}/man8/*

%changelog

* Tue Sep  8 2015  Donald Pellegrino <dapellegrino@dow.com> - v1.1.6-9
- Updated to build into standard directories.

@swh
Copy link
Collaborator

swh commented Sep 9, 2015

Great, a635344 has the noinst_HEADERS change in it.

The .spec file is extremely stale, so thanks for fixing it, but why does it have a git revision number burned into in it?

@donpellegrino
Copy link
Author

The git revision number should not be in there. I just did that because I have not figured out how to handle the Source0 line yet. The rpmlint tool also wants that to be a valid URL. Looking at raptor2 (https://github.com/dajobe/raptor/blob/master/raptor2.spec.in) they have made use of a .spec.in which might be more appropriate here as well.

The Fedora Project Wiki has some notes on Source URLs from Git (https://fedoraproject.org/wiki/Packaging:SourceURL?rd=Packaging/SourceURL#Git_Hosting_Services). Unfortunately, I am not sure how those recommendation translate to implementation in this case.

@swh
Copy link
Collaborator

swh commented Sep 10, 2015

Having a .spec.in makes a lot of sense.

I can't really follow the Wiki page about Source0 either - I'm never really used rpmbuild - I suspect a colleague of mine created it some years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants