[arch-commits] Commit in e2fsprogs/repos (4 files)
Christian Hesse
eworm at gemini.archlinux.org
Thu Dec 30 19:34:36 UTC 2021
Date: Thursday, December 30, 2021 @ 19:34:36
Author: eworm
Revision: 433269
archrelease: copy trunk to testing-x86_64
Added:
e2fsprogs/repos/testing-x86_64/
e2fsprogs/repos/testing-x86_64/0001-mke2fs-fix-creating-a-file-system-image-w-o-a-pre-existing-file.patch
(from rev 433268, e2fsprogs/trunk/0001-mke2fs-fix-creating-a-file-system-image-w-o-a-pre-existing-file.patch)
e2fsprogs/repos/testing-x86_64/MIT-LICENSE
(from rev 433268, e2fsprogs/trunk/MIT-LICENSE)
e2fsprogs/repos/testing-x86_64/PKGBUILD
(from rev 433268, e2fsprogs/trunk/PKGBUILD)
----------------------------------------------------------------------------+
0001-mke2fs-fix-creating-a-file-system-image-w-o-a-pre-existing-file.patch | 47 +++++
MIT-LICENSE | 25 ++
PKGBUILD | 89 ++++++++++
3 files changed, 161 insertions(+)
Copied: e2fsprogs/repos/testing-x86_64/0001-mke2fs-fix-creating-a-file-system-image-w-o-a-pre-existing-file.patch (from rev 433268, e2fsprogs/trunk/0001-mke2fs-fix-creating-a-file-system-image-w-o-a-pre-existing-file.patch)
===================================================================
--- testing-x86_64/0001-mke2fs-fix-creating-a-file-system-image-w-o-a-pre-existing-file.patch (rev 0)
+++ testing-x86_64/0001-mke2fs-fix-creating-a-file-system-image-w-o-a-pre-existing-file.patch 2021-12-30 19:34:36 UTC (rev 433269)
@@ -0,0 +1,47 @@
+commit 53464654bd33e58e3fff079f34261b823d839f3b
+Author: Theodore Ts'o <tytso at mit.edu>
+Date: Mon Aug 2 21:08:01 2021 -0400
+
+ mke2fs: fix creating a file system image w/o a pre-existing file
+
+ The mke2fs program should allow creating a file system image when an
+ explicit file system size is specified, even if the file doesn't yet
+ exist. By deferring the call to check_plausible() in commit
+ 942b00cb9d2f ("mke2fs: do not warn about a pre-existing partition
+ table when using a non-zero offset") this behaviour was broken.
+
+ Fix this regression by explicitly creating the file if the file system
+ size is specified.
+
+ Signed-off-by: Theodore Ts'o <tytso at mit.edu>
+
+diff --git a/misc/mke2fs.c b/misc/mke2fs.c
+index 306064df..31e8de1a 100644
+--- a/misc/mke2fs.c
++++ b/misc/mke2fs.c
+@@ -1986,6 +1986,25 @@ profile_error:
+ retval = ext2fs_get_device_size2(device_name,
+ EXT2_BLOCK_SIZE(&fs_param),
+ &dev_size);
++ if (retval == ENOENT) {
++ int fd;
++
++ if (!explicit_fssize) {
++ fprintf(stderr,
++ _("The file %s does not exist and no "
++ "size was specified.\n"), device_name);
++ exit(1);
++ }
++ fd = ext2fs_open_file(device_name,
++ O_CREAT | O_WRONLY, 0666);
++ if (fd < 0) {
++ retval = errno;
++ } else {
++ dev_size = 0;
++ retval = 0;
++ printf(_("Creating regular file %s\n"), device_name);
++ }
++ }
+ if (retval && (retval != EXT2_ET_UNIMPLEMENTED)) {
+ com_err(program_name, retval, "%s",
+ _("while trying to determine filesystem size"));
Copied: e2fsprogs/repos/testing-x86_64/MIT-LICENSE (from rev 433268, e2fsprogs/trunk/MIT-LICENSE)
===================================================================
--- testing-x86_64/MIT-LICENSE (rev 0)
+++ testing-x86_64/MIT-LICENSE 2021-12-30 19:34:36 UTC (rev 433269)
@@ -0,0 +1,25 @@
+Copyright (c) 2003-2007 Theodore Ts'o <tytso at mit.edu>
+Copyright (c) 1997-2003 Yann Dirson <dirson at debian.org>
+Copyright (c) 2001 Alcove <http://www.alcove.com/>
+Copyright (c) 1997 Klee Dienes
+Copyright (c) 1995-1996 Michael Nonweiler <mrn20 at cam.ac.uk>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Copied: e2fsprogs/repos/testing-x86_64/PKGBUILD (from rev 433268, e2fsprogs/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2021-12-30 19:34:36 UTC (rev 433269)
@@ -0,0 +1,89 @@
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: judd <jvinet at zeroflux.org>
+
+pkgbase=e2fsprogs
+pkgname=('e2fsprogs' 'fuse2fs')
+pkgver=1.46.5
+pkgrel=1
+pkgdesc='Ext2/3/4 filesystem utilities'
+arch=('x86_64')
+license=('GPL' 'LGPL' 'MIT')
+url='http://e2fsprogs.sourceforge.net'
+makedepends=('systemd' 'util-linux' 'fuse')
+validpgpkeys=('3AB057B7E78D945C8C5591FBD36F769BC11804F0') # Theodore Ts'o <tytso at mit.edu>
+source=("https://www.kernel.org/pub/linux/kernel/people/tytso/${pkgbase}/v${pkgver}/${pkgbase}-${pkgver}.tar."{xz,sign}
+ 'MIT-LICENSE')
+sha256sums=('2f16c9176704cf645dc69d5b15ff704ae722d665df38b2ed3cfc249757d8d81e'
+ 'SKIP'
+ 'cc45386c1d71f438ad648fd7971e49e3074ad9dbacf9dd3a5b4cb61fd294ecbb')
+
+
+prepare() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ # Remove unnecessary init.d directory
+ sed -i '/init\.d/s|^|#|' misc/Makefile.in
+}
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ ./configure \
+ --prefix=/usr \
+ --with-root-prefix='' \
+ --libdir=/usr/lib \
+ --sbindir=/usr/bin \
+ --enable-elf-shlibs \
+ --disable-fsck \
+ --disable-uuidd \
+ --disable-libuuid \
+ --disable-libblkid
+ make
+
+ # regenerate locale files
+ find po/ -name '*.gmo' -delete
+ make -C po update-gmo
+}
+
+package_e2fsprogs() {
+ depends=('sh' 'util-linux-libs')
+ provides=('libcom_err.so'
+ 'libe2p.so'
+ 'libext2fs.so'
+ 'libss.so')
+ backup=('etc/mke2fs.conf')
+
+ unset MAKEFLAGS
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install install-libs
+
+ sed -i -e 's/^AWK=.*/AWK=awk/' "${pkgdir}/usr/bin/compile_et"
+
+ # remove references to build directory
+ sed -i -e 's#^SS_DIR=.*#SS_DIR="/usr/share/ss"#' "${pkgdir}/usr/bin/mk_cmds"
+ sed -i -e 's#^ET_DIR=.*#ET_DIR="/usr/share/et"#' "${pkgdir}/usr/bin/compile_et"
+
+ # remove static libraries with a shared counterpart
+ rm "${pkgdir}"/usr/lib/lib{com_err,e2p,ext2fs,ss}.a
+
+ # remove fuse2fs which will be packaged separately
+ rm "${pkgdir}"/usr/{bin/fuse2fs,share/man/man1/fuse2fs.1}
+
+ # install MIT license
+ install -D -m0644 "${srcdir}/MIT-LICENSE" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/MIT-LICENSE"
+}
+
+package_fuse2fs() {
+ pkgdesc='Ext2/3/4 filesystem driver for FUSE'
+ depends=('fuse' 'e2fsprogs')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ install -D -m0755 'misc/fuse2fs' "${pkgdir}/usr/bin/fuse2fs"
+ install -D -m0644 'misc/fuse2fs.1' "${pkgdir}/usr/share/man/man1/fuse2fs.1"
+ mkdir -p "${pkgdir}"/usr/share/licenses
+ ln -s "${pkgbase}" "${pkgdir}/usr/share/licenses/${pkgname}"
+}
More information about the arch-commits
mailing list