Hello community,

here is the log from the commit of package compcache.1869 for 
openSUSE:12.3:Update checked in at 2013-07-22 13:03:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/compcache.1869 (Old)
 and      /work/SRC/openSUSE:12.3:Update/.compcache.1869.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "compcache.1869"

Changes:
--------
New Changes file:

--- /dev/null   2013-07-15 01:04:09.588030756 +0200
+++ /work/SRC/openSUSE:12.3:Update/.compcache.1869.new/compcache.changes        
2013-07-22 13:03:43.000000000 +0200
@@ -0,0 +1,116 @@
+-------------------------------------------------------------------
+Tue Jul 16 14:38:08 CEST 2013 - ti...@suse.de
+
+- module parameter again changed back to "num_devices" (bnc#825238)
+- fix package description, remove about compcache-kmp (bnc#825238)
+
+-------------------------------------------------------------------
+Sun Feb 26 14:46:36 CET 2012 - r...@suse.de
+
+- module parameter name changed from "num_devices" to
+  "zram_num_devices", adapt init-script accordingly 
+
+-------------------------------------------------------------------
+Mon Jan  9 16:22:15 CET 2012 - ti...@suse.de
+
+- fix init script for 3.x kernel (bnc#739584)
+
+-------------------------------------------------------------------
+Sat Sep 17 23:45:04 UTC 2011 - jeng...@medozas.de
+
+- Remove redundant tags/sections from specfile
+- Use %_smp_mflags for parallel build
+
+-------------------------------------------------------------------
+Mon Mar 21 14:55:11 CET 2011 - ti...@suse.de
+
+- Fix init script for 11.4 to work with empty $COMPCACHE_SIZE_KB
+  (bnc#681048)
+
+-------------------------------------------------------------------
+Thu Jan 13 20:43:28 CET 2011 - ti...@suse.de
+
+- fix some typos in init script
+
+-------------------------------------------------------------------
+Tue Jan 11 15:17:39 CET 2011 - ti...@suse.de
+
+- updated to compcache-0.6.2: see ChangeLog for details;
+  this fixes the incompatible statics ioctl for oS 11.3
+  (bnc#647345)
+- improved / fixed init and sysconfig files (bnc#661993)
+- adapted init script for 11.4 ramz driver; rzscontrol is no
+  longer used for zram driver; package contains only scripts
+
+-------------------------------------------------------------------
+Wed May 12 16:21:14 CEST 2010 - ti...@suse.de
+
+- don't build KMPs for openSUSE 11.3 or later as the kernel
+  already supports ramzswap (bnc#604610)
+
+-------------------------------------------------------------------
+Wed Apr 21 19:07:31 UTC 2010 - co...@novell.com
+
+- include header for kzalloc
+
+-------------------------------------------------------------------
+Mon Mar  8 23:09:41 UTC 2010 - death_kni...@gamebox.net
+
+- additional ramzswap devices for SMP CPU machines.
+
+-------------------------------------------------------------------
+Tue Dec 29 20:46:19 UTC 2009 - co...@novell.com
+
+- actually compile the binaries to be portable 
+
+-------------------------------------------------------------------
+Tue Nov 24 16:49:30 CET 2009 - ti...@suse.de
+
+- yet another fixes for older kernels
+
+-------------------------------------------------------------------
+Mon Nov 23 17:48:15 CET 2009 - ti...@suse.de
+
+- fix builds with various kernel versions
+
+-------------------------------------------------------------------
+Mon Nov 23 16:58:26 CET 2009 - ti...@suse.de
+
+- updated to version 0.6; see ChangeLog for details
+  
+-------------------------------------------------------------------
+Mon Aug  3 18:31:28 CEST 2009 - ti...@suse.de
+
+- fix build with 2.6.31 kernel
+
+-------------------------------------------------------------------
+Fri May  8 11:04:05 CEST 2009 - ti...@suse.de
+
+- disable build on 10.3 and older, removed the test patch
+- fix boot script to match with ramzswap
+
+-------------------------------------------------------------------
+Thu May  7 15:34:40 CEST 2009 - ti...@suse.de
+
+- fix build with 10.3 kernel
+
+-------------------------------------------------------------------
+Thu May  7 14:38:12 CEST 2009 - ti...@suse.de
+
+- clean up obsolete patch
+
+-------------------------------------------------------------------
+Thu May  7 17:59:18 IST 2009 - cyber...@opensuse.org
+
+- Update to 0.5.2 
+
+-------------------------------------------------------------------
+Mon Nov  3 09:31:12 CET 2008 - ti...@suse.de
+
+- fixed init script
+
+-------------------------------------------------------------------
+Thu Oct 23 14:53:54 CEST 2008 - ti...@suse.de
+
+- initial version: 0.4
+

New:
----
  boot.compcache
  compcache-0.6.2.tar.bz2
  compcache-rzscontrol-cflags.diff
  compcache.changes
  compcache.spec
  ramzswap-kernel-build-fix.diff
  sysconfig.compcache

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ compcache.spec ++++++
#
# spec file for package compcache
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# nodebuginfo


%if %suse_version <= 1120
%define need_kmp        1
%else
%define need_kmp        0
%endif

%if %suse_version <= 1130
%define need_rzsctl     1
%else
%define need_rzsctl     0
%endif

Name:           compcache
%if %need_kmp
BuildRequires:  kernel-source
BuildRequires:  kernel-syms
BuildRequires:  module-init-tools
%endif
Version:        0.6.2
Release:        0
Summary:        Compressed RAM based swap device
License:        GPL-2.0
Group:          System/Kernel
Source0:        compcache-%{version}.tar.bz2
Source1:        sysconfig.compcache
Source2:        boot.compcache
Patch:          compcache-rzscontrol-cflags.diff
Patch1:         ramzswap-kernel-build-fix.diff
Url:            http://code.google.com/p/compcache/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %fillup_prereq
%if %need_kmp
Requires:       compcache-kmp
%suse_kernel_module_package -n %{name} kdump um
%else
%if !%need_rzsctl
BuildArch:      noarch
%endif
%endif

%description
The compcache is a RAM-based block device acting as a swap disk. This
can effectively increase the available memory on your machine by
virtually swapping pages into the compressed memory.

This package contains the boot script for loading/unloading the
modules.

%if %need_kmp

%package KMP
Summary:        Kernel module for compressed RAM based swap device
Group:          System/Kernel

%description KMP
The compcache is a RAM-based block device acting as a swap disk. This
can effectively increase the available memory on your machine by
virtually swapping pages into the compressed memory.

This package contains the kernel module for compcache.
%endif

%prep
%setup -q
%patch -p1
%patch1 -p1

%build
%if %need_kmp
for flavor in %flavors_to_build; do
        rm -rf obj/$flavor
        mkdir -p obj/$flavor
        cp -al *.[ch] Makefile sub-projects obj/$flavor
        KERNEL_OBJ="/usr/src/linux-obj/%_target_cpu/$flavor"
        make -C ${KERNEL_OBJ} M=$PWD/obj/$flavor modules %{?_smp_mflags}
done
%endif
%if %need_rzsctl
make -C sub-projects/rzscontrol %{?_smp_mflags}
%endif

%install
%if %need_kmp
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
        KERNEL_OBJ="/usr/src/linux-obj/%_target_cpu/$flavor"
        make -C ${KERNEL_OBJ} M=$PWD/obj/$flavor modules_install %{?_smp_mflags}
done
%endif
%if %need_rzsctl
mkdir -p $RPM_BUILD_ROOT/usr/sbin
install -c -m 0755 sub-projects/rzscontrol/rzscontrol $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -c -m 0644 sub-projects/rzscontrol/man/*.1 
$RPM_BUILD_ROOT/%{_mandir}/man1
%endif
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -c -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/var/adm/fillup-templates
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -c -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d/

%post
%{fillup_only}

%preun
%stop_on_removal

%postun
%{insserv_cleanup}

%files
%defattr(-,root,root)
%if %need_rzsctl
/usr/sbin/*
%{_mandir}/man?/*
%endif
/etc/init.d/boot.compcache
/var/adm/fillup-templates/sysconfig.compcache
%doc README Changelog

%changelog
++++++ boot.compcache ++++++
#!/bin/sh
#
# System startup script loading compcache kernel module
# Copyright (C) 2008 Takashi Iwai <ti...@suse.de>
# Added SMP support by Erdem U. Altinyurt <spamjunkea...@gmail.com>
#
# /etc/init.d/compcache
#
### BEGIN INIT INFO
# Provides:         boot.compcache
# Required-Start:   boot.swap
# Required-Stop:    boot.swap
# Should-Start:
# Should-Stop:
# Default-Start:    B
# Default-Stop:     B
# Description:      Loads compcache - compressed RAM based swap device
### END INIT INFO

. /etc/rc.status
. /etc/sysconfig/compcache

SWAPON_BIN=/sbin/swapon
SWAPOFF_BIN=/sbin/swapoff
UDEVADM_BIN=/sbin/udevadm
MODPROBE_BIN=/sbin/modprobe
RZSCTL_BIN=/usr/sbin/rzscontrol
NUM_DEV="num_devices"
test -z "$COMPCACHE_NUM_DEVICES" -o "$COMPCACHE_NUM_DEVICES" -le 0 && 
COMPCACHE_NUM_DEVICES=$(cat /proc/cpuinfo | grep processor | wc -l)
test -z "$COMPCACHE_SIZE_KB" && COMPCACHE_SIZE_KB="0"

kver=$(uname -r)
kver=${kver%%-*}
case "$kver" in
    3.*)
        ZRAM=zram
        SWAPDEVNM=/dev/zram
        case "$kver" in
            3.[23].*)
                NUM_DEV="zram_num_devices";;
        esac
        ;;
    2.6.*)
        krel=${kver#2.6.}
        krel=${krel%%.*}
        if [ "$krel" -ge 36 ]; then
            ZRAM=zram
            SWAPDEVNM=/dev/zram
        else
            ZRAM=ramzswap
            SWAPDEVNM=/dev/ramzswap
        fi
        ;;
    *)
        exit 1;;
esac

is_comp_swap_on () {
    grep -q $1 /proc/swaps
    return $?
}

get_memsize_in_kb () {
    grep MemTotal /proc/meminfo | sed 's/^.*  //;s/ .*$//g'
}

rc_reset

case "$1" in
    start)
        #echo "Activating compressed RAM swap-devices..."
        if [ "$COMPCACHE_SIZE_KB" -lt 0 ]; then
            echo -n "Loading $ZRAM driver with $COMPCACHE_NUM_DEVICES devices "
            rc_status -u
        else
            if [ "$COMPCACHE_SIZE_KB" -eq 0 ]; then
                # 25% of RAM
                COMPCACHE_SIZE_KB=$(expr $(get_memsize_in_kb) / 4)
            fi
            if [ "$COMPCACHE_SIZE_KB" -lt 1024 ]; then
                COMPCACHE_SIZE_STR="$COMPCACHE_SIZE_KB kB"
            else
                COMPCACHE_SIZE_STR="$(expr $COMPCACHE_SIZE_KB / 1024) MB"
            fi
            echo -n "Loading $ZRAM driver with $COMPCACHE_NUM_DEVICES devices 
and $COMPCACHE_SIZE_STR memory "
            $MODPROBE_BIN -q $ZRAM $NUM_DEV=$COMPCACHE_NUM_DEVICES &> /dev/null
            rc_status -v
            # /dev/ramzswap0 is not available immediately after insmod returns
            # So, let udev complete its work before we do swapon
            if [ ! -f ${SWAPDEVNM}0 ]; then
                if [ -x "$UDEVADM_BIN" ]; then
                    $UDEVADM_BIN settle
                else
                    sleep 2
                fi
            fi

            COMPCACHE_DEV_SIZE_KB=$(expr $COMPCACHE_SIZE_KB / 
$COMPCACHE_NUM_DEVICES)
            for i in $(seq 0 $(expr $COMPCACHE_NUM_DEVICES - 1) ); do
                SWAPDEV=$SWAPDEVNM$i
                SIZEBLK=/sys/block/$ZRAM$i/disksize
                if [ -f $SIZEBLK ]; then
                    echo $(( $COMPCACHE_DEV_SIZE_KB * 1024 )) > $SIZEBLK
                else
                    $RZSCTL_BIN $SWAPDEV -d $COMPCACHE_DEV_SIZE_KB -i
                fi
                if ! is_comp_swap_on $SWAPDEV; then
                    echo -n "Setting up $ZRAM swap device $i "
                    test "$ZRAM" = "zram" && /sbin/mkswap $SWAPDEV
                    $SWAPON_BIN $SWAPDEV -p 10
                    rc_status -v
                fi
            done
        fi
        ;;
    stop)
        #echo "Turning off compressed RAM swap-devices"
        # We can't use COMPCACHE_NUM_DEVICES to enumerate, because the user can
        # start compcache, lower COMPCACHE_NUM_DEVICES and restart compcache.
        for SWAPDEV in ${SWAPDEVNM}* ; do
            if is_comp_swap_on $SWAPDEV; then
                nm=${SWAPDEV#$SWAPDEVNM}
                RESETBLK=/sys/block/$ZRAM$nm/reset
                echo -n "Turning off $ZRAM swap device $nm "
                $SWAPOFF_BIN $SWAPDEV
                rc_check
                if [ -f $RESETBLK ]; then
                    echo 1 > $RESETBLK
                else
                    $RZSCTL_BIN $SWAPDEV --reset &> /dev/null
                fi
                rc_status -v
            fi
        done
        # Let udev complete its work before we unload the ramzswap module
        if [ -f "$UDEVADM_BIN" ]; then
            $UDEVADM_BIN settle
        else
            sleep 2
        fi
        echo -n "Unloading $ZRAM module "
        $MODPROBE_BIN -qr $ZRAM &> /dev/null
        rc_status -v
        ;;
    restart)
        $0 stop
        $0 start
        ;;
    status)
        echo -n "Checking for compcache "
        if is_comp_swap_on $SWAPDEVNM; then
            rc_failed 0
        else
            rc_failed 3
        fi
        rc_status -v
        ;;
    *)
        echo "Usage: $0 {start|stop|status|restart}"
        exit 1
        ;;
esac
rc_exit
++++++ compcache-rzscontrol-cflags.diff ++++++
---
 sub-projects/rzscontrol/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sub-projects/rzscontrol/Makefile
+++ b/sub-projects/rzscontrol/Makefile
@@ -1,5 +1,5 @@
 all:
-       @gcc -g -Wall -D_GNU_SOURCE rzscontrol.c -o rzscontrol -I ../include 
-I../..
+       @gcc -g -Wall -D_GNU_SOURCE $(RPM_OPT_FLAGS) rzscontrol.c -o rzscontrol 
-I ../include -I../..
 
 doc:
        @xmllint --noout --valid man/rzscontrol.xml
++++++ ramzswap-kernel-build-fix.diff ++++++
---
 ramzswap_drv.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/ramzswap_drv.c
+++ b/ramzswap_drv.c
@@ -1178,6 +1178,7 @@
 
        set_capacity(rzs->disk, rzs->disksize >> SECTOR_SHIFT);
 
+#ifdef blk_queue_nonrot
        /*
         * We have ident mapping of sectors for ramzswap and
         * and the backing swap device. So, this queue flag
@@ -1186,6 +1187,7 @@
        if (!rzs->backing_swap ||
                        blk_queue_nonrot(rzs->backing_swap->bd_disk->queue))
                queue_flag_set_unlocked(QUEUE_FLAG_NONROT, rzs->disk->queue);
+#endif
 
        rzs->mem_pool = xv_create_pool();
        if (!rzs->mem_pool) {
@@ -1233,9 +1235,17 @@
        return 0;
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
 static int ramzswap_ioctl(struct block_device *bdev, fmode_t mode,
                        unsigned int cmd, unsigned long arg)
+#else
+static int ramzswap_ioctl(struct inode *inode, struct file *file,
+                       unsigned int cmd, unsigned long arg)
+#endif
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
+       struct block_device *bdev = I_BDEV(inode);
+#endif
        int ret = 0;
        size_t disksize_kb, memlimit_kb;
 
++++++ sysconfig.compcache ++++++
## Path:                System/Kernel
## Description:         Compcache settings
## Type:                integer
## Default:             0
#
# Total size to be used by compcache in kB
# for all compressed RAM swap (ramzswap) devices.
# 0 means to use the default size (25% of system RAM).
# a negative value means to disable compcache.
#
COMPCACHE_SIZE_KB="0"

## Type:                integer
## Default:             1
#
# Number of compressed RAM swap (ramzswap) devices to create by compcache.
# The devices are named as /dev/ramzswapX where X starts from 0.
# 0 means to use the default number (number of processor cores).
#
COMPCACHE_NUM_DEVICES="1"

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to