Hello community, here is the log from the commit of package libselinux for openSUSE:Factory checked in at 2012-11-28 11:07:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libselinux (Old) and /work/SRC/openSUSE:Factory/.libselinux.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libselinux", Maintainer is "vci...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/libselinux/libselinux.changes 2012-08-12 15:26:35.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libselinux.new/libselinux.changes 2012-11-28 11:07:38.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Nov 27 12:38:29 UTC 2012 - vci...@suse.com + +- update selinux-ready script + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libselinux-bindings.spec ++++++ --- /var/tmp/diff_new_pack.ADY1wH/_old 2012-11-28 11:07:39.000000000 +0100 +++ /var/tmp/diff_new_pack.ADY1wH/_new 2012-11-28 11:07:39.000000000 +0100 @@ -27,7 +27,7 @@ Release: 0 Url: http://userspace.selinuxproject.org/ Summary: SELinux library and simple utilities -License: GPL-2.0 ; SUSE-Public-Domain +License: GPL-2.0 and SUSE-Public-Domain Group: System/Libraries Source: http://userspace.selinuxproject.org/releases/20120216/libselinux-%{version}.tar.gz Source1: selinux-ready ++++++ libselinux.spec ++++++ --- /var/tmp/diff_new_pack.ADY1wH/_old 2012-11-28 11:07:39.000000000 +0100 +++ /var/tmp/diff_new_pack.ADY1wH/_new 2012-11-28 11:07:39.000000000 +0100 @@ -25,7 +25,7 @@ Release: 0 Url: http://userspace.selinuxproject.org/ Summary: SELinux library and simple utilities -License: GPL-2.0 ; SUSE-Public-Domain +License: GPL-2.0 and SUSE-Public-Domain Group: System/Libraries Source: http://userspace.selinuxproject.org/releases/20120216/%{name}-%{version}.tar.gz Source1: selinux-ready ++++++ selinux-ready ++++++ --- /var/tmp/diff_new_pack.ADY1wH/_old 2012-11-28 11:07:39.000000000 +0100 +++ /var/tmp/diff_new_pack.ADY1wH/_new 2012-11-28 11:07:39.000000000 +0100 @@ -22,37 +22,58 @@ check_filesystem() { FSPATH="/proc/filesystems" - FSNAME="securityfs" + FSNAMES="securityfs selinuxfs" + OK="O" - grep -w $FSNAME $FSPATH 1>&2 >/dev/null + for FSNAME in $FSNAMES; do + grep -w $FSNAME $FSPATH 1>&2 >/dev/null - if [ $? == 0 ]; then - printf "\tcheck_filesystem: OK. Filesystem '$FSNAME' exists.\n" - return 0 + if [ $? == 0 ]; then + printf "\tcheck_filesystem: OK. Filesystem '$FSNAME' exists.\n" + else + printf "\tcheck_filesystem: ERR. Filesystem '$FSNAME' is missing. Please enable SELinux while compiling the kernel.\n" + OK="1" + fi + done + if [ "$OK" == "0" ]; then + return 0; else - printf "\tcheck_filesystem: ERR. Filesystem '$FSNAME' is missing. Please enable SELinux while compiling the kernel.\n" - return 0 + return 1; fi } check_boot() { - BPARAM="selinux=1" - - printf "\tcheck_boot: Assuming GRUB as bootloader.\n" + BPARAM1="security=selinux" + BPARAM2="selinux=1" - BLINE=$(grep -- $BPARAM /boot/grub/menu.lst 2>/dev/null) # XXX check for multiple lines in config + printf "\tcheck_boot: Assuming GRUB2 as bootloader.\n" - if [ $? == 0 ]; then + # look for parameters of the current kernel + CURRENT_KERNEL=$(uname -r) + OTHERS="" + RETVAL="FAIL" + while read BLINE + do K=$(echo $BLINE | awk -F' ' '{print $2}') KERNEL=$(basename $K) K=$(echo $KERNEL | sed s/vmlinuz-//) - INITRD=initrd-$K - printf "\tcheck_boot: OK. Kernel '$KERNEL' has boot-parameter '$BPARAM'\n" + + if [ "$K" == "$CURRENT_KERNEL" ]; then + INITRD=initrd-$K + RETVAL="OK" + else + OTHERS="$KERNEL $OTHERS" + fi + done < <(grep -- $BPARAM1 /boot/grub2/grub.cfg 2>/dev/null | grep -- $BPARAM2) + + if [ "$RETVAL" == OK ]; then + printf "\tcheck_boot: OK. Current kernel '$KERNEL' has boot-parameters '$BPARAM1 $BPARAM2'\n" + printf "\tcheck_boot: OK. Other kernels with correct parameters: $OTHERS\n" return 0 else printf "\tcheck_boot: ERR. Boot-parameter missing for booting the kernel.\n" - printf "\t Please use YaST2 to add 'selinux=1' to the kernel boot-parameter list.\n" + printf "\t Please use YaST2 to add 'security=selinux selinux=1' to the kernel boot-parameter list.\n" return 1 fi } @@ -141,7 +162,7 @@ return 1; fi - POL=$(grep SELINUXTYPE $CFGFILE | sed "s/SELINUXTYPE\s*=\s*"//) + POL=$(grep "^\s*SELINUXTYPE" $CFGFILE | sed "s/SELINUXTYPE\s*=\(\S*\)\s*"/\\1/) if ! [ -f /etc/selinux/$POL/booleans ]; then printf "\tcheck_initupstart: ERR. booleans file for policy $POL does not exist.\n" -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org