Received: from mailout02.platinum-mail.de (mx02.platinum-mail.de [89.58.18.167]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id D9840223B8D for <~alpine/devel@lists.alpinelinux.org>; Fri, 29 Aug 2025 16:47:55 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mailout02.platinum-mail.de (Mail Service) with ESMTPS id 0E78B9A2851 for <~alpine/devel@lists.alpinelinux.org>; Fri, 29 Aug 2025 16:47:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; d=achill.org; s=mail; c=relaxed/simple; t=1756486074; h=date:message-id:subject:from:to; bh=PMzoRDdM+q8OFjQaBRSbm2/nAJg+Iq+wG83Y/nzNDrE=; b=MJbpfaLg6bxnB93OgCmyjWBtfzrkqJN4fZkty9sBNUuPy+XyJ7sMnPqwMLXQMhjLHmB6fBoIbyM G/HIf9ge0f9Ck8W4Kgoyo4U9v8jTk60wAwINg2SvVyc8b2aU0dCM2dPdqHUxmuN2cHn3xpXfUyTCs RLx7KGrsdz0GtnIxuwuww463EeIiJQXwQrf9/GX808ReeVu7plTMJ/Z1T42XHE+Vmc4E3HdhTraXa EskT1Y/l0e4G+R3BNfceg0Cv8Zlc2kCirs+lS/AZO2j7HJLpsgaW4C/4IdFRqUSerEuOgokzE9czK YtT1oXMHZBAD+tgVrFJn8SnFUIwt4b5q0ebA== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Date: Fri, 29 Aug 2025 18:47:50 +0200 Message-Id: To: "Camelia Lavender" , <~alpine/devel@lists.alpinelinux.org> Subject: Re: Best way to handle git submodules in APKBUILDs? From: "Achill Gilgenast" X-Greeting: Hi mom! Look, I'm in somebodys mail client! X-Mailer: aerc 0.21.0-0-g5549850facc2 References: In-Reply-To: Content-Type: text/plain; charset=utf-8 On Fri Aug 29, 2025 at 6:26 PM CEST, Camelia Lavender wrote: > Hi everyone! Hey! > > I'm relatively new to Alpine Linux packaging, but I'm trying to learn=20 > more about it by packaging a few pieces of software that aren't yet=20 > included in Alpine repositories. I really hope I ask my question in the=20 > correct place (I tried looking on the Wiki but didn't find any=20 > information about this) :) > > I was wondering what the best way to package projects that rely on git=20 > submodules was. The problem with submodules is that they usually aren't=20 *usually* they are. For example, `meson dist` pacakges all the sub*projects* into the tarball. But of course, there are exceptions, e.g. GitHub-generated tarballs. > included in release tarballs. Also, since the "primary" source of the=20 > package is a tarball, it is not possible to use git to automatically=20 > pull submodules from their upstream repositories, which, in the end,=20 > makes it (I guess) necessary to add many different sources in the APKBUIL= D. > > What I've been thinking about doing is this: > > - For each submodule, I add a source in the APKBUILD, which points to=20 > the source tarball of the specific commit that is checked out in the=20 > repository. > - Then, I move the content of the tarball to the place where the content=20 > of the submodule should be. > > Is this a correct way to do what I'm trying to achieve, or is there a=20 > better way to do so? This is usually done, yeah. See https://gitlab.alpinelinux.org/alpine/aport= s/-/blob/master/community/chatterino2/APKBUILD as a random example. But note, that it might depend on the kind of submodule, since Alpine package are preferred as dependencies and not the vendored ones. For assets and stuff, or forks of packages (as in the chatterino2 example), that should be fine tho. > > Thanks in advance! :) Thank you so much for being interested in Alpine packaging! If you have any other questions, dont hesitate to ask me :)=