Обсуждение: Problems running regression tests
FYI,
Postgres 8.0.7
OS Centos 4.2 (Final)
Rebuilt and installed the rpms.
To test, I copied /usr/lib/pgsql/test/regress/
to my home directory. However,
gmake check
always produces
/usr/bin/chcon: can't apply partial context to unlabeled file
testtablespace
/usr/bin/chcon: can't apply partial context to unlabeled file results
The Makefile has
[ -x /usr/bin/chcon ] && /usr/bin/chcon -t postgresql_db_t
testtablespa\ce results
This does not seem to be a good way to test for SELinux. SELinux
is not enabled in my kernel but chcon seems to be included in
the coreutils rpm. As a result, AFIK, chcon will never work
and the make will always fail.
Karl <kop@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
"Karl O. Pinc" <kop@meme.com> writes:
> /usr/bin/chcon: can't apply partial context to unlabeled file testtablespace
> /usr/bin/chcon: can't apply partial context to unlabeled file results
> The Makefile has
> [ -x /usr/bin/chcon ] && /usr/bin/chcon -t postgresql_db_t testtablespace results
Does it work better if you change that to
[ -x /usr/bin/chcon ] && /usr/bin/chcon -u user_u -r object_r -t postgresql_db_t testtablespace results
? I recall we had a similar issue in the initscript ...
regards, tom lane
On 03/24/2006 10:07:24 PM, Tom Lane wrote:
> "Karl O. Pinc" <kop@meme.com> writes:
> > The Makefile has
> Does it work better if you change that to
>
> [ -x /usr/bin/chcon ] && /usr/bin/chcon -u user_u -r object_r -t
> postgresql_db_t testtablespace results
Nope. The other thing to keep in mind here is that I'm using
a binary rpm I rebuilt from the offical pg srpm. Could rebuilding
without SELinux have disappeared required SELinux-ness
in the offical binary rpm? Wouldn't think so, but this
could well be rpm related. postgresql-8.0.7-1PGDG
(Also, I did a 'cp -a' on regress as root before
trying gmake check, as postgres, just to keep from
ruining my original. FYI.)
bash-3.00$ gmake check
rm -rf testtablespace results
mkdir testtablespace results
[ -x /usr/bin/chcon ] && /usr/bin/chcon -u user_u -r object_r -t
postgresql_db_t testtablespace results
/usr/bin/chcon: can't apply partial context to unlabeled file
testtablespace
/usr/bin/chcon: can't apply partial context to unlabeled file results
gmake: *** [cleandirs] Error 1
bash-3.00$ ls -Z results
Sorry, this option can only be used on a SELinux kernel.
Karl <kop@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein