Bug 204021 - irc/unreal fails to start.
Summary: irc/unreal fails to start.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Mathieu Arnold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-25 22:26 UTC by Axel Gonzalez
Modified: 2015-10-27 14:03 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (mat)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Gonzalez 2015-10-25 22:26:03 UTC
After installing Unreal-3.2.10.5 from pkgs unreal fails to start with the following error:

[Sun Oct 25 14:41:23 2015] - Cannot open stream socket() irc.example.com[]:Protocol not supported


FreeBSD io 10.1-RELEASE-p16 FreeBSD 10.1-RELEASE-p16 #0: Tue Jul 28 12:04:19 UTC 2015     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


This patch fixes, and allows to start:

cat files/patch-src__s_bsd.c
--- src/s_bsd.c.orig    2015-10-25 15:01:31.329347815 -0600
+++ src/s_bsd.c 2015-10-25 15:02:46.495342670 -0600
@@ -455,7 +455,7 @@
         */
        if (cptr->fd == -1)
        {
-               cptr->fd = socket(AFINET, SOCK_STREAM, 0);
+               cptr->fd = socket(AFINET, SOCK_STREAM, IPPROTO_TCP);
        }
        if (cptr->fd < 0)
        {

Running on a jail with ipv4 if that makes a difference.


Also the ircd binary is installed with 700 permissions, which prevents run it as another user.

install -m 0700 /tmp/usr/ports/irc/unreal/work/Unreal3.2.10.5/src/ircd /tmp/usr/ports/irc/unreal/work/stage/usr/local/libexec/ircd
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-10-27 13:45:10 UTC
A commit references this bug:

Author: mat
Date: Tue Oct 27 13:44:32 UTC 2015
New revision: 400241
URL: https://svnweb.freebsd.org/changeset/ports/400241

Log:
  Fix startup.

  Don't install as root:wheel/0700.

  PR:		204021
  Submitted by:	loox e-shell net
  Sponsored by:	Absolight

Changes:
  head/irc/unreal/Makefile
  head/irc/unreal/files/patch-src_s__bsd.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-10-27 14:03:15 UTC
A commit references this bug:

Author: mat
Date: Tue Oct 27 14:03:03 UTC 2015
New revision: 400246
URL: https://svnweb.freebsd.org/changeset/ports/400246

Log:
  MFH: r400241

  Fix startup.

  Don't install as root:wheel/0700.

  PR:		204021
  Submitted by:	loox e-shell net
  Sponsored by:	Absolight

Changes:
_U  branches/2015Q4/
  branches/2015Q4/irc/unreal/Makefile
  branches/2015Q4/irc/unreal/files/patch-src_s__bsd.c