Commit Graph

763 Commits

Author SHA1 Message Date
Gero Schwäricke
eb519ad7cc docs/manual: promote using fixed version for kernel headers when contributing a board
When the default (newest) kernel headers series changes the build can
break. Example error message:

  Incorrect selection of kernel headers: expected 6.8.x, got 6.5.x

In the above case the defconfig used:

  BR2_LINUX_KERNEL_CUSTOM_VERSION=y
  BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.5.9"

The kernel headers were not specified, so the build defaulted to using
the kernel sources as header source and the default (newest) header
series. From .config:

  BR2_KERNEL_HEADERS_AS_KERNEL=y
  BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_8=y

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-07-18 22:58:42 +02:00
ʎɐH ǝʌǝʇS
ca6c896bdd support/scripts/graph-depends allow for forward and reverse depends on same graph
The current implementation of buildroot depe dependency graphing
either does forward- or reverse-dependency traversal.

This patch enables buildroot to graph forward and reverse dependencies
on the graph for the same package: (Diagram Credit: Yann E. MORIN)

    $ make pkg-d-graph-both-depends

    pkg A -.            .-> pkg E
            \          /
    pkg B ----> pkg D ----> pkg F
            /          \
    pkg C -'            '-> pkg G

In the above example a single graph shows pkg {A,B,C} are needed
by pkg D, and pkg D is a dependency of pkg {E,F,G}.

Makefile help and manual are also updated.

Signed-off-by: Steve Hay <me@stevenhay.com>
[Arnout:
 - remove DEPTH and RDEPTH, their functionality is already covered by
   BR2_GRAPH_DEPS_OPTS;
 - remove --rdepth, it was felt to not add sufficient added value;
 - add the new target to the manual;
 - fix flake8 errors.
]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-07-14 21:31:03 +02:00
Fiona Klute (WIWA)
02d8e072d1 docs/manual: include S01syslogd from source
The manual describes package/busybox/S01syslogd as the reference of
how an init script should be written. Include it from source instead
of having a copy in the manual to ensure actual code and manual stay
in sync.

Also use long options in the paragraph after the script to follow the
same style.

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-07-14 19:31:55 +02:00
Fiona Klute (WIWA)
d8e838fa31 docs/manual: describe relying on default options
People can assume that e.g. Busybox options enabled in the package are
enabled when writing code for Buildroot. Anyone who uses custom
configurations that disable default options needs to make sure
relevant scripts etc. still work for themselves.

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-07-14 19:31:53 +02:00
Arnout Vandecappelle
804edd8683 docs/manual: rephrase end of vendoring section
The current phrasing is not entirely clear: one could read it as if
Buildroot will detect if there's an update available in one of the
dependencies, which is quite the reverse of what we do. Rephrase the
sentence in a way that hopefully makes it clearer that we're just making
a hash of the dependencies.

While we're at it, also extend the sentence about offline builds a
little.

Suggested-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-07-14 10:50:01 +02:00
Waldemar Brodkorb
bbc8cc1cb6 docs: add time64 status of uClibc-ng
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-07-13 16:27:02 +02:00
Brandon Maier
a320986c44 package/Makefile.in: add PARALLEL_JOBS to post-build/post-image scripts
Post-build, post-image, and other build scripts may run some commands in
parallel, for example to parallelize xargs, Makefiles, etc. Export
PARALLEL_JOBS to these scripts so they can enforce the same job limits
that other Buildroot packages use.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-07-13 00:19:14 +02:00
Arnout Vandecappelle
447fa1fca4 docs/manual: normalize delimiters of listing blocks
Although the asciidoc toolchain accepts any number of ~ to delimit a
listing block (i.e. a code block), it is actually specified to be
exactly four, i.e. ~~~~. Currently, a mix of diffrent numbers of ~ are
being used - sometimes even a different number at the beginning and at
the end of the block.

