chiark / gitweb /
MeeGo support
authorChris E Ferron <chris.e.ferron@linux.intel.com>
Tue, 19 Apr 2011 19:37:51 +0000 (12:37 -0700)
committerLennart Poettering <lennart@poettering.net>
Tue, 19 Apr 2011 23:05:30 +0000 (01:05 +0200)
This commit consists of the initial work to include MeeGo as a ported
distribution for systemd.

The majority of the changes are small configuration additions to auto
tools, so that MeeGo is identified as a valid distribution option.

Some small deviations will be noticed between the configuration of MeeGo
and other distributions. As MeeGo is a distribution striving for
compliancy to support its near embedded attributes and target users,
there is less user configuration options available by default. Most
services will be enabled by systemd as part of the distribution
requirements, and as such most links and service files will be pre-setup
for the MeeGo distribution. As much of this is going to be done within
the MeeGo distribution packaging this is still noteworthy to mention, as
it explains why in systemd you will observe configuration differences
where the MeeGo distribution removes all links in the pkgsysconfdir for
instance.  MeeGo will be user configurable if there is desire, but most
services will be enabled by the distribution as designated by the MeeGo
compliancy standards.

Other changes are in source to add such areas as meego-release defined
in utils, and hostname in hostname-setup, defining vconsole-setup,
localizations and rescue additions as needed.

As this is all ground work, MeeGo will continue to strive for complete
compatibility.

Makefile.am
configure.ac
src/hostname-setup.c
src/locale-setup.c
src/systemctl.c
src/util.c
src/vconsole-setup.c
units/rescue.service.m4

index 26412ab304f5a3c4f440786315f672f2de83e74d..0aaa1e45c37f4d5d70bc966a1e8faae6b7825c98 100644 (file)
@@ -90,6 +90,12 @@ AM_CPPFLAGS += \
        -DKBD_SETFONT=\"/bin/setfont\" \
        -DDEFAULT_FONT=\"LatArCyrHeb-16\"
 else
+if TARGET_MEEGO
+AM_CPPFLAGS += \
+       -DKBD_LOADKEYS=\"/bin/loadkeys\" \
+       -DKBD_SETFONT=\"/bin/setfont\" \
+       -DDEFAULT_FONT=\"LatArCyrHeb-16\"
+else
 AM_CPPFLAGS += \
        -DKBD_LOADKEYS=\"/bin/loadkeys\" \
        -DKBD_SETFONT=\"/bin/setfont\" \
@@ -98,6 +104,7 @@ endif
 endif
 endif
 endif
+endif
 
 rootbin_PROGRAMS = \
        systemd \
@@ -1454,6 +1461,20 @@ if HAVE_PLYMOUTH
                rm -f plymouth-halt.service && \
                $(LN_S) ../plymouth-halt.service plymouth-halt.service )
 endif
+if TARGET_MEEGO
+       $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
+       ( cd $(DESTDIR)$(systemunitdir)/multi-user.target.wants && \
+               rm -f network.target && \
+               $(LN_S) $(systemunitdir)/network.target network.target )
+       ( cd $(DESTDIR)$(pkgsysconfdir)/system/sysinit.target.wants && \
+               rm -f * )
+       ( cd $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants && \
+               rm -f * )
+       ( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
+               rm -f * )
+       ( cd $(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants && \
+               rm -f * )
+endif
 
 if TARGET_FEDORA
        $(MKDIR_P) -m 0755 $(DESTDIR)$(systemunitdir)/final.target.wants
index fa8c8ba6d11601b91ec0cbed48bf4c702d10da0f..7837918181c8a7493156cb27f92740faf484f15b 100644 (file)
@@ -286,6 +286,7 @@ if test "z$with_distro" = "z"; then
                 test -f "/etc/frugalware-release" && with_distro="frugalware"
                 test -f "/etc/altlinux-release" && with_distro="altlinux"
                 test -f "/etc/mandriva-release" && with_distro="mandriva"
+                test -f "/etc/meego-release" && with_distro="meego"
                 if test "x`lsb_release -is 2>/dev/null`" = "xUbuntu"; then
                         with_distro="ubuntu"
                 fi
@@ -360,6 +361,12 @@ case $with_distro in
                 M4_DISTRO_FLAG=-DTARGET_MANDRIVA=1
                have_plymouth=true
                 ;;
+        meego)
+                SYSTEM_SYSVINIT_PATH=
+                SYSTEM_SYSVRCND_PATH=
+                AC_DEFINE(TARGET_MEEGO, [], [Target is MeeGo])
+                M4_DISTRO_FLAG=-DTARGET_MEEGO=1
+               ;;
         other)
                 ;;
         *)
@@ -409,6 +416,7 @@ AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
 AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
 AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux)
 AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
+AM_CONDITIONAL(TARGET_MEEGO, test x"$with_distro" = xmeego)
 
 AM_CONDITIONAL(HAVE_PLYMOUTH, test -n "$have_plymouth")
 AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
