SHA256
3
0
forked from pool/rpm

Accepting request 987209 from home:lnussel:build

- remove obsolete RPM-HOWTO from 1999 (removed RPM-HOWTO.tar.bz2)
- move debugedit to separate package
  (Removed debuginfo-mono.patch, debuglink.diff, debugsubpkg.diff,
   finddebuginfo-absolute-links.diff, finddebuginfo.diff)
- move python-rpm-packaging to separate package
  (Removed python-rpm-packaging.diff, python-rpm-packaging.tar.bz2

OBS-URL: https://build.opensuse.org/request/show/987209
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=611
This commit is contained in:
Michael Schröder 2022-07-19 14:35:08 +00:00 committed by Git OBS Bridge
parent 86d6fafbbe
commit 4c8827bf04
10 changed files with 12 additions and 270 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3a1341b0686afa37681ccf2ebacc25bfec0ae96c5f05b4bcf5840d14fd9a29f0
size 18681

View File

@ -1,19 +0,0 @@
--- scripts/find-debuginfo.in.orig 2021-09-23 20:28:21.646855995 +0000
+++ scripts/find-debuginfo.in 2021-09-23 20:28:53.530790698 +0000
@@ -434,6 +434,16 @@ while read nlinks inum f; do
;;
*) continue ;;
esac
+ # double check that we really have an ELF file,
+ # to handle monodevelop-debugger-gdb and monodevelop-debugger-mdb
+ ftype=`/usr/bin/file $f | cut -d: -f2-`
+ case $ftype in
+ *ELF*) ;;
+ *)
+ echo "$f is not an ELF file, skipping"
+ continue
+ ;;
+ esac
if [ $nlinks -gt 1 ]; then
var=seen_$inum
if test -n "${!var}"; then

View File

@ -1,11 +0,0 @@
--- scripts/find-debuginfo.in.orig 2021-09-23 20:27:13.686995174 +0000
+++ scripts/find-debuginfo.in 2021-09-23 20:27:40.826939593 +0000
@@ -407,7 +407,7 @@ debug_link()
get_debugfn()
{
dn=$(dirname "${1#$RPM_BUILD_ROOT}")
- bn=$(basename "$1" .debug)${unique_debug_suffix}.debug
+ bn=$(basename "$1")${unique_debug_suffix}.debug
debugdn=${debugdir}${dn}
debugfn=${debugdn}/${bn}
}

View File

@ -1,41 +0,0 @@
--- scripts/find-debuginfo.in.orig 2021-09-23 20:25:41.059184871 +0000
+++ scripts/find-debuginfo.in 2021-09-23 20:26:40.363063418 +0000
@@ -643,19 +643,25 @@ if $run_dwz \
fi
fi
-# For each symlink whose target has a .debug file,
-# make a .debug symlink to that file.
-find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*" -type l -print |
-while read f
-do
- t=$(readlink -m "$f").debug
- f=${f#$RPM_BUILD_ROOT}
- t=${t#$RPM_BUILD_ROOT}
- if [ -f "$debugdir$t" ]; then
- echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug"
- debug_link "/usr/lib/debug$t" "${f}.debug"
- fi
-done
+# We used to make a .debug symlink for each symlink whose target
+# has a .debug file to that file. This is not necessary because
+# the debuglink section contains only the destination of those links.
+# Creating those links anyway results in debuginfo packages for
+# devel packages just because of the .so symlinks in them.
+
+## For each symlink whose target has a .debug file,
+## make a .debug symlink to that file.
+#find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*" -type l -print |
+#while read f
+#do
+# t=$(readlink -m "$f").debug
+# f=${f#$RPM_BUILD_ROOT}
+# t=${t#$RPM_BUILD_ROOT}
+# if [ -f "$debugdir$t" ]; then
+# echo "symlinked /usr/lib/debug$t to /usr/lib/debug${f}.debug"
+# debug_link "/usr/lib/debug$t" "${f}.debug"
+# fi
+#done
if [ -s "$SOURCEFILE" ]; then
# See also debugedit invocation. Directories must match up.

View File

@ -1,21 +0,0 @@
--- scripts/find-debuginfo.in.orig 2021-09-23 20:23:21.967469723 +0000
+++ scripts/find-debuginfo.in 2021-09-23 20:24:51.623286108 +0000
@@ -391,7 +391,17 @@ debug_link()
local l="/usr/lib/debug$2"
local t="$1"
echo >> "$LINKSFILE" "$l $t"
- link_relative "$t" "$l" "$RPM_BUILD_ROOT"
+
+ # this should correspond to what brp-symlink is doing
+ case $t in
+ /usr*)
+ link_relative "$t" "$l" "$RPM_BUILD_ROOT"
+ ;;
+ *)
+ mkdir -p "$(dirname "$RPM_BUILD_ROOT$l")" && \
+ ln -snf "$t" "$RPM_BUILD_ROOT$l"
+ ;;
+ esac
}
get_debugfn()

