]> git.pld-linux.org Git - packages/systemd.git/blame - target-pld.patch
- x32 rebuild
[packages/systemd.git] / target-pld.patch
CommitLineData
808bb44c
JK
1diff -dur -x '*~' -x '*.orig' systemd-208.orig/Makefile.am systemd-208/Makefile.am
2--- systemd-208.orig/Makefile.am 2013-10-02 04:57:09.000000000 +0200
3+++ systemd-208/Makefile.am 2014-01-09 15:15:41.000000000 +0100
4@@ -211,6 +211,8 @@
d31498aa 5 SYSINIT_TARGET_WANTS =
d31498aa 6 SOCKETS_TARGET_WANTS =
bce90f0e 7 TIMERS_TARGET_WANTS =
d31498aa
JR
8+FINAL_TARGET_WANTS =
9+GRAPHICAL_TARGET_WANTS =
440d1d13 10
d31498aa
JR
11 SYSTEM_UNIT_ALIASES =
12 USER_UNIT_ALIASES =
808bb44c 13@@ -230,6 +232,8 @@
d31498aa 14 what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && $(add-wants)
bce90f0e 15 what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && $(add-wants)
1aed57ba 16 what="$(SLICES_TARGET_WANTS)" && wants=slices.target && $(add-wants)
d31498aa
JR
17+ what="$(FINAL_TARGET_WANTS)" && wants=final.target && $(add-wants)
18+ what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && $(add-wants)
19
20 define add-wants
21 [ -z "$$what" ] || ( \
808bb44c 22@@ -4001,9 +4005,16 @@
d31498aa
JR
23 $(systemdstatedir)
24
25 MULTI_USER_TARGET_WANTS += \
26+ rc-local.service \
27 systemd-logind.service \
28 systemd-user-sessions.service
29
30+FINAL_TARGET_WANTS += \
31+ halt-local.service
32+
33+GRAPHICAL_TARGET_WANTS += \
34+ display-manager.service
35+
36 SYSTEM_UNIT_ALIASES += \
37 systemd-logind.service dbus-org.freedesktop.login1.service
38
808bb44c 39@@ -4493,6 +4504,10 @@
d31498aa
JR
40 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
41
42 install-data-hook: $(INSTALL_DATA_HOOKS)
4d29e184
BZ
43+ ( cd $(DESTDIR)$(systemunitdir) && \
44+ rm -f display-manager.service single.service && \
45+ $(LN_S) prefdm.service display-manager.service && \
46+ $(LN_S) rescue.service single.service )
440d1d13 47
d31498aa
JR
48 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
49
808bb44c
JK
50diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/core/hostname-setup.c systemd-208/src/core/hostname-setup.c
51--- systemd-208.orig/src/core/hostname-setup.c 2013-08-13 22:02:46.000000000 +0200
52+++ systemd-208/src/core/hostname-setup.c 2014-01-09 15:15:41.000000000 +0100
53@@ -53,13 +53,84 @@
da7cff0c
JR
54 return 0;
55 }
4d29e184 56
da7cff0c
JR
57+static int read_distro_hostname(char **hn) {
58+ int r;
59+ _cleanup_fclose_ FILE *f = NULL;
60+
61+ assert(hn);
62+
63+ f = fopen("/etc/sysconfig/network", "re");
64+ if (!f)
65+ return -errno;
66+
67+ for (;;) {
68+ char line[LINE_MAX];
69+ char *s, *k;
70+
71+ if (!fgets(line, sizeof(line), f)) {
72+ if (feof(f))
73+ break;
74+
75+ r = -errno;
76+ goto finish;
77+ }
78+
79+ s = strstrip(line);
80+
81+ if (!startswith_no_case(s, "HOSTNAME="))
82+ continue;
83+
84+ k = strdup(s+9);
85+ if (!k) {
86+ r = -ENOMEM;
87+ goto finish;
88+ }
89+
890c04f0 90+ hostname_cleanup(k, false);
da7cff0c
JR
91+
92+ if (isempty(k)) {
93+ free(k);
94+ r = -ENOENT;
95+ goto finish;
96+ }
97+
98+ *hn = k;
99+ r = 0;
100+ goto finish;
101+ }
102+
103+ r = -ENOENT;
104+
105+finish:
106+ return r;
107+}
108+
109+static int read_hostname(char **hn) {
110+ int r;
111+
112+ assert(hn);
113+
114+ /* First, try to load the generic hostname configuration file,
115+ * that we support on all distributions */
116+
117+ r = read_and_strip_hostname("/etc/hostname", hn);
118+ if (r < 0) {
119+ if (r == -ENOENT)
120+ return read_distro_hostname(hn);
121+
122+ return r;
123+ }
124+
125+ return 0;
126+}
127+
128 int hostname_setup(void) {
4d29e184 129 int r;
da7cff0c
JR
130 _cleanup_free_ char *b = NULL;
131 const char *hn;
132 bool enoent = false;
4d29e184 133
da7cff0c
JR
134- r = read_and_strip_hostname("/etc/hostname", &b);
135+ r = read_hostname(&b);
136 if (r < 0) {
137 if (r == -ENOENT)
138 enoent = true;
808bb44c
JK
139diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/core/locale-setup.c systemd-208/src/core/locale-setup.c
140--- systemd-208.orig/src/core/locale-setup.c 2013-10-01 00:17:21.000000000 +0200
141+++ systemd-208/src/core/locale-setup.c 2014-01-09 15:15:41.000000000 +0100
142@@ -76,6 +76,7 @@
4d29e184 143
da7cff0c
JR
144 if (detect_container(NULL) <= 0) {
145 r = parse_env_file("/proc/cmdline", WHITESPACE,
146+ "LANG", &variables[VARIABLE_LANG],
147 "locale.LANG", &variables[VARIABLE_LANG],
148 "locale.LANGUAGE", &variables[VARIABLE_LANGUAGE],
149 "locale.LC_CTYPE", &variables[VARIABLE_LC_CTYPE],
808bb44c 150@@ -120,6 +121,15 @@
4d29e184
BZ
151 log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
152 }
153
da7cff0c
JR
154+ if (r <= 0 &&
155+ (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
156+ "LANG", &variables[VARIABLE_LANG],
157+ NULL)) < 0) {
158+
159+ if (r != -ENOENT)
160+ log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
161+ }
162+
3d025d25 163 add = NULL;
11fa1d33 164 for (i = 0; i < _VARIABLE_MAX; i++) {
808bb44c
JK
165 char *s;
166diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/timedate/timedated.c systemd-208/src/timedate/timedated.c
167--- systemd-208.orig/src/timedate/timedated.c 2013-08-13 22:02:47.000000000 +0200
168+++ systemd-208/src/timedate/timedated.c 2014-01-09 15:15:41.000000000 +0100
169@@ -183,6 +183,13 @@
a2211e27
JR
170 }
171 }
172
a2211e27
JR
173+ r = parse_env_file("/etc/sysconfig/timezone", NEWLINE,
174+ "TIMEZONE", &tz.zone,
175+ NULL);
176+ if (r < 0) {
177+ if (r != -ENOENT)
178+ log_warning("Failed to read /etc/sysconfig/timezone: %s", strerror(-r));
179+ }
d31498aa
JR
180 have_timezone:
181 if (isempty(tz.zone)) {
182 free(tz.zone);
808bb44c
JK
183diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/vconsole/vconsole-setup.c systemd-208/src/vconsole/vconsole-setup.c
184--- systemd-208.orig/src/vconsole/vconsole-setup.c 2013-08-13 22:02:47.000000000 +0200
185+++ systemd-208/src/vconsole/vconsole-setup.c 2014-01-09 15:17:49.000000000 +0100
186@@ -296,6 +296,17 @@
187 font_copy_to_all_vcs(fd);
da7cff0c 188 }
808bb44c 189
d31498aa 190+ if (r <= 0) {
808bb44c 191+ int r1 = parse_env_file("/etc/sysconfig/console", NEWLINE,
618c1d39
JR
192+ "CONSOLEFONT", &vc_font,
193+ "CONSOLEMAP", &vc_font_map,
194+ "CONSOLESCREENFONTMAP", &vc_font_unimap,
195+ "KEYTABLE", &vc_keymap,
196+ NULL);
808bb44c
JK
197+ if (r1 < 0 && r1 != -ENOENT)
198+ log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r1));
d31498aa 199+ }
808bb44c
JK
200+
201 free(vc_keymap);
202 free(vc_font);
203 free(vc_font_map);
This page took 0.059903 seconds and 4 git commands to generate.