index ab497670453e82542110c3d0fc588b3b171297b7..57db9fbf7c2a2d26a7955ddbb15a9bdc86138961 100644 (file)
@@ -30,7 +30,7 @@
 #include "util.h"
 #include "log.h"
 
-#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA)
+#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO)
 #define FILENAME "/etc/sysconfig/network"
 #elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_FRUGALWARE)
 #define FILENAME "/etc/HOSTNAME"
@@ -64,7 +64,7 @@ static int read_and_strip_hostname(const char *path, char **hn) {
 
 static int read_distro_hostname(char **hn) {
 
-#if defined(TARGET_FEDORA) || defined(TARGET_ARCH) || defined(TARGET_GENTOO) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA)
+#if defined(TARGET_FEDORA) || defined(TARGET_ARCH) || defined(TARGET_GENTOO) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MEEGO)
         int r;
         FILE *f;
 
index 08e289d4eed6c57a62965118286382a79e4d33cb..d9adfa33f491c4b8e8d5798de40f805e9dde75c8 100644 (file)
@@ -71,7 +71,7 @@ int locale_setup(void) {
 
         if (detect_container(NULL) <= 0)
                 if ((r = parse_env_file("/proc/cmdline", WHITESPACE,
-#ifdef TARGET_FEDORA
+#if defined(TARGET_FEDORA) || defined(TARGET_MEEGO)
                                         "LANG",                     &variables[VARIABLE_LANG],
 #endif
                                         "locale.LANG",              &variables[VARIABLE_LANG],
@@ -116,7 +116,7 @@ int locale_setup(void) {
                         log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
         }
 
-#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX)
+#if defined(TARGET_FEDORA) || defined(TARGET_ALTLINUX) || defined(TARGET_MEEGO)
         if (r <= 0 &&
             (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
                                 "LANG", &variables[VARIABLE_LANG],
index 39901c3674c92317d89f48ee385ce5436e1d8bcc..d1d73bfa01397d5af617dbd69d6cd39454db13f3 100644 (file)
@@ -4081,7 +4081,7 @@ static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
         }
 
         if (!f) {
-#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)) && defined (HAVE_SYSV_COMPAT)
+#if (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA)) || defined(TARGET_MEEGO) && defined (HAVE_SYSV_COMPAT)
 
                 if (endswith(i->name, ".service")) {
                         char *sysv;
index c2173c7222f192ae6ce5b373b3f7809cfc54539b..5a076e6e34e7fefc51fdac0355ffbe4e29cfe106 100644 (file)
@@ -3394,7 +3394,18 @@ void status_welcome(void) {
                         free(s);
                 }
         }
+#elif defined(TARGET_MEEGO)
 
+        if (!pretty_name) {
+                if ((r = read_one_line_file("/etc/meego-release", &pretty_name)) < 0) {
+
+                        if (r != -ENOENT)
+                                log_warning("Failed to read /etc/meego-release: %s", strerror(-r));
+                }
+        }
+
+       if (!ansi_color)
+               const_color = "1;35"; /* Bright Magenta for MeeGo */
 #endif
 
         if (!pretty_name && !const_pretty)
index 67fb7b61002dcdcfb2352f9d51f85072ff5c445a..86e290b5d53f943d8fff00dd0d638bb2e881f4f2 100644 (file)
@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
 
         if (detect_container(NULL) <= 0)
                 if ((r = parse_env_file("/proc/cmdline", WHITESPACE,
-#ifdef TARGET_FEDORA
+#if defined(TARGET_FEDORA) || defined(TARGET_MEEGO)
                                         "SYSFONT", &vc_font,
                                         "KEYTABLE", &vc_keymap,
 #endif
@@ -209,7 +209,7 @@ int main(int argc, char **argv) {
         }
 
         if (r <= 0) {
-#ifdef TARGET_FEDORA
+#if defined(TARGET_FEDORA) || defined(TARGET_MEEGO)
                 if ((r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
                                         "SYSFONT", &vc_font,
                                         "SYSFONTACM", &vc_font_map,
index b48d085024060c7c383a741eaf9863686e578051..d2fd582e86e69a7203e46e3ead9a90589d91100d 100644 (file)
@@ -25,7 +25,10 @@ ExecStart=-/bin/bash -c "exec ${SINGLE}"',
 m4_ifdef(`TARGET_MANDRIVA',
 `EnvironmentFile=/etc/sysconfig/init
 ExecStart=-/bin/bash -c "exec ${SINGLE}"',
-`ExecStart=-/sbin/sulogin'))
+`ExecStart=-/sbin/sulogin'
+m4_ifdef(`TARGET_MEEGO',
+`EnvironmentFile=/etc/sysconfig/init
+ExecStart=-/bin/bash -c "exec ${SINGLE}"',)))
 ExecStopPost=-/bin/systemctl --fail --no-block default
 StandardInput=tty-force
 KillMode=process