#2 Use explicit --with-python=/usr/bin/python2 in configure (fixes rawhide)
Merged a year ago by okeeble. Opened 2 years ago by ellert.
rpms/ ellert/lcgdm fix-buiid  into  master

@@ -1,13 +0,0 @@ 

- Index: dpm/dpm-listspaces

- ===================================================================

- --- dpm/dpm-listspaces	(revision 10742)

- +++ dpm/dpm-listspaces	(revision 11102)

- @@ -802,7 +802,7 @@

-          if params.enabled():

-            self.control['srmv2'] = params

-        # self.interface is for webdav/xroot

- -      if webdav:

- +      if webdav and subprocess.Popen("grep -sF mod_lcgdm_dav.so /proc/`pgrep -ox -u root httpd.event`/maps",shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]:

-          params = Interface(name='webdav',protocol="https",port=webdav,version=self.version, semantics='http://tools.ietf.org/html/rfc4918')

-          if params.enabled():

-            self.access['webdav'] = {'protocol': 'https', 'port': webdav, 'version': self.version, 'security': 'GSI' }

file modified
+138 -209

@@ -1,30 +1,6 @@ 

- %{!?perl_vendorarch: %global perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)}

- %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")}

- 

- %if %{?rhel}%{!?rhel:0} == 5

- %global _with_swig %(echo "--py-dontrunswig")

- %global altpython python26

- %global __altpython %{_bindir}/python2.6

- # Disable the default python byte compilation

- %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')

- %endif

- 

- %if %{?fedora}%{!?fedora:0} >= 13

- %global altpython python3

- %global __altpython %{_bindir}/python3

- %endif

- 

- %if %{?altpython:1}%{!?altpython:0}

