Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1064954 - Output on selinux-policy upgrade
Summary: Output on selinux-policy upgrade
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-13 15:48 UTC by Orion Poplawski
Modified: 2014-02-14 17:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-14 17:34:18 UTC


Attachments (Terms of Use)

Description Orion Poplawski 2014-02-13 15:48:54 UTC
Description of problem:

Using yum-cron for updates.  The cron.daily report has output from selinux-update, should be silent:

/etc/cron.daily/0yum-daily.cron:


1k
2k
3k
4k
5k
6k
7k
8k
9k
10k
11k
12k
13k
14k
15k
16k
17k
18k
19k
20k
21k
22k
23k
24k
25k
26k
27k
28k
29k
30k
31k
32k
33k
34k
35k
36k
37k
38k
39k
40k
41k
42k
The following updates will be applied on mock1.cora.nwra.com:
================================================================================
 Package                     Arch       Version               Repository   Size
================================================================================
Updating:
 dhclient                    x86_64     12:4.2.6-1.fc20       updates     279 k
 dhcp-common                 x86_64     12:4.2.6-1.fc20       updates     171 k
 dhcp-libs                   x86_64     12:4.2.6-1.fc20       updates     126 k
 facter                      x86_64     1.7.4-1.fc20          updates      89 k
 perl-version                x86_64     3:0.99.07-1.fc20      updates      84 k
 selinux-policy              noarch     3.12.1-122.fc20       updates     322 k
 selinux-policy-targeted     noarch     3.12.1-122.fc20       updates     3.6 M
 socat                       x86_64     1.7.2.3-1.fc20        updates     264 k

Transaction Summary
================================================================================
Upgrade  8 Packages
The updates were successfully applied

Comment 1 Daniel Walsh 2014-02-13 18:09:07 UTC
When we do a large update including a restorecon, we output the Percent completion of the relabeling if it is done at /.  If it is done at a lowed level, we print out the Number of files checked in thousands, so a user gets an idea the update is progressing.  I guess this is what happened and the post install checked labels on 42,000 Files.  Usually it is much smaller and you would not notice it.  

If you run restorecon -pr ~/ 
You will see the expected behaviour.  

Not sure how we can stop the output from going into this log file.

Comment 2 Orion Poplawski 2014-02-13 18:20:24 UTC
Can we test for a tty?

Comment 3 Daniel Walsh 2014-02-13 19:10:20 UTC
What does tty return in a cron job?

In /sbin/fixfiles

VERBOSE="-p"
 
Is the problem.

If we put a check for tty before this and set it to "" I think the messages would disappear.

Comment 4 Orion Poplawski 2014-02-13 19:17:50 UTC
"not a tty"

Comment 5 Daniel Walsh 2014-02-13 19:55:32 UTC
[ -t 1 ] || VERBOSE=""

I think will do the trick.

Comment 6 Orion Poplawski 2014-02-13 20:27:26 UTC
Even better, thanks.

Comment 7 Daniel Walsh 2014-02-14 17:34:18 UTC
Fixed in Rawhide, if I have a better reason to update policycoreutils in F20, I will pull the fix back.


Note You need to log in before you can comment on or make changes to this bug.