diff --git a/rpm-5.4.10-distepoch-from-os-release.patch b/rpm-5.4.10-distepoch-from-os-release.patch new file mode 100644 index 0000000..b08a81a --- /dev/null +++ b/rpm-5.4.10-distepoch-from-os-release.patch @@ -0,0 +1,11 @@ +--- a/macros/mandriva.in 2014-10-25 15:11:42.195955354 +0400 ++++ b/macros/mandriva.in 2014-10-25 15:09:09.000000000 +0400 +@@ -44,7 +44,7 @@ + %evr_tuple_select 1234 + %evr_tuple_order EVRD + %disttag %{!?distsuffix:mdv}%{?distsuffix} +-%distepoch %(sed -e 's#.*release\\ \\(\\S*\\).*#\\1#' /etc/release) ++%distepoch %(sed -n -e 's/^VERSION_ID=//p' /etc/os-release) + + # Dynamic EVRD tags macro for use with versioned provides/requires in place of + # '%{version}-%{release}', ie. to automatically add distepoch or epoch if present diff --git a/rpm.spec b/rpm.spec index e2cdc4a..8403717 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,3 +1,6 @@ +%{?build_selinux}%{?!build_selinux:%bcond_with selinux} +%{?build_squirrel}%{?!build_squirrel:%bcond_without squirrel} + %bcond_with bootstrap %bcond_with debug @@ -9,7 +12,6 @@ %bcond_with perl %bcond_with python %bcond_with tcl -%bcond_with squirrel %bcond_with embed %bcond_with docs %bcond_with sqlite @@ -18,7 +20,6 @@ %bcond_without perl %bcond_without python %bcond_without tcl -%bcond_without squirrel %bcond_without embed %bcond_without docs # use what's in berkeley db @@ -60,7 +61,7 @@ Summary: The RPM package management system Name: rpm Epoch: 1 Version: %{libver}.%{minorver} -Release: %{?prereldate:0.%{prereldate}.}47 +Release: %{?prereldate:0.%{prereldate}.}53 License: LGPLv2.1+ Group: System/Configuration/Packaging Url: http://rpm5.org/ @@ -479,6 +480,9 @@ Patch509: rpm-5.4.10-fat-lto-objects.patch # -fno-delete-null-pointer-checks by default Patch510: rpm-5.4.10-no-delete-null-pointer-checks.patch +# get distepoch from /etc/os-release +Patch511: rpm-5.4.10-distepoch-from-os-release.patch + # stop rpm crashing when accessing a broken binary rpm (with inode collisions) Patch512: rpm-5.4.10-hardlink-segfault-fix.patch @@ -891,7 +895,7 @@ This package contains the RPM API documentation generated in HTML format. %patch508 -p1 -b .hardening~ %patch509 -p1 -b .fat_lto_cpu_os_macros~ %patch510 -p1 -b .no-delete-null-pointer-checks~ - +%patch511 -p1 -b .distepoch %patch512 -p1 -b .hardlink-segfault-fix %patch513 -p1 -b .payload-no-hashed-inode @@ -945,7 +949,11 @@ tar -zxf %{SOURCE3} -C cpu-os-macros --with-squirrel=external \ %endif --with-glob \ +%if %{with selinux} + --with-selinux \ +%else --without-selinux \ +%endif %if %{with docs} --with-apidocs \ %endif