Normalize this to always use exactly four ~ for the delimiter.

Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-07-12 20:30:50 +02:00
Ricardo Martincoski
4286c89f9d docs/manual: standardize references to the generic infra
Currently the text for each package infra that mentions the usage of
variables already provided by the generic infra diverge from each other:
- some (golang, kconfig, python) add a cross-referece to the generic
  infra chapter;
- kconfig does not list any example;
- some mention _LICENSE as an example, others don't;
- some (cargo, golang, python) add an 'etc.' at the end of the examples,
  giving the idea that can be more symbols provided by the generic
  infra than the ones listed;
- most have the text 'works by defining a number of variables before
  calling the +<macro-name>+ macro', except golang and kconfig;
- some actually list 'A few additional variables' but keep using some
  old reference as 'An additional variable';
- some say 'First, all the package metadata' and other only 'All the
  package metadata';
- most mention _SUBDIR as an example of variable supported by the
  generic infra, even the generic infra manual not mentioning it.

Improve the correctness for the manual by standardizing the text among
the package infras:
- use the same text "All the package metadata information variables that
  exist in the generic package infrastructure also exist in the
  <name> infrastructure:" for all of them;
- add the cross-reference for all of them;
- remove the examples of variables inherited from the generic infra -
  this also solves the _SUBDIR problem, there no longer is any reference
  to _SUBDIR;
- wrap the modified text at 80 columns;
- add "macro" to golang and luarocks infra;
- use "A few additional variables" for qmake and waf.

At same time, add a missing format on golang manual for
BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS.

Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
[Arnout:
 - remove the examples;
 - add "the" where "macro" was added;
 - rewrite the preceding paragraphs for kconfig to make it more
   consistent.
]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-07-12 20:30:46 +02:00
Yann E. MORIN
afece24a72 support/download: introduce curl backend for FTP transfers
Recent versions of wget, starting with wget 2.0, aka wget2 thereafter,
no longer support FTP (nor FTPS, aka FTP-over-SSL). wget2 is packaged in
Fedora 40, recently released; F40 does not even have the old wget
available in its repository anymore.

Introduce cURL as a download backend, that we use for FTP and FPTS
protocols.

Note that the -q flag does not means being quiet; it means that a curlrc
file should not be parsed. The long option is --disable, which meaning
is not much more obivous than the short -q. It also has to be the first
option on the command line.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-07-12 13:12:55 +02:00
Fiona Klute (WIWA)
cb25b54c2d docs/manual: allow sponsor mention in author name
Unfortunately not all mail providers deliver mails with subaddressing,
mention people can acknowledge a sponsor in the author name instead.

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-07-08 23:10:29 +02:00
Thomas Petazzoni
1c1edaefb8 docs, package/gcc: switch to Gitlab issue tracker
Our Bugzilla is so slow and unstable that it has become
unusable. Let's switch to using the Gitlab issue tracker instead.

There are still lots of references to the Bugzilla bug tracker in our
News page at https://buildroot.org/news.html, but these are for older
news.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: don't needlessly re-flow]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-06-15 16:35:26 +02:00
Raphaël Mélotte
095bd205ae docs/manual: document python-aiohttp needed for pkg-stats
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-04 20:17:05 +02:00
Yann E. MORIN
bc71274a34 docs/manual: update archives version suffixes
Since tar *will* generate different archives, virtually all hashes will
change, so drop the blurb that states they usually would not.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
[Arnout: say explicitly that the has will change]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-05-09 22:45:12 +02:00
Yann E. MORIN
c316a83a8e docs/manual: document new archive version suffix
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
[Arnout: add sed scripts for hash file update]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-05-09 22:45:05 +02:00
Yann E. MORIN
a1155dc8f4 docs/manual: document git backend handling of export-subst attribute
Add the changes about export-subst in the git backend, to the migrating
section of the manual.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Arnout: slightly extend the message, add sed command to update hash
files]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-05-09 22:44:56 +02:00
Raphaël Mélotte
f12c77442e docs/manual: fix host-python-setuptools typo
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-04-03 21:53:41 +02:00
Heiko Thiery
b7cc572208 Add BR2_ROOTFS_{PRE_BUILD|POST_{BUILD|FAKEROOT|IMAGE}}_SCRIPT_ARGS
Currently, one may only specify one list of arguments that are passed to
several scripts (BR2_ROOTFS_PRE_BUILD_SCRIPT, BR2_ROOTFS_POST_BUILD_SCRIPT,
BR2_ROOTFS_POST_FAKEROOT_SCRIPT and BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS).

