Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 521976 - net-misc/openssh: please review prefix changes
Summary: net-misc/openssh: please review prefix changes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: prefix-gx86
  Show dependency tree
 
Reported: 2014-09-02 14:03 UTC by Michael Haubenwallner (RETIRED)
Modified: 2017-12-12 11:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch against gx86 version (openssh-6.6_p1-r1-prefix.diff,1.16 KB, patch)
2014-09-02 14:03 UTC, Michael Haubenwallner (RETIRED)
Details | Diff
updated patch (openssh-6.6.1_p1-r3-prefix.diff,925 bytes, patch)
2014-09-11 10:57 UTC, Michael Haubenwallner (RETIRED)
Details | Diff
updated patch, avoid wildcards with fperms (openssh-6.6.1_p1-r3-prefix-r1.diff,924 bytes, patch)
2014-09-16 15:14 UTC, Michael Haubenwallner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Haubenwallner (RETIRED) gentoo-dev 2014-09-02 14:03:20 UTC
Created attachment 384120 [details, diff]
patch against gx86 version

Tests need special privileges, bug#335343.

Setting setuid bit may fail in Prefix - what about userpriv?
Retrying in pkg_preinst, runs as root even with userpriv.

Thanks!
Comment 1 SpanKY gentoo-dev 2014-09-11 05:23:49 UTC
Comment on attachment 384120 [details, diff]
patch against gx86 version

>+	# setting setuid bit may fail as non-priviledged user (prefix, userpriv?)
>+	# during build, retry in pkg_preinst

this comment is confused and shouldn't be

>+	if [[ $(id -u) != 0 ]]; then

it should be unconditional

>-		$(static_use_with kerberos kerberos5 /usr) \
>+		$(static_use_with kerberos kerberos5 "${EPREFIX}"/usr) \

feel free to commit

>+	use prefix && return # horse drug, see #335343

this comment isn't terribly useful.  i'm not sure it should be bound to USE=prefix either.

>+	# retry setting setuid bit, may fail as non-priviledged user (prefix).
>+	$(usex prefix 'nonfatal' '') fperms 4711 /usr/$(get_libdir)/misc/ssh-keysign*

i don't see why this is done in openssh.  we have lots of random packages that try to install set*id files.  i don't think we should go about ignoring errors like this.
Comment 2 Michael Haubenwallner (RETIRED) gentoo-dev 2014-09-11 10:57:52 UTC
Created attachment 384568 [details, diff]
updated patch

Did I understand your comments right?
Comment 3 Michael Haubenwallner (RETIRED) gentoo-dev 2014-09-16 15:14:54 UTC
Created attachment 384866 [details, diff]
updated patch, avoid wildcards with fperms

Ohw, better not use wildcards with fperms - expands using host filesystem (bug#522950). Ignoring EXEEXT for now instead.
Comment 4 SpanKY gentoo-dev 2014-11-15 04:20:43 UTC
Comment on attachment 384866 [details, diff]
updated patch, avoid wildcards with fperms

>+	sed -i -e 's/-m 4711/-m 0711/' "${S}"/Makefile.in || die

you're already in $S, so no need to prefix the var

>-		$(static_use_with kerberos kerberos5 /usr) \
>+		$(static_use_with kerberos kerberos5 "${EPREFIX}"/usr) \

again, feel free to commit this one line

>+	[[ $(id -u) = 0 ]] || return #335343

this really should be tracked down.  also, use ==, not =, when doing tests with [[...]].

>+	fperms 4711 /usr/$(get_libdir)/misc/ssh-keysign

shouldn't that have $EPREFIX ?  or does the tool do it for you.
Comment 5 SpanKY gentoo-dev 2014-11-15 22:20:37 UTC
(In reply to SpanKY from comment #4)

i've included the kerberos line change when i was updating 6.7p1
Comment 6 Benda Xu gentoo-dev 2017-12-11 08:25:42 UTC
Hi Michael, it is full merged to gx86?
Comment 7 Michael Haubenwallner (RETIRED) gentoo-dev 2017-12-12 11:38:52 UTC
Seems yes. Last commit to openssh in prefix-overlay was

commit 15e618a1fdd34e952d0485cb9bcfdc8672aa25e8
Author: Fabian Groffen <grobian@gentoo.org>
Date:   Wed Sep 28 19:26:18 2016 +0200

    net-misc/openssh: migrate to gx86