From: Andrew McNab Date: Sun, 28 May 2006 19:39:49 +0000 (+0000) Subject: SlashGrid build/install X-Git-Tag: connpool_branch_start~35 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=b865c39c07e2200c434985140d22c0500c12fb03;p=jra1mw.git SlashGrid build/install --- diff --git a/org.gridsite.core/doc/fuse.spec b/org.gridsite.core/doc/fuse.spec new file mode 100644 index 0000000..6426928 --- /dev/null +++ b/org.gridsite.core/doc/fuse.spec @@ -0,0 +1,137 @@ +# +# You should be able to build your own FUSE RPMs for use with SlashGrid +# by fetching an up-to-date stable FUSE tar file from SourceForge, +# putting it in /usr/src/redhat/SOURCES, updating the Version: header in +# this file, and then executing rpmbuild -ba fuse.spec +# +Name: fuse +Version: 2.5.3 +URL: http://fuse.sourceforge.net +Source: %{name}-%{version}.tar.gz +Release: 1_%(uname -r | sed 's/-/_/g') +Summary: File System in Userspace (FUSE) utilities +Group: System Environment/Base +License: GPL +Packager: Andrew McNab +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains the FUSE userspace tools to +mount a FUSE filesystem. + +(This version is designed for use with the SlashGrid daemon.) + +%package libs +Summary: File System in Userspace (FUSE) libraries +Group: System Environment/Libraries +License: LGPL + +%description libs +Devel With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains the FUSE libraries. + +%package devel +Summary: File System in Userspace (FUSE) devel files +Group: Development/Libraries +Requires: %{name}-libs = %{version}-%{release} +Requires: pkgconfig +License: LGPL + +%description devel +With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains development files (headers, +pgk-config) to develop FUSE based applications/filesystems. + +%prep +%setup -q +#disable device creation during build/install +sed -i 's|mknod|echo Disabled: mknod |g' util/Makefile.in +sed -i 's|install-data-local | |g' util/Makefile.in +sed -i 's| install-data-local| |g' util/Makefile.in + +%build +%configure --disable-static +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' + +# change from 4755 to 0755 to allow stripping (setuid not needed by SlashGrid) +chmod 0755 $RPM_BUILD_ROOT/%{_bindir}/fusermount + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +mknod --mode=0660 /dev/fuse c 10 229 +chown root.root /dev/fuse + +%postun + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + +%files +%doc AUTHORS ChangeLog COPYING FAQ Filesystems NEWS README README.NFS +/sbin/mount.fuse +%attr(0755,root,root) %{_bindir}/fusermount +/lib/modules/%(uname -r)/kernel/fs/fuse/fuse.ko + +%files libs +%doc COPYING.LIB +%{_libdir}/libfuse.so.* + +%files devel +%defattr(-,root,root,-) +%{_libdir}/libfuse.so +%{_libdir}/pkgconfig/*.pc +%{_includedir}/fuse.h +%{_includedir}/fuse + +%changelog + +* Sun May 28 2006 Andrew McNab 2.5.3-1_%(uname -r) +- Simplify for use with SlashGrid daemon (which only runs as root) on + Scientific Linux 3.*/4.* too + +* Wed May 03 2006 Peter Lemenkov 2.5.3-1%{?dist} +- Update to 2.5.3 + +* Thu Mar 30 2006 Peter Lemenkov 2.5.2-4%{?dist} +- rebuild + +* Mon Feb 13 2006 Peter Lemenkov - 2.5.2-3 +- Proper udev rule + +* Mon Feb 13 2006 Peter Lemenkov - 2.5.2-2 +- Added missing requires + +* Tue Feb 07 2006 Peter Lemenkov - 2.5.2-1 +- Update to 2.5.2 +- Dropped fuse-mount.fuse.patch + +* Wed Nov 23 2005 Thorsten Leemhuis - 2.4.2-1 +- Use dist + +* Wed Nov 23 2005 Thorsten Leemhuis - 2.4.2-1 +- Update to 2.4.2 (solves CVE-2005-3531) +- Update README.fedora + +* Sat Nov 12 2005 Thorsten Leemhuis - 2.4.1-3 +- Add README.fedora +- Add hint to README.fedora and that you have to be member of the group "fuse" + in the description +- Use groupadd instead of fedora-groupadd + +* Fri Nov 04 2005 Thorsten Leemhuis - 2.4.1-2 +- Rename packages a bit +- use makedev.d/40-fuse.nodes +- fix /sbin/mount.fuse +- Use a fuse group to restict access to fuse-filesystems + +* Fri Oct 28 2005 Thorsten Leemhuis - 2.4.1-1 +- Initial RPM release. diff --git a/org.gridsite.core/src/Makefile b/org.gridsite.core/src/Makefile index b01edab..0e544d9 100644 --- a/org.gridsite.core/src/Makefile +++ b/org.gridsite.core/src/Makefile @@ -202,7 +202,7 @@ showx509exts: showx509exts.c libgridsite.a -lssl -lcrypto -lxml2 -lz -lm slashgrid: slashgrid.c - gcc -g -o slashgrid -L/usr/local/lib -lfuse -lpthread slashgrid.c \ + gcc -g -o slashgrid -lfuse -lpthread slashgrid.c \ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=22 \ -I/usr/kerberos/include `curl-config --cflags` \ `curl-config --libs` -lgridsite -lxml2 @@ -266,6 +266,7 @@ install: apidoc cp -f ../CHANGES ../README ../INSTALL ../LICENSE ../VERSION \ $(prefix)/share/doc/gridsite-$(PATCH_VERSION) cp -f ../doc/*.html ../doc/*.conf ../doc/*.1 ../doc/*.8 ../doc/*.sh \ + ../doc/*.spec \ $(prefix)/share/doc/gridsite-$(VERSION) cp -f ../doc/*.1 $(prefix)/share/man/man1 cp -f ../doc/*.8 $(prefix)/share/man/man8 @@ -293,7 +294,7 @@ dist: ../dist/gridsite-$(PATCH_VERSION)/interface cp -f ../VERSION ../README ../LICENSE ../CHANGES ../INSTALL \ ../dist/gridsite-$(PATCH_VERSION) - cp -f Makefile grst*.c htcp.c \ + cp -f Makefile grst*.c htcp.c slashgrid.c slashgrid.init \ urlencode.c findproxyfile.c gaclexample.c mod_gridsite.c \ grst_admin.h mod_ssl-private.h \ gsexec.c gsexec.h gridsite-copy.c \ @@ -301,6 +302,7 @@ dist: Doxyfile doxygen.css doxyheader.html \ ../dist/gridsite-$(PATCH_VERSION)/src cp -f ../doc/*.html ../doc/*.1 ../doc/*.8 ../doc/*.conf ../doc/*.sh \ + ../doc/*.spec \ ../dist/gridsite-$(PATCH_VERSION)/doc cp -f ../interface/*.h \ ../dist/gridsite-$(PATCH_VERSION)/interface diff --git a/org.gridsite.core/src/gridsite.spec b/org.gridsite.core/src/gridsite.spec index 9be9b5d..a177497 100644 --- a/org.gridsite.core/src/gridsite.spec +++ b/org.gridsite.core/src/gridsite.spec @@ -71,8 +71,12 @@ with GridSite and Grid Security credentials. %build cd src make prefix=$RPM_BUILD_ROOT/%{prefix} \ -GSOAPDIR=$GSOAPDIR OPENSSL_FLAGS=$OPENSSL_FLAGS \ -OPENSSL_LIBS=$OPENSSL_LIBS FLAVOR_EXT=$FLAVOR_EXT + GSOAPDIR=$GSOAPDIR OPENSSL_FLAGS=$OPENSSL_FLAGS \ + OPENSSL_LIBS=$OPENSSL_LIBS FLAVOR_EXT=$FLAVOR_EXT + +if [ -f /usr/include/fuse/fuse.h ] ; then + make slashgrid +fi %install cd src @@ -80,16 +84,27 @@ make install prefix=$RPM_BUILD_ROOT/%{prefix} \ GSOAPDIR=$GSOAPDIR OPENSSL_FLAGS=$OPENSSL_FLAGS \ OPENSSL_LIBS=$OPENSSL_LIBS FLAVOR_EXT=$FLAVOR_EXT +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d + +if [ -f xxx/usr/include/fuse/fuse.h ] ; then + cp -f slashgrid $RPM_BUILD_ROOT/%{prefix}/sbin/slashgrid + cp -f slashgrid.init $RPM_BUILD_ROOT/etc/rc.d/init.d/slashgrid +else + echo -e '#!/bin/sh\necho SlashGrid wasnt built since no fuse-devel on build machine)' \ + >$RPM_BUILD_ROOT/%{prefix}/sbin/slashgrid + echo -e '#!/bin/sh\n# chkconfig: - 90 10\n# description: slashgrid\necho SlashGrid wasnt built since no fuse-devel on build machine' \ + >$RPM_BUILD_ROOT/etc/rc.d/init.d/slashgrid +fi + %post shared if [ "$UID" = "0" ] ; then /sbin/ldconfig fi -ln -sf %{prefix}/share/doc/gridsite-%{version} \ - %{prefix}/share/doc/gridsite - -#%postun -rm -f %{prefix}/share/doc/gridsite +%postun +if [ "$UID" = "0" ] ; then + /sbin/ldconfig +fi %files shared %attr(-, root, root) %{prefix}/lib/libgridsite.so.%{version} @@ -135,3 +150,14 @@ rm -f %{prefix}/share/doc/gridsite %files gsexec %attr(4510, root, apache) %{prefix}/sbin/gsexec %attr(-, root, root) %{prefix}/share/man/man8/gsexec.8.gz + +%package slashgrid +Group: Applications/Internet +Summary: slashgrid daemon + +%description slashgrid +SlashGrid daemon + +%files slashgrid +%attr(0744, root, root) %{prefix}/sbin/slashgrid +%attr(0744, root, root) /etc/rc.d/init.d/slashgrid