This is an ebuild for ADSL4Linux (changing name to kpnadsl4linux due to the 'Gentoo naming convention' and making it clearer for gentoo-users to see who/what it's for (KPN is the dutch telco)). What the program basically does is making it easier to use adsl (by kpn) in holland and making it easier to handle pptp connections. It basically starts, stops, and displays usage info about a connection. It probably should go in net-dialup? Hope that's enough info. Sam ps. it depends on pptp-rk (a patched pptp), just added it, bug # 10443.
Created attachment 5487 [details] Ebuild for kpnadsl4linux-1.10
in the ebuild there is a lot of configuration done, this is not the gentoo way (we don't like ebuilds where the user is prompted, because if emerge lots of ebuilds and go away from your computer, it would be nice if emerge is done (and there is no wait for a user prompt)). it would be fine to install a script which do all the configuration and have an einfo "please run th following script to configure your dsl-account:..." would be better. you also do some logging things in pkg_postinstall(), this is also not really nice, maybe an einfo "if you want to enable logging, please add the following line to your crontab:..." would be better. please make these changes and attach a new ebuild, then i will commit this. i can't test this ebuild (because i don't live in the netherlands), so i have to trust you that it works ;).
Created attachment 5835 [details] Updated ebuild This is the updated ebuild file. I moved the configuration and logging all to one file (kpnadsl4linux-config) and made an einfo which notes you have to execute it. The config file is supposed to detect whether cron is available and if so adds a crontab. Please note that this ebuild depends on pptp-rk (see bug #10443). That ebuild is _NOT_ commited yet. Committing this ebuild has no use as long as pptp-rk (-1.1.0) isn't added to portage!
Created attachment 5836 [details] Post-install configuration file.
i know that this depends on #10443 (which is also assigned to me) - from where does the ip (10.0.0.138) come? is it for each user the same? echo pty "/usr/sbin/pptp 10.0.0.138 --nolaunchpppd - your config script could also be handled by emerge (take a look at the qmail ebuild) just make a function pkg_config() and ebuild .../.ebuild config will execute this function, this would be more standard (sorry that i first told you to make a script for it), if it is ok for you, i will make the ebuild and commit it (but please answer the above question about this ip first).
Created attachment 5849 [details] *UPDATE* ebuild file - Yes the that IP is the same for ech user. It is the default IP of the ADSL-modem that you get in Holland (you hardly get other modems and there is no reason to change the IP). You need to make the connection to the modem to set up the connection. - I already changed the stuff if wasn't a lot. The configuration needs user-input, so I put it in a seperate config file, the logging doesn't need any input, so pkg_config() handles that.
Created attachment 5850 [details] *UPDATE* config file The logging part has moved to the ebuild. I kept this here so emerging several packages won't stop on this. Might be handy if portage would summarize all the einfos and ewarns etc. in such a case at the end. I'll search bugzilla and the forum about this.
Created attachment 5854 [details] *UPDATE* ebuild file Changed dependencies, removed pptp-rk, added >=pptpclient-1.10
well, pkg_config() is not done per default by emerge. i prefer adding an einfo "please run ebuild /var/db/pkg/net-dialup/adsl4linux-1.1.0/adsl4linux-1.1.0.ebuild config to setup adsl4linux". if the user do this, the pkg_config()-function in the ebuild is executed, adding there the configuration is ok. it would be also fine if the user is asked whether he wants this crontab entry or not.
Created attachment 5867 [details] *UPDATE* ebuild (also makes config file obsolete) I'm sorry I didn't pay attention looking at the qmail ebuild. I now understand what I should have done (hopefully :-) ). I now put everything in pkg_config() and added some einfo's in pkg_postinst() which tells the user what to do. I'm not asking use interaction about the logging because the status function in the program won't work without it (I am told). So probably every user will want this. So now all the previous files are obsolete (still can't change it).
hi, well, the ebuild does not work here (first had some problems with the SRC_URI, those I fixed). Now I'm getting this error: >>> Install adsl4linux-1.09a into /var/tmp/portage/adsl4linux-1.09a/image/ category net-dialup cp: cannot stat `init.d.adsl': No such file or directory install: cannot stat `/var/tmp/portage/adsl4linux-1.09a/temp/adsl': No such file or directory So, please look over the ebuild for non-existing files, where files should install, how scripts in /etc/init.d/ look like,... I don't have enough time to make this, sorry. attached is a modified ebuild (there are still bugs in it). also, please test your ebuild before committing. thanks, Hannes
Created attachment 5876 [details] adsl4linux-1.09a.ebuild
Okay, after trying to reproduce your errors a _load_ of times, I decided to try your ebuild. Now I did get them and I know the reason by heart: - First, for some reason you decided to change the version number from 1.10 to 1.09a. I have no clue why (well I have one, but don't feel like writing it :-) ). - I did check for non-existing files, and double checked now (which resulted in removing the word FAQ from the dodoc line). - Where files should install has completely nothing to do with this, as emerge can't _find_ the files. - How scripts look like in /etc/init.d/ has _completely_ nothing to do with this. I already checkid this when I made my very first attempt of an ebuild (I didn't even submit that one, so early was it) - You tell me to test the ebuild ? What do you think of me to say that? Isn't that the very first step you should do after actually making the ebuild? Of course I have tested my ebuild before submitting it!! - The bugs in the modified bit of the ebuild are quit obvious aren't they? First of all you removed the compiling part and changed it into an einfo saying there is no need to compile anything (?!?!). Second, you changed the name of the ebuild and hence emerge downloads a wrong tarball which produces the second error: it dosn't have a init.d.adsl file in it (because it's the wrong tarball). I am not trying to offend you, but seriously, just because this is my first ebuild, it doesn't mean I'm a complete moron! I hope stuff works with the next ebuild I'll attach in a minute. The new ebuild will only fix an error message saying it can't find FAQ, because it shouldn't find FAQ, I moved the substance to the other docu's before translating it to English. I didn't really like the idea of translating loads of stuff unnecessarily. Thanks for helping me out with this hannes, I really appreciate the fact that you are willing to spend some time on this. Yours sincerely, Sam Besselink
Created attachment 5912 [details] *UPDATE* ebuild (1.10 not 1.09a !!) 2 adjustments, removed FAQ from the dodoc line and added 'insopts 655' line in pkg_config() to enable non-root users to start the connection.
About the SRC_URI problems, this actually _is_ kpnadsl4linux-1.10 and _not_ ADSL4Linux-1.09a, I'm talking to the maintainer of the adsl4linux.nl site to add the gentoo tarball. The other mirror (http://home.planet.nl/~mcdon001/..) works fine here. Do you know the procedure for getting tarballs mirrored at ibiblio?
sorry for that, i just got another tarball (because i thought the name should be ADSL4Linux). I feel very sorry for this, it was completely a misunderstanding on my side. so, thanks for this ebuild :), i committed it to portage (currently marked testing). i think we can close this bug (or still leave it open until i marked it as stable)?
No problem at all, I was in a bit of a bad mood, that's why I replied so harsh (darn parents). Thanks for submitting, I'd actually prefer leaving the bug open until it is not marked for testing anymore. Thanks a lot for your help, Sam
ok, well, the mirroring to ibiblio is done via a script, which scans all ebuilds, the tarball will be mirrored within 24h.
First of all; thanks to Sam and Hannes for this ebuild. I have tested it and the installation goes well, but I got an error during the configuration: After running "ebuild /var/db/pkg/net-dialup/kpnadsl4linux-1.10/kpnadsl4linux-1.10.ebuild config" I have entered my login-ID, password, pressed enter for PC1 and pressed 1 for confirmation. I get the following error "install: cannot stat `655': No such file or directory" (twice). If more information or testing is required please let me know.
Yes I'm aware of the problem and currently fixing it. I thought the ebuild functions would work properly but they don't, so I have to change it all into plain bash (I'm also adding some stuff to make sure you won't overwrite your previous stuff, it iwll be compatible with etc-update).
Created attachment 5978 [details] *UPDATE* ebuild (guess it will be -r1) Fixed the config bugs. It now copy's the files correctly and the loggin works correctly too now. It even copy the files to ._cfg000?_foobar if foobar or ._cfg0000_foobar already exists. Couldn't loop it correctly so it won't work if ._cfg0001_foobar already exists. It will overwrite it. It installed without errors on my machine. I double checked :-). (it gave some errors during logging in the last version, sorry, they're resolved) PS. the other ebuilds are obsolete, k?
*** Bug 8165 has been marked as a duplicate of this bug. ***
I have created bug 11341 as a request for including kpnadsl4linux on the LiveCD. I hope this will be assigned to release@gentoo.org and the people from the Netherlands will be able to install Gentoo from the LiveCD.
ok, but one question: is this renaming-thing needed? because an user will install kpnadsl4linux, set it up (via ebuild .. config), and once there is a new ebuild he will just merge it, the config files don't have to be generated again. or do i ignore anything?
Created attachment 6139 [details] *UPDATE* ebuild -r1 I was thinking about the situation where a user uses it's regular modem with pap authentication and wants to keep it's config files, just in case the ADSL connection fails for some reason. You're right about that installing bit, though. I've changed it, now it will change the name to ._cfg0000_foo if foo already exists. I don't think it can do any harm. Just to be sure, I also added a line that the user might need to do an etc-update. I also made a minor bug fix. (In the adsl file the pty line won't work, because I forgot to include the double quotes.) Everything seems to work fine over here. *previous ebuilds are obsolete*
great, thx, committed the r1 ebuild.
I have tested the new ebuild, everything works good, no problems during installation and configuration, good job, thanks.
Hi Hannes, I think this ebuild can be unmasked (and the bug closed) or do you want wait a little longer?
done.