* [PATCH v2 1/4] bootstrap: Run linguas.sh in bootstrap epilogue
2025-11-11 7:13 [PATCH v2 0/4] Improve generating of LINGUAS Glenn Washburn
@ 2025-11-11 7:13 ` Glenn Washburn
2025-11-11 7:13 ` [PATCH v2 2/4] bootstrap: Migrate linguas.sh into bootstrap.conf Glenn Washburn
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Glenn Washburn @ 2025-11-11 7:13 UTC (permalink / raw)
To: grub-devel; +Cc: Daniel Kiper, Mike Gilbert, Glenn Washburn
Heretofore, linguas.sh had to be run by the user and a common mistake
made when building GRUB was to not run the command. By adding it to
the bootstrap epilogue it will by default get run at the end of the
bootstrap script. The user no longer needs to remember to run it.
If the --skip-po option is passed to bootstrap, do not run linguas.sh.
This allows for bootstrap to be run without updating the translations,
which might be desired in the future if we track po files so that
translations can be used as they were at time of release.
Update INSTALL file to reflect that it is no longer necessary to run
linguas.sh. Also, fix a list numbering error.
Fixes: 9f73ebd49be (* INSTALL: Document linguas.sh.)
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
INSTALL | 17 +++++++----------
bootstrap.conf | 8 +++++++-
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/INSTALL b/INSTALL
index 22b68cb6c766..f49bfdd2d0c5 100644
--- a/INSTALL
+++ b/INSTALL
@@ -140,15 +140,12 @@ The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code.
- 2. Skip this and following step if you use release tarball and proceed to
- step 4. If you want translations type `./linguas.sh'.
-
- 3. Type `./bootstrap'.
+ 2. Type `./bootstrap'.
The autogen.sh (called by bootstrap) uses python. By default autodetect
it, but it can be overridden by setting the PYTHON variable.
- 4. Type `./configure' to configure the package for your system.
+ 3. Type `./configure' to configure the package for your system.
If you're using `csh' on an old version of System V, you might
need to type `sh ./configure' instead to prevent `csh' from trying
to execute `configure' itself.
@@ -156,19 +153,19 @@ The simplest way to compile this package is:
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
- 6. Type `make' to compile the package.
+ 4. Type `make' to compile the package.
- 7. Optionally, type `make check' to run any self-tests that come with
+ 5. Optionally, type `make check' to run any self-tests that come with
the package. Note that many of the tests require root privileges in
order to run.
- 8. Type `make install' to install the programs and any data files and
+ 6. Type `make install' to install the programs and any data files and
documentation.
- 9. Type `make html' or `make pdf' to generate the html or pdf
+ 7. Type `make html' or `make pdf' to generate the html or pdf
documentation. Note, these are not built by default.
- 10. You can remove the program binaries and object files from the
+ 8. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
diff --git a/bootstrap.conf b/bootstrap.conf
index 8eff35b45d5d..e894666fd252 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -63,7 +63,7 @@ checkout_only_file=
copy=true
vc_ignore=
-SKIP_PO=t
+SKIP_PO=n
# Build prerequisites
buildreq="\
@@ -108,4 +108,10 @@ bootstrap_post_import_hook () {
bootstrap_epilogue () {
mv INSTALL.grub INSTALL
+
+ # Update translation files and create LINGUAS file used to determine
+ # the set of languages used to translate.
+ if [ "x$SKIP_PO" = "xn" ]; then
+ ./linguas.sh
+ fi
}
--
2.34.1
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v2 2/4] bootstrap: Migrate linguas.sh into bootstrap.conf
2025-11-11 7:13 [PATCH v2 0/4] Improve generating of LINGUAS Glenn Washburn
2025-11-11 7:13 ` [PATCH v2 1/4] bootstrap: Run linguas.sh in bootstrap epilogue Glenn Washburn
@ 2025-11-11 7:13 ` Glenn Washburn
2025-11-11 7:13 ` [PATCH v2 3/4] bootstrap: Condense and simplify LINGUAS generation Glenn Washburn
2025-11-11 7:13 ` [PATCH v2 4/4] INSTALL: Fix a grammatical error Glenn Washburn
3 siblings, 0 replies; 8+ messages in thread
From: Glenn Washburn @ 2025-11-11 7:13 UTC (permalink / raw)
To: grub-devel; +Cc: Daniel Kiper, Mike Gilbert, Glenn Washburn
Bootstrap has infrustructure for downloading/updating project po files
and generating the LINGUAS file. It uses wget instead of rsync, but
provides the same functionality, namely that only po files that have a
modification date before the corresponding one on the server will get
redownloaded. Bootstrap creates a pristine copy of the po files in
po/.reference, so update .gitignore to ignore that directory.
Bootstrap also creates the po/LINGUAS file, but it does not know to add
in GRUB's autogenerated po files. So move that code from linguas.sh into
the bootstrap epilogue.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
bootstrap.conf | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
diff --git a/bootstrap.conf b/bootstrap.conf
index e894666fd252..79d4248c84aa 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -63,8 +63,6 @@ checkout_only_file=
copy=true
vc_ignore=
-SKIP_PO=n
-
# Build prerequisites
buildreq="\
autoconf 2.64
@@ -109,9 +107,23 @@ bootstrap_post_import_hook () {
bootstrap_epilogue () {
mv INSTALL.grub INSTALL
- # Update translation files and create LINGUAS file used to determine
- # the set of languages used to translate.
- if [ "x$SKIP_PO" = "xn" ]; then
- ./linguas.sh
+ if [ "x$SKIP_PO" = "x" ]; then
+ # Generate LINGUAS with all supported languages. Bootstrap will
+ # generate a LINGUAS, but it will not contain the autogenerated
+ # languages.
+ autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH"
+
+ for x in $autogenerated; do
+ rm -f "po/$x.po";
+ done
+
+ (
+ (
+ cd po && ls *.po| cut -d. -f1
+ for x in $autogenerated; do
+ echo "$x";
+ done
+ ) | sort | uniq | xargs
+ ) >po/LINGUAS
fi
}
--
2.34.1
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v2 3/4] bootstrap: Condense and simplify LINGUAS generation
2025-11-11 7:13 [PATCH v2 0/4] Improve generating of LINGUAS Glenn Washburn
2025-11-11 7:13 ` [PATCH v2 1/4] bootstrap: Run linguas.sh in bootstrap epilogue Glenn Washburn
2025-11-11 7:13 ` [PATCH v2 2/4] bootstrap: Migrate linguas.sh into bootstrap.conf Glenn Washburn
@ 2025-11-11 7:13 ` Glenn Washburn
2025-11-17 17:29 ` Daniel Kiper
2025-11-11 7:13 ` [PATCH v2 4/4] INSTALL: Fix a grammatical error Glenn Washburn
3 siblings, 1 reply; 8+ messages in thread
From: Glenn Washburn @ 2025-11-11 7:13 UTC (permalink / raw)
To: grub-devel; +Cc: Daniel Kiper, Mike Gilbert, Glenn Washburn
Remove unnecessary subshells. Loop over autogenerated po files only once.
Use existing LINGUAS created by bootstrap instead of finding po files
again.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
bootstrap.conf | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/bootstrap.conf b/bootstrap.conf
index 79d4248c84aa..7104692d43ea 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -113,17 +113,12 @@ bootstrap_epilogue () {
# languages.
autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH"
- for x in $autogenerated; do
- rm -f "po/$x.po";
- done
-
- (
- (
- cd po && ls *.po| cut -d. -f1
- for x in $autogenerated; do
- echo "$x";
- done
- ) | sort | uniq | xargs
- ) >po/LINGUAS
+ {
+ ls po/*.po | xargs -L 100 basename -s .po -a
+ for x in $autogenerated; do
+ rm -f "po/$x.po"
+ echo "$x"
+ done
+ } | sort | uniq | xargs >po/LINGUAS
fi
}
--
2.34.1
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v2 3/4] bootstrap: Condense and simplify LINGUAS generation
2025-11-11 7:13 ` [PATCH v2 3/4] bootstrap: Condense and simplify LINGUAS generation Glenn Washburn
@ 2025-11-17 17:29 ` Daniel Kiper
2025-11-17 19:35 ` Glenn Washburn
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Kiper @ 2025-11-17 17:29 UTC (permalink / raw)
To: Glenn Washburn; +Cc: grub-devel, Mike Gilbert
On Tue, Nov 11, 2025 at 01:13:28AM -0600, Glenn Washburn wrote:
> Remove unnecessary subshells. Loop over autogenerated po files only once.
> Use existing LINGUAS created by bootstrap instead of finding po files
> again.
>
> Signed-off-by: Glenn Washburn <development@efficientek.com>
> ---
> bootstrap.conf | 19 +++++++------------
> 1 file changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/bootstrap.conf b/bootstrap.conf
> index 79d4248c84aa..7104692d43ea 100644
> --- a/bootstrap.conf
> +++ b/bootstrap.conf
> @@ -113,17 +113,12 @@ bootstrap_epilogue () {
> # languages.
> autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH"
>
> - for x in $autogenerated; do
> - rm -f "po/$x.po";
> - done
> -
> - (
> - (
> - cd po && ls *.po| cut -d. -f1
> - for x in $autogenerated; do
> - echo "$x";
> - done
> - ) | sort | uniq | xargs
> - ) >po/LINGUAS
> + {
> + ls po/*.po | xargs -L 100 basename -s .po -a
I suggest to add "-r" option to the xargs command.
> + for x in $autogenerated; do
> + rm -f "po/$x.po"
> + echo "$x"
> + done
> + } | sort | uniq | xargs >po/LINGUAS
Ditto...
If you fix these minor issues you can add my RB to all patches...
Daniel
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2 3/4] bootstrap: Condense and simplify LINGUAS generation
2025-11-17 17:29 ` Daniel Kiper
@ 2025-11-17 19:35 ` Glenn Washburn
2025-11-18 12:43 ` Daniel Kiper
0 siblings, 1 reply; 8+ messages in thread
From: Glenn Washburn @ 2025-11-17 19:35 UTC (permalink / raw)
To: Daniel Kiper; +Cc: grub-devel, Mike Gilbert
On Mon, 17 Nov 2025 18:29:31 +0100
Daniel Kiper <dkiper@net-space.pl> wrote:
> On Tue, Nov 11, 2025 at 01:13:28AM -0600, Glenn Washburn wrote:
> > Remove unnecessary subshells. Loop over autogenerated po files only once.
> > Use existing LINGUAS created by bootstrap instead of finding po files
> > again.
> >
> > Signed-off-by: Glenn Washburn <development@efficientek.com>
> > ---
> > bootstrap.conf | 19 +++++++------------
> > 1 file changed, 7 insertions(+), 12 deletions(-)
> >
> > diff --git a/bootstrap.conf b/bootstrap.conf
> > index 79d4248c84aa..7104692d43ea 100644
> > --- a/bootstrap.conf
> > +++ b/bootstrap.conf
> > @@ -113,17 +113,12 @@ bootstrap_epilogue () {
> > # languages.
> > autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH"
> >
> > - for x in $autogenerated; do
> > - rm -f "po/$x.po";
> > - done
> > -
> > - (
> > - (
> > - cd po && ls *.po| cut -d. -f1
> > - for x in $autogenerated; do
> > - echo "$x";
> > - done
> > - ) | sort | uniq | xargs
> > - ) >po/LINGUAS
> > + {
> > + ls po/*.po | xargs -L 100 basename -s .po -a
>
> I suggest to add "-r" option to the xargs command.
Yes, good catch.
>
> > + for x in $autogenerated; do
> > + rm -f "po/$x.po"
> > + echo "$x"
> > + done
> > + } | sort | uniq | xargs >po/LINGUAS
>
> Ditto...
Here I don't think it matters. There is no command, so no command is
run regardless if there's input or not. We don't have the problem of the
usage above (namely running the command with no arguments). It should
be said that this usage is unmodified from linguas.sh. It appears that
the only reason xargs is used here is to convert newlines to spaces,
which could be more explicitly done by using "tr '\n' ' '". Since it
was a strange usage and wasn't 100% sure if there were other reasons it
was used, I left it as is. So I think we should leave as is or convert
to tr. I'll leave as is for now, unless you're adamant about adding -r.
Glenn
>
> If you fix these minor issues you can add my RB to all patches...
>
> Daniel
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2 3/4] bootstrap: Condense and simplify LINGUAS generation
2025-11-17 19:35 ` Glenn Washburn
@ 2025-11-18 12:43 ` Daniel Kiper
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Kiper @ 2025-11-18 12:43 UTC (permalink / raw)
To: Glenn Washburn; +Cc: grub-devel, Mike Gilbert
On Mon, Nov 17, 2025 at 01:35:25PM -0600, Glenn Washburn wrote:
> On Mon, 17 Nov 2025 18:29:31 +0100 Daniel Kiper <dkiper@net-space.pl> wrote:
> > On Tue, Nov 11, 2025 at 01:13:28AM -0600, Glenn Washburn wrote:
> > > Remove unnecessary subshells. Loop over autogenerated po files only once.
> > > Use existing LINGUAS created by bootstrap instead of finding po files
> > > again.
> > >
> > > Signed-off-by: Glenn Washburn <development@efficientek.com>
> > > ---
> > > bootstrap.conf | 19 +++++++------------
> > > 1 file changed, 7 insertions(+), 12 deletions(-)
> > >
> > > diff --git a/bootstrap.conf b/bootstrap.conf
> > > index 79d4248c84aa..7104692d43ea 100644
> > > --- a/bootstrap.conf
> > > +++ b/bootstrap.conf
> > > @@ -113,17 +113,12 @@ bootstrap_epilogue () {
> > > # languages.
> > > autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH"
> > >
> > > - for x in $autogenerated; do
> > > - rm -f "po/$x.po";
> > > - done
> > > -
> > > - (
> > > - (
> > > - cd po && ls *.po| cut -d. -f1
> > > - for x in $autogenerated; do
> > > - echo "$x";
> > > - done
> > > - ) | sort | uniq | xargs
> > > - ) >po/LINGUAS
> > > + {
> > > + ls po/*.po | xargs -L 100 basename -s .po -a
> >
> > I suggest to add "-r" option to the xargs command.
>
> Yes, good catch.
Hmmm... I have one problem with "-r". It is a GUN extension. Though
I think it should not be big deal for us here...
> > > + for x in $autogenerated; do
> > > + rm -f "po/$x.po"
> > > + echo "$x"
> > > + done
> > > + } | sort | uniq | xargs >po/LINGUAS
> >
> > Ditto...
>
> Here I don't think it matters. There is no command, so no command is
> run regardless if there's input or not. We don't have the problem of the
> usage above (namely running the command with no arguments). It should
> be said that this usage is unmodified from linguas.sh. It appears that
> the only reason xargs is used here is to convert newlines to spaces,
> which could be more explicitly done by using "tr '\n' ' '". Since it
> was a strange usage and wasn't 100% sure if there were other reasons it
Yeah, it is really strange...
> was used, I left it as is. So I think we should leave as is or convert
Yeah, I concur.
> to tr. I'll leave as is for now, unless you're adamant about adding -r.
No, I agree we can live without it here...
Daniel
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 4/4] INSTALL: Fix a grammatical error
2025-11-11 7:13 [PATCH v2 0/4] Improve generating of LINGUAS Glenn Washburn
` (2 preceding siblings ...)
2025-11-11 7:13 ` [PATCH v2 3/4] bootstrap: Condense and simplify LINGUAS generation Glenn Washburn
@ 2025-11-11 7:13 ` Glenn Washburn
3 siblings, 0 replies; 8+ messages in thread
From: Glenn Washburn @ 2025-11-11 7:13 UTC (permalink / raw)
To: grub-devel; +Cc: Daniel Kiper, Mike Gilbert, Glenn Washburn, Sudhakar Kuppusamy
Also, add more documentation mentioning that the tests require a
"specially crafted environment" to run. Just running as root is not
enough.
Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
---
INSTALL | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/INSTALL b/INSTALL
index f49bfdd2d0c5..8b10e954873f 100644
--- a/INSTALL
+++ b/INSTALL
@@ -142,8 +142,8 @@ The simplest way to compile this package is:
2. Type `./bootstrap'.
- The autogen.sh (called by bootstrap) uses python. By default autodetect
- it, but it can be overridden by setting the PYTHON variable.
+ The autogen.sh (called by bootstrap) uses python. By default it is
+ autodetected, but it can be overridden by setting the PYTHON variable.
3. Type `./configure' to configure the package for your system.
If you're using `csh' on an old version of System V, you might
@@ -156,8 +156,8 @@ The simplest way to compile this package is:
4. Type `make' to compile the package.
5. Optionally, type `make check' to run any self-tests that come with
- the package. Note that many of the tests require root privileges in
- order to run.
+ the package. Note that many of the tests require root privileges and
+ a specially crafted environment in order to run.
6. Type `make install' to install the programs and any data files and
documentation.
--
2.34.1
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread