1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-dev] [soft-commits] [2494] Port stage2 to use udev.
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20%5Bsoft-commits%5D%20%5B2494%5D%20Port%20stage2%20to%20use%20udev.&In-Reply-To=%3CCAONrEtZg1h2e0kFq5_EtxK%2BSz7dX%3DmVYf-JbHXsFojN6qBkW1A%40mail.gmail.com%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="010718.html">
<LINK REL="Next" HREF="010813.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-dev] [soft-commits] [2494] Port stage2 to use udev.</H1>
<B>Thierry Vignaud</B>
<A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20%5Bsoft-commits%5D%20%5B2494%5D%20Port%20stage2%20to%20use%20udev.&In-Reply-To=%3CCAONrEtZg1h2e0kFq5_EtxK%2BSz7dX%3DmVYf-JbHXsFojN6qBkW1A%40mail.gmail.com%3E"
TITLE="[Mageia-dev] [soft-commits] [2494] Port stage2 to use udev.">thierry.vignaud at gmail.com
</A><BR>
<I>Tue Dec 20 12:07:33 CET 2011</I>
<P><UL>
<LI>Previous message: <A HREF="010718.html">[Mageia-dev] Fwd: Re: [Cooker] System can stall under heavy IOs with slow storage devices
</A></li>
<LI>Next message: <A HREF="010813.html">[Mageia-dev] [soft-commits] [2494] Port stage2 to use udev.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#10667">[ date ]</a>
<a href="thread.html#10667">[ thread ]</a>
<a href="subject.html#10667">[ subject ]</a>
<a href="author.html#10667">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>On 19 December 2011 23:47, <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">root at mageia.org</A>> wrote:
><i> Log Message
</I>><i>
</I>><i> Port stage2 to use udev.
</I>><i>
</I>><i> In order to run dracut in the installer, it is necessary to have a working
</I>><i> udev setup (specifically /dev/block/* nodes, but there may be other
</I>><i> requirements).
</I>><i>
</I>><i> As dracut is needed by systemd when /usr is on a separate partition, we need
</I>><i> udev in the installer in order to support systemd generally.
</I>><i>
</I>><i> Modified Paths
</I>><i>
</I>><i> drakx/trunk/perl-install/install/Makefile
</I>><i> drakx/trunk/perl-install/install/install2.pm
</I>><i> drakx/trunk/perl-install/install/share/list.xml
</I>><i>
</I>><i> Modified: drakx/trunk/perl-install/install/Makefile
</I>><i> ===================================================================
</I>><i> --- drakx/trunk/perl-install/install/Makefile 2011-12-19 21:36:04 UTC (rev
</I>><i> 2493)
</I>><i> +++ drakx/trunk/perl-install/install/Makefile 2011-12-19 22:47:15 UTC (rev
</I>><i> 2494)
</I>><i> @@ -47,6 +47,7 @@
</I>><i>
</I>><i> get_needed_files: xs
</I>><i> REP4PMS=$(REP4PMS) ../../tools/install-xml-file-list share/list.xml
</I>><i> $(DEST)
</I>><i> + mkdir -p $(DEST)/run
</I>
That won't work. stage2 is mounted by stage1 in /tmp/stage2
so you want to create & include it in stage1
><i> Modified: drakx/trunk/perl-install/install/install2.pm
</I>><i> ===================================================================
</I>><i> --- drakx/trunk/perl-install/install/install2.pm 2011-12-19 21:36:04 UTC
</I>><i> (rev 2493)
</I>><i> +++ drakx/trunk/perl-install/install/install2.pm 2011-12-19 22:47:15 UTC
</I>><i> (rev 2494)
</I>><i> @@ -395,6 +395,24 @@
</I>><i> eval { fs::mount::mount('none', '/sys', 'sysfs', 1) };
</I>><i> eval { touch('/root/non-chrooted-marker.DrakX') }; #- helps
</I>><i> distinguishing /root and /mnt/root when we don't know if we are chrooted
</I>><i>
</I>><i> + # Ensure /run is mounted
</I>><i> + mkdir "/run", 0755;
</I>><i> + run_program::run("mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs
</I>><i> /run");
</I>><i> + mkdir "/run/udev", 0755;
</I>><i> + mkdir "/run/udev/rules.d", 0755;
</I>><i> + $ENV{UDEVRULESD} = "/run/udev/rules.d";
</I>><i> +
</I>><i> + # Start up udev and trigger cold plugs
</I>><i> + run_program::run("mount", "-t", "devtmpfs", "-o", "mode=0755,nosuid",
</I>><i> "devtmpfs", "/dev");
</I>><i> + mkdir "/dev/pts", 0755;
</I>><i> + run_program::run("mount", "-t", "devpts", "-o",
</I>><i> "gid=5,mode=620,noexec,nosuid", "devpts", "/dev/pts");
</I>><i> + mkdir "/dev/shm", 0755;
</I>><i> + run_program::run("mount", "-t", "tmpfs", "-o",
</I>><i> "mode=1777,nosuid,nodev", "tmpfs", "/dev/shm");
</I>><i> +
</I>><i> + run_program::run("/lib/udev/udevd", "--daemon",
</I>><i> "--resolve-names=never");
</I>><i> + run_program::run("udevadm", "trigger", "--type=subsystems",
</I>><i> "--action=add");
</I>><i> + run_program::run("udevadm", "trigger", "--type=devices",
</I>><i> "--action=add");
</I>
A few remarks:
1) this is a little big, so better split it this into a new
start_udev() function
2) we prefer the fct(args) style over "fct args"
(which is enforced by perl_checker)
3) which bring me to the last item: you should run perl_checker
See /usr/share/doc/perl_checker/perl_checker.html &
/usr/share/doc/perl-MDK-Common/tutorial.html
It can be simply called from within emacs (or vim)
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="010718.html">[Mageia-dev] Fwd: Re: [Cooker] System can stall under heavy IOs with slow storage devices
</A></li>
<LI>Next message: <A HREF="010813.html">[Mageia-dev] [soft-commits] [2494] Port stage2 to use udev.
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#10667">[ date ]</a>
<a href="thread.html#10667">[ thread ]</a>
<a href="subject.html#10667">[ subject ]</a>
<a href="author.html#10667">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>
|