aboutsummaryrefslogtreecommitdiff
path: root/package/skeleton-custom
Commit message (Collapse)AuthorAgeFilesLines
* skeleton-custom: install /bin, /lib, and /sbinGravatar Carlos Santos2019-02-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | skeleton-custom does not install the required /bin, /lib and /sbin directories (or symlinks), which may result in an imcomplete tree, The user could add the required directories/symlinks to the skeleton but they may be invalid, depending on the state of BR2_ROOTFS_MERGED_USR. Steps to reproduce: - Enable BR2_ROOTFS_MERGED_USR and BR2_INIT_SYSTEMD - Set BR2_ROOTFS_SKELETON_CUSTOM_PATH to "system/skeleton" - Run "make skeleton" - target/{bin.lib,sbin} will not exist Add calls to SYSTEM_USR_SYMLINKS_OR_DIRS to INSTALL_TARGET_CMDS and INSTALL_STAGING_CMDS, so the required directories or symlinks are created. Add a paragraph to the documentation clarifying that custom skeletons don't need to contain /bin, /lib or /sbin and must not contain them when BR2_ROOTFS_MERGED_USR is enabled. Signed-off-by: Carlos Santos <casantos@datacom.ind.br> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* skeleton-custom: use a script to check merged usr structureGravatar Carlos Santos2019-02-061-24/+2
| | | | | | | | | | | | | | | | | | | | Introduce support/scripts/check-merged-usr.sh, a script that check if a given path complies to the merged /usr requirements: / /bin -> usr/bin /lib -> usr/lib /sbin -> usr/sbin /usr/bin/ /usr/lib/ /usr/sbin/ Use this script in skeleton-custom.mk instead of a bunch of variables filled by $(shell ...) macros. The same script will be used to check rootfs overlays, in a forthcoming change. Signed-off-by: Carlos Santos <casantos@datacom.ind.br> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* Revert "package/skeleton-custom: also check for missing directories"Gravatar Yann E. MORIN2017-08-091-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit cf6d321e9d5c9dec63e42466fec4bf5de5853bd3. The underlying reason for doing the checks is to ensure that a merged-usr setting is properly enforced, even for custom skeletons. Before that patch, a custom skeleton where both /bin and /usr/bin were missing was accepted; but then the first package that intalled something in /bin would create it as a directory, thus breaking the merged-usr situation. Ditto sbin and lib, of course. cf6d321 was created to detect that situation, and the fix was to require that both directories do exist in the custom skeleton, so that we new the check for consistency were OK, in all cases. However, that broke existing skeletons which where missing both directories, and some people are shinning about it... The crux of the problem is that Buildroot should be responsible for creating the directories or the symliks when they are missing, and only fail if the existing ones are incorrect, but not impose the burden on the user. A situation where the problem arises is when a skeleton is shared between various builds, some using a merged-usr while other do not. We fix that by reverting the offending changes change, back to the previous behaviour. We keep the stderr redirection in stat calls, and the variable renaming. A proper fix to create the missing directories can be added later. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* package/skeleton: make it a virtual packageGravatar Yann E. MORIN2017-08-022-2/+6
| | | | | | | | | | | | 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>
* package/skeleton-custom: simplify target/staging installGravatar Yann E. MORIN2017-08-021-10/+7
| | | | | | | | | | | | | For target install, we don't need to check the merged-usr symlinks any more, it was already checked before. For staging, instead of creating directories, just copy the same skeleton, which was already checked to be correct. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Arnout: split off in a separate patch + wrote commit message] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/skeleton-custom: also check for missing directoriesGravatar Yann E. MORIN2017-08-021-11/+37
| | | | | | | | | | | | | | | | | | | | In addition to checking the symlinks in the merged usr case, also check whether /bin, /lib, /sbin and their /usr/... counterparts exist in the non-merged case. Missing directories are collected in the variable SKELETON_CUSTOM_MISSING_DIRS. For symmetry and because it's more logical, rename SKELETON_CUSTOM_NOT_MERGED_USR to SKELETON_CUSTOM_NOT_MERGED_USR_DIRS. When a directory is indeed missing, "stat" will print an error. Buildroot *also* prints an error, which is clearer. So remove the error from stat by redirecting it to /dev/null. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Arnout: split off in a separate patch + wrote commit message] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/skeleton-custom: rework the merged_usr and building conditionsGravatar Yann E. MORIN2017-08-021-7/+9
| | | | | | | | | | | | | | | | | skeleton-custom.mk contains a huge condition for BR_BUILDING and for BR2_ROOTFS_MERGED_USR. This makes the code difficult to follow, so rework the condition a bit so that only the parts that really need to be conditional are indeed conditional. Note that there is no overhead in needlessly evaluation the "stat" commands. Indeed, the assignments use late evaluation so the "stat" is only executed when evaluating the condition - when skeleton-custom is not selected, stat is never called. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> [Arnout: split off in a separate patch + wrote commit message] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/skeleton: split out into skeleton-customGravatar Yann E. MORIN2017-08-022-0/+84
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>