summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2011-December/010670.html
blob: 7c291d4033153e3963014b4762e91d0af57b7020 (plain)
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
173
174
175
176
177
178
179
180
181
182
183
184
185
<!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=%3CCAONrEtb14fH7sPrZNZNZj04kScmT-k6ULwPnVZcor7R23wH58Q%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="010831.html">
   <LINK REL="Next"  HREF="010681.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=%3CCAONrEtb14fH7sPrZNZNZj04kScmT-k6ULwPnVZcor7R23wH58Q%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:42:38 CET 2011</I>
    <P><UL>
        <LI>Previous message: <A HREF="010831.html">[Mageia-dev] [soft-commits] [2494] Port stage2 to use udev.
</A></li>
        <LI>Next message: <A HREF="010681.html">[Mageia-dev] [soft-commits] [2494] Port stage2 to use udev.
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#10670">[ date ]</a>
              <a href="thread.html#10670">[ thread ]</a>
              <a href="subject.html#10670">[ subject ]</a>
              <a href="author.html#10670">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>On 20 December 2011 12:19, Colin Guthrie &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">colin at guthr.ie</A>&gt; wrote:
&gt;&gt;&gt;<i> &#160;get_needed_files: xs
</I>&gt;&gt;&gt;<i> &#160; &#160; &#160;REP4PMS=$(REP4PMS) ../../tools/install-xml-file-list share/list.xml
</I>&gt;&gt;&gt;<i> $(DEST)
</I>&gt;&gt;&gt;<i> + &#160; &#160;mkdir -p $(DEST)/run
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> That won't work. stage2 is mounted by stage1 in /tmp/stage2
</I>&gt;&gt;<i> so you want to create &amp; include it in stage1
</I>&gt;<i>
</I>&gt;<i> Right... strangely enough some stuff still worked fine... e.g.
</I>&gt;<i> /lib/udev/udevd exists inside the installer shell.... so that's why I
</I>&gt;<i> thought all was well. I double check a few things.
</I>&gt;<i>
</I>&gt;<i> Technically it's not super important that /run exists anyway as I mkdir
</I>&gt;<i> it later, so this bit can probably be dropped.
</I>
Either you create it in stage1 or in the sub starting udev, but anyway
the Makefile should be reverted

&gt;&gt;&gt;<i> --- drakx/trunk/perl-install/install/install2.pm &#160; &#160; 2011-12-19 21:36:04 UTC
</I>&gt;&gt;&gt;<i> (rev 2493)
</I>&gt;&gt;&gt;<i> +++ drakx/trunk/perl-install/install/install2.pm &#160; &#160; 2011-12-19 22:47:15 UTC
</I>&gt;&gt;&gt;<i> (rev 2494)
</I>&gt;&gt;&gt;<i> @@ -395,6 +395,24 @@
</I>&gt;&gt;&gt;<i> &#160; &#160; &#160;eval { fs::mount::mount('none', '/sys', 'sysfs', 1) };
</I>&gt;&gt;&gt;<i> &#160; &#160; &#160;eval { touch('/root/non-chrooted-marker.DrakX') }; #- helps
</I>&gt;&gt;&gt;<i> distinguishing /root and /mnt/root when we don't know if we are chrooted
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> + &#160; &#160;# Ensure /run is mounted
</I>&gt;&gt;&gt;<i> + &#160; &#160;mkdir &quot;/run&quot;, 0755;
</I>&gt;&gt;&gt;<i> + &#160; &#160;run_program::run(&quot;mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs
</I>&gt;&gt;&gt;<i> /run&quot;);
</I>
having perms from both chown &amp; mount is maybe a little too much

&gt;&gt;&gt;<i> + &#160; &#160;mkdir &quot;/run/udev&quot;, 0755;
</I>&gt;&gt;&gt;<i> + &#160; &#160;mkdir &quot;/run/udev/rules.d&quot;, 0755;
</I>
can be simplified mkdir_p(&quot;/run/udev/rules.d&quot;).
The perms should be OK through umask

