Bug 207299 - print/muttprint: Update to 0.73
Summary: print/muttprint: Update to 0.73
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Raphael Kubo da Costa
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2016-02-18 09:47 UTC by Matthias Apitz
Modified: 2016-02-25 19:20 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback? (guru)


Attachments
gzip'ed shar(1) file (26.66 KB, application/x-gzip)
2016-02-18 09:47 UTC, Matthias Apitz
guru: maintainer-approval+
Details
svn diff patch file (4.92 KB, application/x-gzip)
2016-02-18 19:44 UTC, Matthias Apitz
no flags Details
Actual patch (22.20 KB, patch)
2016-02-19 11:40 UTC, Raphael Kubo da Costa
rakuco: maintainer-approval+
Details | Diff
new patch including all avaialble languages (32.40 KB, patch)
2016-02-20 11:02 UTC, Matthias Apitz
rakuco: maintainer-approval+
Details | Diff
9.3 build log (78.40 KB, text/plain)
2016-02-23 11:41 UTC, Raphael Kubo da Costa
no flags Details
svn diff patch file to update print/muttprint to 0.73 (32.88 KB, patch)
2016-02-24 15:56 UTC, Matthias Apitz
no flags Details | Diff
svn diff patch file to update print/muttprint to 0.73 (32.84 KB, patch)
2016-02-24 17:53 UTC, Matthias Apitz
guru: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Apitz 2016-02-18 09:47:41 UTC
Created attachment 167141 [details]
gzip'ed shar(1) file

the attached shar(1) file should update the port to 0.73;
Comment 1 Raphael Kubo da Costa freebsd_committer 2016-02-18 13:36:32 UTC
Hi, Matthias,

