Commit Graph

129 Commits

Author SHA1 Message Date
Nicolas Cavallari
670fa0c96f skeleton: Rename /etc/profile.d/umask to umask.sh
/etc/profile only sources files that matches the /etc/profile.d/*.sh
pattern, so /etc/profile.d/umask was never sourced.

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-02-10 07:49:04 +01:00
Thomas Petazzoni
9c40723489 Makefile: drop ldconfig handling
The ldconfig handling in the main Makefile is utterly broken, as it
calls the build machine ldconfig to generate the ld.so.cache of the
target. Unfortunately, the format of the ld.so.cache is architecture
specific, and therefore the build machine ldconfig cannot be used
as-is.

This patch therefore simply drops using ldconfig entirely, and removes
/etc/ld.so.conf.d/ from the target skeleton. The idea is that all
libraries that should be loaded by the dynamic linker must be
installed in paths where the dynamic linker searches them by default
(typically /lib or /usr/lib).

This might potentially break a few packages, but the only way to know
is to actually stop handling ldconfig.

In order to be notified of such cases, we add a check in
target-finalize to verify that there is no /etc/ld.so.conf file as
well as no /etc/ld.so.conf.d directory.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-01-03 21:46:07 +01:00
Peter Korsgaard
cc257ee493 Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-12-01 23:24:07 +01:00
Jérôme Pouiller
5583d2dbfc readline: install configuration file from package recipe
/etc/inputrc is configuration file for readline. However, until now, it
was provided by skeleton. This patch install /etc/inputrc from readline
recipe.

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-11-17 22:19:15 +01:00
Jérôme Pouiller
29d1f8d1b6 skeleton: remove unused /etc/issue
/etc/issue is managed with BR2_TARGET_GENERIC_ISSUE. In case
BR2_TARGET_GENERIC_ISSUE is set (which is default), /etc/issue
is overwritten. In case BR2_TARGET_GENERIC_ISSUE is not set,
we don't want /etc/issue exist.

Finaly, remove /etc/issue from skeleton.

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Reviewed-by: "Maxime Hadjinlian" <maxime.hadjinlian@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-11-17 21:59:31 +01:00
Peter Korsgaard
29206817d0 system: Fix warning when selecting systemd and ensure merged /usr workarounds are enabled
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>
2015-11-09 21:48:10 +01:00
Peter Korsgaard
adcc48e0b2 Revert "system: Fix warning when selecting systemd"
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>
2015-11-09 21:40:32 +01:00
Maxime Hadjinlian
b4718c3a28 system: Fix warning when selecting systemd
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>
2015-11-08 14:58:05 +01:00
Jérôme Pouiller
ccc52c8183 skeleton: optionally wait for network interfaces to appear
This patch has same purpose than 49964858f4:

  On some machines, the network interface is slow to appear. For example,
  on the Raspberry Pi, the network interface eth0 is an ethernet-over-USB,
  and our standard boot process is too fast, so our network startup script
  is called before the USB bus is compeltely enumerated, thus it can't
  configure eth0.

  Closes #8116.

However, wait-delay hook is enabled only if wait-delay property appears
in /etc/network/interfaces. This patch enable it automaticaly when
interface is configured through DHCP at bootup. But, if user choose
to write /etc/network/interface himself, he have to explicitly
set wait-delay.

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-11-02 16:51:47 +01:00
Jérôme Pouiller
78521ca8bd skeleton: add "operator" group
gid 37 was referenced in /etc/passwd but not in /etc/group

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-28 23:34:16 +01:00
Jérôme Pouiller
0110ffe7b5 skeleton: sync /etc/shadow with /etc/passwd
Synchronize /etc/shadow with /etc/passwd:
  - remove "halt" and "uucp"
  - add "sys", "mail" and "www-data"

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-28 23:33:14 +01:00
Thomas Petazzoni
514411bb9b system/skeleton: finalize removal of ftp user
In commit 3dde19e5f3, the ftp user was
removed from /etc/passwd, /etc/group and /home in the skeleton, but
the corresponding entry was not removed from /etc/shadow. This commit
fixes that.

Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-18 17:56:14 +02:00
Yann E. MORIN
c5bd8af65e system: add options for /bin /sbin and /lib to be symlinks into /usr
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>
2015-10-14 22:50:03 +02:00
Maxime Hadjinlian
3dde19e5f3 skeleton: Remove ftp user and /home/ftp
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-10 19:32:14 +02:00
Maxime Hadjinlian
a92b886a03 skeleton: Pretty fixes for /etc/profile
Fix indent and put PATH on a single line.

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-04 15:53:07 +01:00
Maxime Hadjinlian
8ae4a168de skeleton: Remove bash specific files
Signed-off-by Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-04 15:53:01 +01:00
Maxime Hadjinlian
f93c692c04 skeleton: Clean up profile file
There's a lot of code in /etc/profile, which doesn't really belong in a
minimal default skeleton.

Also, add an 'unset i' to avoid clutter.

If the user has a specific needs, it needs to be added in
/etc/profile.d/ by a post-build script.

Signed-off-by Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-04 15:52:53 +01:00
Luca Ceresoli
571552c468 system: clarify /dev management using devtmpfs + {mdev, eudev}
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>
2015-10-04 11:23:14 +01:00
Luca Ceresoli
bfd969d29f skeleton: fix absence of /dev/shm on static, read-only systems
/dev/shm is needed for systems using shared memory. On init-based systems
this directory is usually created in the inittab along with /dev/pts, by
the lines:

package/busybox/inittab:
  ::sysinit:/bin/mkdir -p /dev/pts
  ::sysinit:/bin/mkdir -p /dev/shm

package/sysvinit/inittab:
  si2::sysinit:/bin/mkdir -p /dev/pts
  si3::sysinit:/bin/mkdir -p /dev/shm

However this is broken when static /dev management is selected and the root
filesystem is read-only, showing during boot the error:

  mkdir: can't create directory '/dev/shm': Read-only file system

Fix it by creating the empty /dev/shm directory, just like /dev/pts.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-03 15:34:28 +02:00
Yann E. MORIN
6fc7976252 system: use a menuconfig for the getty options
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>
2015-10-03 14:25:52 +02:00
Arnout Vandecappelle
b287378d3c system: make systemd's kernel headers comment fit
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>
2015-09-10 22:06:55 +02:00
Maxime Hadjinlian
7a6b83a211 skeleton: New package
Create a proper package for the skeleton.

The main Makefile is modified to remove the skeleton support.
The 'dirs' target, will create the $(TARGET_DIR).
The file 'output/target/.root' doesn't exists anymore, as there's no
Make rule to statisfy.

The infrastructure are modified to filter host-skeleton.
It's needed becauses the host-dependencies are derived from the
dependencies of the target package where 'host-' is preprended to the
depedency name.

In the pkg-generic we add skeleton as a dependency to every package.

The whole system/system.mk is now removed at the profit of
package/skeleton/skeleton.mk

[Thomas:
  - rebase on top of master and fix some minor conflicts
  - remove the 'select BR2_PACKAGE_SKELETON' in
    BR2_ROOTFS_SKELETON_DEFAULT and BR2_ROOTFS_SKELETON_CUSTOM, since
    anyway the skeleton package is always enabled.
  - fixup a few mistakes in the getty handling due to misnamed
    variables.]

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-14 18:08:23 +02:00
Thomas Petazzoni
ddc63be529 system: fix BR2_INIT_NONE / BR2_INIT_SYSTEMD build
Following the introduction of the initscripts package in commit
89d39fc7a3 ("initscripts: new package"),
the /etc/inittab file is no longer part of the skeleton, and therefore
is not always installed.

However, system/system.mk tweaks the inittab for getty and filesystem
remount as rw, without taking the precautions of whether the init
system is Busybox or SysV. This commit fixes that by adding the
necessary conditions around the code adjusting the inittab file.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-14 10:13:18 +02:00
Maxime Hadjinlian
89d39fc7a3 initscripts: new package
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>
2015-07-14 01:51:52 +02:00
Maxim Mikityanskiy
d3c8da4dd4 skeleton: apply locale settings in user shells
Add /etc/profile.d/locale.sh script from Arch Linux to /etc/profile.
This script looks for locale.conf, sources it, and exports the LANG and
LC_* variables.

[Arnout: put in /etc/profile in the skeleton rather than making it
 systemd specific.]

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-13 22:35:59 +02:00
Yann E. MORIN
c1c7e8b788 core/skeleton: drop /etc/securetty
securetty is supposed to restrict the terminals root is allowed to
login from. As it happens, login from busybox (w/ securetty support)
is actually enforcing use of securetty, while login from util-linux
is completely ignoring securetty altogether.

Remove securetty from our skeleton altogether and stop worrying about
it.

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: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-07-13 13:00:50 +02:00
Peter Korsgaard
2b47c7f095 system/device_table.txt: /etc/random-seed is no more
So don't try to set the permissions of it.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-07-09 08:37:10 +02:00
Baruch Siach
f33f766860 system/skeleton: don't use random-seed from a read-only fs
A random-seed from a read-only filesystem is useless.

Also, drop the check for /etc/random-seed existence; it must exist after a
touch.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-07-08 23:52:48 +02:00
Baruch Siach
ed0b44fdce system/skeleton: remove random-seed
Seeding the entropy pool with a known seed makes more harm than good. This is
especially bad for when /etc is not on a persistent writable storage, so the
entropy pool is seeded with the same value on every boot. Just drop it.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-07-08 23:52:32 +02:00
Lorenzo Catucci
18fa4a32a6 system: allow/disallow root login, accept encoded passwords
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>
2015-07-04 12:46:43 +02:00
Peter Korsgaard
cb80683cb2 system/device_table.txt: drop unused ifupdown post-up.d / pre-down.d directories
These are not used by the busybox or Debian ifupdown implementation. Instead
if-up.d is run after the per-interface up tasks (E.G. post-up) and
if-down.d is run before the per-interface down tasks (E.G. pre-down).

So drop them as they only cause confusion.

grep execute_all output/build/busybox-1.23.2/networking/ifupdown.c
static int execute_all(struct interface_defn_t *ifd, const char *opt)
        if (!execute_all(iface, "pre-up")) return 0;
        if (!execute_all(iface, "up")) return 0;
        if (!execute_all(iface, "down")) return 0;
        if (!execute_all(iface, "post-down")) return 0;

grep execute_script output/build/ifupdown-0.7.49/execute.c
int execute_scripts(interface_defn * ifd, execfn * exec, char *opt)
    if (!execute_scripts(iface, doit, "pre-up"))
    if (!execute_scripts(iface, doit, "up"))
    if (!execute_scripts(iface, doit, "down"))
    if (!execute_scripts(iface, doit, "post-down"))

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-06-25 15:28:06 +02:00
Matthew Starr
e26ec6e45c system: make /bin/sh symlink use relative path
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>
2015-06-21 09:36:00 +02:00
Gustavo Zacarias
b7c6e6c1c1 system: drop IPv6 depend for systemd
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>
2015-04-22 22:59:42 +02:00
Bartosz Golaszewski
ab6b4c82f4 system/skeleton: fix /etc/group
When using busybox compiled from current git, login emits the following
message:

    login: /etc/group: bad record

Fix it by adding the missing colon to /etc/group in system/skeleton.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-04-21 15:36:56 +02:00
Thomas Petazzoni
8a58e0238e Makefile: rename TARGETS to PACKAGES
For clarity, this commit renames the TARGETS variable to the more
meaningful PACKAGES variable. Indeed, only packages (handled by one of
the package infrastructures) should be listed in this variable, and
not other random non-package targets.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2015-04-14 10:16:51 +02:00
Yann E. MORIN
029179615e system: remove DES password encoding
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>
2015-04-10 22:28:32 +02:00
Peter Korsgaard
5749d9a695 systemd: needs 3.10+ kernel headers
Fixes:
http://autobuild.buildroot.net/results/f51/f510014600bc7d1e3cf81ff53268d186c8b417b8/
http://autobuild.buildroot.net/results/278/278a60a1569eb57773945281b102a0495ff32775/
http://autobuild.buildroot.net/results/083/083f9579893185d93c591d171b39d8e068b21412/
http://autobuild.buildroot.net/results/03a/03a96697aa72b69546d61e56d1285bb50b0633d9/

And many more.

Systemd needs NDA_PORT/VNI/IFINDEX from linux/neighbour.h, which were added
in 3.10 (6681712d: vxlan: generalize forwarding tables).

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-04-05 11:22:44 +02:00
Gustavo Zacarias
93026a5770 system: drop largefile depends
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>
2015-04-01 22:44:06 +02:00
Alexey Mednyy
2676d7f80d eudev: fix dependency on kernel headers version
[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>
2015-03-09 14:04:52 +01:00
Angelo Compagnucci
0fa62b4ca5 system: Defaulting TZ_LOCALTIME to UTC
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>
2015-02-21 23:47:07 +01:00
Yann E. MORIN
c6f76ffea6 package/eudev: we won't miss you, avr32
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-14 17:46:35 +01:00
Thomas Petazzoni
c6ca6fc9a3 system/skeleton: fix the new /var/run symbolic link
Reported-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-03 17:09:34 +01:00
Gustavo Zacarias
d380dde1d2 skeleton: make /run a proper directory/filesystem
Making /var/run and /run symlinks to /tmp is bad since the underlying
tmpfs filesystem is mode 1777 which leads to possible security attack
vectors via badly owned/mask-mode pidfiles and state files residing there.

So make /run a proper directory with /var/run symlinked to it.
Eventually all startup scripts and state info should be pointed to /run
directly as per the linux fhs and good practice.

Add a tmpfs filesystem entry for /run so that busybox inittab, systemv
inittab and systemd automount mounts it there to avoid breaking the
system.

While at it fix inconsistent spacing in /etc/fstab by using tabs and
drop the "static file system information" header whatever that means.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-02-03 15:58:03 +01:00
Jeremy Rosen
f4f62a3c16 Allow a single DHCP configuration via the system configuration submenu
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>
2015-02-02 21:42:47 +01:00
Peter Korsgaard
14af550d5e eudev: really bump version
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>
2015-01-23 17:35:43 +01:00
Gustavo Zacarias
3a005f10e8 skeleton/S40network: tweak for debian ifupdown
Make the S40network script create the /run/network directory for the
debian variant of ifupdown which uses it as a lock directory.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Tested-by: Karoly Kasza <kaszak@gmail.com>
Reviewed-by: Karoly Kasza <kaszak@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-01-12 22:23:04 +01:00
Alexey Brodkin
131300e6f1 system: run getty on boot console by default
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>
2015-01-10 17:01:35 +01:00
Thomas Petazzoni
665e13c85e Rename BR2_PREFER_STATIC_LIB to BR2_STATIC_LIBS
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>
2014-12-11 22:48:13 +01:00
Gustavo Zacarias
87fd1bd5ce system/permissions: /etc/random-seed must be mode 600
Otherwise it's a big security risk.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-11-25 22:37:43 +01:00
Gustavo Zacarias
1dbb7e8a82 system/inittab: adjust shutdown
Drop null id since that means "don't show anything" for busybox init,
hence the shutdown sequence (/etc/init.d/rcK) doesn't show anything
giving the false impression that it's not being run.
If someone wants a really silent console they'll need to adjust much more than
this anyway.
Also swap the root read-only remount with swapoff since the swap can be
a regular (loop) file in the root filesystem and make the operation fail
resulting in a dirty filesystem.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-11-20 19:40:36 +01:00