From da06a586b70c5edb0830d0a2a42e3380a353a759 Mon Sep 17 00:00:00 2001 From: markeryang Date: Thu, 17 Dec 2020 17:27:34 +0800 Subject: [PATCH] set help package as install requires --- ...-add-device-check-in-ismount-process.patch | 60 +++++++++++++++++++ e2fsprogs.spec | 7 ++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 0004-add-device-check-in-ismount-process.patch diff --git a/0004-add-device-check-in-ismount-process.patch b/0004-add-device-check-in-ismount-process.patch new file mode 100644 index 0000000..f033b09 --- /dev/null +++ b/0004-add-device-check-in-ismount-process.patch @@ -0,0 +1,60 @@ +From 72e7f067a0d7671b372c23ee727b39b5b24f93da Mon Sep 17 00:00:00 2001 +From: guiyao +Date: Wed, 15 Apr 2020 20:13:26 +0000 +Subject: [PATCH] add device check in ismount process + +Signed-off-by: guiyao +Signed-off-by: Shijie Luo +--- + lib/ext2fs/ismounted.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c +index 46d330d..2add4c0 100644 +--- a/lib/ext2fs/ismounted.c ++++ b/lib/ext2fs/ismounted.c +@@ -98,6 +98,7 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file, + { + struct mntent *mnt; + struct stat st_buf; ++ struct stat dir_st_buf; + errcode_t retval = 0; + dev_t file_dev=0, file_rdev=0; + ino_t file_ino=0; +@@ -128,24 +129,27 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file, + while ((mnt = getmntent (f)) != NULL) { + if (mnt->mnt_fsname[0] != '/') + continue; +- if (stat(mnt->mnt_dir, &st_buf) != 0) ++ if (stat(mnt->mnt_dir, &dir_st_buf) != 0) + continue; + if (strcmp(file, mnt->mnt_fsname) == 0) { +- if (file_rdev && (file_rdev != st_buf.st_dev)) { ++ if (file_rdev && (file_rdev == dir_st_buf.st_dev)) { + #ifdef DEBUG + printf("Bogus entry in %s! " + "(%s does not exist)\n", + mtab_file, mnt->mnt_dir); + #endif /* DEBUG */ +- continue; ++ break; + } +- break; ++ continue; + } + if (stat(mnt->mnt_fsname, &st_buf) == 0) { + if (ext2fsP_is_disk_device(st_buf.st_mode)) { + #ifndef __GNU__ +- if (file_rdev && (file_rdev == st_buf.st_rdev)) +- break; ++ if (file_rdev && (file_rdev == st_buf.st_rdev)){ ++ if (file_rdev == dir_st_buf.st_dev) { ++ break; ++ } ++ } + if (check_loop_mounted(mnt->mnt_fsname, + st_buf.st_rdev, file_dev, + file_ino) == 1) +-- +1.8.3.1 + diff --git a/e2fsprogs.spec b/e2fsprogs.spec index 211329e..820e643 100644 --- a/e2fsprogs.spec +++ b/e2fsprogs.spec @@ -1,6 +1,6 @@ Name: e2fsprogs Version: 1.45.6 -Release: 2 +Release: 3 Summary: Second extended file system management tools License: GPLv2 and LGPLv2 and MIT URL: http://e2fsprogs.sourceforge.net/ @@ -9,9 +9,11 @@ Source0: https://www.kernel.org/pub/linux/kernel/people/tytso/%{name}/v%{ Patch1: 0001-e2fsprogs-set-hugefile-from-4T-to-1T-in-hugefile-tes.patch Patch2: 0002-e2fsck-fix-off-by-one-check-when-validating-depth-of.patch Patch3: 0003-mke2fs-fix-up-check-for-hardlinks-always-false-if-in.patch +Patch4: 0004-add-device-check-in-ismount-process.patch BuildRequires: gcc git pkgconfig texinfo BuildRequires: fuse-devel libblkid-devel libuuid-devel +Recommends: %{name}-help = %{version}-%{release} Provides: e2fsprogs-libs%{?_isa} e2fsprogs-libs Obsoletes: e2fsprogs-libs @@ -128,6 +130,9 @@ exit 0 %{_mandir}/man8/* %changelog +* Wed Dec 16 2020 yanglongkang - 1.45.6-3 +- Set help package as install require + * Fri Oct 30 2020 Zhiqiang Liu - 1.45.6-2 - backport upstream patches-epoch2 to fix some problems