Is there a reason why the update was made as a .shar file instead of a regular patch file?
Comment 2 Matthias Apitz 2016-02-18 13:42:06 UTC
the distfile between the last version 0.72d and 0.73 changed fundatmental (no Makefiles anymore, but Makefile.am ...); so nearly all patches in files/* changed;
that's why I found it more convinient to provide a new shar(1) file;
Comment 3 Raphael Kubo da Costa freebsd_committer 2016-02-18 14:00:35 UTC
It's easier for us committing/reviewing the patch if you just produce a diff instead; if I understood you correctly, the only issue is that it can get big because the existing patches will be removed and new ones added, right? If so, it should be fine.
Comment 4 Matthias Apitz 2016-02-18 19:44:22 UTC
Created attachment 167156 [details]
svn diff patch file

added svn diff patch file and deleted the shar archive
Comment 5 Raphael Kubo da Costa freebsd_committer 2016-02-19 11:36:30 UTC
Did you attach the right file? It looks garbled here.
Comment 6 Raphael Kubo da Costa freebsd_committer 2016-02-19 11:38:24 UTC
Comment on attachment 167156 [details]
svn diff patch file

You've attached a gzipped file and selected the wrong mime type.
Comment 7 Raphael Kubo da Costa freebsd_committer 2016-02-19 11:40:50 UTC
Created attachment 167173 [details]
Actual patch

I'm attaching the actual patch file.
Comment 8 Raphael Kubo da Costa freebsd_committer 2016-02-19 11:52:01 UTC
Questions I have about the patch:
- Can't you avoid patching Makefile.am if you just install the additional documentation files yourself in the post-install target?
- Why are the translated man pages not being installed?
- Does doc/manpages/en/muttprint.pod as-is cause build issues?
- Is installing the original files listed in pics/Makefile.am a problem? If not, you could get rid of the patch and just install Beastie.eps in post-install.

And something to consider but not exactly urgent:
- You should convert checks for certain options to options helpers. For example:
  .if ${PORT_OPTIONS:MX11}
  RUN_DEPENDS+=	convert:${PORTSDIR}/graphics/ImageMagick
  .else
  RUN_DEPENDS+=   convert:${PORTSDIR}/graphics/ImageMagick-nox11
  .endif

  becomes

  X11_RUN_DEPENDS=convert:${PORTSDIR}/graphics/ImageMagick
  X11_RUN_DEPENDS_OFF=convert:${PORTSDIR}/graphics/ImageMagick-nox11
- The same applies to options helpers in targets. Fore xample:
  post-patch:
  # ...
  .if ${PORT_OPTIONS:MCUPS}
    @${REINPLACE_CMD} 's|lpr $$CUPS_OPTIONS|${PREFIX}/bin/lpr $$CUPS_OPTIONS|' ${WRKSRC}/muttprint
  .endif

  becomes

  post-patch-CUPS-on:
    @${REINPLACE_CMD} 's|lpr $$CUPS_OPTIONS|${PREFIX}/bin/lpr $$CUPS_OPTIONS|' ${WRKSRC}/muttprint
Comment 9 Matthias Apitz 2016-02-19 19:40:02 UTC
Some general remarks. Before starting the update of the software (distfile)
I contacted the original maintainer of the software itself, because the
description (muttprint-0.73/INSTALL) was completely wrong/outdated; the
maintainer responded that he could not do anything for the software for years.
So I investigated by my own, how to build muttprint-0.73 at all and how to
do this with the FreeBSD ports infrastructure. 

The files for the doc/manpages (*.pod) and for the doc/manual (.sgml) are
broken and shoul be fixed better "upstream", i.e. in the software itself.

Re/ you questions:

Questions I have about the patch:

- Can't you avoid patching Makefile.am if you just install the additional documentation files yourself in the post-install target?

Yes, could be done. But I found it convinient to install the README* files
just as the other files. Do you insist changing this?

- Why are the translated man pages not being installed?

Because for any of the 4 languages the .pod file is broken and it
should be either patched or the Makefile.am should be patched to
take care.

- Does doc/manpages/en/muttprint.pod as-is cause build issues?

Yes. They contain invalid ISO 8859-1 chars without having a '=encoding latin1'
statement.

The 5 *.sqlm files for the doc/manual are broken too (missing SGML tags) and
for any of the 5 languages the Makefile.am was calling 'd2pdf' / 'd2html' / ...
were it should call 'docbook2XXX' and with outdated cmd line flags;
i.e. for any language the Makefile.am and the *.sgml file must be patched.
That's why I only adjusted the English documentation (which is perhaps
as content even outdated too). All the software smells as abandon-ware, but
I like to use it with my beloved mutt MUA.

- Is installing the original files listed in pics/Makefile.am a problem? If not, you could get rid of the patch and just install Beastie.eps in post-install.

No, but they are penguin files for Linux and are not to be used on FreeBSD.
I could just remove them from package and only install Beastie.eps.
Comment 10 Matthias Apitz 2016-02-20 11:02:35 UTC
Created attachment 167211 [details]
new patch including all avaialble languages

I fixed all the build issues and bugs in the *.pod and *.sgml files for the manpages and the manual; the port now installs them all (4 man pages and 5 manuals).
Comment 11 Kubilay Kocak freebsd_committer freebsd_triage 2016-02-23 08:51:12 UTC
Thank Matthias, can you please confirm the latest change passes QA (portlint, poudriere) please.
Comment 12 Raphael Kubo da Costa freebsd_committer 2016-02-23 10:23:03 UTC
(In reply to Matthias Apitz from comment #9)
> Some general remarks. Before starting the update of the software (distfile)
> I contacted the original maintainer of the software itself, because the
> description (muttprint-0.73/INSTALL) was completely wrong/outdated; the
> maintainer responded that he could not do anything for the software for
> years.
> So I investigated by my own, how to build muttprint-0.73 at all and how to
> do this with the FreeBSD ports infrastructure.

This should go without saying, but your efforts are really appreciated. I hope you take all the comments here as suggestions for improving your work rather than an attempt at deriding it.

>> - Can't you avoid patching Makefile.am if you just install the additional
>> documentation files yourself in the post-install target?
>
> Yes, could be done. But I found it convinient to install the README* files
> just as the other files. Do you insist changing this?

I don't. What I meant is that it's usually easier to install additional files separately in post-install rather than changing the build system, as if you choose the latter approach you often need to regenerate your patches every time there's a new software release. Since it's very unlikely there will ever be a new muttprint release, it shouldn't matter much in this case.
Comment 13 Raphael Kubo da Costa freebsd_committer 2016-02-23 11:41:57 UTC
Created attachment 167321 [details]
9.3 build log

The patch failed to build for me on both 9.3-i386 and 11-amd64, please see the attached log.
Comment 14 Matthias Apitz 2016-02-23 12:15:14 UTC
Comment on attachment 167321 [details]
9.3 build log

I'm on 11-CURRENT amd64, r292778

Can you please grab from the work dir the two files:

# cp work/muttprint-0.73/doc/manual/stylesheet.dsl /tmp
# cp work/muttprint-0.73/doc/manual/de/manual-de-sed.sgml /tmp

and run

# docbook2pdf -d /tmp/stylesheet.dsl /tmp/manual-de-sed.sgml

it looks like jade on your host does not understand the SGML file; my jade is:

$ pkg info | fgrep jade
jade-1.2.1_10
tex-jadetex-3.13_3

and the SGML file starts with:

<!DOCTYPE ARTICLE PUBLIC "-//OASIS//DTD DocBook V4.1//EN">

<article lang="de" id="index">
...
Comment 15 Raphael Kubo da Costa freebsd_committer 2016-02-23 13:24:42 UTC
This was a Poudriere bulk, so similar to what you'd get in the package building cluster.

In the 11amd64 jail, I did what you've asked me to and got the same output that's on the 9.3-i386 build log (lots of warnings and errors, and docbook2pdf returns with error code 8).
Comment 16 Matthias Apitz 2016-02-23 13:32:18 UTC
please add to the Makefile one line:

BUILD_DEPENDS+= ${LOCALBASE}/share/sgml/docbook/catalog:${PORTSDIR}/textproc/docbook-sgml

I will test it too in poudriere later or tomorrow, but I think the above is missing (and docbook-sgml was installed on my host already);

thanks for raising this issue;
Comment 17 Raphael Kubo da Costa freebsd_committer 2016-02-23 15:39:15 UTC
Alright, with that dependency the port finally built here on Poudriere.

With that out of the way, let's focus on the (small) remaining issues that need to be fixed before committing:
- PORTREVISION=0 should be dropped. It's 0 by default.
- Like the log says in the "check-sanity" stage, you should replace your use of USE_AUTOTOOLS with USES=autoreconf and GNU_CONFIGURE=yes.
- The new build-dependency on docbook-sgml should follow what other ports do, so instead of specifying the full path like that "docbook-sgml>0:${PORTSDIR}/textproc/docbook-sgml" is enough.

Once these are fixed and a new patch is uploaded, I think we're ready to commit it to the tree.
Comment 18 Matthias Apitz 2016-02-24 09:10:57 UTC
I'm still testing and polishing the port... while having a close look on the messages spilled out from the docbook2pdf(...) runs, it gives a lot of errors like these lines:
...
mv manual-en-sed.pdf manual-en.pdf
docbook2ps -d ../stylesheet.dsl manual-en-sed.sgml
Using catalogs: /usr/local/share/sgml/catalog
Using stylesheet: /usr/ports/print/muttprint/work/muttprint-0.73/doc/manual/en/../stylesheet.dsl
Working on: /usr/ports/print/muttprint/work/muttprint-0.73/doc/manual/en/manual-en-sed.sgml
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:8:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:9:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:10:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:11:28:E: "1061" is not a character number in the document character set
...

they are all about problems in the same file 'dbl1mn.ent' installed by the port dsssl-docbook-modular-1.79_1,1, i.e. do not belong to "my" port;

I'm by no mean a DocBook expert; any ideas how to get rid of them? should I file a bug against the port dsssl-docbook-modular?
Comment 19 Raphael Kubo da Costa freebsd_committer 2016-02-24 09:18:11 UTC
My DocBook expertise is zero, so I can't help much. Since these errors are not fatal (and assuming the generated documentation looks OK), we can go ahead with this update while you file a bug against that port.
Comment 20 Matthias Apitz 2016-02-24 09:34:34 UTC
(In reply to Raphael Kubo da Costa from comment #19)
I glanced through the 13-15 pages PDF files:
work/muttprint-0.73/doc/manual/en/manual-en.pdf
work/muttprint-0.73/doc/manual/es/manual-es.pdf
work/muttprint-0.73/doc/manual/de/manual-de.pdf
work/muttprint-0.73/doc/manual/it/manual-it.pdf
work/muttprint-0.73/doc/manual/sl/manual-sl.pdf
and they look fine to me;
Comment 21 Raphael Kubo da Costa freebsd_committer 2016-02-24 09:36:46 UTC
Good; please address the points in comment #17 and we should be ready to go \o/
Comment 22 Matthias Apitz 2016-02-24 09:46:35 UTC
(In reply to Raphael Kubo da Costa from comment #21)
I did this already and I'm testing based on the changes:

make stage
make check-orphans
make package
make install
make deinstall
pkg add package-filename

make package (as normal user having the port below /tmp)

portlint 
poudriere

will send the diff later the day;
Comment 23 Matthias Apitz 2016-02-24 11:43:15 UTC
(In reply to Raphael Kubo da Costa from comment #19)
filed issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207458
Comment 24 Matthias Apitz 2016-02-24 15:56:15 UTC
Created attachment 167363 [details]
svn diff patch file to update print/muttprint to 0.73

all tests from Comment #22 passed;
Comment 25 Raphael Kubo da Costa freebsd_committer 2016-02-24 16:30:51 UTC
(In reply to Matthias Apitz from comment #24)
> Created attachment 167363 [details]
> svn diff patch file to update print/muttprint to 0.73
> 
> all tests from Comment #22 passed;

+BUILD_DEPENDS=	docbook2pdf:${PORTSDIR}/textproc/docbook-utils
+BUILD_DEPENDS+=	docbook-sgml>0:${PORTSDIR}/textproc/docbook-sgml

This should be
BUILD_DEPENDS= foo \
               bar

+USES=		perl5 gmake autoreconf

It's always a good idea to keep this sorted.

+AUTOMAKE_ARGS=	--add-missing

You probably don't need this (my Poudriere builds worked fine without it).
Comment 26 Matthias Apitz 2016-02-24 17:53:01 UTC
Created attachment 167368 [details]
svn diff patch file to update print/muttprint to 0.73

patch which contains cleanups as proposed in Comment #25
Comment 27 commit-hook freebsd_committer 2016-02-25 13:05:46 UTC
A commit references this bug:

Author: rakuco
Date: Thu Feb 25 13:05:22 UTC 2016
New revision: 409515
URL: https://svnweb.freebsd.org/changeset/ports/409515

Log:
  Update to 0.73.

  This release was never formally announced on the website, but is available
  for download. Matthias, the port maintainer, had to do a lot of adjustments
  to get it to an actual buildable state that are reflected in the patches
  added to files/.

  PR:		207299
  Submitted by:	Matthias Apitz <guru@unixarea.de> (maintainer)

Changes:
  head/print/muttprint/Makefile
  head/print/muttprint/distinfo
  head/print/muttprint/files/patch-Makefile
  head/print/muttprint/files/patch-Makefile.am
  head/print/muttprint/files/patch-configure.ac
  head/print/muttprint/files/patch-doc_manpages_Makefile
  head/print/muttprint/files/patch-doc_manpages_de_muttprint.pod
  head/print/muttprint/files/patch-doc_manpages_en_muttprint.pod
  head/print/muttprint/files/patch-doc_manpages_es_muttprint.pod
  head/print/muttprint/files/patch-doc_manpages_it_muttprint.pod
  head/print/muttprint/files/patch-doc_manual_Makefile
  head/print/muttprint/files/patch-doc_manual_de_Makefile.am
  head/print/muttprint/files/patch-doc_manual_en_Makefile.am
  head/print/muttprint/files/patch-doc_manual_en_manual-en.sgml
  head/print/muttprint/files/patch-doc_manual_es_Makefile.am
  head/print/muttprint/files/patch-doc_manual_it_Makefile.am
  head/print/muttprint/files/patch-doc_manual_it_manual-it.sgml
  head/print/muttprint/files/patch-doc_manual_sl_Makefile.am
  head/print/muttprint/files/patch-langinfo_Makefile
  head/print/muttprint/files/patch-muttprint
  head/print/muttprint/files/patch-pics_Makefile.am
  head/print/muttprint/pkg-descr
  head/print/muttprint/pkg-plist
Comment 28 Raphael Kubo da Costa freebsd_committer 2016-02-25 13:06:53 UTC
Finally landed. Thanks so much for working on this and going through several iterations of the patch.
Comment 29 commit-hook freebsd_committer 2016-02-25 14:31:55 UTC
A commit references this bug:

Author: rakuco
Date: Thu Feb 25 14:31:10 UTC 2016
New revision: 409522
URL: https://svnweb.freebsd.org/changeset/ports/409522

Log:
  Remove russian/muttprint.

  The port was created in 2003 and never updated again except when it needed
  to be adapted to changes in the ports framework itself. It has not had a
  maintainer since 2007.

  After updating print/muttprint to 0.73, the translation was not even
  accurate anymore, and upstream already includes an updated version of the
  same file (translation-ru.pl). The port was also broken after the
  print/muttprint update, as we stopped setting variables such as CATEGORIES,
  COMMENT and MAINTAINER with "?=" instead of "=".

  PR:		207299

Changes:
  head/MOVED
  head/russian/Makefile
  head/russian/muttprint/
Comment 30 Matthias Apitz 2016-02-25 19:20:20 UTC
(In reply to Raphael Kubo da Costa from comment #28)
Thanks to you and koobs@ for guiding me through, I learned a lot.