Bug 226632

Summary: x11/sterm: update to 0.8
Product: Ports & Packages Reporter: Mateusz Piotrowski <0mp>
Component: Individual Port(s)Assignee: Tobias Kortkamp <tobik>
Status: Closed FIXED    
Severity: Affects Some People CC: 0mp, pkubaj, tobik
Priority: --- Flags: pkubaj: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch upating x11/sterm to 0.8
none
UPDATING patch
pkubaj: maintainer-approval+
Patch upating x11/sterm to 0.8 (patch revision: 2) 0mp: maintainer-approval?

Description Mateusz Piotrowski freebsd_committer freebsd_triage 2018-03-15 15:01:02 UTC
The new version of x11/sterm has been released.

I'm working on a patch.
Comment 1 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-03-15 16:14:09 UTC
Created attachment 191524 [details]
Patch upating x11/sterm to 0.8

Changes:
 - Update to 0.8.[1]
 - Replace PORTVERSION with DISTVERION.
 - Set LICENSE to MIT as the license of this program is a standard MIT license.
 - Fix the way we handle the terminfo of x11/sterm. Historically, it was a little bit confusing to install terminfo for x11/sterm. The patch which removes a broken tic invocation is replaced with "BINARY_ALIAS=  tic=true". FreeBSD 12, and soon 11-STABLE and 11.2, do not require any additional configuration (thanks to bapt@)[2]. For older version, however, there is a simple set of instructions on how to configure terminfo for x11/sterm in pkg-message.
 - Create a symbolic link to user-defined config.h instead of making a copy. This is how it is done in other suckless.org ports such as x11-wm/dwm and www/quark.
 - Respect CPPFLAGS.
 - Do not set LOCALBASE, as it is no longer present in the x11/sterm upstream.
 - Add some files to DOCS and DATA.
 - Use HTTPS in WWW.

QA:
 - poudriere: 11.1-RELEASE amd64
 - portlint
 - port test
 - FreeBSD 12.0-CURRENT r330529 amd64

