[myproxy/el5: 32/32] Depend on GT5.2+ versions of globus packages

Mattias Ellert ellert at fedoraproject.org
Thu Jan 23 08:50:50 UTC 2014


commit 6eb3ebebdc13867cc24ed70d696181daacad8a29
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date:   Thu Jan 23 09:49:16 2014 +0100

    Depend on GT5.2+ versions of globus packages
    
    - Use _pkgdocdir when defined
    - Use non-ISA build dependencies
    - Make license files part of the -libs package
    - Make documentaion package noarch
    - Use better Group tags

 .gitignore         |    7 +-
 clog               |    2 -
 myproxy-deps.patch |  145 +++++++++++++++
 myproxy.spec       |  498 ++++++++++++++++++++++++++++------------------------
 4 files changed, 413 insertions(+), 239 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 45a9db8..f6a3a77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1 @@
-/myproxy-5.3.tar.gz
-/myproxy-5.4.tar.gz
-/myproxy-5.5.tar.gz
-/myproxy-5.6.tar.gz
-/myproxy-5.8-gt5.2.tar.gz
-/myproxy-5.9-gt5.2.tar.gz
+/*.tar.gz
diff --git a/myproxy-deps.patch b/myproxy-deps.patch
new file mode 100644
index 0000000..223c3b0
--- /dev/null
+++ b/myproxy-deps.patch
@@ -0,0 +1,145 @@
+diff -ur myproxy-5.9.orig/pkgdata/pkg_data_src.gpt.in myproxy-5.9/pkgdata/pkg_data_src.gpt.in
+--- myproxy-5.9.orig/pkgdata/pkg_data_src.gpt.in	2012-07-24 02:50:39.000000000 +0200
++++ myproxy-5.9/pkgdata/pkg_data_src.gpt.in	2013-07-30 16:21:26.558816354 +0200
+@@ -12,49 +12,119 @@
+ <src_pkg>
+ 
+ <Source_Dependencies Type="compile">
++<Dependency Name="globus_core" >
++<Version>
++<Simple_Version Major="8"/>
++</Version>
++</Dependency>
++<Dependency Name="globus_common" >
++<Version>
++<Simple_Version Major="14"/>
++</Version>
++</Dependency>
+ <Dependency Name="globus_gss_assist" >
+ <Version>
+-<Simple_Version Major="3"/>
+ <Simple_Version Major="8"/>
+ </Version>
+ </Dependency>
++<Dependency Name="globus_gssapi_gsi" >
++<Version>
++<Simple_Version Major="9"/>
++</Version>
++</Dependency>
++<Dependency Name="globus_gsi_callback" >
++<Version>
++<Simple_Version Major="4"/>
++</Version>
++</Dependency>
++<Dependency Name="globus_gsi_cert_utils" >
++<Version>
++<Simple_Version Major="8"/>
++</Version>
++</Dependency>
++<Dependency Name="globus_gsi_credential" >
++<Version>
++<Simple_Version Major="5"/>
++</Version>
++</Dependency>
++<Dependency Name="globus_gsi_proxy_core" >
++<Version>
++<Simple_Version Major="6"/>
++</Version>
++</Dependency>
++<Dependency Name="globus_gsi_sysconfig" >
++<Version>
++<Simple_Version Major="5"/>
++</Version>
++</Dependency>
+ <Dependency Name="globus_usage" >
+ <Version>
+-<Simple_Version Major="0"/>
+ <Simple_Version Major="3"/>
+ </Version>
+ </Dependency>
+ </Source_Dependencies>
+ 
+ <Source_Dependencies Type="lib_link">
++<Dependency Name="globus_common" >
++<Version>
++<Simple_Version Major="14"/>
++</Version>
++</Dependency>
+ <Dependency Name="globus_gss_assist" >
+ <Version>
+-<Simple_Version Major="3"/>
+ <Simple_Version Major="8"/>
+ </Version>
+ </Dependency>
+-</Source_Dependencies>
+-
+-<Source_Dependencies Type="lib_link">
+ <Dependency Name="globus_gssapi_gsi" >
+ <Version>
+-<Version_Range Lower_Minor="2" Upper_Minor="42" Upper_Major="3" Lower_Major="3" />
+-<Simple_Version Major="4"/>
+ <Simple_Version Major="9"/>
+ </Version>
+ </Dependency>
++<Dependency Name="globus_gsi_callback" >
++<Version>
++<Simple_Version Major="4"/>
++</Version>
++</Dependency>
++<Dependency Name="globus_gsi_cert_utils" >
++<Version>
++<Simple_Version Major="8"/>
++</Version>
++</Dependency>
++<Dependency Name="globus_gsi_credential" >
++<Version>
++<Simple_Version Major="5"/>
++</Version>
++</Dependency>
++<Dependency Name="globus_gsi_proxy_core" >
++<Version>
++<Simple_Version Major="6"/>
++</Version>
++</Dependency>
++<Dependency Name="globus_gsi_sysconfig" >
++<Version>
++<Simple_Version Major="5"/>
++</Version>
++</Dependency>
+ </Source_Dependencies>
+ 
+ <Source_Dependencies Type="pgm_link">
+-<Dependency Name="globus_gss_assist" >
++<Dependency Name="globus_common" >
++<Version>
++<Simple_Version Major="14"/>
++</Version>
++</Dependency>
++<Dependency Name="globus_gsi_cert_utils" >
+ <Version>
+-<Simple_Version Major="3"/>
+ <Simple_Version Major="8"/>
+ </Version>
+ </Dependency>
++<Dependency Name="globus_gsi_sysconfig" >
++<Version>
++<Simple_Version Major="5"/>
++</Version>
++</Dependency>
+ <Dependency Name="globus_usage" >
+ <Version>
+-<Simple_Version Major="0"/>
+ <Simple_Version Major="3"/>
+ </Version>
+ </Dependency>
+@@ -63,9 +133,7 @@
+ <Source_Dependencies Type="pgm_runtime" >
+ <Dependency Name="globus_proxy_utils" Package="pgm">
+ <Version>
+-<Version_Range Lower_Minor="2" Upper_Minor="42" Upper_Major="0" Lower_Major="0" />
+-<Simple_Version Major="1" />
+-<Simple_Version Major="5" />
++<Simple_Version Major="5"/>
+ </Version>
+ </Dependency>
+ </Source_Dependencies>
diff --git a/myproxy.spec b/myproxy.spec
index 9469afe..41e8711 100644
--- a/myproxy.spec
+++ b/myproxy.spec
@@ -1,12 +1,12 @@
 %{!?_initddir: %global _initddir %{_initrddir}}
 
-%if 0%{?el5}%{?el6}
-%global with_sysv 1
-%else
+%if %{?fedora}%{!?fedora:0} >= 17 || %{?rhel}%{!?rhel:0} >= 7
 %global with_sysv 0
+%else
+%global with_sysv 1
 %endif
 
-%ifarch aarch64 alpha ia64 ppc64 s390x sparc64 x86_64 
+%ifarch aarch64 alpha ia64 ppc64 s390x sparc64 x86_64
 %global flavor gcc64
 %else
 %global flavor gcc32
@@ -14,12 +14,14 @@
 
 %global with_checks 1
 
+%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
+
 Name:           myproxy
 Version:        5.9
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Manage X.509 Public Key Infrastructure (PKI) security credentials
 
-Group:          System Environment/Daemons
+Group:          Applications/Internet
 License:        NCSA and BSD and ASL 2.0
 URL:            http://grid.ncsa.illinois.edu/myproxy/
 Source0:        http://downloads.sourceforge.net/cilogon/myproxy-%{version}-gt5.2.tar.gz
@@ -28,101 +30,111 @@ Source2:        myproxy.sysconfig
 Source4:        myproxy-server-tmpfiles.d.conf
 Source5:        myproxy-server.service
 Source3:        README.Fedora
-
-
+#               Depend on GT5.2+ versions of globus packages
+#               http://jira.globus.org/browse/GT-502
+Patch0:         %{name}-deps.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildRequires:  globus-core%{?_isa} > 8
-BuildRequires:  globus-common-devel%{?_isa} > 14
-BuildRequires:  globus-gss-assist-devel%{?_isa} > 8
-BuildRequires:  globus-usage-devel%{?_isa} > 3
-BuildRequires:  pam-devel%{?_isa}
-BuildRequires:  graphviz
-BuildRequires:  voms-devel%{?_isa} >= 1.9.12.1
-BuildRequires:  cyrus-sasl-devel%{?_isa}
-BuildRequires:  openldap-devel%{?_isa} >= 2.3
-BuildRequires:  grid-packaging-tools > 3.4
+BuildRequires:  grid-packaging-tools >= 3.4
+BuildRequires:  globus-core >= 8
+BuildRequires:  globus-gsi-credential-devel >= 5
+BuildRequires:  globus-gsi-callback-devel >= 4
+BuildRequires:  globus-gss-assist-devel >= 8
+BuildRequires:  globus-gsi-proxy-core-devel >= 6
+BuildRequires:  globus-gssapi-gsi-devel >= 9
+BuildRequires:  globus-gsi-cert-utils-devel >= 8
+BuildRequires:  globus-gsi-sysconfig-devel >= 5
+BuildRequires:  globus-common-devel >= 14
+BuildRequires:  globus-usage-devel >= 3
 BuildRequires:  doxygen
-
-%if 0%{?with_checks}
-BuildRequires:  globus-proxy-utils
-BuildRequires:  globus-gsi-cert-utils-progs
-BuildRequires:  voms-clients
-%endif
-
-
+BuildRequires:  graphviz
 %if "%{?rhel}" == "5"
-BuildRequires: graphviz-gd
+BuildRequires:  graphviz-gd
 %endif
-
+BuildRequires:  ghostscript
 BuildRequires:  tex(latex)
-%if ! 0%{?el5}%{?el6}
+%if %{?fedora}%{!?fedora:0} >= 18 || %{?rhel}%{!?rhel:0} >= 7
+BuildRequires:  tex(fullpage.sty)
+BuildRequires:  tex(multirow.sty)
 BuildRequires:  tex(sectsty.sty)
 BuildRequires:  tex(tocloft.sty)
 BuildRequires:  tex(xtab.sty)
-BuildRequires:  tex(multirow.sty)
-BuildRequires:  tex(fullpage.sty)
-BuildRequires:  tex(ecrm1000.tfm)
-BuildRequires:  tex(phvr8t.tfm)
-BuildRequires:  tex(zptmcm7t.tfm)
+BuildRequires:  tex-ec
+BuildRequires:  tex-courier
+BuildRequires:  tex-helvetic
+BuildRequires:  tex-times
+BuildRequires:  tex-symbol
+BuildRequires:  tex-rsfs
 %endif
-
-
-Requires:      myproxy-libs = %{version}-%{release}
-Requires:      globus-proxy-utils
-Requires:      voms-clients
-
-Obsoletes:     myproxy-client < 5.1-3
-Provides:      myproxy-client = %{version}-%{release}
+BuildRequires:  cyrus-sasl-devel
+BuildRequires:  openldap-devel >= 2.3
+BuildRequires:  pam-devel
+BuildRequires:  voms-devel >= 1.9.12.1
+%if %{?with_checks}
+BuildRequires:  globus-proxy-utils
+BuildRequires:  globus-gsi-cert-utils-progs
+BuildRequires:  voms-clients
+%endif
+Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
+Requires:       globus-proxy-utils
+Requires:       voms-clients
+Obsoletes:      %{name}-client < 5.1-3
+Provides:       %{name}-client = %{version}-%{release}
 
 %description
-MyProxy is open source software for managing X.509 Public Key Infrastructure 
-(PKI) security credentials (certificates and private keys). MyProxy 
-combines an online credential repository with an online certificate 
+MyProxy is open source software for managing X.509 Public Key Infrastructure
+(PKI) security credentials (certificates and private keys). MyProxy
+combines an online credential repository with an online certificate
 authority to allow users to securely obtain credentials when and where needed.
-Users run myproxy-logon to authenticate and obtain credentials, including 
-trusted CA certificates and Certificate Revocation Lists (CRLs). 
+Users run myproxy-logon to authenticate and obtain credentials, including
+trusted CA certificates and Certificate Revocation Lists (CRLs).
 
 %package libs
-Summary:       Manage X.509 Public Key Infrastructure (PKI) security credentials 
-Group:         System Environment/Daemons
-Obsoletes:     myproxy < 5.1-3
+Summary:        Manage X.509 Public Key Infrastructure (PKI) security credentials
+Group:          System Environment/Libraries
+Obsoletes:      %{name} < 5.1-3
 
 %description libs
-MyProxy is open source software for managing X.509 Public Key Infrastructure 
-(PKI) security credentials (certificates and private keys). MyProxy 
-combines an online credential repository with an online certificate 
+MyProxy is open source software for managing X.509 Public Key Infrastructure
+(PKI) security credentials (certificates and private keys). MyProxy
+combines an online credential repository with an online certificate
 authority to allow users to securely obtain credentials when and where needed.
-Users run myproxy-logon to authenticate and obtain credentials, including 
-trusted CA certificates and Certificate Revocation Lists (CRLs). 
+Users run myproxy-logon to authenticate and obtain credentials, including
+trusted CA certificates and Certificate Revocation Lists (CRLs).
 
 Package %{name}-libs contains runtime libs for MyProxy.
 
 %package devel
-Requires:      myproxy-libs = %{version}-%{release}
-# in .el5 this dependency is not picked up
-# automatically via pkgconfig
-%if  0%{?el5}
-Requires:      globus-gss-assist-devel > 3
-Requires:      globus-usage-devel
-%endif
-
-Summary:       Develop X.509 Public Key Infrastructure (PKI) security credentials 
-Group:         System Environment/Daemons
+Summary:        Develop X.509 Public Key Infrastructure (PKI) security credentials
+Group:          Development/Libraries
+Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
+Requires:       globus-gsi-credential-devel%{?_isa} >= 5
+Requires:       globus-gsi-callback-devel%{?_isa} >= 4
+Requires:       globus-gss-assist-devel%{?_isa} >= 8
+Requires:       globus-gsi-proxy-core-devel%{?_isa} >= 6
+Requires:       globus-gssapi-gsi-devel%{?_isa} >= 9
+Requires:       globus-core%{?_isa} >= 8
+Requires:       globus-gsi-cert-utils-devel%{?_isa} >= 8
+Requires:       globus-gsi-sysconfig-devel%{?_isa} >= 5
+Requires:       globus-common-devel%{?_isa} >= 14
+Requires:       globus-usage-devel%{?_isa} >= 3
 
 %description devel
-MyProxy is open source software for managing X.509 Public Key Infrastructure 
-(PKI) security credentials (certificates and private keys). MyProxy 
-combines an online credential repository with an online certificate 
+MyProxy is open source software for managing X.509 Public Key Infrastructure
+(PKI) security credentials (certificates and private keys). MyProxy
+combines an online credential repository with an online certificate
 authority to allow users to securely obtain credentials when and where needed.
-Users run myproxy-logon to authenticate and obtain credentials, including 
-trusted CA certificates and Certificate Revocation Lists (CRLs). 
+Users run myproxy-logon to authenticate and obtain credentials, including
+trusted CA certificates and Certificate Revocation Lists (CRLs).
 
 Package %{name}-devel contains development files for MyProxy.
 
 %package server
+Summary:        Server for X.509 Public Key Infrastructure (PKI) security credentials
+Group:          System Environment/Daemons
+Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
 Requires(pre):    shadow-utils
-%if 0%{?with_sysv}
+%if %{?with_sysv}
 Requires(post):   chkconfig
 Requires(preun):  chkconfig
 Requires(preun):  initscripts
@@ -132,59 +144,60 @@ Requires(post):   systemd
 Requires(preun):  systemd
 Requires(postun): systemd
 %endif
-Requires:         myproxy-libs = %{version}-%{release}
-Summary:          Server for X.509 Public Key Infrastructure (PKI) security credentials 
-Group:            System Environment/Daemons
 
 %description server
-MyProxy is open source software for managing X.509 Public Key Infrastructure 
-(PKI) security credentials (certificates and private keys). MyProxy 
-combines an online credential repository with an online certificate 
+MyProxy is open source software for managing X.509 Public Key Infrastructure
+(PKI) security credentials (certificates and private keys). MyProxy
+combines an online credential repository with an online certificate
 authority to allow users to securely obtain credentials when and where needed.
-Users run myproxy-logon to authenticate and obtain credentials, including 
-trusted CA certificates and Certificate Revocation Lists (CRLs). 
+Users run myproxy-logon to authenticate and obtain credentials, including
+trusted CA certificates and Certificate Revocation Lists (CRLs).
 
 Package %{name}-server contains the MyProxy server.
 
-# Create a sepeate admin clients package since they
-# not needed for normal operation and pull in
-# a load of perl dependencies.
-%package       admin
-Requires:      myproxy-server = %{version}-%{release}
-Requires:      myproxy-libs   = %{version}-%{release}
-Requires:      myproxy = %{version}-%{release}
-Requires:      globus-gsi-cert-utils-progs
-Summary:       Server for X.509 Public Key Infrastructure (PKI) security credentials 
-Group:         System Environment/Daemons
+%package admin
+# Create a sepeate admin clients package since they not needed for normal
+# operation and pull in a load of perl dependencies.
+Summary:        Server for X.509 Public Key Infrastructure (PKI) security credentials
+Group:          Applications/Internet
+Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
+Requires:       %{name} = %{version}-%{release}
+Requires:       %{name}-server = %{version}-%{release}
+Requires:       globus-gsi-cert-utils-progs
 
 %description admin
-MyProxy is open source software for managing X.509 Public Key Infrastructure 
-(PKI) security credentials (certificates and private keys). MyProxy 
-combines an online credential repository with an online certificate 
+MyProxy is open source software for managing X.509 Public Key Infrastructure
+(PKI) security credentials (certificates and private keys). MyProxy
+combines an online credential repository with an online certificate
 authority to allow users to securely obtain credentials when and where needed.
-Users run myproxy-logon to authenticate and obtain credentials, including 
-trusted CA certificates and Certificate Revocation Lists (CRLs). 
+Users run myproxy-logon to authenticate and obtain credentials, including
+trusted CA certificates and Certificate Revocation Lists (CRLs).
 
 Package %{name}-admin contains the MyProxy server admin commands.
 
 %package doc
-Requires:      myproxy = %{version}-%{release}
-Summary:       Documentation for X.509 Public Key Infrastructure (PKI) security credentials 
-Group:         Documentation
+Summary:        Documentation for X.509 Public Key Infrastructure (PKI) security credentials
+Group:          Documentation
+%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
+BuildArch:      noarch
+%endif
+Requires:       %{name}-libs = %{version}-%{release}
 
 %description doc
-MyProxy is open source software for managing X.509 Public Key Infrastructure 
-(PKI) security credentials (certificates and private keys). MyProxy 
-combines an online credential repository with an online certificate 
+MyProxy is open source software for managing X.509 Public Key Infrastructure
+(PKI) security credentials (certificates and private keys). MyProxy
+combines an online credential repository with an online certificate
 authority to allow users to securely obtain credentials when and where needed.
-Users run myproxy-logon to authenticate and obtain credentials, including 
-trusted CA certificates and Certificate Revocation Lists (CRLs). 
+Users run myproxy-logon to authenticate and obtain credentials, including
+trusted CA certificates and Certificate Revocation Lists (CRLs).
 
 Package %{name}-doc contains the MyProxy documentation.
 
 %prep
 %setup -q
-%if 0%{?with_sysv}
+%patch0 -p1
+
+%if %{?with_sysv}
 cp -p %{SOURCE1} .   #myproxy.init
 cp -p %{SOURCE2} .   #myproxy.sysconfig
 %else
@@ -194,10 +207,12 @@ cp -p %{SOURCE5} .   #myproxy-server.service
 cp -p %{SOURCE3} .   #README.Fedora.
 
 %build
+# Remove files that should be replaced during bootstrap
 rm -f doxygen/Doxyfile*
 rm -f doxygen/Makefile.am
 rm -f pkgdata/Makefile.am
 rm -f globus_automake*
+rm -rf autom4te.cache
 
 for f in `find . -name Makefile.am` ; do
   sed -e 's!^flavorinclude_HEADERS!include_HEADERS!' \
@@ -205,17 +220,16 @@ for f in `find . -name Makefile.am` ; do
       -e 's!^\(lib[a-zA-Z_]*\)___GLOBUS_FLAVOR_NAME__la_!\1_la_!' -i $f
 done
 
-%{_datadir}/globus/globus-bootstrap.sh
-
 unset GLOBUS_LOCATION
 unset GPT_LOCATION
+%{_datadir}/globus/globus-bootstrap.sh
 
 %configure --disable-static --with-flavor=%{flavor} \
-           --enable-doxygen --with-docdir=%{_docdir}/%{name}-doc-%{version} \
-           --with-openldap=%{_usr} \
-           --with-voms=%{_usr} \
-           --with-kerberos5=%{_usr} \
-           --with-sasl2=%{_usr}
+           --enable-doxygen --with-docdir=%{_pkgdocdir} \
+           --with-openldap=%{_prefix} \
+           --with-voms=%{_prefix} \
+           --with-kerberos5=%{_prefix} \
+           --with-sasl2=%{_prefix}
 
 # Reduce overlinking
 sed 's!CC -shared !CC \${wl}--as-needed -shared !g' -i libtool
@@ -228,95 +242,103 @@ make install DESTDIR=%{buildroot}
 
 GLOBUSPACKAGEDIR=%{buildroot}%{_datadir}/globus/packages
 
-# Remove libtool libraries (.a files)
-find %{buildroot}%{_libdir} -name 'lib*.a' -exec rm -v '{}' \;
+# Remove libtool archives (.la files)
 find %{buildroot}%{_libdir} -name 'lib*.la' -exec rm -v '{}' \;
-sed '/lib.*\.a$/d' -i $GLOBUSPACKAGEDIR/%{name}/%{flavor}_dev.filelist
 sed '/lib.*\.la$/d' -i $GLOBUSPACKAGEDIR/%{name}/%{flavor}_dev.filelist
 
 # Put documentation in Fedora defaults and alter GPT package lists.
-mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-doc-%{version}/extras
+mkdir -p %{buildroot}%{_pkgdocdir}/extras
 for FILE in login.html myproxy-accepted-credentials-mapapp \
             myproxy-cert-checker myproxy-certificate-mapapp \
             myproxy-certreq-checker myproxy-crl.cron myproxy.cron \
             myproxy-get-delegation.cgi myproxy-get-trustroots.cron \
-            myproxy-passphrase-policy myproxy-revoke
-do
-   mv %{buildroot}%{_usr}/share/%{name}/$FILE \
-      %{buildroot}%{_defaultdocdir}/%{name}-doc-%{version}/extras
-   sed "s!%{name}/${FILE}!doc/%{name}-doc-%{version}/extras/${FILE}!" \
-      -i $GLOBUSPACKAGEDIR/%{name}/noflavor_data.filelist
+            myproxy-passphrase-policy myproxy-revoke ; do
+   mv %{buildroot}%{_datadir}/%{name}/$FILE %{buildroot}%{_pkgdocdir}/extras
+   shortpkgdocdir=`sed 's!^%{_prefix}!!' <<< %{_pkgdocdir}`
+   sed -i "s!/share/%{name}/${FILE}!${shortpkgdocdir}/extras/${FILE}!" \
+      $GLOBUSPACKAGEDIR/%{name}/noflavor_data.filelist
 done
 
-mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}
-for FILE in INSTALL LICENSE LICENSE.* PROTOCOL README VERSION
-do
-  mv  %{buildroot}%{_usr}/share/%{name}/$FILE \
-      %{buildroot}%{_defaultdocdir}/%{name}-%{version}/.
-  sed -i "s!%{name}/${FILE}!doc/%{name}-%{version}/${FILE}!" $GLOBUSPACKAGEDIR/%{name}/noflavor_data.filelist
+mkdir -p %{buildroot}%{_pkgdocdir}
+for FILE in LICENSE LICENSE.* PROTOCOL README VERSION ; do
+   mv %{buildroot}%{_datadir}/%{name}/$FILE %{buildroot}%{_pkgdocdir}
+   shortpkgdocdir=`sed 's!^%{_prefix}!!' <<< %{_pkgdocdir}`
+   sed -i "s!/share/%{name}/${FILE}!${shortpkgdocdir}/${FILE}!" \
+      $GLOBUSPACKAGEDIR/%{name}/noflavor_data.filelist
 done
 
 # Remove irrelavent example configuration files.
-for FILE in etc.inetd.conf.modifications etc.init.d.myproxy.nonroot etc.services.modifications  \
-            etc.xinetd.myproxy etc.init.d.myproxy
-do
-  rm %{buildroot}%{_usr}/share/%{name}/$FILE
-  sed -i "/share\/%{name}\/$FILE/d" $GLOBUSPACKAGEDIR/%{name}/noflavor_data.filelist
+for FILE in etc.inetd.conf.modifications etc.init.d.myproxy.nonroot \
+            etc.services.modifications etc.xinetd.myproxy \
+            etc.init.d.myproxy ; do
+   rm %{buildroot}%{_datadir}/%{name}/$FILE
+   sed -i "/share\/%{name}\/$FILE/d" \
+      $GLOBUSPACKAGEDIR/%{name}/noflavor_data.filelist
 done
 
 # Move example configuration file into place.
 mkdir -p %{buildroot}%{_sysconfdir}
 mv %{buildroot}%{_datadir}/%{name}/myproxy-server.config \
    %{buildroot}%{_sysconfdir}
-sed -i "/share\/%{name}\/myproxy-server.config/d" $GLOBUSPACKAGEDIR/%{name}/noflavor_data.filelist
+sed -i "/share\/%{name}\/myproxy-server.config/d" \
+   $GLOBUSPACKAGEDIR/%{name}/noflavor_data.filelist
 
-%if 0%{with_sysv}
+%if %{with_sysv}
 mkdir -p %{buildroot}%{_initddir}
 mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
-install  -m 755 myproxy.init %{buildroot}%{_initddir}/myproxy-server
-install  -m 644 myproxy.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/myproxy-server
+install -p -m 755 myproxy.init %{buildroot}%{_initddir}/myproxy-server
+install -p -m 644 myproxy.sysconfig \
+   %{buildroot}%{_sysconfdir}/sysconfig/myproxy-server
 %else
 mkdir -p %{buildroot}%{_unitdir}
 mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
-install -m 0644 -p myproxy-server-tmpfiles.d.conf %{buildroot}%{_sysconfdir}/tmpfiles.d/myproxy-server.conf
-install -p -m 0644 myproxy-server.service %{buildroot}%{_unitdir}/myproxy-server.service
-mkdir -p %{buildroot}%{_localstatedir}/run/
-install -d -m 0710 %{buildroot}%{_localstatedir}/run/myproxy-server/
+install -p -m 644 myproxy-server-tmpfiles.d.conf \
+   %{buildroot}%{_sysconfdir}/tmpfiles.d/myproxy-server.conf
+install -p -m 644 myproxy-server.service \
+   %{buildroot}%{_unitdir}/myproxy-server.service
+mkdir -p %{buildroot}%{_localstatedir}/run
+install -d -m 710 %{buildroot}%{_localstatedir}/run/myproxy-server
 %endif
 
-mkdir -p %{buildroot}%{_var}/lib/myproxy
+mkdir -p %{buildroot}%{_localstatedir}/lib/myproxy
 
 # Create a directory to hold myproxy owned host certificates.
 mkdir -p %{buildroot}%{_sysconfdir}/grid-security/myproxy
 
 # Upstream now includes systemd files, good. Delete them for
 # now and migrate to them shortly.
-rm %{buildroot}%{_prefix}/share/myproxy/myproxy-server.conf
-rm %{buildroot}%{_prefix}/share/myproxy/myproxy-server.service
+for FILE in myproxy-server.conf myproxy-server.service ; do
+   rm %{buildroot}%{_datadir}/%{name}/$FILE
+   sed -i "/share\/%{name}\/$FILE/d" \
+      $GLOBUSPACKAGEDIR/%{name}/noflavor_data.filelist
+done
 
-# pm myproxy-server-setup rhbz#671561
+# Remove myproxy-server-setup rhbz#671561
 rm %{buildroot}%{_sbindir}/myproxy-server-setup
+sed -i "/sbin\/myproxy-server-setup/d" \
+   $GLOBUSPACKAGEDIR/%{name}/%{flavor}_pgm.filelist
 
 %clean
 rm -rf %{buildroot}
 
-%check 
-%if 0%{?with_checks}
+%check
+%if %{?with_checks}
 PATH=.:$PATH ./myproxy-test -startserver -generatecerts
 %endif
 
 %post libs -p /sbin/ldconfig
+
 %postun libs -p /sbin/ldconfig
 
 # uid:gid 178:178 now reserved for myproxy. rhbz#733671
 %pre server
 getent group myproxy >/dev/null || groupadd -g 178 -r myproxy
 getent passwd myproxy >/dev/null || \
-useradd -u 178 -r -g myproxy -d %{_var}/lib/myproxy -s /sbin/nologin \
-   -c "User to run the MyProxy service" myproxy
+useradd -u 178 -r -g myproxy -d %{_localstatedir}/lib/myproxy \
+    -s /sbin/nologin -c "User to run the MyProxy service" myproxy
 exit 0
 
-%if 0%{?with_sysv}
+%if %{?with_sysv}
 %post server
 /sbin/chkconfig --add myproxy-server
 %else
@@ -324,10 +346,10 @@ exit 0
 %systemd_post myproxy-server.service
 %endif
 
-%if 0%{?with_sysv}
+%if %{?with_sysv}
 %preun server
-if [ $1 -eq 0 ] ; then   #Package removal, not upgrade
-    /sbin/service myproxy-server stop >/dev/null 2>&1
+if [ $1 -eq 0 ] ; then
+    /sbin/service myproxy-server stop >/dev/null 2>&1 || :
     /sbin/chkconfig --del myproxy-server
 fi
 %else
@@ -335,10 +357,9 @@ fi
 %systemd_preun myproxy-server.service
 %endif
 
-
-%if 0%{?with_sysv}
+%if %{?with_sysv}
 %postun server
-if [ "$1" -ge "1" ] ; then #Package removal, not upgrade
+if [ $1 -ge 1 ] ; then
     /sbin/service myproxy-server condrestart >/dev/null 2>&1 || :
 fi
 %else
@@ -346,9 +367,7 @@ fi
 %systemd_postun_with_restart myproxy-server.service
 %endif
 
-
 %files
-%defattr(-,root,root,-)
 %{_bindir}/myproxy-change-pass-phrase
 %{_bindir}/myproxy-destroy
 %{_bindir}/myproxy-get-delegation
@@ -358,47 +377,61 @@ fi
 %{_bindir}/myproxy-logon
 %{_bindir}/myproxy-retrieve
 %{_bindir}/myproxy-store
-
-%{_mandir}/man1/myproxy-change-pass-phrase.1.gz
-%{_mandir}/man1/myproxy-destroy.1.gz
-%{_mandir}/man1/myproxy-get-delegation.1.gz
-%{_mandir}/man1/myproxy-info.1.gz
-%{_mandir}/man1/myproxy-init.1.gz
-%{_mandir}/man1/myproxy-logon.1.gz
-%{_mandir}/man1/myproxy-retrieve.1.gz
-%{_mandir}/man1/myproxy-store.1.gz
-%doc %{_defaultdocdir}/%{name}-%{version}
+%{_mandir}/man1/myproxy-change-pass-phrase.1*
+%{_mandir}/man1/myproxy-destroy.1*
+%{_mandir}/man1/myproxy-get-delegation.1*
+%{_mandir}/man1/myproxy-info.1*
+%{_mandir}/man1/myproxy-init.1*
+%{_mandir}/man1/myproxy-logon.1*
+%{_mandir}/man1/myproxy-retrieve.1*
+%{_mandir}/man1/myproxy-store.1*
 
 %files libs
-%defattr(-,root,root,-)
 %{_datadir}/globus/packages/%{name}
 %{_libdir}/libmyproxy.so.*
+%dir %{_pkgdocdir}
+%doc %{_pkgdocdir}/LICENSE*
+%doc %{_pkgdocdir}/PROTOCOL
+%doc %{_pkgdocdir}/README
+%doc %{_pkgdocdir}/VERSION
+
+%files devel
+%{_includedir}/globus/myproxy.h
+%{_includedir}/globus/myproxy_authorization.h
+%{_includedir}/globus/myproxy_constants.h
+%{_includedir}/globus/myproxy_creds.h
+%{_includedir}/globus/myproxy_delegation.h
+%{_includedir}/globus/myproxy_log.h
+%{_includedir}/globus/myproxy_protocol.h
+%{_includedir}/globus/myproxy_read_pass.h
+%{_includedir}/globus/myproxy_sasl_client.h
+%{_includedir}/globus/myproxy_sasl_server.h
+%{_includedir}/globus/myproxy_server.h
+%{_includedir}/globus/verror.h
+%{_libdir}/libmyproxy.so
+%{_libdir}/pkgconfig/myproxy.pc
 
 %files server
-%defattr(-,root,root,-)
 %{_sbindir}/myproxy-server
-%if 0%{?with_sysv}
+%if %{?with_sysv}
 %{_initddir}/myproxy-server
-%config(noreplace)    %{_sysconfdir}/sysconfig/myproxy-server
+%config(noreplace) %{_sysconfdir}/sysconfig/myproxy-server
 %else
-%attr(0710,myproxy,root) %dir  %{_localstatedir}/run/myproxy-server/
+%attr(0710,myproxy,root) %dir %{_localstatedir}/run/myproxy-server
 %config(noreplace) %{_sysconfdir}/tmpfiles.d/myproxy-server.conf
 %{_unitdir}/myproxy-server.service
 %endif
-%config(noreplace)    %{_sysconfdir}/myproxy-server.config
-# myproxy-server wants exactly 700 permission on its data 
+%config(noreplace) %{_sysconfdir}/myproxy-server.config
+# myproxy-server wants exactly 700 permission on its data
 # which is just fine.
-%attr(0700,myproxy,myproxy) %dir %{_var}/lib/myproxy
+%attr(0700,myproxy,myproxy) %dir %{_localstatedir}/lib/myproxy
 %dir %{_sysconfdir}/grid-security
 %dir %{_sysconfdir}/grid-security/myproxy
-
-%{_mandir}/man8/myproxy-server.8.gz
-%{_mandir}/man5/myproxy-server.config.5.gz
-
+%{_mandir}/man8/myproxy-server.8*
+%{_mandir}/man5/myproxy-server.config.5*
 %doc README.Fedora
 
 %files admin
-%defattr(-,root,root,-)
 %{_sbindir}/myproxy-admin-addservice
 %{_sbindir}/myproxy-admin-adduser
 %{_sbindir}/myproxy-admin-change-pass
@@ -407,35 +440,27 @@ fi
 %{_sbindir}/myproxy-replicate
 %{_sbindir}/myproxy-test
 %{_sbindir}/myproxy-test-replicate
-%{_mandir}/man8/myproxy-admin-addservice.8.gz
-%{_mandir}/man8/myproxy-admin-adduser.8.gz
-%{_mandir}/man8/myproxy-admin-change-pass.8.gz
-%{_mandir}/man8/myproxy-admin-load-credential.8.gz
-%{_mandir}/man8/myproxy-admin-query.8.gz
-%{_mandir}/man8/myproxy-replicate.8.gz
+%{_mandir}/man8/myproxy-admin-addservice.8*
+%{_mandir}/man8/myproxy-admin-adduser.8*
+%{_mandir}/man8/myproxy-admin-change-pass.8*
+%{_mandir}/man8/myproxy-admin-load-credential.8*
+%{_mandir}/man8/myproxy-admin-query.8*
+%{_mandir}/man8/myproxy-replicate.8*
 
 %files doc
-%defattr(-,root,root,-)
-%doc %{_defaultdocdir}/%{name}-doc-%{version}
-
-%files devel
-%defattr(-,root,root,-)
-%{_includedir}/globus/myproxy.h
-%{_includedir}/globus/myproxy_authorization.h
-%{_includedir}/globus/myproxy_constants.h
-%{_includedir}/globus/myproxy_creds.h
-%{_includedir}/globus/myproxy_delegation.h
-%{_includedir}/globus/myproxy_log.h
-%{_includedir}/globus/myproxy_protocol.h
-%{_includedir}/globus/myproxy_read_pass.h
-%{_includedir}/globus/myproxy_sasl_client.h
-%{_includedir}/globus/myproxy_sasl_server.h
-%{_includedir}/globus/myproxy_server.h
-%{_includedir}/globus/verror.h
-%{_libdir}/libmyproxy.so
-%{_libdir}/pkgconfig/myproxy.pc
+%doc %{_pkgdocdir}/extras
+%doc %{_pkgdocdir}/html
+%doc %{_pkgdocdir}/refman.pdf
 
 %changelog
+* Thu Jan 23 2014 Mattias Ellert <mattias.ellert at fysast.uu.se> - 5.9-7
+- Depend on GT5.2+ versions of globus packages
+- Use _pkgdocdir when defined
+- Use non-ISA build dependencies
+- Make license files part of the -libs package
+- Make documentaion package noarch
+- Use better Group tags
+
 * Mon Aug 05 2013 Steve Traylen <steve.traylen at cern.ch> - 5.9-6
 - rhbz926187 - Build on aarch64 also.
 
@@ -452,8 +477,8 @@ fi
 - rpm .spec file parsing oddness.
 
 * Mon Dec 17 2012 Steve Traylen <steve.traylen at cern.ch> - 5.9-1
-- Update to 5.9 , update TeX build requirements.
-- remove myproxy-server-setup script, rhbz#671561. 
+- Update to 5.9, update TeX build requirements.
+- remove myproxy-server-setup script, rhbz#671561.
 - Switch to systemd scriptlet macros rhbz#850221.
 - Use reserved uid:gid for myproxy user rhbz#733671
 
@@ -461,15 +486,15 @@ fi
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
 * Thu Jun 21 2012 Steve Traylen <steve.traylen at cern.ch> - 5.8-1
-- Update to 5.8, source tar ball name change, drop 
+- Update to 5.8, source tar ball name change, drop
   myproxy-ssl1-tls.patch and myproxy-ssl1-2048bits.patch
   since upstream now.
 
 * Tue May 15 2012 Steve Traylen <steve.traylen at cern.ch> - 5.6-4
 - Add myproxy-ssl1-tls.patch and myproxy-ssl1-2048bits.patch.
 
-* Mon Mar 5 2012 Steve Traylen <steve.traylen at cern.ch> - 5.6-3
-- tmpfile.d configuration does not support comments and must 
+* Mon Mar 05 2012 Steve Traylen <steve.traylen at cern.ch> - 5.6-3
+- tmpfile.d configuration does not support comments and must
   be 0644
 
 * Tue Feb 28 2012 Steve Traylen <steve.traylen at cern.ch> - 5.6-2
@@ -477,27 +502,26 @@ fi
 - Silly mistakes.
 
 * Thu Feb 23 2012 Steve Traylen <steve.traylen at cern.ch> - 5.6-1
-- Update myproxy to 5.6, remove addition ColocateLibraries="no" 
+- Update myproxy to 5.6, remove addition ColocateLibraries="no"
   since added upstream.
 - Support systemd for epel7 and fedora17 and up:
   http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=7240
 - Switch from RPM_BUILD_ROOT to %%buildroot.
 
-
-* Thu Feb 2 2012 Steve Traylen <steve.traylen at cern.ch> - 5.5-3
+* Thu Feb 02 2012 Steve Traylen <steve.traylen at cern.ch> - 5.5-3
 - Drop EPEL4 packaging since EOL.
 - Adapt to Globus toolkit 5.2
 
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 5.5-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
-* Sat Oct 1 2011 Steve Traylen <steve.traylen at cern.ch> - 5.5-1
+* Sat Oct 01 2011 Steve Traylen <steve.traylen at cern.ch> - 5.5-1
 - Update to version 5.5, drop myproxy-globus-7129.patch, pII, pIII,
   fixed upstream.
 - No longer hard code /var/lib/myproxy since the default anyway now.
 
-* Thu Sep 1 2011 Steve Traylen <steve.traylen at cern.ch> - 5.4-4
-- Add myproxy-globus-7129-PartII.patch patch and 
+* Thu Sep 01 2011 Steve Traylen <steve.traylen at cern.ch> - 5.4-4
+- Add myproxy-globus-7129-PartII.patch patch and
   myproxy-globus-7129-PartIII.patch patch.
 
 * Wed Aug 31 2011 Steve Traylen <steve.traylen at cern.ch> - 5.4-3
@@ -513,25 +537,25 @@ fi
 - Drop myproxy-test-home2tmp.patch since upstream.
 - Update to 5.4
 
-* Tue Mar 1 2011 Steve Traylen <steve.traylen at cern.ch> - 5.3-7
+* Tue Mar 01 2011 Steve Traylen <steve.traylen at cern.ch> - 5.3-7
 - Add myproxy-test-home2tmp.patch to avoid %%script
   writing in home.
 
 * Mon Feb 28 2011 Steve Traylen <steve.traylen at cern.ch> - 5.3-6
 - Remove myproxy-test-disables-globus-7135.patch since
-  checks now run with a clean CA/grid-security  directory
+  checks now run with a clean CA/grid-security directory
   and work.
 - Add myproxy-double-free-globus-7135.patch to
   remove double free in myproxy-creds.ch. globus bug #7135.
 
 * Sat Feb 26 2011 Steve Traylen <steve.traylen at cern.ch> - 5.3-5
-- Globus bug #7135 only applies to myproxy-test in .spec files so 
+- Globus bug #7135 only applies to myproxy-test in .spec files so
   patch private copy in RPM rather than eventual deployed
   myproxy-test.
 
 * Thu Feb 24 2011 Steve Traylen <steve.traylen at cern.ch> - 5.3-4
 - Remove useless gpt filelists check from %%check.
-- Add useful check myproxy-test to %%check. 
+- Add useful check myproxy-test to %%check.
 
 * Tue Feb 22 2011 Steve Traylen <steve.traylen at cern.ch> - 5.3-3
 - myproxy-vomsc-vomsapi.patch to build against vomsapi rather
@@ -547,48 +571,60 @@ fi
 * Wed Jun 23 2010 Steve Traylen <steve.traylen at cern.ch> - 5.2-1
 - New upstream 5.2.
 - Drop blocked-signals-with-pthr.patch patch.
+
 * Sat Jun 12 2010 Steve Traylen <steve.traylen at cern.ch> - 5.1-3
 - Add blocked-signals-with-pthr.patch patch, rhbz#602594
 - Updated init.d script rhbz#603157
 - Add myproxy as requires to myproxy-admin to install clients.
+
 * Sat May 15 2010 Steve Traylen <steve.traylen at cern.ch> - 5.1-2
 - rhbz#585189 rearrange packaging.
-  clients moved from now obsoleted -client package 
+  clients moved from now obsoleted -client package
   to main package.
   libs moved from main package to new libs package.
-* Tue Mar 9 2010 Steve Traylen <steve.traylen at cern.ch> - 5.1-1
+
+* Tue Mar 09 2010 Steve Traylen <steve.traylen at cern.ch> - 5.1-1
 - New upstream 5.1
 - Remove globus-globus-usage-location.patch, now incoperated
   upstream.
-* Fri Dec 4 2009 Steve Traylen <steve.traylen at cern.ch> - 5.0-1
+
+* Fri Dec 04 2009 Steve Traylen <steve.traylen at cern.ch> - 5.0-1
 - Add globus-globus-usage-location.patch
   https://bugzilla.mcs.anl.gov/globus/show_bug.cgi?id=6897
 - Addition of globus-usage-devel to BR.
 - New upstream 5.0
 - Upstream source hosting changed from globus to sourceforge.
+
 * Fri Nov 13 2009 Steve Traylen <steve.traylen at cern.ch> - 4.9-6
 - Add requires globus-gsi-cert-utils-progs for grid-proxy-info
   to myproxy-admin package rhbz#536927
-- Release bump to F13  so as to be newer than F12.
+- Release bump to F13 so as to be newer than F12.
+
 * Tue Oct 13 2009 Steve Traylen <steve.traylen at cern.ch> - 4.9-3
 - Glob on .so.* files to future proof for upgrades.
+
 * Tue Oct 13 2009 Steve Traylen <steve.traylen at cern.ch> - 4.9-1
 - New upstream 4.9.
+
 * Tue Oct 13 2009 Steve Traylen <steve.traylen at cern.ch> - 4.8-5
 - Disable openldap support for el4 only since openldap to old.
-* Wed Oct 7 2009 Steve Traylen <steve.traylen at cern.ch> -  4.8-4
+
+* Wed Oct 07 2009 Steve Traylen <steve.traylen at cern.ch> - 4.8-4
 - Add ASL 2.0 license as well.
 - Explicitly add /etc/grid-security to files list
-- For .el4/5 build only add globus-gss-assist-devel as requirment 
+- For .el4/5 build only add globus-gss-assist-devel as requirment
   to myproxy-devel package.
-* Thu Oct 1 2009 Steve Traylen <steve.traylen at cern.ch> -  4.8-3
+
+* Thu Oct 01 2009 Steve Traylen <steve.traylen at cern.ch> - 4.8-3
 - Set _initddir for .el4 and .el5 building.
-* Mon Sep 21 2009 Steve Traylen <steve.traylen at cern.ch> -  4.8-2
+
+* Mon Sep 21 2009 Steve Traylen <steve.traylen at cern.ch> - 4.8-2
 - Require version of voms with fixed ABI.
-* Thu Sep 10 2009 Steve Traylen <steve.traylen at cern.ch> -  4.8-1
+
+* Thu Sep 10 2009 Steve Traylen <steve.traylen at cern.ch> - 4.8-1
 - Increase version to upstream 4.8
-- Remove  voms-header-location.patch since fixed upstream now.
+- Remove voms-header-location.patch since fixed upstream now.
 - Include directory /etc/grid-security/myproxy
-* Mon Jun 22 2009 Steve Traylen <steve.traylen at cern.ch> -  4.7-1
-- Initial version.
 
+* Mon Jun 22 2009 Steve Traylen <steve.traylen at cern.ch> - 4.7-1
+- Initial version.


More information about the scm-commits mailing list