When the rootfs is readonly, systemd will expect /var to be writable.
Because we do not really have a R/W filesystem to mount on /var, we make
it a tmpfs [*], and use the systemd-tmpfiles feature to populate it with
"factory" defaults.
We obtain those factory defaults by redirecting /var to that location at
build time, using a symlink /var -> /usr/share/factory which is the
location in which systemd-tmpfiles will look for when instructed to
"recursively copy" a directory.
With a line like:
C /var/something - - - -
it will look for /usr/share/factory/something and copy it (recursively
if it is a directory) to /var/something, but only if it does not already
exist there.
We also mark this copy with the exclamation mark, as it is only safe to
copy on boot, not when changing targets.
To be noted: the real format for such lines are:
C /var/something - - - - /from/where/to/copy/something
But if the source is not given, then it is implicitly taken from
/usr/share/factory (which in our case is as-good a location as whatever
else, so we use it, and thus we need not specify the source of the
copy).
Note that we treat symlinks a little bit specially, by creating symlinks
to the factory defaults rather than copying them.
Finally, /var at build time is a symlink, but at runtime, it must be a
directory (so we can mount the tmpfs over there). We can't change that
as a target-finalize hook, because:
- some packages may want to set ownership and/or access rights on
files or directories in /var, and that only happens while assembling
the filesystem images; changing /var from a symlink to a (then
empty) directory would break this;
- /var would be a directory on sub-sequent builds (until the next
"make clean").
Instead, we use the newly-introduce pre- and post-rootfs command hooks,
to turn /var into a directory before assembling the image, and back to a
symlink after assembling the image.
[*] People who want the factory-defaults only on first boot will have
to tweak the fstab to mount something else than a tmpfs on /var.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Currently, we use the same skeleton for sysv-like init systems and
systemd, even though systemd has some peculiarities that makes our
default skeleton unfit.
So, we'll need to provide different skeletons (really, only part of
it) for sysv-like and systemd. In addition, in order to support the
"no init system" (BR2_INIT_NONE) use case, we introduce a "none"
skeleton.
Introduce three new skeleton packages, aptly named skeleton-sysv,
skeleton-systemd and skeleton-none. All three are providers of the
skeleton virtual package, in lieu of the skeleton-common package,
which is now a simple dependency of all three new skeletons.
Those packages are empty for now. In followup changes:
- sysv-specific stuff will be moved out of skeleton-common and into
skeleton-sysv;
- systemd-specific stuff will be added to skeleton-systemd.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Arnout:
- merge with the patch that enables the BR2_INIT_NONE case
- simplify the BR2_PACKAGE_SKELETON_COMMON_ONLY select logic]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas:
- remove the BR2_PACKAGE_SKELETON_COMMON_ONLY logic, and instead
introduce a separate skeleton-none package for the BR2_INIT_NONE]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
We now have two packages that can act as a skeleton, skeleton-common,
also known as our default skeleton, and skeleton-custom.
This means that the skeleton package can be a standard virtual package
now.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Move all the handling of the default skeleton into a new package,
skeleton-common.
We don't name it skeleton-default, because it will be further split
later, into a skeleton for sysv and another for systemd, with some parts
still common between the two. So just name it skeleton-common right now;
this will save us a rename later.
While we're at it, also assign to SKELETON_COMMON_TARGET_FINALIZE_HOOKS
instead of directly to the global FINALIZE_HOOKS. Therefore, we don't
need to do all of that in a condition BR2_PACKAGE_SKELETON_COMMON==y.
Note: it would be technically sound to move the skeleton files together
within a sub-directory of the skeleton-common package. However, we refer
the user to those files, from various locations (manual, packages). It
will indeed be easier for the user to find those files in
system/skeleton/ rather than in package/skeleton-common/skeleton/
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Arnout: remove the mkdir $(STAGING_DIR)/usr/include which was removed
in skeleton.mk in master.]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
For the custom skeleton, we practicaly do nothing, except ensure it
contains the basic, required directories, and that those are properly
setup wrt. merged /usr.
Furthermore, our current skeleton is not fit for systemd, and we'll
have to split things out into various skeletons.
So, off-load the custom skeleton into its own package.
Thus, the existing skeleton package is now limited to:
- when using our default skeleton, install and tweak it properly;
- when using a custom skeleton, do nothing except for depending on
the skeleton-custom package.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Arnout: split off in a separate patch doing only this]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Our current skeleton is tailored to sysv-like init systems; it is not
fit for systemd-based systems. So, in upcoming changes, we'll add
another skeleton for systemd.
This means we can no longer have the current skeleton default to 'y', or
it would be enabled also for systemd, which would be incorrect.
So, we remove the default to 'y' but have it selected by the default
skeleton choice.
However, we do not yet have a way to directly build (really, install)
the custom skeleton, it is built (really, installed) as a dependency of
the default skeleton. So we must also forcibly select the default
skeleton when using a custom one.
Until we have the means to do only one or the other; i.e. when we have a
virtual skeleton.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Setting the root pasword is done in a target-finalize hook, so we do not
need to enforce a dependency from the skeleton onto host-mkpasswd.
Dropping that dependency will simplify making skeleton a virtual
package (in up-coming changes).
Instead, it is now selected as any other package. As such, it is
guaranteed to be built before target-finalize.
This however introduces a slight change in behaviour: previously,
host-mkpasswd would only be built if we needed to hash the root password
from its plain-text value. Now, host-mkpasswd is always built as soon as
the root password is non-empty, even if already pre-hashed.
Since host-mkpasswd is a really tiny weeny package bundled in Buildroot,
with only two C files, built as a single unit with a single gcc call,
the overhead is really minimal. Compared to the simplifications this
will allow in the skeleton packages (plural: common, sysv, systemd,
custom) to come, this overhead is acceptable.
Yet another simplification, even if small, to ease providing multiple
skeletons.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Until now, the option BR2_ENABLE_LOCALE was more-or-less controlling
whether NLS support was enabled in packages. More precisely, if
BR2_ENABLE_LOCALE=y, we were not doing anything (so some packages
could have NLS support enabled, some not). And only when
BR2_ENABLE_LOCALE was disabled we were explicitly passing
--disable-nls to packages.
This doesn't make much sense, and there is no reason to tie NLS
support to locale support. You may want locale support, but not
necessarily NLS support. Therefore, this commit introduces
BR2_SYSTEM_ENABLE_NLS, which allows to enable/disable NLS support
globally. When this option is enabled, we pass --enable-nls to
packages, otherwise we pass --disable-nls.
In addition, when this option is enabled and the C library doesn't
provide a full-blown implementation of gettext, we select the gettext
package, which will provide the full blown implementation.
It is worth mentioning that this commit has a visible impact for users:
- Prior to this commit, as soon as BR2_ENABLE_LOCALE=y, packages
*could* provide NLS support. It was up to each package to decide
whether they wanted to provide NLS support or not (we were not
passing --enable-nls nor --disable-nls).
- After this commit, it's BR2_SYSTEM_ENABLE_NLS that controls whether
NLS is enabled or disabled, and this option is disabled by default.
Bottom line: with the default of BR2_SYSTEM_ENABLE_NLS disabled, some
packages may lose NLS support that they used to provide. But we
believe it's a reasonable default behavior for Buildroot, where
generally NLS support is not necessary.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Even though no timezone implicitly means UTC, systemd is not all that
happy when it does not have a timezone set. This is all fine on a RW
filesystem because systemd will create a symlink on its own (to
Etc/UTC), but not so much on a RO filesystem, causing all kind of
issues at boot time (up to the point that the system is unusable).
We fix that by requiring that the timezone is actually set. The check is
done by verifying that the timezone file is an actual file; if not set,
the test would find a directory and would thus fail.
Update the help entry accordingly.
Also fix indentation in tzdata.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Richard Braun <rbraun@sceen.net>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Martin Bark <martin@barkynet.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The BR2_SYSTEM_BIN_SH hidden option defines to what binary the /bin/sh
symlinks should point to. If busybox is chosen, then /bin/sh is created
to point to /bin/busybox.
This works fine with the default installation mode of Busybox, but it
fails with the upcoming "individual binaries" mode, in which each applet
is installed as its own binary, and /bin/busybox doesn't exist: we get
/bin/sh as a broken symlink to /bin/busybox.
Since Busybox already installs its own /bin/sh symlink, properly
pointing to /bin/ash or /bin/hush depending on the selected shell, it
doesn't make sense for the BR2_SYSTEM_BIN_SH logic to override
this. Just let Busybox install its own /bin/sh by making
BR2_SYSTEM_BIN_SH empty when Busybox shell is selected as /bin/sh.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Allow automatic network configuration via systemd-networkd if selected.
If systemd-networkd is enabled and $BR2_SYSTEM_DHCP is set, then create
a .network file to configure the selected network interface via DHCP.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
[Thomas:
- merge the two patches from Eric into just one
- instead of generating the dhcp.network file completely from the .mk
file, use a template file, and "sed" it with the right network
interface]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Commit 006a328ad6 ("util-linux: fix build with ncurses") removed
dependency on BR2_USE_WCHAR, but failed to update the reverse
dependencies of util-linux.
This commit updates comments in Config.in for BR2_USE_WCHAR for reverse
dependencies of util-linux which directly uses wchar now or when it is
pulled from other dependencies.
eudev doesn't use wchar directly, but needs C99 compiler. Autotools
generate code with wchar_t for checking C99 compiler.
Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Don't force remounting / read/write when using a customskeleton and
systemd as init system, to fix the following unmet dependencies:
warning: (BR2_INIT_SYSTEMD) selects BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
which has unmet direct dependencies (BR2_ROOTFS_SKELETON_DEFAULT)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
It uses spawn() and thus fork(), so it needs an MMU.
Fixes a build issue reported on IRC for a cortex-m4 build:
http://pastebin.com/dGCsy0sr
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Currently, we limit installing zoneinfo to non-musl toolchain, by lack
of knowledge on how it would work on musl.
Turns out that musl uses the same zoneinfo format as glibc does.
Make it possible to install the TZ info whatever the C library; for
musl, use tzdata as for glibc.
Thanks Rich! ;-)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Rich Felker <dalias@aerifal.cx>
Cc: Marc Khouri <marc@khouri.ca>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The options to purge locales and to generate locale data are currently
located in the toolchain menu. However, these options are not really
related to the toolchain per-se, they are more system-level
configuration options, much like the timezone selection option we
already have in the "System configuration" menu.
Therefore, it makes more sense to have the locale-related options in
the "System configuration" menu as well.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
We expect the custom skeleton to be fully filled with the necessary
files, now. There is definitely no reason we should handle setting the
hostname and the issue file in there. A user using a custom skeleton
should be fully responsible for providing a functional skeleton.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
We expect the custom skeleton to be fully filled with the necessary
files, now. There is definitely no reason we should handle network
settings in there. A user using a custom skeleton should be fully
responsible for providing a functional skeleton.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
In the following commits, we'll be switching more options to be
conditional on the default or custom skeleton.
So, it makes sense that those options come after the choice of a
skeleton.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Being custom means that our default one is not suitable to start with.
So there is no reason to offer it as the default path.
Add a check that it is not empty.
Add a separating empty line, for good measure, too.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@openwide.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Supporting a R/O rootfs needs a bit more love to be fully operational.
This will come in later patches...
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Some users have the need to be able to tweak the content of the target
rootfs with root-like rights, that is, from inside the fakeroot script.
Add a new system option to allow those users to provide a list of
scripts, like the post-build and post-image scripts, that will be run
from our fakeroot script.
[Peter: pass TARGET_DIR to scripts, tweak help text]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Cam Hutchison <camh@xdna.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Add the support of capability to makedevs as extended attribute.
Now, it's possible to add a line "|xattr <capability>" after a
file description to also add a capability to this file. It's
possible to add severals capabilities with severals lines.
[Peter: extend doc, reword Config.in, extend error message,
use HOST_MAKEDEVS_CFLAGS/LDFLAGS for all flags]
Signed-off-by: Philippe Reynes <philippe.reynes@sagemcom.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Following the removal of eglibc support, this commit replaces all
occurences of "(e)glibc" by just "glibc". Most of the occurences are in
package Config.in comments.
In addition, when the form "an (e)glibc ..." was used, it is replaced by
"a glibc ...".
[Peter: add new efi* packages, s/uclibc/uClibc as suggested by Romain,
systemd / liquid-dsp tweaks as suggested by Yann]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
It can be a little bit misleading to have no init system...
Add a comment that states the user has to provide his own init system,
either via a package or a rootfs overlay.
It is expected that such a user will know what to provide, so we don't
really need to specify that it should be /init or /sbin/init or any
arbitrary executable pointed to by the kernel command line "init=..."
or anything else...
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
With systemd and a custom skeleton, we end up with the following warning:
warning: (BR2_INIT_SYSTEMD) selects BR2_ROOTFS_MERGED_USR which has
unmet direct dependencies (BR2_ROOTFS_SKELETON_DEFAULT)
Which makes sense as the logic to install the symlinks to /usr is part of
the default skeleton handling, but the BR2_ROOTFS_MERGED_USR symbol is ALSO
used by packages to activate various workarounds for a merged /usr, so it
should be always active when using systemd even with a custom rootfs
skeleton (that by definition must use a merged /usr as required by systemd).
So introduce a dummy symbol with the same name for the custom skeleton case,
similar to how we handle the BR2_PACKAGE_BUSYBOX_SHOW_OTHERS option.
This is a hidden option so it can only be activated by enabling systemd (and
not if people just want to use a merged /usr with a custom skeleton but not
systemd), but as this is really a legacy option that is probably good enough
(if not, patches are welcome!).
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This reverts commit b4718c3a28.
The BR2_ROOTFS_MERGED_USR symbol is used to activate various workarounds for
a merged /usr by packages, so it should be active even with a custom rootfs
skeleton.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
With systemd and a custom skeleton, you end up with the following
warning:
warning: (BR2_INIT_SYSTEMD) selects BR2_ROOTFS_MERGED_USR which has
unmet direct dependencies (BR2_ROOTFS_SKELETON_DEFAULT)
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
systemd is increasingly expecting things to live in /usr/bin, /usr/sbin
or /usr/lib nad not in /bin, /sbin or /lib. It has inherited those
expectations from a Fedora change:
https://fedoraproject.org/wiki/Features/UsrMove
Note however, that systemd does support /usr being on a separate
filesystem; it just expects an initramfs to mount it before the final
switchroot over to the actual rootfs.
But the traditional use-case for Buildroot is not to boot with an
initramfs; although that is totally feasible, that's probably not what
is commonly done in the vast majority of cases.
However, a lot of packages still install stuff directly into /bin,
/sbin or /lib, which systemd may need early-on in the boot process,
even before it may have a chance to mount /usr. Even though we can
tell systemd, at configure-time, where it should expect programs to
be at runtime, it does not make sense to go head-first against an
upstream wa^Hill.
Add an option so that /bin, /sbin and /lib be symlinks to /usr/bin
and /usr/sbin. That option is forcibly enabled when the init system
is systemd.
Note: we need not handle /lib32 or /lib64, as they already are symlinks
to /lib, which means they will automatically be redirected to /usr/lib,
as /usr/lib32 and /usr/lib64 already are.
Furthermore, this means we're no longer supporting a split-usr setup, so
the corresponding configure options have been removed as well for
systemd and, when using a merged /usr, for eudev as well.
In Buildroot, we decided (with this patch) not to support a split-usr
when systemd is used as an init system. This is a design decision, not
a systemd issue. Thus the select is with BR2_INIT_SYSTEMD rather than
with BR2_PACKAGE_SYSTEMD.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Mike Williams <mike@mikebwilliams.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Tested-by: Mike Williams <mike@mikebwilliams.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The "Dynamic using mdev" and "Dynamic using eudev" /dev management
methods are using devtmpfs, just like "Dynamic using devtmpfs only",
on top of which they add either mdev or eudev. But their names might
suggest they use mdev only or eudev only.
Clarify their descriptions by adding "devtmpfs +" to make it
unambiguous.
[Thomas: rewrap the paragraphs in the manual. It makes the diff a lot
less readable, but we actually want the result to be wrapped.]
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Making the getty option a menuconfig instead of a simple config
automatically moves its dependees into a menu without the need to
manually declare such a menu.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The comment line that explains that systemd needs a glibc toolchain and
kernel headers >= 3.10 doesn't fit in the dialog box, which makes it
look as if headers >= 3.1 are needed.
Abbreviate the comment a little by removing an 'an'. It still doesn't
fit completely (only one trailing * is shown), but at least it's
readable.
While we're at it, change the quoting style to " like we always use.
Reported-by: eschu on IRC
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The folder init.d is currently installed by default since it's part of
our skeleton.
This patch creates a package out of it and make busybox/sysvinit depends
on it.
This way, if you chose another init, you don't end up with a useless
init.d folder.
[Thomas:
- make the initscripts package selectable via a hidden bool
- remove some unneeded changes in sysvinit.mk.]
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Currently, there are only two possibilities regarding the root account:
- it is enabled with no password (the default)
- it is enabled, using a clear-text, user-provided password
This is deemed insufficient in many cases, especially when the .config
file has to be published (e.g. for the GPL compliance, or any other
reason.).
Fix that in two ways:
- add a boolean option that allows/disallows root login altogether,
which defaults to 'y' to keep backward compatibility;
- accept already-encoded passwords, which we recognise as starting
with either of $1$, $5$ or $6$ (resp. for md5, sha256 or sha512).
Signed-off-by: Lorenzo M. Catucci <lorenzo@sancho.ccd.uniroma2.it>
[yann.morin.1998@free.fr:
- don't add a choice to select between clear-text/encoded password,
use a single prompt;
- differentiate in the password hook itself;
- rewrite parts of the help entry;
- rewrite and expand the commit log
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: "Lorenzo M. Catucci" <lorenzo@sancho.ccd.uniroma2.it>
Acked-by: "Lorenzo M. Catucci" <lorenzo@sancho.ccd.uniroma2.it>
Tested-by: Gergely Imreh <imrehg@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The symlink created by buildroot for /bin/sh is the full path to
a shell. This does not match what busybox and other Linux
distributions do with using relative path symlinks. When handling
files on the host system this will point to the host system's shell
if present and not the target shell.
This is fixed by changing the /bin/sh symlink to use a relative path.
Fixes#8161.
[Thomas: minor fixups to the commit log suggested by Yann E. Morin.]
Signed-off-by: Matthew Starr <mstarr@hedonline.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The option is a non-option now and will be removed.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
DES is long dead, it is insecure as hell, and virtually all known
crypt(3) implementations now all support at least md5.
Besides, the character-space of DES-encoded passwords are a sub-set
of the character-space for a clear-text password, so we can't easily
differentiate between the two. Since we're going to change the root
password prompt to support setting encoded passwords (as well as
clear-text passwords), we can't keep DES or we'd be unable to decide
whether we'd need to encode the password or not.
Remove DES encoding altogether (and add a legacy entry). The default is
still md5, and thus there's no backward-compatibility 'select' to add.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Lorenzo Catucci <lorenzo@sancho.ccd.uniroma2.it>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Drop the buildroot toolchain non-largefile support option since it's
being removed.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Thomas:
- indicate upstream commit id, as suggested by Baruch.
- add SoB of Alexey inside the patch itself.
- adjust sequence number to 0003.]
Signed-off-by: Alexey Mednyy <swexru@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This patch sets the default timezone to UTC if not overwritten.
Some packages need a configured system timezone for properly
operating like mono based software.
Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This patch allows the setup of simple a single interface to be
automatically brought up and configured via DHCP on system startup.
The interface name can be set via a configuration option. This patch
does not support systemd-networkd, any complex network configuration should
be done via overlay of /etc/network/interfaces or the relevant networkd
configuration file
[Peter: rename to BR2_SYSTEM_DHCP, tweak help text & implementation]
Signed-off-by: Jérémy Rosen <jeremy.rosen@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
The configure script checks for linux/btrfs.h which is only available since
3.9 (55e301fd57a6239ec: Btrfs: move fs/btrfs/ioctl.h to
include/uapi/linux/btrfs.h).
It now also uses static_assert which is only available since GCC 4.6, so
handle it as well in the legacy patch.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
We used to specify explicitly serial port with all its settings
for init to instantiate getty.
This limits usecases when the same one rootfs could be used.
For example following cases won't work well with hardcoded
serial console settings:
* On the same board other serial port is expected to be used
* The same rootfs is intended to be used on different boards with
different serial ports (like ttySx vs ttyAMAx or even ttyx)
With this change by default we rely on "console" specified in
kernel's boot command line.
What is important getty will be set on the last console
specified in bootargs.
For example is a kernel comand line:
--->---
bootargs="... console=tty0 console=ttyS3,115200n8..."
--->---
This now will instantiate serial console on ttyS3 but not on tty0.
Tested with both Busybox and SysV init.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Since a while, the semantic of BR2_PREFER_STATIC_LIB has been changed
from "prefer static libraries when possible" to "use only static
libraries". The former semantic didn't make much sense, since the user
had absolutely no control/idea of which package would use static
libraries, and which packages would not. Therefore, for quite some
time, we have been starting to enforce that BR2_PREFER_STATIC_LIB
should really build everything with static libraries.
As a consequence, this patch renames BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS, and adjust the Config.in option accordingly.
This also helps preparing the addition of other options to select
shared, shared+static or just static.
Note that we have verified that this commit can be reproduced by
simply doing a global rename of BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS plus adding BR2_PREFER_STATIC_LIB to Config.in.legacy.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
The kernel headers minimum version for systemd was bumped to 3.8
(IFLA_GRE_FLOWINFO and IFLA_IPTUN_FLAGS definitions) and then to 3.10
(IFLA_VLAN_PROTOCOL definition). However, systemd since version v215
contains the following patch that defines IFLA_* constants if
needed:
81577dc missing.h: add various network enums
http://cgit.freedesktop.org/systemd/systemd/commit/?id=81577dc
As a consequence, this patch downgrades the kernel headers minimum
version to linux 3.7 which is required for BPF_XOR.
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Not all our shells do install a pointer to /bin/sh. Besides, between
those that do and multiple ones are enabled, the last one to install
wins the the symlink.
Add a new config choice in the system sub-menu that allows the user to
explicitly select the shell to provide /bin/sh. If busybox is not
enabled, default to using dash, a POSIX shell.
Remove the symlink creation from bash.mk at the same time.
Note: for every shell, we select them, except busybox, on which we
depend, on the assumption that we do not want to force busybox in case
the user decided not to enable it.
[Peter: remove redundant !BR2_PACKAGE_BUSYBOX dependency]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>