[1]: https://git.suckless.org/st/log/?qt=range&q=0.7..0.8
[2]: https://svnweb.freebsd.org/base?view=revision&revision=331006
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2018-03-16 07:48:48 UTC
(In reply to Mateusz Piotrowski from comment #1)
config.h has changed, mine doesn't work. I will shortly make UPDATING entry.
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2018-03-17 15:08:19 UTC
Created attachment 191577 [details]
UPDATING patch

The patch looks good, here's the UPDATING patch.

There's one problem though, Poudriere 3.2.5 on 10.4-RELEASE with jailed 10.4-RELEASE fails to build port with this patch:
#### /usr/ports/Mk/Scripts/ports_env.sh ####
_CCVERSION_921dbbb2=FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd10.4 Thread model: posix
_ALTCCVERSION_921dbbb2=none
_CXXINTERNAL_acaad9ca=FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd10.4 Thread model: posix "/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" "--hash-style=bot
h" "--enable-new-dtags" "-o" "a.out" "/usr/lib/crt1.o" "/usr/lib/crti.o" "/usr/lib/crtbegin.o" "-L/usr/lib" "/dev/null" "-lc++" "-lm" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "
/usr/lib/crtend.o" "/usr/lib/crtn.o"
CC_OUTPUT_921dbbb2_58173849=yes
CC_OUTPUT_921dbbb2_9bdba57c=yes
CC_OUTPUT_921dbbb2_6a4fe7f5=yes
CC_OUTPUT_921dbbb2_6bcac02b=yes
CC_OUTPUT_921dbbb2_67d20829=yes
CC_OUTPUT_921dbbb2_bfa62e83=yes
CC_OUTPUT_921dbbb2_f0b4d593=yes
CC_OUTPUT_921dbbb2_308abb44=yes
CC_OUTPUT_921dbbb2_f00456e5=yes
CC_OUTPUT_921dbbb2_65ad290d=error: invalid value 'c++14' in '-std=c++14'
CC_OUTPUT_921dbbb2_b2657cc3=yes
CC_OUTPUT_921dbbb2_380987f7=yes
_OBJC_CCVERSION_921dbbb2=FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd10.4 Thread model: posix
_OBJC_ALTCCVERSION_921dbbb2=none
ARCH=amd64
OPSYS=FreeBSD
_OSRELEASE=10.4-RELEASE-p5
OSREL=10.4
OSVERSION=1004000
PYTHONBASE=/usr/local
HAVE_COMPAT_IA32_KERN=YES
_SMP_CPUS=8
CONFIGURE_MAX_CMD_LEN=262144
HAVE_PORTS_ENV=1
#### Misc Poudriere ####
---End make.conf---
--Resource limits--
cpu time               (seconds, -t)  unlimited
file size           (512-blocks, -f)  unlimited
data seg size           (kbytes, -d)  33554432
stack size              (kbytes, -s)  524288
core file size      (512-blocks, -c)  unlimited
max memory size         (kbytes, -m)  unlimited
locked memory           (kbytes, -l)  unlimited
max user processes              (-u)  34318
open files                      (-n)  1024
virtual mem size        (kbytes, -v)  unlimited
swap limit              (kbytes, -w)  unlimited
sbsize                   (bytes, -b)  unlimited
pseudo-terminals                (-p)  unlimited
--End resource limits--
=>> Status   x11/sterm | sterm-0.8: check-sanity
=======================<phase: check-sanity   >============================
make: don't know how to make check-sanity. Stop

make: stopped in /usr/ports/x11/sterm
build of x11/sterm | sterm-0.8 ended at Sat Mar 17 17:03:02 CET 2018
build time: 00:00:00
!!! build failure encountered !!!
[00:00:17] Error: Build failed in phase: check-sanity


Build with st 0.7 passes fine. I'm not sure what this error means, st is written  in C, not C++, and there's no mention of -std=c++14 in st's source.
Comment 4 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-03-17 18:40:21 UTC
(In reply to Piotr Kubaj from comment #3)

I cannot reproduce it on 10.4-RELEASE amd64 running inside a poudriere 3.2.99.20180313 jail on FreeBSD 12.0-CURRENT r330529 amd64 as testport for x11/sterm 0.8 runs just fine.

I do get that c++14 error as well, however, it passes the check-sanity phase. It does not cause poudriere testport to fail.

Any ideas?
Comment 5 Piotr Kubaj freebsd_committer freebsd_triage 2018-03-17 19:10:42 UTC
(In reply to Mateusz Piotrowski from comment #4)
Hm, on poudriere-devel build passes fine, so I guess it's a Poudriere bug.
Comment 6 Piotr Kubaj freebsd_committer freebsd_triage 2018-03-17 19:12:02 UTC
(In reply to Mateusz Piotrowski from comment #4)
BTW, I suppose a loop passes via each -std option to figure out whether a given std is available for one's compiler, but I'm still not sure why it fails at check-sanity.
Comment 7 Tobias Kortkamp freebsd_committer freebsd_triage 2018-03-18 09:10:53 UTC
(In reply to Piotr Kubaj from comment #6)
> I'm still not sure why it fails at check-sanity. 

This often indicates a permissions problem.  Make sure that all files
in /usr/ports/x11/sterm are readable by the 'nobody' user (which
Poudriere uses to build ports by default) or that they are readable by
all groups after applying the patch.
Comment 8 Tobias Kortkamp freebsd_committer freebsd_triage 2018-03-18 09:27:52 UTC
This builds fine for me in Poudriere on 10.3/i386, 10.4/i386, 11.1/amd64 and
I'll commit if there are no objections.
Comment 9 Tobias Kortkamp freebsd_committer freebsd_triage 2018-03-18 09:33:45 UTC
I think there is a mistake in the instructions in pkg-message.

   # cd /usr/local/share/sterm
   # cap_mkdb termcap

doesn't work and it should probably be

   # cd /usr/share/misc
   # cap_mkdb termcap

?
Comment 10 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-03-18 12:17:55 UTC
(In reply to Tobias Kortkamp from comment #9)

> ... it should probably be
> 
>    # cd /usr/share/misc
>    # cap_mkdb termcap

Yes, you are right. Thank you!
Comment 11 Mateusz Piotrowski freebsd_committer freebsd_triage 2018-03-19 21:25:02 UTC
Created attachment 191642 [details]
Patch upating x11/sterm to 0.8 (patch revision: 2)

I rebased my development branch so the patch should now apply cleanly without any issues on the latest ports tree. Also, I improved the pkg-message and fixed the problem spotted by Tobias.
Comment 12 Piotr Kubaj freebsd_committer freebsd_triage 2018-03-20 14:22:29 UTC
Comment on attachment 191642 [details]
Patch upating x11/sterm to 0.8 (patch revision: 2)

LGTM, works here.
Comment 13 commit-hook freebsd_committer freebsd_triage 2018-03-20 17:10:34 UTC
A commit references this bug:

Author: tobik
Date: Tue Mar 20 17:10:09 UTC 2018
New revision: 465094
URL: https://svnweb.freebsd.org/changeset/ports/465094

Log:
  x11/sterm: Update to 0.8

  - Fix LICENSE and set it to MIT
  - Fix the way we handle the terminfo of x11/sterm.  FreeBSD 12,
    11-STABLE, and 11.2-RELEASE do not require any additional
    configuration (thanks to bapt@) [1].  For older versions, there is a
    simple set of instructions on how to configure terminfo for x11/sterm
    in pkg-message.
  - Create a symbolic link to user-defined config.h instead of making a
    copy as is done in other suckless.org ports such as x11-wm/dwm and
    www/quark.
  - Respect CPPFLAGS
  - Add some files to DOCS and DATA
  - Eliminate an unnecessary .for loop during install
  - Use HTTPS in WWW
  - Add UPDATING entry as old config.h files will need to be updated for
    the newer version

  [1] https://svnweb.freebsd.org/changeset/base/331006

  Changes:	https://git.suckless.org/st/log/?qt=range&q=0.7..0.8
  PR:		226632
  Submitted by:	0mp
  Approved by:	Piotr Kubaj <pkubaj@anongoth.pl> (maintainer)

Changes:
  head/UPDATING
  head/x11/sterm/Makefile
  head/x11/sterm/distinfo
  head/x11/sterm/files/patch-Makefile
  head/x11/sterm/files/pkg-message.in
  head/x11/sterm/pkg-descr
Comment 14 commit-hook freebsd_committer freebsd_triage 2018-03-20 17:13:39 UTC
A commit references this bug:

Author: tobik
Date: Tue Mar 20 17:12:48 UTC 2018
New revision: 465095
URL: https://svnweb.freebsd.org/changeset/ports/465095

Log:
  Fix format of UPDATING entry

  PR:		226632

Changes:
  head/UPDATING