# Contributor: Valery Kartel # Maintainer: Natanael Copa pkgname=e2fsprogs pkgver=1.46.2 pkgrel=1 pkgdesc="Standard Ext2/3/4 filesystem utilities" url="http://e2fsprogs.sourceforge.net" arch="all" license="GPL-2.0-or-later AND LGPL-2.0-or-later AND BSD-3-Clause AND MIT" depends_dev="util-linux-dev gawk" makedepends="$depends_dev linux-headers" checkdepends="diffutils perl" subpackages="$pkgname-static $pkgname-dev $pkgname-doc libcom_err $pkgname-libs $pkgname-extra" source="$pkgname-$pkgver.tar.gz::https://github.com/tytso/e2fsprogs/archive/v$pkgver.tar.gz $pkgname-CVE-2022-1304.patch::https://github.com/tytso/e2fsprogs/commit/ab51d587bb9b229b1fade1afd02e1574c1ba5c76.patch ensure-small-filesystems-are-Y2038-ok.patch " case $CHOST in riscv64*) # j_recover_fast_commit appears to be a false negative due to a compiler # bug or hardware bug # # https://marc.info/?l=linux-ext4&m=161307702015761&w=2 options="!check" ;; esac # secfixes: # 1.46.2-r1: # - CVE-2022-1304 # 1.45.5-r0: # - CVE-2019-5188 # 1.45.4-r0: # - CVE-2019-5094 build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ --mandir=/usr/share/man \ --enable-elf-shlibs \ --enable-symlink-install \ --disable-fsck \ --disable-uuidd \ --disable-libuuid \ --disable-libblkid \ --disable-nls make } check() { # Disable failing test rm -rf tests/m_offset* # Failing on CI rm -rf tests/f_bigalloc_orphan_list* # Fails on armhf on CI rm -rf tests/f_extent_htree* # Fails on builders with less than 4TB free space rm -rf tests/m_hugefile make check } package() { make -j1 MKDIR_P="install -d" DESTDIR="$pkgdir" install install-libs mv "$pkgdir"/sbin/* "$pkgdir"/usr/sbin/ local i; for i in e2fsck mke2fs mkfs.* fsck.*; do mv "$pkgdir"/usr/sbin/$i "$pkgdir"/sbin/ done } dev() { default_dev mkdir -p "$subpkgdir"/usr/bin mkdir -p "$subpkgdir"/usr/share mv "$pkgdir"/usr/bin/compile_et "$pkgdir"/usr/bin/mk_cmds \ "$subpkgdir"/usr/bin/ mv "$pkgdir"/usr/share/et "$pkgdir"/usr/share/ss \ "$subpkgdir"/usr/share } libcom_err() { pkgdesc="Common error description library" mkdir -p "$subpkgdir"/lib mv "$pkgdir"/lib/libcom_err* "$subpkgdir"/lib/ } extra() { depends="$pkgname" pkgdesc="Ext2/3/4 filesystem extra utilities" mkdir -p "$subpkgdir" rmdir "$pkgdir"/lib mv "$pkgdir"/usr "$subpkgdir"/ } static() { depends="" pkgdesc="$pkgdesc (static libraries)" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib } sha512sums=" 2550cb2fbed0c9cc6f0df0e8870cb36dd1c8d4e66321c9551b0fb14d343c7b3f09110424db2699926b8249600c0788c1a2e270fae9d0bacecd71f96745883b30 e2fsprogs-1.46.2.tar.gz fdc2fd1c96e8de7aa517a49a71b995090811f0cd4c5f3f13a2650bce3ff7100a085c7e32952627a46d131afcaa5e3869c70df14553815e7095eacf7da6ec5c51 e2fsprogs-CVE-2022-1304.patch daf63f8ca704eaa9a3293444469ef1a36c09806614d20e844b451af2426d5c8611a61669c99e4702f1fd787145cf9a34f1345ae5ed15ef47c41ca02f03302231 ensure-small-filesystems-are-Y2038-ok.patch "