From 862c814bc79b0d6aa6dbf2beccc7e3c07838ee31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Mon, 14 Jan 2019 18:50:05 +0100 Subject: [PATCH] Add distribution README file --- libxcrypt.spec | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/libxcrypt.spec b/libxcrypt.spec index 962dd99..581582b 100644 --- a/libxcrypt.spec +++ b/libxcrypt.spec @@ -46,6 +46,17 @@ %endif +# Needed for the distribution README file. +%if 0%{?fedora} +%global distname .fedora +%else +%if 0%{?rhel} +%global distname .rhel +%else +%global distname .distribution +%endif +%endif + # Needed for out-of-tree builds. %global _configure ../"configure" @@ -204,6 +215,22 @@ discouraged. %prep %autosetup -p 1 ./bootstrap +%if %{with new_api} +%{__cat} << EOF >> README%{distname} +This version of the %{name} package ships the libcrypt.so2 +library and does not provide the legacy API functions that have +been provided by glibc's libcrypt.so.1. The removed functions +by name are encrypt, encrypt_r, setkey, setkey_r, and fcrypt. + +If you are using a third-party application that links against +those functions, or that is linked against glibc's libcrypt, +you may need to install the %{name}-compat package manually. + +All existing binary executables linked against glibc's libcrypt +should work unmodified with the libcrypt.so.1 library supplied +by the %{name}-compat package. +EOF +%endif %{__mkdir_p} %{_vpath_builddir}{,-compat} @@ -253,10 +280,10 @@ popd %{__install} -Dpm 0644 -t %{buildroot}%{_pkgdocdir} \ ChangeLog NEWS README THANKS TODO -# Install 'README.fedora', if existing, to shared %%_pkgdocdir. -if [ -f README.fedora ]; then +# Install distribution README file, if existing, to shared %%_pkgdocdir. +if [ -f README%{distname} ]; then %{__install} -Dpm 0644 -t %{buildroot}%{_pkgdocdir} \ - README.fedora + README%{distname} fi @@ -331,6 +358,7 @@ done %changelog * Mon Jan 14 2019 Björn Esser - 4.4.2-4 - Bump SO-name for Fedora >= 30 and enable compat package (#1666033) +- Add distribution README file * Sun Dec 23 2018 Björn Esser - 4.4.2-3 - Remove architecture bits from Recommends