Contents of /trunk/systemd/patches/systemd-28-magellan.patch
Parent Directory | Revision Log
Revision 1335 -
(show annotations)
(download)
Wed Jun 1 20:21:25 2011 UTC (13 years, 3 months ago) by niro
File size: 8426 byte(s)
Wed Jun 1 20:21:25 2011 UTC (13 years, 3 months ago) by niro
File size: 8426 byte(s)
-added magellan patch for systemd-28
1 | diff -Naur systemd-28/configure.ac systemd-28-magellan/configure.ac |
2 | --- systemd-28/configure.ac 2011-05-26 19:18:54.000000000 +0200 |
3 | +++ systemd-28-magellan/configure.ac 2011-06-01 21:30:26.000000000 +0200 |
4 | @@ -280,7 +280,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 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 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 | @@ -290,6 +290,7 @@ |
14 | test -f "/etc/debian_version" && with_distro="debian" |
15 | test -f "/etc/arch-release" && with_distro="arch" |
16 | test -f "/etc/gentoo-release" && with_distro="gentoo" |
17 | + test -f "/etc/mageversion" && with_distro="magellan" |
18 | test -f "/etc/slackware-version" && with_distro="slackware" |
19 | test -f "/etc/frugalware-release" && with_distro="frugalware" |
20 | test -f "/etc/altlinux-release" && with_distro="altlinux" |
21 | @@ -348,6 +349,12 @@ |
22 | AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo]) |
23 | M4_DISTRO_FLAG=-DTARGET_GENTOO=1 |
24 | ;; |
25 | + magellan) |
26 | + SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d |
27 | + SYSTEM_SYSVRCND_PATH=/etc/rc.d |
28 | + AC_DEFINE(TARGET_MAGELLAN, [], [Target is Magellan]) |
29 | + M4_DISTRO_FLAG=-DTARGET_MAGELLAN=1 |
30 | + ;; |
31 | slackware) |
32 | SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d |
33 | AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware]) |
34 | @@ -427,6 +434,7 @@ |
35 | AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu) |
36 | AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch) |
37 | AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo) |
38 | +AM_CONDITIONAL(TARGET_MAGELLAN, test x"$with_distro" = xmagellan) |
39 | AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware) |
40 | AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware) |
41 | AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux) |
42 | diff -Naur systemd-28/Makefile.am systemd-28-magellan/Makefile.am |
43 | --- systemd-28/Makefile.am 2011-05-25 18:40:37.000000000 +0200 |
44 | +++ systemd-28-magellan/Makefile.am 2011-06-01 21:32:47.000000000 +0200 |
45 | @@ -72,6 +72,12 @@ |
46 | -DKBD_SETFONT=\"/usr/bin/setfont\" \ |
47 | -DDEFAULT_FONT=\"LatArCyrHeb-16\" |
48 | else |
49 | +if TARGET_MAGELLAN |
50 | +AM_CPPFLAGS += \ |
51 | + -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ |
52 | + -DKBD_SETFONT=\"/usr/bin/setfont\" \ |
53 | + -DDEFAULT_FONT=\"LatArCyrHeb-16\" |
54 | +else |
55 | if TARGET_ARCH |
56 | AM_CPPFLAGS += \ |
57 | -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ |
58 | diff -Naur systemd-28/src/hostname-setup.c systemd-28-magellan/src/hostname-setup.c |
59 | --- systemd-28/src/hostname-setup.c 2011-04-20 15:56:33.000000000 +0200 |
60 | +++ systemd-28-magellan/src/hostname-setup.c 2011-06-01 21:36:40.000000000 +0200 |
61 | @@ -34,6 +34,8 @@ |
62 | #define FILENAME "/etc/sysconfig/network" |
63 | #elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_FRUGALWARE) |
64 | #define FILENAME "/etc/HOSTNAME" |
65 | +#elif defined(TARGET_MAGELLAN) |
66 | +#define FILENAME "/etc/hostname" |
67 | #elif defined(TARGET_ARCH) |
68 | #define FILENAME "/etc/rc.conf" |
69 | #elif defined(TARGET_GENTOO) |
70 | @@ -114,7 +116,7 @@ |
71 | fclose(f); |
72 | return r; |
73 | |
74 | -#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_FRUGALWARE) |
75 | +#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_FRUGALWARE) || defined(TARGET_MAGELLAN) |
76 | return read_and_strip_hostname(FILENAME, hn); |
77 | #else |
78 | return -ENOENT; |
79 | diff -Naur systemd-28/src/locale-setup.c systemd-28-magellan/src/locale-setup.c |
80 | --- systemd-28/src/locale-setup.c 2011-05-09 23:50:16.000000000 +0200 |
81 | +++ systemd-28-magellan/src/locale-setup.c 2011-06-01 21:48:17.000000000 +0200 |
82 | @@ -194,6 +194,35 @@ |
83 | if (r != -ENOENT) |
84 | log_warning("Failed to read /etc/profile.env: %s", strerror(-r)); |
85 | } |
86 | + |
87 | +#elif defined(TARGET_Magellan) |
88 | + /* Magellan's rc-init expects locale variables in /etc/env.d/ |
89 | + * These files are later compiled by env-rebuild into shell |
90 | + * export commands at /etc/profile.env, with variables being |
91 | + * exported by rc-init's runscript (so /etc/rc.d/init.d/) |
92 | + */ |
93 | + if (r <= 0 && |
94 | + (r = parse_env_file("/etc/profile.env", NEWLINE, |
95 | + "export LANG", &variables[VARIABLE_LANG], |
96 | + "export LC_ALL", &variables[VARIABLE_LC_ALL], |
97 | + "export LC_CTYPE", &variables[VARIABLE_LC_CTYPE], |
98 | + "export LC_NUMERIC", &variables[VARIABLE_LC_NUMERIC], |
99 | + "export LC_TIME", &variables[VARIABLE_LC_TIME], |
100 | + "export LC_COLLATE", &variables[VARIABLE_LC_COLLATE], |
101 | + "export LC_MONETARY", &variables[VARIABLE_LC_MONETARY], |
102 | + "export LC_MESSAGES", &variables[VARIABLE_LC_MESSAGES], |
103 | + "export LC_PAPER", &variables[VARIABLE_LC_PAPER], |
104 | + "export LC_NAME", &variables[VARIABLE_LC_NAME], |
105 | + "export LC_ADDRESS", &variables[VARIABLE_LC_ADDRESS], |
106 | + "export LC_TELEPHONE", &variables[VARIABLE_LC_TELEPHONE], |
107 | + "export LC_MEASUREMENT", &variables[VARIABLE_LC_MEASUREMENT], |
108 | + "export LC_IDENTIFICATION", &variables[VARIABLE_LC_IDENTIFICATION], |
109 | + NULL)) < 0) { |
110 | + |
111 | + if (r != -ENOENT) |
112 | + log_warning("Failed to read /etc/profile.env: %s", strerror(-r)); |
113 | + } |
114 | + |
115 | #elif defined(TARGET_MANDRIVA) |
116 | if (r <= 0 && |
117 | (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE, |
118 | diff -Naur systemd-28/src/util.c systemd-28-magellan/src/util.c |
119 | --- systemd-28/src/util.c 2011-05-25 17:57:49.000000000 +0200 |
120 | +++ systemd-28-magellan/src/util.c 2011-06-01 21:40:03.000000000 +0200 |
121 | @@ -3356,6 +3356,19 @@ |
122 | if (!ansi_color) |
123 | const_color = "1;34"; /* Light Blue for Gentoo */ |
124 | |
125 | +#elif defined(TARGET_MAGELLAN) |
126 | + |
127 | + if (!pretty_name) { |
128 | + if ((r = read_one_line_file("/etc/mageversion", &pretty_name)) < 0) { |
129 | + |
130 | + if (r != -ENOENT) |
131 | + log_warning("Failed to read /etc/mageversion: %s", strerror(-r)); |
132 | + } |
133 | + } |
134 | + |
135 | + if (!ansi_color) |
136 | + const_color = "1;34"; /* Light Blue for Magellan */ |
137 | + |
138 | #elif defined(TARGET_ALTLINUX) |
139 | |
140 | if (!pretty_name) { |
141 | diff -Naur systemd-28/src/vconsole-setup.c systemd-28-magellan/src/vconsole-setup.c |
142 | --- systemd-28/src/vconsole-setup.c 2011-05-09 22:30:27.000000000 +0200 |
143 | +++ systemd-28-magellan/src/vconsole-setup.c 2011-06-01 21:44:24.000000000 +0200 |
144 | @@ -372,6 +372,20 @@ |
145 | log_warning("Failed to read /etc/conf.d/keymaps: %s", strerror(-r)); |
146 | } |
147 | |
148 | +#elif defined(TARGET_MAGELLAN) |
149 | + if ((r = parse_env_file("/etc/conf.d/keymap", NEWLINE, |
150 | + "KEYMAP", &vc_keymap, |
151 | + NULL)) < 0) { |
152 | + if (r != -ENOENT) |
153 | + log_warning("Failed to read /etc/conf.d/keymap: %s", strerror(-r)); |
154 | + } |
155 | + if ((r = parse_env_file("/etc/conf.d/consolefont", NEWLINE, |
156 | + "CONSOLEFONT", &vc_font, |
157 | + NULL)) < 0) { |
158 | + if (r != -ENOENT) |
159 | + log_warning("Failed to read /etc/conf.d/consolefont: %s", strerror(-r)); |
160 | + } |
161 | + |
162 | #elif defined(TARGET_MANDRIVA) |
163 | |
164 | if ((r = parse_env_file("/etc/sysconfig/i18n", NEWLINE, |