Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308921 - Version Bump app-misc/iguanaIR-1.0.1
Summary: Version Bump app-misc/iguanaIR-1.0.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Joerg Bornkessel (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-11 01:32 UTC by Derek Adams
Modified: 2012-05-07 15:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild file (iguanaIR-1.0_pre2.ebuild,1.84 KB, text/plain)
2010-03-11 01:35 UTC, Derek Adams
Details
The /etc/init.d/ script for the files directory (iguanaIR,377 bytes, text/plain)
2010-03-11 01:36 UTC, Derek Adams
Details
iguanaIR-1.0_pre2.ebuild (iguanaIR-1.0_pre2.ebuild,849 bytes, text/plain)
2010-09-12 03:10 UTC, Siuchung Cheung (Clement)
Details
iguanaIR-1.0-gentoo.diff (iguanaIR-1.0-gentoo.diff,1.81 KB, patch)
2010-09-12 03:12 UTC, Siuchung Cheung (Clement)
Details | Diff
iguanaIR-1.0-gentoo.diff (iguanaIR-1.0-gentoo.diff,2.12 KB, patch)
2010-09-12 15:53 UTC, Siuchung Cheung (Clement)
Details | Diff
iguanaIR-1.0.1.ebuild (iguanaIR-1.0.1.ebuild,908 bytes, text/plain)
2011-01-02 19:02 UTC, Siuchung Cheung (Clement)
Details
iguanaIR-1.0-gentoo.diff (iguanaIR-1.0-gentoo.diff,2.14 KB, patch)
2011-01-02 19:12 UTC, Siuchung Cheung (Clement)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Adams 2010-03-11 01:32:02 UTC
I've setup the iguanaIR controller in my media center and got the latest software from the iguanaworks website running. I decided to package it into an ebuild from scratch. The existing version of the iguanaIR software did not work on my up-to-date system. 

This is an update for the app-misc/iguanaIR software already on the mirrors.

This ebuild uses the software directly from the iguanaworks website, and as this is my first time contributing, I'm unsure how I would go about uploading the software to the mirrors (if it is even legal to do so.)

Reproducible: Always
Comment 1 Derek Adams 2010-03-11 01:35:29 UTC
Created attachment 223103 [details]
Ebuild file

This is the ebuild for the package.
Comment 2 Derek Adams 2010-03-11 01:36:00 UTC
Created attachment 223105 [details]
The /etc/init.d/ script for the files directory

The /etc/init.d/ script for the files directory
Comment 3 Siuchung Cheung (Clement) 2010-09-12 03:07:59 UTC
This is sorely needed. The iguanaIR I ordered last week doesn't work without the newer driver:
Sep 08 19:47:49 2010 ERROR: Unsupported hardware version 774

But the ebuild posted here does not work:
>>> Original instance of package unmerged safely.
 * Adding group 'iguanair' to your system ...
 *  - Groupid: next available
 * Adding user 'iguanair' to your system ...
 *  - Userid: 106
 * Do not specify /sbin/nologin yourself, use -1
 * ERROR: app-misc/iguanaIR-1.0_pre2 failed:
 *   Pass '-1' as the shell parameter
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called pkg_postinst
 *   environment, line 5587:  Called enewuser 'iguanair' '-1' '/sbin/nologin' '-1' 'iguanair,usb'
 *   environment, line 4199:  Called die
 * The specific snippet of code:
 *               die "Pass '-1' as the shell parameter";
 * 
 * If you need support, post the output of 'emerge --info =app-misc/iguanaIR-1.0_pre2',
 * the complete build log and the output of 'emerge -pqv =app-misc/iguanaIR-1.0_pre2'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/app-misc/iguanaIR-1.0_pre2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-misc/iguanaIR-1.0_pre2/temp/environment'.
 * S: '/var/tmp/portage/app-misc/iguanaIR-1.0_pre2/work/iguanaIR-1.0_pre2'
!!! FAILED postinst: 1

Changing it to -1 fixes the problem. But there are still a lot of issues with this ebuild. You didn't installed the udev rules. So the directory for the device doesn't get created. It simply doesn't work.

In general, I'm not sure it's such a good idea to keep trying to duplicate all the work upstream. There's already an init script provided. In fact, they specifically have a gentoo mode in there. Most importantly, it supports a "rescan" command, which the udev rule calls to create the device in /dev. Your init script doesn't do that. Again, no device. Client doesn't work.

Also, you're manually doing a make on each executable one by one instead of calling the default make target like in the original ebuild. And again you're installing the files manually one by one instead of using the make install like the last version.


The problem with your approach is that every time there's a version bump, you've got to recheck all the make targets and update each and every one manually. You'll also have to keep your init script up to date. A simple ebuild version rename will almost never work.

Sure, you get a neater init script tailor made for gentoo and you don't have to create the user before the install and the whole thing fits into the whole sandbox concept much better. But remember this isn't exactly a popular package like firefox or the linux kernel. By making it so labor intensive, you're guaranteeing that future updates will be even slower than it already is.

And since you're making a new ebuild from scratch, you're also throwing away all the work in the previous ebuild, including some gentoo customizations which your ebuild does not have. I hope there're no hard feelings. But every thing that you changed from the original ebuild seems like a fundamentally bad idea to me. Things are done that way in the original ebuild for good reasons. It's much better to simply build on the original ebuild and try to get it work.
Comment 4 Siuchung Cheung (Clement) 2010-09-12 03:10:57 UTC
Created attachment 246928 [details]
iguanaIR-1.0_pre2.ebuild

Updated ebuild based on the existing one in portage. Changes:
1. Add user before install so "make install" just works. Also removed the useradd in the Makefile because it won't work in the sandbox.
2. Moved /etc/iguanaIR/iguanaIR to /etc/conf.d/iguanaIR. It's not a config file. It's a file sourced by the init script. All other init scripts in gentoo put their sourced files under /etc/conf.d.
3. Set distro to "gentoo" manually in the init option file. They actually attempt to autodetect the distro by reading /etc/issue. Unfortunately, we don't have the words "gentoo" in there. So that never works. Fortunately they do provide the option to set it manually.
4. asneeded patch removed. Unfortunately I don't know enough about asneeded to understand what it's doing. So I can't update that patch. But I tried compiling with asneeded in my LDFLAGS and it just works. Not sure if it's just because the rest of my system doesn't have asneeded. But I don't have the time to rebuild the whole system to test it. Sorry. Someone else can update it as needed.
Comment 5 Siuchung Cheung (Clement) 2010-09-12 03:12:25 UTC
Created attachment 246930 [details, diff]
iguanaIR-1.0-gentoo.diff

Updated gentoo.diff. Put this under files/
Comment 6 Siuchung Cheung (Clement) 2010-09-12 15:53:16 UTC
Created attachment 246983 [details, diff]
iguanaIR-1.0-gentoo.diff

Fixed missing a mode 644 change in original portage gentoo.diff. iguanaIR.h no longer executable. :-)
Comment 7 Siuchung Cheung (Clement) 2011-01-02 19:02:51 UTC
Created attachment 258664 [details]
iguanaIR-1.0.1.ebuild