- %global altpython_sitearch %(%{__altpython} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")

- %endif

- 

- %if %{?filter_setup:1}%{!?filter_setup:0}

- %filter_provides_in %{_libdir}/lcgdm/.*\.so$

+ %if %{?rhel}%{!?rhel:0} == 6

  %filter_provides_in %{perl_vendorarch}/.*\.so$

- %filter_provides_in %{python_sitearch}/.*\.so$

- %if %{?altpython:1}%{!?altpython:0}

- %filter_provides_in %{altpython_sitearch}/.*\.so$

- %endif

+ %filter_provides_in %{python2_sitearch}/.*\.so$

  %filter_setup

  %endif

  

@@ -35,31 +11,26 @@ 

  %endif

  

  # by default, argus support should not be included

- %{!?_with_argus: %{!?without_argus: %define _without_argus --without-argus}}

+ %{!?_with_argus: %{!?without_argus: %global _without_argus --without-argus}}

  # make sure only one option is defined

  %{?_with_argus: %{?_without_argus: %{error: both _with_argus and _without_argus}}}

  

  Name:		lcgdm

  Version:	1.10.0

- Release:	12%{?dist}

+ Release:	13%{?dist}

  Summary:	LHC Computing Grid Data Management

  

- Group:		Applications/Internet

  License:	ASL 2.0

  URL:		http://glite.web.cern.ch/glite/

- #		LANG=C svn co http://svn.cern.ch/guest/lcgdm/lcg-dm/tags/LCG-DM_R_1_8_11 lcgdm-1.8.11

- #		tar --exclude .svn -z -c -f lcgdm-1.8.11.tar.gz lcgdm-1.8.11

+ #		LANG=C svn export http://svn.cern.ch/guest/lcgdm/lcg-dm/tags/LCG-DM_R_1_10_0 lcgdm-1.10.0

+ #		tar -z -c -f lcgdm-1.10.0.tar.gz lcgdm-1.10.0

  Source0:	%{name}-%{version}.tar.gz

  #		Systemd unit files

  Source1:	%{name}-unitfiles.tar.gz

  #		Remove deprecated python function:

  #		https://savannah.cern.ch/bugs/?69232

  Patch0:		%{name}-python-exception.patch

- # Check for mod_dav before publishing

- # https://its.cern.ch/jira/browse/LCGDM-1576

- #Patch1:		%%{name}-dpm-listspaces-dav.patch

  

- BuildRequires:  gcc-c++

  BuildRequires:	imake

  BuildRequires:	globus-gssapi-gsi-devel

  BuildRequires:	globus-gss-assist-devel

@@ -74,9 +45,9 @@ 

  

  %if 0%{?fedora} >= 28

  BuildRequires:	mariadb-connector-c-devel

- BuildRequires:  libnsl2-devel

+ BuildRequires:	libnsl2-devel

  %else

- BuildRequires:  mysql-devel

+ BuildRequires:	mysql-devel

  %endif

  BuildRequires:	libuuid-devel

  BuildRequires:	swig

@@ -87,15 +58,19 @@ 

  BuildRequires:	perl-generators

  %endif

  BuildRequires:	python2-devel

- %if %{?altpython:1}%{!?altpython:0}

- BuildRequires:	%{altpython}-devel

+ %if %{?fedora}%{!?fedora:0} >= 13 || %{?rhel}%{!?rhel:0} >= 8

+ BuildRequires:	python3-devel

+ %endif

+ %if %{?rhel}%{!?rhel:0} == 7

+ BuildRequires:	python34-devel

  %endif

  %if %systemd

- BuildRequires:	systemd-units

+ BuildRequires:	systemd

  %endif

  

  BuildRequires:	groff

  BuildRequires:	gcc

+ BuildRequires:	gcc-c++

  

  # This cannot be executed in the case of pure EPEL builds

  # as Argus is not available there

@@ -110,7 +85,6 @@ 

  

  %package libs

  Summary:	LHC Computing Grid Data Management common libraries

- Group:		System Environment/Libraries

  Provides:	%{name} = %{version}-%{release}

  Obsoletes:	%{name} < 1.8.1.2-2

  

@@ -120,19 +94,7 @@ 

  

  %package devel

  Summary:	LCG Data Management common development files

- Group:		Development/Libraries

  Requires:	%{name}-libs%{?_isa} = %{version}-%{release}

- %if 0%{?el5}

- %ifarch %{ix86}

- Provides:   %{name}-devel(x86-32)

- %endif

- %ifnarch %{ix86} ppc ppc64 s390 s390x sparc sparc64

- # why doesn't ifarch x86_64 work?

- Provides:   %{name}-devel(x86-64)

- %endif

- %else

- Provides:   %{name}-devel%{?_isa}

- %endif

  

  %description devel

  This package contains common development libraries and header files

@@ -140,7 +102,6 @@ 

  

  %package -n lfc-libs

  Summary:	LCG File Catalog (LFC) libraries

- Group:		System Environment/Libraries

  Requires:	%{name}-libs%{?_isa} = %{version}-%{release}

  Obsoletes:	lfc < 1.8.1.2-2

  

@@ -151,7 +112,6 @@ 

  

  %package -n lfc-devel

  Summary:	LFC development libraries and header files

- Group:		Development/Libraries

  Requires:	lfc-libs%{?_isa} = %{version}-%{release}

  Requires:	%{name}-devel%{?_isa} = %{version}-%{release}

  

@@ -162,7 +122,6 @@ 

  

  %package -n lfc

  Summary:	LCG File Catalog (LFC) client

- Group:		Applications/Internet

  Requires:	lfc-libs%{?_isa} = %{version}-%{release}

  Provides:	lfc-client = %{version}-%{release}

  Obsoletes:	lfc-client < 1.8.1.2-2

@@ -174,7 +133,6 @@ 

  

  %package -n lfc-perl

  Summary:	LCG File Catalog (LFC) perl bindings

- Group:		Applications/Internet

  Provides:	perl-lfc = %{version}-%{release}

  Obsoletes:	perl-lfc <= 1.8.2

  Requires:	lfc-libs%{?_isa} = %{version}-%{release}

@@ -186,8 +144,7 @@ 

  This package provides Perl bindings for the LFC client library.

  

  %package -n python2-lfc

- Summary:	LCG File Catalog (LFC) python bindings

- Group:		Applications/Internet

+ Summary:	LCG File Catalog (LFC) python 2 bindings

  Provides:	lfc-python = %{version}-%{release}

  Obsoletes:	lfc-python < 1.10.0-8

  Requires:	lfc-libs%{?_isa} = %{version}-%{release}

@@ -196,28 +153,25 @@ 

  %description -n python2-lfc

  The LCG File Catalog (LFC) keeps track of the locations of the physical

  replicas of the logical files in a distributed storage system.

- This package provides Python bindings for the LFC client library.

- 

- %if %{?altpython:1}%{!?altpython:0}

- %package -n %{altpython}-lfc

- Summary:	LCG File Catalog (LFC) python bindings

- Group:		Applications/Internet

- Provides:	lfc-%{altpython} = %{version}-%{release}

- Obsoletes:	lfc-%{altpython} < 1.10.0-8

- Requires:	lfc-libs%{?_isa} = %{version}-%{release}

- %{?python_provide:%python_provide %{altpython}-lfc}

+ This package provides Python 2 bindings for the LFC client library.

  

+ %if %{?fedora}%{!?fedora:0} >= 13 || %{?rhel}%{!?rhel:0} >= 7

+ %package -n python%{python3_pkgversion}-lfc

+ Summary:	LCG File Catalog (LFC) python 3 bindings

+ Provides:	lfc-python%{python3_pkgversion} = %{version}-%{release}

+ Obsoletes:	lfc-python%{python3_pkgversion} < 1.10.0-8

+ Requires:	lfc-libs%{?_isa} = %{version}-%{release}

+ %{?python_provide:%python_provide python%{python3_pkgversion}-lfc}

  

- %description -n %{altpython}-lfc

+ %description -n python%{python3_pkgversion}-lfc

  The LCG File Catalog (LFC) keeps track of the locations of the physical

  replicas of the logical files in a distributed storage system.

- This package provides Python bindings for the LFC client library.

+ This package provides Python 3 bindings for the LFC client library.

  %endif

  

  %package -n lfc-server-mysql

  Summary:	LCG File Catalog (LFC) server with MySQL database back-end

- Group:		Applications/Internet

- Requires:	finger%{?_isa}

+ Requires:	finger

  Provides:	lfcdaemon = %{version}-%{release}

  Requires:	lfc-libs%{?_isa} = %{version}-%{release}

  Provides:	lfc-mysql = %{version}-%{release}

@@ -228,9 +182,7 @@ 

  Requires(pre):		shadow-utils

  Requires(post):		mysql

  %if %systemd

- Requires(post):		systemd-units

- Requires(preun):	systemd-units

- Requires(postun):	systemd-units

+ %{?systemd_requires}

  %else

  Requires(post):		chkconfig

  Requires(preun):	chkconfig

@@ -246,15 +198,12 @@ 

  

  %package -n lfc-dli

  Summary:	LCG File Catalog (LFC) data location interface (dli) server

- Group:		Applications/Internet

  Requires:	lfcdaemon = %{version}-%{release}

  

  Requires(pre):		shadow-utils

- Requires(post):         finger

+ Requires(post):		finger

  %if %systemd

- Requires(post):		systemd-units

- Requires(preun):	systemd-units

- Requires(postun):	systemd-units

+ %{?systemd_requires}

  %else

  Requires(post):		chkconfig

  Requires(preun):	chkconfig

@@ -269,7 +218,6 @@ 

  

  %package -n dpm-libs

  Summary:	Disk Pool Manager (DPM) libraries

- Group:		System Environment/Libraries

  Requires:	%{name}-libs%{?_isa} = %{version}-%{release}

  Obsoletes:	dpm < 1.8.1.2-2

  

@@ -281,7 +229,6 @@ 

  

  %package -n dpm-devel

  Summary:	DPM development libraries and header files

- Group:		Development/Libraries

  Requires:	dpm-libs%{?_isa} = %{version}-%{release}

  Requires:	%{name}-devel%{?_isa} = %{version}-%{release}

  

@@ -293,7 +240,6 @@ 

  

  %package -n dpm

  Summary:	Disk Pool Manager (DPM) client

- Group:		Applications/Internet

  Requires:	dpm-libs%{?_isa} = %{version}-%{release}

  Provides:	dpm-client = %{version}-%{release}

  Obsoletes:	dpm-client < 1.8.1.2-2

@@ -306,7 +252,6 @@ 

  

  %package -n dpm-perl

  Summary:	Disk Pool Manager (DPM) perl bindings

- Group:		Applications/Internet

  Provides:	perl-dpm = %{version}-%{release}

  Obsoletes:	perl-dpm <= 1.8.2

  Requires:	dpm-libs%{?_isa} = %{version}-%{release}

@@ -318,44 +263,38 @@ 

  data such as HTTP, gridftp and xroot.

  This package provides Perl bindings for the DPM client library.

  

- %package -n dpm-python

- Summary:	Disk Pool Manager (DPM) python bindings

- Group:		Applications/Internet

- Provides:	python-dpm = %{version}-%{release}

- Obsoletes:	python-dpm <= 1.8.2

+ %package -n python2-dpm

+ Summary:	Disk Pool Manager (DPM) python 2 bindings

+ Provides:	dpm-python = %{version}-%{release}

+ Obsoletes:	dpm-python < 1.10.0-13

  Requires:	dpm-libs%{?_isa} = %{version}-%{release}

+ %{?python_provide:%python_provide python2-dpm}

  

- %description -n dpm-python

+ %description -n python2-dpm

  The LCG Disk Pool Manager (DPM) creates a storage element from a set

  of disks. It provides several interfaces for storing and retrieving

  data such as HTTP, gridftp and xroot.

- This package provides Python bindings for the DPM client library.

+ This package provides Python 2 bindings for the DPM client library.

  

- %if %{?altpython:1}%{!?altpython:0}

- %package -n dpm-%{altpython}

- Summary:	Disk Pool Manager (DPM) python bindings

- Group:		Applications/Internet

+ %if %{?fedora}%{!?fedora:0} >= 13 || %{?rhel}%{!?rhel:0} >= 7

+ %package -n python%{python3_pkgversion}-dpm

+ Summary:	Disk Pool Manager (DPM) python 3 bindings

+ Provides:	dpm-python%{python3_pkgversion} = %{version}-%{release}

+ Obsoletes:	dpm-python%{python3_pkgversion} < 1.10.0-13

  Requires:	dpm-libs%{?_isa} = %{version}-%{release}

- %if %{?rhel}%{!?rhel:0} == 5

- Requires:	python(abi) = 2.6

- %endif

- %if %{altpython} == python26

- Provides:	python26-dpm

- Obsoletes:	python26-dpm

- %endif

+ %{?python_provide:%python_provide python%{python3_pkgversion}-dpm}

  

- %description -n dpm-%{altpython}

+ %description -n python%{python3_pkgversion}-dpm

  The LCG Disk Pool Manager (DPM) creates a storage element from a set

  of disks. It provides several interfaces for storing and retrieving

  data such as HTTP, gridftp and xroot.

- This package provides Python bindings for the DPM client library.

+ This package provides Python 3 bindings for the DPM client library.

  %endif

  

  %package -n dpm-server-mysql

  Summary:	Disk Pool Manager (DPM) server with MySQL database back-end

- Group:		Applications/Internet

  Requires:	dpm-libs%{?_isa} = %{version}-%{release}

- Requires:	finger%{?_isa}

+ Requires:	finger

  Requires:	MySQL-python

  Requires:	python-lxml

  Provides:	dpm-mysql = %{version}-%{release}

@@ -365,9 +304,7 @@ 

  

  Requires(pre):		shadow-utils

  %if %systemd

- Requires(post):		systemd-units

- Requires(preun):	systemd-units

- Requires(postun):	systemd-units

+ %{?systemd_requires}

  %else

  Requires(post):		chkconfig

  Requires(preun):	chkconfig

@@ -384,8 +321,7 @@ 

  

  %package -n dpm-name-server-mysql

  Summary:	DPM name server with MySQL database back-end

- Group:		Applications/Internet

- Requires:	finger%{?_isa}

+ Requires:	finger

  Requires:	dpm-libs%{?_isa} = %{version}-%{release}

  Provides:	dpm-mysql-nameserver = %{version}-%{release}

  Obsoletes:	dpm-mysql-nameserver < 1.8.1.2-2

@@ -395,9 +331,7 @@ 

  Requires(pre):		shadow-utils

  Requires(post):		mysql

  %if %systemd

- Requires(post):		systemd-units

- Requires(preun):	systemd-units

- Requires(postun):	systemd-units

+ %{?systemd_requires}

  %else

  Requires(post):		chkconfig

  Requires(preun):	chkconfig

@@ -414,8 +348,7 @@ 

  

  %package -n dpm-copy-server-mysql

  Summary:	DPM copy server with MySQL database back-end

- Group:		Applications/Internet

- Requires:	finger%{?_isa}

+ Requires:	finger

  Requires:	dpm-libs%{?_isa} = %{version}-%{release}

  Provides:	dpm-mysql-copyd = %{version}-%{release}

  Obsoletes:	dpm-mysql-copyd < 1.8.1.2-2

@@ -424,9 +357,7 @@ 

  

  Requires(pre):		shadow-utils

  %if %systemd

- Requires(post):		systemd-units

- Requires(preun):	systemd-units

- Requires(postun):	systemd-units

+ %{?systemd_requires}

  %else

  Requires(post):		chkconfig

  Requires(preun):	chkconfig

@@ -443,8 +374,7 @@ 

  

  %package -n dpm-srm-server-mysql

  Summary:	DPM SRM server with MySQL database back-end

- Group:		Applications/Internet

- Requires:	finger%{?_isa}

+ Requires:	finger

  Requires:	dpm-libs%{?_isa} = %{version}-%{release}

  Provides:	dpm-mysql-srmv1 = %{version}-%{release}

  Obsoletes:	dpm-mysql-srmv1 < 1.8.1.2-2

@@ -457,9 +387,7 @@ 

  

  Requires(pre):		shadow-utils

  %if %systemd

- Requires(post):		systemd-units

- Requires(preun):	systemd-units

- Requires(postun):	systemd-units

+ %{?systemd_requires}

  %else

  Requires(post):		chkconfig

  Requires(preun):	chkconfig

@@ -476,8 +404,7 @@ 

  

  %package -n dpm-rfio-server

  Summary:	DPM RFIO server

- Group:		Applications/Internet

- Requires:	finger%{?_isa}

+ Requires:	finger

  Requires:	dpm-libs%{?_isa} = %{version}-%{release}

  Provides:	dpm-rfiod = %{version}-%{release}

  Obsoletes:	dpm-rfiod < 1.8.1.2-2

@@ -485,9 +412,7 @@ 

  Obsoletes:	DPM-rfio-server <= 1.8.2

  

  %if %systemd

- Requires(post):		systemd-units

- Requires(preun):	systemd-units

- Requires(postun):	systemd-units

+ %{?systemd_requires}

  %else

  Requires(post):		chkconfig

  Requires(preun):	chkconfig

@@ -501,6 +426,16 @@ 

  data such as HTTP, gridftp and xroot.

  This package provides a Remote File IO (RFIO) server for DPM.

  

+ %if %{?_with_argus:1}%{!?_with_argus:0}

+ %package -n dpm-argus

+ Summary:	DPM Argus support

+ Requires:	dpm-mysql-nameserver = %{version}-%{release}

+ Provides:	dpm-argus = %{version}-%{release}

+ 

+ %description -n dpm-argus

+ Argus support for the Disk Pool Manager (DPM).

+ %endif

+ 

  %prep

  %setup -T -q -c

  %setup -q -c -n %{name}-%{version}/lfc-mysql

@@ -513,7 +448,6 @@ 

  pushd $d/%{name}-%{version}

  

  %patch0 -p1

- #%patch1 -p0

  

  chmod 644 security/globus_gsi_gss_constants.h \

  	  security/globus_i_gsi_credential.h \

@@ -530,24 +464,14 @@ 

  

  done

  

- %if %{?_with_argus:1}%{!?_with_argus:0}

- %package -n dpm-argus

- Summary:	DPM Argus support

- Group:		Applications/Internet

- Requires:	dpm-mysql-nameserver = %{version}-%{release}

- Provides:	dpm-argus = %{version}-%{release}

- 

- %description -n dpm-argus

- Argus support for the Disk Pool Manager (DPM).

- %endif

- 

  %build

- gsoapversion=`soapcpp2 -v 2>&1 | grep C++ | sed 's/.* //'`

+ gsoapversion=`soapcpp2 -v 2>&1 </dev/null | grep C++ | sed 's/.* //'`

  

  pushd lfc-mysql/%{name}-%{version}

  

- ./configure lfc %{?_with_swig} \

+ ./configure lfc \

  	%{?_without_argus} \

+ 	--with-python=%{__python2} \

  	--with-mysql \

  	--libdir=%{_lib} \

  	--with-gsoap-version=$gsoapversion \

@@ -566,6 +490,7 @@ 

  

  ./configure dpm \

  	%{?_without_argus} \

+ 	--with-python=%{__python2} \

  	--with-mysql \

  	--libdir=%{_lib} \

  	--with-gsoap-version=$gsoapversion \

@@ -581,15 +506,15 @@ 

  

  popd

  

- %if %{?altpython:1}%{!?altpython:0}

- mkdir %{altpython}

- pushd %{altpython}

+ %if %{?fedora}%{!?fedora:0} >= 13 || %{?rhel}%{!?rhel:0} >= 7

+ mkdir python3

+ pushd python3

  

- INCLUDE_PYTHON=`%{__altpython} \

+ INCLUDE_PYTHON=`%{__python3} \

      -c "from distutils import sysconfig; \

  	import sys; \

  	sys.stdout.write('-I' + sysconfig.get_python_inc(0))"`

- PYTHON_LIB=`%{__altpython} \

+ PYTHON_LIB=`%{__python3} \

      -c "from distutils import sysconfig; \

  	import sys; \

  	sys.stdout.write('-L' + sysconfig.get_config_var('LIBDEST') + \

@@ -598,7 +523,7 @@ 

  	   + ' ' + \

  	sysconfig.get_config_var('LIBS') + ' ' + \

  	sysconfig.get_config_var('SYSLIBS'))"`

- PYTHON_MODULE_SUFFIX=`%{__altpython} \

+ PYTHON_MODULE_SUFFIX=`%{__python3} \

      -c "from distutils import sysconfig; \

  	print(sysconfig.get_config_var('SO'))"`

  

@@ -630,8 +555,6 @@ 

  %endif

  

  %install

- rm -rf ${RPM_BUILD_ROOT}

- 

  %if %systemd

  mkdir -p ${RPM_BUILD_ROOT}%{_unitdir}

  %endif

@@ -759,15 +682,15 @@ 

  	${RPM_BUILD_ROOT}%{_datadir}/dpm-mysql

      touch ${RPM_BUILD_ROOT}%{_unitdir}/${svc}.service

  %else

-   touch ${RPM_BUILD_ROOT}%{_initrddir}/${svc}

-   chmod 755 ${RPM_BUILD_ROOT}%{_initrddir}/${svc}

-   touch ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/${svc}

+     touch ${RPM_BUILD_ROOT}%{_initrddir}/${svc}

+     chmod 755 ${RPM_BUILD_ROOT}%{_initrddir}/${svc}

+     touch ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/${svc}

  %endif

  

- touch ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/${svc}

- touch ${RPM_BUILD_ROOT}%{_sbindir}/${svc}

- chmod 755 ${RPM_BUILD_ROOT}%{_sbindir}/${svc}

- touch ${RPM_BUILD_ROOT}%{_mandir}/man8/${svc}.8

+     touch ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/${svc}

+     touch ${RPM_BUILD_ROOT}%{_sbindir}/${svc}

+     chmod 755 ${RPM_BUILD_ROOT}%{_sbindir}/${svc}

+     touch ${RPM_BUILD_ROOT}%{_mandir}/man8/${svc}.8

  done

  

  # dpm-rfiod unit file / startup script

@@ -787,21 +710,12 @@ 

  # remove the log man page (already exists in the system and not needed anyway)

  rm ${RPM_BUILD_ROOT}%{_mandir}/man3/log.3*

  

- %if %{?altpython:1}%{!?altpython:0}

- mkdir -p ${RPM_BUILD_ROOT}%{altpython_sitearch}

+ %if %{?fedora}%{!?fedora:0} >= 13 || %{?rhel}%{!?rhel:0} >= 7

+ mkdir -p ${RPM_BUILD_ROOT}%{python3_sitearch}

  install -m 644 lfc-mysql/%{name}-%{version}/ns/*.py \

  	       dpm-mysql/%{name}-%{version}/dpm/*.py \

- 	       ${RPM_BUILD_ROOT}%{altpython_sitearch}

- install %{altpython}/*.so ${RPM_BUILD_ROOT}%{altpython_sitearch}

- %endif

- 

- %if %{?fedora}%{!?fedora:0} < 5 && %{?rhel}%{!?rhel:0} < 6

- %{__python}    -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", 10, "%{python_sitearch}", 1)' > /dev/null

- %{__python} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", 10, "%{python_sitearch}", 1)' > /dev/null

- %if %{?altpython:1}%{!?altpython:0}

- %{__altpython}	  -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT%{altpython_sitearch}"'", 10, "%{altpython_sitearch}", 1)' > /dev/null

- %{__altpython} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT%{altpython_sitearch}"'", 10, "%{altpython_sitearch}", 1)' > /dev/null

- %endif

+ 	       ${RPM_BUILD_ROOT}%{python3_sitearch}

+ install python3/*.so ${RPM_BUILD_ROOT}%{python3_sitearch}

  %endif

  

  # Add the upgrade scripts 

@@ -818,17 +732,18 @@ 

  mkdir ${RPM_BUILD_ROOT}%{_libexecdir}

  install -m 755 lfc-mysql/%{name}-%{version}/scripts/lcg-info-provider-lfc ${RPM_BUILD_ROOT}%{_libexecdir}

  

- %post libs -p /sbin/ldconfig

- 

- %postun libs -p /sbin/ldconfig

- 

- %post -n lfc-libs -p /sbin/ldconfig

- 

- %postun -n lfc-libs -p /sbin/ldconfig

- 

- %post -n dpm-libs -p /sbin/ldconfig

+ # Fix shebang in dpm-listspaces script

+ %if %{?fedora}%{!?fedora:0} >= 26 || %{?rhel}%{!?rhel:0} >= 8

+ sed 's!/usr/bin/env python!%{__python3}!' \

+     -i ${RPM_BUILD_ROOT}%{_bindir}/dpm-listspaces

+ %else

+ sed 's!/usr/bin/env python!%{__python2}!' \

+     -i ${RPM_BUILD_ROOT}%{_bindir}/dpm-listspaces

+ %endif

  

- %postun -n dpm-libs -p /sbin/ldconfig

+ %ldconfig_scriptlets libs

+ %ldconfig_scriptlets -n lfc-libs

+ %ldconfig_scriptlets -n dpm-libs

  

  %pre -n lfc-server-mysql

  getent group lfcmgr > /dev/null || groupadd -r lfcmgr

@@ -1359,7 +1274,7 @@ 

  %{_libdir}/libCsec_plugin_ID.so

  %dir %{_datadir}/lcgdm/upgrades

  %{_datadir}/lcgdm/upgrades/Common.pm

- %doc lfc-mysql/%{name}-%{version}/README lfc-mysql/%{name}-%{version}/LICENSE

+ %license lfc-mysql/%{name}-%{version}/README lfc-mysql/%{name}-%{version}/LICENSE

  

  %files devel

  %{_libdir}/liblcgdm.so

@@ -1400,21 +1315,25 @@ 

  %{python2_sitearch}/lfc2.py*

  %{python2_sitearch}/_lfc2thr.so

  %{python2_sitearch}/lfc2thr.py*

+ %if ! ( %{?fedora}%{!?fedora:0} >= 26 || %{?rhel}%{!?rhel:0} >= 8 )

  %doc %{_mandir}/man3/lfc_python.3*

  %doc %{_mandir}/man3/lfc2_python.3*

+ %endif

  

- %if %{?altpython:1}%{!?altpython:0}

- %files -n %{altpython}-lfc

- %{altpython_sitearch}/_lfc.*so

- %{altpython_sitearch}/lfc.py*

- %{altpython_sitearch}/_lfcthr.*so

- %{altpython_sitearch}/lfcthr.py*

- %{altpython_sitearch}/_lfc2.*so

- %{altpython_sitearch}/lfc2.py*

- %{altpython_sitearch}/_lfc2thr.*so

- %{altpython_sitearch}/lfc2thr.py*

- %if %{?fedora}%{!?fedora:0} >= 15

- %{altpython_sitearch}/__pycache__/lfc*

+ %if  %{?fedora}%{!?fedora:0} >= 13 || %{?rhel}%{!?rhel:0} >= 7

+ %files -n python%{python3_pkgversion}-lfc

+ %{python3_sitearch}/_lfc.*so

+ %{python3_sitearch}/lfc.py*

+ %{python3_sitearch}/_lfcthr.*so

+ %{python3_sitearch}/lfcthr.py

+ %{python3_sitearch}/_lfc2.*so

+ %{python3_sitearch}/lfc2.py*

+ %{python3_sitearch}/_lfc2thr.*so

+ %{python3_sitearch}/lfc2thr.py

+ %{python3_sitearch}/__pycache__/lfc*

+ %if %{?fedora}%{!?fedora:0} >= 26 || %{?rhel}%{!?rhel:0} >= 8

+ %doc %{_mandir}/man3/lfc_python.3*

+ %doc %{_mandir}/man3/lfc2_python.3*

  %endif

  %endif

  

@@ -1486,31 +1405,31 @@ 

  %{perl_vendorarch}/dpm.so

  %{perl_vendorarch}/dpm.pm

  

- %files -n dpm-python

- %if %{?fedora}%{!?fedora:0} < 26

+ %files -n python2-dpm

+ %if ! ( %{?fedora}%{!?fedora:0} >= 26 || %{?rhel}%{!?rhel:0} >= 8 )

  %{_bindir}/dpm-listspaces

  %doc %{_mandir}/man1/dpm-listspaces.1*

+ %doc %{_mandir}/man3/dpm_python.3*

+ %doc %{_mandir}/man3/dpm2_python.3*

  %endif

  %{python2_sitearch}/_dpm.so

  %{python2_sitearch}/dpm.py*

  %{python2_sitearch}/_dpm2.so

  %{python2_sitearch}/dpm2.py*

- %doc %{_mandir}/man3/dpm_python.3*

- %doc %{_mandir}/man3/dpm2_python.3*

  

- %if %{?altpython:1}%{!?altpython:0}

- %files -n dpm-%{altpython}

- %if %{?fedora}%{!?fedora:0} >= 26

+ %if %{?fedora}%{!?fedora:0} >= 13 || %{?rhel}%{!?rhel:0} >= 7

+ %files -n python%{python3_pkgversion}-dpm

+ %if %{?fedora}%{!?fedora:0} >= 26 || %{?rhel}%{!?rhel:0} >= 8

  %{_bindir}/dpm-listspaces

  %doc %{_mandir}/man1/dpm-listspaces.1*

+ %doc %{_mandir}/man3/dpm_python.3*

+ %doc %{_mandir}/man3/dpm2_python.3*

  %endif

- %{altpython_sitearch}/_dpm.*so

- %{altpython_sitearch}/dpm.py*

- %{altpython_sitearch}/_dpm2.*so

- %{altpython_sitearch}/dpm2.py*

- %if %{?fedora}%{!?fedora:0} >= 15

- %{altpython_sitearch}/__pycache__/dpm*

- %endif

+ %{python3_sitearch}/_dpm.*so

+ %{python3_sitearch}/dpm.py*

+ %{python3_sitearch}/_dpm2.*so

+ %{python3_sitearch}/dpm2.py

+ %{python3_sitearch}/__pycache__/dpm*

  %endif

  

  %files -n dpm-server-mysql

@@ -1649,6 +1568,16 @@ 

  %endif

  

  %changelog

+ * Thu Aug 09 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 1.10.0-13

+ - Use explicit --with-python=/usr/bin/python2 in configure (fixes rawhide)

+ - Remove redundant macro definitions for old Fedora and EPEL releases

+ - Only filter provides on EPEL 6 - the others filter correctly by default

+ - Add python34-lfc and python34-dnf packages for EPEL 7

+ - Remove obsolete Group tags

+ - Fix more python subpackage names

+ - Fix shebang in dpm-listspaces script

+ - Use %%license, %%ldconfig_scriptlets and %%systemd_requires

+ 

  * Mon Jul 16 2018 Miro HronĨok <mhroncok@redhat.com> - 1.10.0-12

  - Fix python subpackage names

  

Remove redundant macro definitions for old Fedora and EPEL releases
Only filter provides on EPEL 6 - the others filter correctly by default
Add python34-lfc and python34-dnf packages for EPEL 7
Remove obsolete Group tags
Fix more python subpackage names
Fix shebang in dpm-listspaces script
Use %license, %ldconfig_scriptlets and %systemd_requires

The update specfile builds on epel 6, epel 7, F27, F28 and rawhide.

rebased onto 51d93fe

2 years ago

rebased onto 797dc1e

2 years ago

Pull-Request has been merged by okeeble

a year ago

Thanks Mattias - merged.