So one has to be careful that the arguments for these scripts do noti
collide.

To allow specifiying dedicated arguments to each type of scripts, new
config options are introduced. For backward compatibility the value of
BR2_ROOTFS_POST_SCRIPT_ARGS is still passed to the scripts. But now one
can add specific arguments from the new config option.

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
[yann.morin.1998@free.fr:
  - mention common args in help texts
  - slight coding style beautification
  - slight rewording in commit log
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-03-28 21:47:04 +01:00
Yann E. MORIN
fcf465d04b utils/checkpackagelib: add check for CPE variables set to default values
Now that we can specify that the default values for the CPE_ID variables
are valid, without having to actually set one (or more) to their
default, add a check-package check that validates that the CPE_ID
variables are indeed not set to their default.

It also validates that CPE_ID_VALID is not set when another CPE_ID
variable is set to a non-default value.

Add an anchor in the manual so that we can easily point to it.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-11 16:30:59 +01:00
Yann E. MORIN
ddf66867b1 doc/manual: document _CPE_ID_VALID
The way we handle CPE_ID variable is unusual compared to the other
variables: we mostly compute defaults for all of them, and eventually
aggregate the various CPE_ID variables to form the CPE ID name.

However, we do not consider that CPE ID to valid, unless there is one
(or more) CPE_ID variables actually set by the package; this shows that
the CPE ID has been checked to be valid against the NVD CPE database. In
that situation, we internally define the duly undocumented _CPE_ID_VALID
variable.

However, it is totally possible (and very often the case) that the
default value we set to those variables are appropriate, and do defne a
valid CPE ID. In this case, the package will define any arbitrary CPE_ID
variable to its default value, usually by setting either the VENDOR or
PRODUCT field, though there is no rule or requirement that be the case.

This is not very clean, non-obvious, and does not allow for easily
adding checks in check-package.

Add the _CPE_ID_VALID variable to the manual, to make it official that
it should be used when the default values of the others are valid.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-11 16:29:02 +01:00
Yann E. MORIN
949c1a51b7 doc/manual: indent the CVE example the same as the CVE list item
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-11 16:28:45 +01:00
Yann E. MORIN
1c24d83cc8 doc/manual: fixup ordered lists
With recent asiidoc versions (at least 10.2.0 is known to report that),
rendering the manual yields a few warnings related to ordered lists:

    asciidoc: WARNING: customize-quick-guide.adoc: line 13: list item index: expected 2 got 1
    asciidoc: WARNING: customize-quick-guide.adoc: line 15: list item index: expected 3 got 1
    [...]
    asciidoc: WARNING: customize-quick-guide.adoc: line 65: list item index: expected 13 got 1
    asciidoc: WARNING: customize-quick-guide.adoc: line 66: list item index: expected 14 got 1
    asciidoc: WARNING: adding-packages-gettext.adoc: line 30: list item index: expected 2 got 1
    asciidoc: WARNING: adding-packages-gettext.adoc: line 41: list item index: expected 3 got 1

The reason is that we use the same index to tell asciidoc to
automatically number items.

However, the official way to provide an automatic index is to write no
index:

    https://docs.asciidoctor.org/asciidoc/latest/lists/ordered/

    [...] since the numbering is obvious, the AsciiDoc processor will
    insert the numbers for you if you omit them:
    [...]
    If you number the ordered list explicitly, you have to manually keep
    the list numerals sequential. Otherwise, you will get a warning.

So, abide by the documentation, and drop the repeating indices to
ordered lists where we want automatic numbering.

Note that there is another ordered list, in adding-packages-directory.adoc,
but it does use explicit, sequential numbering. For consistency within
the whole document, we also convert it.

To avoid extra useless churn, the indentation of the items is not
changed to match the elided indices.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-11 16:28:35 +01:00
Thomas Petazzoni
89e67a9638 docs/manual: update documentation about support python <pkg>_SETUP_TYPE
Note that we do not document the special flit-bootstrap value, as it
is considered an internal implementation detail, and shouldn't
normally be used by packages.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-06 23:21:23 +01:00
Adam Duskett
09de823cbc package/pkg-python.mk: remove distutils support
All Python packages have been migrated to a different setup type, and
we're about to bump to Python 3.12 which no longer supports distutils,
so let's drop support for distutils in our python-package
infrastructure.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
[Thomas: also update the Buildroot manual]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-06 23:21:21 +01:00
Marcus Hoffmann
fc3d2bcb40 docs/manual/contribute.adoc: mention sr.ht as a fallback for sending patches
Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
[yann.morin.1998@free.fr: make it explicit it is not the official way]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-02-06 18:03:57 +01:00
Marcus Hoffmann
b4639b493a docs/manual/contribute.adoc: link to git-send-email.io
https://git-send-email.io/ is a page maintained by sourcehut which
explains how to setup git send-email on many OS's for many popular email
providers.

Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-02-06 17:02:07 +01:00
Yann E. MORIN
738fb6dfa4 docs/manual: extend makedev syntax section
The section of the manual describing the makedev syntax is not
up-to-date with the current features, and does not properly describe
existing ones.

  - extend the list of types with the requirements on the existence of
    the target file or directory; for 'c', 'b', and 'p', the existence
    requirement is inherited from mknod(2):

    ERRORS
        ...
        ENOENT A directory component in pathname does not exist or is a
               dangling symbolic link.

    for the other types, the existence requirements are extracted from
    the source of makedev.c;

  - format the types flags, so they are rendered in monospace;

  - extend the 'mode' description, as it can be set to -1 for 'f', 'd',
    or 'r', so that only the uid and gid are set. This is most useful
    for 'r', where setting the same mode recursively for all the
    sub-directories and files alike does not really make sense; indeed
    in this case, the modes are usually set correctly when the package
    (or rootfs overlay) installs the files, and only the uid and gid are
    interesting to set;

  - extend and update the examples to show-case the -1 mode use-case.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-06 11:52:09 +01:00
Sébastien Szymanski
f24e85238f docs/manual/contribute.txt: fix typo
"who sponsored who sponsored" -> "who sponsored"

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-01-31 21:23:18 +01:00
Yann E. MORIN
b79fb3c224 doc/manual: rsync is not optional
rsync is used in the infrastructure, mostly for the per-package infra,
and for the override-srcdir mechanism, but also to build the manual.
As such, it is not optional but mandatory, and already listed so.

Drop the reference to rsync from the list of optional packages.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-12-11 09:21:52 +01:00
Arnout Vandecappelle
bfafe9b3e9 docs/manual: remove references to PKG_PYTHON_*_OPTS
These variables were removed. In addition, the text describing them
wasn't terribly useful. Just remove the sentences describing them.

Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-11-25 22:03:15 +01:00
Peter Korsgaard
4984d0f230 utils/add-custom-hashes: add script to manage global patch dir hashes
Add a script to manage the .hash files in the BR2_GLOBAL_PATCH_DIR for
packages using custom versions.

To use it, run in a configured Buildroot directory, E.G.

  make foo_defconfig; ./utils/add-custom-hashes

We support multiple patch directories in BR2_GLOBAL_PATCH_DIR.  If multiple
directories are specified then use the last one as that is likely to be the
most specific one.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
[Peter: silence command -v invocation]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-12 11:59:27 +01:00
Yann E. MORIN
5d36710e36 package/pkg-download: lookup hash files in global-patch-dir
Currently, we expect and only use hash files that lie within the package
directory, alongside the .mk file. Those hash files are thus bundled
with Buildroot.

This implies that only what's known to Buildroot can ever get into those
hash files. For packages where the version is fixed (or a static
choice), then we can carry hashes for those known versions.

However, we do have a few packages for which the version is a free-form
entry, where the user can provide a custom location and/or version.  like
a custom VCS tree and revision, or a custom tarball URL. This means that
Buildroot has no way to be able to cary hashes for such custom versions.

This means that there is no integrity check that what was downloaded is
what was expected. For a sha1 in a git tree, this is a minor issue,
because the sha1 by itself is already a hash of the expected content.
But for custom tarballs URLs, or for a tag in a VCS, there is indeed no
integrity check.

Buildroot can't provide such hashes, but interested users may want to
provide those, and currently there is no (easy) way to do so.

We leverage the existing global-patch-dir mechanism to look for extra
hash files. We use the same heuristic that is used for bundled hash
files, and for each global patch directory <dir>, we use the first file
to exist among:
 1. look into <dir>/<package>/<version>/<package>.hash
 2. look into <dir>/<package>/<package>.hash

Reported-by: "Martin Zeiser (mzeiser)" <mzeiser@cisco.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-07 11:48:46 +01:00
Yann E. MORIN
6898781f03 docs/manual: svn downloads can be hash-checked
Since commit 89f5e98932 (support/download/svn: generate reproducible
svn archives), we've been able to generate reproducible archives, and
thus we have been able to verify the hashes for those archives.

However, the manual was not changed, and still falsely hinted that this
was not the cae.

Fix that.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2023-11-05 22:48:22 +01:00
Yann E. MORIN
f685549b19 docs/manual: fix typo
Reported-by: Thomas Devoogdt <thomas@devoogdt.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-10-21 23:30:27 +02:00
Yann E. MORIN
6480774c43 package/pkg-generic: drop support for arch-specific patches
The last architecture-specific patch we had was removed 2015-02-14 with
commit 9863553fe8 (packages: all salute the passing of avr32), where
we eventually got rid of the avr32-specific patch for fbv.

Since then, we've only had common patches (that apply systematically),
or conditional patches, that are applied in an ad-hoc manner with
post-patch hooks. Currently, we even only have one such patch (for
Linux).

Since we do not advertise that possibility in the manual, and since we
do not want to have such patches, drop the support for it.

This has the potential for breaking existing br2-external trees, but
there is a workaround for those: they can provide a pre-patch ook that
copies the necessary per-arch patches if needed. We document this in the
manual.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-10-15 22:24:51 +02:00
Thomas Petazzoni
f10f47ff28 docs/manual: add a FAQ entry about Y2038 support
This was reviewed in person by Arnout.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-10-01 21:14:07 +02:00
Francois Perrad
32cec3be97 docs/manual: rename *.txt as *.adoc
by using this standard extension `adoc`,
these files are rendered on gitlab & github

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-09-30 10:25:22 +02:00
Giulio Benetti
de349df08c docs/manual: add section to explain how to give credits to a sponsor
Sometimes it happens that a Company or a Physical Person sponsors the
creation and/or the upstreaming process of a patch, but at the moment
there is no way to give credits to it. In Linux they prepend '+sponsor'
to the e-mail of the contributor in both authorship and commit log tag as
discussed here[0]. So let's describe in the manual how to do that as a
standard.

[0]: https://lore.kernel.org/linux-doc/20230817220957.41582-1-giulio.benetti@benettiengineering.com/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
[yann.morin.1998@free.fr:
  - reword to reference sub-addressing and the RFC
  - move to the "submitting patches" section, that already deals with
    SoB tags
  - differentiate between Your/Their names
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-09-21 23:57:26 +02:00
Yann E. MORIN
96130dc204 docs/manual: fix formatting for LIBFOO_SVN_EXTERNAL
Commit 7dd27cbe5b (support/download: add support to exclude svn
externals) introduced an improperly formatted list item. That was
carried over with bf2d7f8f53 (package/pkg-generic: don't download svn
externals by default).

Fix that.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-09-17 22:59:16 +02:00
Yann E. MORIN
bf2d7f8f53 package/pkg-generic: don't download svn externals by default
Commit 7dd27cbe5b (support/download: add support to exclude svn
externals) departed from the usual opt-in scheme, like is done for
git submodule or large files, in an attempt to keep the previous
behaviour unchanged, that is to download externals by default.

As an afterthought, we've concluded that the chances for svn-hosted
packages with externals that are indeed required to do the build,
are relatively slim. For those cases, it even makes sense to explicitly
requested the use of the externals.

So, we change the default to not download svn externals.

Since the generated archives may change, we bump the version suffix.
This will allow users to more easily catch the situation and decide if
they really need the externals or not.

We have a single in-tree package that uses svn, and it does not use
externals, so the generated archive does not change, and we just need
to update the archive filename in the hash file.

Finally, we add a new section to the manual, in the chapter about
migrating Buildroot to a newer version.

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-08-20 16:30:50 +02:00
Yann E. MORIN
7dd27cbe5b support/download: add support to exclude svn externals
Like git which can have submodules, subversion can have externals. The
default behaviour for subversion is to retrieve all the externals,
unless told otherwise.

For some repositories, the externals may be huge (e.g. a dataset or some
assets) and may not be required for building the package. In such a
case, retrieving the externals is both a waste of network bandwitdh and
time, and a waste of disk storage.

Like for git submodules and git lfs, add an option that packages can set
to specify whether they want externals or not.

Since we've so far been retrieving externals, we keep that the default,
and packages can opt-out (rather than the opt-in for git submodules or
git lfs).

We must only set it when the package is actually hosted on svn, to avoid
passing -r when the package is not hosted by svn; otherwise, -r would
also be passed e.g. to a git-hosted package, triggering the download of
git submodules even when they are not requested. We need to do so,
because we have a default value, which we usually do not have in other
download options.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-08-06 16:35:52 +02:00
Thomas Devoogdt
4cf79d9b71 pkg-cmake: add option to select the Ninja generator
Cmake supports multiple generators. For now, Buildroot only uses the
venerable "GNU Makefile" generator, which generates Makefiles as the
build backend.

Cmake also has support for Ninja as a build backend, and provides the
corresponding generator. Ninja is a small build system with a focus on
speed. It is mainly used with the meson build system, but also cmake has
very good support for it.

Packages that are selecting Ninja (or over time another generator),
should also use the _BUILD_{ENV,OPTS} variables instead of the _MAKE
variables.

No _INSTALL{,_STAGING,_TARGET}_OPTS used so far, so reuse as cmake install opts:

    $ grep '_INSTALL_OPTS' $(git grep -l -E '\$\(eval \$\((host-)?cmake-package))')
    $ grep '_INSTALL_STAGING_OPTS' $(git grep -l -E '\$\(eval \$\((host-)?cmake-package))')
    $ grep '_INSTALL_TARGET_OPTS' $(git grep -l -E '\$\(eval \$\((host-)?cmake-package))')

The _MAKE_{ENV,OPTS} are copied to _BUILD_{ENV,OPTS}, involved packages:

    $ grep '_MAKE_ENV =' $(git grep -l -E '\$\(eval \$\((host-)?cmake-package))')

    package/netopeer2/netopeer2.mk:NETOPEER2_MAKE_ENV = \
    package/racehound/racehound.mk:RACEHOUND_MAKE_ENV = $(LINUX_MAKE_FLAGS)

    (qt6, webkitgtk, and wpewebkit also match, but already use -Gninja)

    $ grep '_MAKE_OPTS =' $(git grep -l -E '\$\(eval \$\((host-)?cmake-package))')

    package/mariadb/mariadb.mk:HOST_MARIADB_MAKE_OPTS = import_executables
    package/zeek/zeek.mk:HOST_ZEEK_MAKE_OPTS = binpac bifcl

Only "musepack" seems to overwrite MAKE to enforce -j1, so replace it:

    $ grep '_MAKE =' $(git grep -l -E '\$\(eval \$\((host-)?cmake-package))')

    package/musepack/musepack.mk:MUSEPACK_MAKE = $(MAKE1)

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
Reviewed-by: John Keeping <john@metanate.com>
[yann.morin.1998@free.fr:
  - switch to FOO_CMAKE_BACKEND = (make|ninja)
  - use firstword of $(MAKE), not $(BR2_MAKE)
  - explain why we use firstword of $(MAKE)
  - update manual with the three new variables
  - yweak commit log
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-08-06 15:38:00 +02:00
Yann E. MORIN
4468f82885 doc/manual: fix formatting slightly
Signed-off-by: Thierry GUIBERT <thierry.guibert@croix-rouge.fr>
[yann.morin.1998@free.fr: split off the previous patch by Thierry]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-04-16 14:33:42 +02:00
Thierry GUIBERT
d9228faa4d doc/manual: add documentation about docker registry on gitlab.com
Add a paragraph and an example about using the Buildroot image registry
hosted on gtilab.com, for people who want to build their own image based
on the offical one.

Signed-off-by: Thierry GUIBERT <thierry.guibert@croix-rouge.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-04-16 14:32:29 +02:00
Vincent Fazio
5b00b40a05 docs/manual: rewrite section for upstream documentation
Previously, the documentation only requested links to upstream commits
when backporting patches.

Based on a mailing list discussion [0], patches should, when possible
and when approriate, provide a link as evidence that the patch has been
submitted upstream.

The motivation is that hopefully the patch gets applied to upstream at
some point reducing the long term maintenance burden within Buildroot.
This also makes future patch review on subsequent package version bumps
more streamlined.

For patches that are unique to BR and do not apply to the upstream
repository, patches should have a comment explaining why they do not
apply upstream.

[0] https://lists.buildroot.org/pipermail/buildroot/2023-March/666000.html

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-04-15 19:36:46 +02:00
Yann E. MORIN
6a6a11f64b package/doc-asciidoc: allow docs to request a specific TOC depth
For some documents, we may want a terse or deeper TOC depth. For
example, short documents may want just the level-0 in the TOC, while
longer documents may want depth 1 or 2, or even deeper; also, some
documents may not use the document-title levels [0], only section
levels [1], and so may want to increase the TOC depth.

Additionally, allow per-format depth. For example, split-html has a
single page dedicated to the TOC, so there we may want a deeper TOC,
while on the html output, where the TOC is on the same page as the
whole document, a shorter TOC is preferred.

[0] https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#document-header
[1] https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#section-titles

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-04-10 21:49:22 +02:00
Luca Ceresoli
9a3d4e3818 docs/manual: ditch redundant -f 'rm' flag
The value of the RM variable in make is 'rm -f' [0], thus the additional
-f is redundant. Avoid it on the docs to avoid developers taking it as a
good example to follow.

[0] https://www.gnu.org/software/make/manual/make.html#index-RM

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-03-28 21:36:07 +02:00
Vincent Fazio
2bc95879f7 manual: drop LIBFOO_GETTEXTIZE, add LIBFOO_AUTOPOINT
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-03-25 21:56:19 +01:00
Vincent Fazio
067a69412a manual: remove LIBFOO_GETTEXTIZE_OPTS
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-03-25 21:22:10 +01:00
Arnout Vandecappelle
c77e31e0b3 docs/manual: add 'menuconfig' to out-of-tree examples
If the examples given for launching an out-of-tree build are executed
as-is, this will result in the error message

    Please configure Buildroot first (e.g. "make menuconfig")

Even if "make menuconfig" was run before, it's still not going to work
because the out-of-tree build doesn't use the in-tree .config.

Therefore, the example really should start with some config option.
Since "make menuconfig" is used in most other examples of creating a
config, use that here as well. Extend both examples with "menuconfig".

Reported-by: AndreiCherniaev <dungeonlords789@yandex.ru>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2023-02-15 22:28:58 +01:00