Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37584618rwd; Tue, 11 Jul 2023 16:57:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlGSLeY1+pB6IaJBUeTmn0tjGs2egam2xYvx4Z7USDl5aEQTxsrD9XoORCoeRfWnnOWG6b/g X-Received: by 2002:a17:902:e884:b0:1b8:948b:41b6 with SMTP id w4-20020a170902e88400b001b8948b41b6mr358833plg.10.1689119847674; Tue, 11 Jul 2023 16:57:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689119847; cv=none; d=google.com; s=arc-20160816; b=cpntgLrPaScbRmLG8b4f/NlNgWXiq2FoO6t2osrgsgvJpv1CJz9VDyO0pCY2vIw2NI HRXjylf+yGia/LNXKn4xOgH1qeqUrx9gYuiYgOCRToIajJPC2g0kiceHBY6bnwbVmDUJ NKIGiBGvknRR16EPy3UqB2K1kqIfUselLL26i+kvFckigyu0wNSPmWsBfcLeD6UjBE8h EAlqhN4aCbyUio9qUvrT9+3FoBkVc4mryTpJoLEEifWiUx5IOAVv51pPbzOstpj6zF1z O2eaSl8mXmLKo/GSu+oVWHesD4AUTT6YC5B3W0vsoi0Dku5b8zQVbl8pF9xQTvvKmQRp 6ugA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TLbyyPUFnrPGjPzVsxWenB16xc+9JlDPRJBnm5ioi0g=; fh=8102I/Uobk5kQKPCc3F2WLQ8BTvpcTZHoi6Rcg+/hmo=; b=oMFsAHcUkLzQjnwFsZ7M/qCBDh85lDIFDPOIaHixmfvv5WrgJGLGm9ID4+vWhydKw7 UWTrSWLQuNpcw3D+44NIC3SSa8cBNdRMudEbcXZG1liU6G/J2hf5jon5QCEe8rNoSVpZ aIRWlsJSo8H8+7wZktbwBYgflC1G8Z+8aUSbbX/BAO+DO7sfhH3P/8sMY4hDZTBoLpRd MUxiyTErdJHtuwqN+hr7IDe2+jHGIqKsGifri4D1E+gsmYsE6wWlXHh5Bf+6I0Wk1wSJ GEBNz4l55zY0S/6hJvW8deG4CmJzvdKvIu0/0bDxTJRfnf7nKsnYaRsx5muXNBHDSgo6 dsVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YjXYdv1b; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h5-20020a170902680500b001b54ff18ed1si2163433plk.267.2023.07.11.16.57.07; Tue, 11 Jul 2023 16:57:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YjXYdv1b; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229609AbjGKXx6 (ORCPT + 99 others); Tue, 11 Jul 2023 19:53:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbjGKXx5 (ORCPT ); Tue, 11 Jul 2023 19:53:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C6DD1711 for ; Tue, 11 Jul 2023 16:53:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 203AE6165C for ; Tue, 11 Jul 2023 23:53:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6ED35C433C8; Tue, 11 Jul 2023 23:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689119635; bh=HFlF9C5qGNWGmnswDUZ75q3SnmQEVpHJGizEOljQg/Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YjXYdv1bf/IXl5+9mCFpjqLZVktQcqQ8u9imKW7YKP/ipGG5S9nFXsb8qr902UJo2 auy/INq+tezxsCXvQ/AVs5bm/qbX9pJZh7chg53m7S8TaRBm92b7gjmx3LLwjtrVN6 yyO8us6+CliB2bWkuJCgpqS32qyYp5gz8CkXyLOoSLMDdFOuEV9+C8wfLR56jJLDvK 6bFnx2P1ttrodFYbb9M4dsCYNB3msODh4h8uGDpzxuwFT+TlLzaqPwR8/c0VZ+rvjL Uom1jZ5uG0PVJFhLOSAIQnftQz/oEESgur4frZB0f0bnWg/eBD25e+UvRYy1Ef6m+X xAj1VFhWpzmxw== Date: Tue, 11 Jul 2023 16:53:54 -0700 From: "Darrick J. Wong" To: Johannes Schauer Marin Rodrigues Cc: linux-ext4@vger.kernel.org Subject: Re: [PATCH 1/1] mke2fs: the -d option can now handle tarball input Message-ID: <20230711235354.GE11476@frogsfrogsfrogs> References: <20230620121641.469078-1-josch@mister-muffin.de> <20230620121641.469078-2-josch@mister-muffin.de> <20230630155128.GA11419@frogsfrogsfrogs> <168836303674.2483784.4947178089926484601@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <168836303674.2483784.4947178089926484601@localhost> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Jul 03, 2023 at 07:43:56AM +0200, Johannes Schauer Marin Rodrigues wrote: > Hi, > > Quoting Darrick J. Wong (2023-06-30 17:51:28) > > On Tue, Jun 20, 2023 at 02:16:41PM +0200, Johannes Schauer Marin Rodrigues wrote: > > > If archive.h is available during compilation, enable mke2fs to read a > > > tarball as input. Since libarchive.so.13 is opened with dlopen, > > > libarchive is not a hard library dependency of the resulting binary. > > > > I can't say I'm in favor of adding build dependencies to e2fsprogs, > > since the point of -d taking a directory arg was to *avoid* having to > > understand anything other than posix(ish) directory tree walking APIs. > > this is why the build dependency is optional. As Ted said elsewhere, the big question is (a) do we really want e2fsprogs depending on libarchive at all, and (b) is libarchive's API stable enough that you'll maintain it for us? Merging this patch *is* adding to the complexity of what most distros consider to be critical system utility. > It should be perfectly possible > to build e2fsprogs without libarchive as well. I copied the pattern that was > already implemented for libmagic which is also not a hard dependency but gets > dlopened-ed at runtime. If this mechanism is fine for libmagic it should be > fine for others as well, no? > > The tar format (minus some features) is also not terribly complicated. Would There's at least five formats known to GNU tar, according to its manpage: Format UID File Size File Name Devn gnu 1.8e19 Unlimited Unlimited 63 oldgnu 1.8e19 Unlimited Unlimited 63 v7 2097151 8GB 99 n/a ustar 2097151 8GB 256 21 posix Unlimited Unlimited Unlimited Unlimited https://www.gnu.org/software/tar/manual/html_chapter/Formats.html > you prefer I add a rudimentary tar parser that will be used in the event that > libarchive is not available? The tar format is not that complicated but adding > such code to e2fsprogs would be overkill for a functionality that is otherwise > optional, no? Indeed not. > > > This enables the creation of filesystems containing files which would > > > otherwise need superuser privileges to create (like device nodes, which are > > > also not allowed in unshared user namespaces). By reading from standard > > > input when the filename is a dash (-), mke2fs can be used as part of a > > > shell pipeline without temporary files. > > What if the argument is actually a Microsoft CAB archive (which libarchive > > claims to support)? Will it actually copy the cab archive into an ext4 > > image? > > I didn't have a cab archive so I couldn't test this but it does work with other > archive formats like zip files. Would you like me to artificially restrict the > input format to only tarballs? No -- if Ted wants libarchive input for e2fsprogs, it may as well take full advantage of it. --D > Thanks! > > cheers, josch