[Unstable/Lunar][PATCH] UBUNTU: [Packaging] debian/rules: Bring back 'editconfigs'

Dimitri John Ledkov dimitri.ledkov at canonical.com
Tue Jan 24 13:36:22 UTC 2023


Imho editconfigs should use faketools export, and then editing configs will
be most festureful on any host release.

W.r.t. ncurses, given how common of an action it is, I am happy to add them
as default build-depends. They are tiny compared to the rest of the build
depends.

On Tue, 24 Jan 2023, 13:33 Andrea Righi, <andrea.righi at canonical.com> wrote:

> On Tue, Jan 24, 2023 at 02:03:12PM +0100, Juerg Haefliger wrote:
> > With the switch to the new annotations-only mechanism and the new
> > annotations script, the 'editconfigs' target was dropped for some
> > reason. It's usefull so bring it back.
>
> I dropped ediconfigs, because it doesn't work in our build chroots
> (some packages are missing, like ncruses).
>
> I'm happy to bring it back, but we should also update our build chroots
> to support it, editing configs outside a build chroot environment can
> lead to incorrect configurations...
>
> -Andrea
>
> >
> > Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
> > ---
> >  debian/rules.d/1-maintainer.mk   |  3 ++-
> >  debian/scripts/misc/kernelconfig | 14 +++++++++++++-
> >  2 files changed, 15 insertions(+), 2 deletions(-)
> >
> > diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/
> 1-maintainer.mk
> > index 4d327ec3c478..239af468df5d 100644
> > --- a/debian/rules.d/1-maintainer.mk
> > +++ b/debian/rules.d/1-maintainer.mk
> > @@ -9,6 +9,7 @@ help:
> >       @echo "  updateconfigs       : Update core arch configs"
> >       @echo "  defaultconfigs      : Update core arch configs using
> defaults"
> >       @echo "  genconfigs          : Generate core arch configs in
> CONFIGS/*"
> > +     @echo "  editconfigs         : Edit core arch configs"
> >       @echo "  migrateconfigs      : Automatically import old configs
> into annotations"
> >       @echo "  printchanges        : Print the current changelog entries
> (from git)"
> >       @echo "  insertchanges       : Insert current changelog entries
> (from git)"
> > @@ -40,7 +41,7 @@ migrateconfigs:
> >       fi
> >       rm -rf build
> >
> > -configs-targets := updateconfigs defaultconfigs genconfigs
> > +configs-targets := updateconfigs defaultconfigs genconfigs editconfigs
> >
> >  .PHONY: $(configs-targets)
> >  $(configs-targets):
> > diff --git a/debian/scripts/misc/kernelconfig
> b/debian/scripts/misc/kernelconfig
> > index 0c412af2ec8e..555e5399bd8d 100755
> > --- a/debian/scripts/misc/kernelconfig
> > +++ b/debian/scripts/misc/kernelconfig
> > @@ -17,7 +17,7 @@ if [ -z "${gcc:-}" ] ; then
> >  fi
> >
> >  if [ ${#} -ne 1 ] ; then
> > -     echo "Usage: $0 updateconfigs|defaultconfigs|genconfigs"
> > +     echo "Usage: $0
> updateconfigs|defaultconfigs|genconfigs|editconfigs"
> >       exit 2
> >  fi
> >
> > @@ -27,6 +27,7 @@ case "${mode}" in
> >       updateconfigs)  target="syncconfig" ;;
> >       defaultconfigs) target="olddefconfig" ;;
> >       genconfigs)     target="oldconfig" ;;
> > +     editconfigs)    ;;  # Target is set later based on user input
> >       *) echo "ERROR: Invalid mode: ${1}" >&2
> >          exit 1 ;;
> >  esac
> > @@ -77,6 +78,17 @@ EOF
> >               continue
> >       fi
> >
> > +     if [ "${mode}" = "editconfigs" ] ; then
> > +             while true ; do
> > +                     echo -n "Do you want to edit configs for
> ${arch}-${flavour}? [Y/n] "
> > +                     read -r choice
> > +                     case "${choice,,}" in
> > +                             y|"") target="menuconfig" ; break ;;
> > +                             n)    target="syncconfig" ; break ;;
> > +                     esac
> > +             done
> > +     fi
> > +
> >       rm -rf build
> >       mkdir build
> >
> > --
> > 2.34.1
> >
> >
> > --
> > kernel-team mailing list
> > kernel-team at lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20230124/658e9f9c/attachment-0001.html>


More information about the kernel-team mailing list