You are not logged in.

#1 2013-06-08 03:07:45

aexoxea
Member
Registered: 2012-11-17
Posts: 62

[Solved] Patch for idle3-tools

Package aur/idle3-tools (0.9.1-1) installs a binary under /sbin and is thus affected by the recent /usr/bin consolidation; indeed, it was one of a handful of packages on my system that I uninstalled so I could do the upgrade.

I have flagged the package and no doubt the maintainer will attend to it in due course, but to try and help out a bit I include below the changes necessary to make the package install in a post-consolidation Arch environment. Cursory searches of the source do not suggest the presence of any (other) hard-coded paths, and the binary appears to be operable from the new location, so it's only a build issue.


(1) arch-usrbin-makefile-fix.diff (as file)

--- src/idle3-tools-0.9.1/Makefile	2011-05-31 18:48:52.000000000 +1000
+++ src/idle3-tools-0.9.1/Makefile	2013-06-08 11:41:02.000000000 +1000
@@ -3,10 +3,10 @@
 # DESTDIR is for non root installs (eg packages, NFS) only!
 DESTDIR =
 
-binprefix = 
+binprefix = /usr
 manprefix = /usr
 exec_prefix = $(binprefix)/
-sbindir = $(exec_prefix)sbin
+sbindir = $(exec_prefix)bin
 mandir = $(manprefix)/share/man
 oldmandir = $(manprefix)/man
 

(2) PKGBUILD.diff (to make a new PKGBUILD) -- In addition to including the above patch, it also corrects issues identified by namcap (full package name appearing in description, and an apparent dependency on glibc)

--- PKGBUILD	2011-07-18 20:08:00.000000000 +1000
+++ PKGBUILD	2013-06-08 12:23:41.000000000 +1000
@@ -3,14 +3,18 @@
 pkgname=idle3-tools
 pkgver=0.9.1
 pkgrel=1
-pkgdesc="Idle3-tools provides a linux/unix utility that can disable, get and set the value of the infamous idle3 timer found on recent Western Digital Hard Disk Drives."
+pkgdesc="A linux/unix utility that can disable, get and set the value of the idle3 timer found on recent Western Digital Hard Disk Drives."
 arch=('i686' 'x86_64')
 url="http://idle3-tools.sourceforge.net/"
 license=('GPL')
-source=("http://download.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz")
-md5sums=('797d8775b80b7b7b67a1f8b0a5b41f30')
+depends=('glibc')
+source=("http://download.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz" arch-usrbin-makefile-fix.diff)
+md5sums=('797d8775b80b7b7b67a1f8b0a5b41f30' '10468e498dcd772180a73934435a001e')
 
 build() {
+  #Patch Makefile per ArchLinux /usr/bin consolidation of June 2013
+  patch -Np1 -i ${srcdir}/arch-usrbin-makefile-fix.diff
+  
   cd ${srcdir}/${pkgname}-${pkgver}
   make
 }

As this is the first time I have actually constructed a patch myself and made it available, any (constructive) feedback is welcome; I tried to make as few changes as possible to the original files, so apologies if I missed correcting/adjusting things that should have been changed as well.

I will of course add a comment to the package page in AUR noting this topic.

Last edited by aexoxea (2013-07-19 15:32:20)

Offline

#2 2013-06-08 03:17:50

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [Solved] Patch for idle3-tools

I was going to tell you to use the "./configure" step to do this, but it appears that this source only have a makefile.  So I guess it would indeed be the way to do this.  So I think in the AUR comments, you should create a tarball and then upload it to some file hosting site and link to it from there.  It would just make things much easier for anyone trying to get this package.

Looking over what you have done, I would say that this is pretty a-okay.

Offline

#3 2013-06-08 03:50:07

aexoxea
Member
Registered: 2012-11-17
Posts: 62

Re: [Solved] Patch for idle3-tools

WonderWoofy wrote:

I was going to tell you to use the "./configure" step to do this, but it appears that this source only have a makefile.  So I guess it would indeed be the way to do this.

...

Looking over what you have done, I would say that this is pretty a-okay.

[#1284851]

Thank you smile. I will take note of your point about parameters to ./configure, since there are four other packages I intend to look at (hopefully over the course of the next few days) and I can certainly see some of them having a configure step.

WonderWoofy wrote:

...I think in the AUR comments, you should create a tarball and then upload it to some file hosting site and link to it from there.  It would just make things much easier for anyone trying to get this package.

[#1284851]

I don't currently have an account on such a site unfortunately, but will have a look at this after I look into the other packages (if however anyone else is reading this in the interim, does have such an account and is feeling particularly energetic, feel free).

Offline

#4 2013-06-08 03:56:52

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [Solved] Patch for idle3-tools

There are those free single public file hosting sites that yu can use.  Otherwise, I would say that since the package has not been updated since it was first uploaded, you should email the maintainer and see if you get a response.  I doubt that you will since it was uploaded and last updated in 2011.  If you don't get a response for two weeks you can then email aur-general and have the package orphaned so that you can adopt it.

Offline

#5 2013-06-08 10:45:54

aexoxea
Member
Registered: 2012-11-17
Posts: 62

Re: [Solved] Patch for idle3-tools

WonderWoofy wrote:

There are those free single public file hosting sites that y[o]u can use.

[#1284856]

Good point. I admit I've never looked into such services, but if I'm going to help out with things like this I probably should wink. I'll do some research, unless there are some particular services you (and/or the ArchLinux community in general) recommend...?

WonderWoofy wrote:

Otherwise, I would say that since the package has not been updated since it was first uploaded, you should email the maintainer and see if you get a response.  I doubt that you will since it was uploaded and last updated in 2011.  If you don't get a response for two weeks you can then email aur-general and have the package orphaned so that you can adopt it.

[#1284856]

Fair enough. The maintainer updated another package in AUR seven weeks ago, so there's reason to believe that they'll respond. I'll give them a bit of time to do so (as there's a workaround, per this thread), and will then follow through as you suggest; I'll also post updates here for anyone interested.

The lack of updates is likely due to upstream not having issued a new version since the package was uploaded (and the last commit to upstream is dated 24 January 2012); it's possible the tool is unmaintained upstream, though it does seem to get several hundred downloads each month (per SourceForge's stats) and there aren't lots of complaints plastered all over the discussions/bugs, so who knows?

Offline

#6 2013-07-19 15:31:50

aexoxea
Member
Registered: 2012-11-17
Posts: 62

Re: [Solved] Patch for idle3-tools

Marking as solved, as the maintainer has now updated the package per this thread. Many thanks!

Offline

Board footer

Powered by FluxBB