]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - grub/grub.nm
kernel: udpate to 5.2
[ipfire-3.x.git] / grub / grub.nm
index cd3974347ceb303eba38eaf0a0bd21adea54b848..c076c011666f15aae9a2c206ab39efcca1124917 100644 (file)
@@ -4,9 +4,11 @@
 ###############################################################################
 
 name       = grub
-version    = 2.00
-release    = 5.1
-sup_arches = x86_64 i686
+version    = 2.02
+release    = 2
+
+sup_arches = aarch64 x86_64 i686
+thisapp    = %{name}-%{version}
 
 groups     = System/Boot
 url        = http://www.gnu.org/software/grub/
@@ -33,44 +35,61 @@ build
                automake
                bison
                bzip2-devel
+               debugedit >= 5.3.5-2
                dejavu-fonts-sans-fonts
                flex
                freetype-devel
                gettext
                libdevmapper-devel
                ncurses-devel
-               paxctl
                zlib-devel
                %{unifont}
        end
 
+       # Don't leak our CFLAGS to boot code
+       export HOST_CFLAGS  = %{CFLAGS}
+       export HOST_LDFLAGS = %{LDFLAGS}
+
+       platforms = efi
+
+       if "%{DISTRO_PLATFORM}" == "x86"
+               platforms += pc
+       end
+
        prepare_cmds
                cp -vf %{unifont} unifont.pcf.gz
                ./autogen.sh
+
+               for platform in %{platforms}; do
+                       cp -r %{DIR_APP} %{DIR_APP}-${platform}
+               done
        end
 
        # As the modules contain always 32 bit code, they
        # should be living in /usr/lib.
        libdir = %{prefix}/lib
 
-       configure_options += \
-               --target="i386" \
-               --with-platform=pc \
-               --program-transform-name=s,grub,grub, \
-               --disable-werror \
-               CFLAGS="$(echo %{CFLAGS} | sed \
-                       -e 's/-Wp,-D_FORTIFY_SOURCE=2//g' \
-                       -e 's/-fstack-protector-strong//g' \
-                       -e 's/-fstack-protector-all//g' \
-                       -e 's/-fstack-protector//g' \
-                       -e 's/-fPIC//g' \
-                       -e 's/--param=ssp-buffer-size=4//g' \
-                       -e 's/-mregparm=3/-mregparm=4/g' \
-                       -e 's/-fexceptions//g' \
-                       -e 's/-m64//g' \
-                       -e 's/-fasynchronous-unwind-tables//g' )"
-
-       install_cmds
+       build
+               for platform in %{platforms}; do
+                       pushd %{DIR_APP}-${platform}
+                       ./configure \
+                               %{configure_options} \
+                               --with-platform=${platform} \
+                               --disable-werror \
+                               CFLAGS= LDFLAGS=
+
+                       make %{PARALLELISMFLAGS}
+                       popd
+               done
+       end
+
+       install
+               for platform in %{platforms}; do
+                       pushd %{DIR_APP}-${platform}
+                       make install DESTDIR=%{BUILDROOT}
+                       popd
+               done
+
                # Install empty configuration file.
                mkdir -pv %{BUILDROOT}/boot/grub
                touch %{BUILDROOT}/boot/grub/grub.cfg
@@ -93,30 +112,15 @@ build
                %{BUILDROOT}%{bindir}/grub-mkfont -o DejaVuSans-Bold-14.pf2 \
                        -s 14 %{datadir}/fonts/dejavu/DejaVuSans-Bold.ttf
                popd
-
-               # Disable hardening.
-               paxctl -mpes \
-                       %{BUILDROOT}%{sbindir}/grub-bios-setup \
-                       %{BUILDROOT}%{sbindir}/grub-probe
-
-               paxctl -mpex \
-                       %{BUILDROOT}%{bindir}/grub-script-check
        end
 
        debuginfo_strict_build_id = false
 end
 
-quality-agent
-       whitelist_nx
-               %{bindir}/*|%{sbindir}/*
-       end
-end
-
 packages
        package %{name}
                requires
                        gettext
-                       os-prober
                        system-logos >= 2
                end