wok rev 24888

grub2: avoid grub-mkimage error: decompressor is too big
author Hans-G?nter Theisgen
date Sat Apr 02 17:25:58 2022 +0100 (2022-04-02)
parents 44c7e0b01b48
children 5e42454844b2
files grub2/receipt grub2/stuff/patches/gentpl.py-2.04
line diff
     1.1 --- a/grub2/receipt	Fri Apr 01 08:22:24 2022 +0000
     1.2 +++ b/grub2/receipt	Sat Apr 02 17:25:58 2022 +0100
     1.3 @@ -13,7 +13,7 @@
     1.4  WGET_URL="http://ftp.gnu.org/gnu/grub/$TARBALL"
     1.5  
     1.6  DEPENDS="freetype grep libdevmapper libusb libusb-compat ncurses zlib"
     1.7 -BUILD_DEPENDS="bison flex freetype-dev fuse2-dev libdevmapper-dev 
     1.8 +BUILD_DEPENDS="automake bison flex freetype-dev fuse2-dev libdevmapper-dev
     1.9  	libusb-compat-dev libusb-dev ncurses-dev xz-dev zlib-dev"
    1.10  
    1.11  CONFIG_FILES="/etc/default/grub /etc/grub.d/40_custom"
    1.12 @@ -31,14 +31,19 @@
    1.13  compile_rules()
    1.14  {
    1.15  	sed -i 's|fprintf(...) |&(void)|' \
    1.16 -		grub-core/script/yylex.l
    1.17 +
    1.18 +	# Avoid grub-mkimage error: decompressor is too big:
    1.19 +	patch --strip=1 --input=$stuff/patches/gentpl.py-2.04
    1.20 +	# see also: http://git.savannah.gnu.org/cgit/grub.git/commit/?id=6643507ce30f775008e093580f0c9499dfb2c485
    1.21 +
    1.22 +	./autogen.sh &&
    1.23  	./configure			\
    1.24  		--prefix=/usr		\
    1.25  		--sysconfdir=/etc	\
    1.26  		--mandir=/usr/share/man	\
    1.27  		$CONFIGURE_ARGS &&
    1.28  	make $MAKEFLAGS &&
    1.29 -	make DESTDIR=$DESTDIR install
    1.30 +	make install DESTDIR=$DESTDIR
    1.31  }
    1.32  
    1.33  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.34 @@ -55,7 +60,7 @@
    1.35  	cp -a $install/etc		$fs
    1.36  
    1.37  	cp -a stuff/etc-default-grub	$fs/etc/default/grub
    1.38 -	
    1.39 +
    1.40  	# Example configuration file (grub.cfg).
    1.41  	cp stuff/example-grub.cfg	$fs/boot/grub
    1.42  }
    1.43 @@ -63,13 +68,14 @@
    1.44  post_install()
    1.45  {
    1.46  	cat <<EOT
    1.47 -# To install GRUB to MBR on device sda
    1.48 +
    1.49 +# To install grub to MBR on device sda enter:
    1.50  grub-install /dev/sda
    1.51  
    1.52  # To modify GRUB defaults, edit
    1.53  /etc/default/grub
    1.54  
    1.55 -# To generate a configuration file
    1.56 +# To generate a configuration file enter:
    1.57  grub-mkconfig -o /boot/grub/grub.cfg
    1.58  
    1.59  # You can learn from /boot/grub/example-grub.cfg too.
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/grub2/stuff/patches/gentpl.py-2.04	Sat Apr 02 17:25:58 2022 +0100
     2.3 @@ -0,0 +1,13 @@
     2.4 +diff --git a/gentpl.py b/gentpl.py
     2.5 +index 387588c..c86550d 100644
     2.6 +--- a/gentpl.py
     2.7 ++++ b/gentpl.py
     2.8 +@@ -766,7 +766,7 @@ def image(defn, platform):
     2.9 + if test x$(TARGET_APPLE_LINKER) = x1; then \
    2.10 +   $(MACHO2IMG) $< $@; \
    2.11 + else \
    2.12 +-  $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .ARM.exidx $< $@; \
    2.13 ++  $(TARGET_OBJCOPY) $(""" + cname(defn) + """_OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .MIPS.abiflags -R .reginfo -R .rel.dyn -R .note.gnu.gold-version -R .note.gnu.property -R .ARM.exidx $< $@; \
    2.14 + fi
    2.15 + """)
    2.16 +