diff options
author | Andreas Müller <schnitzeltony@googlemail.com> | 2012-07-11 13:24:32 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-07-16 09:39:05 +0200 |
commit | a5b2aea321b2851ed82828e6204c075a2329059c (patch) | |
tree | 06c57ad79e5cdcb0b8b62bb6e910c29c379fac8c /meta-oe | |
parent | 5ed19733f5193b752da650841a1383adb532fffd (diff) | |
download | meta-openembedded-a5b2aea321b2851ed82828e6204c075a2329059c.tar.gz |
move systemd recipes to meta-systemd
Diffstat (limited to 'meta-oe')
13 files changed, 0 insertions, 1196 deletions
diff --git a/meta-oe/recipes-core/systemd/systemd-compat-units.bb b/meta-oe/recipes-core/systemd/systemd-compat-units.bb deleted file mode 100644 index c9a6b679e..000000000 --- a/meta-oe/recipes-core/systemd/systemd-compat-units.bb +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | DESCRIPTION = "Units to make systemd work better with existing sysvinit scripts" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | ||
5 | |||
6 | PR = "r15" | ||
7 | |||
8 | inherit allarch | ||
9 | |||
10 | SRC_URI = "file://*.service" | ||
11 | |||
12 | do_install() { | ||
13 | install -d ${D}${systemd_unitdir}/system/basic.target.wants | ||
14 | install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/ | ||
15 | install -m 0644 ${WORKDIR}/run-postinsts.service ${D}${systemd_unitdir}/system | ||
16 | ln -sf ../run-postinsts.service ${D}${systemd_unitdir}/system/basic.target.wants/ | ||
17 | ln -sf ../run-postinsts.service ${D}${systemd_unitdir}/system/sysinit.target.wants/ | ||
18 | |||
19 | install -m 0644 ${WORKDIR}/machineid.service ${D}${systemd_unitdir}/system | ||
20 | ln -sf ../machineid.service ${D}${systemd_unitdir}/system/sysinit.target.wants/ | ||
21 | ln -sf ../machineid.service ${D}${systemd_unitdir}/system/basic.target.wants/ | ||
22 | |||
23 | # hack to make old style sysvinit postinsts succeed | ||
24 | install -d ${D}${bindir} | ||
25 | echo "echo 1" > ${D}${bindir}/runlevel | ||
26 | chmod 0755 ${D}${bindir}/runlevel | ||
27 | } | ||
28 | |||
29 | pkg_postinst_${PN} () { | ||
30 | cd $D${sysconfdir}/init.d | ||
31 | |||
32 | echo -n "Disabling the following sysv scripts: " | ||
33 | |||
34 | for i in busybox-udhcpc dnsmasq hwclock.sh networking syslog syslog.busybox ; do | ||
35 | if [ -e $i ] ; then | ||
36 | echo -n "$i " ; ln -s /dev/null $D${systemd_unitdir}/system/$i.service | ||
37 | fi | ||
38 | done ; echo | ||
39 | } | ||
40 | |||
41 | FILES_${PN} = "${systemd_unitdir}/system ${bindir}" | ||
42 | RDPEPENDS_${PN} = "systemd" | ||
43 | |||
44 | |||
diff --git a/meta-oe/recipes-core/systemd/systemd-compat-units/machineid.service b/meta-oe/recipes-core/systemd/systemd-compat-units/machineid.service deleted file mode 100644 index cab8f76ab..000000000 --- a/meta-oe/recipes-core/systemd/systemd-compat-units/machineid.service +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=Machine ID first boot configure | ||
3 | DefaultDependencies=no | ||
4 | ConditionPathExists=|!/etc/machine-id | ||
5 | After=remount-rootfs.service | ||
6 | Before=sysinit.target | ||
7 | |||
8 | [Service] | ||
9 | ExecStart=/bin/systemd-machine-id-setup | ||
10 | RemainAfterExit=No | ||
11 | Type=oneshot | ||
12 | StandardOutput=syslog | ||
13 | |||
14 | [Install] | ||
15 | WantedBy=basic.target | ||
16 | WantedBy=sysinit.target | ||
diff --git a/meta-oe/recipes-core/systemd/systemd-compat-units/run-postinsts.service b/meta-oe/recipes-core/systemd/systemd-compat-units/run-postinsts.service deleted file mode 100644 index 879a25157..000000000 --- a/meta-oe/recipes-core/systemd/systemd-compat-units/run-postinsts.service +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=Run pending postinsts | ||
3 | DefaultDependencies=no | ||
4 | ConditionPathExists=|/etc/rcS.d/S98run-postinsts | ||
5 | After=remount-rootfs.service | ||
6 | Before=sysinit.target | ||
7 | |||
8 | [Service] | ||
9 | ExecStart=/etc/rcS.d/S98run-postinsts | ||
10 | RemainAfterExit=No | ||
11 | Type=oneshot | ||
12 | StandardOutput=syslog | ||
13 | TimeoutSec=0 | ||
14 | |||
15 | [Install] | ||
16 | WantedBy=basic.target | ||
17 | WantedBy=sysinit.target | ||
diff --git a/meta-oe/recipes-core/systemd/systemd-machine-units_1.0.bb b/meta-oe/recipes-core/systemd/systemd-machine-units_1.0.bb deleted file mode 100644 index f33b2a983..000000000 --- a/meta-oe/recipes-core/systemd/systemd-machine-units_1.0.bb +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | DESCRIPTION = "Machine specific systemd units" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | ||
5 | |||
6 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
7 | |||
8 | PR = "r1" | ||
9 | |||
10 | inherit systemd | ||
11 | SYSTEMD_SERVICE = "" | ||
12 | SYSTEMD_PACKAGES = "${PN}" | ||
13 | NATIVE_SYSTEMD_SUPPORT = "1" | ||
14 | ALLOW_EMPTY_${PN} = "1" | ||
diff --git a/meta-oe/recipes-core/systemd/systemd-serialgetty.bb b/meta-oe/recipes-core/systemd/systemd-serialgetty.bb deleted file mode 100644 index c3106722f..000000000 --- a/meta-oe/recipes-core/systemd/systemd-serialgetty.bb +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | DESCRIPTION = "Systemd serial config" | ||
2 | LICENSE = "GPLv2+" | ||
3 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=751419260aa954499f7abaabaa882bbe" | ||
4 | |||
5 | PR = "r3" | ||
6 | |||
7 | SERIAL_CONSOLE ?= "115200 ttyS0" | ||
8 | |||
9 | SRC_URI = "file://LICENSE \ | ||
10 | file://serial-getty@.service" | ||
11 | |||
12 | def get_serial_console_value(d, index): | ||
13 | c = d.getVar('SERIAL_CONSOLE', True) | ||
14 | |||
15 | if len(c): | ||
16 | return c.split()[index] | ||
17 | |||
18 | return "" | ||
19 | |||
20 | def get_baudrate(d): | ||
21 | return get_serial_console_value(d, 0) | ||
22 | |||
23 | def get_console(d): | ||
24 | return get_serial_console_value(d, 1) | ||
25 | |||
26 | do_install() { | ||
27 | if [ ! ${@get_baudrate(d)} = "" ]; then | ||
28 | sed -i -e s/\@BAUDRATE\@/${@get_baudrate(d)}/g ${WORKDIR}/serial-getty@.service | ||
29 | install -d ${D}${systemd_unitdir}/system/ | ||
30 | install -d ${D}${sysconfdir}/systemd/system/getty.target.wants/ | ||
31 | install ${WORKDIR}/serial-getty@.service ${D}${systemd_unitdir}/system/ | ||
32 | |||
33 | # enable the service | ||
34 | ln -sf ${systemd_unitdir}/system/serial-getty@.service \ | ||
35 | ${D}${sysconfdir}/systemd/system/getty.target.wants/serial-getty@${@get_console(d)}.service | ||
36 | fi | ||
37 | } | ||
38 | |||
39 | PACKAGES = "${PN} ${PN}-dbg ${PN}-dev ${PN}-doc" | ||
40 | |||
41 | RRECOMMENDS_${PN} = "" | ||
42 | RDEPENDS_${PN} = "systemd" | ||
43 | |||
44 | # This is a machine specific file | ||
45 | FILES_${PN} = "${systemd_unitdir}/system/serial-getty@.service ${sysconfdir}" | ||
46 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
diff --git a/meta-oe/recipes-core/systemd/systemd-serialgetty/LICENSE b/meta-oe/recipes-core/systemd/systemd-serialgetty/LICENSE deleted file mode 100644 index d511905c1..000000000 --- a/meta-oe/recipes-core/systemd/systemd-serialgetty/LICENSE +++ /dev/null | |||
@@ -1,339 +0,0 @@ | |||
1 | GNU GENERAL PUBLIC LICENSE | ||
2 | Version 2, June 1991 | ||
3 | |||
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., | ||
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
6 | Everyone is permitted to copy and distribute verbatim copies | ||
7 | of this license document, but changing it is not allowed. | ||
8 | |||
9 | Preamble | ||
10 | |||
11 | The licenses for most software are designed to take away your | ||
12 | freedom to share and change it. By contrast, the GNU General Public | ||
13 | License is intended to guarantee your freedom to share and change free | ||
14 | software--to make sure the software is free for all its users. This | ||
15 | General Public License applies to most of the Free Software | ||
16 | Foundation's software and to any other program whose authors commit to | ||
17 | using it. (Some other Free Software Foundation software is covered by | ||
18 | the GNU Lesser General Public License instead.) You can apply it to | ||
19 | your programs, too. | ||
20 | |||
21 | When we speak of free software, we are referring to freedom, not | ||
22 | price. Our General Public Licenses are designed to make sure that you | ||
23 | have the freedom to distribute copies of free software (and charge for | ||
24 | this service if you wish), that you receive source code or can get it | ||
25 | if you want it, that you can change the software or use pieces of it | ||
26 | in new free programs; and that you know you can do these things. | ||
27 | |||
28 | To protect your rights, we need to make restrictions that forbid | ||
29 | anyone to deny you these rights or to ask you to surrender the rights. | ||
30 | These restrictions translate to certain responsibilities for you if you | ||
31 | distribute copies of the software, or if you modify it. | ||
32 | |||
33 | For example, if you distribute copies of such a program, whether | ||
34 | gratis or for a fee, you must give the recipients all the rights that | ||
35 | you have. You must make sure that they, too, receive or can get the | ||
36 | source code. And you must show them these terms so they know their | ||
37 | rights. | ||
38 | |||
39 | We protect your rights with two steps: (1) copyright the software, and | ||
40 | (2) offer you this license which gives you legal permission to copy, | ||
41 | distribute and/or modify the software. | ||
42 | |||
43 | Also, for each author's protection and ours, we want to make certain | ||
44 | that everyone understands that there is no warranty for this free | ||
45 | software. If the software is modified by someone else and passed on, we | ||
46 | want its recipients to know that what they have is not the original, so | ||
47 | that any problems introduced by others will not reflect on the original | ||
48 | authors' reputations. | ||
49 | |||
50 | Finally, any free program is threatened constantly by software | ||
51 | patents. We wish to avoid the danger that redistributors of a free | ||
52 | program will individually obtain patent licenses, in effect making the | ||
53 | program proprietary. To prevent this, we have made it clear that any | ||
54 | patent must be licensed for everyone's free use or not licensed at all. | ||
55 | |||
56 | The precise terms and conditions for copying, distribution and | ||
57 | modification follow. | ||
58 | |||
59 | GNU GENERAL PUBLIC LICENSE | ||
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
61 | |||
62 | 0. This License applies to any program or other work which contains | ||
63 | a notice placed by the copyright holder saying it may be distributed | ||
64 | under the terms of this General Public License. The "Program", below, | ||
65 | refers to any such program or work, and a "work based on the Program" | ||
66 | means either the Program or any derivative work under copyright law: | ||
67 | that is to say, a work containing the Program or a portion of it, | ||
68 | either verbatim or with modifications and/or translated into another | ||
69 | language. (Hereinafter, translation is included without limitation in | ||
70 | the term "modification".) Each licensee is addressed as "you". | ||
71 | |||
72 | Activities other than copying, distribution and modification are not | ||
73 | covered by this License; they are outside its scope. The act of | ||
74 | running the Program is not restricted, and the output from the Program | ||
75 | is covered only if its contents constitute a work based on the | ||
76 | Program (independent of having been made by running the Program). | ||
77 | Whether that is true depends on what the Program does. | ||
78 | |||
79 | 1. You may copy and distribute verbatim copies of the Program's | ||
80 | source code as you receive it, in any medium, provided that you | ||
81 | conspicuously and appropriately publish on each copy an appropriate | ||
82 | copyright notice and disclaimer of warranty; keep intact all the | ||
83 | notices that refer to this License and to the absence of any warranty; | ||
84 | and give any other recipients of the Program a copy of this License | ||
85 | along with the Program. | ||
86 | |||
87 | You may charge a fee for the physical act of transferring a copy, and | ||
88 | you may at your option offer warranty protection in exchange for a fee. | ||
89 | |||
90 | 2. You may modify your copy or copies of the Program or any portion | ||
91 | of it, thus forming a work based on the Program, and copy and | ||
92 | distribute such modifications or work under the terms of Section 1 | ||
93 | above, provided that you also meet all of these conditions: | ||
94 | |||
95 | a) You must cause the modified files to carry prominent notices | ||
96 | stating that you changed the files and the date of any change. | ||
97 | |||
98 | b) You must cause any work that you distribute or publish, that in | ||
99 | whole or in part contains or is derived from the Program or any | ||
100 | part thereof, to be licensed as a whole at no charge to all third | ||
101 | parties under the terms of this License. | ||
102 | |||
103 | c) If the modified program normally reads commands interactively | ||
104 | when run, you must cause it, when started running for such | ||
105 | interactive use in the most ordinary way, to print or display an | ||
106 | announcement including an appropriate copyright notice and a | ||
107 | notice that there is no warranty (or else, saying that you provide | ||
108 | a warranty) and that users may redistribute the program under | ||
109 | these conditions, and telling the user how to view a copy of this | ||
110 | License. (Exception: if the Program itself is interactive but | ||
111 | does not normally print such an announcement, your work based on | ||
112 | the Program is not required to print an announcement.) | ||
113 | |||
114 | These requirements apply to the modified work as a whole. If | ||
115 | identifiable sections of that work are not derived from the Program, | ||
116 | and can be reasonably considered independent and separate works in | ||
117 | themselves, then this License, and its terms, do not apply to those | ||
118 | sections when you distribute them as separate works. But when you | ||
119 | distribute the same sections as part of a whole which is a work based | ||
120 | on the Program, the distribution of the whole must be on the terms of | ||
121 | this License, whose permissions for other licensees extend to the | ||
122 | entire whole, and thus to each and every part regardless of who wrote it. | ||
123 | |||
124 | Thus, it is not the intent of this section to claim rights or contest | ||
125 | your rights to work written entirely by you; rather, the intent is to | ||
126 | exercise the right to control the distribution of derivative or | ||
127 | collective works based on the Program. | ||
128 | |||
129 | In addition, mere aggregation of another work not based on the Program | ||
130 | with the Program (or with a work based on the Program) on a volume of | ||
131 | a storage or distribution medium does not bring the other work under | ||
132 | the scope of this License. | ||
133 | |||
134 | 3. You may copy and distribute the Program (or a work based on it, | ||
135 | under Section 2) in object code or executable form under the terms of | ||
136 | Sections 1 and 2 above provided that you also do one of the following: | ||
137 | |||
138 | a) Accompany it with the complete corresponding machine-readable | ||
139 | source code, which must be distributed under the terms of Sections | ||
140 | 1 and 2 above on a medium customarily used for software interchange; or, | ||
141 | |||
142 | b) Accompany it with a written offer, valid for at least three | ||
143 | years, to give any third party, for a charge no more than your | ||
144 | cost of physically performing source distribution, a complete | ||
145 | machine-readable copy of the corresponding source code, to be | ||
146 | distributed under the terms of Sections 1 and 2 above on a medium | ||
147 | customarily used for software interchange; or, | ||
148 | |||
149 | c) Accompany it with the information you received as to the offer | ||
150 | to distribute corresponding source code. (This alternative is | ||
151 | allowed only for noncommercial distribution and only if you | ||
152 | received the program in object code or executable form with such | ||
153 | an offer, in accord with Subsection b above.) | ||
154 | |||
155 | The source code for a work means the preferred form of the work for | ||
156 | making modifications to it. For an executable work, complete source | ||
157 | code means all the source code for all modules it contains, plus any | ||
158 | associated interface definition files, plus the scripts used to | ||
159 | control compilation and installation of the executable. However, as a | ||
160 | special exception, the source code distributed need not include | ||
161 | anything that is normally distributed (in either source or binary | ||
162 | form) with the major components (compiler, kernel, and so on) of the | ||
163 | operating system on which the executable runs, unless that component | ||
164 | itself accompanies the executable. | ||
165 | |||
166 | If distribution of executable or object code is made by offering | ||
167 | access to copy from a designated place, then offering equivalent | ||
168 | access to copy the source code from the same place counts as | ||
169 | distribution of the source code, even though third parties are not | ||
170 | compelled to copy the source along with the object code. | ||
171 | |||
172 | 4. You may not copy, modify, sublicense, or distribute the Program | ||
173 | except as expressly provided under this License. Any attempt | ||
174 | otherwise to copy, modify, sublicense or distribute the Program is | ||
175 | void, and will automatically terminate your rights under this License. | ||
176 | However, parties who have received copies, or rights, from you under | ||
177 | this License will not have their licenses terminated so long as such | ||
178 | parties remain in full compliance. | ||
179 | |||
180 | 5. You are not required to accept this License, since you have not | ||
181 | signed it. However, nothing else grants you permission to modify or | ||
182 | distribute the Program or its derivative works. These actions are | ||
183 | prohibited by law if you do not accept this License. Therefore, by | ||
184 | modifying or distributing the Program (or any work based on the | ||
185 | Program), you indicate your acceptance of this License to do so, and | ||
186 | all its terms and conditions for copying, distributing or modifying | ||
187 | the Program or works based on it. | ||
188 | |||
189 | 6. Each time you redistribute the Program (or any work based on the | ||
190 | Program), the recipient automatically receives a license from the | ||
191 | original licensor to copy, distribute or modify the Program subject to | ||
192 | these terms and conditions. You may not impose any further | ||
193 | restrictions on the recipients' exercise of the rights granted herein. | ||
194 | You are not responsible for enforcing compliance by third parties to | ||
195 | this License. | ||
196 | |||
197 | 7. If, as a consequence of a court judgment or allegation of patent | ||
198 | infringement or for any other reason (not limited to patent issues), | ||
199 | conditions are imposed on you (whether by court order, agreement or | ||
200 | otherwise) that contradict the conditions of this License, they do not | ||
201 | excuse you from the conditions of this License. If you cannot | ||
202 | distribute so as to satisfy simultaneously your obligations under this | ||
203 | License and any other pertinent obligations, then as a consequence you | ||
204 | may not distribute the Program at all. For example, if a patent | ||
205 | license would not permit royalty-free redistribution of the Program by | ||
206 | all those who receive copies directly or indirectly through you, then | ||
207 | the only way you could satisfy both it and this License would be to | ||
208 | refrain entirely from distribution of the Program. | ||
209 | |||
210 | If any portion of this section is held invalid or unenforceable under | ||
211 | any particular circumstance, the balance of the section is intended to | ||
212 | apply and the section as a whole is intended to apply in other | ||
213 | circumstances. | ||
214 | |||
215 | It is not the purpose of this section to induce you to infringe any | ||
216 | patents or other property right claims or to contest validity of any | ||
217 | such claims; this section has the sole purpose of protecting the | ||
218 | integrity of the free software distribution system, which is | ||
219 | implemented by public license practices. Many people have made | ||
220 | generous contributions to the wide range of software distributed | ||
221 | through that system in reliance on consistent application of that | ||
222 | system; it is up to the author/donor to decide if he or she is willing | ||
223 | to distribute software through any other system and a licensee cannot | ||
224 | impose that choice. | ||
225 | |||
226 | This section is intended to make thoroughly clear what is believed to | ||
227 | be a consequence of the rest of this License. | ||
228 | |||
229 | 8. If the distribution and/or use of the Program is restricted in | ||
230 | certain countries either by patents or by copyrighted interfaces, the | ||
231 | original copyright holder who places the Program under this License | ||
232 | may add an explicit geographical distribution limitation excluding | ||
233 | those countries, so that distribution is permitted only in or among | ||
234 | countries not thus excluded. In such case, this License incorporates | ||
235 | the limitation as if written in the body of this License. | ||
236 | |||
237 | 9. The Free Software Foundation may publish revised and/or new versions | ||
238 | of the General Public License from time to time. Such new versions will | ||
239 | be similar in spirit to the present version, but may differ in detail to | ||
240 | address new problems or concerns. | ||
241 | |||
242 | Each version is given a distinguishing version number. If the Program | ||
243 | specifies a version number of this License which applies to it and "any | ||
244 | later version", you have the option of following the terms and conditions | ||
245 | either of that version or of any later version published by the Free | ||
246 | Software Foundation. If the Program does not specify a version number of | ||
247 | this License, you may choose any version ever published by the Free Software | ||
248 | Foundation. | ||
249 | |||
250 | 10. If you wish to incorporate parts of the Program into other free | ||
251 | programs whose distribution conditions are different, write to the author | ||
252 | to ask for permission. For software which is copyrighted by the Free | ||
253 | Software Foundation, write to the Free Software Foundation; we sometimes | ||
254 | make exceptions for this. Our decision will be guided by the two goals | ||
255 | of preserving the free status of all derivatives of our free software and | ||
256 | of promoting the sharing and reuse of software generally. | ||
257 | |||
258 | NO WARRANTY | ||
259 | |||
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | ||
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | ||
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | ||
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | ||
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | ||
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | ||
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | ||
268 | REPAIR OR CORRECTION. | ||
269 | |||
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | ||
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | ||
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | ||
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | ||
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | ||
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | ||
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | ||
278 | POSSIBILITY OF SUCH DAMAGES. | ||
279 | |||
280 | END OF TERMS AND CONDITIONS | ||
281 | |||
282 | How to Apply These Terms to Your New Programs | ||
283 | |||
284 | If you develop a new program, and you want it to be of the greatest | ||
285 | possible use to the public, the best way to achieve this is to make it | ||
286 | free software which everyone can redistribute and change under these terms. | ||
287 | |||
288 | To do so, attach the following notices to the program. It is safest | ||
289 | to attach them to the start of each source file to most effectively | ||
290 | convey the exclusion of warranty; and each file should have at least | ||
291 | the "copyright" line and a pointer to where the full notice is found. | ||
292 | |||
293 | <one line to give the program's name and a brief idea of what it does.> | ||
294 | Copyright (C) <year> <name of author> | ||
295 | |||
296 | This program is free software; you can redistribute it and/or modify | ||
297 | it under the terms of the GNU General Public License as published by | ||
298 | the Free Software Foundation; either version 2 of the License, or | ||
299 | (at your option) any later version. | ||
300 | |||
301 | This program is distributed in the hope that it will be useful, | ||
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
304 | GNU General Public License for more details. | ||
305 | |||
306 | You should have received a copy of the GNU General Public License along | ||
307 | with this program; if not, write to the Free Software Foundation, Inc., | ||
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
309 | |||
310 | Also add information on how to contact you by electronic and paper mail. | ||
311 | |||
312 | If the program is interactive, make it output a short notice like this | ||
313 | when it starts in an interactive mode: | ||
314 | |||
315 | Gnomovision version 69, Copyright (C) year name of author | ||
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. | ||
317 | This is free software, and you are welcome to redistribute it | ||
318 | under certain conditions; type `show c' for details. | ||
319 | |||
320 | The hypothetical commands `show w' and `show c' should show the appropriate | ||
321 | parts of the General Public License. Of course, the commands you use may | ||
322 | be called something other than `show w' and `show c'; they could even be | ||
323 | mouse-clicks or menu items--whatever suits your program. | ||
324 | |||
325 | You should also get your employer (if you work as a programmer) or your | ||
326 | school, if any, to sign a "copyright disclaimer" for the program, if | ||
327 | necessary. Here is a sample; alter the names: | ||
328 | |||
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program | ||
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. | ||
331 | |||
332 | <signature of Ty Coon>, 1 April 1989 | ||
333 | Ty Coon, President of Vice | ||
334 | |||
335 | This General Public License does not permit incorporating your program into | ||
336 | proprietary programs. If your program is a subroutine library, you may | ||
337 | consider it more useful to permit linking proprietary applications with the | ||
338 | library. If this is what you want to do, use the GNU Lesser General | ||
339 | Public License instead of this License. | ||
diff --git a/meta-oe/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta-oe/recipes-core/systemd/systemd-serialgetty/serial-getty@.service deleted file mode 100644 index 8eeaab697..000000000 --- a/meta-oe/recipes-core/systemd/systemd-serialgetty/serial-getty@.service +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | # This file is part of systemd. | ||
2 | # | ||
3 | # systemd is free software; you can redistribute it and/or modify it | ||
4 | # under the terms of the GNU General Public License as published by | ||
5 | # the Free Software Foundation; either version 2 of the License, or | ||
6 | # (at your option) any later version. | ||
7 | |||
8 | [Unit] | ||
9 | Description=Serial Getty on %I | ||
10 | BindTo=dev-%i.device | ||
11 | After=dev-%i.device systemd-user-sessions.service | ||
12 | |||
13 | # If additional gettys are spawned during boot then we should make | ||
14 | # sure that this is synchronized before getty.target, even though | ||
15 | # getty.target didn't actually pull it in. | ||
16 | Before=getty.target | ||
17 | |||
18 | [Service] | ||
19 | Environment=TERM=vt100 | ||
20 | ExecStart=-/sbin/agetty -s %I @BAUDRATE@ | ||
21 | Restart=always | ||
22 | RestartSec=0 | ||
23 | UtmpIdentifier=%I | ||
24 | TTYPath=/dev/%I | ||
25 | TTYReset=yes | ||
26 | TTYVHangup=yes | ||
27 | KillMode=process | ||
28 | IgnoreSIGPIPE=no | ||
29 | |||
30 | # Some login implementations ignore SIGTERM, so we send SIGHUP | ||
31 | # instead, to ensure that login terminates cleanly. | ||
32 | KillSignal=SIGHUP | ||
diff --git a/meta-oe/recipes-core/systemd/systemd-speed-hacks.bb b/meta-oe/recipes-core/systemd/systemd-speed-hacks.bb deleted file mode 100644 index 8cfcc4c37..000000000 --- a/meta-oe/recipes-core/systemd/systemd-speed-hacks.bb +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | DESCRIPTION = "Collection of hacks to speed up systemd boot" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | ||
4 | |||
5 | PR = "r1" | ||
6 | |||
7 | inherit allarch | ||
8 | |||
9 | ALLOW_EMPTY_${PN} = "1" | ||
10 | |||
11 | pkg_postinst_${PN} () { | ||
12 | #!/bin/sh | ||
13 | # I can run offline | ||
14 | rm -f $D/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup.service | ||
15 | |||
16 | rm -f $D/lib/systemd/system/sysinit.target.wants/sys-fs-fuse-connections.mount | ||
17 | rm -f $D/lib/systemd/system/sysinit.target.wants/sys-kernel-debug.mount | ||
18 | } | ||
diff --git a/meta-oe/recipes-core/systemd/systemd-systemctl-native.bb b/meta-oe/recipes-core/systemd/systemd-systemctl-native.bb deleted file mode 100644 index 7ca77ae18..000000000 --- a/meta-oe/recipes-core/systemd/systemd-systemctl-native.bb +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | DESCRIPTION = "Wrapper to enable of systemd services" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" | ||
5 | |||
6 | PR = "r3" | ||
7 | |||
8 | inherit native | ||
9 | |||
10 | SRC_URI = "file://systemctl" | ||
11 | |||
12 | do_install() { | ||
13 | install -d ${D}${bindir} | ||
14 | install -m 0755 ${WORKDIR}/systemctl ${D}${bindir} | ||
15 | } | ||
diff --git a/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl b/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl deleted file mode 100755 index ff9e6a751..000000000 --- a/meta-oe/recipes-core/systemd/systemd-systemctl-native/systemctl +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | echo "Started $0 $*" | ||
3 | |||
4 | ROOT= | ||
5 | |||
6 | # parse command line params | ||
7 | action= | ||
8 | while [ $# != 0 ]; do | ||
9 | opt="$1" | ||
10 | |||
11 | case "$opt" in | ||
12 | enable) | ||
13 | shift | ||
14 | |||
15 | action="$opt" | ||
16 | services="$1" | ||
17 | cmd_args="1" | ||
18 | shift | ||
19 | ;; | ||
20 | disable) | ||
21 | shift | ||
22 | |||
23 | action="$opt" | ||
24 | services="$1" | ||
25 | cmd_args="1" | ||
26 | shift | ||
27 | ;; | ||
28 | --root=*) | ||
29 | ROOT=${opt##--root=} | ||
30 | cmd_args="0" | ||
31 | shift | ||
32 | ;; | ||
33 | *) | ||
34 | if [ "$cmd_args" = "1" ]; then | ||
35 | services="$services $opt" | ||
36 | shift | ||
37 | else | ||
38 | echo "'$opt' is an unkown option; exiting with error" | ||
39 | exit 1 | ||
40 | fi | ||
41 | ;; | ||
42 | esac | ||
43 | done | ||
44 | |||
45 | for service in $services; do | ||
46 | echo "Try to find location of $service..." | ||
47 | # find service file | ||
48 | for p in $ROOT/etc/systemd/system \ | ||
49 | $ROOT/lib/systemd/system \ | ||
50 | $ROOT/usr/lib/systemd/system; do | ||
51 | if [ -e $p/$service ]; then | ||
52 | service_file=$p/$service | ||
53 | service_file=${service_file##$ROOT} | ||
54 | fi | ||
55 | done | ||
56 | if [ -z "$service_file" ]; then | ||
57 | echo "'$service' couldn't be found; exiting with error" | ||
58 | exit 1 | ||
59 | fi | ||
60 | echo "Found $service in $service_file" | ||
61 | |||
62 | # create the required symbolic links | ||
63 | wanted_by=$(grep WantedBy $ROOT/$service_file \ | ||
64 | | sed 's,WantedBy=,,g' \ | ||
65 | | tr ',' '\n' \ | ||
66 | | grep '\.target$') | ||
67 | |||
68 | for r in $wanted_by; do | ||
69 | echo "WantedBy=$r found in $service" | ||
70 | if [ "$action" = "enable" ]; then | ||
71 | mkdir -p $ROOT/etc/systemd/system/$r.wants | ||
72 | ln -s $service_file $ROOT/etc/systemd/system/$r.wants | ||
73 | echo "Enabled $service for $wanted_by." | ||
74 | else | ||
75 | rm -f $ROOT/etc/systemd/system/$r.wants/$service | ||
76 | rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.wants | ||
77 | echo "Disabled $service for $wanted_by." | ||
78 | fi | ||
79 | done | ||
80 | |||
81 | # call us for the other required scripts | ||
82 | also=$(grep Also $ROOT/$service_file \ | ||
83 | | sed 's,Also=,,g' \ | ||
84 | | tr ',' '\n') | ||
85 | for a in $also; do | ||
86 | echo "Also=$a found in $service" | ||
87 | if [ "$action" = "enable" ]; then | ||
88 | $0 --root=$ROOT enable $a | ||
89 | fi | ||
90 | done | ||
91 | done | ||
diff --git a/meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch b/meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch deleted file mode 100644 index dd86121bb..000000000 --- a/meta-oe/recipes-core/systemd/systemd/format-replace-m-uclibc.patch +++ /dev/null | |||
@@ -1,389 +0,0 @@ | |||
1 | Patch from Henning. %m is a glibc only thing. For uclibc we need to do it | ||
2 | differently. So we use static strings instead of mallocing them and free'ing | ||
3 | |||
4 | I dont know if upstream systemd have plans to make systemd work on non | ||
5 | glibc system libraries if not then this patch would not make sense for | ||
6 | upstream | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | |||
10 | Index: git/src/mount-setup.c | ||
11 | =================================================================== | ||
12 | --- git.orig/src/mount-setup.c 2012-01-26 21:15:12.573084007 -0800 | ||
13 | +++ git/src/mount-setup.c 2012-01-26 21:15:16.005084174 -0800 | ||
14 | @@ -182,10 +182,10 @@ | ||
15 | (void) fgets(buf, sizeof(buf), f); | ||
16 | |||
17 | for (;;) { | ||
18 | - char *controller; | ||
19 | + char controller[30]; | ||
20 | int enabled = 0; | ||
21 | |||
22 | - if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 2) { | ||
23 | + if (fscanf(f, "%s %*i %*i %i", controller, &enabled) != 2) { | ||
24 | |||
25 | if (feof(f)) | ||
26 | break; | ||
27 | @@ -196,14 +196,12 @@ | ||
28 | } | ||
29 | |||
30 | if (!enabled) { | ||
31 | - free(controller); | ||
32 | continue; | ||
33 | } | ||
34 | |||
35 | r = set_put(controllers, controller); | ||
36 | if (r < 0) { | ||
37 | log_error("Failed to add controller to set."); | ||
38 | - free(controller); | ||
39 | goto finish; | ||
40 | } | ||
41 | } | ||
42 | @@ -273,7 +271,6 @@ | ||
43 | p.fatal = false; | ||
44 | |||
45 | r = mount_one(&p, true); | ||
46 | - free(controller); | ||
47 | free(where); | ||
48 | |||
49 | if (r < 0) { | ||
50 | Index: git/src/socket-util.c | ||
51 | =================================================================== | ||
52 | --- git.orig/src/socket-util.c 2012-01-26 21:15:12.593084008 -0800 | ||
53 | +++ git/src/socket-util.c 2012-01-26 21:15:16.005084174 -0800 | ||
54 | @@ -192,7 +192,7 @@ | ||
55 | int socket_address_parse_netlink(SocketAddress *a, const char *s) { | ||
56 | int family; | ||
57 | unsigned group = 0; | ||
58 | - char* sfamily = NULL; | ||
59 | + char sfamily[50]; | ||
60 | assert(a); | ||
61 | assert(s); | ||
62 | |||
63 | @@ -200,17 +200,14 @@ | ||
64 | a->type = SOCK_RAW; | ||
65 | |||
66 | errno = 0; | ||
67 | - if (sscanf(s, "%ms %u", &sfamily, &group) < 1) | ||
68 | + if (sscanf(s, "%49s %u", &sfamily, &group) < 1) | ||
69 | return errno ? -errno : -EINVAL; | ||
70 | |||
71 | if ((family = netlink_family_from_string(sfamily)) < 0) | ||
72 | if (safe_atoi(sfamily, &family) < 0) { | ||
73 | - free(sfamily); | ||
74 | return -EINVAL; | ||
75 | } | ||
76 | |||
77 | - free(sfamily); | ||
78 | - | ||
79 | a->sockaddr.nl.nl_family = AF_NETLINK; | ||
80 | a->sockaddr.nl.nl_groups = group; | ||
81 | |||
82 | Index: git/src/swap.c | ||
83 | =================================================================== | ||
84 | --- git.orig/src/swap.c 2012-01-26 21:15:12.593084008 -0800 | ||
85 | +++ git/src/swap.c 2012-01-26 21:15:16.005084174 -0800 | ||
86 | @@ -1049,11 +1049,12 @@ | ||
87 | (void) fscanf(m->proc_swaps, "%*s %*s %*s %*s %*s\n"); | ||
88 | |||
89 | for (i = 1;; i++) { | ||
90 | - char *dev = NULL, *d; | ||
91 | + char *d; | ||
92 | + char dev[20]; | ||
93 | int prio = 0, k; | ||
94 | |||
95 | if ((k = fscanf(m->proc_swaps, | ||
96 | - "%ms " /* device/file */ | ||
97 | + "%19s " /* device/file */ | ||
98 | "%*s " /* type of swap */ | ||
99 | "%*s " /* swap size */ | ||
100 | "%*s " /* used */ | ||
101 | @@ -1064,12 +1065,10 @@ | ||
102 | break; | ||
103 | |||
104 | log_warning("Failed to parse /proc/swaps:%u.", i); | ||
105 | - free(dev); | ||
106 | continue; | ||
107 | } | ||
108 | |||
109 | d = cunescape(dev); | ||
110 | - free(dev); | ||
111 | |||
112 | if (!d) | ||
113 | return -ENOMEM; | ||
114 | Index: git/src/tmpfiles.c | ||
115 | =================================================================== | ||
116 | --- git.orig/src/tmpfiles.c 2012-01-26 21:15:12.617084010 -0800 | ||
117 | +++ git/src/tmpfiles.c 2012-01-26 23:17:01.185437712 -0800 | ||
118 | @@ -73,8 +73,8 @@ | ||
119 | typedef struct Item { | ||
120 | ItemType type; | ||
121 | |||
122 | - char *path; | ||
123 | - char *argument; | ||
124 | + char path[50]; | ||
125 | + char argument[50]; | ||
126 | uid_t uid; | ||
127 | gid_t gid; | ||
128 | mode_t mode; | ||
129 | @@ -822,7 +822,6 @@ | ||
130 | case CREATE_CHAR_DEVICE: | ||
131 | case CREATE_BLOCK_DEVICE: | ||
132 | case IGNORE_PATH: | ||
133 | - case RELABEL_PATH: | ||
134 | case RECURSIVE_RELABEL_PATH: | ||
135 | case WRITE_FILE: | ||
136 | break; | ||
137 | @@ -858,8 +857,6 @@ | ||
138 | static void item_free(Item *i) { | ||
139 | assert(i); | ||
140 | |||
141 | - free(i->path); | ||
142 | - free(i->argument); | ||
143 | free(i); | ||
144 | } | ||
145 | |||
146 | @@ -906,7 +903,7 @@ | ||
147 | |||
148 | static int parse_line(const char *fname, unsigned line, const char *buffer) { | ||
149 | Item *i, *existing; | ||
150 | - char *mode = NULL, *user = NULL, *group = NULL, *age = NULL; | ||
151 | + char mode[50], user[50], group[50], age[50]; | ||
152 | char type; | ||
153 | Hashmap *h; | ||
154 | int r, n = -1; | ||
155 | @@ -923,18 +920,18 @@ | ||
156 | |||
157 | if (sscanf(buffer, | ||
158 | "%c " | ||
159 | - "%ms " | ||
160 | - "%ms " | ||
161 | - "%ms " | ||
162 | - "%ms " | ||
163 | - "%ms " | ||
164 | + "%s " | ||
165 | + "%s " | ||
166 | + "%s " | ||
167 | + "%s " | ||
168 | + "%s " | ||
169 | "%n", | ||
170 | &type, | ||
171 | &i->path, | ||
172 | - &mode, | ||
173 | - &user, | ||
174 | - &group, | ||
175 | - &age, | ||
176 | + mode, | ||
177 | + user, | ||
178 | + group, | ||
179 | + age, | ||
180 | &n) < 2) { | ||
181 | log_error("[%s:%u] Syntax error.", fname, line); | ||
182 | r = -EIO; | ||
183 | @@ -944,7 +941,7 @@ | ||
184 | if (n >= 0) { | ||
185 | n += strspn(buffer+n, WHITESPACE); | ||
186 | if (buffer[n] != 0 && (buffer[n] != '-' || buffer[n+1] != 0)) { | ||
187 | - i->argument = unquote(buffer+n, "\""); | ||
188 | + strcpy(i->argument, unquote(buffer+n, "\"")); | ||
189 | if (!i->argument) { | ||
190 | log_error("Out of memory"); | ||
191 | return -ENOMEM; | ||
192 | @@ -1096,11 +1093,6 @@ | ||
193 | r = 0; | ||
194 | |||
195 | finish: | ||
196 | - free(user); | ||
197 | - free(group); | ||
198 | - free(mode); | ||
199 | - free(age); | ||
200 | - | ||
201 | if (i) | ||
202 | item_free(i); | ||
203 | |||
204 | Index: git/src/mount.c | ||
205 | =================================================================== | ||
206 | --- git.orig/src/mount.c 2012-01-26 21:15:12.573084007 -0800 | ||
207 | +++ git/src/mount.c 2012-01-26 21:15:16.005084174 -0800 | ||
208 | @@ -24,6 +24,7 @@ | ||
209 | #include <mntent.h> | ||
210 | #include <sys/epoll.h> | ||
211 | #include <signal.h> | ||
212 | +#include <string.h> | ||
213 | |||
214 | #include "unit.h" | ||
215 | #include "mount.h" | ||
216 | @@ -1561,7 +1562,13 @@ | ||
217 | static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) { | ||
218 | int r = 0; | ||
219 | unsigned i; | ||
220 | - char *device, *path, *options, *options2, *fstype, *d, *p, *o; | ||
221 | + char *d, *p, *o; | ||
222 | + char device[50]; | ||
223 | + char path[50]; | ||
224 | + char options[50]; | ||
225 | + char options2[50]; | ||
226 | + char fstype[50]; | ||
227 | + | ||
228 | |||
229 | assert(m); | ||
230 | |||
231 | @@ -1570,26 +1577,26 @@ | ||
232 | for (i = 1;; i++) { | ||
233 | int k; | ||
234 | |||
235 | - device = path = options = options2 = fstype = d = p = o = NULL; | ||
236 | + d = p = o = NULL; | ||
237 | |||
238 | if ((k = fscanf(m->proc_self_mountinfo, | ||
239 | "%*s " /* (1) mount id */ | ||
240 | "%*s " /* (2) parent id */ | ||
241 | "%*s " /* (3) major:minor */ | ||
242 | "%*s " /* (4) root */ | ||
243 | - "%ms " /* (5) mount point */ | ||
244 | - "%ms" /* (6) mount options */ | ||
245 | + "%49s " /* (5) mount point */ | ||
246 | + "%49s" /* (6) mount options */ | ||
247 | "%*[^-]" /* (7) optional fields */ | ||
248 | "- " /* (8) separator */ | ||
249 | - "%ms " /* (9) file system type */ | ||
250 | - "%ms" /* (10) mount source */ | ||
251 | - "%ms" /* (11) mount options 2 */ | ||
252 | + "%49s " /* (9) file system type */ | ||
253 | + "%49s" /* (10) mount source */ | ||
254 | + "%49s" /* (11) mount options 2 */ | ||
255 | "%*[^\n]", /* some rubbish at the end */ | ||
256 | - &path, | ||
257 | - &options, | ||
258 | - &fstype, | ||
259 | - &device, | ||
260 | - &options2)) != 5) { | ||
261 | + path, | ||
262 | + options, | ||
263 | + fstype, | ||
264 | + device, | ||
265 | + options2)) != 5) { | ||
266 | |||
267 | if (k == EOF) | ||
268 | break; | ||
269 | @@ -1613,22 +1620,12 @@ | ||
270 | r = k; | ||
271 | |||
272 | clean_up: | ||
273 | - free(device); | ||
274 | - free(path); | ||
275 | - free(options); | ||
276 | - free(options2); | ||
277 | - free(fstype); | ||
278 | free(d); | ||
279 | free(p); | ||
280 | free(o); | ||
281 | } | ||
282 | |||
283 | finish: | ||
284 | - free(device); | ||
285 | - free(path); | ||
286 | - free(options); | ||
287 | - free(options2); | ||
288 | - free(fstype); | ||
289 | free(d); | ||
290 | free(p); | ||
291 | free(o); | ||
292 | Index: git/src/umount.c | ||
293 | =================================================================== | ||
294 | --- git.orig/src/umount.c 2012-01-26 21:15:12.617084010 -0800 | ||
295 | +++ git/src/umount.c 2012-01-26 21:15:16.005084174 -0800 | ||
296 | @@ -60,7 +60,9 @@ | ||
297 | |||
298 | static int mount_points_list_get(MountPoint **head) { | ||
299 | FILE *proc_self_mountinfo; | ||
300 | - char *path, *p; | ||
301 | + char *p; | ||
302 | + char path[50]; | ||
303 | + | ||
304 | unsigned int i; | ||
305 | int r; | ||
306 | |||
307 | @@ -72,17 +74,17 @@ | ||
308 | for (i = 1;; i++) { | ||
309 | int k; | ||
310 | MountPoint *m; | ||
311 | - char *root; | ||
312 | + char root[50]; | ||
313 | bool skip_ro; | ||
314 | |||
315 | - path = p = NULL; | ||
316 | + p = NULL; | ||
317 | |||
318 | if ((k = fscanf(proc_self_mountinfo, | ||
319 | "%*s " /* (1) mount id */ | ||
320 | "%*s " /* (2) parent id */ | ||
321 | "%*s " /* (3) major:minor */ | ||
322 | - "%ms " /* (4) root */ | ||
323 | - "%ms " /* (5) mount point */ | ||
324 | + "%49s " /* (4) root */ | ||
325 | + "%49s " /* (5) mount point */ | ||
326 | "%*s" /* (6) mount options */ | ||
327 | "%*[^-]" /* (7) optional fields */ | ||
328 | "- " /* (8) separator */ | ||
329 | @@ -90,24 +92,21 @@ | ||
330 | "%*s" /* (10) mount source */ | ||
331 | "%*s" /* (11) mount options 2 */ | ||
332 | "%*[^\n]", /* some rubbish at the end */ | ||
333 | - &root, | ||
334 | - &path)) != 2) { | ||
335 | + root, | ||
336 | + path)) != 2) { | ||
337 | if (k == EOF) | ||
338 | break; | ||
339 | |||
340 | log_warning("Failed to parse /proc/self/mountinfo:%u.", i); | ||
341 | |||
342 | - free(path); | ||
343 | continue; | ||
344 | } | ||
345 | |||
346 | /* If we encounter a bind mount, don't try to remount | ||
347 | * the source dir too early */ | ||
348 | skip_ro = !streq(root, "/"); | ||
349 | - free(root); | ||
350 | |||
351 | p = cunescape(path); | ||
352 | - free(path); | ||
353 | |||
354 | if (!p) { | ||
355 | r = -ENOMEM; | ||
356 | @@ -152,28 +151,28 @@ | ||
357 | |||
358 | for (i = 2;; i++) { | ||
359 | MountPoint *swap; | ||
360 | - char *dev = NULL, *d; | ||
361 | + char *d; | ||
362 | + char dev[50]; | ||
363 | + | ||
364 | int k; | ||
365 | |||
366 | if ((k = fscanf(proc_swaps, | ||
367 | - "%ms " /* device/file */ | ||
368 | + "%50s " /* device/file */ | ||
369 | "%*s " /* type of swap */ | ||
370 | "%*s " /* swap size */ | ||
371 | "%*s " /* used */ | ||
372 | "%*s\n", /* priority */ | ||
373 | - &dev)) != 1) { | ||
374 | + dev)) != 1) { | ||
375 | |||
376 | if (k == EOF) | ||
377 | break; | ||
378 | |||
379 | log_warning("Failed to parse /proc/swaps:%u.", i); | ||
380 | |||
381 | - free(dev); | ||
382 | continue; | ||
383 | } | ||
384 | |||
385 | if (endswith(dev, "(deleted)")) { | ||
386 | - free(dev); | ||
387 | continue; | ||
388 | } | ||
389 | |||
diff --git a/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch b/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch deleted file mode 100644 index ca10440a8..000000000 --- a/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | uclibc does not have mkostemp() so we redefine it to use mkstemp() | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | |||
5 | Index: git/src/macro.h | ||
6 | =================================================================== | ||
7 | --- git.orig/src/macro.h 2011-06-30 10:33:53.000000000 -0700 | ||
8 | +++ git/src/macro.h 2011-06-30 15:07:28.285270006 -0700 | ||
9 | @@ -27,6 +27,10 @@ | ||
10 | #include <sys/uio.h> | ||
11 | #include <inttypes.h> | ||
12 | |||
13 | +#ifdef __UCLIBC__ | ||
14 | +/* uclibc does not implement mkostemp GNU extention */ | ||
15 | +#define mkostemp(x,y) mkstemp(x) | ||
16 | +#endif | ||
17 | #define _printf_attr_(a,b) __attribute__ ((format (printf, a, b))) | ||
18 | #define _sentinel_ __attribute__ ((sentinel)) | ||
19 | #define _noreturn_ __attribute__((noreturn)) | ||
diff --git a/meta-oe/recipes-core/systemd/systemd_git.bb b/meta-oe/recipes-core/systemd/systemd_git.bb deleted file mode 100644 index f4ca72a12..000000000 --- a/meta-oe/recipes-core/systemd/systemd_git.bb +++ /dev/null | |||
@@ -1,156 +0,0 @@ | |||
1 | DESCRIPTION = "Systemd a init replacement" | ||
2 | HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd" | ||
3 | LICENSE = "GPLv2+" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" | ||
5 | |||
6 | DEPENDS = "xz kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline udev dbus libcap libcgroup tcp-wrappers" | ||
7 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
8 | |||
9 | SERIAL_CONSOLE ?= "115200 /dev/ttyS0" | ||
10 | |||
11 | SECTION = "base/shell" | ||
12 | |||
13 | inherit gitpkgv | ||
14 | PKGV = "v${GITPKGVTAG}" | ||
15 | |||
16 | PV = "git" | ||
17 | PR = "r27" | ||
18 | |||
19 | inherit useradd pkgconfig autotools vala perlnative | ||
20 | |||
21 | SRCREV = "3eff4208ffecedd778fec260f0d4b18e94dab443" | ||
22 | |||
23 | SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;protocol=git \ | ||
24 | ${UCLIBCPATCHES} \ | ||
25 | " | ||
26 | UCLIBCPATCHES = "" | ||
27 | UCLIBCPATCHES_libc-uclibc = "file://paper-over-mkostemp.patch \ | ||
28 | file://format-replace-m-uclibc.patch \ | ||
29 | " | ||
30 | |||
31 | LDFLAGS_libc-uclibc_append = " -lrt" | ||
32 | |||
33 | S = "${WORKDIR}/git" | ||
34 | |||
35 | SYSTEMDDISTRO ?= "debian" | ||
36 | SYSTEMDDISTRO_angstrom = "angstrom" | ||
37 | |||
38 | # The gtk+ tools should get built as a separate recipe e.g. systemd-tools | ||
39 | EXTRA_OECONF = " --with-distro=${SYSTEMDDISTRO} \ | ||
40 | --with-rootprefix=${base_prefix} \ | ||
41 | --with-rootlibdir=${base_libdir} \ | ||
42 | ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \ | ||
43 | --disable-gtk \ | ||
44 | --enable-xz \ | ||
45 | --disable-manpages \ | ||
46 | --disable-coredump \ | ||
47 | " | ||
48 | |||
49 | # There's no docbook-xsl-native, so for the xsltproc check to false | ||
50 | do_configure_prepend() { | ||
51 | sed -i /xsltproc/d configure.ac | ||
52 | |||
53 | # we only have /home/root, not /root | ||
54 | sed -i -e 's:=/root:=/home/root:g' units/*.service* | ||
55 | } | ||
56 | |||
57 | do_install() { | ||
58 | autotools_do_install | ||
59 | # provided by a seperate recipe | ||
60 | rm ${D}${systemd_unitdir}/system/serial-getty* -f | ||
61 | |||
62 | # provide support for initramfs | ||
63 | ln -s ${systemd_unitdir}/systemd ${D}/init | ||
64 | |||
65 | # create dir for journal | ||
66 | install -d ${D}${localstatedir}/log/journal | ||
67 | |||
68 | # create machine-id | ||
69 | # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable | ||
70 | touch ${D}${sysconfdir}/machine-id | ||
71 | } | ||
72 | |||
73 | python populate_packages_prepend (){ | ||
74 | systemdlibdir = d.getVar("base_libdir", True) | ||
75 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) | ||
76 | } | ||
77 | |||
78 | PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze" | ||
79 | |||
80 | USERADD_PACKAGES = "${PN}" | ||
81 | GROUPADD_PARAM_${PN} = "-r lock" | ||
82 | |||
83 | FILES_${PN}-analyze = "${bindir}/systemd-analyze" | ||
84 | RDEPENDS_${PN}-analyze = "python-dbus" | ||
85 | RRECOMMENDS_${PN}-analyze = "python-pycairo" | ||
86 | |||
87 | FILES_${PN}-initramfs = "/init" | ||
88 | RDEPENDS_${PN}-initramfs = "${PN}" | ||
89 | |||
90 | FILES_${PN}-gui = "${bindir}/systemadm" | ||
91 | |||
92 | FILES_${PN}-vconsole-setup = "${systemd_unitdir}/systemd-vconsole-setup \ | ||
93 | ${systemd_unitdir}/system/systemd-vconsole-setup.service \ | ||
94 | ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service" | ||
95 | |||
96 | RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts" | ||
97 | |||
98 | FILES_${PN} = " ${base_bindir}/* \ | ||
99 | ${datadir}/dbus-1/services \ | ||
100 | ${datadir}/dbus-1/system-services \ | ||
101 | ${datadir}/polkit-1 \ | ||
102 | ${datadir}/${PN} \ | ||
103 | ${sysconfdir} \ | ||
104 | ${systemd_unitdir}/* \ | ||
105 | ${systemd_unitdir}/system/* \ | ||
106 | ${base_libdir}/udev/rules.d \ | ||
107 | ${base_libdir}/security/*.so \ | ||
108 | /cgroup \ | ||
109 | ${bindir}/systemd* \ | ||
110 | ${libdir}/tmpfiles.d/*.conf \ | ||
111 | ${libdir}/systemd \ | ||
112 | ${libdir}/binfmt.d \ | ||
113 | ${libdir}/modules-load.d \ | ||
114 | ${libdir}/sysctl.d \ | ||
115 | ${localstatedir} \ | ||
116 | ${libexecdir} \ | ||
117 | " | ||
118 | |||
119 | FILES_${PN}-dbg += "${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" | ||
120 | FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/" | ||
121 | |||
122 | RDEPENDS_${PN} += "dbus-systemd udev-systemd" | ||
123 | |||
124 | # kbd -> loadkeys,setfont | ||
125 | # systemd calls 'modprobe -sab --', which busybox doesn't support due to lack | ||
126 | # of blacklist support, so use proper modprobe from module-init-tools | ||
127 | # And pull in the kernel modules mentioned in INSTALL | ||
128 | # swapon -p is also not supported by busybox | ||
129 | # busybox mount is broken | ||
130 | RRECOMMENDS_${PN} += "systemd-serialgetty \ | ||
131 | util-linux-agetty \ | ||
132 | util-linux-swaponoff \ | ||
133 | util-linux-fsck e2fsprogs-e2fsck \ | ||
134 | module-init-tools \ | ||
135 | util-linux-mount util-linux-umount \ | ||
136 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \ | ||
137 | " | ||
138 | |||
139 | # TODO: | ||
140 | # u-a for runlevel and telinit | ||
141 | |||
142 | pkg_postinst_systemd () { | ||
143 | update-alternatives --install ${base_sbindir}/init init ${systemd_unitdir}/systemd 300 | ||
144 | update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl 300 | ||
145 | update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300 | ||
146 | update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300 | ||
147 | update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300 | ||
148 | } | ||
149 | |||
150 | pkg_prerm_systemd () { | ||
151 | update-alternatives --remove init ${systemd_unitdir}/systemd | ||
152 | update-alternatives --remove halt ${base_bindir}/systemctl | ||
153 | update-alternatives --remove reboot ${base_bindir}/systemctl | ||
154 | update-alternatives --remove shutdown ${base_bindir}/systemctl | ||
155 | update-alternatives --remove poweroff ${base_bindir}/systemctl | ||
156 | } | ||