From 7afed34350495d4da23158dd181c1d8a7edef8a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Fri, 7 Oct 2011 12:49:17 +0000 Subject: [PATCH] Packaging cleanups and some rpmlint fixes. --- org.gridsite.core/project/compat-1.5.patch | 48 ++++++++++++++---------------- org.gridsite.core/src/Makefile | 10 ++++++- org.gridsite.core/src/make-gridsite-spec | 45 +++++++++++++++------------- 3 files changed, 55 insertions(+), 48 deletions(-) diff --git a/org.gridsite.core/project/compat-1.5.patch b/org.gridsite.core/project/compat-1.5.patch index c6970ba..eecbcce 100644 --- a/org.gridsite.core/project/compat-1.5.patch +++ b/org.gridsite.core/project/compat-1.5.patch @@ -1,10 +1,10 @@ gridsite-1.5-compat package. -diff --git a/org.gridsite.core/src/Makefile b/org.gridsite.core/src/Makefile -index d2005e1..3a28d82 100644 ---- a/org.gridsite.core/src/Makefile -+++ b/org.gridsite.core/src/Makefile -@@ -89,6 +89,10 @@ libgridsite.so.$(VERSION): grst_err.o grst_x509.o grst_gacl.o grst_xacml.o \ +diff --git a/src/Makefile b/src/Makefile +index eae692e..6378d34 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -90,6 +90,10 @@ libgridsite.so.$(VERSION): grst_err.o grst_x509.o grst_gacl.o grst_xacml.o \ grst_asn1.o grst_htcp.o -lcrypto $(XML2_LIBS) ln -sf libgridsite.so.$(VERSION) libgridsite.so ln -sf libgridsite.so.$(VERSION) libgridsite.so.$(MINOR_VERSION) @@ -15,7 +15,7 @@ index d2005e1..3a28d82 100644 libgridsite.a: grst_err.o grst_x509.o grst_gacl.o grst_xacml.o grst_http.o grst_asn1.o grst_htcp.o ar src libgridsite.a grst_err.o grst_x509.o grst_gacl.o grst_xacml.o grst_http.o grst_asn1.o grst_htcp.o -@@ -134,6 +138,10 @@ libgridsite_globus.so.$(VERSION): grst_err_globus.o \ +@@ -135,6 +139,10 @@ libgridsite_globus.so.$(VERSION): grst_err_globus.o \ grst_err_globus.o grst_x509_globus.o grst_gacl_globus.o grst_xacml_globus.o \ grst_http_globus.o grst_asn1_globus.o $(XML2_LIBS) ln -sf libgridsite_globus.so.$(VERSION) libgridsite_globus.so @@ -26,7 +26,7 @@ index d2005e1..3a28d82 100644 libgridsite_globus.a: grst_err_globus.o grst_x509_globus.o grst_gacl_globus.o grst_http_globus.o grst_asn1_globus.o ar src libgridsite_globus.a \ -@@ -179,6 +187,7 @@ else +@@ -180,6 +188,7 @@ else libgridsite_globus.so.$(VERSION): libgridsite.so.$(VERSION) cp -f libgridsite.so.$(VERSION) libgridsite_globus.so.$(VERSION) @@ -34,7 +34,7 @@ index d2005e1..3a28d82 100644 libgridsite_globus.a: libgridsite.a cp -f libgridsite.a libgridsite_globus.a -@@ -195,6 +204,10 @@ libgridsite_nossl.so.$(VERSION): grst_err_nossl.o \ +@@ -196,6 +205,10 @@ libgridsite_nossl.so.$(VERSION): grst_err_nossl.o \ grst_err_nossl.o grst_gacl_nossl.o grst_xacml_nossl.o \ grst_http_nossl.o grst_htcp_nossl.o $(XML2_LIBS) ln -sf libgridsite_nossl.so.$(VERSION) libgridsite_nossl.so @@ -43,9 +43,9 @@ index d2005e1..3a28d82 100644 + grst_err_nossl.o grst_gacl_nossl.o grst_xacml_nossl.o \ + grst_http_nossl.o grst_htcp_nossl.o $(XML2_LIBS) - libgridsite_nossl.a: grst_err_nossl.o grst_gacl_nossl.o grst_http_nossl.o + libgridsite_nossl.a: grst_err_nossl.o grst_gacl_nossl.o grst_http_nossl.o grst_htcp_nossl.o ar src libgridsite_nossl.a \ -@@ -467,6 +480,9 @@ install-lib: +@@ -468,6 +481,9 @@ install-lib: $(prefix)/$(libdir)/libgridsite_nossl.so.$(MAJOR_VERSION) ln -sf libgridsite_nossl.so.$(PATCH_VERSION) \ $(prefix)/$(libdir)/libgridsite_nossl.so.$(MINOR_VERSION) @@ -55,23 +55,14 @@ index d2005e1..3a28d82 100644 install-slashgrid: slashgrid cp -f slashgrid $(prefix)/sbin -diff --git a/org.gridsite.core/src/make-gridsite-spec b/org.gridsite.core/src/make-gridsite-spec -index f7821e0..8c2c7a5 100755 ---- a/org.gridsite.core/src/make-gridsite-spec -+++ b/org.gridsite.core/src/make-gridsite-spec -@@ -53,6 +53,7 @@ Summary: GridSite - License: Modified BSD - Group: System Environment/Daemons - Source: %{name}-%{version}.src.tar.gz -+Patch1: compat-1.5.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - URL: http://www.gridsite.org/ - Vendor: GridPP -@@ -314,6 +315,19 @@ See http://www.gridsite.org/ for details. - %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyunixtime.1 +diff --git a/src/make-gridsite-spec b/src/make-gridsite-spec +index 372214c..b6cd7ba 100755 +--- a/src/make-gridsite-spec ++++ b/src/make-gridsite-spec +@@ -311,6 +311,23 @@ See http://www.gridsite.org/ for details. %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyrenew.1 %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyinfo.1 -+ + +%package 1.5-compat +Group: Development/Libraries +Summary: GridSite 1.5 compatibility package @@ -84,6 +75,11 @@ index f7821e0..8c2c7a5 100755 +%attr(-, root, root) %{_prefix}/%{_lib}/libgridsite.so.1.5 +%attr(-, root, root) %{_prefix}/%{_lib}/libgridsite_globus.so.1.5 +%attr(-, root, root) %{_prefix}/%{_lib}/libgridsite_nossl.so.1.5 ++ ++%post 1.5-compat -p /sbin/ldconfig ++ ++%postun 1.5-compat -p /sbin/ldconfig ++ EOF - fi + LC_LANG=C cat >> gridsite.spec < buildtest.sh - MAKETEST="`cat buildtest.sh`'" - rm -f buildtest.sh -else - MAKE="make GSOAPDIR=\$GSOAPDIR OPENSSL_FLAGS=\$OPENSSL_FLAGS OPENSSL_LIBS=\$OPENSSL_LIBS FLAVOR_EXT=\$FLAVOR_EXT $1" - MAKETEST="make GSOAPDIR=$GSOAPDIR STDSOAP2=$STDSOAP2 $1" -fi - # test to see if fuse-devel (or fuse.h and libfuse) is installed # cat <fuse-test.c @@ -17,9 +7,15 @@ cat <fuse-test.c int main() { struct fuse_context ctx; return fuse_main(0, (char **) 0, (struct fuse_operations *) 0); } EOF -$MAKETEST fuse-test +make fuse-test if [ $? = 0 ] ; then have_fuse=1 ; fi +if [ x"$project" = x"glite" ]; then + globusdep=',vdt_globus_sdk' +else + globusdep=',globus-gssapi-gsi-devel' +fi + # test to see if gsoap-devel (or stdsoap2.h and libgsoapssl) is installed # cat <gsoap-test.c @@ -28,7 +24,7 @@ cat <gsoap-test.c main() { return; } #endif EOF -$MAKETEST gridsite-delegation.cgi +make gridsite-delegation.cgi if [ $? = 0 ] ; then have_gsoap=1 ; fi rm -f a.out @@ -58,7 +54,7 @@ URL: http://www.gridsite.org/ Vendor: GridPP Requires: libxml2 Buildrequires: libxml2-devel,curl-devel,httpd-devel,openssl-devel -Buildrequires: doxygen${gsoapdep}${fusedep} +Buildrequires: doxygen${gsoapdep}${fusedep}${globusdep} Packager: Andrew McNab %description @@ -132,20 +128,20 @@ See http://www.gridsite.org/ for details. %build cd src -$MAKE prefix=\$RPM_BUILD_ROOT/%{_prefix} +make prefix=\$RPM_BUILD_ROOT/%{_prefix} EOF if [ $have_fuse ] ; then cat <>gridsite.spec -$MAKE prefix=\$RPM_BUILD_ROOT/%{_prefix} slashgrid +make prefix=\$RPM_BUILD_ROOT/%{_prefix} slashgrid EOF fi if [ $have_gsoap ] ; then cat <>gridsite.spec -$MAKE prefix=\$RPM_BUILD_ROOT/%{_prefix} gridsite-delegation.cgi htproxyput +make prefix=\$RPM_BUILD_ROOT/%{_prefix} gridsite-delegation.cgi htproxyput EOF fi @@ -155,7 +151,7 @@ cat <>gridsite.spec %install cd src -$MAKE install prefix=\$RPM_BUILD_ROOT/%{_prefix} libdir=%{_lib} +make install prefix=\$RPM_BUILD_ROOT/%{_prefix} libdir=%{_lib} EOF if [ $have_fuse ] ; then @@ -163,7 +159,7 @@ if [ $have_fuse ] ; then cat <>gridsite.spec mkdir -p \$RPM_BUILD_ROOT/etc/rc.d/init.d -$MAKE install-slashgrid prefix=\$RPM_BUILD_ROOT/%{_prefix} +make install-slashgrid prefix=\$RPM_BUILD_ROOT/%{_prefix} EOF fi @@ -171,7 +167,7 @@ if [ $have_gsoap ] ; then cat <>gridsite.spec -$MAKE install-ws prefix=\$RPM_BUILD_ROOT/%{_prefix} +make install-ws prefix=\$RPM_BUILD_ROOT/%{_prefix} EOF fi @@ -182,7 +178,7 @@ if [ "\$UID" = "0" ] ; then /sbin/ldconfig fi -%postun +%postun shared if [ "\$UID" = "0" ] ; then /sbin/ldconfig fi @@ -249,7 +245,7 @@ cat <>gridsite.spec %package slashgrid Group: Applications/Internet Summary: slashgrid daemon -Requires: curl >= 7.12.1,fuse,fuse-libs +Requires: curl >= 7.12.1,fuse %description slashgrid SlashGrid daemon @@ -314,6 +310,13 @@ See http://www.gridsite.org/ for details. %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyunixtime.1 %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyrenew.1 %attr(-, root, root) %{_prefix}/share/doc/gridsite-${MINOR_VERSION:-1.x}/htproxyinfo.1 + +EOF + +LC_TIME=C cat >> gridsite.spec <