Contents of /trunk/systemd/patches/systemd-43-magellan.patch
Parent Directory | Revision Log
Revision 1675 -
(show annotations)
(download)
Sat Mar 3 12:03:52 2012 UTC (12 years, 6 months ago) by niro
File size: 9200 byte(s)
Sat Mar 3 12:03:52 2012 UTC (12 years, 6 months ago) by niro
File size: 9200 byte(s)
-refactor magellan patch
1 | diff -Naur systemd-43/configure.ac systemd-43-magellan/configure.ac |
2 | --- systemd-43/configure.ac 2012-02-15 04:28:03.009030015 +0100 |
3 | +++ systemd-43-magellan/configure.ac 2012-03-03 13:35:12.842982386 +0100 |
4 | @@ -395,7 +395,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, altlinuxi, 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, altlinuxi, 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 | @@ -451,6 +451,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 | @@ -542,6 +549,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-43/Makefile.am systemd-43-magellan/Makefile.am |
36 | --- systemd-43/Makefile.am 2012-02-15 04:27:54.416029600 +0100 |
37 | +++ systemd-43-magellan/Makefile.am 2012-03-03 13:37:01.294982387 +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-43/src/fsck.c systemd-43-magellan/src/fsck.c |
60 | --- systemd-43/src/fsck.c 2012-02-15 04:27:58.935029818 +0100 |
61 | +++ systemd-43-magellan/src/fsck.c 2012-03-03 13:47:10.936982386 +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-43/src/hostname-setup.c systemd-43-magellan/src/hostname-setup.c |
72 | --- systemd-43/src/hostname-setup.c 2012-02-15 04:27:55.771029665 +0100 |
73 | +++ systemd-43-magellan/src/hostname-setup.c 2012-03-03 13:38:41.606982383 +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-43/src/locale-setup.c systemd-43-magellan/src/locale-setup.c |
93 | --- systemd-43/src/locale-setup.c 2012-02-15 04:27:59.049029823 +0100 |
94 | +++ systemd-43-magellan/src/locale-setup.c 2012-03-03 13:40:43.177982386 +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-43/src/quotacheck.c systemd-43-magellan/src/quotacheck.c |
132 | --- systemd-43/src/quotacheck.c 2012-02-15 04:27:54.534029605 +0100 |
133 | +++ systemd-43-magellan/src/quotacheck.c 2012-03-03 13:50:16.210982386 +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-43/src/vconsole/vconsole-setup.c systemd-43-magellan/src/vconsole/vconsole-setup.c |
155 | --- systemd-43/src/vconsole/vconsole-setup.c 2012-02-15 04:27:55.740029663 +0100 |
156 | +++ systemd-43-magellan/src/vconsole/vconsole-setup.c 2012-03-03 13:42:49.356982385 +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, |