Bug 194352 - [maintainer update] japanese/mh: Fix check-plist error (and some fix)
Summary: [maintainer update] japanese/mh: Fix check-plist error (and some fix)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-14 14:02 UTC by WATANABE Kazuhiro
Modified: 2014-10-20 19:29 UTC (History)
1 user (show)

See Also:


Attachments
A patch for japanese/mh (5.03 KB, patch)
2014-10-14 14:02 UTC, WATANABE Kazuhiro
no flags Details | Diff
poudriere testport log with the patch (9.1-RELEASE amd64) (258.65 KB, text/x-log)
2014-10-14 14:05 UTC, WATANABE Kazuhiro
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description WATANABE Kazuhiro 2014-10-14 14:02:29 UTC
Created attachment 148297 [details]
A patch for japanese/mh

1) Install Japanese man pages
2) Remove ATTVIBUG check from the configure script
3) Don't setuid/setgid to binaries
 3-1) Disable RPOP support
 3-2) Don't setgid to rcvtty
4) Fix rcvtty segfault on FreeBSD/amd64
5) Use BSD_INSTALL_LIB instead of 'cp' for libmh.so.3
6) Remove a @dirrm entry from pkg-plist
7) Bump PORTREVISION

1) Install Japanese man pages (Update: Makefile)

The MH's configure script checks whether the MANPREFIX/man/ja directory exists.
If the directory does not exist (e.g. fresh install), the Japanese man pages
are not installed.  It causes a check-plist error, and was already reported by
the FreeBSD package build server.  For example:

 [package - 91i386-quarterly][japanese/mh] Failed for ja-mh-6.8.4.j3.05_1 in package
 https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20141006/thread.html#207419

To force the installation, add a "--enable-jmandir=${MANPREFIX}/man/ja"
argument to the CONFIGURE_ARGS variable.

2) Remove ATTVIBUG check from the configure script (Update: patch-configure)

The MH's configure script checks whether vi has ATTVIBUG.  READ-ME says:

| ATTVIBUG
|  This option causes MH to return to the "What now?"
|  prompt if your initial editor is vi and it exits with
|  non-zero status.  Use on Sun OS 4.1 and other systems
|  where the /usr/ucb/vi editor was changed to exit with
|  its status equal to the number of pseudo-"errors"
|  encountered during the edit.  This causes a problem
|  for programs that test the exit status of their editor
|  and abort if the status is non-zero.  (This includes
|  MH and programs like /usr/etc/vipw).

On FreeBSD, the check routine remains a vi's recovery file in the 
/var/tmp/vi.recover directory like this:

| ====>> Checking for filesystem violations... done
| ====>> Error: Filesystem touched during build:
| var/tmp/vi.recover/vi.pOt2Hl extra

(poudriere only reports this error with the "bulk" command with "-t" option
or the "testport" command.)

The FreeBSD ports collection doesn't support such a classic environment.
So I remove the check routine.

3) Don't setuid/setgid to binaries

 3-1) Disable RPOP support (update: Makefile)

 It reduce the setuid/setgid binaries (3 -> 1)

 3-2) Don't setgid to rcvtty (the last one) (New: patch-conf__makefiles__uip)

 It seems to work without setgid.

4) Fix rcvtty segfault on FreeBSD/amd64 (Update: patch-uip:rcvtty.c)

aquarius-vm:~ {6} gdb /usr/local/lib/mh/rcvtty rcvtty.core 
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
Core was generated by `rcvtty'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/libmh.so.3...done.
Loaded symbols for /usr/local/lib/libmh.so.3
Reading symbols from /lib/libncurses.so.8...done.
Loaded symbols for /lib/libncurses.so.8
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000800d99737 in strlen () from /lib/libc.so.7
(gdb) where
#0  0x0000000800d99737 in strlen () from /lib/libc.so.7
#1  0x000000080082e4fe in getcpy (
    str=0x1070100 <Address 0x1070100 out of bounds>) at getcpy.c:17
#2  0x000000080082ea66 in fmt_compile (
    fstring=0x1070100 <Address 0x1070100 out of bounds>, fmt=0x614dd8)
    at fmtcompile.c:241
#3  0x0000000000403f23 in scan (inb=0x800fd3020, innum=0, outnum=0, 
    nfs=0x1070100 <Address 0x1070100 out of bounds>, width=80, curflg=0, 
    unseen=0, hdrflg=0, 
    folder=0x800000000 <Address 0x800000000 out of bounds>, size=0, noisy=0)
    at scansbr.c:113
#4  0x0000000000403c05 in header_fd () at rcvtty.c:335
#5  0x0000000000403790 in main (argc=1, argv=0x7fffffffd7a0) at rcvtty.c:207
(gdb) 

5) Use BSD_INSTALL_LIB instead of 'cp' for libmh.so.3 (New: patch-conf__makefiles__sbr)

6) Remove a @dirrm entry from pkg-plist

7) Bump PORTREVISION
Comment 1 WATANABE Kazuhiro 2014-10-14 14:05:46 UTC
Created attachment 148298 [details]
poudriere testport log with the patch (9.1-RELEASE amd64)
Comment 2 John Marino freebsd_committer freebsd_triage 2014-10-14 17:03:41 UTC
Looks good, moving to patch-ready pool.
Comment 3 commit-hook freebsd_committer freebsd_triage 2014-10-20 08:16:47 UTC
A commit references this bug:

Author: robak
Date: Mon Oct 20 08:16:05 UTC 2014
New revision: 371242
URL: https://svnweb.freebsd.org/changeset/ports/371242

Log:
  japanese/mh: multiple fixes

  - Add japanese man pages
  - Don't setuid/setgid to binaries
  - Use BSD_INSTALL_LIB instead of cp
  - Remove @dirrm

  PR:		194352
  Submitted by:	Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
  Approved by:	mentors (implicit)

Changes:
  head/japanese/mh/Makefile
  head/japanese/mh/files/patch-configure
  head/japanese/mh/files/patch-uip:rcvtty.c
  head/japanese/mh/pkg-plist
Comment 4 Bartek Rutkowski freebsd_committer freebsd_triage 2014-10-20 08:22:44 UTC
Committed, thanks for your work!
Comment 5 commit-hook freebsd_committer freebsd_triage 2014-10-20 19:29:39 UTC
A commit references this bug:

Author: antoine
Date: Mon Oct 20 19:29:24 UTC 2014
New revision: 371292
URL: https://svnweb.freebsd.org/changeset/ports/371292

Log:
  MFH: r371242

  japanese/mh: multiple fixes

  - Add japanese man pages
  - Don't setuid/setgid to binaries
  - Use BSD_INSTALL_LIB instead of cp
  - Remove @dirrm

  PR:		194352
  Submitted by:	Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
  Approved by:	mentors (implicit)

Changes:
_U  branches/2014Q4/
  branches/2014Q4/japanese/mh/Makefile
  branches/2014Q4/japanese/mh/files/patch-configure
  branches/2014Q4/japanese/mh/files/patch-uip:rcvtty.c
  branches/2014Q4/japanese/mh/pkg-plist