Annotation of /trunk/systemd/patches/systemd-32-magellan.patch
Parent Directory | Revision Log
Revision 1459 -
(hide annotations)
(download)
Mon Aug 1 13:18:16 2011 UTC (13 years, 1 month ago) by niro
File size: 8896 byte(s)
Mon Aug 1 13:18:16 2011 UTC (13 years, 1 month ago) by niro
File size: 8896 byte(s)
-fixed plymout installation, have_plymouth=true -> have_plymouth=yes
1 | niro | 1459 | diff -Naur systemd-30/configure.ac systemd-30-magellan/configure.ac |
2 | --- systemd-30/configure.ac 2011-07-13 23:10:38.000000000 +0200 | ||
3 | +++ systemd-30-magellan/configure.ac 2011-07-18 21:39:48.000000000 +0200 | ||
4 | @@ -323,7 +323,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 | @@ -333,6 +333,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 | @@ -392,6 +393,13 @@ | ||
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 | + have_plymouth=yes | ||
31 | + ;; | ||
32 | slackware) | ||
33 | SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d | ||
34 | AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware]) | ||
35 | @@ -476,6 +484,7 @@ | ||
36 | AM_CONDITIONAL(TARGET_DEBIAN_OR_UBUNTU, test x"$with_distro" = xdebian -o x"$with_distro" = xubuntu) | ||
37 | AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch) | ||
38 | AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo) | ||
39 | +AM_CONDITIONAL(TARGET_MAGELLAN, test x"$with_distro" = xmagellan) | ||
40 | AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware) | ||
41 | AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware) | ||
42 | AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux) | ||
43 | diff -Naur systemd-30/Makefile.am systemd-30-magellan/Makefile.am | ||
44 | --- systemd-30/Makefile.am 2011-07-13 22:12:48.000000000 +0200 | ||
45 | +++ systemd-30-magellan/Makefile.am 2011-07-18 21:39:48.000000000 +0200 | ||
46 | @@ -74,6 +74,12 @@ | ||
47 | -DKBD_SETFONT=\"/usr/bin/setfont\" \ | ||
48 | -DDEFAULT_FONT=\"LatArCyrHeb-16\" | ||
49 | else | ||
50 | +if TARGET_MAGELLAN | ||
51 | +AM_CPPFLAGS += \ | ||
52 | + -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ | ||
53 | + -DKBD_SETFONT=\"/usr/bin/setfont\" \ | ||
54 | + -DDEFAULT_FONT=\"LatArCyrHeb-16\" | ||
55 | +else | ||
56 | if TARGET_ARCH | ||
57 | AM_CPPFLAGS += \ | ||
58 | -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ | ||
59 | @@ -111,6 +117,7 @@ | ||
60 | endif | ||
61 | endif | ||
62 | endif | ||
63 | +endif | ||
64 | endif | ||
65 | endif | ||
66 | endif | ||
67 | diff -Naur systemd-30/src/hostname-setup.c systemd-30-magellan/src/hostname-setup.c | ||
68 | --- systemd-30/src/hostname-setup.c 2011-04-20 00:55:07.000000000 +0200 | ||
69 | +++ systemd-30-magellan/src/hostname-setup.c 2011-07-18 21:39:48.000000000 +0200 | ||
70 | @@ -34,6 +34,8 @@ | ||
71 | #define FILENAME "/etc/sysconfig/network" | ||
72 | #elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_FRUGALWARE) | ||
73 | #define FILENAME "/etc/HOSTNAME" | ||
74 | +#elif defined(TARGET_MAGELLAN) | ||
75 | +#define FILENAME "/etc/hostname" | ||
76 | #elif defined(TARGET_ARCH) | ||
77 | #define FILENAME "/etc/rc.conf" | ||
78 | #elif defined(TARGET_GENTOO) | ||
79 | @@ -114,7 +116,7 @@ | ||
80 | fclose(f); | ||
81 | return r; | ||
82 | |||
83 | -#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_FRUGALWARE) | ||
84 | +#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE) || defined(TARGET_FRUGALWARE) || defined(TARGET_MAGELLAN) | ||
85 | return read_and_strip_hostname(FILENAME, hn); | ||
86 | #else | ||
87 | return -ENOENT; | ||
88 | diff -Naur systemd-30/src/locale-setup.c systemd-30-magellan/src/locale-setup.c | ||
89 | --- systemd-30/src/locale-setup.c 2011-06-12 12:17:32.000000000 +0200 | ||
90 | +++ systemd-30-magellan/src/locale-setup.c 2011-07-18 21:39:48.000000000 +0200 | ||
91 | @@ -194,6 +194,35 @@ | ||
92 | if (r != -ENOENT) | ||
93 | log_warning("Failed to read /etc/profile.env: %s", strerror(-r)); | ||
94 | } | ||
95 | + | ||
96 | +#elif defined(TARGET_Magellan) | ||
97 | + /* Magellan's rc-init expects locale variables in /etc/env.d/ | ||
98 | + * These files are later compiled by env-rebuild into shell | ||
99 | + * export commands at /etc/profile.env, with variables being | ||
100 | + * exported by rc-init's runscript (so /etc/rc.d/init.d/) | ||
101 | + */ | ||
102 | + if (r <= 0 && | ||
103 | + (r = parse_env_file("/etc/profile.env", NEWLINE, | ||
104 | + "export LANG", &variables[VARIABLE_LANG], | ||
105 | + "export LC_ALL", &variables[VARIABLE_LC_ALL], | ||
106 | + "export LC_CTYPE", &variables[VARIABLE_LC_CTYPE], | ||
107 | + "export LC_NUMERIC", &variables[VARIABLE_LC_NUMERIC], | ||
108 | + "export LC_TIME", &variables[VARIABLE_LC_TIME], | ||
109 | + "export LC_COLLATE", &variables[VARIABLE_LC_COLLATE], | ||
110 | + "export LC_MONETARY", &variables[VARIABLE_LC_MONETARY], | ||
111 | + "export LC_MESSAGES", &variables[VARIABLE_LC_MESSAGES], | ||
112 | + "export LC_PAPER", &variables[VARIABLE_LC_PAPER], | ||
113 | + "export LC_NAME", &variables[VARIABLE_LC_NAME], | ||
114 | + "export LC_ADDRESS", &variables[VARIABLE_LC_ADDRESS], | ||
115 | + "export LC_TELEPHONE", &variables[VARIABLE_LC_TELEPHONE], | ||
116 | + "export LC_MEASUREMENT", &variables[VARIABLE_LC_MEASUREMENT], | ||
117 | + "export LC_IDENTIFICATION", &variables[VARIABLE_LC_IDENTIFICATION], | ||
118 | + NULL)) < 0) { | ||
119 | + | ||
120 | + if (r != -ENOENT) | ||
121 | + log_warning("Failed to read /etc/profile.env: %s", strerror(-r)); | ||
122 | + } | ||
123 | + | ||
124 | #elif defined(TARGET_MANDRIVA) | ||
125 | if (r <= 0 && | ||
126 | (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE, | ||
127 | diff -Naur systemd-30/src/util.c systemd-30-magellan/src/util.c | ||
128 | --- systemd-30/src/util.c 2011-07-07 02:27:08.000000000 +0200 | ||
129 | +++ systemd-30-magellan/src/util.c 2011-07-18 21:39:48.000000000 +0200 | ||
130 | @@ -3493,6 +3493,28 @@ | ||
131 | if (!ansi_color) | ||
132 | const_color = "1;34"; /* Light Blue for Gentoo */ | ||
133 | |||
134 | +#elif defined(TARGET_MAGELLAN) | ||
135 | + | ||
136 | + if (!pretty_name) { | ||
137 | + char *version; | ||
138 | + | ||
139 | + if ((r = read_one_line_file("/etc/mageversion", &version)) < 0) { | ||
140 | + | ||
141 | + if (r != -ENOENT) | ||
142 | + log_warning("Failed to read /etc/mageversion: %s", strerror(-r)); | ||
143 | + } else { | ||
144 | + pretty_name = strappend("Magellan-Linux (v", version); | ||
145 | + pretty_name = strappend(pretty_name, ")"); | ||
146 | + free(version); | ||
147 | + | ||
148 | + if (!pretty_name) | ||
149 | + log_warning("Failed to allocate Debian version string."); | ||
150 | + } | ||
151 | + } | ||
152 | + | ||
153 | + if (!ansi_color) | ||
154 | + const_color = "1;34"; /* Light Blue for Magellan */ | ||
155 | + | ||
156 | #elif defined(TARGET_ALTLINUX) | ||
157 | |||
158 | if (!pretty_name) { | ||
159 | diff -Naur systemd-30/src/vconsole-setup.c systemd-30-magellan/src/vconsole-setup.c | ||
160 | --- systemd-30/src/vconsole-setup.c 2011-05-03 17:58:03.000000000 +0200 | ||
161 | +++ systemd-30-magellan/src/vconsole-setup.c 2011-07-18 21:39:48.000000000 +0200 | ||
162 | @@ -372,6 +372,20 @@ | ||
163 | log_warning("Failed to read /etc/conf.d/keymaps: %s", strerror(-r)); | ||
164 | } | ||
165 | |||
166 | +#elif defined(TARGET_MAGELLAN) | ||
167 | + if ((r = parse_env_file("/etc/conf.d/keymap", NEWLINE, | ||
168 | + "KEYMAP", &vc_keymap, | ||
169 | + NULL)) < 0) { | ||
170 | + if (r != -ENOENT) | ||
171 | + log_warning("Failed to read /etc/conf.d/keymap: %s", strerror(-r)); | ||
172 | + } | ||
173 | + if ((r = parse_env_file("/etc/conf.d/consolefont", NEWLINE, | ||
174 | + "CONSOLEFONT", &vc_font, | ||
175 | + NULL)) < 0) { | ||
176 | + if (r != -ENOENT) | ||
177 | + log_warning("Failed to read /etc/conf.d/consolefont: %s", strerror(-r)); | ||
178 | + } | ||
179 | + | ||
180 | #elif defined(TARGET_MANDRIVA) | ||
181 | |||
182 | if ((r = parse_env_file("/etc/sysconfig/i18n", NEWLINE, |