Compare commits

..

No commits in common. "1bd0a8c1b98ccdeb904b243217c0d186036008be" and "c5614a2697248b86685d28512bb8a69740720753" have entirely different histories.

5 changed files with 3 additions and 150 deletions

View File

@ -1,50 +0,0 @@
From b1ef9afb58b2a2ba2224d777a57ffbf0666eff3f Mon Sep 17 00:00:00 2001
From: lirui <lirui130@huawei.com>
Date: Thu, 28 Jan 2021 10:09:57 +0800
Subject: [PATCH] Add macros _binaries_in_noarch_packages_terminate_build and
_build_id_links
Some noarch packages use macro _binaries_in_noarch_packages_terminate_build to
package binary files. But when rpmrebuild can't read macro
_binaries_in_noarch_packages_terminate_build, it causes a problem, so add macro
_binaries_in_noarch_packages_terminate_build to the noarch package.
On the compilation environment, the macro _build_id_links is compat,and the
compiled package does not contain build-id. But during rpmrebuild, build-id
will be generated, but the buildroot directory is read-only, causing failure,
so set macro _build_id_links to none
---
rpmrebuild.sh | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/rpmrebuild.sh b/rpmrebuild.sh
index 2da043e..8b7f33d 100755
--- a/rpmrebuild.sh
+++ b/rpmrebuild.sh
@@ -216,10 +216,19 @@ function RpmBuild
return 1
}
fi
- eval $change_arch $BUILDCMD --define "'buildroot $BUILDROOT'" $rpm_defines -bb $rpm_verbose $additional ${FIC_SPEC} || {
- Error "(RpmBuild) package '${PAQUET}' $BuildFailed"
- return 1
- }
+
+ # Add macros %_binaries_in_noarch_packages_terminate_build to the noarch architecture
+ if [ "$pac_arch" = "noarch" ]; then
+ eval $change_arch $BUILDCMD --define "'buildroot $BUILDROOT'" --define "'_build_id_links none'" --define "'%_binaries_in_noarch_packages_terminate_build 0'" $rpm_defines -bb $rpm_verbose $additional ${FIC_SPEC} || {
+ Error "package '${PAQUET}' $BuildFailed"
+ return 1
+ }
+ else
+ eval $change_arch $BUILDCMD --define "'buildroot $BUILDROOT'" --define "'_build_id_links none'" $rpm_defines -bb $rpm_verbose $additional ${FIC_SPEC} || {
+ Error "package '${PAQUET}' $BuildFailed"
+ return 1
+ }
+ fi
return 0
}
--
2.33.0

View File

@ -1,39 +0,0 @@
From 731121ce199655c643ad8bbbec01a4d0efd9fa96 Mon Sep 17 00:00:00 2001
From: licunlong1 <licunlong1@huawei.com>
Date: Wed, 7 Sep 2022 17:09:00 +0800
Subject: [PATCH] fix errors found from shellcheck scan
---
plugins/demofiles.sh | 2 +-
rpmrebuild.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/demofiles.sh b/plugins/demofiles.sh
index 7d3f029..7511fd9 100755
--- a/plugins/demofiles.sh
+++ b/plugins/demofiles.sh
@@ -40,7 +40,7 @@ function syntaxe () {
###############################################################################
# test for arguments
-while [[ $ 1 ]]
+while [[ $1 ]]
do
case $1 in
-h | --help )
diff --git a/rpmrebuild.sh b/rpmrebuild.sh
index 2da043e..8e4f9b2 100755
--- a/rpmrebuild.sh
+++ b/rpmrebuild.sh
@@ -562,7 +562,7 @@ function Main
CommandLineParsing "$@" || return
[ "x$NEED_EXIT" = "x" ] || return $NEED_EXIT
- Debug "rpmrebuild version $VERSION : $@"
+ Debug "rpmrebuild version $VERSION : $*"
check_i18ndomains
--
2.33.0

View File

