Compare commits

...

No commits in common. "c8s" and "c10s" have entirely different histories.
c8s ... c10s

8 changed files with 142 additions and 48 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

5
.gitignore vendored
View File

@ -1,2 +1,3 @@
SOURCES/dosfstools-4.1.tar.xz
/dosfstools-4.1.tar.xz
dosfstools-*.tar.xz
/dosfstools-3.0.25.tar.gz
/dosfstools-4.2.tar.gz

1
ci.fmf Normal file
View File

@ -0,0 +1 @@
resultsdb-testcase: separate

View File

@ -1,30 +0,0 @@
diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c
index a7609b0..26ce3fd 100644
--- a/src/mkfs.fat.c
+++ b/src/mkfs.fat.c
@@ -517,6 +517,7 @@ static void establish_params(struct device_info *info)
unsigned int heads = 255;
unsigned int media = 0xf8;
unsigned int cluster_size = 4; /* starting point for FAT12 and FAT16 */
+ unsigned int sector_size_mult = 1; /* x 512 == sector_size */
int def_root_dir_entries = 512;
if (info->size < 512 * 1024 * 1024) {
@@ -590,11 +591,15 @@ static void establish_params(struct device_info *info)
* fs size > 32G: 32k clusters
*
* This only works correctly for 512 byte sectors!
+ * For other sector sizes it tries to approximate.
*/
uint32_t sz_mb = info->size / (1024 * 1024);
+ if (info->sector_size > 0)
+ sector_size_mult = info->sector_size / 512;
cluster_size =
- sz_mb > 32 * 1024 ? 64 : sz_mb > 16 * 1024 ? 32 : sz_mb >
- 8 * 1024 ? 16 : sz_mb > 260 ? 8 : 1;
+ sz_mb > 32 * 1024 * sector_size_mult ? 64 : sz_mb >
+ 16 * 1024 * sector_size_mult ? 32 : sz_mb >
+ 8 * 1024 * sector_size_mult ? 16 : sz_mb > 260 * sector_size_mult ? 8 : 1;
}
if (info->geom_heads > 0) {

View File

@ -1,12 +1,15 @@
Name: dosfstools
Summary: Utilities for making and checking MS-DOS FAT filesystems on Linux
Version: 4.1
Release: 6%{?dist}
License: GPLv3+
Group: Applications/System
Source0: http://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
URL: http://github.com/dosfstools/dosfstools
Patch0: dosfstools-4.1-fix-cluster-size-auto-detect-for-4k-disks.patch
Version: 4.2
Release: 12%{?dist}
License: GPL-3.0-or-later
Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
URL: https://github.com/dosfstools/dosfstools
BuildRequires: gcc
BuildRequires: make
# rhbz#2021638
Recommends: glibc-gconv-extra
%description
The dosfstools package includes the mkdosfs and dosfsck utilities,
@ -15,25 +18,88 @@ drives or on floppies.
%prep
%setup -q
%patch0 -p1 -b .fix-cluster-size-auto-detect-for-4k-disks
%build
%configure --enable-compat-symlinks
make %{?_smp_mflags} CFLAGS="%{optflags} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing"
%make_build CFLAGS="%{optflags} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing"
%install
make DESTDIR=%{buildroot} install PREFIX=%{_prefix}
%make_install PREFIX=%{_prefix}
# license file is in the licenses not in the doc
rm -f %{buildroot}%{_docdir}/%{name}/COPYING
%files
%doc ChangeLog COPYING doc/*
%license COPYING
%doc NEWS README ChangeLog doc/*
%{_sbindir}/*
%{_mandir}/man8/*
%changelog
* Fri Feb 22 2019 Jaroslav Škarvada <jskarvad@redhat.com> - 4.1-6
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 4.2-12
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 4.2-11
- Bump release for June 2024 mass rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Aug 10 2023 Jaroslav Škarvada <jskarvad@redhat.com> - 4.2-8
- Converted license to SPDX
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Dec 15 2022 Jaroslav Škarvada <jskarvad@redhat.com> - 4.2-5
- Added weak dependency on glibc-gconv-extra
Resolves: rhbz#2021638
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Feb 1 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 4.2-1
- New version
Resolves: rhbz#1922767
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 4.1-11
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jan 9 2019 Jaroslav Škarvada <jskarvad@redhat.com> - 4.1-7
- Fixed mkfs.fat cluster size calculation for disks with 4k sectors
Resolves: rhbz#1651496
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

View File

@ -1,6 +1,25 @@
--- !Policy
product_versions:
- rhel-8
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
#Rawhide
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
#gating rhel
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-public.functional}
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}

36
plans.fmf Normal file
View File

@ -0,0 +1,36 @@
/tier1-internal:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/dosfstools.git
name: /plans/tier1/internal
/tier1-public:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/dosfstools.git
name: /plans/tier1/public
/tier2-tier3-internal:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/dosfstools.git
name: /plans/tier2-tier3/internal
/tier2-tier3-public:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/dosfstools.git
name: /plans/tier2-tier3/public
/others-internal:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/dosfstools.git
name: /plans/others/internal
/others-public:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/dosfstools.git
name: /plans/others/public

View File

@ -1 +1 @@
SHA512 (dosfstools-4.1.tar.xz) = e7a8aab34255d15e6865a7b031971352af1255134fab83389673bcc3cbd6ba255241bd2429070aeb4b927f8d7d73ccf1aeafe94566b133e88e7586897c317b78
SHA512 (dosfstools-4.2.tar.gz) = 3cc0808edb4432428df8a67da4bb314fd1f27adc4a05754c1a492091741a7b6875ebd9f6a509cc4c5ad85643fc40395b6e0cadee548b25cc439cc9b725980156