Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#37992 - [plan9port] wrong hardcoded paths in several files

Attached to Project: Community Packages
Opened by Dustin Fechner (dfe) - Tuesday, 03 December 2013, 21:26 GMT
Last edited by Alexander F. Rødseth (xyproto) - Thursday, 20 February 2014, 23:26 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Plan9port comes with a bunch of hardcoded paths referring to /usr/local/plan9. These usually get replaced by the actual install location (/usr/local/plan9port in our case), but several files in the Arch package still contain the (wrong) old path, which effectively breaks those files.

Also, what is the benefit of installing to /usr/local/plan9port anyway? In my view this only introduces possibilities for bugs like this.


Additional info:
* package version: 20131024-1
* a (maybe incomplete?) list of affected files is attached
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Thursday, 20 February 2014, 23:26 GMT
Reason for closing:  Fixed
Additional comments about closing:  With the power of sed, the hardcoded paths in plan9port seems to be fixed.
Comment by Alexander F. Rødseth (xyproto) - Thursday, 05 December 2013, 17:28 GMT
Hi,

Thanks for reporting.

As far as I can tell, plan9part already has hardcoded paths. These were, in previous editions of the plan9port Arch Linux package, changed at build time to point to /usr instead of /usr/local. However, this caused problems, some of which were solved by using /usr/local instead.

I wish plan9port could just use cmake or the regular combination of configure, make and make install (or one script to build, one to run checks and one to install).

If you have suggestions for improved build instructions, they are warmly welcome. This is the current PKGBUILD: https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/plan9port

I will look into this regardless.
Comment by Dustin Fechner (dfe) - Friday, 06 December 2013, 23:02 GMT
The simplest "solution" would be of course to just install to /usr/local/plan9. But I don't know if some packaging guideline would disallow that.
Comment by Alexander F. Rødseth (xyproto) - Monday, 16 December 2013, 15:10 GMT
Yes, that's the problem. /usr/local is not used by Arch Linux packages. /opt is used for some cases, but in general, packages are expected to install correctly to the file system, using /usr/bin for binary files, /usr/lib for libraries etc. Not quite sure what to do with this package, since changing the hardcoded path from /usr/local/plan9 to something else didn't quite work out.

I think I'll just let it install to /usr/local/plan9, for now, and try to get hold of upstream.
Comment by Alexander F. Rødseth (xyproto) - Monday, 16 December 2013, 22:02 GMT
Updated the package.
Comment by M. Brown (mbrown) - Sunday, 26 January 2014, 05:08 GMT
Current version of package (20131024-2) has the same issue.

Files affected are those listed here:

http://swtch.com/usr/local/plan9/lib/moveplan9.files

Simply run any command in that list, and you'll get an error reflecting the fact that each of those files contains an incorrect path reflecting the buildroot :

ex: "9 man 1 intro"
/usr/local/plan9/bin/9: /usr/local/plan9/bin/man: /build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc: bad interpreter: No such file or directory
/usr/local/plan9/bin/9: line 17: /usr/local/plan9/bin/man: Success
Comment by Alexander F. Rødseth (xyproto) - Monday, 27 January 2014, 19:43 GMT
Re-added the hack in the PKGBUILD that replaces the hardcoded /build/plan9port/pkg/plan9port/usr/local/plan9 paths with just /usr/local/plan9.
Hopefully, this will do the trick, now that it is in combination with using /usr/local.
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 28 January 2014, 00:07 GMT
Tested. Works fine here. Pushed package to [community]. Please re-open this bug if there should be further problems. Thanks.
Comment by M. Brown (mbrown) - Sunday, 09 February 2014, 08:35 GMT
  • Field changed: Percent Complete (100% → 0%)
Same issue in package version 20131024-3 :

$ grep -r '#!/build/plan9port' /usr/local/plan9
/usr/local/plan9/mail/lib/qmail:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/mail/lib/remotemail:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/man/mkindex:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/yesterday:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/lookman:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/vwhois:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/src:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/u.rc:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/netfileput:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/Getdir:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/"":#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/stack:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/9fs:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/netfilestat:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/unmount:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/sig:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/doctype:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/troff2png:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/adict:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/man:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/":#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/9.rc:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/vmount:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/ipso:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/netfileget:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/mount:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc
/usr/local/plan9/bin/spell:#!/build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc

$ 9 man 1 intro
/usr/local/plan9/bin/9: /usr/local/plan9/bin/man: /build/plan9port/pkg/plan9port/usr/local/plan9/bin/rc: bad interpreter: No such file or directory
/usr/local/plan9/bin/9: line 17: /usr/local/plan9/bin/man: Success
Comment by Alexander F. Rødseth (xyproto) - Sunday, 09 February 2014, 09:44 GMT
Dang. There must be at least one sensible way to package it without getting these kinds of errors? I'll try some more. Thanks for re-opening.
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 19 February 2014, 12:34 GMT
Updated the package. It works here now.

Does it work for you?
Comment by M. Brown (mbrown) - Wednesday, 19 February 2014, 17:36 GMT
Thanks for the update! Everything working now on my end.
Comment by Alexander F. Rødseth (xyproto) - Thursday, 20 February 2014, 23:25 GMT
Great! Thanks for the swift reply.

Closing this bug.

Loading...