Ioan-Adrian Ratiu 4f5837147a mount: don't call realpath on root target
Musl libc realpath implementation calls readlink on a procfs
path it computes via __procfdname (code at [1] & [2]).

This is problematic if ubase mount is used in a PID 1 because procfs
is not mounted and the kernel passes the rootfs mounted read-only, so
the first step is to read-write remount the rootfs, which can't be
done because procfs is not mounted. Thus we are in a dependency cycle:
procfs can't be mounted because the root is read-only and so on.

To break this cycle, don't call readlink on "/" (it doesn't really make
sense anyway) so the rootfs can be remounted read-write, after which
proc itself can be mounted and the rest of mount calls will succeed
so systems running ubase + musl can succesfully boot into userspace.

[1] https://git.musl-libc.org/cgit/musl/tree/src/misc/realpath.c?h=v1.1.19
[2] https://git.musl-libc.org/cgit/musl/tree/src/internal/procfdname.c?h=v1.1.19

Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
2018-06-30 17:38:07 +01:00
2015-09-07 11:47:10 +01:00
2016-02-22 14:36:21 +00:00
2015-09-07 11:47:10 +01:00
2015-09-07 11:47:10 +01:00
2015-09-07 11:47:10 +01:00
2015-09-07 11:47:10 +01:00
2014-10-16 11:28:01 +01:00
2015-09-03 19:57:21 +01:00
2015-09-07 12:09:59 +01:00
2015-09-07 12:09:59 +01:00
2016-03-16 10:17:51 +00:00
2017-10-10 16:28:15 +01:00
2016-02-16 15:20:10 +00:00
2015-02-06 15:16:24 +00:00
2015-09-09 23:33:17 +01:00
2015-09-09 23:33:17 +01:00
2015-09-14 10:15:55 +01:00
2015-09-14 10:15:55 +01:00
2015-02-06 15:16:24 +00:00
2015-02-06 15:16:24 +00:00
2014-10-02 23:47:39 +01:00
2015-02-06 15:16:24 +00:00
2015-04-26 10:40:09 +01:00
2015-04-26 10:40:09 +01:00
2014-10-02 23:47:39 +01:00
2018-06-30 17:31:53 +01:00
2015-02-20 15:36:33 +00:00
2014-10-02 23:47:39 +01:00
2016-02-11 10:16:41 +00:00
2015-02-06 15:16:24 +00:00
2014-10-02 23:47:39 +01:00
2015-03-11 15:18:10 +00:00
2016-04-20 23:08:51 +01:00
2014-11-30 13:12:33 +00:00
2015-02-06 15:16:24 +00:00
2014-11-30 12:34:26 +00:00
2015-05-11 23:35:54 +01:00
2016-03-26 19:08:10 +00:00
2016-03-26 19:08:10 +00:00
2014-10-02 23:47:39 +01:00
2014-07-14 11:14:36 +01:00
2014-10-02 23:47:39 +01:00
2013-08-16 16:42:59 +01:00
2018-06-30 17:27:45 +01:00
2016-04-20 23:08:51 +01:00
2016-04-20 23:08:51 +01:00
2014-10-02 23:47:39 +01:00
2015-03-03 13:32:43 +00:00
2013-08-19 16:34:18 +01:00
2014-10-02 23:47:39 +01:00
2014-06-03 15:15:21 +01:00
2015-02-06 15:16:24 +00:00
2015-02-06 15:16:24 +00:00
2014-10-02 23:47:39 +01:00
2014-07-10 22:04:06 +01:00
2016-04-20 23:08:51 +01:00
2014-10-02 23:47:39 +01:00
2015-02-06 15:16:24 +00:00
2014-10-02 23:47:39 +01:00
2015-09-14 10:15:55 +01:00
2015-02-06 15:16:23 +00:00
2015-02-06 15:16:23 +00:00

ubase - suckless linux base utils
=================================

ubase is  a collection of  tools similar  in spirit to  util-linux but
much simpler.

The complement  of ubase  is sbase[1] which  mostly follows  POSIX and
provides all the portable tools.  Together they are intended to form a
base system similar to busybox but much smaller and suckless.

Building
--------

To  build ubase,  simply  type  make.  You  may  have  to fiddle  with
config.mk and config.h depending on your system.

You  can  also  build  ubase-box,  which  generates  a  single  binary
containing  all  the  required  tools.    You  can  then  symlink  the
individual tools to ubase-box or run: make ubase-box-install.

To run the tools for ubase-box directly use: ubase-box cmd [args]

Ideally you will  want to statically link ubase.   We highly recommend
using musl-libc[2].

ubase is known to compile with gcc, clang and tcc.

[1] http://git.suckless.org/sbase/
[2] http://www.musl-libc.org/
Description
No description provided
Readme MIT 495 KiB
Languages
C 80.3%
Roff 16%
Makefile 3.7%