[systemd-commits] 7 commits - configure.ac Makefile.am src/shared

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Fri Jun 20 15:46:01 PDT 2014


 Makefile.am       |   27 ++++++++++++++++++++++++++-
 configure.ac      |   16 ++++++++++++++--
 src/shared/util.c |    3 ---
 3 files changed, 40 insertions(+), 6 deletions(-)

New commits:
commit 747cf8cdf61cdad068c727e42eac699f2505ae77
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Fri Jun 20 18:14:22 2014 -0400

    build-sys: fail if python support requested but not found

diff --git a/configure.ac b/configure.ac
index 1aff72d..a87a026 100644
--- a/configure.ac
+++ b/configure.ac
@@ -224,6 +224,13 @@ AS_IF([test "x$with_python" != "xno"], [
                       [AC_MSG_WARN([*** python support requires python-lxml module installed])])
         ])
 ])
+AS_IF([test "$have_python" != "yes"], [
+      AS_IF([test "$with_python" = "yes"],
+            [AC_MSG_ERROR([*** python support requested but python support not found])])
+      AS_IF([test "$with_python" != "no"],
+            [AC_MSG_WARN([*** python support not found, some documentation cannot be built])])
+])
+
 AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
 AS_IF([test "x$PYTHON_BINARY" = "x"],
       [AS_IF([test "x$have_python" = "xyes"],

commit 65adc982db09a144d61551d5acc9340366cc46e2
Author: Filipe Brandenburger <filbranden at google.com>
Date:   Mon Jun 16 20:54:54 2014 -0700

    build-sys: check that compat-libs are enabled for "make dist"
    
    Running "make dist" requires --enable-compat-libs since DIST_SOURCES will list
    generated files such as libsystemd-daemon.c.
    
    Tested:
      $ ./configure && make && make dist
      *** compat-libs must be enabled in order to make dist
      make: *** [dist-check-compat-libs] Error 1

diff --git a/Makefile.am b/Makefile.am
index 9659856..b48b122 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5379,7 +5379,13 @@ if !HAVE_PYTHON
 	@false
 endif
 
-dist: dist-check-python
+dist-check-compat-libs:
+if !ENABLE_COMPAT_LIBS
+	@echo "*** compat-libs must be enabled in order to make dist"
+	@false
+endif
+
+dist: dist-check-python dist-check-compat-libs
 
 # check "broken" platforms limited toolchains for link breakage before we release
 .PHONY: linkcheck

commit 279419b37976ea24be5e57ebddba3ea0335e16b4
Author: Filipe Brandenburger <filbranden at google.com>
Date:   Mon Jun 16 20:54:53 2014 -0700

    build-sys: check that python is enabled for "make dist"
    
    Running "make dist" requires Python support since some of the man page sources
    (such as man/systemd.index.xml and man/systemd.directives.xml) are generated by
    Python scripts, so break "make dist" and give an useful error message when
    Python or the Python lxml module is not available.
    
    Tested:
      $ ./configure --without-python && make && make dist
      *** python and python-lxml module must be installed and enabled in order to make dist
      make: *** [dist-check-python] Error 1

diff --git a/Makefile.am b/Makefile.am
index 28acc64..9659856 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5369,6 +5369,18 @@ DISTCHECK_CONFIGURE_FLAGS += \
 	--enable-gtk-doc
 endif
 
+#
+# Require python when making dist
+#
+.PHONY: dist-check-python
+dist-check-python:
+if !HAVE_PYTHON
+	@echo "*** python and python-lxml module must be installed and enabled in order to make dist"
+	@false
+endif
+
+dist: dist-check-python
+
 # check "broken" platforms limited toolchains for link breakage before we release
 .PHONY: linkcheck
 linkcheck:

commit b9d5b4c30d8f301451c6abe111d636a9b9522527
Author: Filipe Brandenburger <filbranden at google.com>
Date:   Mon Jun 16 20:54:52 2014 -0700

    build-sys: configure --with-python when running distcheck
    
    Python support is pretty much essential to create man pages, so we should make
    sure that distcheck will request it during configure.
    
    Tested: Successfully ran "make distcheck" and confirmed --with-python was
    present in the ./configure run inside the unpacked distribution directory.

diff --git a/Makefile.am b/Makefile.am
index 58702d0..28acc64 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5359,6 +5359,11 @@ DISTCHECK_CONFIGURE_FLAGS += \
 	--with-sysvrcnd-path=
 endif
 
+if HAVE_PYTHON
+DISTCHECK_CONFIGURE_FLAGS += \
+	--with-python
+endif
+
 if ENABLE_GTK_DOC
 DISTCHECK_CONFIGURE_FLAGS += \
 	--enable-gtk-doc

commit be8737ae386166d2f279767ac87b226204c0de7e
Author: Filipe Brandenburger <filbranden at google.com>
Date:   Mon Jun 16 20:54:50 2014 -0700

    build-sys: add verbosity to python-lxml detection in ./configure
    
    Be verbose when checking if Python module lxml is available.  Also warn that
    Python support will be disabled when the lxml module is not present.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=80005
    
    Tested:
    - Without python-lxml package installed:
      $ ./configure
      checking for python extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
      checking for python lxml module... no
      configure: WARNING: *** python support requires python-xml module installed
    
    - With python-lxml package installed:
      $ ./configure
      checking for python extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
      checking for python lxml module... yes
      checking for PYTHON_DEVEL... yes
      ...
              Python:                  yes
              Python Headers:          yes

diff --git a/configure.ac b/configure.ac
index 1391d03..1aff72d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -216,8 +216,13 @@ AC_ARG_WITH([python],
 have_lxml=no
 AS_IF([test "x$with_python" != "xno"], [
         AM_PATH_PYTHON(,, [:])
-        AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes], [have_lxml=no])
-        AS_IF([test "$PYTHON" != : -a $have_lxml = yes], [have_python=yes])
+        AS_IF([test "x$PYTHON" != "x:"], [
+                AC_MSG_CHECKING([for python lxml module])
+                AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes])
+                AC_MSG_RESULT([$have_lxml])
+                AS_IF([test "x$have_lxml" = "xyes"], [have_python=yes],
+                      [AC_MSG_WARN([*** python support requires python-lxml module installed])])
+        ])
 ])
 AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
 AS_IF([test "x$PYTHON_BINARY" = "x"],

commit 49100d2abd1fc7ff36287de8c2645d37068784c2
Author: Filipe Brandenburger <filbranden at google.com>
Date:   Mon Jun 16 20:54:47 2014 -0700

    build-sys: do not include id128-constants.h in the dist archive
    
    File src/python-systemd/id128-constants.h is auto generated and its generation
    does not require special tools, only sed.  There is no point in bundling it in
    the distribution archive, so let's mark it as nodist_ to have it excluded.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=80006
    
    Tested: Successfully ran "make dist" after ./configure --without-python.

diff --git a/Makefile.am b/Makefile.am
index 9ece7a0..58702d0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4774,10 +4774,12 @@ _journal_la_LIBADD = \
 
 id128_la_SOURCES = \
 	src/python-systemd/id128.c \
-	src/python-systemd/id128-constants.h \
 	src/python-systemd/pyutil.c \
 	src/python-systemd/pyutil.h
 
+nodist_id128_la_SOURCES = \
+	src/python-systemd/id128-constants.h
+
 id128_la_CFLAGS = \
 	$(AM_CFLAGS) \
 	-fvisibility=default \

commit 0d460faf732ff3c9483dbfa5db6905d53c2e2522
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Fri Jun 20 18:44:39 2014 -0400

    util: do not strip /dev prefix twice

diff --git a/src/shared/util.c b/src/shared/util.c
index aaf109e..882a690 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -3612,9 +3612,6 @@ char *fstab_node_to_udev_node(const char *p) {
 bool tty_is_vc(const char *tty) {
         assert(tty);
 
-        if (startswith(tty, "/dev/"))
-                tty += 5;
-
         return vtnr_from_tty(tty) >= 0;
 }
 



More information about the systemd-commits mailing list