1 |
Dale posted on Wed, 05 Jun 2013 04:16:43 -0500 as excerpted: |
2 |
|
3 |
> Frank Peters wrote: |
4 |
>> On Wed, 5 Jun 2013 06:00:01 +0000 (UTC) |
5 |
>> Duncan <1i5t5.duncan@×××.net> wrote: |
6 |
>> |
7 |
>>> But xorg-server-1.14.1.901 is definitely built/installed/running fine |
8 |
>>> here! |
9 |
>>> |
10 |
>> Thanks for your help in this matter. Your advice allowed me to locate |
11 |
>> the exact error, and after some searching I believe that I have found |
12 |
>> the cause of the problem. It is the issue of not using UDEV. |
13 |
>> |
14 |
>> I filed a bug report: |
15 |
>> |
16 |
>> https://bugs.gentoo.org/show_bug.cgi?id=472378 |
17 |
|
18 |
That would appear to be the problem, yes. Good work! =:^) |
19 |
|
20 |
>> Because I don't know how to reconfigure the ebuild to use a patched |
21 |
>> source I'll have to wait until the maintainer gets around to applying |
22 |
>> the patch. |
23 |
|
24 |
> Digest command: |
25 |
|
26 |
While I replied just a few minutes ago discussing the digest command, |
27 |
it's actually not needed here at all. |
28 |
|
29 |
There's an easier way! =:^) |
30 |
|
31 |
These instructions assume you're using portage. If you're using one of |
32 |
the other PMs (package managers, paludis or pkgcore being the other two |
33 |
besides portage), you'd do it their way, which may or may not be |
34 |
different, instead. |
35 |
|
36 |
/etc/portage/patches can form the root of a directory tree organized |
37 |
similarly to the gentoo tree layout, with category and package names, and |
38 |
the patches to apply to a particular package appearing as files in this |
39 |
tree. |
40 |
|
41 |
So given that the package we're discussing is x11-base/xorg-server: |
42 |
|
43 |
1) Create the directory /etc/portage/patches/x11-base/xorg-server/ . |
44 |
Make sure the permissions at all levels are such that the portage user |
45 |
can read it, but preferably that only root (or your admin user if you're |
46 |
not quite as strict on security) can write it. Say root:root or |
47 |
root:portage, 644 or 640 perms. |
48 |
|
49 |
2) Drop your patch file named as *.patch in that subdir. (I'm not |
50 |
actually sure whether *.diff will work as well or whether it must be |
51 |
*.patch, but something like *.bak should be ignored.) |
52 |
|
53 |
As an example, you could call this patch noudev-build.patch, or something |
54 |
similar, so it would appear as the file |
55 |
|
56 |
/etc/portage/patches/x11-base/xorg-server/noudev-build.patch. |
57 |
|
58 |
3) Run the emerge again, and you should be able to see fairly early in |
59 |
the log, after unpack but before it starts actually building, something |
60 |
like: |
61 |
|
62 |
Applying user patches: |
63 |
|
64 |
You should then see it try the patch, and whether it applies |
65 |
successfully. Note that if it detects the patch and it does NOT apply |
66 |
successfully, that's an error, and the build will stop. But if it can't |
67 |
see the patch at all, say because permissions are wrong or perhaps |
68 |
because it's named with the wrong extension, off course it'll continue as |
69 |
if the patch wasn't there at all. |
70 |
|
71 |
|
72 |
4) This same trick should work for many packages, but there's a few it |
73 |
won't work on. The user-patches function that it relies on is a |
74 |
mandatory part of EAPI-5, and if you look in the |
75 |
xorg-server-1.14.1.901.ebuild file, you'll see this line near the top: |
76 |
|
77 |
EAPI=5 |
78 |
|
79 |
So if it doesn't work, either there's a bug in the ebuild or you have |
80 |
permissions or something (maybe the -pN patch level?) wrong. |
81 |
|
82 |
In earlier EAPIs, it was an optional function that many but not all gentoo |
83 |
devs opted to include in their packages. So it isn't /guaranteed/ to |
84 |
work on EAPIs before 5, but there's a reasonably good chance it will, |
85 |
depending on the package. (And some projects applied it by policy. IIRC, |
86 |
it has long been policy for the gentoo/kde project, for instance, so |
87 |
pretty much any kde package honored it.) But in EAPI-5, if it doesn't |
88 |
work there's a bug. |
89 |
|
90 |
And because the ebuild will stop with an error if it finds a patch that |
91 |
does NOT apply, you don't have to worry about stale patches accumulating |
92 |
long after the patch was applied upstream, or the code changing out from |
93 |
under the patch. Because if it does, the ebuild will simply error out, |
94 |
and you can go delete the patch from the patches tree and try again. |
95 |
|
96 |
|
97 |
Meanwhile, where it DOES work (as it should here), it's a lot easier to |
98 |
just drop the patch in the appropriate patches subdir and let portage |
99 |
automatically apply it, then it is to futz around with the ebuild itself, |
100 |
editing it manually and making sure it can find the patch, redigesting, |
101 |
etc. It makes things a LOT easier, which means a lot more gentoo users |
102 |
are likely to be able to test patches than could otherwise. =:^) |
103 |
|
104 |
Plus it's nice not to have to worry about either losing the fix or having |
105 |
to put the ebuild in an overlay to avoid losing it. And if it's a long- |
106 |
term patch that you like but upstream hasn't seen fit to apply yet, with |
107 |
it in the patches tree, every upgrade gets patched automatically. No |
108 |
having to futz around with overlaying the ebuild every single time, just |
109 |
to apply a custom patch. |
110 |
|
111 |
There's actually several packages that I apply long-term custom patches |
112 |
to in this way. As examples, gwenview and superkaramba are two packages |
113 |
I carry my own patches for. (In the superkaramba case, I have a couple |
114 |
bugs filed with the patches attached in kde's bugzilla, but I think |
115 |
superkaramba is an orphan package upstream, no maintainer, simply kept |
116 |
building by the release team, so no comments on the bugs at all. In the |
117 |
gwenview case, the upstream dev decided that stepping the magnification |
118 |
in whole 100% increments was the thing to do, while I preferred 5% or so |
119 |
increments, so when that changed I was able to see where they changed the |
120 |
code and change it back to something I liked better. But obviously |
121 |
that's not a patch upstream will take, since they deliberately changed it |
122 |
to the way it is now.) |
123 |
|
124 |
I've been upgrading both at every kde dot-upgrade release, so basically |
125 |
monthly (more often now, since I'm actually running live-branch |
126 |
4.10.49.9999 and rebuilding once or twice a week to get the latest |
127 |
changes), and am still using the same patchfiles I originally placed |
128 |
there several years ago. Imagine how many times I'd have had to manually |
129 |
edit the ebuild to add those patches, if it weren't for the user-patching |
130 |
functionality handling it entirely automatically, once I put the patches |
131 |
in the right place. =:^) |
132 |
|
133 |
-- |
134 |
Duncan - List replies preferred. No HTML msgs. |
135 |
"Every nonfree program has a lord, a master -- |
136 |
and if you use the program, he is your master." Richard Stallman |