commit
b0b7dacd5b
@ -1,90 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# shim-find-debuginfo.sh
|
|
||||||
# Copyright (C) 2017 Peter Jones <Peter Jones@random>
|
|
||||||
#
|
|
||||||
# Distributed under terms of the GPLv3 license.
|
|
||||||
#
|
|
||||||
set -e
|
|
||||||
set -u
|
|
||||||
|
|
||||||
mainarch=$1 && shift
|
|
||||||
if [ $# == 1 ]; then
|
|
||||||
altarch=$1 && shift
|
|
||||||
fi
|
|
||||||
if ! [ -v RPM_BUILD_ROOT ]; then
|
|
||||||
echo "RPM_BUILD_ROOT must be set" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
findsource()
|
|
||||||
{
|
|
||||||
(
|
|
||||||
cd ${RPM_BUILD_ROOT}
|
|
||||||
find usr/src/debug/ -type d | sed "s,^,%dir /,"
|
|
||||||
find usr/src/debug/ -type f | sed "s,^,/,"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
finddebug()
|
|
||||||
{
|
|
||||||
arch=$1 && shift
|
|
||||||
declare -a dirs=()
|
|
||||||
declare -a files=()
|
|
||||||
declare -a excludes=()
|
|
||||||
|
|
||||||
pushd ${RPM_BUILD_ROOT} >/dev/null 2>&1
|
|
||||||
for x in $(find usr/lib/debug/ -type f -iname *.efi.debug); do
|
|
||||||
if ! [ -e "${x}" ]; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ ${x} =~ ${arch}\.efi\.debug$ ]]; then
|
|
||||||
files[${#files[@]}]=${x}
|
|
||||||
else
|
|
||||||
excludes[${#excludes[@]}]=${x}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
for x in usr/lib/debug/.build-id/*/*.debug ; do
|
|
||||||
if ! [ -e "${x}" ]; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
link=$(readlink "${x}")
|
|
||||||
if [[ ${link} =~ ${arch}\.efi\.debug$ ]]; then
|
|
||||||
files[${#files[@]}]=${x}
|
|
||||||
files[${#files[@]}]=${x%%.debug}
|
|
||||||
else
|
|
||||||
excludes[${#excludes[@]}]=${x}
|
|
||||||
excludes[${#excludes[@]}]=${x%%.debug}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
for x in ${files[@]} ; do
|
|
||||||
declare name=$(dirname /${x})
|
|
||||||
while [ "${name}" != "/" ]; do
|
|
||||||
case "${name}" in
|
|
||||||
"/usr/lib/debug"|"/usr/lib"|"/usr")
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
dirs[${#dirs[@]}]=${name}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
name=$(dirname ${name})
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
popd >/dev/null 2>&1
|
|
||||||
for x in ${dirs[@]} ; do
|
|
||||||
echo "%dir ${x}"
|
|
||||||
done | sort | uniq
|
|
||||||
for x in ${files[@]} ; do
|
|
||||||
echo "/${x}"
|
|
||||||
done | sort | uniq
|
|
||||||
for x in ${excludes[@]} ; do
|
|
||||||
echo "%exclude /${x}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
findsource > build-${mainarch}/debugsource.list
|
|
||||||
finddebug ${mainarch} > build-${mainarch}/debugfiles.list
|
|
||||||
if [ -v altarch ]; then
|
|
||||||
finddebug ${altarch} > build-${altarch}/debugfiles.list
|
|
||||||
fi
|
|
||||||
22
shim.spec
22
shim.spec
@ -14,7 +14,6 @@
|
|||||||
%global __debug_package 1
|
%global __debug_package 1
|
||||||
%global _binaries_in_noarch_packages_terminate_build 0
|
%global _binaries_in_noarch_packages_terminate_build 0
|
||||||
%undefine _debuginfo_subpackages
|
%undefine _debuginfo_subpackages
|
||||||
%global __debug_install_post %{SOURCE100} %{efi_arch}
|
|
||||||
|
|
||||||
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' ))
|
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' ))
|
||||||
%global shimdir %{_datadir}/shim/%{version}-%{release}/%{efi_arch}
|
%global shimdir %{_datadir}/shim/%{version}-%{release}/%{efi_arch}
|
||||||
@ -23,7 +22,7 @@
|
|||||||
|
|
||||||
Name: shim
|
Name: shim
|
||||||
Version: 15
|
Version: 15
|
||||||
Release: 14
|
Release: 15
|
||||||
Summary: First-stage UEFI bootloader
|
Summary: First-stage UEFI bootloader
|
||||||
ExclusiveArch: x86_64 aarch64
|
ExclusiveArch: x86_64 aarch64
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -31,7 +30,6 @@ URL: https://github.com/rhboot/shim
|
|||||||
Source0: https://github.com/rhboot/shim/releases/download/%{version}/shim-%{version}.tar.bz2
|
Source0: https://github.com/rhboot/shim/releases/download/%{version}/shim-%{version}.tar.bz2
|
||||||
Source1: BOOTAA64.CSV
|
Source1: BOOTAA64.CSV
|
||||||
Source2: BOOTX64.CSV
|
Source2: BOOTX64.CSV
|
||||||
Source100: shim-find-debuginfo.sh
|
|
||||||
|
|
||||||
BuildRequires: elfutils-libelf-devel openssl-devel openssl git pesign gnu-efi gnu-efi-devel
|
BuildRequires: elfutils-libelf-devel openssl-devel openssl git pesign gnu-efi gnu-efi-devel
|
||||||
Requires: dbxtool efi-filesystem mokutil
|
Requires: dbxtool efi-filesystem mokutil
|
||||||
@ -65,7 +63,7 @@ Debug information is useful when developing applications that \
|
|||||||
use this package or when debugging this package.
|
use this package or when debugging this package.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
chmod +x %{SOURCE100}
|
#chmod +x %{SOURCE100}
|
||||||
%autosetup -n shim-%{version} -S git
|
%autosetup -n shim-%{version} -S git
|
||||||
git config --unset user.email
|
git config --unset user.email
|
||||||
git config --unset user.name
|
git config --unset user.name
|
||||||
@ -119,11 +117,23 @@ cd ..
|
|||||||
%{shimefivendor}/*.efi
|
%{shimefivendor}/*.efi
|
||||||
%{shimefivendor}/*.hash
|
%{shimefivendor}/*.hash
|
||||||
|
|
||||||
%files debuginfo -f build-%{efi_arch}/debugfiles.list
|
%files debuginfo
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
/usr/lib/debug/*
|
||||||
|
/usr/lib/debug/.build-id/*
|
||||||
|
%ifarch x86_64
|
||||||
|
/usr/lib/debug/.dwz/*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files debugsource -f build-%{efi_arch}/debugsource.list
|
%files debugsource
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%dir /usr/src/debug/%{name}-%{version}-%{release}
|
||||||
|
/usr/src/debug/%{name}-%{version}-%{release}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jan 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 15-15
|
||||||
|
- List debug files
|
||||||
|
|
||||||
* Tue Nov 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 15-14
|
* Tue Nov 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 15-14
|
||||||
- Remove excess install
|
- Remove excess install
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user