kajgan / fbterm

Automatically exported from code.google.com/p/fbterm
0 stars 0 forks source link

安装失败 fbterm 1.3 #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
我在gentoo下安装fbterm失败:

make[3]: Leaving directory
`/var/tmp/portage/app-i18n/fbterm-1.3/work/fbterm-1.3/src/lib'
make[2]: Leaving directory
`/var/tmp/portage/app-i18n/fbterm-1.3/work/fbterm-1.3/src/lib'
make[2]: Entering directory
`/var/tmp/portage/app-i18n/fbterm-1.3/work/fbterm-1.3/src'
make[3]: Entering directory
`/var/tmp/portage/app-i18n/fbterm-1.3/work/fbterm-1.3/src'
test -z "/usr/bin" || /bin/mkdir -p
"/var/tmp/portage/app-i18n/fbterm-1.3/image//usr/bin"
make[3]: Nothing to be done for `install-data-am'.
  /usr/bin/install -c 'fbterm'
'/var/tmp/portage/app-i18n/fbterm-1.3/image//usr/bin/fbterm'
make  install-exec-hook
make[4]: Entering directory
`/var/tmp/portage/app-i18n/fbterm-1.3/work/fbterm-1.3/src'
setcap 'cap_sys_tty_config+ep'
/var/tmp/portage/app-i18n/fbterm-1.3/image//usr/bin/fbterm
Failed to set capabilities on file
`/var/tmp/portage/app-i18n/fbterm-1.3/image//usr/bin/fbterm' (Operation not
supported)
usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>)
<filenameN> ]

 Note <filename> must be a regular (non-symlink) file.
make[4]: *** [install-exec-hook] Error 1
make[4]: Leaving directory
`/var/tmp/portage/app-i18n/fbterm-1.3/work/fbterm-1.3/src'
make[3]: *** [install-exec-am] Error 2

内核版本:
Linux polaris 2.6.27-gentoo-r5 #1 SMP PREEMPT Sat Dec 20 14:49:27 CST 2008
i686 Genuine Intel(R) CPU T2300 @ 1.66GHz GenuineIntel GNU/Linux

Original issue reported on code.google.com by oahong@gmail.com on 20 Dec 2008 at 8:48

GoogleCodeExporter commented 8 years ago
我遇到一樣的問題。
不過用原始的 tarball 是可以安裝的,方才比對了一下兩者的 
config.log 

upstream:
config.log:HAVE_FS_CAPABILITY_TRUE='#'

ebuild:
config.log:HAVE_FS_CAPABILITY_TRUE=''

猜想可能是 configure 時的檢查結果不一樣,而產生的問題

Original comment by MatLinuxer2 on 20 Dec 2008 at 9:48

GoogleCodeExporter commented 8 years ago
我用 emerge 可以成功安裝, 我的 kernel version 是 2.6.26

內核版本:
Linux localhost 2.6.26-gentoo-r1 #1 SMP Fri Aug 29 12:14:38 CST 2008 i686 
Intel(R)
Core(TM)2 CPU T5500 @ 1.66GHz GenuineIntel GNU/Linux

Original comment by MatLinuxer2 on 20 Dec 2008 at 11:26

GoogleCodeExporter commented 8 years ago
when kernel >= 2.6.27 and program setcap (include in libcap2-bin package on my 
ubuntu 8.10) exits, 'make install' will call

setcap 'cap_sys_tty_config+ep' /path/to/fbterm

instead of

chmod u+s /path/to/fbterm

from the make's log, there is error where run setcap, you may run it manually 
and 
help me correct it.

Original comment by zgchan...@gmail.com on 21 Dec 2008 at 2:18

GoogleCodeExporter commented 8 years ago
setcap 'cap_sys_tty_config+ep' /path/to/fbterm

我无法手动运行该命令,提示一样的错误
(Operation not supported)
usage: setcap [-q] [-v] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>)
<filenameN> ]

不知您的libcap是什么版本的:

# paludis -q  libcap
* sys-libs/libcap
    gentoo:                  2.11 2.14 2.15 {:0} 
    installed:               2.15* {:0} 
    Description:             POSIX 1003.1e capabilities
    Homepage:                http://www.friedhoff.org/posixfilecaps.html
    License:                 GPL-2 BSD
    Installed time:          Fri Nov 28 13:26:55 2008
    Use flags:               (pam)
    From repositories:       gentoo
    Installed using:        
paludis-0.32.0_alpha1-git-2ed26edee0d6ed2dd8562743987899827d690fe5

另外我在gentoo的ebuild中直接删除了5692行  
FS_CAP=1,然后ebuild作处理安装后u+s
不知道这样安装后会不会有问题。

我尝试过手动安装./configure && make && make install. 
结果在.27的内核上一样出现上述错误。

PS:英文不好 ;-)

Original comment by oahong@gmail.com on 21 Dec 2008 at 6:33

GoogleCodeExporter commented 8 years ago
恩,似乎没有必要在chmod了。

Original comment by oahong@gmail.com on 21 Dec 2008 at 6:36

GoogleCodeExporter commented 8 years ago
please try the attached patch.

This patch will first try setcap, then chmod:
setcap 'cap_sys_tty_config+ep' /path/to/fbterm 2>/dev/null || chmod u+s 
/path/to/fbterm

if you compile FbTerm 1.3 with FS_CAP=1 and also set SUID on it, any child 
process 
forked by FbTerm can get root privilege! The patch also fixed this problem.

Original comment by zgchan...@gmail.com on 22 Dec 2008 at 4:27

Attachments:

GoogleCodeExporter commented 8 years ago
patch过后可以正常安装,但pkgcore会提示如下信息:

QA Notice: the following files are setXid, dyn linked, and using lazy bindings
 This combination is generally discouraged.  Try re-emerging the package:
 LDFLAGS='-Wl,-z,now' emerge fbterm
LAZY usr/bin/fbterm

>>> Completed installing fbterm-1.3 into 
/var/tmp/portage/app-i18n/fbterm-1.3/image/

>>> Reinstalling app-i18n/fbterm-1.3
warning: sfperms: dropping group/world read due to SetGID: file:/usr/bin/fbterm
>>> dir:/usr

不知会有什么影响? ;-) 

Original comment by oahong@gmail.com on 22 Dec 2008 at 7:31

GoogleCodeExporter commented 8 years ago
I guess it's just a warning that fbterm is a set SUID program.

The only thing need to check is FbTerm's shortcuts work for you.

Original comment by zgchan...@gmail.com on 22 Dec 2008 at 8:19

GoogleCodeExporter commented 8 years ago
恩,谢谢,快捷键在fbterm里完全正常。我已经放进了gentoo-chin
a-overlay里。

Original comment by oahong@gmail.com on 22 Dec 2008 at 9:39

GoogleCodeExporter commented 8 years ago
gentoo的软件包管理软件会自动。
>>> Installing app-i18n/fbterm-1.3
 * >>> SetUID: [chmod go-r] /usr/bin/fbterm ... 

Original comment by oahong@gmail.com on 22 Dec 2008 at 10:08

GoogleCodeExporter commented 8 years ago

Original comment by zgchan...@gmail.com on 29 Dec 2008 at 4:02