1.0.1 has been released. 1.0_pre2 is no longer available.

What's changed:
- Added lsb-release dependency to get their distro detection work automatically.
- Added RESTRICT mirror for those who're downloading this from bugzilla for use directly. (Sounds like this could take some time to get to the portage tree.)
Comment 8 Siuchung Cheung (Clement) 2011-01-02 19:12:39 UTC
Created attachment 258666 [details, diff]
iguanaIR-1.0-gentoo.diff

New diff for the 1.0.1 source.

What's changed:
- Changes for asneeded
- Removed adduser from makefile entirely instead of running "true"
- They now started using the pidofproc function from LSB, which Gentoo doesn't have. Added a hack to use pidof to fake one. (The two are actually different. But because of the way they're currently using this function, it shouldn't be noticeable.)
- Didn't include any unnecessary changes this time. For e.g., I left the iguanaIR.h executable. Also let it install the empty directory. I see that this is still not in portage. Sounds like we don't have much manpower to keep up with upstream releases with this little-used package. Better live with a little cosmetic problem than the diff didn't patch. You can add them back if you have time.

Some of these changes, especially the asneeded ones, looks like they really should be submitted upstream. That'll make future updates so much easier. FYI, upstream is very open to changes if you'd just let them know what the problem is.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2012-05-07 15:17:08 UTC
1.0.1 in Portage. It may not be perfect, but 0.93 had also several bugs. 
Please give it a try and file *new bugs* if you have issues.