From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 622CCC43381 for ; Fri, 8 Mar 2019 12:45:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A61C20684 for ; Fri, 8 Mar 2019 12:45:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726535AbfCHMpI (ORCPT ); Fri, 8 Mar 2019 07:45:08 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:45769 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726249AbfCHMpH (ORCPT ); Fri, 8 Mar 2019 07:45:07 -0500 Received: from orion.localdomain ([95.117.97.241]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N6bPS-1h0eOv3BrK-0183ts; Fri, 08 Mar 2019 13:44:55 +0100 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: yamada.masahiro@socionext.com, michal.lkml@markovi.net, info@metux.net, apw@canonical.com, joe@perches.com, linux-kbuild@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Debian build polishing Date: Fri, 8 Mar 2019 13:44:19 +0100 Message-Id: <1552049064-32044-1-git-send-email-info@metux.net> X-Mailer: git-send-email 1.9.1 X-Provags-ID: V03:K1:jdbW23/4ghILwIplAy6XJQc6Z8fdTfXkxdh6S1EwuIyw7WIrHTh OInxqbLJSC745PYd4K5lPNtBWGgQV/fgVlNcI0VRyHhczyauxA0IZg44O2/Y2HcBsFaUgJL AuRLczXLsW8pRpc3avB+CiJaIzS4Kj9k2sU+c00hw0ET3z+aDnKCHsDqKRGElB3Jsex8n5l ZWmunmPJI2iEbUvpS/1Vw== X-UI-Out-Filterresults: notjunk:1;V03:K0:rFLE0CIvP0s=:Z1cGy8778McGRyBXeAPAea r5a74Jts7tbIeG/9oTF25b2MdD17b4b47BokYkWnozLp7U61n3bHC9E5A+tI2bn6iR8fwo61L gm0UnCFoJW5C5cz/9uURAwqBOaQb0lh8cGiN/eeRsj20kj/UNKvbVJmjcH2wlNVpjEzcChLJC cQLZBJP1FeH2+CT9fVFhJxV4Pvre6p9n0vR1pIBEV/en+4qBn7Qdi+TFyagua+ct/ifMEHhg6 93IVgzm73AioZ2r/iwJPoaOp9wGgggT3XYPr7hePMzKoknJkSA9zMMKOIlZN3VAtXZXaHo1fe lzMHwp5vDKk+7qRMs2SV18AtQARzB2/oBzvHJisR5xPd89YnR8ik99EK2ONSceLvsV9pFE/Mb 7ez82dkzzBG82S6viplefqBuPnXyXGYkpkKD5u+OoZizCzyTPON/8Wj2zLKC32zr+N5Azy9F/ 6BiNtXnxnIazAbVVtYFieP/n1perYLBAnjJjACQbewUp3OtngP3C6ofL8UrDxW2gijo4yNzCQ ozv+i/aUofWFdKR7xaI5cxwGRpXf8hXpSv6vtXZFlmx9HQdcXyiPv1xSrUp3+4EWktDamzq+x M21etRDS4rYs4JEb+UCj9Q2Oo/EZONca94yz7OAufukfnF72ELJ1MtrLMwtkG/RV6h7DJuXsJ /MW6xBlQ6p8LTxNAbE85MAQScg1Kuoe2iyQXv78pPoOKZSgV7jaaTZdM82Id1KMCTqUeC86GT M7VCfL+k1eWNzLtZHy8qDFF92tvN9lemuC8EOg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi folks, here're some patches for polishing up the Debian packaging stuff, so it can be directly used w/ usual Debian machinery like pbuilder, git-buildpackage, dck-buildpackage, etc. These expect debian/rules to exist in the unpacked/patched tree and drive the whole build. Currently 'make deb-pkg' does it in the opposite direction - it creates debian/rules and fills in some data, that's derived from .config etc. My goal is building the kernel package in exactly the same way as any other Debian package - so there must be a debian/rules as the primary entry point. To do that, w/ minimal change and w/o breaking the existing machinery, I'm going in several steps: #1: add Makefile rules for retrieving missing makefile-internal variables kernel config system .config (eg. kernel arch). this could be used for other build systems, too. just call: `make kernelarch` or `make kernellocalversion` #2: add an env variable for changing the name of the rules file generated by mkdebian. When coming from an existing rules file, we can prevent this from being overwritten. #3: add a generic debian/rules file, that calls mkdebian to create the remaining debian control files (w/ rules redirected into nirvana) The existing `make deb-pkg` is bypassed and remains ontouched. One point still puzzling me: once the debian/rules is applied and somebody calls `make deb-pkg`, he'll end up w/ unclean tree, as now a git-tracked file is changed. Perhaps I just change deb-pkg to call debian/rules then, but I'd like to hear your oppinions about this, before. What do you think about that ? --mtx