[packages/syslinux] - up to 6.04
arekm
arekm at pld-linux.org
Wed Jan 22 18:38:30 CET 2020
commit 9157da906acbcb82e0dd2ca420ec3312f5fa548d
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Jan 22 18:38:22 2020 +0100
- up to 6.04
0002-ext4-64bit-feature.patch | 101 +++++++++++++++++++++++++++++++++++++++++
0003-include-sysmacros-h.patch | 33 ++++++++++++++
syslinux.spec | 15 +++---
3 files changed, 143 insertions(+), 6 deletions(-)
---
diff --git a/syslinux.spec b/syslinux.spec
index 4429d46..9046d48 100644
--- a/syslinux.spec
+++ b/syslinux.spec
@@ -15,12 +15,15 @@ Summary(pl.UTF-8): Prosty bootloader
Summary(pt_BR.UTF-8): Carregador de boot simples
Summary(zh_CN.UTF-8): Linux操作系统的启动管理器
Name: syslinux
-Version: 6.03
+Version: 6.04
Release: 1
License: GPL v2+
Group: Applications/System
-Source0: https://www.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{version}.tar.xz
-# Source0-md5: 92a253df9211e9c20172796ecf388f13
+# Source0: https://www.kernel.org/pub/linux/utils/boot/syslinux/%{name}-%{version}.tar.xz
+Source0: https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/syslinux-6.04-pre1.tar.xz
+# Source0-md5: f9c956fde0de29be297402ecbc8ff4d0
+Patch0: 0002-ext4-64bit-feature.patch
+Patch1: 0003-include-sysmacros-h.patch
URL: http://syslinux.zytor.com/
BuildRequires: gnu-efi >= 3.0u
BuildRequires: libuuid-devel
@@ -90,7 +93,9 @@ aplikacji wykorzystujących kod syslinuksa. Należy go instalować tylko
jeśli chcemy tworzyć lub kompilować własnych klientów syslinuksa.
%prep
-%setup -q
+%setup -q -n %{name}-%{version}-pre1
+%patch0 -p1
+%patch1 -p1
%{__sed} -i 's/-march=i386//' sample/Makefile
@@ -136,8 +141,6 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/%{name}/*.c32
%{_datadir}/%{name}/*.com
%{_datadir}/%{name}/dosutil
-%{_datadir}/%{name}/gpxelinux.0
-%{_datadir}/%{name}/gpxelinuxk.0
%{_datadir}/%{name}/ldlinux.sys
%{_datadir}/%{name}/lpxelinux.0
%{_datadir}/%{name}/memdisk
diff --git a/0002-ext4-64bit-feature.patch b/0002-ext4-64bit-feature.patch
new file mode 100644
index 0000000..9efe878
--- /dev/null
+++ b/0002-ext4-64bit-feature.patch
@@ -0,0 +1,101 @@
+From af7e95c32cea40c1e443ae301e64b27f068b4915 Mon Sep 17 00:00:00 2001
+From: Paulo Alcantara <pcacjr at zytor.com>
+Date: Wed, 11 Oct 2017 07:00:31 -0400
+Subject: [PATCH] ext4: Fix 64bit feature
+
+As per ext4 specification:
+
+> In ext2, ext3, and ext4 (when the 64bit feature is not enabled), the
+> block group descriptor was only 32 bytes long and therefore ends at
+> bg_checksum. On an ext4 filesystem with the 64bit feature enabled, the
+> block group descriptor expands to at least the 64 bytes described below;
+> the size is stored in the superblock.
+
+Since block group descriptor has been expanded to 64 bytes long (when 64
+bit feature is enabled), we cannot index ext2_group_desc and return it
+*directly* -- as we did it in ext2_get_group_desc -- it's still 32 bytes
+long.
+
+Instead, use s_desc_size field from superblock to correctly index and
+return block group descriptors.
+
+Cc: H. Peter Anvin <hpa at zytor.com>
+Cc: Gene Cumm <gene.cumm at gmail.com>
+Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>
+---
+ core/fs/ext2/ext2.c | 23 ++++++++++++++---------
+ core/fs/ext2/ext2_fs.h | 1 +
+ 2 files changed, 15 insertions(+), 9 deletions(-)
+
+diff --git a/core/fs/ext2/ext2.c b/core/fs/ext2/ext2.c
+index 76bd1d5..4bc0a53 100644
+--- a/core/fs/ext2/ext2.c
++++ b/core/fs/ext2/ext2.c
+@@ -25,22 +25,17 @@ static enum dirent_type ext2_cvt_type(unsigned int d_file_type)
+ return inode_type[d_file_type];
+ }
+
+-/*
+- * get the group's descriptor of group_num
+- */
+-static const struct ext2_group_desc *
+-ext2_get_group_desc(struct fs_info *fs, uint32_t group_num)
++static const void *__ext2_get_group_desc(struct fs_info *fs, uint32_t group_num)
+ {
+ struct ext2_sb_info *sbi = EXT2_SB(fs);
+ uint32_t desc_block, desc_index;
+- const struct ext2_group_desc *desc_data_block;
++ uint8_t *p;
+
+ if (group_num >= sbi->s_groups_count) {
+ printf ("ext2_get_group_desc"
+ "block_group >= groups_count - "
+ "block_group = %d, groups_count = %d",
+ group_num, sbi->s_groups_count);
+-
+ return NULL;
+ }
+
+@@ -49,8 +44,17 @@ ext2_get_group_desc(struct fs_info *fs, uint32_t group_num)
+
+ desc_block += sbi->s_first_data_block + 1;
+
+- desc_data_block = get_cache(fs->fs_dev, desc_block);
+- return &desc_data_block[desc_index];
++ p = get_cache(fs->fs_dev, desc_block);
++ return p + sbi->s_desc_size * desc_index;
++}
++
++/*
++ * get the group's descriptor of group_num
++ */
++static inline const struct ext2_group_desc *
++ext2_get_group_desc(struct fs_info *fs, uint32_t group_num)
++{
++ return __ext2_get_group_desc(fs, group_num);
+ }
+
+ /*
+@@ -306,6 +310,7 @@ static int ext2_fs_init(struct fs_info *fs)
+ if (sb.s_desc_size < sizeof(struct ext2_group_desc))
+ sb.s_desc_size = sizeof(struct ext2_group_desc);
+ sbi->s_desc_per_block = BLOCK_SIZE(fs) / sb.s_desc_size;
++ sbi->s_desc_size = sb.s_desc_size;
+ sbi->s_groups_count = (sb.s_blocks_count - sb.s_first_data_block
+ + EXT2_BLOCKS_PER_GROUP(fs) - 1)
+ / EXT2_BLOCKS_PER_GROUP(fs);
+diff --git a/core/fs/ext2/ext2_fs.h b/core/fs/ext2/ext2_fs.h
+index 803a995..d8d07eb 100644
+--- a/core/fs/ext2/ext2_fs.h
++++ b/core/fs/ext2/ext2_fs.h
+@@ -278,6 +278,7 @@ struct ext2_sb_info {
+ uint32_t s_first_data_block; /* First Data Block */
+ int s_inode_size;
+ uint8_t s_uuid[16]; /* 128-bit uuid for volume */
++ int s_desc_size; /* size of group descriptor */
+ };
+
+ static inline struct ext2_sb_info *EXT2_SB(struct fs_info *fs)
+--
+2.7.4.GIT
+
diff --git a/0003-include-sysmacros-h.patch b/0003-include-sysmacros-h.patch
new file mode 100644
index 0000000..a39019e
--- /dev/null
+++ b/0003-include-sysmacros-h.patch
@@ -0,0 +1,33 @@
+From 1a74985b2a404639b08882c57f3147229605dfd5 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier at gentoo.org>
+Date: Tue, 19 Apr 2016 06:50:31 -0400
+Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev
+
+These functions are defined in sys/sysmacros.h, so add the include to
+main.c. This is already handled correctly in mountinfo.c. Otherwise
+we get build failures like:
+
+main.o: In function 'find_device_sysfs':
+extlinux/main.c:1131: undefined reference to 'minor'
+
+Signed-off-by: Mike Frysinger <vapier at gentoo.org>
+Signed-off-by: Gene Cumm <gene.cumm at gmail.com>
+---
+ extlinux/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/extlinux/main.c b/extlinux/main.c
+index a7ebd49..ebff7ea 100644
+--- a/extlinux/main.c
++++ b/extlinux/main.c
+@@ -38,6 +38,7 @@
+ #include <sysexits.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/mount.h>
+ #include <sys/vfs.h>
+--
+2.10.5.GIT
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/syslinux.git/commitdiff/9157da906acbcb82e0dd2ca420ec3312f5fa548d
More information about the pld-cvs-commit
mailing list