setup.py: fixing typo in Ubuntu packages list

Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-of-by: William Dauchy <william@gandi.net>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
setup.py: adding base support for debian

also update the base list package for debian jessie in README

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
epoll: Do not search again in EPOLLONESHOT case

The f_lock is not dropped. No need to searth the key in the map again.

Signed-off-by: Asias He <asias@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
epoll: Update comments in epoll::wait

To reflect the current locking scheme.

Signed-off-by: Asias He <asias@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
epoll: Fix clearing evt.events in EPOLLONESHOT case

In commit e8a60448031b07cf7ae9e71ce269ad6eea07c46e (epoll: Do not search
again in EPOLLONESHOT case), when we clear evt.events, we clear a local
copy instead of the one in the map. Fix by taking a reference of
epoll_event.

Passed scripts/run.py -e "/tests/tst-epoll.so" test.

Signed-off-by: Asias He <asias@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
scripts: clean leading whitespaces in python scripts

Signed-off-by: William Dauchy <william@gandi.net>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts: remove unused import

Signed-off-by: William Dauchy <william@gandi.net>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
libc: import getsrvbyname from musl

In conjunction with a module-provided /etc/services, allows programs to find out where
to register. MySQL needs it.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
build.mk: fix parallel build with libtools

In build.mk we have

tools/ifconfig/ifconfig.so: EXTRA_LIBS = -Ltools/ -ltools

This means libtools.so needs to exist before ifconfig.so is built.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
actually implement umask

The umask syscall is "implemented", in the sense that it exchanges a global
mask with a new value passed.

But that mask is not used anywhere, meaning that the system call doesn't have
any effect.

This patch properly implements it.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
cpiod: respect original mode of files

modes are usually not very interesting for us, so we have been able to live
without it just fine. When uploading files to the guest, we only set the type
bits, and left the rest blank.

However, there are some programs (like MySQL), that will conduct tests on the
permission flags of some of their configuration files. The poor guys don't know
they are running on OSv, and will therefore abort when seeing what they believe
to be a insecure setting.

After this patch, all the modes are respected, and if one needs to upload files
with specific modes, it's just a matter of guaranteeing that the host file is
set correctly.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
cpiod: fix broken build

While my latest cpiod patch worked well for the modules I have tried, it broke
some others. Investigating, that seemed to be due to the fact that when
creating a file, for instance, we can very well create intermediate
directories. Because the mask is active during the whole process, we end up
creating those directories with the wrong permissions.

One solution would be to reset the mask altogether for that creation, but that
is ugly and not very robust. What I am doing instead is passing the mask along
to the callee, and let it do the final step of creation with the mask in place.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
utimensat: fix access check

make check still works after the umask patch, except for the utimesnat test.
The reason for that, is that while all the other access checks happen through
a helper function, that will check if any (ogw) of the protection bits are set,
utimensat is doing that explicitly. The explicit check only checks for the world
bit, and ignores the others.

Moving it to also use the helper makes make check happy all over.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
tst-fpu: change debug to printf

Otherwise we won't see the result, which is useful when running the test
standalone.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
build.mk: remove unrelated change creep

remove unrelated change introduced with commit #c51e3daba983401f
due to dirty working tree.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
build: do not use 'private' in build.mk

Commit a4b52857d38427c784adeee48a3a513f89fd3450 introduced 'private'
keyword to solve a dependencies issue caused by the inheritance of
target-specific variable. The keyword however is only available since
make 3.82.

This patch removes the '-lstatic-thread-variable' option. Since we've
already added the library as one of the target's prerequisites and
compiling the target with '$^', that option is not needed.

Fixes #405.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Zifei Tong <zifeitong@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
release-ec2: mark created AMIs as permanent

Releases should be out of garbage collection script's scope.

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts: introduce EC2 garbage collector script

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
reboot() - remove redundant "extern C"

The "extern C" specifier for reboot() is unnecessary because this is
already done in <sys/reboot.h> (include/api/sys/reboot.h).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
osv::reboot(): don't halt on failure

osv::reboot()'s documentation says that if it fails to reboot it may
return. So don't call halt(). This halt() was only added as a stub for ARM,
so leave it only for the ARM case (and add a "FIXME" comment, as this
should be replaced by a real reboot).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>