1 |
On Fri, Feb 25, 2011 at 8:13 AM, James <wireless@×××××××××××.com> wrote: |
2 |
|
3 |
> Hello, |
4 |
> |
5 |
> Is the link below the best "howto" guide as to using |
6 |
> an existing ebuild to hack a new ebuild? JFFNMS has |
7 |
> been languishing despite repeated requests for a version |
8 |
> bump; so I'm taking the plunge and going to update it |
9 |
> on one of my systems..... |
10 |
> |
11 |
> http://en.gentoo-wiki.com/wiki/Creating_an_Updated_Ebuild |
12 |
> |
13 |
> |
14 |
> Also, I found this guide: |
15 |
> |
16 |
> http://devmanual.gentoo.org/ |
17 |
> and |
18 |
> man 5 ebuild |
19 |
> |
20 |
> |
21 |
> Any other documents I should reference before |
22 |
> attempinging to update an ebuild on my own |
23 |
> person overlay dir? |
24 |
> |
25 |
> Comments and ideas are most welcome.... |
26 |
> |
27 |
> |
28 |
> James |
29 |
> |
30 |
> |
31 |
> Saw that you linked to the "creating an updated ebuild" from gentoo-wiki, |
32 |
so what I say may overlay quite a bit, but hear me out: |
33 |
|
34 |
It depends on how the ebuild is built. If it references the version by the |
35 |
ebuild file name, which is very common, you can create an overlay for the |
36 |
ebuild, copy the ebuild to it, rename the ebuild file to have the new |
37 |
version number as part of it, digest the ebuild, make sure the overlay is |
38 |
listed in your make.conf file, then try to emerge it. I did this with |
39 |
Webmin. Yes, I know it's masked and new versions have effectively been |
40 |
dropped from portage; but I use it, and it worked fine. |
41 |
|
42 |
Maybe I should break it down a little: |
43 |
|
44 |
Create the appropriate directory in an overlay dir. For Webmin, I had to |
45 |
create app-admin, then webmin: |
46 |
|
47 |
# mkdir -p /usr/local/portage/overlay/app-admin/webmin |
48 |
mark@allanon /usr/local/portage/overlay/app-admin/webmin $ pwd |
49 |
/usr/local/portage/overlay/app-admin/webmin |
50 |
|
51 |
I then copied webmin-1.510.ebuild from the official portage tree, |
52 |
/usr/portage/app-admin/webmin, to it's new location and filename: |
53 |
|
54 |
# cp /usr/portage/app-admin/webmin/webmin-1.510.ebuild |
55 |
/usr/local/portage/overlay/app-admin/webmin/webmin-1.530.ebuild |
56 |
|
57 |
Then digest the ebuild to generate a manifest, otherwise portage will |
58 |
complain when you try to emerge it: |
59 |
|
60 |
# cd /usr/local/portage/overlay/app-admin/webmin |
61 |
# ebuild webmin-1.530.ebuild digest |
62 |
|
63 |
Now add the overlay to your make.conf: |
64 |
|
65 |
PORTDIR_OVERLAY="/usr/local/portage/overlay" |
66 |
|
67 |
If you're using EIX to sync/search portage, you'll need to run eix-update |
68 |
after doing this. Now try to emerge the newest Webmin, but first you have |
69 |
to unmask it. I like to use autounmask for that: |
70 |
|
71 |
Create your package.???* directories (or files) in /etc/portage (I like the |
72 |
dir option), if you don't already have them: |
73 |
|
74 |
# for a in keywords unmask use; do mkdir -p /etc/portage/package.${a}; done |
75 |
|
76 |
If you just want the files: |
77 |
|
78 |
# for a in keywords unmask use; do touch /etc/portage/package.${a}; done |
79 |
|
80 |
Emerge autounmask if you don't have it: |
81 |
|
82 |
# emerge app-portage/autounmask |
83 |
|
84 |
Then unmask Webmin 1.530: |
85 |
|
86 |
# autounmask =app-admin/webmin-1.530 |
87 |
|
88 |
Now we can emerge it! |
89 |
|
90 |
# emerge -av =app-admin/webmin-1.530 |
91 |
|
92 |
|
93 |
I've done this on 3 servers to get Webmin on them, and have used this setup |
94 |
every time. |
95 |
|
96 |
Chances are the ebuild you want to use may be this simple. |
97 |
|
98 |
Ok, so I scrolled down and saw your reply mentioning the program, jffnms. |
99 |
What I did with Webmin can all most be done exactly the same with jffnms, |
100 |
except you need to modify a line of the ebuild to point to *.tgz instead of |
101 |
*.tar.gz. When I did this, I was able to successfully fetch the gzipped tar |
102 |
file from Sourceforge. |
103 |
|
104 |
You can use sed to correct it: |
105 |
|
106 |
sed -i -e 's/.tar.gz/.tgz/g' |
107 |
/usr/local/portage/overlay/net-analyzer/jffnms/jffnms-0.8.5.ebuild |
108 |
|
109 |
Or download the ebuild I've attached, follow the link you references to |
110 |
create the overlay dir/add to make.conf, etc. |
111 |
|
112 |
That should work. Let me know how it goes. |