summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2013-January/021275.html
blob: f1bdee1112d4336fa39fd5b0786b8a3c66def1a6 (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] Help with package
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20Help%20with%20package&In-Reply-To=%3CCAPZ-hqRy%3DJfHEkee6txfbbV_HoqnVXPmcvpFvaDYf%3DcpLV5o%3Dg%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="021236.html">
   <LINK REL="Next"  HREF="021293.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] Help with package</H1>
    <B>Juan Luis Baptiste</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20Help%20with%20package&In-Reply-To=%3CCAPZ-hqRy%3DJfHEkee6txfbbV_HoqnVXPmcvpFvaDYf%3DcpLV5o%3Dg%40mail.gmail.com%3E"
       TITLE="[Mageia-dev] Help with package">juancho at mageia.org
       </A><BR>
    <I>Mon Jan  7 20:32:13 CET 2013</I>
    <P><UL>
        <LI>Previous message: <A HREF="021236.html">[Mageia-dev] Help with package
</A></li>
        <LI>Next message: <A HREF="021293.html">[Mageia-dev] Help with package
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#21275">[ date ]</a>
              <a href="thread.html#21275">[ thread ]</a>
              <a href="subject.html#21275">[ subject ]</a>
              <a href="author.html#21275">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Hi Colin,

On Mon, Jan 7, 2013 at 5:53 AM, Colin Guthrie &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">mageia at colin.guthr.ie</A>&gt; wrote:

&gt;<i> &gt; Well, it worked on x86_64, but  on i586 the symlinks are created under
</I>&gt;<i> &gt; /usr/lib64/games/warsow/basewsw instead of /usr/lib/games/warsow/basewsw
</I>&gt;<i> &gt; but I don't understand why, it seems that for some reason, the
</I>&gt;<i> &gt; %{_libdir} macro is expanding to /usr/lib64 on the BS. This is the spec
</I>&gt;<i> &gt; if someone wants to take a look:
</I>&gt;<i> &gt;
</I>&gt;<i> &gt;
</I>&gt;<i> <A HREF="http://svnweb.mageia.org/packages/cauldron/warsow-data/current/SPECS/warsow-data.spec?revision=338836&amp;view=markup">http://svnweb.mageia.org/packages/cauldron/warsow-data/current/SPECS/warsow-data.spec?revision=338836&amp;view=markup</A>
</I>&gt;<i>
</I>&gt;<i> %_libdir expands to the given architecture's libdir. On i586 it's
</I>&gt;<i> /usr/lib, on x86_64 it's /usr/lib64.
</I>&gt;<i>
</I>&gt;<i>
</I>I know, that's why it's strange to me why when the package is built on the
BS the links end up on /usr/lib64 on the i586 package.


&gt;<i> Looking at the spec, I think you're doing it a bit wrong.
</I>&gt;<i>
</I>&gt;<i> It's in the %post for a start which is wrong. It should be done as part
</I>&gt;<i> of package build, not install. Doing it during install will mean the
</I>&gt;<i> files are not &quot;owned&quot; by the package so users cannot tell where they
</I>&gt;<i> come from.
</I>&gt;<i>
</I>&gt;<i>
</I>Well, that was just a suggestion from someone on this thread and it looked
to me like the right place too. On this particular case what I'm doing here
is not installing some files but creating some symlinks that the other
warsow package needs.


&gt;<i>
</I>&gt;<i> Also as you use %_libdir, your package cannot be noarch.
</I>&gt;<i>
</I>
The &quot;warsow-data&quot; package contains the data files of the game which are
arch independent. The &quot;warsow&quot; package contains all the binaries and libs,
but to be able to run the game, the binary expects to find the data files
on the same directory where the libs are, if not then the angelscript
module will fail loading. So, what I'm trying to accomplish is that when
warsow-data is installed, symlinks of the files in the data directory
(/usr/share/warsow/basewsw/*) are created on
/usr/lib{64}/games/warsow/basewsw/. It works on x86_64 but on i586 is
creating the links on lib64 instead of lib and I don't get why, you saw the
code in the spec, I'm not hardcoding any path on it:


%define gamelibdir %{_libdir}/games/warsow

%post
#Add symbolic links of the contents of basewsw to the directory were the
#package warsow install the libs, if not then angelscript fails to load.
for i in %{_datadir}/warsow/basewsw/*;
do
  file=`basename $i`
  ln -sf $i  %{gamelibdir}/basewsw/$file
done

%postun
rm -rf %{gamelibdir}/basewsw


&gt;<i>
</I>&gt;<i> If you want to use /usr/lib all the time then do so (if that's what the
</I>&gt;<i> game binary expects) via %{_prefix}/lib not via %_libdir.
</I>&gt;<i>
</I>

That's not the case, as explained before, the symlinks have to be created
at /usr/lib for i586 and at /usr/lib64 for x86_64, but on i586 for some
reason isn't doing it.



&gt;<i>
</I>&gt;<i> Also your fdupes command seems to do nothing other than display
</I>&gt;<i> duplicate information, not actually resolve anything. So I'd just remove
</I>&gt;<i> it or add appropriate arguments to do hardlinking as needed. Unless this
</I>&gt;<i> package has a particular problem with duplicated data, then I'd just
</I>&gt;<i> kill it off completely.
</I>&gt;<i>
</I>
I'll check this too.


&gt;<i>
</I>&gt;<i> Hope that gives you some hints.
</I>&gt;<i>
</I>&gt;<i>
</I>Thanks for the comments.

-- 
Juancho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: &lt;/pipermail/mageia-dev/attachments/20130107/41fc6945/attachment.html&gt;
</PRE>





















<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="021236.html">[Mageia-dev] Help with package
</A></li>
	<LI>Next message: <A HREF="021293.html">[Mageia-dev] Help with package
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#21275">[ date ]</a>
              <a href="thread.html#21275">[ thread ]</a>
              <a href="subject.html#21275">[ subject ]</a>
              <a href="author.html#21275">[ 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>