Skip to content

Commit 0a01bd6

Browse files
committed
patch: patching xfsprogs to source default config files
1 parent 38b401d commit 0a01bd6

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From aa03d274ab27214a3c42ed7c2306744a65c5154c Mon Sep 17 00:00:00 2001
2+
From: Sparks Song <[email protected]>
3+
Date: Mon, 3 Feb 2025 22:40:33 +0000
4+
Subject: [PATCH] mkfs: source defaults from config file to make nrext64
5+
default off on multiple kernel versions
6+
7+
---
8+
mkfs/xfs_mkfs.c | 11 +++++++++++
9+
1 file changed, 11 insertions(+)
10+
11+
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
12+
index 6d2469c..b360efc 100644
13+
--- a/mkfs/xfs_mkfs.c
14+
+++ b/mkfs/xfs_mkfs.c
15+
@@ -39,6 +39,9 @@
16+
*/
17+
#define WHACK_SIZE (128 * 1024)
18+
19+
+/* Default path for the mkfs.xfs configuration file */
20+
+#define DEFAULT_CONFIG_PATH "/usr/share/xfs/mkfs.xfs.conf"
21+
+
22+
/*
23+
* XXX: The configured block and sector sizes are defined as global variables so
24+
* that they don't need to be passed to getnum/cvtnum().
25+
@@ -4428,6 +4431,14 @@ main(
26+
* the options from this file parsed, we can then proceed with parameter
27+
* and bounds checking and making the filesystem.
28+
*/
29+
+
30+
+ if (cli.cfgfile == NULL) {
31+
+ struct stat defcfg_statbuf;
32+
+ if (stat(DEFAULT_CONFIG_PATH, &defcfg_statbuf) == 0) {
33+
+ cli.cfgfile = DEFAULT_CONFIG_PATH;
34+
+ }
35+
+ }
36+
+
37+
cfgfile_parse(&cli);
38+
39+
protostring = setup_proto(cli.protofile);
40+
--
41+
2.47.0
42+

packages/xfsprogs/xfsprogs.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Source0: http://kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-%{version}.t
88
Source1: http://kernel.org/pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-%{version}.tar.sign
99
Source2: gpgkey-0C1D891C50A732E0680F7B644675A111E50B5FA6.asc
1010

11+
Patch1000: 0001-mkfs-source-defaults-from-config-file.patch
12+
1113
BuildRequires: %{_cross_os}glibc-devel
1214
BuildRequires: %{_cross_os}libuuid-devel
1315
BuildRequires: %{_cross_os}libinih-devel
@@ -29,7 +31,7 @@ Requires: %{name}
2931

3032
%prep
3133
%{gpgverify} --data=<(xzcat %{S:0}) --signature=%{S:1} --keyring=%{S:2}
32-
%autosetup -n xfsprogs-%{version}
34+
%autosetup -n xfsprogs-%{version} -p1
3335

3436
%build
3537
%cross_configure \

0 commit comments

Comments
 (0)