Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-buildrequires
grub2
grub2.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File grub2.spec of Package grub2
%if 0%{?suse_version} > 1140 %bcond_without grub2_fonts %else %bcond_with grub2_fonts %endif %define build_flavor @BUILD_FLAVOR@%nil %define pkg grub2 %define chainloader_pfx %pkg-chainloader %define chainloader_mountdir /chainloader %define chainloader_buildrequires 1 %if "%build_flavor" == "" ExclusiveArch: do-not-build %define nsuffix %nil %else %define nsuffix -%build_flavor %endif Name: %pkg%nsuffix Version: 0 Release: 0 Summary: Chainloader for MBR License: GPL-3.0+ Group: System/Boot Url: http:///www.google.com/ncr %define grub_revision_full 8719cc2040368d43ab2de0b6e1b850b2c9cfc5b7 %define grub_revision_short 8719cc204 %define grub_date_unix 1712843306 %define grub_date_commit 2024-04-11 15:48:26 +0200 Patch1513152884: grub.tastaturbelegung.patch Patch1523651671: grub.blocklists.patch %if %suse_version > 1110 BuildRequires: python(abi) > 3.0 %endif %define gnulib_version 9f48fb992a3d7e96610c4ce8be969cff2d61a01b BuildRoot: %_tmppath/%name-%version-build Source1000: grub2-xen-pv-firmware.cfg %if "%build_flavor" == "chainloader" ExclusiveArch: noarch x86_64 %ix86 ppc ppc64 ppc64le %ifarch x86_64 %ix86 Requires: %pkg-olh-i386-pc %endif %endif %if "%build_flavor" == "olh-i386-pc" ExclusiveArch: noarch x86_64 %ix86 BuildArch: noarch %endif %if "%build_flavor" == "olh-i386-xen" ExclusiveArch: noarch x86_64 %ix86 BuildArch: noarch %endif %if "%build_flavor" == "olh-i386-xen_pvh" ExclusiveArch: noarch x86_64 %ix86 BuildArch: noarch %endif %if "%build_flavor" == "olh-powerpc-ieee1275" ExclusiveArch: noarch ppc ppc64 ppc64le BuildArch: noarch %endif %if "%build_flavor" == "olh-x86_64-efi" ExclusiveArch: noarch x86_64 BuildArch: noarch %endif %if "%build_flavor" == "olh-x86_64-xen" ExclusiveArch: noarch x86_64 BuildArch: noarch %endif %if "%build_flavor" == "tftpboot-i386-pc" %define chainloader_buildrequires 0 BuildRequires: memtest86+ BuildRequires: %pkg-chainloader BuildRequires: %pkg-olh-i386-pc ExclusiveArch: noarch x86_64 BuildArch: noarch %endif %if "%build_flavor" == "tftpboot-x86_64-efi" %define chainloader_buildrequires 0 BuildRequires: memtest86+ BuildRequires: %pkg-chainloader BuildRequires: %pkg-olh-x86_64-efi ExclusiveArch: noarch x86_64 BuildArch: noarch %endif %if "%chainloader_buildrequires" != "0" BuildRequires: autoconf >= 2.64 BuildRequires: automake >= 1.14 BuildRequires: bison BuildRequires: flex BuildRequires: libtool BuildRequires: makeinfo BuildRequires: pkg-config BuildRequires: python-devel %if 0%{?suse_version} < 1500 BuildRequires: gcc7 %endif %if %{with grub2_fonts} BuildRequires: gnu-unifont-bitmap-fonts BuildRequires: dejavu-fonts %endif BuildRequires: pkgconfig(freetype2) %endif %description A chainloader from MBR. The boot files will be installed in %chainloader_mountdir/%chainloader_pfx %prep rm -rf %_builddir/%name-%version mv %_sourcedir/%pkg-%version %_builddir/%name-%version %setup -c -T -D pushd '.' %patch -P 1513152884 -p1 %patch -P 1523651671 -p1 popd rm -rf './grub-core/lib/gnulib' mkdir -vp './grub-core/lib' mv -v '%_sourcedir/gnulib-%gnulib_version' './grub-core/lib/gnulib' if pushd subprojects/packagefiles 2>/dev/null then for prj in * do if pushd "${prj}" > /dev/null then for f in * do test -f "${f}" || continue ln -vt "../../${prj}/" * break done popd > /dev/null fi done popd > /dev/null fi %build find -name "*.lst" -ls name='%name' tag='%pkg' build_flavor='%build_flavor' target="${build_flavor%%-*}" target="${target#*-}" platform="${build_flavor##*-}" build_dir='.b' src='%version' # if test "${build_flavor}" = "chainloader" then : %ifarch x86_64 %ix86 target=i386 platform=pc %endif %ifarch ppc ppc64 ppc64le target=powerpc platform=ieee1275 %endif fi # td=$PWD cd .. mv "${td}" "${src}" mkdir "${td}" mv "${src}" "${td}" cd "${td}" # test -x "$(type -p gcc)" && CC="$_" test -x "$(type -p gcc-5)" && CC="$_" test -x "$(type -p gcc-6)" && CC="$_" test -x "$(type -p gcc-7)" && CC="$_" test -x "$(type -p gcc-8)" && CC="$_" test -x "$(type -p gcc-9)" && CC="$_" export CC="$(readlink -f ${CC})" export TARGET_CC="${CC}" export BUILD_CC="${CC}" # # m=" acpi all_video at_keyboard biosdisk boot cat chain configfile date echo halt keylayouts linux linux16 loadenv ls msdospart multiboot multiboot2 parttool pxechain reboot search search_fs_file search_fs_uuid search_label serial sleep terminal terminfo test true " CRYPTO_MODULES=" gcry_rijndael gcry_sha1 gcry_sha256 " DISK_MODULES=" luks lvm part_gpt part_msdos " FS_MODULES=" btrfs exfat ext2 fat iso9660 ntfs squash4 udf xfs " # GRUB_MKIMAGE_MODULES=" ${m} ${CRYPTO_MODULES} ${DISK_MODULES} ${FS_MODULES} " netdir_modules=" ${m} ${CRYPTO_MODULES} ${DISK_MODULES} ${FS_MODULES} http " # # tee .env.txt <<_EOS_ build_flavor="${build_flavor}" platform="${platform}" target="${target}" prefix="%_libdir/%chainloader_pfx" build_dir="${build_dir}" src="${src}" GRUB_MKIMAGE_MODULES="${GRUB_MKIMAGE_MODULES}" netdir_modules="${netdir_modules}" _EOS_ . ./.env.txt # # do_bootstrap() { pushd "${src}" sed -i~ '/^AC_INIT/s|^\(AC_INIT[^,]\+\),\([^,]\+\),\(.*\)|\1,[%version],\3|' configure.ac if diff -u configure.ac~ configure.ac then : expected a match exit 2 else : changed fi bash bootstrap \ --gnulib-srcdir='./grub-core/lib/gnulib' \ --skip-po \ --no-git \ --no-bootstrap-sync ./configure --help find -type f -exec chmod a-w '{}' + find -type d -exec chmod go-w '{}' + chmod u+w docs popd } # do_configure() { mkdir "${build_dir}" pushd "$_" mkdir 'grub-core' cat "../${src}/grub-core/extra_deps.lst" > 'grub-core/extra_deps.lst' env \ CFLAGS=-Wall \ CXXFLAGS=-Wall \ FFLAGS=-Wall \ "../${src}/configure" \ --target=${target}-suse-linux \ --with-platform=${platform} \ --prefix="${prefix}" \ --disable-boot-time \ --disable-cache-stats \ --disable-device-mapper \ --disable-efiemu \ --disable-grub-emu-pci \ --disable-grub-emu-sdl \ --disable-grub-mkfont \ --disable-grub-mount \ --disable-grub-themes \ --disable-liblzma \ --disable-libzfs \ --disable-mm-debug \ --disable-nls \ --disable-werror \ --enable-rpath \ "$@" %make_build \ V=1 \ all \ %nil || : make check to get deps failed as expected with exit code $? popd } # do_chainloader() { do_configure \ --with-bootdir=%chainloader_mountdir/%chainloader_pfx \ %if %{with grub2_fonts} --enable-grub-mkfont \ --enable-grub-themes \ %endif --with-grubdir=%pkg \ %nil } # case "${build_flavor}" in chainloader) do_bootstrap do_chainloader ;; tftpboot-*) ;; olh-*-efi) do_bootstrap do_chainloader ;; olh-*-pc) do_bootstrap do_chainloader ;; olh-*-xen|olh-*-xen_pvh) do_bootstrap do_configure ;; esac %install . ./.env.txt mkdir -vp '%buildroot' > 'files' do_helpers() { echo '%%config %%attr(544,root,root) %_sbindir/*' >> 'files' pfx='%chainloader_pfx' mkdir -vp %buildroot%_sbindir pushd "$_" # grub2-chainloader-set-default tee "${pfx}-set-default" <<'_EOS_' #/bin/bash exe='grub-set-default' args=() set_install= menuentry= while test "$#" -gt 0 do case "${1}" in --help) args+=( "${1}" ) ;; -h) args+=( "${1}" ) ;; --version) args+=( "${1}" ) ;; -V) args+=( "${1}" ) ;; --boot-directory) args+=( "${1}" ) ;; -i) set_install='do_install' ;; --) break ;; *) break ;; esac shift done # remap a blockdevice if test -b "${1}" then if test -L "${1}" then menuentry="${1##*/}" else echo 2>&1 "${0}: require a /dev/disk/by-label/* symlink if a block device is given" exit 1 fi else menuentry="${1}" fi if test -z "${menuentry}" then echo 2>&1 "${0}: require filesystem label from /dev/disk/by-label/* to activate a 'menuentry' in %chainloader_mountdir/%chainloader_pfx/grub2/grub.cfg" exit 1 fi if test -n "${set_install}" then args+=( "install ${menuentry}" ) else args+=( "${menuentry}" ) fi set -x exec "%_libdir/%chainloader_pfx/sbin/${exe}" "${args[@]}" _EOS_ # grub2-chainloader-install tee "${pfx}-install" <<'_EOS_' #/bin/bash exe='grub-install' args=() while test "$#" -gt 0 do case "${1}" in -*) args+=( "${1}" ) ;; --) break ;; *) break ;; esac shift done if test -b "${1}" then args+=( "${1}" ) set -x exec "%_libdir/%chainloader_pfx/sbin/${exe}" "${args[@]}" fi echo 2>&1 "${0}: requires a block device" exit 1 _EOS_ # popd } # ## # case "${build_flavor}" in chainloader) do_helpers echo '%_libdir/%chainloader_pfx' >> 'files' pushd "${build_dir}" %make_build DESTDIR=%buildroot install-exec-am popd ;; tftpboot-*) mods= for mod in ${netdir_modules} do test -f "${prefix}/lib/grub/${target}-${platform}/${mod}.mod" || continue mods="${mods} ${mod}" done echo '%_datadir/%name' >> 'files' ${prefix}/bin/grub-mknetdir \ --directory="${prefix}/lib/grub/${target}-${platform}" \ --net-directory='%buildroot%_datadir/%name/tftpboot' \ --subdir=/ \ --modules="${mods}" %if "%build_flavor" == "tftpboot-i386-pc" cp -avLt "%buildroot%_datadir/%name/tftpboot/${target}-${platform}" \ $(ls -1d /usr/lib/memtest86/memtest.bin /boot/memtest.bin 2>/dev/null || : ls $? ) || : cp $? %endif %if "%build_flavor" == "tftpboot-x86_64-efi" cp -avLt "%buildroot%_datadir/%name/tftpboot/${target}-${platform}" \ $(ls -1d /usr/lib/memtest86/memtest.efi /boot/memtest.efi 2>/dev/null || : ls $? ) || : cp $? %endif ;; olh-*-efi) echo '%_libdir/%chainloader_pfx' >> 'files' pushd "${build_dir}" %make_build DESTDIR=%buildroot -C grub-core check %make_build DESTDIR=%buildroot -C grub-core 'install-platformDATA' 'install-platformPROGRAMS' mods= for mod in ${GRUB_MKIMAGE_MODULES} do test -f "grub-core/${mod}.mod" || continue mods="${mods} ${mod}" done ./grub-mkimage \ --prefix= \ -o "%buildroot/${prefix}/${target}-${platform}" \ -O "${target}-${platform}" \ -d grub-core/ \ ${mods} popd ;; olh-*-pc) echo '%_libdir/%chainloader_pfx' >> 'files' pushd "${build_dir}" %make_build DESTDIR=%buildroot -C grub-core all %make_build DESTDIR=%buildroot -C grub-core 'install-platformDATA' 'install-platformPROGRAMS' popd ;; olh-*-xen|olh-*-xen_pvh) echo '%_libdir/%chainloader_pfx' >> 'files' pushd "${build_dir}" %make_build DESTDIR=%buildroot -C grub-core check %make_build DESTDIR=%buildroot -C grub-core 'install-platformDATA' 'install-platformPROGRAMS' ./grub-mkstandalone \ --grub-mkimage=./grub-mkimage \ -o "%buildroot/${prefix}/${target}-${platform}" \ -O ${target}-${platform} \ -d grub-core/ \ "/boot/grub/grub.cfg=%{SOURCE1000}" popd ;; esac head -n -0 files # find %buildroot -name "config.h" -print -delete find %buildroot \( \ -name "*.module" -o \ -name "*.image" -o \ -name "*.exec" -o \ -name "*.mod" \ \) -exec chmod -v 444 '{}' + %if "%build_flavor" == "tftpboot-i386-pc" || "%build_flavor" == "tftpboot-x86_64-efi" %posttrans echo start posttrans %name %version-%release build_flavor='%build_flavor' t="${build_flavor#*-}" target_dir="/tftpboot/${t}" mkdir -vp "${target_dir}" source_files= if pushd "%_datadir/%name/tftpboot/${t}" then for source_file in * do test -f "${source_file}" || continue do_copy='do_copy' target_file="${target_dir}/${source_file}" if test -f "${target_file}" then if cmp -s "${target_file}" "${source_file}" then do_copy= fi fi if test -n "${do_copy}" then source_files="${source_files} ${source_file}" fi done fi if test -n "${source_files}" then echo "update ${target_dir}: ${source_files}" cp \ --archive \ --backup \ --remove-destination \ "--target-directory=${target_dir}" \ ${source_files} fi popd > /dev/null echo end posttrans %name %version-%release %endif %files -f files %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor