Needing to custom-configure an item on ProFTPd, I tried to follow the FAQ at "I want to perform the ./configure step myself. Can I?" But here's what happens: # ebuild proftpd-1.2.9_rc1.ebuild unpack >>> md5 src_uri ;-) proftpd-1.2.9rc1.tar.bz2 /usr/sbin/ebuild.sh: line 1174: /var/db/pkg/net-ftp/proftpd-1.2.9_rc1/proftpd-1.2.9_rc1.ebuild: No such file or directory !!! ERROR: net-ftp/proftpd-1.2.9_rc1 failed. !!! Function , Line 1174, Exitcode 1 !!! error sourcing ebuild Don't know whether this is a problem with the FAQ, the ProFTPd ebuild, or what. But it sure stops the show. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Okay, if I do a full emerge first then the FAQ's method works. So the FAQ is neglecting to mention that step - or failing to give a way to avoid doing a step that's goes too far, presuming one has no interest in installing the default version before installing a custom one.
FAQ's next step is slightly wrong, too: "Then cd to /var/tmp/portage/foo-x.y.z/work." That should be "Then cd to /var/tmp/portage/foo-x.y.z/work/foo-x.y.z."
And then proftpd doesn't end up in the right (standard Gentoo) location. This whole little section of the FAQ needs to be replaced by complete directions to achieve the same thing as a Gentoo auto install, but with custom compilation options. As it is, it doesn't do that.
Oh, and it doesn't compile to use the configuration file in the standard Gentoo location either. Please put accurate instructions here!
I'll check this one out.
Created attachment 20178 [details, diff] Patch This patch stresses more that it is *not* trivial and that the given instructions only work in case the ebuild isn't complicated.
Regarding the fact that the "ebuild .... unpack" doesn't work if it isn't installed yet, this is a bug in ebuild, not documentation-wise. If a docdev can agree with this patch to the faq, I can commit.
Sven, That does make things clearer. But much hinges on the user understanding what "trivial" means here. Does this mean, "It only works if the program's installation defaults are the same as those used by the ebuild, in regards to where files are installed and how they are named"? I like the rationality of Gentoo's use of the directory structure a lot; but it may be more often than not that files are not installed where a default ./configure would have them. Perhaps the way to make this more easily handled would be to have ebuilds separate the ./configure installation directory and file name conventions from the other configuration directives, and then have a simple way to query the ebuild to extract just those flags to an environment variable to use in custom program configuration. That way the user who wanted to custom install a daemon but keep it compatible with Gentoo's structural and file-naming conventions could follow the general instructions you give, with a couple of extra steps, something like: ebuild --diropts_to_shell ./configure --some-custom-option $DIROPTS That way the user could stop, patch code if desired, use a different option set than the ebuild (ebuild's tend to enable most options - some daemons run much more efficiently with just those needed in the particular system), and still end up with the advantages of the overall Gentoo structure, as compared to just doing a straight installation from the tar source. But I guess this isn't a doc bug at this level, but an ebuild feature request....
It isn't indeed documentation-related anymore, but an ebuild-related enhancement request. However, I don't think developers will see this as a possible bug. You can perfectly just read the ebuild and see what it does (attach patches, install extra files) and then manually execute those steps. That is what "non trivial means": you need to know what the ebuild does in order to succesfully, manually compile the package.
"You can perfectly just read the ebuild and see what it does...." Ah, but then you might add a paragraph or two on how to read an ebuild - or point to other documentation on this. Right now, when I look at an ebuild, it's not particularly clear just what will be done in terms of installation directories and file names. I'm sure if I took a couple of days I could learn what each of the functions invoked are and what the standard variables used mean, and that this is trivially clear to those who write ebuilds. But it's not visible on the surface to someone like me, a mid-level sys-admin with years of PHP and Perl experience, but no background in Python or ebuild conventions. I know there's a good doc on how to write ebuilds, and if I studied that it would all become clear. But what I'd like as an option is a user-oriented doc that just gives enough knowledge to be able to figure out the critical options to keep a custom install within the Gentoo filesystem norms. Learning how to do that could be pretty quick, I imagine; but it's not obvious just looking at an ebuild file.
Well that's all covered in the "not trivial" :)
I'll commit this one for now and leave it rest.