View File

@ -1,89 +0,0 @@
--- scripts/find-debuginfo.in.orig 2021-07-26 23:05:31.867817624 +0000
+++ scripts/find-debuginfo.in 2021-09-23 20:20:03.763875636 +0000
@@ -412,12 +412,18 @@ trap 'rm -rf "$temp"' EXIT
# Build a list of unstripped ELF files and their hardlinks
touch "$temp/primary"
-find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \
- \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
- -print | LC_ALL=C sort |
-file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped.*/\1/p' |
-xargs --no-run-if-empty stat -c '%h %D_%i %n' |
+find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f \( -perm /111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" -print0 | LC_ALL=C sort -z |
+xargs --no-run-if-empty -0 stat -c '%h %D_%i %n' |
while read nlinks inum f; do
+ case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
+ *debuglink*) continue ;;
+ *debug*) ;;
+ *gnu.version*)
+ echo "WARNING: "`echo $f | sed -e "s,^$RPM_BUILD_ROOT/*,/,"`" is already stripped!"
+ continue
+ ;;
+ *) continue ;;
+ esac
if [ $nlinks -gt 1 ]; then
var=seen_$inum
if test -n "${!var}"; then
@@ -450,6 +456,8 @@ do_file()
if [ "$no_recompute_build_id" = "true" ]; then
no_recompute="-n"
fi
+ mode=$(stat -c %a "$f")
+ chmod +w "$f"
id=$(${install_dir}/debugedit -b "$debug_base_name" -d "$debug_dest_name" \
$no_recompute -i \
${build_id_seed:+--build-id-seed="$build_id_seed"} \
@@ -477,17 +485,30 @@ do_file()
# just has its file names collected and adjusted.
case "$dn" in
/usr/lib/debug/*)
+ chmod $mode "$f"
return ;;
esac
mkdir -p "${debugdn}"
- if test -w "$f"; then
- strip_to_debug "${debugfn}" "$f"
- else
- chmod u+w "$f"
- strip_to_debug "${debugfn}" "$f"
- chmod u-w "$f"
- fi
+ objcopy --only-keep-debug "$f" "$debugfn" || :
+ (
+ shopt -s extglob
+ strip_option="--strip-all"
+ case "$f" in
+ *.ko)
+ strip_option="--strip-debug" ;;
+ *$STRIP_KEEP_SYMTAB*)
+ if test -n "$STRIP_KEEP_SYMTAB"; then
+ strip_option="--strip-debug"
+ fi
+ ;;
+ esac
+ if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then
+ strip_option=
+ fi
+ objcopy --add-gnu-debuglink="$debugfn" -R .comment -R .GCC.command.line $strip_option "$f"
+ chmod $mode "$f"
+ ) || :
# strip -g implies we have full symtab, don't add mini symtab in that case.
# It only makes sense to add a minisymtab for executables and shared
@@ -646,12 +667,14 @@ if [ -s "$SOURCEFILE" ]; then
# and non-standard modes may be inherented from original directories, fixup
find "${RPM_BUILD_ROOT}${debug_dest_name}" -type d -print0 |
xargs --no-run-if-empty -0 chmod 0755
+ find "${RPM_BUILD_ROOT}${debug_dest_name}" -type f -print0 |
+ xargs --no-run-if-empty -0 chmod a+r
fi
if [ -d "${RPM_BUILD_ROOT}/usr/lib" ] || [ -d "${RPM_BUILD_ROOT}/usr/src" ]; then
((nout > 0)) ||
test ! -d "${RPM_BUILD_ROOT}/usr/lib" ||
- (cd "${RPM_BUILD_ROOT}/usr/lib"; find debug -type d) |
+ (cd "${RPM_BUILD_ROOT}/usr/lib"; test ! -d debug || find debug -type d) |
sed 's,^,%dir /usr/lib/,' >> "$LISTFILE"
(cd "${RPM_BUILD_ROOT}/usr"

View File

@ -1,16 +0,0 @@
--- fileattrs/pythondist.attr.orig 2021-09-23 20:14:04.880605674 +0000
+++ fileattrs/pythondist.attr 2021-09-23 20:15:23.392446317 +0000
@@ -1,3 +1,4 @@
%__pythondist_provides %{_rpmconfigdir}/pythondistdeps.py --provides --majorver-provides
-%__pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires
+#disabled for now
+#%__pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires
%__pythondist_path /lib(64)?/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$
--- scripts/pythondistdeps.py.orig 2021-09-23 20:14:26.496561795 +0000
+++ scripts/pythondistdeps.py 2021-09-23 20:14:30.748553177 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright 2010 Per Øyvind Karlsen <proyvind@moondrake.org>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f82689c47ecbac6b1e93a71cdfab30a6365ac5265dc2cb48381c6e2aeffd193f
size 32846

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jun 27 11:01:54 UTC 2022 - Ludwig Nussel <lnussel@suse.de>
- remove obsolete RPM-HOWTO from 1999 (removed RPM-HOWTO.tar.bz2)
- move debugedit to separate package
(Removed debuginfo-mono.patch, debuglink.diff, debugsubpkg.diff,
finddebuginfo-absolute-links.diff, finddebuginfo.diff)
- move python-rpm-packaging to separate package
(Removed python-rpm-packaging.diff, python-rpm-packaging.tar.bz2
-------------------------------------------------------------------
Tue May 31 19:58:07 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -63,9 +63,6 @@ Release: 0
URL: https://rpm.org/
#Git-Clone: https://github.com/rpm-software-management/rpm
Source: http://ftp.rpm.org/releases/rpm-4.17.x/rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source2: https://sourceware.org/ftp/debugedit/5.0/debugedit-5.0.tar.xz
Source3: python-rpm-packaging.tar.bz2
Source5: rpmsort
Source8: rpmconfigcheck
Source9: sysconfig.services-rpm
@ -119,13 +116,6 @@ Patch135: ocaml-cmxs.diff
Patch136: 0001-fix-minimize_writes.patch
# touches a generated file
Patch180: whatrequires-doc.diff
Patch200: finddebuginfo.diff
Patch201: finddebuginfo-absolute-links.diff
Patch202: debugsubpkg.diff
Patch203: debuglink.diff
Patch204: debuginfo-mono.patch
Patch205: singlefilemode.diff
Patch300: python-rpm-packaging.diff
Patch6464: auto-config-update-aarch64-ppc64le.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
@ -196,6 +186,8 @@ Requires: tar
Requires: util-linux
Requires: which
Requires: xz
# needed for debuginfo generation
Requires: debugedit = 5.0
# drop candidates
Requires: cpio
Requires: file
@ -209,17 +201,6 @@ Conflicts: rpm < 4.15.0
If you want to build a rpm, you need this package. It provides rpmbuild
and requires some packages that are usually required.
%package build-python
Summary: RPM dependency generator for Python
Group: Development/Languages/Python
Requires: python3-base
# To avoid widespread breakage by package mistakenly ignoring
# their requirement of python-rpm-macros (bsc#1180125)
Requires: python-rpm-macros
%description build-python
Provides and requires generator for .py files and modules.
%package build-perl
Summary: RPM dependency generator for Perl
Group: Development/Languages/Perl
@ -230,9 +211,6 @@ Provides and requires generator for .pl files and modules.
%prep
%setup -q -n rpm-%{version}
tar -xjf %{SOURCE1}
tar -xJf %{SOURCE2}
tar -xjf %{SOURCE3}
rm -rf sqlite
%patch -P 5 -P 12 -P 13 -P 16 -P 18
@ -250,16 +228,6 @@ rm -rf sqlite
%patch -P 135 -P 136
%patch -P 180
# debugedit patches
pushd debugedit-5.0
%patch -P 200 -P 201 -P 202 -P 203 -P 204 -P 205
popd
# python-rpm-packaging patches
pushd python-rpm-packaging
%patch -P 300
popd
%ifarch aarch64 ppc64le riscv64
%patch6464
%endif
@ -303,14 +271,6 @@ $BUILDTARGET
rm po/de.gmo
make %{?_smp_mflags}
%if "%{NAME}" != "python-rpm"
pushd debugedit-5.0
./configure --bindir=/usr/lib/rpm
touch find-debuginfo.1
make
popd
%endif
%install
mkdir -p %{buildroot}/usr/lib
mkdir -p %{buildroot}/usr/share/locale
@ -392,16 +352,6 @@ echo -n "%{_target_cpu}-suse-linux-gnueabi" > %{buildroot}/etc/rpm/platform
echo "setting the default database backend to 'ndb'"
sed -i -e '/_db_backend/s/sqlite/ndb/' %{buildroot}/usr/lib/rpm/macros
# install debugedit files
pushd debugedit-5.0
make install-exec DESTDIR="%{buildroot}"
popd
# install python-rpm-packaging files
cp -a python-rpm-packaging/fileattrs/*.attr %{buildroot}/usr/lib/rpm/fileattrs
cp -a python-rpm-packaging/scripts/* %{buildroot}/usr/lib/rpm
chmod 755 %{buildroot}/usr/lib/rpm/brp-python-bytecompile
%post
%{fillup_only -an services}
@ -442,7 +392,6 @@ fi
%defattr(-,root,root)
%license COPYING
%doc docs/manual
%doc RPM-HOWTO
/etc/rpm
%if !0%{?usrmerged}
/bin/rpm
@ -498,17 +447,11 @@ fi
/usr/lib/rpm/ocamldeps.sh
/usr/lib/rpm/elfdeps
/usr/lib/rpm/rpmdeps
/usr/lib/rpm/debugedit
/usr/lib/rpm/sepdebugcrcfix
/usr/bin/rpmspec
/usr/lib/rpm/brp-*
%exclude /usr/lib/rpm/brp-python-hardlink
%exclude /usr/lib/rpm/brp-python-bytecompile
/usr/lib/rpm/check-*
/usr/lib/rpm/*find*
/usr/lib/rpm/fileattrs/
%exclude /usr/lib/rpm/fileattrs/python.attr
%exclude /usr/lib/rpm/fileattrs/pythondist.attr
%exclude /usr/lib/rpm/fileattrs/perl*.attr
/usr/lib/rpm/*.prov
%exclude /usr/lib/rpm/perl.prov
@ -519,14 +462,6 @@ fi
/usr/lib/rpm/config.sub
%endif
%files build-python
%defattr(-,root,root)
/usr/lib/rpm/fileattrs/python.attr
/usr/lib/rpm/fileattrs/pythondist.attr
/usr/lib/rpm/pythondistdeps.py
/usr/lib/rpm/brp-python-hardlink
/usr/lib/rpm/brp-python-bytecompile
%files build-perl
%defattr(-,root,root)
/usr/lib/rpm/fileattrs/perl*.attr