&gt;&gt;&gt;<i> + &#160; &#160;$ENV{UDEVRULESD} = &quot;/run/udev/rules.d&quot;;
</I>&gt;&gt;&gt;<i> +
</I>&gt;&gt;&gt;<i> + &#160; &#160;# Start up udev and trigger cold plugs
</I>&gt;&gt;&gt;<i> + &#160; &#160;run_program::run(&quot;mount&quot;, &quot;-t&quot;, &quot;devtmpfs&quot;, &quot;-o&quot;, &quot;mode=0755,nosuid&quot;,
</I>&gt;&gt;&gt;<i> &quot;devtmpfs&quot;, &quot;/dev&quot;);
</I>&gt;&gt;&gt;<i> + &#160; &#160;mkdir &quot;/dev/pts&quot;, 0755;
</I>&gt;&gt;&gt;<i> + &#160; &#160;run_program::run(&quot;mount&quot;, &quot;-t&quot;, &quot;devpts&quot;, &quot;-o&quot;,
</I>&gt;&gt;&gt;<i> &quot;gid=5,mode=620,noexec,nosuid&quot;, &quot;devpts&quot;, &quot;/dev/pts&quot;);
</I>&gt;&gt;&gt;<i> + &#160; &#160;mkdir &quot;/dev/shm&quot;, 0755;
</I>
This one should be better included in stage1 with other /dev stuff IMHO
See images/make_boot_img

&gt;&gt;&gt;<i> + &#160; &#160;run_program::run(&quot;mount&quot;, &quot;-t&quot;, &quot;tmpfs&quot;, &quot;-o&quot;,
</I>&gt;&gt;&gt;<i> &quot;mode=1777,nosuid,nodev&quot;, &quot;tmpfs&quot;, &quot;/dev/shm&quot;);
</I>&gt;&gt;&gt;<i> +
</I>&gt;&gt;&gt;<i> + &#160; &#160;run_program::run(&quot;/lib/udev/udevd&quot;, &quot;--daemon&quot;,
</I>&gt;&gt;&gt;<i> &quot;--resolve-names=never&quot;);
</I>
I guess it auto detach with --daemon?
If not we could use &quot;raw({ detach =&gt; 1},&quot; instead of &quot;run(&quot;
I think you wan

&gt;&gt;&gt;<i> + &#160; &#160;run_program::run(&quot;udevadm&quot;, &quot;trigger&quot;, &quot;--type=subsystems&quot;,
</I>&gt;&gt;&gt;<i> &quot;--action=add&quot;);
</I>&gt;&gt;&gt;<i> + &#160; &#160;run_program::run(&quot;udevadm&quot;, &quot;trigger&quot;, &quot;--type=devices&quot;,
</I>&gt;&gt;&gt;<i> &quot;--action=add&quot;);
</I>
Since this will forces us to wait, you should either display a &quot;please
wait dialog&quot;
or better not run this as we'll only look at block devices quite a lot later
after accepting license &amp; loading disks modules

&gt;&gt;<i> 3) which bring me to the last item: you should run perl_checker
</I>&gt;&gt;<i> &#160; &#160; See /usr/share/doc/perl_checker/perl_checker.html &amp;
</I>&gt;&gt;<i> &#160; &#160; /usr/share/doc/perl-MDK-Common/tutorial.html
</I>&gt;&gt;<i> It can be simply called from within emacs (or vim)
</I>&gt;<i>
</I>&gt;<i> Cool, thanks. I'm not a perl-master so feel free to tidy this commit up
</I>&gt;<i> a bit if you have time, otherwise I'll try and tidy up my mess this
</I>&gt;<i> evening :)
</I>
There's no urgency so it's better if done by you so that
you eventually became a co maintainer of drakx :-)

BTW you may eventually include udev in rescue too
(but only once it's done in stage2)
See rescue/ &amp;&amp; rescue/devices.pl
</PRE>










































<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="010831.html">[Mageia-dev] [soft-commits] [2494] Port stage2 to use udev.
</A></li>
	<LI>Next message: <A HREF="010681.html">[Mageia-dev] [soft-commits] [2494] Port stage2 to use udev.
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#10670">[ date ]</a>
              <a href="thread.html#10670">[ thread ]</a>
              <a href="subject.html#10670">[ subject ]</a>
              <a href="author.html#10670">[ 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>