summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2011-June/005525.html
blob: 506f35dc42632972e3ee520c3d7599d67276ba33 (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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] get-skype package for submission
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20get-skype%20package%20for%20submission&In-Reply-To=%3C4DF61F3B.7020408%40zen.co.uk%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="005495.html">
   <LINK REL="Next"  HREF="005526.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] get-skype package for submission</H1>
    <B>Barry Jackson</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20get-skype%20package%20for%20submission&In-Reply-To=%3C4DF61F3B.7020408%40zen.co.uk%3E"
       TITLE="[Mageia-dev] get-skype package for submission">zen25000 at zen.co.uk
       </A><BR>
    <I>Mon Jun 13 16:31:23 CEST 2011</I>
    <P><UL>
        <LI>Previous message: <A HREF="005495.html">[Mageia-dev] get-skype package for submission
</A></li>
        <LI>Next message: <A HREF="005526.html">[Mageia-dev] get-skype package for submission
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#5525">[ date ]</a>
              <a href="thread.html#5525">[ thread ]</a>
              <a href="subject.html#5525">[ subject ]</a>
              <a href="author.html#5525">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>On 13/06/11 13:24, Anssi Hannula wrote:
&gt;<i> On 12.06.2011 02:37, Barry Jackson wrote:
</I>&gt;&gt;<i> On 11/06/11 18:03, Anssi Hannula wrote:
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> - Best to add a comment in the %post script to remind that any new files
</I>&gt;&gt;&gt;<i>     need to have a %ghost entry created.
</I>&gt;&gt;&gt;<i>     (btw: an alternative idea is to create a post-script and the filelist
</I>&gt;&gt;&gt;<i>      at the same time in a single for loop in %build/%install, so that
</I>&gt;&gt;&gt;<i>      the lists can never get out of sync as they are created from a single
</I>&gt;&gt;&gt;<i>      list; however, your current solution is adequate as well)
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Note added - keep it simple.
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i> You added the note in the %files section, not in %post. The issue only
</I>&gt;<i> happens if someone updates %post but not %files, so it doesn't make
</I>&gt;<i> sense to put the reminder in %files :)
</I>&gt;<i>
</I>
OK moved

&gt;&gt;&gt;<i> - You don't check for failures. If the mktemp call fails, you extract
</I>&gt;&gt;&gt;<i>     the tarball into /root etc.etc.. You need to check for failures on
</I>&gt;&gt;&gt;<i>     the mktemp/mkdir/cd commands (mktemp failure can be detected by
</I>&gt;&gt;&gt;<i>     checking if $newtmp string is empty), or alternatively run &quot;set -e&quot;
</I>&gt;&gt;&gt;<i>     to make the shell exit on failures (this leaves the tmpdir polluted,
</I>&gt;&gt;&gt;<i>     but it doesn't matter as much as it is an uncommon failure case and
</I>&gt;&gt;&gt;<i>     /tmp is cleaned periodically anyway).
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Added some checks - with clean-up of previously created dirs etc on fail.
</I>&gt;<i>
</I>&gt;&gt;<i> mkdir %{mytmp}
</I>&gt;&gt;<i> [[ -d %{mytmp} ]] || exit 1
</I>&gt;&gt;<i> cd %{mytmp}
</I>&gt;<i>
</I>&gt;<i> cd is not guaranteed to work even if %mytmp exists. Add &quot;|| exit 1&quot;.
</I>&gt;<i>
</I>
OK - done.

&gt;&gt;<i> cd ${tmpextdir}
</I>&gt;&gt;<i> tar jxf %{mytmp}/skype-%{version}.tar.bz2
</I>&gt;<i>
</I>&gt;<i> Same here...
</I>&gt;<i>
</I>&gt;<i> Well, actually these two aren't that serious, since they can't be
</I>&gt;<i> exploited by non-root anyway. I'm somewhat ok with them, as long as your
</I>&gt;<i> mentor is as well and no one else objects.
</I>&gt;<i>
</I>
I need a mentor ;)

&gt;<i> Note that your &quot;if ! [[ -d %{tmpdir} ]]; then&quot; check is not 100%
</I>&gt;<i> necessary, as %tmpdir not existing is unlikely and causes no side effects.
</I>&gt;<i>
</I>
I added that as the dir is created by tar, so if the tarball had the 
wrong content the dir may not be created with the correct name.
Unlikely as you say.

&gt;<i> Other nits:
</I>&gt;<i> - Use better variable names- %mytmp, $tmpextdir, %tmpdir are confusing.
</I>
Changed to tmp_download_dir, tmp_extract_dir and tmp_skype_dir

&gt;<i> - The description starts with an empty line. Remove it.
</I>
Gone

&gt;<i>
</I>
I have started writing a script to generate the .txt files but can't 
decide whether it should go as far as downloading the source from Skype 
or simply be run on an extracted skype-&lt;version&gt; folder.
A first draft of this is attached.
I assume this would ultimately be added as a SOURCE file with notes in 
the package.

Barry
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: get-skype.spec
URL: &lt;/pipermail/mageia-dev/attachments/20110613/2c715ab6/attachment.ksh&gt;
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: skype-txt-gen
URL: &lt;/pipermail/mageia-dev/attachments/20110613/2c715ab6/attachment-0001.ksh&gt;
</PRE>


































































<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="005495.html">[Mageia-dev] get-skype package for submission
</A></li>
	<LI>Next message: <A HREF="005526.html">[Mageia-dev] get-skype package for submission
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#5525">[ date ]</a>
              <a href="thread.html#5525">[ thread ]</a>
              <a href="subject.html#5525">[ subject ]</a>
              <a href="author.html#5525">[ 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>