From owner-svn-ports-all@freebsd.org Sun Jul 2 03:17:16 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABDA9D9B3F1; Sun, 2 Jul 2017 03:17:16 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A7E87D194; Sun, 2 Jul 2017 03:17:16 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v623HFnA066798; Sun, 2 Jul 2017 03:17:15 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v623HFh3066796; Sun, 2 Jul 2017 03:17:15 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201707020317.v623HFh3066796@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Sun, 2 Jul 2017 03:17:15 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r444863 - in branches/2017Q2/devel/glib20: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in branches/2017Q2/devel/glib20: . files X-SVN-Commit-Revision: 444863 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2017 03:17:16 -0000 Author: jbeich Date: Sun Jul 2 03:17:15 2017 New Revision: 444863 URL: https://svnweb.freebsd.org/changeset/ports/444863 Log: MFH: r444811 devel/glib20: fix symlink writing $ gio save testfile < /etc/shells $ ln -s testfile testlink $ gio save testlink < /etc/shells gio: file:///path/to/testlink: Error opening file '/path/to/testlink': Too many links PR: 212572 Reported by: Yuri Victorovich Submitted by: Ting-Wei Lan Approved by: maintainer timeout (3 weeks) Approved by: ports-secteam (feld) Added: branches/2017Q2/devel/glib20/files/patch-gio_glocalfileoutputstream.c - copied unchanged from r444811, head/devel/glib20/files/patch-gio_glocalfileoutputstream.c Modified: branches/2017Q2/devel/glib20/Makefile Directory Properties: branches/2017Q2/ (props changed) Modified: branches/2017Q2/devel/glib20/Makefile ============================================================================== --- branches/2017Q2/devel/glib20/Makefile Sun Jul 2 02:49:24 2017 (r444862) +++ branches/2017Q2/devel/glib20/Makefile Sun Jul 2 03:17:15 2017 (r444863) @@ -3,7 +3,7 @@ PORTNAME= glib PORTVERSION= 2.46.2 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= devel MASTER_SITES= GNOME DIST_SUBDIR= gnome2 Copied: branches/2017Q2/devel/glib20/files/patch-gio_glocalfileoutputstream.c (from r444811, head/devel/glib20/files/patch-gio_glocalfileoutputstream.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2017Q2/devel/glib20/files/patch-gio_glocalfileoutputstream.c Sun Jul 2 03:17:15 2017 (r444863, copy of r444811, head/devel/glib20/files/patch-gio_glocalfileoutputstream.c) @@ -0,0 +1,38 @@ +From 45d4b59e3f7ef7b41db08f0c11ee5000126cfedb Mon Sep 17 00:00:00 2001 +From: Ting-Wei Lan +Date: Sun, 4 Dec 2016 15:02:54 +0800 +Subject: [PATCH] glocalfileoutputstream: Fix symlink writing on FreeBSD and + NetBSD + +FreeBSD, DragonflyBSD and NetBSD support O_NOFOLLOW, but they use error +numbers that are different from what POSIX standard specifies. They are +not going to change the behavior, and existing programs on these systems +already take advantage of this difference. To support them, we have to +add a check in GIO to use different error numbers on these systems. + +https://bugzilla.gnome.org/show_bug.cgi?id=775593 +--- + gio/glocalfileoutputstream.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c +index 81184a671..4b3733cce 100644 +--- gio/glocalfileoutputstream.c ++++ gio/glocalfileoutputstream.c +@@ -763,7 +763,13 @@ handle_overwrite_open (const char *filename, + #ifdef O_NOFOLLOW + is_symlink = FALSE; + fd = g_open (filename, open_flags | O_NOFOLLOW, mode); ++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) ++ if (fd == -1 && errno == EMLINK) ++#elif defined(__NetBSD__) ++ if (fd == -1 && errno == EFTYPE) ++#else + if (fd == -1 && errno == ELOOP) ++#endif + { + /* Could be a symlink, or it could be a regular ELOOP error, + * but then the next open will fail too. */ +-- +2.13.0 +