@ -1,25 +0,0 @@
From 5fb7daedd8ee3651f74382295e2983d5ca4707ff Mon Sep 17 00:00:00 2001
From: xujing <xujing125@huawei.com>
Date: Tue, 8 Nov 2022 10:53:03 +0800
Subject: [PATCH] fix -r does not work
---
rpmrebuild_parser.src | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpmrebuild_parser.src b/rpmrebuild_parser.src
index 1b1b8be..e244a8d 100755
--- a/rpmrebuild_parser.src
+++ b/rpmrebuild_parser.src
@@ -1243,7 +1243,7 @@ function CommandLineParsing
export LONG_OPTION
- while getopts "5a:bc:d:D:ef:hi:Iklm:npPRrs:vVwy:-:" opt; do
+ while getopts "5a:bc:d:D:ef:hi:Iklm:npPRr:s:vVwy:-:" opt; do
OPTIND_INCR=""
case "$opt" in
5) LONG_OPTION="md5-compat-digest";;
--
2.27.0

View File

@ -1,26 +1,22 @@
Name: rpmrebuild
Version: 2.16
Release: 12
Release: 7
Summary: A tool to build a rpm file from the rpm database
License: GPLv2+
URL: http://rpmrebuild.sourceforge.net
Source0: https://downloads.sourceforge.net/rpmrebuild/%{name}-%{version}.tar.gz
Patch9000: bugfix-reset-defattr-when-users-want-to-keep-files-permissi.patch
Patch9001: fix-the-CreateBuildRoot-error-when-using-rpmrebuild-command.patch
Patch9001: openEuler-fix-the-CreateBuildRoot-error-when-using-rpmrebuild-command.patch
Patch9002: fix-k-may-not-keep-uid-or-gid.patch
Patch9003: fix-spelling-errors-that-could-mislead-users.patch
Patch9004: fix-cap-from-fs-does-not-work.patch
Patch9005: fix-comment-missing-n-does-not-work.patch
Patch9006: fix-r-does-not-work.patch
Patch9007: fix-errors-found-from-shellcheck-scan.patch
Patch9008: Add-macros-_binaries_in_noarch_packages_terminate_bu.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: rpm grep bash cpio textutils rpm-build
%description
%{name} allows to build an rpm file from an installed rpm, or from
another rpm file, with or without changes (batch or interactive). It
@ -45,6 +41,7 @@ install -d -p $RPM_BUILD_ROOT%{_mandir}/fr/man1/
mv $RPM_BUILD_ROOT%{_mandir}/fr_FR.UTF-8/man1/* $RPM_BUILD_ROOT%{_mandir}/fr/man1/
rm -rf $RPM_BUILD_ROOT%{_mandir}/fr_FR.UTF-8/man1/
%files
%defattr(-,root,root)
%doc AUTHORS
@ -66,36 +63,6 @@ rm -rf $RPM_BUILD_ROOT%{_mandir}/fr_FR.UTF-8/man1/
%{_mandir}/fr/man1/*.gz
%changelog
* Fri Jan 19 2024 dongyuzhen <dongyuzhen@h-partners.com> - 2.16-12
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:revert: remove the require to rpm-build.For consistency with other community-released dependencies
* Mon Jan 15 2024 dongyuzhen <dongyuzhen@h-partners.com> - 2.16-11
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix failure when recompiling noarch rpm and remove the require to rpm-build
* Fri Jan 12 2024 dongyuzhen <dongyuzhen@h-partners.com> - 2.16-10
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix errors found from shellcheck scan
* Fri Nov 25 2022 dongyuzhen <dongyuzhen@h-partners.com> - 2.16-9
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:modify the patch name for the problem of vendor hard code
* Tue Nov 8 2022 xujing <xujing125@huawei.com> - 2.16-8
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix -r does not work
* Tue Nov 8 2022 xujing <xujing125@huawei.com> - 2.16-7
- Type:bugfix
- CVE:NA