Changeset 1036


Ignore:
Timestamp:
Feb 25, 2017, 7:57:30 PM (8 years ago)
Author:
dmik
Message:

spec: rpm: Release version 4.13.0-14.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/rpm.spec

    r1031 r1036  
    66%bcond_with int_bdb
    77# run internal testsuite?
    8 %bcond_without check
    9 
    10 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
     8%bcond_with check
     9# build with plugins?
     10%bcond_without plugins
     11# build with sanitizers?
     12%bcond_with sanitizer
     13# build with libarchive? (needed for rpm2archive)
     14%bcond_with libarchive
     15# build with libimaevm.so
     16%bcond_with libimaevm
     17# build with new db format
     18%bcond_with ndb
    1119
    1220%define rpmhome %{_libdir}/rpm
    1321
    14 %define rpmver 4.13.0
    15 %define snapver %{nil}
    16 %define srcver %{rpmver}
    17 
    18 %define bdbver 4.8.24
     22%global rpmver 4.13.0
     23#global snapver rc2
     24%global srcver %{version}%{?snapver:-%{snapver}}
     25
     26%define bdbname db4
     27%define bdbver 5.3.15
    1928%define dbprefix db
    2029
     
    2231Name: rpm
    2332Version: %{rpmver}
    24 Release: 13%{?dist}
     33Release: %{?snapver:0.%{snapver}.}14%{?dist}
    2534Group: System Environment/Base
    2635Url: http://www.rpm.org/
    2736
    28 %scm_source svn http://svn.netlabs.org/repos/rpm/rpm/trunk 1027
     37%scm_source svn http://svn.netlabs.org/repos/rpm/rpm/trunk 1035
     38
     39%if %{with int_bdb}
     40Source1: db-%{bdbver}.tar.gz
     41%endif
    2942
    3043# Partially GPL/LGPL dual-licensed and some bits with BSD
     
    3548%if %{without int_bdb}
    3649# db recovery tools, rpmdb_util symlinks
    37 Requires: db4-utils
     50Requires: %{bdbname}-utils
    3851%endif
    3952Requires: popt >= 1.10.2.1
    4053Requires: curl
     54
    4155Requires: rpm-libs = %{version}-%{release}
    4256Requires: pthread >= 20151207
    43 Requires: cpio
    4457Requires: cube
    45 Requires: sed
    4658
    4759Provides: rpm-macros-warpin
     
    5163
    5264%if %{without int_bdb}
    53 BuildRequires: db4-devel
     65BuildRequires: %{bdbname}-devel
    5466%endif
    5567
    5668%if %{with check}
    57 #BuildRequires: fakechroot
     69BuildRequires: fakechroot
    5870%endif
    5971
     
    6375BuildRequires: readline-devel zlib-devel
    6476BuildRequires: nss-devel
     77BuildRequires: nss-softokn-freebl-devel
    6578# The popt version here just documents an older known-good version
    6679BuildRequires: popt-devel >= 1.10.2
     
    7689BuildRequires: xz-devel >= 4.999.8
    7790%endif
     91%if ! %{without libarchive}
     92BuildRequires: libarchive-devel
     93%endif
     94BuildRequires: autoconf automake libtool
     95
     96%if %{with plugins}
     97#BuildRequires: dbus-devel
     98%endif
     99
     100%if %{with sanitizer}
     101BuildRequires: libasan
     102BuildRequires: libubsan
     103#BuildRequires: liblsan
     104#BuildRequires: libtsan
     105%global sanitizer_flags -fsanitize=address -fsanitize=undefined
     106%endif
     107
     108%if %{with libimaevm}
     109BuildRequires: ima-evm-utils
     110%endif
    78111
    79112%description
     
    88121Group: Development/Libraries
    89122License: GPLv2+ and LGPLv2+ with exceptions
    90 Requires: rpm = %{version}-%{release}
     123Requires: %{name} = %{version}-%{release}
    91124
    92125# We need a fork-friendly PR_LoadLibrary on OS/2
     
    95128%description libs
    96129This package contains the RPM shared libraries.
     130
     131%package build-libs
     132Summary:  Libraries for building and signing RPM packages
     133Group: Development/Libraries
     134License: GPLv2+ and LGPLv2+ with exceptions
     135Requires: %{name}-libs = %{version}-%{release}
     136#Requires: %{_bindir}/gpg2
     137
     138%description build-libs
     139This package contains the RPM shared libraries for building and signing
     140packages.
    97141
    98142%package devel
     
    100144Group: Development/Libraries
    101145License: GPLv2+ and LGPLv2+ with exceptions
    102 Requires: rpm = %{version}-%{release}
     146Requires: %{name} = %{version}-%{release}
     147Requires: %{name}-libs = %{version}-%{release}
     148Requires: %{name}-build-libs = %{version}-%{release}
    103149Requires: popt-devel
    104150Requires: file-devel
     
    119165Group: Development/Tools
    120166Requires: rpm = %{version}-%{release}
    121 #Requires: elfutils >= 0.128 binutils
    122 Requires: findutils sed grep gawk diffutils
    123 Requires: file patch >= 2.5
    124 Requires: unzip xz
    125 Requires: gzip bzip2 cpio
     167Requires: binutils
     168Requires: findutils sed grep gawk diffutils file patch >= 2.5
     169Requires: tar unzip gzip bzip2 cpio xz
    126170Requires: pkgconfig >= 1:0.24
    127 Requires: tar
    128 #Conflicts: ocaml-runtime < 3.11.1-7
     171# Technically rpmbuild doesn't require any external configuration, but
     172# creating distro-compatible packages does. To make the common case
     173# "just work" while allowing for alternatives, depend on a virtual
     174# provide, typically coming from redhat-rpm-config.
     175#Requires: system-rpm-config
     176# Techincally rpmbuild doesn't require python3 (and setuptools), but
     177# pythondistdeps generator expects it.
     178# See: https://bugzilla.redhat.com/show_bug.cgi?id=1410631
     179#Requires: python3-setuptools
    129180
    130181%description build
     
    132183that are used to build packages using the RPM Package Manager.
    133184
    134 %package python
    135 Summary: Python bindings for apps which will manipulate RPM packages
     185%package sign
     186Summary: Package signing support
     187Group: System Environment/Base
     188Requires: rpm-build-libs = %{version}-%{release}
     189
     190%description sign
     191This package contains support for digitally signing RPM packages.
     192
     193%package -n python2-%{name}
     194Summary: Python 2 bindings for apps which will manipulate RPM packages
    136195Group: Development/Libraries
    137 Requires: rpm = %{version}-%{release}
     196BuildRequires: python2-devel
     197%{?python_provide:%python_provide python2-%{name}}
     198Requires: %{name}-libs = %{version}-%{release}
     199Provides: %{name}-python = %{version}-%{release}
     200Obsoletes: %{name}-python < %{version}-%{release}
    138201# YD because of ucs4
    139202Requires: python >= 2.7.6-13
    140203
    141 %description python
    142 The rpm-python package contains a module that permits applications
     204%description -n python2-%{name}
     205The python2-rpm package contains a module that permits applications
    143206written in the Python programming language to use the interface
    144207supplied by RPM Package Manager libraries.
    145208
    146 This package should be installed if you want to develop Python
     209This package should be installed if you want to develop Python 2
    147210programs that will manipulate RPM packages and databases.
     211
     212#package -n python3-%{name}
     213#Summary: Python 3 bindings for apps which will manipulate RPM packages
     214#Group: Development/Libraries
     215#BuildRequires: python3-devel
     216#{?python_provide:%python_provide python3-%{name}}
     217#{?system_python_abi}
     218#Requires: %{name}-libs%{?_isa} = %{version}-%{release}
     219#Provides: %{name}-python3 = %{version}-%{release}
     220#Obsoletes: %{name}-python3 < %{version}-%{release}
     221
     222#description -n python3-%{name}
     223#the python3-rpm package contains a module that permits applications
     224#written in the Python programming language to use the interface
     225#supplied by RPM Package Manager libraries.
     226#
     227#This package should be installed if you want to develop Python 3
     228#programs that will manipulate RPM packages and databases.
    148229
    149230%package apidocs
     
    167248
    168249%debug_package
     250
     251%if %{with plugins}
     252
     253%package plugin-syslog
     254Summary: Rpm plugin for syslog functionality
     255Group: System Environment/Base
     256Requires: rpm-libs%{_isa} = %{version}-%{release}
     257
     258%description plugin-syslog
     259%{summary}
     260
     261%package plugin-ima
     262Summary: Rpm plugin ima file signatures
     263Group: System Environment/Base
     264Requires: rpm-libs%{_isa} = %{version}-%{release}
     265
     266%description plugin-ima
     267%{summary}
     268
     269%endif
    169270
    170271%prep
     
    186287  configure.ac
    187288
     289CPPFLAGS="`pkg-config --cflags nss`" # -DLUA_COMPAT_APIINTCASTS"
     290CFLAGS="$RPM_OPT_FLAGS %{?sanitizer_flags}" # -DLUA_COMPAT_APIINTCASTS"
     291LDFLAGS="%{?__global_ldflags} -Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
     292LIBS="-lintl -lcx"
     293export CPPFLAGS CFLAGS LDFLAGS LIBS
     294
    188295autoreconf -i -f
    189296
     
    191298export ac_cv_path___SSH=ssh
    192299
    193 # Using configure macro has some unwanted side-effects on rpm platform
    194 # setup, use the old-fashioned way for now only defining minimal paths.
    195 export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
    196 export LIBS="-lintl -lcx"
    197 export CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
    198300%configure \
    199     --enable-shared --disable-static --without-lua \
     301    --enable-shared --disable-static \
    200302    %{!?with_int_bdb: --with-external-db} \
    201     --without-archive \
     303    %{!?with_plugins: --disable-plugins} \
     304    %{!?with_lua: --without-lua} \
     305    %{!?with_libarchive: --without-archive} \
     306    %{?with_ndb: --with-ndb} \
    202307    --enable-python
    203308
    204 make %{?_smp_mflags} V=1
     309make %{?_smp_mflags}
     310
     311#pushd python
     312#{__python2} setup.py build
     313#{__python3} setup.py build
     314#popd
    205315
    206316%install
     
    208318
    209319make DESTDIR="$RPM_BUILD_ROOT" install
     320
     321# We need to build with --enable-python for the self-test suite, but we
     322# actually package the bindings built with setup.py (#531543#c26)
     323#pushd python
     324#{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
     325#{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
     326#popd
    210327
    211328# Remove OS/2 import libraries from plugins
     
    244361install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/rpm
    245362
     363#mkdir -p ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d
     364#echo "r /var/lib/rpm/__db.*" > ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d/rpm.conf
     365
    246366mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
     367mkdir -p $RPM_BUILD_ROOT%{rpmhome}/macros.d
    247368
    248369mkdir -p $RPM_BUILD_ROOT%{_var}/lib/rpm
    249370for dbi in \
    250     Basenames Conflictname Dirnames Group Installtid Name Packages \
    251     Providename Provideversion Requirename Requireversion Triggername \
    252     Filedigests Pubkeys Sha1header Sigmd5 Obsoletename \
     371    Basenames Conflictname Dirnames Group Installtid Name Obsoletename \
     372    Packages Providename Requirename Triggername Sha1header Sigmd5 \
    253373    __db.001 __db.002 __db.003 __db.004 __db.005 __db.006 __db.007 \
    254374    __db.008 __db.009
     
    271391find $RPM_BUILD_ROOT -name "*.la"|xargs rm -f
    272392
    273 # avoid dragging in tonne of perl libs for an unused script
    274 #chmod 0644 $RPM_BUILD_ROOT/%{rpmhome}/perldeps.pl
    275 
    276 # compress our ChangeLog, it's fairly big...
    277 bzip2 -9 ChangeLog
     393# These live in perl-generators now
     394#rm -f $RPM_BUILD_ROOT/%{rpmhome}/{perldeps.pl,perl.*}
     395#rm -f $RPM_BUILD_ROOT/%{_fileattrsdir}/perl*
     396# Axe unused cruft
     397rm -f $RPM_BUILD_ROOT/%{rpmhome}/{tcl.req,osgideps.pl}
    278398
    279399%clean
    280400rm -rf $RPM_BUILD_ROOT
    281401
    282 #%if %{with check}
    283 #%check
    284 #make check
    285 #[ "$(ls -A tests/rpmtests.dir)" ] && cat tests/rpmtests.log
    286 #%endif
    287 
    288 #%post libs -p /sbin/ldconfig
    289 #%postun libs -p /sbin/ldconfig
    290 
    291 #%posttrans
    292 # XXX this is klunky and ugly, rpm itself should handle this
    293 #dbstat=/usr/lib/rpm/rpmdb_stat
    294 #if [ -x "$dbstat" ]; then
    295 #    if "$dbstat" -e -h %{_var}/lib/rpm 2>&1 | grep -q "doesn't match environment version \| Invalid argument"; then
    296 #        rm -f %{_var}/lib/rpm/__db.*
    297 #    fi
    298 #fi
    299 #exit 0
     402%if %{with check}
     403%check
     404make check
     405[ "$(ls -A tests/rpmtests.dir)" ] && cat tests/rpmtests.log
     406%endif
    300407
    301408%files -f %{name}.lang
    302 %defattr(-,root,root,-)
    303 %doc GROUPS COPYING CREDITS ChangeLog.bz2 doc/manual/[a-z]*
     409%license COPYING
     410%doc GROUPS CREDITS doc/manual/[a-z]*
     411
     412#/usr/lib/tmpfiles.d/rpm.conf
    304413%dir %{_sysconfdir}/rpm
    305414
     
    309418
    310419%{_bindir}/rpm.exe
     420%{?with_libarchive: %{_bindir}/rpm2archive.exe}
    311421%{_bindir}/rpm2cpio.exe
    312422%{_bindir}/rpmdb.exe
    313423%{_bindir}/rpmkeys.exe
    314 %{_bindir}/rpmsign.exe
    315424%{_bindir}/rpmquery
    316425%{_bindir}/rpmverify
     
    329438%lang(sk) %{_mandir}/sk/man[18]/*.[18]*
    330439
     440%attr(0755, root, root) %dir %{rpmhome}
    331441%{rpmhome}/macros
     442%{rpmhome}/macros.d
    332443%{rpmhome}/rpmpopt*
    333444%{rpmhome}/rpmrc
     
    342453%{rpmhome}/platform
    343454
     455%dir %{rpmhome}/fileattrs
     456
    344457%{rpmhome}/wps-object.exe
    345458%{rpmhome}/warpin-conflicts.exe
    346459
    347460%files libs
    348 %defattr(-,root,root)
    349 %{_libdir}/rpm*.dll
     461%{_libdir}/rpmio[0-9].dll
     462%{_libdir}/rpm[0-9].dll
     463%if %{with plugins}
    350464%dir %{_libdir}/rpm-plugins
    351 %{_libdir}/rpm-plugins/*.dll
     465
     466%files plugin-syslog
     467%{_libdir}/rpm-plugins/syslog.dll
     468
     469%files plugin-ima
     470%{_libdir}/rpm-plugins/ima.dll
     471%endif
     472
     473%files build-libs
     474%{_libdir}/rpmbuil[0-9].dll
     475%{_libdir}/rpmsign[0-9].dll
    352476
    353477%files build
    354 %defattr(-,root,root)
    355478%{_bindir}/rpmbuild.exe
    356479%{_bindir}/gendiff
    357480%{_bindir}/rpmspec.exe
    358 %{_bindir}/rpmsign.exe
    359481
    360482%{_mandir}/man1/gendiff.1*
     
    362484%{_mandir}/man8/rpmdeps.8*
    363485%{_mandir}/man8/rpmspec.8*
    364 %{_mandir}/man8/rpmsign.8*
    365486
    366487%{rpmhome}/brp-*
    367488%{rpmhome}/check-*
    368489#{rpmhome}/debugedit
     490#{rpmhome}/sepdebugcrcfix
    369491#{rpmhome}/find-debuginfo.sh
    370492%{rpmhome}/find-lang.sh
     
    377499%{rpmhome}/config.*
    378500%{rpmhome}/macros.p*
    379 %{rpmhome}/fileattrs
    380 
    381 %files python
    382 %defattr(-,root,root)
    383 %{_usr}/lib/python*.*/*
     501%{rpmhome}/fileattrs/*
     502
     503%files sign
     504%{_bindir}/rpmsign.exe
     505%{_mandir}/man8/rpmsign.8*
     506
     507%files -n python2-%{name}
     508%{python_sitearch}/%{name}/
     509#{python_sitearch}/%{name}_python-*.egg-info
     510
     511#files -n python3-%{name}
     512#{python3_sitearch}/%{name}/
     513#{python3_sitearch}/%{name}_python-*.egg-info
    384514
    385515%files devel
    386 %defattr(-,root,root)
    387 %_includedir/*
    388 %{_libdir}/rp*[a-z].a
    389516%{_mandir}/man8/rpmgraph.8*
    390517%{_bindir}/rpmgraph.exe
    391 %{_libdir}/pkgconfig/rpm.pc
     518%{_libdir}/rp*[a-z].a
     519%{_libdir}/pkgconfig/%{name}.pc
     520%{_includedir}/%{name}/
    392521
    393522%files cron
    394 %defattr(-,root,root)
    395523%{_sysconfdir}/cron.daily/rpm
    396524%config(noreplace) %{_sysconfdir}/logrotate.d/rpm
    397525
    398526%files apidocs
    399 %defattr(-,root,root)
    400 %doc COPYING doc/librpm/html/*
     527%license COPYING
     528%doc doc/librpm/html/*
    401529
    402530%changelog
     531* Sat Feb 25 2017 Dmitriy Kuminov <coding@dmik.org> - 4.13.0-14
     532- Update to version 4.13.0 GA.
     533- Fix sed warnings in find-lang.sh due to ':' in pats on OS/2.
     534- Bring .spec in sync with current Fedora .spec (this renames some packages
     535  and adds some more).
     536
    403537* Fri Feb 24 2017 Dmitriy Kuminov <coding@dmik.org> - 4.13.0-13
    404538- Use proper SVN revision for the build.
Note: See TracChangeset for help on using the changeset viewer.