grubby/grubby.spec
maqi 3396b3a12e add sw_64 support
(cherry picked from commit 726c29769255c04555f276d4f21dfe5360c7f8bc)
2025-03-06 13:23:55 +08:00

172 lines
6.0 KiB
RPMSpec

Name: grubby
Version: 8.40
Release: 35
Summary: Update and display information about the configuration files
License: GPLv2+
URL: https://github.com/rhinstaller/grubby
Source0: https://github.com/rhboot/grubby/archive/%{version}-1.tar.gz
Source1: grubby-bls
Source2: grubby.in
Source3: installkernel.in
Patch1: drop-uboot-uImage-creation.patch
Patch2: 0001-Change-return-type-in-getRootSpecifier.patch
Patch3: 0002-Add-btrfs-subvolume-support-for-grub2.patch
Patch4: 0003-Use-system-LDFLAGS.patch
Patch5: 0004-Honor-sbindir.patch
Patch6: 0005-installkernel-use-kernel-install.patch
Patch6001: Set-envFile-from-env-when-bootloader-is-not-specifie.patch
Patch6002: grubby-properly-handle-mixed-and-and-nested-quotes.patch
Patch6003: Drop-SEGV-handler.patch
Patch6004: Add-a-bunch-of-tests-for-various-default-kernel-titl.patch
Patch6005: Emit-better-systemd-debug-settings-on-debug-entries.patch
Patch6006: Don-t-leak-from-one-extractTitle-call.patch
Patch6007: Fix-dracut-cmdline-options-and-conditionalize-them-t.patch
Patch6008: Always-do-the-rungrubby-debug-after-the-normal-kerne.patch
Patch6009: Be-more-thorough-about-flushing-our-config-file-when.patch
Patch6010: Fix-incorrect-test-case-and-remove-args-with-a-value.patch
Patch6011: grubby-Make-sure-configure-BOOTLOADER-variables-are-.patch
Patch6012: Fix-GCC-warnings-about-possible-string-truncations-a.patch
Patch6013: Check-that-pointers-are-not-NULL-before-dereferencin.patch
Patch6014: Print-default-image-even-if-isn-t-a-suitable-one.patch
Patch6015: backport-Make-SET_VARIABLE-get-handled-individually-in-GetNex.patch
Patch6016: backport-Fix-stringop-overflow-warning.patch
Patch6017: backport-Fix-maybe-uninitialized-warning.patch
Patch9001: fix-make-test-fail-when-no-boot-partition.patch
Patch9002: 0001-add-loongarch-support-for-grubby.patch
Patch9003: grubby-aarch64-skip-test-grub2.15.patch
Patch9004: support-specify-cc.patch
Patch9005: 0001-add-riscv64-support.patch
Patch9006: grubby-8.40-After-opening-the-manual-through-man-the-symbol-cann.patch
Patch9007: 0001-add-sw_64-support-for-grubby.patch
BuildRequires: gcc pkgconfig glib2-devel popt-devel
BuildRequires: libblkid-devel git-core sed make
BuildRequires: util-linux-ng
%ifarch aarch64 i686 x86_64
BuildRequires: grub2-tools-minimal
Requires: grub2-tools grub2-tools-minimal
%endif
%description
grubby is a command line tool for updating and displaying information about
the configuration files for the grub, lilo, elilo (ia64), yaboot (powerpc)
and zipl (s390) boot loaders. It is primarily designed to be used from scripts
which install new kernels and need to find information about the current boot
environment.
%package bls
Summary: a command line tool for updating bootloader configs
Conflicts: %{name} <= 8.40-13
BuildArch: noarch
%description bls
the package provides a grubby wrapper that manages BootLoaderSpec files and is
meant to only be used for legacy compatibility users with existing grubby users.
%package_help
%prep
%autosetup -n %{name}-%{version}-1 -p1
%build
%if "%toolchain" == "clang"
CFLAGS="$CFLAGS -Wno-error=logical-not-parentheses"
%endif
%make_build
%check
make test
%install
%make_install mandir=%{_mandir} sbindir=%{_sbindir}
mkdir -p %{buildroot}%{_libexecdir}/{grubby,installkernel}/ %{buildroot}%{_sbindir}/
mv -v %{buildroot}%{_sbindir}/grubby %{buildroot}%{_libexecdir}/grubby/grubby
mv -v %{buildroot}%{_sbindir}/installkernel %{buildroot}%{_libexecdir}/installkernel/installkernel
cp -v %{SOURCE1} %{buildroot}%{_libexecdir}/grubby/
sed -e "s,@@LIBEXECDIR@@,%{_libexecdir}/grubby,g" %{SOURCE2} > %{buildroot}%{_sbindir}/grubby
sed -e "s,@@LIBEXECDIR@@,%{_libexecdir}/installkernel,g" %{SOURCE3} > %{buildroot}%{_sbindir}/installkernel
%pre
%preun
%post
%postun
%files
%license COPYING
%dir %{_libexecdir}/grubby
%dir %{_libexecdir}/installkernel
%attr(0755,root,root) %{_libexecdir}/grubby/grubby
%attr(0755,root,root) %{_libexecdir}/installkernel/installkernel
%attr(0755,root,root) %{_sbindir}/grubby
%attr(0755,root,root) %{_sbindir}/installkernel
%attr(0755,root,root) %{_sbindir}/new-kernel-pkg
%files bls
%dir %{_libexecdir}/grubby
%attr(0755,root,root) %{_libexecdir}/grubby/grubby-bls
%attr(0755,root,root) %{_sbindir}/grubby
%files help
%defattr(-,root,root)
%{_mandir}/man8/*.8*
%changelog
* Tue Mar 04 2025 maqi <maqi@uniontech.com> - 8.40-35
- add sw_64 support
* Thu Sep 19 2024 yueyuankun <yueyuankun@kylinos.cn> - 8.40-34
- Fix man manual unable to recognize '-'
* Fri May 10 2024 ouuleilei <wangliu@iscas.ac.cn> - 8.40-33
- add riscv64 support
* Fri Apr 14 2023 jammyjellyfish <jammyjellyfish255@outlook.com> - 8.40-32
- Support build with clang
* Sat Feb 18 2023 zhangnan <zhangnan134@huawei.com> - 8.40-31
- enable make test
* Tue Nov 01 2022 Wenlong Zhang <zhangwenlong@loongson.cn> - 8.40-30
- add loongarch support for grubby
* Wed Oct 26 2022 yanglongkang <yanglongkang@h-partners.com> - 8.40-29
- rebuild for next release
* Fri Jul 30 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 8.40-28
- Fix stringop-overflow warning
- Fix maybe-uninitialized warning
* Thu Jul 22 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 8.40-27
- Remove unnecessary buildrequires:gdb
- Thu Jan 1 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 8.40-26
- Fix the following problem:The grub.cfg file is modified.As a result,the system fails to start.
* Mon Nov 2 2020 yixiangzhike <zhangxingliang3@huawei.com> - 8.40-25
- add grub2-tools-minimal to Requires
* Sat Mar 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 8.40-24
- fixbug in self-building
* Mon Dec 30 2019 openEuler Buildteam <buildteam@openeuler.org> - 8.40-23
- Modify patch info
* Sat Nov 30 2019 openEuler Buildteam <buildteam@openeuler.org> - 8.40-22
- add package bls to fix kernel package installation error
* Thu Sep 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 8.40-21
- Modify patch info
* Mon Sep 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 8.40-20
- Modify Requires
* Wed Sep 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 8.40-19
- Package init