Previously HAVE_LIBGNUTLS was never set in config.h even if gnutls was
detected as AC_CHECK_LIB default action-if-found was overriden by
enable_gnutls=yes
This patch adds an --enable-gnutls option and will call AC_CHECK_LIB
with the default action to write HAVE_LIBGNUTLS in config.h
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
Given commit 330ae3d350:
lxccontainer: detect if we should send SIGRTMIN+3
This is required by systemd to cleanly shutdown. Other init systems should not
have SIGRTMIN+3 in the blocked signals set.
we should stop poking around with sigpwr.target for systemd.
Signed-off-by: Evgeni Golov <evgeni@debian.org>
Enable lxc network config support the following type and link:
lxc.network.type = phys
lxc.network.link = eth+
Here, the suffix '+' will trigger a string pattern matching
and when lxc find any network interfaces name prefixed with
"eth" such as "eth0", "eth1", "ethxxxx" and so on, it will
try to move them into the container's namespace; If it didn't
find any matching, it would do nothing for this configure
line.
Signed-off-by: fli <fupan.li@windriver.com>
Removed libgcc_s1 because it breaks container building for openSUSE.
Related: openSUSE/obs-build#188
Signed-off-by: Terzeus S. Dominguez <tsdmgz@gmail.com>
Aside from adding a 42.2 option, $DISTRO comparisons for Leap have been
changed [ exp ] => [[ exp ]] to accomodate pattern matching for future
releases.
Signed-off-by: Terzeus S. Dominguez <tsdmgz@gmail.com>
Commit bf39edb39e broke the handling of the getty service file with an '@' character in filename. So the startup condition was not fixed.
Because the parameter was quoted with the causal commit, the escaping has to be removed.
Signed-off-by: Andreas Eberlein foodeas@aeberlein.de
Same change as in 6118210e0a which was missing in lxc-start
and back then is_defined() wasn't being called.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
gettimeofday() is not async signal safe. So let's switch to clock_gettime() to
be on the safe side.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
- single digit months, days, hours, minutes, and seconds should always be
preceded by a 0.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This allows us to generate nice timestamps in a thread-safe manner without
relying on locale touching functions from any libc.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Converts a unix time Epoch given by a struct timespec to a UTC string useable
in our logging functions. Maybe expanded to allow for more generic formatting.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Our log functions need to make extra sure that they are thread-safe. We had
some problems with that before. This especially involves time-conversion
functions. I don't want to find any localtime() or gmtime() functions or
relatives in here. Not even localtime_r() or gmtime_r() or relatives. They all
fiddle with global variables and locking in various libcs. They cause deadlocks
when liblxc is used multi-threaded and no matter how smart you think you are,
you __will__ cause trouble using them.
(As a short example how this can cause trouble: LXD uses forkstart to fork off
a new process that runs the container. At the same time the go runtime LXD
relies on does its own multi-threading thing which we can't control. The
fork()ing + threading then seems to mess with the locking states in these time
functions causing deadlocks.)
The current solution is to be good old unix people and use the Epoch as our
reference point and simply use the seconds and nanoseconds that have past since
then. This relies on clock_gettime() which is explicitly marked MT-Safe with no
restrictions! This way, anyone who is really strongly invested in getting the
actual time the log entry was created, can just convert it for themselves. Our
logging is mostly done for debugging purposes so don't try to make it pretty.
Pretty might cost you thread-safety.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This macro can be used to set or allocate a string buffer that can hold any
64bit representable number.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>