Magellan Linux

Contents of /trunk/systemd/patches/systemd-44-magellan.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1709 - (show annotations) (download)
Fri Mar 23 09:34:03 2012 UTC (12 years, 2 months ago) by niro
File size: 9197 byte(s)
-re-worked patch for systemd-44
1 diff -Naur systemd-44/configure.ac systemd-44-magellan/configure.ac
2 --- systemd-44/configure.ac 2012-03-16 01:46:57.000000000 +0100
3 +++ systemd-44-magellan/configure.ac 2012-03-23 11:17:26.053982932 +0100
4 @@ -396,7 +396,7 @@
5
6 AC_PATH_PROG([M4], [m4])
7
8 -AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, slackware, altlinux, mandriva, meego, mageia, angstrom or other]))
9 +AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, ubuntu, arch, gentoo, magellan, slackware, altlinux, mandriva, meego, mageia, angstrom or other]))
10 if test "z$with_distro" = "z"; then
11 if test "$cross_compiling" = yes; then
12 AC_MSG_WARN([Target distribution cannot be reliably detected when cross-compiling. You should specify it with --with-distro (see $0 --help for recognized distros)])
13 @@ -452,6 +452,13 @@
14 AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo])
15 M4_DEFINES=-DTARGET_GENTOO=1
16 ;;
17 + magellan)
18 + SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
19 + SYSTEM_SYSVRCND_PATH=/etc/rc.d
20 + AC_DEFINE(TARGET_MAGELLAN, [], [Target is Magellan])
21 + M4_DEFINES=-DTARGET_MAGELLAN=1
22 + have_plymouth=yes
23 + ;;
24 slackware)
25 SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
26 AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware])
27 @@ -543,6 +550,7 @@
28 AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu)
29 AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch)
30 AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
31 +AM_CONDITIONAL(TARGET_MAGELLAN, test x"$with_distro" = xmagellan)
32 AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
33 AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
34 AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux)
35 diff -Naur systemd-44/Makefile.am systemd-44-magellan/Makefile.am
36 --- systemd-44/Makefile.am 2012-03-16 01:46:51.000000000 +0100
37 +++ systemd-44-magellan/Makefile.am 2012-03-23 11:18:40.991982932 +0100
38 @@ -112,6 +112,12 @@
39 -DKBD_SETFONT=\"/usr/bin/setfont\" \
40 -DDEFAULT_FONT=\"LatArCyrHeb-16\"
41 else
42 +if TARGET_MAGELLAN
43 +AM_CPPFLAGS += \
44 + -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
45 + -DKBD_SETFONT=\"/bin/setfont\" \
46 + -DDEFAULT_FONT=\"LatArCyrHeb-16\"
47 +else
48 if TARGET_ARCH
49 AM_CPPFLAGS += \
50 -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
51 @@ -155,6 +161,7 @@
52 endif
53 endif
54 endif
55 +endif
56 endif
57 endif
58 endif
59 diff -Naur systemd-44/src/fsck.c systemd-44-magellan/src/fsck.c
60 --- systemd-44/src/fsck.c 2011-12-15 18:47:29.000000000 +0100
61 +++ systemd-44-magellan/src/fsck.c 2012-03-23 11:21:28.323982933 +0100
62 @@ -127,7 +127,7 @@
63 arg_skip = true;
64 else if (startswith(w, "fsck.mode"))
65 log_warning("Invalid fsck.mode= parameter. Ignoring.");
66 -#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
67 +#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) || defined(TARGET_MAGELLAN)
68 else if (strneq(w, "fastboot", l))
69 arg_skip = true;
70 else if (strneq(w, "forcefsck", l))
71 diff -Naur systemd-44/src/hostname-setup.c systemd-44-magellan/src/hostname-setup.c
72 --- systemd-44/src/hostname-setup.c 2011-11-02 02:16:34.000000000 +0100
73 +++ systemd-44-magellan/src/hostname-setup.c 2012-03-23 11:22:40.443982933 +0100
74 @@ -34,6 +34,8 @@
75 #define FILENAME "/etc/sysconfig/network"
76 #elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE)
77 #define FILENAME "/etc/HOSTNAME"
78 +#elif defined(TARGET_MAGELLAN)
79 +#define FILENAME "/etc/hostname"
80 #elif defined(TARGET_ARCH)
81 #define FILENAME "/etc/rc.conf"
82 #elif defined(TARGET_GENTOO)
83 @@ -114,7 +116,7 @@
84 fclose(f);
85 return r;
86
87 -#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE)
88 +#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_MAGELLAN)
89 return read_and_strip_hostname(FILENAME, hn);
90 #else
91 return -ENOENT;
92 diff -Naur systemd-44/src/locale-setup.c systemd-44-magellan/src/locale-setup.c
93 --- systemd-44/src/locale-setup.c 2011-11-02 02:16:34.000000000 +0100
94 +++ systemd-44-magellan/src/locale-setup.c 2012-03-23 11:23:33.404982933 +0100
95 @@ -199,6 +199,35 @@
96 if (r != -ENOENT)
97 log_warning("Failed to read /etc/profile.env: %s", strerror(-r));
98 }
99 +
100 +#elif defined(TARGET_Magellan)
101 + /* Magellan's rc-init expects locale variables in /etc/env.d/
102 + * These files are later compiled by env-rebuild into shell
103 + * export commands at /etc/profile.env, with variables being
104 + * exported by rc-init's runscript (so /etc/rc.d/init.d/)
105 + */
106 + if (r <= 0 &&
107 + (r = parse_env_file("/etc/profile.env", NEWLINE,
108 + "export LANG", &variables[VARIABLE_LANG],
109 + "export LC_ALL", &variables[VARIABLE_LC_ALL],
110 + "export LC_CTYPE", &variables[VARIABLE_LC_CTYPE],
111 + "export LC_NUMERIC", &variables[VARIABLE_LC_NUMERIC],
112 + "export LC_TIME", &variables[VARIABLE_LC_TIME],
113 + "export LC_COLLATE", &variables[VARIABLE_LC_COLLATE],
114 + "export LC_MONETARY", &variables[VARIABLE_LC_MONETARY],
115 + "export LC_MESSAGES", &variables[VARIABLE_LC_MESSAGES],
116 + "export LC_PAPER", &variables[VARIABLE_LC_PAPER],
117 + "export LC_NAME", &variables[VARIABLE_LC_NAME],
118 + "export LC_ADDRESS", &variables[VARIABLE_LC_ADDRESS],
119 + "export LC_TELEPHONE", &variables[VARIABLE_LC_TELEPHONE],
120 + "export LC_MEASUREMENT", &variables[VARIABLE_LC_MEASUREMENT],
121 + "export LC_IDENTIFICATION", &variables[VARIABLE_LC_IDENTIFICATION],
122 + NULL)) < 0) {
123 +
124 + if (r != -ENOENT)
125 + log_warning("Failed to read /etc/profile.env: %s", strerror(-r));
126 + }
127 +
128 #elif defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA )
129 if (r <= 0 &&
130 (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
131 diff -Naur systemd-44/src/quotacheck.c systemd-44-magellan/src/quotacheck.c
132 --- systemd-44/src/quotacheck.c 2012-01-13 02:02:47.000000000 +0100
133 +++ systemd-44-magellan/src/quotacheck.c 2012-03-23 11:25:54.215982931 +0100
134 @@ -54,7 +54,7 @@
135 arg_skip = true;
136 else if (startswith(w, "quotacheck.mode"))
137 log_warning("Invalid quotacheck.mode= parameter. Ignoring.");
138 -#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
139 +#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) || defined(TARGET_MAGELLAN)
140 else if (strneq(w, "forcequotacheck", l))
141 arg_force = true;
142 #endif
143 @@ -65,8 +65,8 @@
144 }
145
146 static void test_files(void) {
147 -#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
148 - /* This exists only on Fedora, Mandriva or Mageia */
149 +#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA) || defined(TARGET_MAGELLAN)
150 + /* This exists only on Fedora, Mandriva, Mageia or Magellan */
151 if (access("/forcequotacheck", F_OK) >= 0)
152 arg_force = true;
153 #endif
154 diff -Naur systemd-44/src/vconsole/vconsole-setup.c systemd-44-magellan/src/vconsole/vconsole-setup.c
155 --- systemd-44/src/vconsole/vconsole-setup.c 2012-01-10 03:29:19.000000000 +0100
156 +++ systemd-44-magellan/src/vconsole/vconsole-setup.c 2012-03-23 11:27:28.425982933 +0100
157 @@ -371,6 +371,20 @@
158 log_warning("Failed to read /etc/conf.d/keymaps: %s", strerror(-r));
159 }
160
161 +#elif defined(TARGET_MAGELLAN)
162 + if ((r = parse_env_file("/etc/conf.d/keymap", NEWLINE,
163 + "KEYMAP", &vc_keymap,
164 + NULL)) < 0) {
165 + if (r != -ENOENT)
166 + log_warning("Failed to read /etc/conf.d/keymap: %s", strerror(-r));
167 + }
168 + if ((r = parse_env_file("/etc/conf.d/consolefont", NEWLINE,
169 + "CONSOLEFONT", &vc_font,
170 + NULL)) < 0) {
171 + if (r != -ENOENT)
172 + log_warning("Failed to read /etc/conf.d/consolefont: %s", strerror(-r));
173 + }
174 +
175 #elif defined(TARGET_MANDRIVA) || defined (TARGET_MAGEIA)
176
177 if ((r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,