openSUSE Commits
Threads by month
- ----- 2025 -----
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
June 2010
- 1 participants
- 564 discussions
Hello community,
here is the log from the commit of package NetworkManager for openSUSE:Factory
checked in at Wed Jun 30 11:24:07 CEST 2010.
--------
--- NetworkManager/NetworkManager.changes 2010-06-29 11:26:23.000000000 +0200
+++ /mounts/work_src_done/STABLE/NetworkManager/NetworkManager.changes 2010-06-30 10:22:42.000000000 +0200
@@ -1,0 +2,5 @@
+Wed Jun 30 08:20:46 UTC 2010 - bili(a)novell.com
+
+- Update NetworkManager-NIS.patch, init the variable(bnc#618599).
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ NetworkManager.spec ++++++
--- /var/tmp/diff_new_pack.OQGstz/_old 2010-06-30 11:23:51.000000000 +0200
+++ /var/tmp/diff_new_pack.OQGstz/_new 2010-06-30 11:23:51.000000000 +0200
@@ -20,7 +20,7 @@
Name: NetworkManager
Url: http://www.gnome.org/projects/NetworkManager/
Version: 0.8
-Release: 6
+Release: 7
License: GPLv2+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: dbus-1-devel dbus-1-glib-devel gtk-doc intltool iptables libgcrypt-devel libgudev-1_0-devel libiw-devel libnl-devel libtool libuuid-devel mozilla-nss-devel polkit-devel ppp-devel translation-update-upstream wireless-tools
++++++ NetworkManager-NIS.patch ++++++
--- /var/tmp/diff_new_pack.OQGstz/_old 2010-06-30 11:23:51.000000000 +0200
+++ /var/tmp/diff_new_pack.OQGstz/_new 2010-06-30 11:23:51.000000000 +0200
@@ -75,7 +75,16 @@
close (fd);
/* Wait until the process exits */
-@@ -539,7 +561,10 @@ rewrite_resolv_conf (NMNamedManager *mgr
+@@ -487,6 +509,8 @@ rewrite_resolv_conf (NMNamedManager *mgr
+ rc.nameservers = g_ptr_array_new ();
+ rc.domain = NULL;
+ rc.searches = g_ptr_array_new ();
++ rc.nis_domain = NULL;
++ rc.nis_servers = NULL;
+
+ if (priv->vpn_config)
+ merge_one_ip4_config (&rc, priv->vpn_config);
+@@ -539,7 +563,10 @@ rewrite_resolv_conf (NMNamedManager *mgr
#ifdef TARGET_SUSE
if (success == FALSE)
@@ -87,7 +96,7 @@
#endif
if (success == FALSE)
-@@ -553,6 +578,11 @@ rewrite_resolv_conf (NMNamedManager *mgr
+@@ -553,6 +580,11 @@ rewrite_resolv_conf (NMNamedManager *mgr
if (nameservers)
g_strfreev (nameservers);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package virtualbox-ose for openSUSE:Factory
checked in at Wed Jun 30 10:50:30 CEST 2010.
--------
--- virtualbox-ose/virtualbox-ose.changes 2010-06-15 22:11:26.000000000 +0200
+++ /mounts/work_src_done/STABLE/virtualbox-ose/virtualbox-ose.changes 2010-06-28 09:33:29.000000000 +0200
@@ -1,0 +2,48 @@
+Mon Jun 28 07:26:55 UTC 2010 - mseben(a)novell.com
+
+- update to 3.2.6:
+ * VMM: fixed host crash when running 64-bit guests on 32-bit hosts with certain Intel CPUs (VT-x only; bug #6166)
+ * VMM: allow 64-bit SMP guests on 32-bit hosts (VT-x and AMD-V only; does not apply to Mac OS X, which already supports it)
+ * VMM: fixed Guru mediation if guests with more than 2GB are booted with VT-x/AMD-V disabled (bug #5740)
+ * VMM: fixed TR limit trashing (VT-x and 64-bit host only; bug #7052)
+ * Page Fusion: several bug fixes for SMP guests (including bug #6964)
+ * Teleportation: several fixes and improvements
+ * Mac OS X server guests: compatibility fix
+ * EFI: fixed memory detection for guests with 2GB or more RAM assigned
+ * GUI: added a workaround for a Linux kernel bug which affecting asynchronous I/O on ext4 / xfs file systems (Linux hosts only)
+ * GUI: added setting for multiple VRDP connections; useful if multiple screens are enabled
+ * GUI: another fix for the keyboard capturing bug under metacity (bug #6727)
+ * GUI: fixed quit dialog when used in seamless or fullscreen mode (Mac OS X hosts only; bug #6938)
+ * GUI: handle the extra key on the Brazilian keyboard on X11 hosts again (bug #7022).
+ * 2D Video acceleration: fixed crashes when leaving the fullscreen mode (bug #6768)
+ * VBoxManage: fixed storageattach error handling (bug #6927)
+ * VBoxManage: fixed dhcpserver add (3.2.0 regression; bug #7031)
+ * Storage: fixed hang with images located on filesystems which don't support async I/O (bug #6905)
+ * Storage: fixed raw disks on Windows hosts (3.2.0 regression; bug #6987)
+ * LsiLogic: fixed hang with older Linux guests
+ * BusLogic: fixed hang during I/O
+ * SATA: set initial number of ports to 1 as some guests can't handle 30 ports (e.g. CentOS 4 and FreeBSD; bug #6984)
+ * SATA: performance improvement
+ * SCSI: fixed error when using the full format option during Windows installation (bug #5101)
+ * iSCSI: fixed authentication (bug #4031)
+ * Host-only/bridged networking: fixed excessive host kernel warnings under certain circumstances (Linux hosts only; 3.2.0 regression; bug #6872)
+ * NAT: fixed potential memory leaks
+ * NAT: increased the size of the memory pool for 16K Jumbo frames (performance tweak)
+ * NAT: allow to link/unlink the network cable even if the VM is currently paused
+ * E1000: disconnect cable was not properly handled if the NIC was not yet initialized by the guest
+ * OVF: export performance optimization
+ * OVF: upgraded OS type definitions to CIM 2.25.0 so that Windows 7 and other OSes are now tagged correctly on export
+ * Settings: the setting for disabling the host I/O cache was sometimes not properly saved
+ * Settings: save machine state into XML correctly even when snapshot folder has been changed to a non-default location (bug #5656)
+ * USB: allow the guest to disable an EHCI port
+ * USB: find a valid language ID before querying strings (bug #7034)
+ * POSIX hosts: fixed several memory leaks (3.2.0 regression)
+ * Solaris hosts: fixed VDI access problem under certain circumstances (IDE/SATA; 3.2.0 regression)
+ * Solaris hosts: fixed VM fails to start on 32-bit hosts (3.2.0 regression; bug #6899)
+ * Windows hosts (32-bit): increase guest RAM limit if the host kernel allows for more virtual address space
+ * Linux Additions: re-read a directory after a file was removed (bug #5251)
+ * Linux Additions: install the DRI driver in the right location on ArchLinux guests (bug #6937)
+ * X11 Additions: fixed spurious mouse movement events (bug #4260)
+ * Solaris Additions: fixed guest control execution
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
VirtualBox-3.2.4-OSE-patched.tar.bz2
VirtualBox-3.2.4-UserManual.pdf
virtualbox-ose-3.2.4-rpmlintrc
New:
----
VirtualBox-3.2.6-OSE-patched.tar.bz2
VirtualBox-3.2.6-UserManual.pdf
virtualbox-ose-3.2.6-rpmlintrc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ virtualbox-ose.spec ++++++
--- /var/tmp/diff_new_pack.eLaNdT/_old 2010-06-30 10:50:09.000000000 +0200
+++ /var/tmp/diff_new_pack.eLaNdT/_new 2010-06-30 10:50:09.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package virtualbox-ose (Version 3.2.4)
+# spec file for package virtualbox-ose (Version 3.2.6)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -39,7 +39,7 @@
%endif
#
ExclusiveArch: %ix86 x86_64
-Version: 3.2.4
+Version: 3.2.6
Release: 1
Summary: VirtualBox OSE is an Emulator
License: GPLv2+
++++++ vbox-vboxadd-init-script.diff ++++++
--- /var/tmp/diff_new_pack.eLaNdT/_old 2010-06-30 10:50:09.000000000 +0200
+++ /var/tmp/diff_new_pack.eLaNdT/_new 2010-06-30 10:50:09.000000000 +0200
@@ -2,7 +2,7 @@
===================================================================
--- src/VBox/Additions/linux/installer/vboxadd.sh.orig
+++ src/VBox/Additions/linux/installer/vboxadd.sh
-@@ -30,6 +30,7 @@
+@@ -26,6 +26,7 @@
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: VirtualBox Linux Additions kernel modules
@@ -10,7 +10,7 @@
### END INIT INFO
PATH=$PATH:/bin:/sbin:/usr/sbin
-@@ -168,8 +169,6 @@ fi
+@@ -164,8 +165,6 @@ fi
dev=/dev/vboxguest
userdev=/dev/vboxuser
@@ -19,7 +19,7 @@
fail()
{
-@@ -234,12 +233,6 @@ start()
+@@ -230,12 +229,6 @@ start()
fail "Cannot create device $dev with major $maj and minor $min"
}
fi
@@ -32,7 +32,7 @@
if [ ! -c $userdev ]; then
maj=10
-@@ -250,17 +243,10 @@ start()
+@@ -246,17 +239,10 @@ start()
rmmod vboxguest 2>/dev/null
fail "Cannot create device $userdev with major $maj and minor $min"
}
@@ -51,7 +51,7 @@
$MODPROBE vboxsf > /dev/null 2>&1 || {
if dmesg | grep "vboxConnect failed" > /dev/null 2>&1; then
fail_msg
-@@ -270,8 +256,7 @@ start()
+@@ -266,8 +252,7 @@ start()
fi
fail "modprobe vboxsf failed"
}
@@ -61,7 +61,7 @@
# Mount all shared folders from /etc/fstab. Normally this is done by some
# other startup script but this requires the vboxdrv kernel module loaded.
-@@ -288,10 +273,8 @@ stop()
+@@ -284,10 +269,8 @@ stop()
if ! umount -a -t vboxsf 2>/dev/null; then
fail "Cannot unmount vboxsf folders"
fi
@@ -74,7 +74,7 @@
fi
if running_vboxguest; then
rmmod vboxguest 2>/dev/null || fail "Cannot unload module vboxguest"
-@@ -311,106 +294,8 @@ restart()
+@@ -307,115 +290,8 @@ restart()
# setup_script
setup()
{
@@ -97,21 +97,28 @@
- begin "Building the VirtualBox Guest Additions kernel modules"
- if ! sh /usr/share/$PACKAGE/test/build_in_tmp \
- --no-dkms --no-print-directory > $LOG 2>&1; then
-- fail "`printf "Your system does not seem to be set up to build kernel modules.\nLook at $LOG to find out what went wrong"`"
-- fi
-- echo
-- if ! sh /usr/share/$PACKAGE/test_drm/build_in_tmp \
-- --no-dkms --no-print-directory >> $LOG 2>&1; then
-- printf "\nYour guest system does not seem to have sufficient OpenGL support to enable\naccelerated 3D effects (this requires Linux 2.6.27 or later in the guest\nsystem). This Guest Additions feature will be disabled.\n\n"
+- fail_msg
+- printf "Your system does not seem to be set up to build kernel modules.\nLook at $LOG to find out what went wrong. Once you have corrected it, you can\nrun\n\n /etc/init.d/vboxadd setup\n\nto build them."
+- BUILDVBOXGUEST=""
+- BUILDVBOXSF=""
- BUILDVBOXVIDEO=""
+- else
+- if ! sh /usr/share/$PACKAGE/test_drm/build_in_tmp \
+- --no-dkms --no-print-directory >> $LOG 2>&1; then
+- printf "\nYour guest system does not seem to have sufficient OpenGL support to enable\naccelerated 3D effects (this requires Linux 2.6.27 or later in the guest\nsystem). This Guest Additions feature will be disabled.\n\n"
+- BUILDVBOXVIDEO=""
+- fi
- fi
-- begin "Building the main Guest Additions module"
-- if ! $BUILDVBOXGUEST \
-- --save-module-symvers /tmp/vboxguest-Module.symvers \
-- --no-print-directory install >> $LOG 2>&1; then
-- fail "Look at $LOG to find out what went wrong"
+- echo
+- if [ -n "$BUILDVBOXGUEST" ]; then
+- begin "Building the main Guest Additions module"
+- if ! $BUILDVBOXGUEST \
+- --save-module-symvers /tmp/vboxguest-Module.symvers \
+- --no-print-directory install >> $LOG 2>&1; then
+- fail "Look at $LOG to find out what went wrong"
+- fi
+- succ_msg
- fi
-- succ_msg
- if [ -n "$BUILDVBOXSF" ]; then
- begin "Building the shared folder support module"
- if ! $BUILDVBOXSF \
@@ -173,10 +180,12 @@
- chcon -u system_u -t mount_exec_t "$lib_path/$PACKAGE/mount.vboxsf" > /dev/null 2>&1
-
- succ_msg
-- if running_vboxguest || running_vboxadd; then
-- printf "You should restart your guest to make sure the new modules are actually used\n\n"
-- else
-- start
+- if [ -n "$BUILDVBOXGUEST" ]; then
+- if running_vboxguest || running_vboxadd; then
+- printf "You should restart your guest to make sure the new modules are actually used\n\n"
+- else
+- start
+- fi
- fi
+ begin "Recompiling VirtualBox kernel modules, NOT. It has been packaged."
+ succ_msg
++++++ VirtualBox-3.2.4-OSE-patched.tar.bz2 -> VirtualBox-3.2.6-OSE-patched.tar.bz2 ++++++
virtualbox-ose/VirtualBox-3.2.4-OSE-patched.tar.bz2 /mounts/work_src_done/STABLE/virtualbox-ose/VirtualBox-3.2.6-OSE-patched.tar.bz2 differ: byte 11, line 1
++++++ VirtualBox-3.2.4-UserManual.pdf -> VirtualBox-3.2.6-UserManual.pdf ++++++
(binary differes)
++++++ virtualbox-ose-3.2.4-rpmlintrc -> virtualbox-ose-3.2.6-rpmlintrc ++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package rpmlint for openSUSE:Factory
checked in at Wed Jun 30 10:49:26 CEST 2010.
--------
--- rpmlint/rpmlint.changes 2010-06-07 10:31:28.000000000 +0200
+++ /mounts/work_src_done/STABLE/rpmlint/rpmlint.changes 2010-06-29 16:29:14.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Jun 29 14:29:57 UTC 2010 - lnussel(a)suse.de
+
+- don't print unstripped binary warning when used with build script
+ (bnc#618004)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rpmlint.spec ++++++
--- /var/tmp/diff_new_pack.Ag4BXK/_old 2010-06-30 10:49:04.000000000 +0200
+++ /var/tmp/diff_new_pack.Ag4BXK/_new 2010-06-30 10:49:04.000000000 +0200
@@ -23,7 +23,7 @@
BuildRequires: rpm-python
Summary: Rpm correctness checker
Version: 0.95
-Release: 8
+Release: 9
Source0: %{name}-%{version}.tar.bz2
Source1: config
Source1001: config.in
++++++ suse-hide-unstripped-outside-build.diff ++++++
--- /var/tmp/diff_new_pack.Ag4BXK/_old 2010-06-30 10:49:04.000000000 +0200
+++ /var/tmp/diff_new_pack.Ag4BXK/_new 2010-06-30 10:49:04.000000000 +0200
@@ -10,14 +10,13 @@
import rpm
-@@ -264,7 +265,9 @@ class BinariesCheck(AbstractCheck.Abstra
+@@ -271,7 +272,8 @@ class BinariesCheck(AbstractCheck.Abstra
# stripped ?
if not is_ocaml_native and not unstrippable.search(fname):
- if 'not stripped' in pkgfile.magic:
+ if 'not stripped' in pkgfile.magic and \
-+ (os.environ.get('BUILD_IS_RUNNING', None) == None or \
-+ os.environ.get('BUILD_DEBUG_FLAGS','').find('-g') != -1):
++ os.environ.get('BUILD_DIR', None) == None:
printWarning(
pkg, 'unstripped-binary-or-object', fname)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package resource-agents for openSUSE:Factory
checked in at Wed Jun 30 10:48:30 CEST 2010.
--------
--- resource-agents/resource-agents.changes 2009-08-04 12:40:39.000000000 +0200
+++ /mounts/work_src_done/STABLE/resource-agents/resource-agents.changes 2010-06-25 04:14:57.000000000 +0200
@@ -2 +2 @@
-Tue Aug 4 12:39:55 CEST 2009 - abeekhof(a)suse.de
+Mon May 10 14:12:00 UTC 2010 - dmuhamedagic(a)novell.com
@@ -4 +4,5 @@
-- Update an package license files
+- RA: set the HA_RSCTMP directory to /var/run/resource-agents (lf#2378)
+- pgsql: add new "config" parameter
+- pgsql: properly implement pghost parameter
+- High: SAPInstance RA: don't rely on op target rc when monitoring clones (lf#2371)
+- upstream version cs a7c0f35916bf
@@ -7 +11 @@
-Mon Aug 3 12:10:25 CEST 2009 - abeekhof(a)suse.de
+Mon Apr 26 14:54:24 UTC 2010 - dmuhamedagic(a)novell.com
@@ -9 +13,5 @@
-- Don't use macros for the group names
+- exportfs: new RA
+- mysql: master-slave functionality
+- oracle: reduce output from sqlplus to the last line for queries (bnc#567815)
+- nfsserver: fix the default string for the notification parameter
+- upstream version cs f92935082277
@@ -12 +20 @@
-Wed Jul 29 14:37:30 CEST 2009 - abeekhof(a)suse.de
+Tue Apr 20 06:23:21 UTC 2010 - xwhu(a)novell.com
@@ -14 +22,217 @@
-- Initial import of the resource-agents project after being split off from Heartbeat
+- VGs are activated with "--partial". This helps the mirrored LVs.
+
+-------------------------------------------------------------------
+Mon Apr 12 11:49:40 UTC 2010 - dmuhamedagic(a)novell.com
+
+- VirtualDomain: bail out early if config file can't be read
+ during probe (nbc#593988)
+- VirtualDomain: spin on define until we definitely have a domain name
+- Filesystem: prefer /proc/mounts to /etc/mtab for non-bind mounts (lf#2388)
+- upstream version cs b3d16560e966
+
+-------------------------------------------------------------------
+Mon Mar 29 09:14:47 UTC 2010 - dmuhamedagic(a)novell.com
+
+- build: add the postfix RA
+- VirtualDomain: fix incorrect use of __OCF_ACTION
+ (the stop operation may timeout otherwise)
+- IPaddr2: don't bring the interface down on stop
+ (otherwise IPv6 addresses may be removed)
+- oracle/oralsnr: improve exit codes if the environment isn't valid
+- Route: don't assume that OCF_RESKEY_CRM_meta_clone_node_max is
+ set to a number (lf#2375)
+- meta-data: improve timeouts in most resource agents
+ (reduce the number of warnings by the shell)
+- SFEX daemon: fix logging
+- ldirectord: fix the configfile default (bnc#589457)
+- drbd: fix metadata (bnc#588684)
+- mysql: revert wrong patch erroneously included with ocft
+- mysql: update defaults to match sle11 installations (bnc#590447)
+- upstream version cs 000dd8956ad7
+
+-------------------------------------------------------------------
+Mon Mar 15 15:11:34 UTC 2010 - dmuhamedagic(a)novell.com
+
+- ocft: fix remote shell
+- upstream version cs 72f1ac55e70b
+
+-------------------------------------------------------------------
+Tue Mar 9 18:37:51 UTC 2010 - dmuhamedagic(a)novell.com
+
+- sfex: don't use pid file (lf#2363,bnc#585416)
+- IPsrcaddr: modify the interface route (lf#2367)
+
+-------------------------------------------------------------------
+Thu Mar 4 13:51:05 UTC 2010 - dmuhamedagic(a)novell.com
+
+- ocft: new RA test suite
+
+-------------------------------------------------------------------
+Wed Mar 3 15:36:24 UTC 2010 - dmuhamedagic(a)novell.com
+
+- log messages from RAs to stderr if attached to a terminal
+- ldirectord: Allow multiple email addresses (lf#2168)
+- ocf-shellfuncs: tests to check for clone/ms resources
+- vmware: multiple improvements
+
+-------------------------------------------------------------------
+Mon Feb 22 14:30:08 UTC 2010 - dmuhamedagic(a)novell.com
+
+- upstream version cs: da18e46a1f94
+- ocf-shellfuncs: don't output to stderr if using syslog (prevents
+ double logging from the RA and lrmd)
+
+-------------------------------------------------------------------
+Mon Feb 22 12:04:54 UTC 2010 - dmuhamedagic(a)novell.com
+
+- upstream version cs: 44b1ba8c7804
+
+-------------------------------------------------------------------
+Mon Feb 22 11:57:39 UTC 2010 - dmuhamedagic(a)novell.com
+
+- make sure that OCF_RESKEY_CRM_meta_interval is always defined (lf#2284)
+- vmware: fix set_environment() invocation (lf#2342)
+- oracle/oralsnr: improve logging
+- apache: return the right exit code from monitor (bnc#578628)
+- iSCSILogicalUnit: fix monitor for STGT
+- Route: add route table parameter (lf#2335)
+- build: don't include PACKAGE_NAME in HA_NOARCHBIN
+
+-------------------------------------------------------------------
+Fri Feb 5 14:12:13 UTC 2010 - dmuhamedagic(a)novell.com
+
+- upstream version cs: f40d03a863f1
+
+-------------------------------------------------------------------
+Wed Jan 27 13:24:32 UTC 2010 - lmb(a)novell.com
+
+- Use same replacement syntax as for other packages.
+
+-------------------------------------------------------------------
+Fri Jan 22 16:06:06 UTC 2010 - dmuhamedagic(a)novell.com
+
+- upstream version cs: 39b26d5af509
+- portblock: fast reconnect/tickle ACK (new resource agent)
+- ClusterMon: don't fail in stop if the process is missing (bnc#569957)
+- CTDB: auto-generate cluster-specific part of smb.conf (LF 2308)
+- doc: add a "see also" link to resource agent man pages
+
+-------------------------------------------------------------------
+Tue Jan 19 17:02:38 UTC 2010 - lmb(a)novell.com
+
+- Correct dependencies of ldirectord package (bnc#571825).
+
+-------------------------------------------------------------------
+Mon Dec 28 16:00:32 UTC 2009 - dmuhamedagic(a)novell.com
+
+- add %dir /usr/share/resource-agents to .spec
+
+-------------------------------------------------------------------
+Mon Dec 28 15:37:41 UTC 2009 - dmuhamedagic(a)novell.com
+
+- Upstream version cd: b10ad6afb1bd
+- mark obsolete RAs as deprecated (LF 2244)
+- VirtualDomain: fix forceful stop (LF 2283)
+- IPaddr2: CLUSTERIP/iptables rule not always
+ inserted on failed monitor (LF 2281)
+- copy specfile from upstream
+
+-------------------------------------------------------------------
+Mon Dec 14 21:38:26 UTC 2009 - lmb(a)novell.com
+
+- Removed wrong conflicts.
+
+-------------------------------------------------------------------
+Thu Dec 10 17:06:50 UTC 2009 - "lmb(a)novell.com"
+
+- CTDB: New resource agent for clustered samba.
+- proftpd: new resource agent.
+- Upstream version cs: 520d53bd91dc
+
+-------------------------------------------------------------------
+Tue Dec 8 08:23:21 UTC 2009 - "lmb(a)novell.com"
+
+- Filesystem: allow configuring smbfs mounts as clones.
+- Filesystem: implement deep monitor operation.
+- IPaddr2: behave if the interface is down (lf#2147)
+- IPaddr2: check binaries when it makes sense
+- IPaddr2: fix nvalid default value for OCF_RESKEY_clusterip_hash
+ (bnc#553753)
+- IPv6addr: recognize network masks properly
+- LVM: Make monitor operation quiet in logs (bnc#546353)
+- MailTo: Provide a default for MAILCMD (bnc#534803, bnc#556366)
+- MailTo: allow multiple word subject line
+- Raid1: Improve monitor function (bnc#546551)
+- VIParip: Pathname needed to be configurable (lf#1331)
+- VirtualDomain: avoid needlessly invoking "virsh define"
+- VirtualDomain: loop on status if libvirtd is unreachable.
+- Xen: Remove instance_attribute "allow_migrate" (bnc#539968)
+- apache: monitor operation of depth 10 for web applications (lf#2234).
+- iSCSITarget, iSCSILogicalUnit: support LIO
+- jboss: Added JBoss support.
+- ldirectord: fix various bugs in OCF RA (lf#1949)
+- mysql: escalate stop to KILL if regular shutdown doesn't work
+- nfsserver: exit properly in nfsserver_validate (lf#2173)
+- nfsserver: use check_binary properly in validate (lf#2211)
+- nfsserver: validate should not check if nfs_shared_infodir exists
+ (lf#2219)
+- oracle/oralsnr: export variables properly
+- oracle: drop spurious output from sqlplus
+- pgsql: remove the previous backup_label if it exists
+- postfix: fix double stop
+- vmware: make meta-data work and several cleanups (lf#2212)
+- Upstream version cs: 002038be601b
+
+-------------------------------------------------------------------
+Tue Sep 15 09:01:09 UTC 2009 - "lmb(a)novell.com"
+
+- Revert to SLE HA 11 naming scheme.
+- iSCSILogicalUnit: use a 16-byte default SCSI ID.
+- iSCSITarget: be more persistent deleting targets on stop.
+- portblock: add per-IP filtering capability.
+- mysql-proxy: new instance parameters supported.
+- Upstream version cs: cde070764e1f
++++ 46 more lines (skipped)
++++ between resource-agents/resource-agents.changes
++++ and /mounts/work_src_done/STABLE/resource-agents/resource-agents.changes
calling whatdependson for head-i586
Old:
----
resource-agents.tar.gz
New:
----
lvm-vg-partial-active.diff
resource-agents-mysql-sle11.patch
resource-agents-nfsserver-sle11.patch
resource-agents.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ resource-agents.spec ++++++
--- /var/tmp/diff_new_pack.5FtGhf/_old 2010-06-30 10:48:15.000000000 +0200
+++ /var/tmp/diff_new_pack.5FtGhf/_new 2010-06-30 10:48:15.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package resource-agents (Version 0.9)
+# spec file for package resource-agents (Version 1.0.3)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 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
@@ -15,41 +15,161 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
+%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
+%global agents_docdir %{_defaultdocdir}/%{name}-%{version}
+%endif
+%if 0%{?suse_version}
+%global agents_docdir %{_defaultdocdir}/%{name}
+%endif
+#
+# Since this spec file supports multiple distributions, ensure we
+# use the correct group for each.
+#
+%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
+%define pkg_group System Environment/Daemons
+%else
+%define pkg_group Productivity/Clustering/HA
+%endif
+%define SSLeay perl-Net-SSLeay
+%if 0%{?suse_version}
+%define SSLeay perl-Net_SSLeay
+%endif
Name: resource-agents
-Summary: Reusable cluster resource scripts
-Version: 0.9
+Summary: The Heartbeat Subsystem for High-Availability Linux
+Version: 1.0.3
Release: 1
-License: GPL v2 or later
-Url: http://www.linux-ha.org
+License: GPLv2 ; LGPLv2.1+
+Url: http://linux-ha.org/
Group: Productivity/Clustering/HA
-Source: resource-agents.tar.gz
+Source: resource-agents.tar.bz2
+Patch1: resource-agents-mysql-sle11.patch
+Patch2: lvm-vg-partial-active.diff
+Patch3: resource-agents-nfsserver-sle11.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
-Conflicts: heartbeat < 2.99
+Obsoletes: heartbeat-resources
+Conflicts: heartbeat-resources
BuildRequires: autoconf automake glib2-devel pkgconfig python-devel
%if 0%{?suse_version}
BuildRequires: libglue-devel libnet
+BuildRequires: docbook-xsl-stylesheets docbook_4 libxslt
%endif
-%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
+%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel}
BuildRequires: cluster-glue-libs-devel which
+BuildRequires: docbook-dtds docbook-style-xsl libxslt
%endif
%description
-Scripts to allow common services to operate in a High Availability environment.
+heartbeat is a sophisticated multinode resource manager for High
+Availability clusters.
+
+It can failover arbitrary resources, ranging from IP addresses over NFS
+to databases that are tied in via resource scripts. The resources can
+have arbitrary dependencies for ordering or placement between them.
+
+heartbeat contains a cluster membership layer, fencing, and local and
+clusterwide resource management functionality.
+
+1.2/1.0 based 2-node only configurations are supported in a legacy
+mode.
+
+heartbeat implements the following kinds of heartbeats:
+
+- Serial ports
+
+- UDP/IPv4 broadcast, multi-cast, and unicast
+
+- IPv4 "ping" pseudo-cluster members.
+
+
+
+Authors:
+--------
+ Alan Robertson <alanr(a)unix.sh>
+ Andrew Beekhof <abeekhof(a)suse.de>
+ Guochun Shi <gshi(a)ncsa.uiuc.edu>
+ Horms <horms(a)verge.net.net>
+ Huang Zhen <zhenhltc(a)cn.ibm.com>
+ Lars Marowsky-Bree <lmb(a)suse.de>
+ Sun Jiang Dong <hasjd(a)cn.ibm.com>
+ (See doc/AUTHORS)
+
+%package -n ldirectord
+License: GPLv2 ; LGPLv2.1+
+Summary: The Heartbeat Subsystem for High-Availability Linux
+Group: Productivity/Clustering/HA
+Requires: %{SSLeay} perl-libwww-perl ipvsadm
+Conflicts: heartbeat-ldirectord
+Obsoletes: heartbeat-ldirectord
+Requires: perl-MailTools perl-Socket6
+%if 0%{?suse_version}
+Requires: logrotate
+%endif
+%if 0%{?fedora_version}
+Requires(post): /sbin/chkconfig
+Requires(preun):/sbin/chkconfig
+%endif
+
+%description -n ldirectord
+heartbeat is a sophisticated multinode resource manager for High
+Availability clusters.
+
+It can failover arbitrary resources, ranging from IP addresses over NFS
+to databases that are tied in via resource scripts. The resources can
+have arbitrary dependencies for ordering or placement between them.
+
+heartbeat contains a cluster membership layer, fencing, and local and
+clusterwide resource management functionality.
+
+1.2/1.0 based 2-node only configurations are supported in a legacy
+mode.
+
+heartbeat implements the following kinds of heartbeats:
+
+- Serial ports
+
+- UDP/IPv4 broadcast, multi-cast, and unicast
+
+- IPv4 "ping" pseudo-cluster members.
+
+
+
+Authors:
+--------
+ Alan Robertson <alanr(a)unix.sh>
+ Andrew Beekhof <abeekhof(a)suse.de>
+ Guochun Shi <gshi(a)ncsa.uiuc.edu>
+ Horms <horms(a)verge.net.net>
+ Huang Zhen <zhenhltc(a)cn.ibm.com>
+ Lars Marowsky-Bree <lmb(a)suse.de>
+ Sun Jiang Dong <hasjd(a)cn.ibm.com>
+ (See doc/AUTHORS)
%prep
###########################################################
%setup -n resource-agents -q
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
###########################################################
%build
CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
export CFLAGS
./autogen.sh
-%configure --enable-fatal-warnings=no
+%if 0%{?suse_version} >= 1020 || 0%{?fedora} >= 11 || 0%{?centos_version} > 5 || 0%{?rhel} > 5
+%configure \
+ --enable-fatal-warnings=yes \
+ --with-package-name=%{name} \
+ --docdir=%{agents_docdir}
+%else
+export docdir=%{agents_docdir}
+%configure \
+ --enable-fatal-warnings=yes \
+ --with-package-name=%{name}
+%endif
export MAKE="make %{?jobs:-j%jobs}"
make %{?jobs:-j%jobs}
###########################################################
@@ -57,6 +177,15 @@
%install
###########################################################
make DESTDIR=$RPM_BUILD_ROOT install
+(
+ mkdir -p $RPM_BUILD_ROOT/etc/ha.d/resource.d
+ ln -s %{_sbindir}/ldirectord $RPM_BUILD_ROOT/etc/ha.d/resource.d/ldirectord
+) || true
+test -d $RPM_BUILD_ROOT/sbin || mkdir $RPM_BUILD_ROOT/sbin
+(
+ cd $RPM_BUILD_ROOT/sbin
+ ln -sf /etc/init.d/ldirectord rcldirectord
+) || true
# Dont package static libs or compiled python
find $RPM_BUILD_ROOT -name '*.a' -type f -print0 | xargs -0 rm -f
find $RPM_BUILD_ROOT -name '*.la' -type f -print0 | xargs -0 rm -f
@@ -66,6 +195,8 @@
find $RPM_BUILD_ROOT -name '.ocf-*' -type f -print0 | xargs -0 chmod a-x
find $RPM_BUILD_ROOT -name 'ocf-*' -type f -print0 | xargs -0 chmod a-x
find $RPM_BUILD_ROOT -name '*.dtd' -type f -print0 | xargs -0 chmod a-x
+chmod 0755 $RPM_BUILD_ROOT/usr/sbin/ocf-tester
+chmod 0755 $RPM_BUILD_ROOT/usr/sbin/ocft
###########################################################
%clean
@@ -77,23 +208,71 @@
fi
rm -rf $RPM_BUILD_DIR/resource-agents
###########################################################
+%if 0%{?suse_version}
+
+%preun -n ldirectord
+%stop_on_removal ldirectord
+
+%postun -n ldirectord
+%insserv_cleanup
+%endif
+%if 0%{?fedora}
+
+%preun -n ldirectord
+/sbin/chkconfig --del ldirectord
+
+%postun -n ldirectord -p /sbin/ldconfig
+
+%post -n ldirectord
+/sbin/chkconfig --add ldirectord
+%endif
%files
###########################################################
%defattr(-,root,root)
%dir /usr/lib/ocf
%dir /usr/lib/ocf/resource.d
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/ocft
+%dir %{_datadir}/%{name}/ocft/configs
+%config(noreplace) %{_datadir}/%{name}/ocft/configs/*
+%{_datadir}/%{name}/ocft/caselib
+%{_datadir}/%{name}/ocft/README
+%{_datadir}/%{name}/ocft/README.zh_CN
/usr/lib/ocf/resource.d/heartbeat
%{_sbindir}/ocf-tester
+%{_sbindir}/ocft
%{_sbindir}/sfex_init
+%{_includedir}/heartbeat
+%dir %attr (1755, root, root) %{_var}/run/resource-agents
+%doc AUTHORS
%doc COPYING
-%dir %{_datadir}/glue
-%doc %{_datadir}/glue/ra-api-1.dtd
+%doc %{_datadir}/%{name}/ra-api-1.dtd
+%doc %{_mandir}/man7/*.7*
+%doc doc/README.webapps
# For compatability with pre-existing agents
%dir %{_libdir}/heartbeat
%{_libdir}/heartbeat/ocf-shellfuncs
%{_libdir}/heartbeat/ocf-returncodes
+%dir /etc/ha.d
+/etc/ha.d/shellfuncs
%{_libdir}/heartbeat/send_arp
%{_libdir}/heartbeat/sfex_daemon
+%{_libdir}/heartbeat/findif
+%{_libdir}/heartbeat/tickle_tcp
+
+%files -n ldirectord
+###########################################################
+%defattr(-,root,root)
+%doc ldirectord/ldirectord.cf
+%doc %{_mandir}/man8/ldirectord.8*
+%dir /etc/ha.d/resource.d
+#%doc %{_mandir}/man8/supervise-ldirectord-config.8*
+%{_sbindir}/ldirectord
+/sbin/rcldirectord
+#%{_sbindir}/supervise-ldirectord-config
+%{_sysconfdir}/init.d/ldirectord
+%{_sysconfdir}/ha.d/resource.d/ldirectord
+%config(noreplace) %{_sysconfdir}/logrotate.d/ldirectord
%changelog
++++++ lvm-vg-partial-active.diff ++++++
Index: resource-agents/heartbeat/LVM
===================================================================
--- resource-agents.orig/heartbeat/LVM 2010-04-06 21:53:31.000000000 +0800
+++ resource-agents/heartbeat/LVM 2010-04-20 14:22:28.000000000 +0800
@@ -201,7 +201,9 @@
active_mode="ey"
fi
- ocf_run vgchange -a $active_mode $1 || return $OCF_ERR_GENERIC
+# Activate the VG in partial.
+# This is needed for mirrored LV
+ ocf_run vgchange -a $active_mode --partial $1 || return $OCF_ERR_GENERIC
if LVM_status $1; then
: OK Volume $1 activated just fine!
++++++ resource-agents-mysql-sle11.patch ++++++
Low: mysql: update defaults to match sle11 installations (bnc#590447)
Index: resource-agents/heartbeat/mysql
===================================================================
--- resource-agents.orig/heartbeat/mysql
+++ resource-agents/heartbeat/mysql
@@ -58,13 +58,13 @@ OCF_RESKEY_log_default="/var/log/mysqld.
OCF_RESKEY_pid_default="/var/mysql/mysqld.pid"
OCF_RESKEY_socket_default="/var/run/mysql/mysql.sock"
else
-OCF_RESKEY_binary_default="/usr/bin/safe_mysqld"
+OCF_RESKEY_binary_default="/usr/bin/mysqld_safe"
OCF_RESKEY_config_default="/etc/my.cnf"
OCF_RESKEY_datadir_default="/var/lib/mysql"
OCF_RESKEY_user_default="mysql"
OCF_RESKEY_group_default="mysql"
OCF_RESKEY_log_default="/var/log/mysqld.log"
-OCF_RESKEY_pid_default="/var/run/mysql/mysqld.pid"
+OCF_RESKEY_pid_default="/var/lib/mysql/mysqld.pid"
OCF_RESKEY_socket_default="/var/lib/mysql/mysql.sock"
fi
OCF_RESKEY_client_binary_default="mysql"
++++++ resource-agents-nfsserver-sle11.patch ++++++
diff -r 71d4971f6ba8 heartbeat/nfsserver
--- a/heartbeat/nfsserver Wed Apr 21 13:16:38 2010 +0900
+++ b/heartbeat/nfsserver Thu May 06 12:13:17 2010 +0200
@@ -13,7 +13,7 @@
fi
DEFAULT_INIT_SCRIPT="/etc/init.d/nfsserver"
-DEFAULT_NOTIFY_CMD="/sbin/sm-notify"
+DEFAULT_NOTIFY_CMD="/usr/sbin/sm-notify"
nfsserver_meta_data() {
cat <<END
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package pacemaker-mgmt for openSUSE:Factory
checked in at Wed Jun 30 10:47:46 CEST 2010.
--------
New Changes file:
--- /dev/null 2010-05-08 11:31:08.000000000 +0200
+++ /mounts/work_src_done/STABLE/pacemaker-mgmt/pacemaker-mgmt.changes 2010-06-25 04:16:51.000000000 +0200
@@ -0,0 +1,258 @@
+-------------------------------------------------------------------
+Wed Apr 14 08:54:35 UTC 2010 - ygao(a)novell.com
+
+- Change the inconsistent package naming in the descriptions
+
+-------------------------------------------------------------------
+Mon Apr 12 13:49:05 UTC 2010 - lmb(a)novell.com
+
+- Recommend the pacemaker-mgmt-client from the server package. This
+ allows the client to be uninstalled while also automatically
+ installing it on upgrades (bnc#591230).
+
+-------------------------------------------------------------------
+Fri Apr 2 05:23:44 UTC 2010 - ygao(a)novell.com
+
+- Change the version number to 2.0.0 (Since an earlier changeset we have included was tagged and released as 2.0.0 from upstream)
+
+-------------------------------------------------------------------
+Fri Mar 26 11:07:54 UTC 2010 - ygao(a)novell.com
+
+- Low: mgmt: (bnc#590031) Always set a crm attribute to the first matched attribute or into the first attribute set
+- Low: mgmtd: (bnc#590668) Do exit on cib connection loss, regardless of whether any haclient ever logged in
+- Update source tarball to revision: 0f1490eaa8d8 tip
+
+-------------------------------------------------------------------
+Mon Mar 22 08:26:03 UTC 2010 - ygao(a)novell.com
+
+- Low: haclient: (bnc#575787) Move the desktop entry to the new YaST group - High Availability
+- Low: po: Update Japanese translations
+- Update source tarball to revision: ee4803c241fe tip
+
+-------------------------------------------------------------------
+Thu Mar 11 06:26:05 UTC 2010 - ygao(a)novell.com
+
+- Low: haclient: (bnc#586961) Add "allow-migrate" into the drop down list
+- Low: haclient: (bnc#586965) Do not fall into an error on exit if cannot retrieve the CIB
+- Low: po: Update translations
+- Update source tarball to revision: 14fd66fafbfa tip
+
+-------------------------------------------------------------------
+Wed Mar 10 05:44:46 UTC 2010 - ygao(a)novell.com
+
+- Low: haclient: Make the generated ID consistent with crm_attribute
+- Low: haclient: Tune the display of too many tabs
+- Low: haclient: Use new gtk.Tooltip API for pygtk >= 2.12 (bnc#586967)
+- Low: mgmtd: Do not display orphaned clone if it's just partially active
+- Low: mgmtd: Prototypes of *_attr() fuctions have changed
+- Update source tarball to revision: a05fd62b2e13 tip
+
+-------------------------------------------------------------------
+Fri Feb 5 06:06:33 UTC 2010 - ygao(a)novell.com
+
+- Update source tarball to revision: 252f0d838a67 tip
+ + Low: haclient: Do not show adding dialog for "node"
+ + Low: haclient: Fill two options into the drop-down list for "utilization"
+ + Low: mgmtd: Don't display orphaned resources (Thank Hideo Yamauchi)
+ + Medium: haclient: Tune for "utilization"
+
+-------------------------------------------------------------------
+Wed Jan 27 09:53:13 UTC 2010 - lmb(a)novell.com
+
+- Conflict with old package names to prevent them from being
+ reinstalled.
+
+-------------------------------------------------------------------
+Tue Jan 12 14:19:00 CST 2010 - ygao(a)novell.com
+- Update source tarball to revision: 8b56e4d03dc8 tip
+ + Low: snmp_subagent: Change the directory to install SNMPAgentSanityCheck
+
+-------------------------------------------------------------------
+Thu Nov 5 16:39:08 CST 2009 - ygao(a)novell.com
+
+- Update source tarball to revision: 1a20774cb1e6 tip
+ + Low: mgmt: (LF#2202) Set node attributes via crm_attribute
+
+-------------------------------------------------------------------
+Wed Oct 21 11:24:28 CST 2009 - ygao(a)novell.com
+
+- Update source tarball to revision: a4d84893fb6e tip
+ + Low: Build: Compile against corosync
+ + Medium: haclient: (bnc#540704) Allow to add a "date_expression" when an "expression" exists in a "rule"
+ + Medium: mgmt: (bnc#541702) Cleaning up fail-count should be correctly done through attrd now
+
+-------------------------------------------------------------------
+Tue Aug 25 17:17:09 CST 2009 - ygao(a)novell.com
+
+- Update source tarball to revision: 4fd4b0353d04+ tip
+ + Dev: haclient: Automatically try to reconnect to cluster nodes if disconnected
+ + Dev: haclient: Check whether the value of an "ID" or "IDREF" type of attribute is valid before doing validating
+ + Dev: po: Update Japanese po
+ + Low: Build: Avoid a macro redefinition
+ + Low: Build: Compile against cluster-glue
+ + Low: Build: Fix configure.in for compiling against cluster-glue
+ + Low: haclient: Adopt extract_int() in TransitionInfoDlg()
+ + Low: haclient: Avoid the error if "rsc_type" command returns "None"
+ + Low: haclient: Determine if the current view exists before updating it
+ + Low: snmp_subagent: (LF#2184) Add the description of LHAIFStatus
+ + Low: snmp_subagent: Add the description about how to work with openAIS
+ + Medium: haclient: Show the correct "[+|-]INFINITY" value of an integer cluster property
+ + Medium: snmp_subagent: Improved for openais support
+
+-------------------------------------------------------------------
+Mon Jun 29 14:33:41 CST 2009 - ygao(a)novell.com
+
+- Update source tarball to revision: pacemaker-mgmt-1.99.2 (1f7d1be39d34 tip)
+ + Dev: haclient: Add "About"
+ + Dev: haclient: Add accelerators
+ + Dev: haclient: Add Japanese translation
+ + Dev: haclient: Improve thread synchronization
+ + Dev: haclient: Provide the progress pulse when generating the transition information
+ + Dev: haclient: Set default response for dialogs
+ + Dev: haclient: Show progress pulse when generating shadow diff
+ + Dev: haclient: Support viewing/editing/importing/exporting the whole cib xml or the configuration section
+ + Dev: mgmt: Improve the performance and the user interface of "Transition Information"
+ + Dev: mgmt: Provide more details of nodes
+ + Dev: po: Add the translation of the license
+ + Dev: po: Update pot and po
+ + High: lib: Fix huge memory leak due to the behavior of swig
+ + Low: Build: Add libgv-python dependency for Debian
+ + Low: Build: Update the release number and the changelog
+ + Low: haclient: Avoid an error if there's no pengine input exists
+ + Low: haclient: Avoid the possible key error of Manager.get_node_config()
+ + Low: haclient: Concatenate error messages with the proper type
+ + Low: haclient: Consider the possibility of IOError when creating temporary files
+ + Low: haclient: Determine labels's width and align the following widgets properly
+ + Low: haclient: Do not continue updating if the client is disconnected
+ + Low: haclient: Fill the limited number of transitions into the drop-down list
+ + Low: haclient: Make python-lxml optional
+ + Low: haclient: Make sure the variable is assigned before referenced
+ + Low: haclient: Make the marks of meta_attributes's default values consistent
+ + Low: haclient: Set the default focus on "password" entry in the login dialog
+ + Low: haclient: Set widgets's initial sizes to appropriate values for low resolutions
+ + Low: mgmt: Log version details
+ + Low: mgmt: Show its unclean resources if a node is uncleanly offline
+ + Low: mgmtd: (LF#2142) Avoid redefinitions
+ + Low: mgmtd: Add and adopt a new macro gen_msg_from_fstream()
+ + Low: mgmtd: Adopt append_str() macro in on_get_pe_inputs()
+ + Low: mgmtd: Can be compiled and work against pacemaker < 1.0.3
+ + Low: mgmtd: Optimize for tranferring schemas
+ + Low: mgmtd: Optimize message generating for transferring cluster reports
+ + Low: mgmtd: Optimize message generating for transferring crm DTD
+ + Low: mgmtd: Optimize message generating for transferring transition information
+ + Low: mgmtd: Use the variable instead of the macro directly
+ + Low: snmp_subagent: Allow specifying the cache timeout through the argument if not SUPPORT_HEARTBEAT
+ + Medium: haclient: Avoid hanging when getting or parsing CIB/schemas fail
+ + Medium: haclient: Do manager.update() via gobject timeout
+ + Medium: haclient: Increase the interval of gobject timeout to avoid consuming excessive CPU when update fails
+ + Medium: haclient: Remove the graph when it's no longer needed
+ + Medium: haclient: Set gobject timeout for manager.update() in the consistent way
+ + Medium: haclient: Update crm metadata via gobject timeout (Optimize connecting time)
+ + Medium: mgmt: Display the proper status of resources on the node which is uncleanly offline
+ + Medium: mgmtd: Destroy the crmd channel in the end of on_cleanup_rsc()
+ + Medium: mgmtd: Fix memory leaks
+
+-------------------------------------------------------------------
+Mon Apr 27 13:31:50 CST 2009 - ygao(a)novell.com
+
+- Update source tarball to revision: pacemaker-mgmt-1.99.1 (8b0a4cc4ac22 tip)
+ + Dev: haclient: Automatically generate meaningful unique IDs instead of UUIDs
+ + Dev: haclient: Automatically generate unique IDs for "op"s in "Simple Mode"
+ + Dev: haclient: Improved for i18n
+ + Dev: haclient: Make sure a generated ID is valid against schema
+ + Dev: haclient: Propose ID for objects for which users may not want to set ID themselves
+ + Dev: po: Maintain po in a separate directory.
+ + Low: Build: Improve i18n support for compatibility
+ + Low: haclient: Make sure a created intermediate object's ID is unique
+ + Low: haclient: Rename some terms
+ + Low: haclient: Support objects with unicode IDs
+ + Low: mgmtd: Try to stat the cluster report file directly
+ + Medium: haclient: Generate an UUID first (since there are objects for which we could not generate a meaningful ID)
+ + Medium: haclient: Set the focus back after dynamically tuning the layout
+ + Medium: mgmtd: Avoid segmentation faults caused by missing the required user or group
+
+-------------------------------------------------------------------
+Fri Mar 27 14:12:47 CST 2009 - ygao(a)novell.com
+
+- Update source tarball to revision: 5ea4e654a8fa tip
+ + Build: (bnc#487697) Add copies of licenses
+ + High: mgmtd: Replace the adoptions of dirent->d_type which is not supported by some filesystems such as reiserfs
+ + High: mgmt: The path that keeps PEngine outputs has been changed!
+ + Low: haclient: (bnc#484169) Add desktop file
+ + Medium: haclient: (bnc#486866) Check whether a specified time is valid
+ + Medium: haclient: (bnc#488594) Additional prechecks for "primitive"
+ + Medium: mgmt: Optimize viewing transition information
+
+-------------------------------------------------------------------
+Fri Mar 20 03:27:45 CST 2009 - ygao(a)novell.com
+
+- Update source tarball to revision: 65fb5e7dca2b
+ + Dev: mgmt: Implement shadow configuration support
+ + Low: haclient: Change the layout of buttons for TransitionInfoDlg()
+ + Low: haclient: Do not set "target-role" in add wizard if working on a shadow CIB
+ + Low: haclient: Fix file filters for saving transition graph
+ + Medium: haclient: Get and cache CRM metadata in advance
+
+-------------------------------------------------------------------
+Sat Mar 14 10:53:00 CST 2009 - ygao(a)novell.com
++++ 61 more lines (skipped)
++++ between /dev/null
++++ and /mounts/work_src_done/STABLE/pacemaker-mgmt/pacemaker-mgmt.changes
calling whatdependson for head-i586
New:
----
pacemaker-mgmt.changes
pacemaker-mgmt.spec
pacemaker-mgmt.tar.gz
pacemaker-starter.glade
pacemaker_starter.py
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pacemaker-mgmt.spec ++++++
#
# spec file for package pacemaker-mgmt (Version 2.0.0)
#
# Copyright (c) 2010 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/
#
# norootforbuild
%if 0%{?suse_version}
%define _libexecdir %{_libdir}
%endif
%define with_extra_warnings 0
%define with_debugging 0
%define without_fatal_warnings 1
%define with_ais_support 1
%define with_heartbeat_support 0
%define enable_snmp_subagent 1
%define gname haclient
%define uname hacluster
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
%define pkg_group System Environment/Daemons
%else
%define pkg_group Productivity/Clustering/HA
%endif
Name: pacemaker-mgmt
Summary: Management Tools for Pacemaker based HA solution
Version: 2.0.0
Release: 1
License: GPLv2+
Url: http://hg.clusterlabs.org/pacemaker/pygui
Group: Productivity/Clustering/HA
Source: pacemaker-mgmt.tar.gz
Source1: pacemaker_starter.py
Source2: pacemaker-starter.glade
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
Conflicts: heartbeat < 2.99
Obsoletes: pacemaker-pygui
Conflicts: pacemaker-pygui
Requires: cluster-glue pacemaker findutils
Recommends: pacemaker-mgmt-client
%if 0%{?suse_version}
BuildRequires: libglue-devel libpacemaker-devel
%else
BuildRequires: cluster-glue-libs-devel pacemaker-libs-devel
%endif
#BuildRequires: e2fsprogs-devel glib2-devel gnutls-devel libxml2-devel ncurses-devel pam-devel python-devel swig
BuildRequires: glib2-devel gnutls-devel intltool libxml2-devel ncurses-devel pam-devel python-devel swig
%if %enable_snmp_subagent
BuildRequires: net-snmp-devel
Requires: net-snmp
%endif
%if %with_ais_support
BuildRequires: libcorosync-devel
Requires: corosync
%endif
%if %with_heartbeat_support
BuildRequires: heartbeat-devel
Requires: heartbeat
%endif
%if 0%{?suse_version}
BuildRequires: tcpd-devel
#%if 0%{?suse_version} == 930
#BuildRequires: rpm-devel
#%endif
#%if 0%{?suse_version} == 1000
#BuildRequires: lzo lzo-devel
#%endif
#%if 0%{?sles_version} == 9
#BuildRequires: pkgconfig
#%endif
%endif
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
BuildRequires: which
#BuildRequires: rpm-devel
#BuildRequires: tcp_wrappers-devel
BuildRequires: lm_sensors-devel openssl-devel
%endif
%if 0%{?fedora_version} >= 11
BuildRequires: libtool-ltdl-devel
%endif
%if 0%{?rhel_version} == 406
BuildRequires: gcc-c++ libselinux-devel
%endif
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
%description
pacemaker-mgmt includes a server/client GUI and a snmp plugin, to help
to manage and monitor pacemaker based HA solution.
Authors:
--------
Yan Gao <ygao(a)novell.com>
%package client
License: GPLv2+
Summary: Management Tools for Pacemaker based HA solution
Group: Productivity/Clustering/HA
Obsoletes: pacemaker-pygui
Conflicts: pacemaker-pygui
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
Requires: PyXML
Requires: pygtk2
%else
Requires: pyxml
Requires: python-gtk
%endif
%if 0%{?centos_version} == 0 && 0%{?rhel_version} == 0
Requires: python-lxml
%endif
#%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?sles_version} > 10
%if 0%{?suse_version} || 0%{?fedora_version}
Requires: graphviz-python
%endif
%if 0%{?mandriva_version}
Requires: libgraphvizpython0
%endif
%description client
pacemaker-mgmt includes a server/client GUI and a snmp plugin, to help
to manage and monitor pacemaker based HA solution.
Authors:
--------
Yan Gao <ygao(a)novell.com>
%package devel
License: GPLv2+
Summary: Management Tools for Pacemaker based HA solution
Group: Productivity/Clustering/HA
Obsoletes: pacemaker-pygui-devel
Conflicts: pacemaker-pygui-devel
Requires: %{name} = %{version}-%{release}
%description devel
pacemaker-mgmt includes a server/client GUI and a snmp plugin, to help
to manage and monitor pacemaker based HA solution.
Authors:
--------
Yan Gao <ygao(a)novell.com>
%prep
###########################################################
%setup -n pacemaker-mgmt
###########################################################
%build
# TODO: revisit -all
CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
# Feature-dependent CFLAGS:
%if %with_extra_warnings
# CFLAGS="${CFLAGS} -Wshadow -Wfloat-equal -Waggregate-return -Wnested-externs -Wunreachable-code -Wendif-labels -Winline"
CFLAGS="${CFLAGS} -Wfloat-equal -Wendif-labels -Winline"
%endif
%if %with_debugging
CFLAGS="${CFLAGS} -O0"
%endif
# Distribution specific settings:
%if 0%{?suse_version} > 1001
CFLAGS="${CFLAGS} -fstack-protector-all"
%endif
%if 0%{?suse_version} < 1001
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/gnome/%{_lib}/pkgconfig:/opt/gnome/share/pkgconfig"
%endif
%if 0%{?suse_version} > 1020
CFLAGS="$CFLAGS -fgnu89-inline"
%endif
%if 0%{?fedora_version} > 6
CFLAGS="$CFLAGS -fgnu89-inline"
%endif
export CFLAGS
./ConfigureMe configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} \
--localstatedir=%{_var} --infodir=%{_infodir} \
--mandir=%{_mandir} --libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--with-ais-prefix=%{_prefix} \
%if %without_fatal_warnings
--enable-fatal-warnings=no \
%endif
%if %enable_snmp_subagent
--enable-snmp-subagent \
--with-mibsdir=%{_datadir}/snmp/mibs \
%endif
--with-hapkgversion=%{version}
%if %enable_snmp_subagent
%if %with_heartbeat_support
pushd snmp_subagent
ln -sf /usr/lib/libclm.so.1.0.0 libclm.so
ln -sf /usr/lib/libccmclient.so.1.0.0 libccmclient.so
ln -sf /usr/lib/libhbclient.so.1.0.0 libhbclient.so
popd
%endif
%endif
export MAKE="make %{?jobs:-j%jobs}"
make %{?jobs:-j%jobs}
###########################################################
%install
###########################################################
#make DESTDIR=$RPM_BUILD_ROOT install-strip
make DESTDIR=$RPM_BUILD_ROOT install
#install -m 755 %{SOURCE1} $RPM_BUILD_ROOT/usr/share/heartbeat-gui
#install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/usr/share/heartbeat-gui
#pushd $RPM_BUILD_ROOT/usr/bin
#ln -sf ../share/heartbeat-gui/pacemaker_starter.py pacemaker_starter
#popd
%find_lang haclient
%if 0%{?suse_version}
%suse_update_desktop_file crm_gui
%endif
# Cleanup
[ -d $RPM_BUILD_ROOT/usr/man ] && rm -rf $RPM_BUILD_ROOT/usr/man
[ -d $RPM_BUILD_ROOT/usr/share/libtool ] && rm -rf $RPM_BUILD_ROOT/usr/share/libtool
find $RPM_BUILD_ROOT -name '*.a' -type f -print0 | xargs -0 rm -f
find $RPM_BUILD_ROOT -name '*.la' -type f -print0 | xargs -0 rm -f
find $RPM_BUILD_ROOT -name '*.pyc' -type f -print0 | xargs -0 rm -f
find $RPM_BUILD_ROOT -name '*.pyo' -type f -print0 | xargs -0 rm -f
###########################################################
%clean
###########################################################
if
[ -n "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != "/" ]
then
rm -rf $RPM_BUILD_ROOT
fi
rm -rf $RPM_BUILD_DIR/pacemaker-mgmt
###########################################################
#%pre
#%preun
# Use the following if more commands need to be executed
# %post
# /sbin/ldconfig
# [...]
# http://en.opensuse.org/SUSE_Package_Conventions/RPM_Macros
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
###########################################################
%defattr(-,root,root)
%config %{_sysconfdir}/pam.d/hbmgmtd
#%{_bindir}/pacemaker_starter
%{_libdir}/heartbeat/mgmtd
%{_libdir}/heartbeat/mgmtdtest
%{_libdir}/libhbmgmt.so.*
%{_libdir}/libhbmgmtclient.so.*
%{_libdir}/libhbmgmtcommon.so.*
%{_libdir}/libhbmgmttls.so.*
#%{_datadir}/heartbeat-gui/*.glade
#%dir %{_docdir}/pacemaker-mgmt
#%doc %{_docdir}/pacemaker-mgmt/*
%dir %{_datadir}/doc/packages/pacemaker-mgmt
%doc %{_datadir}/doc/packages/pacemaker-mgmt/*
%if %enable_snmp_subagent
%{_libdir}/heartbeat/hbagent
%{_libdir}/heartbeat/SNMPAgentSanityCheck
%{_datadir}/snmp/mibs/LINUX-HA-MIB.txt
%endif
%files client -f haclient.lang
%defattr(-,root,root)
%{_bindir}/crm_gui
%{_bindir}/hb_gui
%dir %{_libdir}/heartbeat-gui
%{_libdir}/heartbeat-gui/haclient.py
%{_libdir}/heartbeat-gui/pymgmt.py
%{_libdir}/heartbeat-gui/_pymgmt.so*
%dir %{_datadir}/heartbeat-gui
%{_datadir}/heartbeat-gui/*.py
%{_datadir}/heartbeat-gui/*.png
%{_datadir}/applications/*.desktop
#%lang(zh_CN) %{_datadir}/locale/zh_CN/LC_MESSAGES/haclient.mo
%files devel
%defattr(-,root,root)
%dir %{_includedir}/heartbeat/mgmt
%{_includedir}/heartbeat/mgmt/mgmt.h
%{_includedir}/heartbeat/mgmt/mgmt_client.h
%{_includedir}/heartbeat/mgmt/mgmt_common.h
%{_includedir}/heartbeat/mgmt/mgmt_tls.h
%{_includedir}/heartbeat/mgmt_config.h
%{_libdir}/*.so
%changelog
++++++ pacemaker_starter.py ++++++
++++ 685 lines (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package pacemaker for openSUSE:Factory
checked in at Wed Jun 30 10:46:23 CEST 2010.
--------
--- pacemaker/pacemaker.changes 2009-07-30 10:59:00.000000000 +0200
+++ /mounts/work_src_done/STABLE/pacemaker/pacemaker.changes 2010-06-25 04:16:22.000000000 +0200
@@ -2 +2 @@
-Thu Jul 30 10:58:43 CEST 2009 - aj(a)suse.de
+Mon Jun 14 14:25:25 UTC 2010 - lmb(a)novell.com
@@ -4 +4,32 @@
-- Fix %exclude usage.
+- Shell: templates: clvm,ocfs2: add the fs/vg resource to the base
+ group, add timeouts (bnc#605580)
+- Shell: skip resource checks for property-like elements (lf#2420)
+- Shell: on no id match the first of property-like elements (lf#2420)
+- Shell: set proper ids for rsc/op_defaults (lf#2420)
+- Shell: add exit codes for non-interactive use
+- PE: No services should be stopped until probes finish (lf#2433)
+- PE: Support clones in resource sets (bnc#586613, lf#2404, lf#2409)
+- Tools: Allow ptest and crm_simulate to work with configs that lack a
+ status section
+- Core: Reduce logging for failed xpath searches
+- PE: Support colocation sets with negative scores (lf#2435)
+- PE: Ensure deallocated resources are stopped
+- PE: Ordering dependencies on partially active groups not observed
+ properly (lf#2422)
+- PE: If there are no compatible peers when interleaving clones, ensure
+ the instance is stopped
+- PE: Fix colocation for interleaved clones
+- PE: Fix colocation with partially active groups
+- PE: Don't overwrite existing meta attributes (like timeout) for notify
+ operations (lf#2424)
+- PE: stop-all-resources shouldn't apply to stonith resources (lf#2426)
+- Fencing: Reduce stonith-ng logging (lf#2431)
+- ais: Improved processing when the peer crmd processes join/leave
+ (lf#2401)
+- Tools: crm_resource - Report crmd connection errors
+- Tools: Drop the 'pingd' daemon and resource agent in favor of
+ ocf:pacemaker:ping (WIP WIP WIP FIXME FIXME FIXME This is dangerous to
+ release as it stands now!)
+- cib: Fix the application of unversioned diffs
+- Several valgrind + coverity issues fixed.
+- Upstream version cs: 8b9ec9ccc506
@@ -7 +38 @@
-Sun Jul 12 14:33:00 CEST 2009 - coolo(a)novell.com
+Tue Jun 8 02:43:35 UTC 2010 - tserong(a)novell.com
@@ -9 +40,2 @@
-- fix build in disabling as-needed
+- Install crm shell and cts in $(pyexecdir) instead of $(pythondir)
+ to ensure installation in /usr/lib64 on x86_64
@@ -12 +44,701 @@
-Mon Mar 16 07:16:29 CET 2009 - abeekhof(a)suse.de
+Tue May 18 06:30:42 UTC 2010 - tserong(a)novell.com
+
+- Fix crm membership check (bnc#603685, reverts changesets
+ 6e6980376f01 and 2e096a41a5f9)
+- Upstream version cs: e8717a29601a (1.1.2.1)
+
+-------------------------------------------------------------------
+Fri May 14 13:08:29 UTC 2010 - lmb(a)novell.com
+
+- ais: fix list of active processes sent to clients (bnc#603685)
+- Upstream version cs: 2e096a41a5f9
+
+-------------------------------------------------------------------
+Wed May 12 13:57:23 UTC 2010 - lmb(a)novell.com
+
+- crmd: Prevent use-after-free of the stonith-ng connection (lf#2414)
+- Core: Prevent use-after-free reported by valgrind when
+ doing xpath based deletions (lf#2414)
+- PE: Fix memory leaks reported by valgrind
+- Core: Fix memory leak in replace_xml_child() reported by valgrind
+- PE: Remove developemnt logging which mistakenly logged at "ERROR"
+ level.
+- Upstream version cs: b59c27dc114a (1.1.2)
+
+-------------------------------------------------------------------
+Mon May 10 13:19:09 UTC 2010 - lmb(a)novell.com
+
+- crmd: Prevent use-after-free of the PE connection after it dies
+ (lf#2414)
+- Shell: support for clone instances in constraints (lf#2169)
+- Upstream version cs: 42a5aa3413f4
+
+-------------------------------------------------------------------
+Mon May 10 09:52:28 UTC 2010 - lmb(a)novell.com
+
+- Shell: new command default-timeouts to set default operation timeouts
+ (bnc#479052)
+- crmd: ais: Use the threadsafe version of getpwnam
+- PE: Enforce mandatory promotion (colocation) constraints (lf#2403)
+- PE: Don't complain about missing agents during probes of a-symetric
+ clusters (lf#2410)
+- Shell: don't error on missing resource agent with asymmetrical
+ clusters (lf#2410)
+- ais: Ensure the list of active processes sent to clients is always
+ up-to-date
+- PE: Allow constraints to apply to specific instances of clones
+ (lf#2169)
+- PE: Allow ordering constraints to apply to specific instances of
+ clones
+- PE: Clean up failcount after it expires (lf#2066)
+- PE: Before starting utilization-using resources on a node, take off
+ the load which will no longer run there (bnc#594782)
+- PE: Don't be so quick to pull the trigger on nodes that are coming up
+- crmd: Use global fencing notifications to prevent secondary fencing
+ operations of the DC
+- cib: Changes to group order are not detected or broadcast to peers
+ (lf#2352)
+- Core: Only use the named schema if the validation passes
+- Shell: don't verify empty configurations (bnc#602711)
+- crmd: Send erase_status_tag() calls to the local CIB when the DC is
+ fenced, since there is no DC to accept them
+- crmd: Include operation interval in logged action
+- crmd: Arrange for only one node to clean up after a fenced DC node
+- crmd: create the final directory too for resource agents (bnc#603190)
+- Tools: crm_mon: refresh screen on terminal resize (bnc#589811)
+- PE: Correctly locate clone instances by their prefix (lf#2412)
+- ais: Make a better attempt at determining an accurate born-on value
+ from corosync
+- tools: crm_mon - Enable 'connectivity' mode for 'ping' resources too
+- Upstream version cs: e8624c181a3f
+
+-------------------------------------------------------------------
+Tue Apr 27 08:54:11 UTC 2010 - lmb(a)novell.com
+
+- Fix small error so that regression test suite passes.
+
+-------------------------------------------------------------------
+Tue Apr 27 03:07:40 UTC 2010 - ygao(a)novell.com
+
+- PE: Before starting utilization-using resources on a node, take off
+ the load which will no longer run there (bnc#594782)
+
+-------------------------------------------------------------------
+Mon Apr 26 10:03:44 UTC 2010 - lmb(a)novell.com
+
+- PE: Don't create scaffolding for ordering sets with a single resources
+ (bnc#586613)
+- PE: Ignore colocation weights from clone instances
+- PE: Print allocation scores as +/-INFINITY when appropriate
+- Upstream version cs: fa1c810f1d1d
+
+-------------------------------------------------------------------
+Fri Apr 23 10:09:51 UTC 2010 - lmb(a)novell.com
+
+- Fix regression test for build environment.
+- Upstream version cs: c11e18619efd
+
+-------------------------------------------------------------------
+Wed Apr 21 13:25:26 UTC 2010 - lmb(a)novell.com
+
+- Fix several memory leaks exposed by valgrind.
+- Improve regression tests.
+- Low: Fencing: Delay system initialization until after we handle
+ possible metadata queries
+- Tools: Do not print help on executing "crm_node -i"
+- crm_simulate: Allow bringing new node online (bnc#591162)
+- crmd: Improved detection of partially active peers (lf#2401)
+- PE: Fix intra-set colocation and ordering (lf#2384)
+- PE: Combine failcounts for all instances of an anonymous clone on a
+ host (lf#2383)
+- crmd: Add missing fields to the metadata for use by the shell
+ (lf#2387)
+- PE: Check for use-of-NULL in dump_node_scores()
+- PE: Rewrite native_merge_weights() to avoid Fix use-after-free
+- Upstream version cs: 2a90abe96048
+
+-------------------------------------------------------------------
+Mon Apr 12 11:09:09 UTC 2010 - lmb(a)novell.com
+
+- Automated test case improvements.
+- Upstream version cs: 536bf0b9d3ba
+
+-------------------------------------------------------------------
+Fri Apr 9 08:38:55 UTC 2010 - lmb(a)novell.com
+
+- Shell: always reload status if working with the cluster (bnc#590035)
+- Shell: add new regression tests
+- Shell: don't allow empty attributes for properties/*_defaults
+ (lf#2395)
+- Shell: add another attribute not present in the crmd metadata
+- Tools: crm_mon - Enable specification of community for SNMP traps
+- PE: Ensure important options (notify, unique, etc) are always exposed
+ during resource operations (lf#2391)
+- Tools: Support short form of crm_simulate --quorum (bnc#591168)
+- ais: Convert endian for all of the integer fields in messages
+ (bnc#472014)
+- Upstream version cs: 80e0bb600e6c
+
+-------------------------------------------------------------------
+Wed Mar 31 19:18:35 UTC 2010 - lmb(a)novell.com
+
+- Shell: Default to using the status section from the live CIB
+ (bnc#592762)
+- Upstream version cs: 739282ba9e2e
+
+-------------------------------------------------------------------
+Wed Mar 31 13:03:43 UTC 2010 - lmb(a)novell.com
+
+- crmd: fix non-fatal assert in lrmd.c when resources are manually
+ failed (bnc#590924)
+- Upstream version cs: f77530201221
+
++++ 561 more lines (skipped)
++++ between pacemaker/pacemaker.changes
++++ and /mounts/work_src_done/STABLE/pacemaker/pacemaker.changes
calling whatdependson for head-i586
Old:
----
pacemaker.tar.gz
New:
----
pacemaker-cts-startcmd.patch
pacemaker-pyexecdir.patch
pacemaker.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pacemaker.spec ++++++
--- /var/tmp/diff_new_pack.NXRtdm/_old 2010-06-30 10:46:03.000000000 +0200
+++ /var/tmp/diff_new_pack.NXRtdm/_new 2010-06-30 10:46:03.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package pacemaker (Version 1.0.1)
+# spec file for package pacemaker (Version 1.1.2.1)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 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
@@ -17,14 +17,15 @@
# norootforbuild
+%global pcmk_docdir %{_docdir}/%{name}
%if 0%{?suse_version}
%define _libexecdir %{_libdir}
%endif
%define with_extra_warnings 0
%define with_debugging 0
-%define without_fatal_warnings 1
%define with_ais_support 1
%define with_heartbeat_support 0
+%define with_regression_tests 0
%define gname haclient
%define uname hacluster
%define doc_pkg heartbeat-doc-1.0
@@ -36,23 +37,29 @@
Name: pacemaker
Summary: The Pacemaker scalable High-Availability cluster resource manager
-Version: 1.0.1
-Release: 19
-License: GPL v2 or later ; LGPL v2.1 or later
+Version: 1.1.2.1
+Release: 1
+License: GPLv2+ ; LGPLv2.1+
Url: http://www.clusterlabs.org
Group: Productivity/Clustering/HA
-Source: pacemaker.tar.gz
+Source: pacemaker.tar.bz2
Source2: %{doc_pkg}.tar.gz
Source100: pacemaker.rpmlintrc
+Patch1: pacemaker-cts-startcmd.patch
+Patch2: pacemaker-pyexecdir.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
-Conflicts: heartbeat < 2.99
-PreReq: heartbeat-common
-Requires: libpacemaker3 = %{version}-%{release}
-BuildRequires: e2fsprogs-devel glib2-devel gnutls-devel libesmtp-devel libheartbeat-devel libxml2-devel libxslt-devel ncurses-devel net-snmp-devel pam-devel pkgconfig python-devel swig
+Conflicts: heartbeat < 3.0
+PreReq: cluster-glue
+Requires: resource-agents openais python python-xml
+Requires: libpacemaker3 = %{version}-%{release} python-curses
+BuildRequires: e2fsprogs-devel glib2-devel gnutls-devel libesmtp-devel libglue-devel libxml2-devel libxslt-devel ncurses-devel net-snmp-devel pam-devel pkgconfig python-devel resource-agents swig
+%if %with_regression_tests
+BuildRequires: openais procps python python-curses python-xml vim-base
+%endif
%if %with_ais_support
-BuildRequires: libopenais-devel
-Requires: openais
+BuildRequires: libcorosync-devel
+Requires: corosync
%endif
%if %with_heartbeat_support
BuildRequires: heartbeat-devel
@@ -61,7 +68,7 @@
%if 0%{?suse_version}
BuildRequires: libbz2-devel
Suggests: graphviz
-Recommends: libdlm heartbeat-resources
+Recommends: libdlm resource-agents
%if 0%{?suse_version} > 1100
BuildRequires: docbook-xsl-stylesheets
%endif
@@ -91,7 +98,7 @@
Andrew Beekhof <abeekhof(a)suse.de>
%package -n libpacemaker3
-License: GPL v2 or later ; LGPL v2.1 or later
+License: GPLv2+ ; LGPLv2.1+
Summary: The Pacemaker scalable High-Availability cluster resource manager
Group: Productivity/Clustering/HA
@@ -113,12 +120,18 @@
Andrew Beekhof <abeekhof(a)suse.de>
%package -n libpacemaker-devel
-License: GPL v2 only ; GPL v2 or later ; LGPL v2.1 or later
+License: GPLv2 ; GPLv2+ ; LGPLv2.1+
Summary: The Pacemaker scalable High-Availability cluster resource manager
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}-%{release}
Requires: libpacemaker3 = %{version}-%{release}
-Requires: libheartbeat-devel
+Requires: libglue-devel
+%if %with_regression_tests
+# For the regression tests, we can run them only if all pacemaker
+# packages are installed, so we pull that in here for the regression
+# builds; this is supposed to be disabled for shipping code.
+Requires: pacemaker
+%endif
%description -n libpacemaker-devel
Pacemaker is an advanced, scalable High-Availability cluster resource
@@ -140,48 +153,25 @@
%prep
###########################################################
%setup -a 2 -n pacemaker -q
+%patch1 -p1
+%patch2 -p1
###########################################################
%build
-# fix build in disabling as-needed
export SUSE_ASNEEDED=0
-# TODO: revisit -all
+
CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
-# Feature-dependent CFLAGS:
-%if %with_extra_warnings
-# CFLAGS="${CFLAGS} -Wshadow -Wfloat-equal -Waggregate-return -Wnested-externs -Wunreachable-code -Wendif-labels -Winline"
-CFLAGS="${CFLAGS} -Wfloat-equal -Wendif-labels -Winline"
-%endif
-%if %with_debugging
-CFLAGS="${CFLAGS} -O0"
-%endif
-# Distribution specific settings:
-%if 0%{?suse_version} > 1001
-CFLAGS="${CFLAGS} -fstack-protector-all"
-%endif
-%if 0%{?suse_version} < 1001
-export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/gnome/%{_lib}/pkgconfig:/opt/gnome/share/pkgconfig"
-%endif
-%if 0%{?suse_version} > 1020
-CFLAGS="$CFLAGS -fgnu89-inline"
-%endif
-%if 0%{?fedora_version} > 6
-CFLAGS="$CFLAGS -fgnu89-inline"
-%endif
export CFLAGS
-./ConfigureMe configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} \
- --localstatedir=%{_var} --infodir=%{_infodir} \
- --mandir=%{_mandir} --libdir=%{_libdir} \
- --libexecdir=%{_libexecdir} \
- --with-ais-prefix=%{_prefix} \
-%if %without_fatal_warnings
+./autogen.sh
+%configure --localstatedir=%{_var} \
+ --docdir=%{pcmk_docdir} \
--enable-fatal-warnings=no
-%endif
-export MAKE="make %{?jobs:-j%jobs}"
-make %{?jobs:-j%jobs}
+make %{_smp_mflags}
+
if [ -e /usr/share/xml/docbook/stylesheet/nwalsh/current ]; then
make -C %{doc_pkg} man
fi
+
###########################################################
%install
@@ -196,13 +186,10 @@
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/heartbeat/crm_primitive.py
chmod a+x $RPM_BUILD_ROOT/%{_libdir}/heartbeat/hb2openais-helper.py
rm $RPM_BUILD_ROOT/%{_libdir}/service_crm.so
-(
- cd $RPM_BUILD_ROOT/%{_sbindir}
- rm crm_standby crm_master crm_failcount
- ln crm_attribute crm_standby
- ln crm_attribute crm_master
- ln crm_attribute crm_failcount
-)
+
+# Don't want to ship this just yet:
+rm $RPM_BUILD_ROOT/usr/sbin/crm_report
+
#%if %with_ais_support
# mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/lcrso
# cp $RPM_BUILD_ROOT/%{_libdir}/service_crm.so $RPM_BUILD_ROOT/%{_libexecdir}/lcrso/pacemaker.lcrso
@@ -214,7 +201,6 @@
find $RPM_BUILD_ROOT -name '*.la' -type f -print0 | xargs -0 rm -f
find $RPM_BUILD_ROOT -name '*.pyc' -type f -print0 | xargs -0 rm -f
find $RPM_BUILD_ROOT -name '*.pyo' -type f -print0 | xargs -0 rm -f
-rm -f $RPM_BUILD_ROOT%{_sbindir}/crm_uuid
###########################################################
%clean
@@ -231,12 +217,31 @@
%postun -n libpacemaker3 -p /sbin/ldconfig
+%if %with_regression_tests
+
+%post -n libpacemaker-devel
+if [ ! -e /tmp/.pcmk_regression_tests_ran ]; then
+ touch /tmp/.pcmk_regression_tests_ran
+ # Needed so that the shell doesn't get stuck on escape
+ # sequences
+ export TERM=dumb
+ /usr/share/pacemaker/tests/cli/regression.sh || true
+ /usr/share/pacemaker/tests/pengine/regression.sh -V || true
+ echo Now running shell regression tests ; date
+ if ! /usr/share/pacemaker/tests/shell/regression.sh ; then
+ echo "Shell tests failed."
+ cat crmtestout/regression.out
+ fi
+fi
+%endif
+
%files
###########################################################
%defattr(-,root,root)
%dir %{_libdir}/heartbeat
%dir %{_var}/lib/heartbeat
-%dir %{_datadir}/doc/packages/pacemaker
+%dir %{pcmk_docdir}
+%exclude %{_datadir}/pacemaker/tests
%{_datadir}/pacemaker
%{_libdir}/heartbeat/*
%{_sbindir}/cibadmin
@@ -256,22 +261,37 @@
%{_sbindir}/crm_shadow
%{_sbindir}/cibpipe
%{_sbindir}/crm_node
-%doc %{_datadir}/doc/packages/pacemaker/AUTHORS
-%doc %{_datadir}/doc/packages/pacemaker/README
-%doc %{_datadir}/doc/packages/pacemaker/README.hb2openais
-%doc %{_datadir}/doc/packages/pacemaker/COPYING
-%doc %{_datadir}/doc/packages/pacemaker/COPYING.LGPL
-%doc %{_datadir}/doc/packages/pacemaker/crm_cli.txt
-%doc %{_mandir}/man8/*.8*
+%{_sbindir}/crm_simulate
+%{_sbindir}/fence_legacy
+%{_sbindir}/stonith_admin
+%{py_sitedir}/crm
+
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/heartbeat/crm
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/pengine
%dir %attr (750, %{uname}, %{gname}) %{_var}/run/crm
%dir /usr/lib/ocf
%dir /usr/lib/ocf/resource.d
/usr/lib/ocf/resource.d/pacemaker
+%{_datadir}/snmp/mibs/PCMK-MIB.txt
%if %with_ais_support
+%dir %{_libexecdir}/lcrso
+%{_libexecdir}/lcrso
%{_libexecdir}/lcrso/pacemaker.lcrso
%endif
+%if !0%{?_without_heartbeat}
+%{_sbindir}/crm_uuid
+%else
+%exclude %{_sbindir}/crm_uuid
+%endif
+%exclude /usr/lib/ocf/resource.d/pacemaker/o2cb
+# Packaged elsewhere
+%exclude %{pcmk_docdir}/AUTHORS
+%exclude %{pcmk_docdir}/COPYING
+%exclude %{pcmk_docdir}/COPYING.LIB
+%doc %{pcmk_docdir}
+# %doc %{pcmk_docdir}/*.html
+%doc %{_mandir}/man8/*.8*
+%doc %{_mandir}/man7/*.7*
%files -n libpacemaker3
%defattr(-,root,root)
@@ -287,8 +307,10 @@
%files -n libpacemaker-devel
%defattr(-,root,root)
#%doc %{_datadir}/doc/%{name}-%{version}
+%{py_sitedir}/cts
+%{_datadir}/pacemaker/tests
%{_includedir}/pacemaker
-%{_includedir}/heartbeat/fencing
+# %{_includedir}/heartbeat/fencing
%{_libdir}/*.so
%changelog
++++++ heartbeat-doc-1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/heartbeat-doc-1.0/.hg_archival.txt new/heartbeat-doc-1.0/.hg_archival.txt
--- old/heartbeat-doc-1.0/.hg_archival.txt 2009-03-03 16:37:01.000000000 +0100
+++ new/heartbeat-doc-1.0/.hg_archival.txt 2009-04-01 18:42:48.000000000 +0200
@@ -1,2 +1,2 @@
repo: 80da5f68a837e46dadedb837058f9cdd8442413b
-node: 74c07f865a8ca80d2a87d66f0a51414c28bfa3f2
+node: 2b0fa67bbd6626bfaa3c0bfcd4b2944baf43c6af
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/heartbeat-doc-1.0/Makefile new/heartbeat-doc-1.0/Makefile
--- old/heartbeat-doc-1.0/Makefile 2009-03-03 16:37:01.000000000 +0100
+++ new/heartbeat-doc-1.0/Makefile 2009-04-01 18:42:48.000000000 +0200
@@ -88,7 +88,7 @@
MAN_FILES = cibadmin.8 crmadmin.8 crm_attribute.8 crm_diff.8 \
crm_failcount.8 crm_master.8 crm_mon.8 \
crm_resource.8 crm_standby.8 crm_uuid.8 \
- crm_verify.8 pengine.7 crm.8
+ crm_verify.8 pengine.7 crm.8 crm_shadow.8
man: $(MAN_FILES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/heartbeat-doc-1.0/xml/hb_crm_shadow.xml new/heartbeat-doc-1.0/xml/hb_crm_shadow.xml
--- old/heartbeat-doc-1.0/xml/hb_crm_shadow.xml 1970-01-01 01:00:00.000000000 +0100
+++ new/heartbeat-doc-1.0/xml/hb_crm_shadow.xml 2009-04-01 18:42:48.000000000 +0200
@@ -0,0 +1,1399 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE refentry PUBLIC "-//Novell//DTD NovDoc XML V1.0//EN" "novdocx.dtd"
+[
+ <!ENTITY % NOVDOC.DEACTIVATE.IDREF "INCLUDE">
+ <!ENTITY % entities SYSTEM "entity-decl.ent">
+ %entities;
+]>
+<refentry id="man.crmshadow">
+ <refmeta>
+ <refentrytitle>crm_shadow</refentrytitle>
+ <manvolnum>8</manvolnum>
+ </refmeta>
+ <refnamediv>
+ <refname>crm_shadow</refname><refpurpose>Perform Configuration Changes in a Sandbox Before Updating The Live Cluster</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Synopsis</title>
+<screen><command>crm_shadow</command> [-V] [-p|-e|-q]</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
+ <para>
+ Sets up an environment in which configuration tools
+ (<command>cibadmin</command>, <command>crm_resource</command>, etc) work
+ offline instead of against a live cluster, allowing changes to be
+ previewed and tested for side-effects.
+ </para>
+ </refsect1>
+ <refsect1 id="man.crmshadow.options">
+ <title>Options</title>
+<!--
+
+usage: crm_shadow -[V?bfwc:dr:C:D:ps:E]
+Options
+ ++verbose (-V) turn on debug info. additional instance increase verbosity
+ ++help (-?) this help message
+
+Commands
+ ++-which (-w) Indicate the active shadow copy
+ ++display (-p) Display the contents of the shadow copy
+ ++diff (-d) Display the changes in the shadow copy
+ ++create-empty (-e) name Create the named shadow copy with an empty cluster configuration
+ ++create (-c) name Create the named shadow copy of the active cluster configuration
+ ++reset (-r) name Recreate the named shadow copy from the active cluster configuration
+ ++commit (-C) name Upload the contents of the named shadow copy to the cluster
+ ++delete (-D) name Delete the contents of the named shadow copy
+ ++edit (-E) name Edit the contents of the named shadow copy with your favorite $EDITOR
+
+Advanced Options
+ ++batch (-b) Don't spawn a new shell
+ ++force (-f) Force the action to be performed
+ ++switch (-s) name Switch to the named shadow copy
+
+ -->
+ <variablelist>
+ <varlistentry>
+ <term><option>--verbose</option>, <option>-V</option>
+ </term>
+ <listitem>
+ <para>
+ turn on debug info. additional instance increase verbosity
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--which</option>, <option>-w</option>
+ </term>
+ <listitem>
+ <para>
+ indicate the active shadow copy
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--display</option>, <option>-p</option>
+ </term>
+ <listitem>
+ <para>
+ display the contents of the shadow copy
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--diff</option>, <option>-d</option>
+ </term>
+ <listitem>
+ <para>
+ display the changes in the shadow copy
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--create-empty</option>, <option>-e</option><replaceable>NAME</replaceable>
+ </term>
+ <listitem>
+ <para>
+ create the named shadow copy with an empty cluster configuration
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--create</option>, <option>-c</option><replaceable>NAME</replaceable>
+ </term>
+ <listitem>
+ <para>
+ create the named shadow copy of the active cluster configuration
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--reset</option>, <option>-r</option><replaceable>NAME</replaceable>
+ </term>
+ <listitem>
+ <para>
+ recreate the named shadow copy from the active cluster configuration
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--commit</option>, <option>-c</option><replaceable>NAME</replaceable>
+ </term>
+ <listitem>
+ <para>
+ upload the contents of the named shadow copy to the cluster
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--delete</option>, <option>-d</option><replaceable>NAME</replaceable>
+ </term>
+ <listitem>
+ <para>
+ delete the contents of the named shadow copy
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--edit</option>, <option>-e</option><replaceable>NAME</replaceable>
+ </term>
+ <listitem>
+ <para>
+ Edit the contents of the named shadow copy with your favorite editor
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--batch</option>, <option>-b</option>
+ </term>
+ <listitem>
+ <para>
+ do not spawn a new shell
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--force</option>, <option>-f</option>
+ </term>
+ <listitem>
+ <para>
+ do not spawn a new shell
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>--switch</option>, <option>-s</option>
+ </term>
+ <listitem>
+ <para>
+ switch to the named shadow copy
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1 id="man.crmshadow.internals">
+ <title>Internal Commands</title>
+<!--
+A star (*) next to a name means that the command is disabled.
+
+ JOB_SPEC [&] (( expression ))
+ . filename [arguments] :
+ [ arg... ] [[ expression ]]
+ alias [-p] [name[=value] ... ] bg [job_spec ...]
+ bind [-lpvsPVS] [-m keymap] [-f fi break [n]
+ builtin [shell-builtin [arg ...]] caller [EXPR]
+ case WORD in [PATTERN [| PATTERN]. cd [-L|-P] [dir]
+ command [-pVv] command [arg ...] compgen [-abcdefgjksuv] [-o option
+ complete [-abcdefgjksuv] [-pr] [-o continue [n]
+ declare [-afFirtx] [-p] [name[=val dirs [-clpv] [+N] [-N]
+ disown [-h] [-ar] [jobspec ...] echo [-neE] [arg ...]
+ enable [-pnds] [-a] [-f filename] eval [arg ...]
+ exec [-cl] [-a name] file [redirec exit [n]
+ export [-nf] [name[=value] ...] or false
+ fc [-e ename] [-nlr] [first] [last fg [job_spec]
+ for NAME [in WORDS ... ;] do COMMA for (( exp1; exp2; exp3 )); do COM
+ function NAME { COMMANDS ; } or NA getopts optstring name [arg]
+ hash [-lr] [-p pathname] [-dt] [na help [-s] [pattern ...]
+ history [-c] [-d offset] [n] or hi if COMMANDS; then COMMANDS; [ elif
+ jobs [-lnprs] [jobspec ...] or job kill [-s sigspec | -n signum | -si
+ let arg [arg ...] local name[=value] ...
+ logout popd [+N | -N] [-n]
+ printf [-v var] format [arguments] pushd [dir | +N | -N] [-n]
+ pwd [-LP] read [-ers] [-u fd] [-t timeout] [
+ readonly [-af] [name[=value] ...] return [n]
+ select NAME [in WORDS ... ;] do CO set [++abefhkmnptuvxBCHP] [-o opti
+ shift [n] shopt [-pqsu] [-o long-option] opt
+ source filename [arguments] suspend [-f]
+ test [expr] time [-p] PIPELINE
+ times trap [-lp] [arg signal_spec ...]
+ true type [-afptP] name [name ...]
+ typeset [-afFirtx] [-p] name[=valu ulimit [-SHacdfilmnpqstuvx] [limit
+ umask [-p] [-S] [mode] unalias [-a] name [name ...]
+ unset [-f] [-v] [name ...] until COMMANDS; do COMMANDS; done
+ variables - Some variable names an wait [n]
+ while COMMANDS; do COMMANDS; done { COMMANDS ; }
+ -->
+ <para>
+ To work with a shadow configuration, you need to create one first:
+ </para>
+<screen>crm_shadow --create-empty <replaceable>YOUR_NAME</replaceable></screen>
+ <para>
+ It gives you an internal shell like the one from the
+ <command>crm</command> tool. Use <command>help</command> to get an
+ overview of all internal commands, or <command>help</command>
+ <replaceable>subcommand</replaceable> for a specific command.
+ </para>
+ <table id="tab.crmshadow.internal">
+ <title>Overview of Internal Commands</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Command
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Syntax/Description
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <command>alias</command>
+ </para>
+ </entry>
+ <entry>
+<screen>alias [-p] [name[=value] ... ]</screen>
+ <para>
+ <command>alias</command> with no arguments or with the -p option
+ prints the list of aliases in the form alias
+ <literal>NAME=VALUE</literal> on standard output. Otherwise, an
+ alias is defined for each NAME whose VALUE is given. A trailing
+ space in VALUE causes the next word to be checked for alias
+ substitution when the alias is expanded. Alias returns true unless a
+ NAME is given for which no alias has been defined.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>bg</command>
+ </para>
+ </entry>
+ <entry>
+<screen>bg [JOB_SPEC ...]</screen>
+ <para>
+ Place each JOB_SPEC in the background, as if it had been started
+ with &. If JOB_SPEC is not present, the shell's notion of the
+ current job is used.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>bind</command>
+ </para>
+ </entry>
+ <entry>
+<screen>bind [-lpvsPVS] [-m keymap] [-f filename]
+ [-q name] [-u name] [-r keyseq]
+ [-x keyseq:shell-command]
+ [keyseq:readline-function or readline-command]</screen>
+ <para>
+ Bind a key sequence to a Readline function or a macro, or set a
+ Readline variable. The non-option argument syntax is equivalent to
+ that found in <filename>~/.inputrc</filename>, but must be passed as
+ a single argument: bind <literal>"\C-x\C-r":
+ re-read-init-file</literal>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>break</command>
+ </para>
+ </entry>
+ <entry>
+<screen>break [N]</screen>
+ <para>
+ Exit from within a <literal>for</literal>, <literal>while</literal>
+ or <literal>until</literal> loop. If N is specified, break N levels.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>builtin</command>
+ </para>
+ </entry>
+ <entry>
+<screen>builtin [shell-builtin [arg ...]]</screen>
+ <para>
+ Run a shell builtin. This is useful when you wish to rename a shell
+ builtin to be a function, but need the functionality of the builtin
+ within the function itself.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>caller</command>
+ </para>
+ </entry>
+ <entry>
+<screen>caller [EXPR]</screen>
+ <para>
+ Returns the context of the current subroutine call. Without
+ <replaceable>EXPR</replaceable>, returns
+ <literal
+ >$line $filename</literal>. With
+ <replaceable>EXPR</replaceable>, returns <literal>$line $subroutine
+ $filename</literal>; this extra information can be used to provide a
+ stack trace.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>case</command>
+ </para>
+ </entry>
+ <entry>
+<screen>case WORD in [PATTERN [| PATTERN] [COMMANDS;;] ... esac</screen>
+ <para>
+ Selectively execute <replaceable>COMMANDS</replaceable> based upon
+ <replaceable>WORD</replaceable> matching
+ <replaceable>PATTERN</replaceable>. The `|' is used to separate
+ multiple patterns.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>cd</command>
+ </para>
+ </entry>
+ <entry>
+<screen>cd [-L|-P] [dir]</screen>
+ <para>
+ Change the current directory to DIR.
+<!--The variable
+ <envar>$HOME</envar> is the default DIR. The variable
+ <envar>CDPATH</envar> defines the search path for the
+ directory containing DIR. Alternative directory names in
+ CDPATH are separated by a colon (:). A null directory
+ name is the same as the current directory, i.e. `.'. If
+ DIR begins with a slash (/), then CDPATH is not used. If
+ the directory is not found, and the shell option
+ `cdable_vars' is set, then try the word as a variable
+ name. If that variable has a value, then cd to the value
+ of that variable. The -P option says to use the physical
+ directory structure instead of following symbolic links;
+ the -L option forces symbolic links to be
+ followed.-->
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>command</command>
+ </para>
+ </entry>
+ <entry>
+<screen>command [-pVv]
+command [arg ...]</screen>
+ <para>
+ Runs <replaceable>COMMAND</replaceable> with
+ <replaceable>ARGS</replaceable> ignoring shell functions. If you
+ have a shell function called `ls', and you wish to call the command
+ `ls', you can say "command ls". If the -p option is given, a default
+ value is used for PATH that is guaranteed to find all of the
+ standard utilities. If the -V or -v option is given, a string is
+ printed describing COMMAND. The -V option produces a more verbose
+ description.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>compgen</command>
+ </para>
+ </entry>
+ <entry>
+<screen>compgen [-abcdefgjksuv] [-o option] [-A action]
+ [-G globpat] [-W wordlist] [-P prefix]
+ [-S suffix] [-X filterpat] [-F function]
+ [-C command] [WORD]</screen>
+ <para>
+ Display the possible completions depending on the options. Intended
+ to be used from within a shell function generating possible
+ completions. If the optional <replaceable>WORD</replaceable>
+ argument is supplied, matches against
+ <replaceable>WORD</replaceable> are generated.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>complete</command>
+ </para>
+ </entry>
+ <entry>
+<screen>complete [-abcdefgjksuv] [-pr] [-o option]
+ [-A action] [-G globpat] [-W wordlist] [-P prefix]
+ [-S suffix] [-X filterpat] [-F function] [-C command]
+ [name ...]</screen>
+ <para>
+ For each <replaceable>NAME</replaceable>, specify how arguments are
+ to be completed. If the <option>-p</option> option is supplied, or
+ if no options are supplied, existing completion specifications are
+ printed in a way that allows them to be reused as input. The
+ <option>-r</option> option removes a completion specification for
+ each <replaceable>NAME</replaceable>, or, if no
+ <replaceable>NAME</replaceable>s are supplied, all completion
+ specifications.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>continue</command>
+ </para>
+ </entry>
+ <entry>
+<screen>continue [N]</screen>
+ <para>
+ Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop.
+ If <replaceable>N</replaceable> is specified, resume at the
+ <replaceable>N</replaceable>-th enclosing loop.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>declare</command>
+ </para>
+ </entry>
+ <entry>
+<screen>declare [-afFirtx] [-p] [name[=value] ...]</screen>
+ <para>
+ Declare variables and/or give them attributes. If no
+ <replaceable>NAME</replaceable>s are given, then display the values
+ of variables instead. The <option>-p</option> option will display
+ the attributes and values of each <replaceable>NAME</replaceable>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>dirs</command>
+ </para>
+ </entry>
+ <entry>
+<screen>dirs [-clpv] [+N] [-N]</screen>
+ <para>
+ Display the list of currently remembered directories. Directories
+ find their way onto the list with the <command>pushd</command>
+ command; you can get back up through the list with the
+ <command>popd</command> command.
+ </para>
+ <para></para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>disown</command>
+ </para>
+ </entry>
+ <entry>
+<screen>disown [-h] [-ar] [JOBSPEC ...]</screen>
+ <para>
+ By default, removes each <replaceable>JOBSPEC</replaceable> argument
+ from the table of active jobs. If the <option>-h</option> option is
+ given, the job is not removed from the table, but is marked so that
+ SIGHUP is not sent to the job if the shell receives a SIGHUP. The
+ <option>-a</option> option, when <replaceable>JOBSPEC</replaceable>
+ is not supplied, means to remove all jobs from the job table; the
+ <option>-r</option> option means to remove only running jobs.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>echo</command>
+ </para>
+ </entry>
+ <entry>
+<screen>echo [-neE] [arg ...]</screen>
+ <para>
+ Output the ARGs. If -n is specified, the trailing newline is
+ suppressed. If the -e option is given, interpretation of the
+ following backslash-escaped characters is turned on:
+ </para>
+ <simplelist>
+ <member><literal>\a</literal> (alert, bell)</member>
+ <member><literal>\b</literal> (backspace)</member>
+ <member><literal>\c</literal> (suppress trailing newline)</member>
+ <member><literal>\E</literal> (escape character)</member>
+ <member><literal>\f</literal> (form feed)</member>
+ <member><literal>\n</literal> (new line)</member>
+ <member><literal>\r</literal> (carriage return)</member>
+ <member><literal>\t</literal> (horizontal tab)</member>
+ <member><literal>\v</literal> (vertical tab)</member>
+ <member><literal>\\</literal> (backslash)</member>
+ <member><literal>\0nnn</literal> (the character whose ASCII code is NNN (octal). NNN can be
+ 0 to 3 octal digits)</member>
+ </simplelist>
+ <para>
+ You can explicitly turn off the interpretation of the above
+ characters with the <option>-E</option> option.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>enable</command>
+ </para>
+ </entry>
+ <entry>
+<screen>enable [-pnds] [-a] [-f filename] [name...]</screen>
+ <para>
+ Enable and disable builtin shell commands. This allows you to use a
+ disk command which has the same name as a shell builtin without
+ specifying a full pathname. If <option>-n</option> is used, the
+ <replaceable>NAME</replaceable>s become disabled; otherwise
+ <replaceable>NAME</replaceable>s are enabled. For example, to use
+ the <command>test</command> found in <envar>$PATH</envar> instead of
+ the shell builtin version, type <command>enable</command> <option>-n
+ test</option>. On systems supporting dynamic loading, the
+ <option>-f</option> option may be used to load new builtins from the
+ shared object <replaceable>FILENAME</replaceable>. The
+ <option>-d</option> option will delete a builtin previously loaded
+ with <option>-f</option>. If no non-option names are given, or the
+ <option>-p</option> option is supplied, a list of builtins is
+ printed. The <option>-a</option> option means to print every builtin
+ with an indication of whether or not it is enabled. The
+ <option>-s</option> option restricts the output to the POSIX.2
+ `special' builtins. The <option>-n</option> option displays a list
+ of all disabled builtins.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>eval</command>
+ </para>
+ </entry>
+ <entry>
+<screen>eval [ARG ...]</screen>
+ <para>
+ Read <replaceable>ARG</replaceable>s as input to the shell and
+ execute the resulting command(s).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>exec</command>
+ </para>
+ </entry>
+ <entry>
+<screen>exec [-cl] [-a name] file [redirection ...]</screen>
+ <para>
+ Exec <replaceable>FILE</replaceable>, replacing this shell with the
+ specified program. If <replaceable>FILE</replaceable> is not
+ specified, the redirections take effect in this shell. If the first
+ argument is <option>-l</option>, then place a dash in the zeroth arg
+ passed to <replaceable>FILE</replaceable>, as login does. If the
+ <option>-c</option> option is supplied, FILE is executed with a null
+ environment. The <option>-a</option> option means to make set
+ argv[0] of the executed process to <replaceable>NAME</replaceable>.
+ If the file cannot be executed and the shell is not interactive,
+ then the shell exits, unless the shell option
+ <option>execfail</option> is set.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>exit</command>
+ </para>
+ </entry>
+ <entry>
+<screen>exit [N]</screen>
+ <para>
+ Exit the shell with a status of <replaceable>N</replaceable>. If
+ <replaceable>N</replaceable> is omitted, the exit status is that of
+ the last command executed.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>export</command>
+ </para>
+ </entry>
+ <entry>
+<screen>export [-nf] [NAME[=value] ...]
+export -p</screen>
+ <para>
+ <replaceable>NAME</replaceable>s are marked for automatic export to
+ the environment of subsequently executed commands. If the
+ <option>-f</option> option is given, the
+ <replaceable>NAME</replaceable>s refer to functions. If no
+ <replaceable>NAME</replaceable>s are given, or if
+ <option>-p</option> is given, a list of all names that are exported
+ in this shell is printed. An argument of <option>-n</option> says to
+ remove the export property from subsequent
+ <replaceable>NAME</replaceable>s. An argument of <option>--</option>
+ disables further option processing.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>false</command>
+ </para>
+ </entry>
+ <entry>
+<screen>false</screen>
+ <para>
+ Return an unsuccessful result.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>fc</command>
+ </para>
+ </entry>
+ <entry>
+<screen>fc [-e ename] [-nlr] [FIRST] [LAST]
+fc -s [pat=rep] [cmd]</screen>
+ <para>
+ fc is used to list or edit and re-execute commands from the history
+ list. <replaceable>FIRST</replaceable> and
+ <replaceable>LAST</replaceable> can be numbers specifying the range,
+ or <replaceable>FIRST</replaceable> can be a string, which means the
+ most recent command beginning with that string.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>fg</command>
+ </para>
+ </entry>
+ <entry>
+<screen>fg [JOB_SPEC]</screen>
+ <para>
+ Place <replaceable>JOB_SPEC</replaceable> in the foreground, and
+ make it the current job. If <replaceable>JOB_SPEC</replaceable> is
+ not present, the shell's notion of the current job is used.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>for</command>
+ </para>
+ </entry>
+ <entry>
+<screen>for NAME [in WORDS ... ;] do COMMANDS; done</screen>
+ <para>
+ The <command>for</command> loop executes a sequence of commands for
+ each member in a list of items. If <literal>in WORDS ...;</literal>
+ is not present, then <literal>in "$@"</literal> is assumed. For each
+ element in <replaceable>WORDS</replaceable>,
+ <replaceable>NAME</replaceable> is set to that element, and the
+ <replaceable>COMMANDS</replaceable> are executed.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>function</command>
+ </para>
+ </entry>
+ <entry>
+<screen>function NAME { COMMANDS ; }
+function NAME () { COMMANDS ; }</screen>
+ <para>
+ Create a simple command invoked by <replaceable>NAME</replaceable>
+ which runs <replaceable>COMMANDS</replaceable>. Arguments on the
+ command line along with <replaceable>NAME</replaceable> are passed
+ to the function as <option>$0</option> .. <option>$n</option>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>getopts</command>
+ </para>
+ </entry>
+ <entry>
+<screen>getopts OPTSTRING NAME [arg]</screen>
+ <para>
+ Getopts is used by shell procedures to parse positional parameters.
+ </para>
+ <para></para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>hash</command>
+ </para>
+ </entry>
+ <entry>
+<screen>hash [-lr] [-p PATHNAME] [-dt] [NAME...]</screen>
+ <para>
+ For each <replaceable>NAME</replaceable>, the full pathname of the
+ command is determined and remembered. If the <option>-p</option>
+ option is supplied, <replaceable>PATHNAME</replaceable> is used as
+ the full pathname of <replaceable>NAME</replaceable>, and no path
+ search is performed. The <option>-r</option> option causes the shell
+ to forget all remembered locations. The <option>-d</option> option
+ causes the shell to forget the remembered location of each
+ <replaceable>NAME</replaceable>. If the <option>-t</option> option
+ is supplied the full pathname to which each
+ <replaceable>NAME</replaceable> corresponds is printed. If multiple
+ <replaceable>NAME</replaceable> arguments are supplied with
+ <option>-t</option>, the <replaceable>NAME</replaceable> is printed
+ before the hashed full pathname. The <option>-l</option> option
+ causes output to be displayed in a format that may be reused as
+ input. If no arguments are given, information about remembered
+ commands is displayed.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>history</command>
+ </para>
+ </entry>
+ <entry>
+<screen>history [-c] [-d OFFSET] [n]
+history -ps arg [arg...]
+history -awrm [filename]</screen>
+ <para>
+ Display the history list with line numbers. Lines listed with with a
+ <literal>*</literal> have been modified. Argument of
+ <replaceable>N</replaceable> says to list only the last
+ <replaceable>N</replaceable> lines. The <option>-c</option> option
+ causes the history list to be cleared by deleting all of the
+ entries. The <option>-d</option> option deletes the history entry at
+ offset <replaceable>OFFSET</replaceable>. The <option>-w</option>
+ option writes out the current history to the history file;
+ <option>-r</option> means to read the file and append the contents
+ to the history list instead. <option>-a</option> means to append
+ history lines from this session to the history file. Argument
+ <option>-n</option> means to read all history lines not already read
+ from the history file and append them to the history list.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>jobs</command>
+ </para>
+ </entry>
+ <entry>
+<screen>jobs [-lnprs] [JOBSPEC ...]
+job -x COMMAND [ARGS]</screen>
+ <para>
+ Lists the active jobs. The <option>-l</option> option lists process
+ id's in addition to the normal information; the <option>-p</option>
+ option lists process id's only. If <option>-n</option> is given,
+ only processes that have changed status since the last notification
+ are printed. <replaceable>JOBSPEC</replaceable> restricts output to
+ that job. The <option>-r</option> and <option>-s</option> options
+ restrict output to running and stopped jobs only, respectively.
+ Without options, the status of all active jobs is printed. If
+ <option>-x</option> is given, <replaceable>COMMAND</replaceable> is
+ run after all job specifications that appear in
+ <replaceable>ARGS</replaceable> have been replaced with the process
+ ID of that job's process group leader.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>kill</command>
+ </para>
+ </entry>
+ <entry>
+<screen>kill [-s sigspec | -n signum | -sigspec] pid | JOBSPEC ...
+kill -l [sigspec]</screen>
+ <para>
+ Send the processes named by PID (or
+ <replaceable>JOBSPEC</replaceable>) the signal SIGSPEC. If SIGSPEC
+ is not present, then SIGTERM is assumed. An argument of
+ <option>-l</option> lists the signal names; if arguments follow
+ <option>-l</option> they are assumed to be signal numbers for which
+ names should be listed. Kill is a shell builtin for two reasons: it
+ allows job IDs to be used instead of process IDs, and, if you have
+ reached the limit on processes that you can create, you don't have
+ to start a process to kill another one.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>let</command>
+ </para>
+ </entry>
+ <entry>
+<screen>let ARG [ARG ...]</screen>
+ <para>
+ Each <replaceable>ARG</replaceable> is an arithmetic expression to
+ be evaluated. Evaluation is done in fixed-width integers with no
+ check for overflow, though division by 0 is trapped and flagged as
+ an error. The following list of operators is grouped into levels of
+ equal-precedence operators. The levels are listed in order of
+ decreasing precedence.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>local</command>
+ </para>
+ </entry>
+ <entry>
+<screen>local NAME[=VALUE] ...</screen>
+ <para>
+ Create a local variable called <replaceable>NAME</replaceable>, and
+ give it <replaceable>VALUE</replaceable>. <command>local</command>
+ can only be used within a function; it makes the variable
+ <replaceable>NAME</replaceable> have a visible scope restricted to
+ that function and its children.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>logout</command>
+ </para>
+ </entry>
+ <entry>
+<screen>logout</screen>
+ <para>
+ Logout of a login shell.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>popd</command>
+ </para>
+ </entry>
+ <entry>
+<screen>popd [+N | -N] [-n]</screen>
+ <para>
+ Removes entries from the directory stack. With no arguments, removes
+ the top directory from the stack, and cd's to the new top directory.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>printf</command>
+ </para>
+ </entry>
+ <entry>
+<screen>printf [-v var] format [ARGUMENTS]</screen>
+ <para>
+ printf formats and prints <replaceable>ARGUMENTS</replaceable> under
+ control of the <replaceable>FORMAT</replaceable>.
+ <replaceable>FORMAT</replaceable> is a character string which
+ contains three types of objects: plain characters, which are simply
+ copied to standard output, character escape sequences which are
+ converted and copied to the standard output, and format
+ specifications, each of which causes printing of the next successive
+ argument. In addition to the standard printf(1) formats,
+ <literal>%b</literal> means to expand backslash escape sequences in
+ the corresponding argument, and <literal>%q</literal> means to quote
+ the argument in a way that can be reused as shell input. If the
+ <option>-v</option> option is supplied, the output is placed into
+ the value of the shell variable VAR rather than being sent to the
+ standard output.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>pushd</command>
+ </para>
+ </entry>
+ <entry>
+<screen>pushd [dir | +N | -N] [-n]</screen>
+ <para>
+ Adds a directory to the top of the directory stack, or rotates the
+ stack, making the new top of the stack the current working
+ directory. With no arguments, exchanges the top two directories.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>pwd</command>
+ </para>
+ </entry>
+ <entry>
+<screen>pwd [-LP]</screen>
+ <para>
+ Print the current working directory. With the <option>-P</option>
+ option, <command>pwd</command> prints the physical directory,
+ without any symbolic links; the <option>-L</option> option makes
+ <command>pwd</command> follow symbolic links.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>read</command>
+ </para>
+ </entry>
+ <entry>
+<screen>read [-ers] [-u fd] [-t timeout] [-p prompt] [-a array] [-n nchars] [-d delim] [NAME ...]</screen>
+ <para>
+ The given <replaceable>NAME</replaceable>s are marked readonly and
+ the values of these <replaceable>NAME</replaceable>s may not be
+ changed by subsequent assignment. If the <option>-f</option> option
+ is given, then functions corresponding to the NAMEs are so marked.
+ If no arguments are given, or if <option>-p</option> is given, a
+ list of all readonly names is printed. The <option>-a</option>
+ option means to treat each NAME as an array variable. An argument of
+ <option>--</option> disables further option processing.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>readonly</command>
+ </para>
+ </entry>
+ <entry>
+<screen>readonly [-af] [NAME[=VALUE] ...]
+readonly -p</screen>
+ <para>
+ The given <replaceable>NAME</replaceable>s are marked readonly and
+ the values of these <replaceable>NAME</replaceable>s may not be
+ changed by subsequent assignment. If the <option>-f</option> option
+ is given, then functions corresponding to the
+ <replaceable>NAME</replaceable>s are so marked. If no arguments are
+ given, or if <option>-p</option> is given, a list of all readonly
+ names is printed. The <option>-a</option> option means to treat each
+ <replaceable>NAME</replaceable> as an array variable. An argument of
+ <option>--</option> disables further option processing.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>return</command>
+ </para>
+ </entry>
+ <entry>
+<screen>return [N]</screen>
+ <para>
+ Causes a function to exit with the return value specified by
+ <replaceable>N</replaceable>. If <replaceable>N</replaceable> is
+ omitted, the return status is that of the last command.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>select</command>
+ </para>
+ </entry>
+ <entry>
+<screen>select NAME [in WORDS ... ;] do COMMANDS; done</screen>
+ <para>
+ The <replaceable>WORDS</replaceable> are expanded, generating a list
+ of words. The set of expanded words is printed on the standard
+ error, each preceded by a number. If <literal>in WORDS</literal> is
+ not present, <literal>in "$@"</literal> is assumed. The
+ <envar>PS3</envar> prompt is then displayed and a line read from the
+ standard input. If the line consists of the number corresponding to
+ one of the displayed words, then <replaceable>NAME</replaceable> is
+ set to that word. If the line is empty,
+ <replaceable>WORDS</replaceable> and the prompt are redisplayed. If
+ EOF is read, the command completes. Any other value read causes
+ <replaceable>NAME</replaceable> to be set to null. The line read is
+ saved in the variable <replaceable>REPLY</replaceable>.
+ <replaceable>COMMANDS</replaceable> are executed after each
+ selection until a break command is executed.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>set</command>
+ </para>
+ </entry>
+ <entry>
+<screen>set [--abefhkmnptuvxBCHP] [-o OPTION] [ARG...]</screen>
+ <para>
+ Sets internal shell options.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>shift</command>
+ </para>
+ </entry>
+ <entry>
+<screen>shift [n]</screen>
+ <para>
+ The positional parameters from <literal>$N+1 ...</literal> are
+ renamed to <literal>$1 ...</literal> If <replaceable>N</replaceable>
+ is not given, it is assumed to be 1.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>shopt</command>
+ </para>
+ </entry>
+ <entry>
+<screen>shopt [-pqsu] [-o long-option] OPTNAME [OPTNAME...]</screen>
+ <para>
+ Toggle the values of variables controlling optional behavior. The
+ <option>-s</option> flag means to enable (set) each
+ <replaceable>OPTNAME</replaceable>; the <option>-u</option> flag
+ unsets each <replaceable>OPTNAME</replaceable>. The
+ <option>-q</option> flag suppresses output; the exit status
+ indicates whether each <replaceable>OPTNAME</replaceable> is set or
+ unset. The <option>-o</option> option restricts the
+ <replaceable>OPTNAME</replaceable>s to those defined for use with
+ <literal>set -o</literal>. With no options, or with the
+ <option>-p</option> option, a list of all settable options is
+ displayed, with an indication of whether or not each is set.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>source</command>
+ </para>
+ </entry>
+ <entry>
+<screen>source FILENAME [ARGS]</screen>
+ <para>
+ Read and execute commands from <replaceable>FILENAME</replaceable>
+ and return. The pathnames in <envar>$PATH</envar> are used to find
+ the directory containing <replaceable>FILENAME</replaceable>. If any
+ <replaceable>ARGS</replaceable> are supplied, they become the
+ positional parameters when <replaceable>FILENAME</replaceable> is
+ executed.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>suspend</command>
+ </para>
+ </entry>
+ <entry>
+<screen>suspend [-f]</screen>
+ <para>
+ Suspend the execution of this shell until it receives a SIGCONT
+ signal. The <option>-f</option> if specified says not to complain
+ about this being a login shell if it is; just suspend anyway.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>test</command>
+ </para>
+ </entry>
+ <entry>
+<screen>test [expr]</screen>
+ <para>
+ Exits with a status of 0 (true) or 1 (false) depending on the
+ evaluation of <replaceable>EXPR</replaceable>. Expressions may be
+ unary or binary. Unary expressions are often used to examine the
+ status of a file. There are string operators as well, and numeric
+ comparison operators.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>time</command>
+ </para>
+ </entry>
+ <entry>
+<screen>time [-p] PIPELINE</screen>
+ <para>
+ Execute <replaceable>PIPELINE</replaceable> and print a summary of
+ the real time, user CPU time, and system CPU time spent executing
+ <replaceable>PIPELINE</replaceable> when it terminates. The return
+ status is the return status of PIPELINE. The <option>-p</option>
+ option prints the timing summary in a slightly different format.
+ This uses the value of the TIMEFORMAT variable as the output format.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>times</command>
+ </para>
+ </entry>
+ <entry>
+<screen>times</screen>
+ <para>
+ Print the accumulated user and system times for processes run from
+ the shell.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>trap</command>
+ </para>
+ </entry>
+ <entry>
+<screen>trap [-lp] [ARG SIGNAL_SPEC ...]</screen>
+ <para>
+ The command <replaceable>ARG</replaceable> is to be read and
+ executed when the shell receives signal(s)
+ <replaceable>SIGNAL_SPEC</replaceable>. If
+ <replaceable>ARG</replaceable> is absent (and a single
+ <replaceable>SIGNAL_SPEC</replaceable> is supplied) or
+ <option>-</option>, each specified signal is reset to its original
+ value. If <replaceable>ARG</replaceable> is the null string each
+ <replaceable>SIGNAL_SPEC</replaceable> is ignored by the shell and
+ by the commands it invokes. If a
+ <replaceable>SIGNAL_SPEC</replaceable> is EXIT (0) the command ARG
+ is executed on exit from the shell. If a
+ <replaceable>SIGNAL_SPEC</replaceable> is DEBUG,
+ <replaceable>ARG</replaceable> is executed after every simple
+ command. If the <option>-p</option> option is supplied then the trap
+ commands associated with each <replaceable>SIGNAL_SPEC</replaceable>
+ are displayed. If no arguments are supplied or if only
+ <option>-p</option> is given, trap prints the list of commands
+ associated with each signal. Each
+ <replaceable>SIGNAL_SPEC</replaceable> is either a signal name in
+ <filename>signal.h</filename> or a signal number. Signal names are
+ case insensitive and the SIG prefix is optional. <literal>trap
+ -l</literal> prints a list of signal names and their corresponding
+ numbers. Note that a signal can be sent to the shell with
+ <literal>kill -signal $$</literal>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>true</command>
+ </para>
+ </entry>
+ <entry>
+<screen>true</screen>
+ <para>
+ Return a successful result.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>type</command>
+ </para>
+ </entry>
+ <entry>
+<screen>type [-afptP] NAME [NAME ...]</screen>
+<!--<para>For each <replaceable>NAME</replaceable>, indicate
+ how it would be interpreted if used as a command
+ name.</para>
+ <para>If the <option>-t</option> option is used,
+ <command>type</command> outputs a single word which is
+ one of <literal>alias</literal>,
+ <literal>keyword</literal>,
+ <literal>function</literal>, <literal>file</literal>
+ or nothing, if <replaceable>NAME</replaceable> is an
+ alias, shell reserved word, shell function, shell
+ builtin, disk file, or unfound, respectively. </para>-->
+ <para>
+ Obsolete, see <command>declare</command>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>typeset</command>
+ </para>
+ </entry>
+ <entry>
+<screen>typeset [-afFirtx] [-p] name[=value]</screen>
+ <para>
+ Obsolete, see <command>declare</command>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>ulimit</command>
+ </para>
+ </entry>
+ <entry>
+<screen>ulimit [-SHacdfilmnpqstuvx] [limit</screen>
+ <para>
+ Ulimit provides control over the resources available to processes
+ started by the shell, on systems that allow such control.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>umask</command>
+ </para>
+ </entry>
+ <entry>
+<screen>umask [-p] [-S] [MODE]</screen>
+ <para>
+ The user file-creation mask is set to
+ <replaceable>MODE</replaceable>. If <replaceable>MODE</replaceable>
+ is omitted, or if <option>-S</option> is supplied, the current value
+ of the mask is printed. The <option>-S</option> option makes the
+ output symbolic; otherwise an octal number is output. If
+ <option>-p</option> is supplied, and <replaceable>MODE</replaceable>
+ is omitted, the output is in a form that may be used as input. If
+ <replaceable>MODE</replaceable> begins with a digit, it is
+ interpreted as an octal number, otherwise it is a symbolic mode
+ string like that accepted by chmod(1).
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>unalias</command>
+ </para>
+ </entry>
+ <entry>
+<screen>unalias [-a] NAME [NAME ...]</screen>
+ <para>
+ Remove <replaceable>NAME</replaceable>s from the list of defined
+ aliases. If the <option>-a</option> option is given, then remove all
+ alias definitions.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>unset</command>
+ </para>
+ </entry>
+ <entry>
+<screen>unset [-f] [-v] [NAME ...]</screen>
+ <para>
+ For each <replaceable>NAME</replaceable>, remove the corresponding
+ variable or function. Given the <option>-v</option>, unset will only
+ act on variables. Given the <option>-f</option> flag, unset will
+ only act on functions. With neither flag, unset first tries to unset
+ a variable, and if that fails, then tries to unset a function. Some
+ variables cannot be unset; also see readonly.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>until</command>
+ </para>
+ </entry>
+ <entry>
+<screen>until COMMANDS; do COMMANDS; done</screen>
+ <para>
+ Expand and execute <replaceable>COMMANDS</replaceable> as long as
+ the final command in the <command>until</command>
+ <replaceable>COMMANDS</replaceable> has an exit status which is not
+ zero.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>wait</command>
+ </para>
+ </entry>
+ <entry>
+<screen>wait [N]</screen>
+ <para>
+ Wait for the specified process and report its termination status. If
+ <replaceable>N</replaceable> is not given, all currently active
+ child processes are waited for, and the return code is zero.
+ <replaceable>N</replaceable> may be a process ID or a job
+ specification; if a job spec is given, all processes in the job's
+ pipeline are waited for.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <command>while</command>
+ </para>
+ </entry>
+ <entry>
+<screen>while COMMANDS; do COMMANDS; done</screen>
+ <para>
+ Expand and execute <replaceable>COMMANDS</replaceable> as long as
+ the final command in the <command>while</command>
+ <replaceable>COMMANDS</replaceable> has an exit status of zero.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </refsect1>
+</refentry>
++++++ pacemaker-cts-startcmd.patch ++++++
diff -r 93114fbc53ea cts/CM_ais.py
--- a/cts/CM_ais.py Tue Mar 09 20:00:05 2010 +0100
+++ b/cts/CM_ais.py Tue Mar 09 22:27:19 2010 +0100
@@ -242,8 +242,8 @@
self.update({
"Name" : "crm-flatiron",
- "StartCmd" : CTSvars.INITDIR+"/corosync start",
- "StopCmd" : CTSvars.INITDIR+"/corosync stop",
+ "StartCmd" : CTSvars.INITDIR+"/openais start",
+ "StopCmd" : CTSvars.INITDIR+"/openais stop",
# The next pattern is too early
# "Pat:We_stopped" : "%s.*Service engine unloaded: Pacemaker Cluster Manager",
++++++ pacemaker-pyexecdir.patch ++++++
Index: pacemaker/cts/Makefile.am
===================================================================
--- pacemaker.orig/cts/Makefile.am
+++ pacemaker/cts/Makefile.am
@@ -24,7 +24,7 @@ CLEANFILES = LSBDummy
EXTRA_DIST = $(cts_SCRIPTS) $(cts_DATA)
ctsdir = $(datadir)/$(PACKAGE)/tests/cts
-ctslibdir = $(pythondir)/cts
+ctslibdir = $(pyexecdir)/cts
ctslib_PYTHON = __init__.py \
CTSvars.py \
Index: pacemaker/shell/modules/Makefile.am
===================================================================
--- pacemaker.orig/shell/modules/Makefile.am
+++ pacemaker/shell/modules/Makefile.am
@@ -41,6 +41,6 @@ modules = __init__.py \
vars.py \
xmlutil.py
-shelllibdir = $(pythondir)/crm
+shelllibdir = $(pyexecdir)/crm
shelllib_PYTHON = $(modules)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package openais for openSUSE:Factory
checked in at Wed Jun 30 10:45:53 CEST 2010.
--------
--- openais/openais.changes 2009-06-19 11:04:57.000000000 +0200
+++ /mounts/work_src_done/STABLE/openais/openais.changes 2010-06-25 04:09:01.000000000 +0200
@@ -2 +2 @@
-Fri Jun 19 10:35:46 CEST 2009 - coolo(a)novell.com
+Fri May 21 08:28:35 UTC 2010 - lmb(a)novell.com
@@ -4 +4 @@
-- disable as-needed for this package as it fails to build with it
+- Fix openais/iscsi init script ordering (bnc#607777)
@@ -7 +7 @@
-Tue Jun 9 01:47:55 CEST 2009 - ro(a)suse.de
+Tue Mar 9 15:50:49 UTC 2010 - lmb(a)novell.com
@@ -9,3 +9,176 @@
-- fix build with gcc-4.4 (#elif -> #else)
-- renamed dprintf to my_dprintf to avoid collision with function
- from glibc
+- Ensure that openais remains in the init sequence, work-around for SLE
+ HA 11 GA (bnc#583663)
+
+-------------------------------------------------------------------
+Tue Mar 2 22:07:02 UTC 2010 - dmuhamedagic(a)novell.com
+
+- drop awkward one millisecond from new consensus value, since
+ that has been fixed in corosync
+
+-------------------------------------------------------------------
+Mon Feb 22 15:53:53 UTC 2010 - dmuhamedagic(a)novell.com
+
+- SP1 beta5 (no changes)
+
+-------------------------------------------------------------------
+Tue Feb 9 21:45:22 UTC 2010 - dmuhamedagic(a)novell.com
+
+- fix the Makefile.am part of the patch
+
+-------------------------------------------------------------------
+Tue Feb 9 17:25:37 UTC 2010 - dmuhamedagic(a)novell.com
+
+- update to release 1.1.2
+
+-------------------------------------------------------------------
+Tue Feb 9 12:27:56 UTC 2010 - lmb(a)novell.com
+
+- Allow openais to shutdown properly without being killed (bnc#574517).
+
+-------------------------------------------------------------------
+Mon Feb 8 15:20:32 UTC 2010 - dmuhamedagic(a)novell.com
+
+- turn timestamp to off when converting openais.conf to corosync.conf
+ (there was a problem reported in connection with not thread-safe
+ glibc functions used in concert with this option, which hasn't yet
+ been resolved)
+
+-------------------------------------------------------------------
+Mon Jan 25 16:29:50 UTC 2010 - lmb(a)novell.com
+
+- Remove redundant Provides from spec file.
+
+-------------------------------------------------------------------
+Mon Jan 25 15:16:45 UTC 2010 - dmuhamedagic(a)novell.com
+
+- add /etc/ais/openais.conf as %config(missingok) so that rpm
+ doesn't remove it on upgrade
+- create openais.conf in the install stage with appropriate comment
+ about that this configuration file is obsoleted
+
+-------------------------------------------------------------------
+Mon Jan 25 15:00:44 UTC 2010 - lmb(a)novell.com
+
+- Reduce Obsoletes in spec file (bnc#573471)
+
+-------------------------------------------------------------------
+Thu Jan 21 15:09:20 UTC 2010 - dmuhamedagic(a)novell.com
+
+- don't overwrite authkey/corosync.conf in %pre
+
+-------------------------------------------------------------------
+Thu Jan 21 14:19:15 UTC 2010 - dmuhamedagic(a)novell.com
+
+- openais.spec changes:
+ + add %pre script which creates corosync.conf from openais.conf
+ (moved from corosync.patch)
+ + replace Conflicts: with Provides/Obsoletes
+
+-------------------------------------------------------------------
+Mon Jan 18 16:44:46 UTC 2010 - dmuhamedagic(a)novell.com
+
+- source /etc/sysconfig/openais in the init script
+
+-------------------------------------------------------------------
+Tue Dec 29 10:30:21 UTC 2009 - dmuhamedagic(a)novell.com
+
+- init script changes:
+ + replace killall with checkproc
+ + test if sbd/lrmadmin exist, because openais has no dependency
+ on cluster-glue
+
+
+-------------------------------------------------------------------
+Tue Dec 15 16:05:08 UTC 2009 - dmuhamedagic(a)novell.com
+
+- add suse specific init script
+- fixed COROSYNC_DEFAULT_CONFIG_IFACE setting
+- add rcopenais link
+
+-------------------------------------------------------------------
+Tue Dec 8 13:42:27 UTC 2009 - "lmb(a)novell.com"
+
+- Update to 1.1.1.
+
+-------------------------------------------------------------------
+Wed Nov 4 17:15:26 UTC 2009 - "lmb(a)novell.com"
+
+- Do not disable openais service on package update (bnc#549579).
+
+-------------------------------------------------------------------
+Mon Oct 19 10:52:58 UTC 2009 - "lmb(a)novell.com"
+
+- Fix xend/xendomains versus openais init script ordering (bnc#547296).
+
+-------------------------------------------------------------------
+Fri Jul 17 10:42:15 CEST 2009 - lmb(a)novell.com
+
+- Update to r2042:
+- Dont segfault when ais user or group doesn't exist in the system.
+- Avoid implicit declaration of schedwrk api usage.
+- Re-instate r1959 as different fix is now upstream.
+- openais-whitetank-shutdown-take2.patch: Fix shutdown sequencing.
+- detect-pause-rhbz508128.patch: Add ability to detect process pause and
+ not implode the membership algorithm when this occurs.
+- openais-cpg-join-leave-ordering.patch: Cpg synchronization patch for
+ conf change messages.
+
+-------------------------------------------------------------------
+Wed Jul 8 23:00:00 CEST 2009 - lmb(a)suse.de
+
+- Revert r1959 to fix shutdown regression.
+
+-------------------------------------------------------------------
+Wed Jul 8 09:45:00 CEST 2009 - lmb(a)suse.de
+
+- Update to revision 2034.
+- Fix when dispatch has error condition to execute a put on the handle
+ as to not leak resources.
+- A recent change introduced a bug fix to throw away incomplete messages
+ in the assembly algorithm. The algorithm depends on a global
+ variable, but instead that variable should be instanced per nodeid.
+- Fix ppc64 ipc regression.
+- Return ERR_SECURITY when invalid user connects to aisexec.
+- Fix cpg segfault.
+- Allow "broadcast: yes" option instead of mcastaddr to force use of
+ broadcast address.
+- Allow rolling crypto upgrades between openais and corosync.
+- Allow uidgid files for external users to specify their own users or
+ groups to be specified for ipc security allow.
+- Fix race condition in cpg join/leave operations.
+- Ensure ordering works properly for cpg.
+- Fix a shared memory leak on whitetank that happens when an IPC client
+ disconnects.
+- Add openais_shutdown to properly cleanup in condition of shutdown.
+- Add assembly to free list when it is removed from a configuration
+ change as indicated by being in the left list. This has side effect
+ of clearing the assembly buffer the next time it is referenced from
+ the free list. This fixes a defect that stops forward processing of
+ the message streams because sync fails to finish when receiving a sync
+ message from a restarted processor because it throws away the message.
+
+-------------------------------------------------------------------
+Tue Apr 21 14:55:00 CEST 2009 - lmb(a)suse.de
+
+- Fix crash due to a race condition in CPG (bnc#483878).
+
+-------------------------------------------------------------------
+Fri Apr 3 13:57:14 CEST 2009 - abeekhof(a)suse.de
+
+- Chaneg the default value of join to 1s in openais.conf
+
+-------------------------------------------------------------------
+Thu Apr 02 13:00:00 CEST 2009 - lmb(a)suse.de
+
+- Check whether sbd binary is already running before starting it.
+
+-------------------------------------------------------------------
+Tue Mar 31 14:00:00 CEST 2009 - lmb(a)suse.de
+
+- Default to logging via logd for pacemaker.
+
+-------------------------------------------------------------------
+Mon Mar 30 15:00:00 CEST 2009 - lmb(a)suse.de
+
+- Update source tarball to r1761:
+- Keep multiple threads out of the aisexec service engines.
calling whatdependson for head-i586
Old:
----
openais-dprintf.diff
openais-else.diff
openais-init.diff
openais.tar.gz
suse.diff
New:
----
openais-1.1.2.tar.gz
openais-suse-init.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openais.spec ++++++
--- /var/tmp/diff_new_pack.FKSkJ1/_old 2010-06-30 10:45:12.000000000 +0200
+++ /var/tmp/diff_new_pack.FKSkJ1/_new 2010-06-30 10:45:12.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package openais (Version 0.80.3)
+# spec file for package openais (Version 1.1.2)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 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
@@ -15,35 +15,65 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
-%if 0%{?suse_version}
-%define _libexecdir %{_libdir}
-%endif
-%define ais_uid 39
-%define ais_user ais
-%if 0%{?fedora_version}
-%define pkg_group System Environment/Base
-%else
-%define pkg_group Productivity/Clustering/HA
-%endif
Name: openais
Summary: The OpenAIS Standards-Based Cluster Framework executive and APIs
-Version: 0.80.3
-Release: 25
-License: BSD 3-clause (or similar)
+Version: 1.1.2
+Release: 1
+License: BSD3c
Group: Productivity/Clustering/HA
Url: http://www.openais.org/
-Source: openais.tar.gz
-Patch1: suse.diff
-Patch2: openais-init.diff
-Patch3: openais-else.diff
-Patch4: openais-dprintf.diff
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Requires(pre): /usr/sbin/useradd
+Source0: http://www.osdl.org/downloads/openais-%{version}/openais-%{version}.tar.gz
+Patch1: openais-suse-init.patch
+# Runtime bits
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
+Requires: corosync
+Requires: libopenais3 = %{version}-%{release}
+# Setup/build bits
+BuildRequires: libcorosync-devel
+%define buildtrunk 0
+%{?_with_buildtrunk: %define buildtrunk 1}
+%if %{buildtrunk}
+BuildRequires: autoconf automake
+%endif
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%prep
+%setup -q -n openais-%{version}
+%patch1 -p1
+
+%build
+%if %{buildtrunk}
+./autogen.sh
+%endif
+%{configure}
+make %{_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+mkdir -p %{buildroot}%{_initrddir}
+install -m 755 init/suse %{buildroot}%{_initrddir}/openais
+%if 0%{?suse_version}
+ln -sf ../../etc/init.d/openais %{buildroot}%{_sbindir}/rcopenais
+%endif
+mkdir -p %{buildroot}%{_sysconfdir}/ais
+cat<<EOF > %{buildroot}%{_sysconfdir}/ais/openais.conf
+# This configuration file is not used any more
+# Please refer to %{_sysconfdir}/corosync/corosync.conf
+EOF
+## tree fixup
+# drop static libs
+rm -f %{buildroot}%{_libdir}/*.a
+# drop docs and html docs for now
+rm -rf %{buildroot}%{_docdir}/*
+# the docdir is /usr/share/doc/<pkg> in the configuration
+rm -rf %{buildroot}%{_datadir}/doc/*
+
+%clean
+rm -rf %{buildroot}
%description
This package contains the openais executive, openais service handlers,
@@ -72,14 +102,97 @@
Robert Peterson
Abhijith Das
-%package -n libopenais2
-License: BSD 3-clause (or similar)
-Summary: The OpenAIS Standards-Based Cluster Framework executive and APIs
+%pre
+ais2coroconf() {
+# rules:
+# consensus > 1.2 * token
+ conf=$1
+ filter=`mktemp`
+ awk '
+ BEGIN{cons=0; tok=0}
+ $1=="token:"{tok=$2}
+ $1=="consensus:"{cons=$2}
+ $1=="timestamp:"{timestamp=$2}
+ END{
+ if( cons>0 && tok>0 && 1.2*cons <= tok ) {
+ newcons = tok*1.2;
+ printf "$1==\"consensus:\"{$2=%d}\n",newcons
+ printf "WARN: consensus in corosync.conf adjusted from %d to %d\n",cons,newcons > "/dev/stderr"
+ }
+ if( timestamp == "on" ) {
+ printf "$1==\"timestamp:\"{$2=\"off\"}\n"
+ printf "WARN: timestamp in corosync.conf set to off\n" > "/dev/stderr"
+ }
+ }
+ ' $conf >> $filter
+ echo '{print}' >> $filter
+ awk -f $filter $conf
+ rm -f $filter
+}
+if [ -f %{_sysconfdir}/ais/openais.conf ]; then
+ mkdir -p %{_sysconfdir}/corosync
+ [ -f %{_sysconfdir}/ais/authkey -a ! -f %{_sysconfdir}/corosync/authkey ] &&
+ cp -p %{_sysconfdir}/ais/authkey %{_sysconfdir}/corosync
+ [ -f %{_sysconfdir}/corosync/corosync.conf ] ||
+ ais2coroconf %{_sysconfdir}/ais/openais.conf > %{_sysconfdir}/corosync/corosync.conf
+fi
+
+%post
+%{fillup_and_insserv -n openais}
+# This code addresses bnc#549579 - a previous package version wrongly
+# disabled openais in %postun, which this needs to work around:
+if chkconfig -c openais; then
+ touch /var/run/start_open_ais_on_boot
+fi
+
+%posttrans
+if test -f /var/run/start_open_ais_on_boot; then
+ chkconfig --add openais
+ rm -f /var/run/start_open_ais_on_boot
+fi
+
+%preun
+%stop_on_removal openais
+
+%postun
+%restart_on_update openais
+%{insserv_cleanup}
+
+%files
+%defattr(-,root,root,-)
+%doc LICENSE README.amf
+%dir %{_sysconfdir}/corosync
+%dir %{_sysconfdir}/ais
+%config(noreplace) %{_sysconfdir}/corosync/amf.conf.example
+%config(missingok) %{_sysconfdir}/ais/openais.conf
+%{_initrddir}/openais
+%if 0%{?suse_version}
+%{_sbindir}/rcopenais
+%endif
+%dir %{_libexecdir}/lcrso
+%{_libexecdir}/lcrso/openaisserviceenable.lcrso
+%{_libexecdir}/lcrso/service_amf.lcrso
+%{_libexecdir}/lcrso/service_ckpt.lcrso
+%{_libexecdir}/lcrso/service_clm.lcrso
+%{_libexecdir}/lcrso/service_evt.lcrso
+%{_libexecdir}/lcrso/service_lck.lcrso
+%{_libexecdir}/lcrso/service_msg.lcrso
+%{_libexecdir}/lcrso/service_tmr.lcrso
+%{_mandir}/man8/openais_overview.8*
+%{_mandir}/man5/openais.conf.5*
+%{_mandir}/man5/amf.conf.5*
+%{_sbindir}/aisexec
+%{_sbindir}/openais-instantiate
+
+%package -n libopenais3
+License: BSD3c
+Summary: The openais Standards-Based Cluster Framework libraries
Group: Productivity/Clustering/HA
+Obsoletes: libopenais2
+Conflicts: libopenais2
-%description -n libopenais2
-This package contains the openais executive, openais service handlers,
-default configuration files and init script.
+%description -n libopenais3
+This package contains openais libraries.
@@ -104,12 +217,30 @@
Robert Peterson
Abhijith Das
+%files -n libopenais3
+%defattr(-,root,root,-)
+%doc LICENSE
+%{_libdir}/libSaAmf.so.*
+%{_libdir}/libSaCkpt.so.*
+%{_libdir}/libSaClm.so.*
+%{_libdir}/libSaEvt.so.*
+%{_libdir}/libSaLck.so.*
+%{_libdir}/libSaMsg.so.*
+%{_libdir}/libSaTmr.so.*
+
+%post -n libopenais3 -p /sbin/ldconfig
+
+%postun -n libopenais3 -p /sbin/ldconfig
+
%package -n libopenais-devel
-License: BSD 3-clause (or similar)
+License: BSD3c
Summary: The openais Standards-Based Cluster Framework libraries
Group: Development/Libraries/C and C++
-Requires: %{name} = %{version}-%{release}
-Requires: libopenais2 = %{version}-%{release}
+Requires: libopenais3 = %{version}-%{release}
+Requires: pkgconfig
+Provides: openais-devel = %{version}
+Obsoletes: openais-devel < 0.92
+Conflicts: openais-devel < 0.92
%description -n libopenais-devel
This package contains the libraries and include files used to develop
@@ -138,127 +269,25 @@
Robert Peterson
Abhijith Das
-%prep
-%setup -n openais
-%patch1 -p1
-%patch2 -p1
-%patch3
-%patch4
-
-%build
-# This package failed when testing with -Wl,-as-needed being default.
-# So we disable it here, if you want to retest, just delete this comment and the line below.
-export SUSE_ASNEEDED=0
-# -O3 required for performance reasons
-# So we get proper debug output, for now we don't compile with O3
-#CFLAGS="$(echo '%{optflags}' | sed -e 's/-O[0-9]*//') -O3"
-#CFLAGS="$(echo '%{optflags}')"
-make CFLAGS="$RPM_OPT_FLAGS" LCRSODIR=%{_libexecdir}/lcrso PREFIX=%{_prefix} OPENAIS_BUILD=DEBUG
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LCRSODIR=%{_libexecdir}/lcrso STATICLIBS=NO OPENAIS_BUILD=DEBUG install
-mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-mkdir -p $RPM_BUILD_ROOT%{_initrddir}
-install -m 644 CHANGELOG LICENSE SECURITY README.devmap README.amf \
- $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
-install -m 755 init/generic $RPM_BUILD_ROOT%{_initrddir}/openais
-install -m 755 test/openais-cfgtool $RPM_BUILD_ROOT%{_sbindir}
-find $RPM_BUILD_ROOT -name '*.a' -type f -print0 | xargs -0 rm -f
-find $RPM_BUILD_ROOT -name '*.la' -type f -print0 | xargs -0 rm -f
-%if 0%{?suse_version}
-ln -sf ../../etc/init.d/openais $RPM_BUILD_ROOT/%{_sbindir}/rcopenais
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%pre
-%if 0%{?fedora_version}
-/usr/sbin/fedora-useradd %{ais_uid} -r -s /sbin/nologin -d '/' -M \
- -c 'openais Standards Based Cluster Framework' %{ais_user} &>/dev/null || :
-%else
-if
- getent passwd %{ais_user} >/dev/null
-then
- : OK hacluster user already present
-else
- /usr/sbin/useradd -c "openais Standards Based Cluster Framework" \
- -r -d '/' -u %{ais_uid} %{ais_user} 2>/dev/null || :
-fi
-%endif
-
-%post
-%if 0%{?suse_version}
- %{fillup_and_insserv -n openais}
-%else
- /sbin/chkconfig --add openais || :
-%endif
-
-%preun
-%if 0%{?suse_version}
- %stop_on_removal openais
-%else
-if [ $1 -eq 0 ]; then
- %{_initrddir}/openais stop &>/dev/null || :
-fi
-%endif
-/sbin/chkconfig --del openais || :
-
-%postun
-%if 0%{?suse_version}
- %restart_on_update openais
- %{insserv_cleanup}
-%else
-[ "$1" -ge "1" ] && %{_initrddir}/openais condrestart &>/dev/null || :
-%endif
-
-%post -n libopenais2 -p /sbin/ldconfig
-
-%postun -n libopenais2 -p /sbin/ldconfig
-
-%files
-%defattr(-,root,root,-)
-%dir %{_docdir}/%{name}-%{version}
-%doc %{_docdir}/%{name}-%{version}/LICENSE
-%doc %{_docdir}/%{name}-%{version}/SECURITY
-%doc %{_docdir}/%{name}-%{version}/README.amf
-%{_sbindir}/aisexec
-%{_sbindir}/ais-keygen
-%{_sbindir}/openais-cfgtool
-%dir /etc/ais
-%config(noreplace) /etc/ais/openais.conf
-%config(noreplace) /etc/ais/amf.conf
-%config /etc/ld.so.conf.d/openais-*.conf
-%{_initrddir}/openais
-%if 0%{?suse_version}
-%{_sbindir}/rcopenais
-%endif
-%dir %{_libexecdir}/lcrso
-%{_libexecdir}/lcrso/*.lcrso
-%{_mandir}/man8/*.8*
-%{_mandir}/man5/openais.conf.5*
-
-%files -n libopenais2
-%defattr(-,root,root,-)
-%dir %{_libdir}/openais
-%{_libdir}/openais/lib*.so.*
-
%files -n libopenais-devel
%defattr(-,root,root,-)
-%dir %{_docdir}/%{name}-%{version}
-%doc %{_docdir}/%{name}-%{version}/CHANGELOG
-%doc %{_docdir}/%{name}-%{version}/README.devmap
+%doc LICENSE
%dir %{_includedir}/openais/
-%dir %{_includedir}/openais/lcr/
-%dir %{_includedir}/openais/totem/
-%dir %{_includedir}/openais/service
-%{_libdir}/openais/lib*.so
-%{_includedir}/openais/*.h
-%{_includedir}/openais/lcr/*.h
-%{_includedir}/openais/totem/*.h
-%{_includedir}/openais/service/*.h
-%{_mandir}/man3/cpg_*.3*
-%{_mandir}/man3/evs_*.3*
+%{_includedir}/openais/saAis.h
+%{_includedir}/openais/saAmf.h
+%{_includedir}/openais/saCkpt.h
+%{_includedir}/openais/saClm.h
+%{_includedir}/openais/saEvt.h
+%{_includedir}/openais/saLck.h
+%{_includedir}/openais/saMsg.h
+%{_includedir}/openais/saTmr.h
+%{_libdir}/libSaAmf.so
+%{_libdir}/libSaCkpt.so
+%{_libdir}/libSaClm.so
+%{_libdir}/libSaEvt.so
+%{_libdir}/libSaLck.so
+%{_libdir}/libSaMsg.so
+%{_libdir}/libSaTmr.so
+%{_libdir}/pkgconfig/*.pc
%changelog
++++++ openais-suse-init.patch ++++++
diff -urN openais-1.1.2.orig//init/Makefile.am openais-1.1.2/init/Makefile.am
--- openais-1.1.2.orig//init/Makefile.am 2010-01-26 18:35:03.000000000 +0100
+++ openais-1.1.2/init/Makefile.am 2010-02-09 22:41:29.091663000 +0100
@@ -34,7 +34,7 @@
MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = generic.in
+EXTRA_DIST = generic.in suse
target_INIT = generic
diff -urN openais-1.1.2.orig//init/suse openais-1.1.2/init/suse
--- openais-1.1.2.orig//init/suse 1970-01-01 01:00:00.000000000 +0100
+++ openais-1.1.2/init/suse 2010-02-09 22:41:12.278197000 +0100
@@ -0,0 +1,210 @@
+#!/bin/sh
+#
+# Corosync daemon init script for LSB-compliant Linux distributions.
+#
+# openais Start the openais (corosync) cluster service
+#
+# chkconfig: - 20 20
+# processname: corosync
+# pidfile: /var/run/corosync.pid
+# description: Corosync/OpenAIS
+### BEGIN INIT INFO
+# Description: Manages the openais cluster services.
+#
+# Short-Description: openais cluster services.
+# Provides: openais
+# Required-Start: $network
+# Should-Start: $syslog sshd drbd $named $remote_fs logd xendomains xend iscsi
+# Required-Stop: $network
+# Default-Start: 3 5
+# Default-Stop: 0 6
+# Should-Stop: logd drbd $syslog $named xendomains xend iscsi
+### END INIT INFO
+
+do_force=0
+prog="corosync"
+exec="/usr/sbin/corosync"
+lockfile="/var/lock/subsys/$prog"
+
+OPENAIS_SYSCONFIG=/etc/sysconfig/openais
+if [ -f $OPENAIS_SYSCONFIG ]; then
+ . $OPENAIS_SYSCONFIG
+fi
+PACEMAKER_SYSCONFIG=/etc/sysconfig/pacemaker
+if [ -f $PACEMAKER_SYSCONFIG ]; then
+ . $PACEMAKER_SYSCONFIG
+fi
+LRMADMIN="/usr/sbin/lrmadmin"
+
+SBD_CONFIG=/etc/sysconfig/sbd
+SBD_BIN="/usr/sbin/sbd"
+if [ -f $SBD_CONFIG ]; then
+ . $SBD_CONFIG
+fi
+
+[ -x "$exec" ] || exit 0
+
+StartSBD() {
+ test -x $SBD_BIN || return
+ if [ -n "$SBD_DEVICE" ]; then
+ if ! pidofproc $SBD_BIN ; then
+ echo -n "Starting SBD - "
+ if ! $SBD_BIN -d $SBD_DEVICE -D $SBD_OPTS watch ; then
+ echo "SBD failed to start; aborting."
+ exit 1
+ fi
+ fi
+ fi
+}
+
+StopSBD() {
+ test -x $SBD_BIN || return
+ if [ -n "$SBD_DEVICE" ]; then
+ echo -n "Stopping SBD - "
+ if ! $SBD_BIN -d $SBD_DEVICE -D $SBD_OPTS message LOCAL exit ; then
+ echo "SBD failed to stop; aborting."
+ exit 1
+ fi
+ fi
+}
+
+wait_for_lrmd() {
+ local maxwait=30
+ local i=0
+ while [ $i -lt $maxwait ]; do
+ $LRMADMIN -C > /dev/null 2>&1 &&
+ break
+ sleep 1
+ i=$(($i+1))
+ done
+ if [ $i -lt $maxwait ]; then
+ return 0
+ else
+ echo "lrmd apparently didn't start"
+ return 1
+ fi
+}
+set_lrmd_options() {
+ test -x $LRMADMIN || return
+ if [ -n "$LRMD_MAX_CHILDREN" ]; then
+ wait_for_lrmd || return
+ $LRMADMIN -p max-children $LRMD_MAX_CHILDREN
+ fi
+}
+
+internal_status() {
+ checkproc $exec > /dev/null 2>&1
+ return $?
+}
+
+status() {
+ if internal_status; then
+ echo "Running"
+ return 0
+ else
+ echo "Stopped"
+ return 7
+ fi
+}
+
+start() {
+ export COROSYNC_DEFAULT_CONFIG_IFACE
+ : ${COROSYNC_DEFAULT_CONFIG_IFACE="openaisserviceenableexperimental:corosync_parser"}
+ echo -n $"Starting OpenAIS/Corosync daemon ($prog): "
+ if ! internal_status; then
+ StartSBD
+ echo -n "starting... "
+ startproc $exec
+ fi
+
+ sleep 2 # give it time to fail... $? isn't definitive
+
+ if internal_status; then
+ set_lrmd_options
+ echo "OK"
+ touch "$lockfile"
+ return 0
+ fi
+
+ echo "Failed"
+ return 1
+}
+
+do_force=0
+do_forever=1
+
+stop() {
+ echo -n $"Stopping OpenAIS/Corosync daemon ($prog): "
+
+ c_pid="`pidofproc $exec`"
+ if [ -n "$c_pid" ]; then
+ kill -TERM $c_pid
+ fi
+
+ if [ $do_forever = 0 ]; then
+ for i in 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20; do
+ if internal_status; then
+ sleep 2
+ echo -n "."
+ else
+ rm -f "$lockfile"
+ StopSBD
+ echo "OK"
+ return 0
+ fi
+ done
+
+ if [ $do_force = 1 ]; then
+ echo -n "Escalating... "
+ kill -KILL $c_pid
+ sleep 5
+
+ if ! internal_status; then
+ rm -f "$lockfile"
+ echo "OK"
+ return 0
+ fi
+ fi
+
+ echo "Failed"
+ return 1
+ fi
+
+ while internal_status; do
+ sleep 1
+ echo -n "."
+ done
+
+ StopSBD
+
+ rm -f "$lockfile"
+ echo "OK"
+ return 0
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start|stop|restart)
+ $1
+ ;;
+ force-stop)
+ do_force=1
+ stop
+ ;;
+ reload|force-reload)
+ restart
+ ;;
+ condrestart|try-restart)
+ [ ! -f "$lockfile" ] || restart
+ ;;
+ status)
+ status $prog
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|try-restart|condrestart|reload|force-reload|force-stop|status}"
+ exit 2
+esac
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ocfs2-tools for openSUSE:Factory
checked in at Wed Jun 30 10:44:59 CEST 2010.
--------
--- ocfs2-tools/ocfs2-tools.changes 2010-04-09 09:53:45.000000000 +0200
+++ /mounts/work_src_done/STABLE/ocfs2-tools/ocfs2-tools.changes 2010-06-28 02:02:27.000000000 +0200
@@ -2 +2 @@
-Fri Apr 9 07:25:41 UTC 2010 - aj(a)suse.de
+Sun Jun 27 23:44:54 UTC 2010 - tserong(a)novell.com
@@ -4 +4 @@
-- Fix build.
+- Fix mount.ocfs2.c compilation issue on gcc 4.5 (deb#565100)
@@ -7 +7 @@
-Wed Sep 30 08:03:29 UTC 2009 - aj(a)suse.de
+Sun Jun 27 09:58:09 UTC 2010 - tserong(a)novell.com
@@ -9 +9 @@
-- Do not require ocfs-kmp for openSUSE 11.2.
+- Fix configure checks for cpg and SaCkpt libraries
@@ -12 +12 @@
-Mon Jul 13 16:57:52 CEST 2009 - coolo(a)novell.com
+Mon Jun 14 15:19:45 UTC 2010 - lmb(a)novell.com
@@ -14,3 +14 @@
-- fix build with e2fsprogs
-- fix build with glibc 2.10
-- fix build with as-needed
+- ocfs2_controld.pcmk: compilation issue fixed.
@@ -19 +17 @@
-Thu Apr 16 01:40:48 CEST 2009 - ro(a)suse.de
+Mon Apr 26 14:43:04 UTC 2010 - coyli(a)novell.com
@@ -21 +19,231 @@
-- buildfix: refresh patches
+- fixes for indexed-dirs
+ - 0016-tunefs.ocfs2-move-o2ne_add_tailers-into-libocfs2ne.c.patch
+ - 0017-dx_dirs-add-check-for-invalid-slot-in-ocfs2_new_dx_r.patch
+ - 0018-mkfs.ocfs2-create-root-and-orphan-directories-as-ind.patch
+ - 0019-libocfs2-fix-flag-check-in-ocfs2_init_dir.patch
+ - 0020-libocfs2-fix-ocfs2_init_dir-to-retain-indexed-flag.patch
+ - 0021-fsck.ocfs2-verify-dirent-dx-entry-linkages.patch
+ - 0022-dx_dirs-stop-iterate-dir-entries-for-I-O-error.patch
+ - 0023-dx_dirs-check-callback-iter-dx_func-return-value-in-.patch
+ - 0024-dx_dirs-remove-unncessary-return-value-assignment.patch
+ - 0025-dx_dirs-unifiy-feature-string-of-indexed-dirs.patch
+ - 0026-dx_dirs-Improve-information-displayed-by-dump_dx_roo.patch
+ - 0027-dx_dirs-stop-iteration-of-dir-trailer-initialization.patch
+ - 0028-dx_dirs-stop-dx-insert-iteration-for-callback-error.patch
+ - 0029-dx_dirs-set-OCFS2_INDEXED_DIR_FL-after-indexed-tree-.patch
+ - 0030-dx_dirs-fix-ocfs2_swap_dx_entry_list-for-big-endian.patch
+
+-------------------------------------------------------------------
+Sun Apr 11 20:06:09 CST 2010 - coyli(a)novell.com
+
+- update indexed-dirs patches to v11 patches
+ - a bug fix in fsck.ocfs2/pass2.c
+ - extra check whether the directory trailer overwrites valid
+ directory items.
+
+-------------------------------------------------------------------
+Thu Apr 8 17:19:21 UTC 2010 - lmb(a)novell.com
+
+- Add reflink user-space utility to expose the copy-on-write links in
+ OCFS2 for all platforms (bnc#594979).
+
+-------------------------------------------------------------------
+Thu Mar 25 19:17:55 UTC 2010 - coyli(a)novell.com
+
+- 0015-dx_dirs-enable-metaecc-and-indexed-dirs-support-as-d.patch:
+ enable metaecc and indexed-dirs support as default features.
+- ocfs2-tools-static-glib.diff: rename to ocfs2-o2cb_ctl-static-glibc.diff,
+ don't explicitly link pthread anymore.
+- update ocfs2-tools.tar.bz2 to upstream (0a1c1970):
+ - mkfs.ocfs2: enable xattr support as a default feature
+ - Fsck.ocfs2: Correctly check i_size for directory in a sparse
+ filesystem.
+ - fsck.ocfs2: Freshen up some fsck messages
+ - mkfs.ocfs2: Add dry-run option
+ - mkfs.ocfs2: Allocate groups to the extent allocator
+ - libocfs2: Add ocfs2_grow_chain_allocator()
+ - libocfs2: ocfs2_chain_add_group() adds new groups to the next
+ logical chain
+ - mounted.ocfs2: Add the stack/local to the output
+ - mounted.ocfs2: Display uuid in all caps
+ - mkfs.ocfs2: Tweak the feature compatibility list in manpage
+ - mkfs.ocfs2: Print fs features during make
+
+-------------------------------------------------------------------
+Fri Mar 12 06:32:34 UTC 2010 - coyli(a)novell.com
+
+- 0014-dx_dirs-man-page.diff: add an initial man page entry for
+ indexed-dirs feature.
+
+-------------------------------------------------------------------
+Thu Mar 11 16:41:09 UTC 2010 - coyli(a)novell.com
+
+- bug-585080-handle-symbolic-link.patch: handle symbolic link device
+ file for tunefs.ocfs2 online resize (bnc#585080)
+
+-------------------------------------------------------------------
+Thu Mar 11 02:50:57 UTC 2010 - coyli(a)novell.com
+
+- version-1.4.3.patch: keep package version as 1.4.3 for SLES11 HAE SP1.
+
+-------------------------------------------------------------------
+Thu Mar 11 01:04:34 UTC 2010 - coyli(a)novell.com
+
+- 0013-dx_dirs-try-to-install-dir-trailers-when-enable-inde.patch: try
+ to install dir trailers when enable indexed-dirs feature while
+ metaecc features is not enabled. The fix can avoid ocfs2_dx_dir_build()
+ in ocfs2-tools to overwrite existed dir entries lying in trailer area
+ by moving them into other dir blocks. No BNC associated.
+
+-------------------------------------------------------------------
+Fri Mar 5 09:13:30 UTC 2010 - coyli(a)novell.com
+
+- update indexed-dirs patches for
+ - remove the metaecc dependence code for indexed dirs. (bnc#584578)
+ - indexed dirs does not depend on metaecc, remove all
+ incorrect dependence code in mkfs.ocfs2 and tunefs.ocfs2 (bnc#585418)
+ - code clean up in mkfs.ocfs2
+- back port ocfs2-tools version 1.6 to SP1 ocfs2-tools package.
+
+-------------------------------------------------------------------
+Wed Mar 3 09:51:32 UTC 2010 - coyli(a)novell.com
+
+- add 0012-dx_dirs-fix-for-tunefs-metaecc-and-indexed-dirs.patch
+ (bnc#584578)
+
+-------------------------------------------------------------------
+Mon Feb 22 18:40:29 UTC 2010 - coyli(a)novell.com
+
+- update indexed dirs patches for fate#300315
+
+-------------------------------------------------------------------
+Fri Feb 5 10:25:07 UTC 2010 - coyli(a)novell.com
+
+- delete 64bytes_lvb_len_in_libo2dlm.diff (bnc#573460)
+
+-------------------------------------------------------------------
+Fri Jan 29 01:01:49 UTC 2010 - coyli(a)novell.com
+
+- update indexed dirs patches.
+
+-------------------------------------------------------------------
+Thu Jan 28 21:01:02 UTC 2010 - coyli(a)novell.com
+
+- compiling fix
+
+-------------------------------------------------------------------
+Thu Jan 28 20:52:10 UTC 2010 - coyli(a)novell.com
+
+- add disable indexed-dirs support in tunefs.ocfs2 (fate#300315)
+- more fixes for previous indexed-dirs patches
+
+-------------------------------------------------------------------
+Thu Jan 28 04:07:37 UTC 2010 - coyli(a)novell.com
+
+- add the first version of indexed dir support (fate#300315)
+
+-------------------------------------------------------------------
+Mon Jan 25 16:23:47 UTC 2010 - lmb(a)novell.com
+
+- ocfs2-tools requires openais for the user-space cluster stack.
+
+-------------------------------------------------------------------
+Wed Dec 9 09:47:31 UTC 2009 - "lmb(a)novell.com"
+
+- Fix ocfs2-tools build (bnc#561625).
+
+-------------------------------------------------------------------
+Tue Dec 8 14:42:05 UTC 2009 - "lmb(a)novell.com"
+
+- Add libcorosync-devel build dependency.
+
+-------------------------------------------------------------------
+Tue Dec 8 06:44:41 UTC 2009 - coyli(a)novell.com
+
+- 64bytes_lvb_len_in_libo2dlm.diff: use 64 bytes lvb len ((bnc#515645))
+
+-------------------------------------------------------------------
+Thu Nov 26 06:17:33 UTC 2009 - coyli(a)novell.com
+
+- change version number to 1.4.3
+
+-------------------------------------------------------------------
+Thu Nov 26 06:12:43 UTC 2009 - coyli(a)novell.com
+
+- update ocfs2-tools-1.4.3 to SLES11SP1
+
+-------------------------------------------------------------------
+Tue Nov 3 16:34:52 UTC 2009 - coyli(a)novell.com
+
+- bug-543119-o2dlm.patch: load libdlm_lt.so.3 explicitly in o2dlm.c (bnc#543119)
+- drop bug-543119_0001-Option-to-skip-cluster-checking-in-tunefs.ocfs2.patch since
+ bnc#543119 is a dlopen() issue, and this patch is not accepted by upstream.
+
+-------------------------------------------------------------------
+Wed Oct 14 09:20:32 UTC 2009 - "lmb(a)novell.com"
+
+- Implement a -F/--force option to bypass the cluster stack in
+ tunefs.ocfs2 (bnc#543119).
+
+-------------------------------------------------------------------
+Thu Sep 10 15:57:38 CEST 2009 - coly.li(a)suse.de
+
+- fix kill_deamon() from o2cb.ocf, now when the deamon to be killed
++++ 58 more lines (skipped)
++++ between ocfs2-tools/ocfs2-tools.changes
++++ and /mounts/work_src_done/STABLE/ocfs2-tools/ocfs2-tools.changes
calling whatdependson for head-i586
Old:
----
change-quotafile-names.diff
ocfs2console-display-fix.diff
ocfs2console-extraoption-fix.diff
ocfs2console-pop-display-warning.diff
ocfs2_controld-retry-470741.diff
ocfs2-mount-gcc45.patch
ocfs2-quota.diff
ocfs2-tools-dynamic-com-err.patch
ocfs2-tools-glibc210.diff
ocfs2-tools-static-glib.diff
tunefs.ocfs2.8.in_more_options.diff
New:
----
0001-dx_dirs-Add-library-support-for-directory-indexing.patch
0002-dx_dirs-debugfs.ocfs2-support.patch
0003-dx_dirs-mkfs.ocfs2-support.patch
0004-dx_dirs-Add-tunefs.ocfs2-feature-for-indexed-directo.patch
0005-dx_dirs-Update-for-dr_num_entries.patch
0006-dx_dirs-add-missing-ocfs2_filesys-fs-parameter.patch
0007-dx_dirs-more-library-support-for-directory-indexing.patch
0008-dx_dirs-fsck.ocfs2-support.patch
0009-dx_dirs-add-blocknr-in-callback-of-ocfs2_dir_iterate.patch
0010-dx_dirs-add-disable-indexed-dirs-support-in-tunefs.o.patch
0011-dx_dirs-build-indexed-trees-when-enabling-indexed-di.patch
0012-dx_dirs-fix-return-value-of-walk_dirblock-when-enabl.patch
0013-dx_dirs-try-to-install-dir-trailers-when-enable-inde.patch
0014-dx_dirs-add-an-initial-man-page-entry-for-indexed-di.patch
0015-fsck.ocfs2-prompt-before-truncating-an-invalid-dir-i.patch
0016-tunefs.ocfs2-move-o2ne_add_tailers-into-libocfs2ne.c.patch
0017-dx_dirs-add-check-for-invalid-slot-in-ocfs2_new_dx_r.patch
0018-mkfs.ocfs2-create-root-and-orphan-directories-as-ind.patch
0019-libocfs2-fix-flag-check-in-ocfs2_init_dir.patch
0020-libocfs2-fix-ocfs2_init_dir-to-retain-indexed-flag.patch
0021-fsck.ocfs2-verify-dirent-dx-entry-linkages.patch
0022-dx_dirs-stop-iterate-dir-entries-for-I-O-error.patch
0023-dx_dirs-check-callback-iter-dx_func-return-value-in-.patch
0024-dx_dirs-remove-unncessary-return-value-assignment.patch
0025-dx_dirs-unifiy-feature-string-of-indexed-dirs.patch
0026-dx_dirs-Improve-information-displayed-by-dump_dx_roo.patch
0027-dx_dirs-stop-iteration-of-dir-trailer-initialization.patch
0028-dx_dirs-stop-dx-insert-iteration-for-callback-error.patch
0029-dx_dirs-set-OCFS2_INDEXED_DIR_FL-after-indexed-tree-.patch
0030-dx_dirs-fix-ocfs2_swap_dx_entry_list-for-big-endian.patch
0031-dx_dirs-enable-metaecc-and-indexed-dirs-support-as-d.patch
bug-470741-debug_start_failures.patch
bug-543119-o2dlm.patch
bug-585080-handle-symbolic-link.patch
debug-ocfs2_hb_ctl.patch
extra-debug.patch
fix-configure-check-libs.patch
force-debug.patch
gcc45-ftbfs-deb-565100.patch
ocfs2-o2cb_ctl-static-glibc.diff
reflink-no-syscall.patch
reflink.tar.bz2
version-1.4.3.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ocfs2-tools.spec ++++++
--- /var/tmp/diff_new_pack.CUanKp/_old 2010-06-30 10:43:52.000000000 +0200
+++ /var/tmp/diff_new_pack.CUanKp/_new 2010-06-30 10:43:52.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package ocfs2-tools (Version 1.4.1)
+# spec file for package ocfs2-tools (Version 1.4.3)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,33 +19,65 @@
Name: ocfs2-tools
-BuildRequires: e2fsprogs-devel glib2-devel libcom_err-devel libdlm-devel libopenais-devel libpacemaker-devel libxml2-devel libxslt-devel python-devel python-gtk-devel readline-devel update-desktop-files
+BuildRequires: e2fsprogs-devel glib2-devel libcorosync-devel libdlm-devel libopenais-devel libpacemaker-devel libxml2-devel libxslt-devel python-devel python-gtk-devel readline-devel update-desktop-files
Summary: Oracle Cluster File System 2 Core Tools
-Version: 1.4.1
-Release: 25
+Version: 1.4.3
+Release: 1
License: GPLv2+
Group: System/Filesystems
Source: ocfs2-tools.tar.bz2
Source1: o2cb.ocf
-Patch5: ocfs2-tools-static-glib.diff
-Patch6: ocfs2console-display-fix.diff
-Patch7: ocfs2-tools-glibc210.diff
-Patch99: ocfs2-devel.diff
-Patch100: ocfs2-quota.diff
-Patch101: change-quotafile-names.diff
-Patch102: ocfs2_controld-pacemaker.diff
-Patch103: ocfs2console-extraoption-fix.diff
-Patch104: ocfs2console-pop-display-warning.diff
-Patch105: ocfs2_controld-retry-470741.diff
-Patch106: tunefs.ocfs2.8.in_more_options.diff
-Patch107: ocfs2-mount-gcc45.patch
-Patch108: ocfs2-tools-dynamic-com-err.patch
+Source2: reflink.tar.bz2
+Patch101: ocfs2-o2cb_ctl-static-glibc.diff
+Patch102: force-debug.patch
+Patch103: extra-debug.patch
+Patch104: debug-ocfs2_hb_ctl.patch
+Patch105: ocfs2_controld-pacemaker.diff
+Patch106: bug-470741-debug_start_failures.patch
+Patch107: ocfs2-devel.diff
+Patch201: bug-543119-o2dlm.patch
+Patch202: bug-585080-handle-symbolic-link.patch
+Patch301: 0001-dx_dirs-Add-library-support-for-directory-indexing.patch
+Patch302: 0002-dx_dirs-debugfs.ocfs2-support.patch
+Patch303: 0003-dx_dirs-mkfs.ocfs2-support.patch
+Patch304: 0004-dx_dirs-Add-tunefs.ocfs2-feature-for-indexed-directo.patch
+Patch305: 0005-dx_dirs-Update-for-dr_num_entries.patch
+Patch306: 0006-dx_dirs-add-missing-ocfs2_filesys-fs-parameter.patch
+Patch307: 0007-dx_dirs-more-library-support-for-directory-indexing.patch
+Patch308: 0008-dx_dirs-fsck.ocfs2-support.patch
+Patch309: 0009-dx_dirs-add-blocknr-in-callback-of-ocfs2_dir_iterate.patch
+Patch310: 0010-dx_dirs-add-disable-indexed-dirs-support-in-tunefs.o.patch
+Patch311: 0011-dx_dirs-build-indexed-trees-when-enabling-indexed-di.patch
+Patch312: 0012-dx_dirs-fix-return-value-of-walk_dirblock-when-enabl.patch
+Patch313: 0013-dx_dirs-try-to-install-dir-trailers-when-enable-inde.patch
+Patch314: 0014-dx_dirs-add-an-initial-man-page-entry-for-indexed-di.patch
+Patch315: 0015-fsck.ocfs2-prompt-before-truncating-an-invalid-dir-i.patch
+Patch316: 0016-tunefs.ocfs2-move-o2ne_add_tailers-into-libocfs2ne.c.patch
+Patch317: 0017-dx_dirs-add-check-for-invalid-slot-in-ocfs2_new_dx_r.patch
+Patch318: 0018-mkfs.ocfs2-create-root-and-orphan-directories-as-ind.patch
+Patch319: 0019-libocfs2-fix-flag-check-in-ocfs2_init_dir.patch
+Patch320: 0020-libocfs2-fix-ocfs2_init_dir-to-retain-indexed-flag.patch
+Patch321: 0021-fsck.ocfs2-verify-dirent-dx-entry-linkages.patch
+Patch322: 0022-dx_dirs-stop-iterate-dir-entries-for-I-O-error.patch
+Patch323: 0023-dx_dirs-check-callback-iter-dx_func-return-value-in-.patch
+Patch324: 0024-dx_dirs-remove-unncessary-return-value-assignment.patch
+Patch325: 0025-dx_dirs-unifiy-feature-string-of-indexed-dirs.patch
+Patch326: 0026-dx_dirs-Improve-information-displayed-by-dump_dx_roo.patch
+Patch327: 0027-dx_dirs-stop-iteration-of-dir-trailer-initialization.patch
+Patch328: 0028-dx_dirs-stop-dx-insert-iteration-for-callback-error.patch
+Patch329: 0029-dx_dirs-set-OCFS2_INDEXED_DIR_FL-after-indexed-tree-.patch
+Patch330: 0030-dx_dirs-fix-ocfs2_swap_dx_entry_list-for-big-endian.patch
+Patch331: 0031-dx_dirs-enable-metaecc-and-indexed-dirs-support-as-d.patch
+Patch401: version-1.4.3.patch
+Patch402: reflink-no-syscall.patch
+Patch500: fix-configure-check-libs.patch
+Patch501: gcc45-ftbfs-deb-565100.patch
Url: http://oss.oracle.com/projects/ocfs2-tools/
Requires: net-tools, modutils, e2fsprogs, /sbin/chkconfig, glib2 >= 2.2.3
PreReq: %insserv_prereq %fillup_prereq
AutoReqProv: on
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Requires: libdlm
+Requires: libdlm openais
%if %suse_version < 1120
# There's no separate kmp for openSUSE 11.2
Requires: ocfs2-kmp
@@ -120,34 +152,68 @@
Oracle Corporation
%prep
-%setup -n %{name}
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch99 -p1
-%patch100 -p1
+%setup -n %{name} -a 2
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
-%patch107 -p0
-%patch108 -p0
+%patch107 -p1
+%patch201 -p1
+%patch202 -p1
+%patch301 -p1
+%patch302 -p1
+%patch303 -p1
+%patch304 -p1
+%patch305 -p1
+%patch306 -p1
+%patch307 -p1
+%patch308 -p1
+%patch309 -p1
+%patch310 -p1
+%patch311 -p1
+%patch312 -p1
+%patch313 -p1
+%patch314 -p1
+%patch315 -p1
+%patch316 -p1
+%patch317 -p1
+%patch318 -p1
+%patch319 -p1
+%patch320 -p1
+%patch321 -p1
+%patch322 -p1
+%patch323 -p1
+%patch324 -p1
+%patch325 -p1
+%patch326 -p1
+%patch327 -p1
+%patch328 -p1
+%patch329 -p1
+%patch330 -p1
+%patch331 -p1
+%patch401 -p1
+%patch402 -p0
+%patch500 -p1
+%patch501 -p1
%build
-# disable as-needed to fix configure checks
-export SUSE_ASNEEDED=0
%{?suse_update_config:%{suse_update_config -f}}
export CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}"
export PROJECT="ocfs2-tools"
autoreconf -fi -I /usr/share/aclocal
-%configure --disable-debug --prefix=/usr --mandir=%{_mandir} \
- --enable-dynamic-fsck=yes --enable-dynamic-ctl=yes
+%configure --disable-debug --prefix=/usr --mandir=%{_mandir} --enable-dynamic-fsck=yes --enable-dynamic-ctl=yes
make OPTS="$RPM_OPT_FLAGS"
+cd reflink
+%configure --prefix=/usr --mandir=%{_mandir}
+make reflink
+cd ..
+
%install
mkdir -p $RPM_BUILD_ROOT/sbin
+mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
mkdir -p ${RPM_BUILD_ROOT}/var/adm/fillup-templates
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/
@@ -161,6 +227,11 @@
ln -sf ..%{_sysconfdir}/init.d/o2cb $RPM_BUILD_ROOT/sbin/rco2cb
ln -sf ..%{_sysconfdir}/init.d/ocfs2 $RPM_BUILD_ROOT/sbin/rcocfs2
make DESTDIR="$RPM_BUILD_ROOT" install
+
+cd reflink
+make DESTDIR="$RPM_BUILD_ROOT" install
+cd ..
+
mv $RPM_BUILD_ROOT/{,/usr}/sbin/o2image
mv $RPM_BUILD_ROOT/{,/usr}/sbin/debugfs.ocfs2
mv $RPM_BUILD_ROOT/{,/usr}/sbin/ocfs2_controld.pcmk
@@ -196,9 +267,11 @@
/sbin/mounted.ocfs2
/sbin/tunefs.ocfs2
/sbin/mount.ocfs2
+/sbin/ocfs2_hb_ctl
%{_sbindir}/o2image
%{_sbindir}/debugfs.ocfs2
%{_sbindir}/ocfs2_controld.pcmk
+%{_bindir}/reflink
%config %{_sysconfdir}/udev/rules.d/51-ocfs2.rules
%{_mandir}/man8/debugfs.ocfs2.8*
%{_mandir}/man8/fsck.ocfs2.8*
@@ -206,9 +279,10 @@
%{_mandir}/man8/mkfs.ocfs2.8*
%{_mandir}/man8/tunefs.ocfs2.8*
%{_mandir}/man8/mounted.ocfs2.8*
+%{_mandir}/man8/ocfs2_hb_ctl.8*
%{_mandir}/man8/mount.ocfs2.8*
%{_mandir}/man8/o2image.8.gz
-%doc README.O2CB COPYING CREDITS MAINTAINERS
+%doc COPYING CREDITS MAINTAINERS
%doc documentation/users_guide.txt
%dir /usr/lib/ocf
%dir /usr/lib/ocf/resource.d
@@ -226,13 +300,12 @@
/sbin/rco2cb
/sbin/rcocfs2
/sbin/o2cb_ctl
-/sbin/ocfs2_hb_ctl
%{_sysconfdir}/init.d/o2cb
%{_sysconfdir}/init.d/ocfs2
%{_mandir}/man8/o2cb_ctl.8*
-%{_mandir}/man8/ocfs2_hb_ctl.8*
/var/adm/fillup-templates/sysconfig.o2cb
%{_mandir}/man7/o2cb.7.gz
+%doc README.O2CB
%files devel
%defattr(-,root,root)
++++++ 0001-dx_dirs-Add-library-support-for-directory-indexing.patch ++++++
++++ 843 lines (skipped)
++++++ 0002-dx_dirs-debugfs.ocfs2-support.patch ++++++
>From b891260ad1500f3f2c0562d4376307b18bc4a9f4 Mon Sep 17 00:00:00 2001
From: Mark Fasheh <mfasheh(a)suse.com>
Date: Sun, 11 Apr 2010 16:09:59 +0800
Subject: [PATCH 02/30] dx_dirs: debugfs.ocfs2 support
This adds a full set of functionality to debugfs.ocfs2 so that we can
visualize and debug indexed directories. Aside
from updates to other commands to dump newly added/used fields in old
structures, we get the following debugfs.ocfs2 commands:
dx_space - Show all entries in the free list
dx_dump - Show the directory index (including root block)
dx_leaf - Show a single directory index leaf block
dx_root - Show directory index root block, as well as any extent blocks
for non-inline dx_roots.
[modified the patch for code rebase and cleanup -- Coly Li]
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
Signed-off-by: Coly Li <coly.li(a)suse.de>
---
debugfs.ocfs2/commands.c | 173 ++++++++++++++++++++++++++++++++++++++++++
debugfs.ocfs2/dump.c | 164 ++++++++++++++++++++++++++++++++++++++--
debugfs.ocfs2/include/dump.h | 5 +
3 files changed, 335 insertions(+), 7 deletions(-)
diff --git a/debugfs.ocfs2/commands.c b/debugfs.ocfs2/commands.c
index 1c19ab4..04e56b4 100644
--- a/debugfs.ocfs2/commands.c
+++ b/debugfs.ocfs2/commands.c
@@ -77,6 +77,10 @@ static void do_dirblocks(char **args);
static void do_xattr(char **args);
static void do_frag(char **args);
static void do_refcount(char **args);
+static void do_dx_root(char **args);
+static void do_dx_leaf(char **args);
+static void do_dx_dump(char **args);
+static void do_dx_space(char **args);
dbgfs_gbls gbls;
@@ -116,6 +120,10 @@ static Command commands[] = {
{ "dirblocks", do_dirblocks },
{ "frag", do_frag },
{ "refcount", do_refcount },
+ { "dx_root", do_dx_root },
+ { "dx_leaf", do_dx_leaf },
+ { "dx_dump", do_dx_dump },
+ { "dx_space", do_dx_space },
};
/*
@@ -842,6 +850,10 @@ static void do_help (char **args)
printf ("dlm_locks [-f <file>] [-l] lockname\t\t\tShow live dlm locking state\n");
printf ("dump [-p] <filespec> <outfile>\t\tDumps file to outfile on a mounted fs\n");
printf ("dirblocks <filespec>\t\t\tDump directory blocks\n");
+ printf ("dx_space <filespec>\t\t\tDump directory free space list\n");
+ printf ("dx_dump <blkno>\t\t\tShow directory index information\n");
+ printf ("dx_leaf <blkno>\t\t\tShow directory index leaf block only\n");
+ printf ("dx_root <blkno>\t\t\tShow directory index root block only\n");
printf ("encode <filespec>\t\t\tShow lock name\n");
printf ("extent <block#>\t\t\t\tShow extent block\n");
printf ("findpath <block#>\t\t\tList one pathname of the inode/lockname\n");
@@ -1316,6 +1328,167 @@ static void do_dirblocks (char **args)
}
/*
+ * do_dx_root()
+ *
+ */
+static void do_dx_root (char **args)
+{
+ struct ocfs2_dx_root_block *dx_root;
+ uint64_t blkno;
+ char *buf = NULL;
+ FILE *out;
+ errcode_t ret = 0;
+
+ if (process_inodestr_args(args, 1, &blkno) != 1)
+ return;
+
+ buf = gbls.blockbuf;
+ out = open_pager(gbls.interactive);
+
+ ret = ocfs2_read_dx_root(gbls.fs, blkno, buf);
+ if (ret) {
+ com_err(args[0], ret, "while reading dx dir root "
+ "block %"PRIu64"", blkno);
+ close_pager (out);
+ return;
+ }
+
+ dx_root = (struct ocfs2_dx_root_block *)buf;
+ dump_dx_root(out, dx_root);
+ if (!(dx_root->dr_flags & OCFS2_DX_FLAG_INLINE))
+ traverse_extents(gbls.fs, &dx_root->dr_list, out);
+ close_pager(out);
+
+ return;
+}
+
+/*
+ * do_dx_leaf()
+ *
+ */
+static void do_dx_leaf (char **args)
+{
+ struct ocfs2_dx_leaf *dx_leaf;
+ uint64_t blkno;
+ char *buf = NULL;
+ FILE *out;
+ errcode_t ret = 0;
+
+ if (process_inodestr_args(args, 1, &blkno) != 1)
+ return;
+
+ buf = gbls.blockbuf;
+ out = open_pager(gbls.interactive);
+
+ ret = ocfs2_read_dx_leaf(gbls.fs, blkno, buf);
+ if (ret) {
+ com_err(args[0], ret, "while reading dx dir leaf "
+ "block %"PRIu64"", blkno);
+ close_pager (out);
+ return;
+ }
+
+ dx_leaf = (struct ocfs2_dx_leaf *)buf;
+ dump_dx_leaf(out, dx_leaf);
+
+ close_pager(out);
+
+ return;
+}
+
+/*
+ * do_dx_dump()
+ *
+ */
+static void do_dx_dump (char **args)
+{
+ struct ocfs2_dinode *inode;
+ uint64_t ino_blkno;
+ char *buf = NULL;
+ FILE *out;
+ errcode_t ret = 0;
+
+ if (process_inode_args(args, &ino_blkno))
+ return;
+
+ out = open_pager(gbls.interactive);
+
+ buf = gbls.blockbuf;
+ ret = ocfs2_read_inode(gbls.fs, ino_blkno, buf);
+ if (ret) {
+ com_err(args[0], ret, "while reading inode %"PRIu64"",
+ ino_blkno);
+ close_pager (out);
+ return ;
+ }
+
+ inode = (struct ocfs2_dinode *)buf;
+
+ dump_dx_entries(out, inode);
+
+ close_pager(out);
+
+ return;
+}
+
+/*
+ * do_dx_space()
+ *
+ */
+static void do_dx_space (char **args)
+{
+ struct ocfs2_dinode *inode;
+ struct ocfs2_dx_root_block *dx_root;
+ uint64_t ino_blkno, dx_blkno;
+ char *buf = NULL, *dx_root_buf = NULL;
+ FILE *out;
+ errcode_t ret = 0;
+
+ if (process_inode_args(args, &ino_blkno))
+ return;
+
+ out = open_pager(gbls.interactive);
+
+ buf = gbls.blockbuf;
+ ret = ocfs2_read_inode(gbls.fs, ino_blkno, buf);
+ if (ret) {
+ com_err(args[0], ret, "while reading inode %"PRIu64"",
+ ino_blkno);
+ goto out;
+ }
+
+ inode = (struct ocfs2_dinode *)buf;
+ if (!(ocfs2_dir_indexed(inode))) {
+ fprintf(out, "Inode %"PRIu64" is not indexed\n", ino_blkno);
+ goto out;
+ }
+
+ ret = ocfs2_malloc_block(gbls.fs->fs_io, &dx_root_buf);
+ if (ret) {
+ goto out;
+ }
+
+ dx_blkno = (uint64_t) inode->i_dx_root;
+
+ ret = ocfs2_read_dx_root(gbls.fs, dx_blkno, dx_root_buf);
+ if (ret) {
+ com_err(args[0], ret, "while reading dx dir root "
+ "block %"PRIu64"", dx_blkno);
+ goto out;
+ }
+
+ dx_root = (struct ocfs2_dx_root_block *)dx_root_buf;
+
+ dump_dx_space(out, inode, dx_root);
+out:
+ close_pager(out);
+ if (dx_root_buf)
+ ocfs2_free(&dx_root_buf);
+
+ return;
+}
+
+/*
* do_extent()
*
*/
diff --git a/debugfs.ocfs2/dump.c b/debugfs.ocfs2/dump.c
index 7880991..2e887ce 100644
--- a/debugfs.ocfs2/dump.c
+++ b/debugfs.ocfs2/dump.c
@@ -99,6 +99,9 @@ void dump_super_block(FILE *out, struct ocfs2_super_block *sb)
fprintf(out, "%02X", sb->s_uuid[i]);
fprintf(out, "\n");
fprintf(out, "\tHash: %u (0x%x)\n", sb->s_uuid_hash, sb->s_uuid_hash);
+ for (i = 0; i < 3; i++)
+ fprintf(out, "\tDX Seed[%d]: 0x%08x\n", i, sb->s_dx_seed[i]);
+
if (ocfs2_userspace_stack(sb))
fprintf(out,
"\tCluster stack: %s\n"
@@ -315,6 +318,9 @@ void dump_inode(FILE *out, struct ocfs2_dinode *in)
if (in->i_dyn_features & OCFS2_INLINE_DATA_FL) {
fprintf(out, "\tInline Data Max: %u\n",
in->id2.i_data.id_count);
+ } else if (in->i_dyn_features & OCFS2_INDEXED_DIR_FL) {
+ fprintf(out, "\tIndexed Tree Root: %"PRIu64"\n",
+ (uint64_t)in->i_dx_root);
}
if (flags)
@@ -490,6 +496,21 @@ int dump_dir_entry (struct ocfs2_dir_entry *rec, int offset, int blocksize,
}
/*
+ * dump_dir_trailer()
+ */
+static void dump_dir_trailer(FILE *out, struct ocfs2_dir_block_trailer *trailer)
+{
+ fprintf(out,
+ "\tTrailer Block: %-15"PRIu64" Inode: %-15"PRIu64" rec_len: %-4u\n",
+ trailer->db_blkno, trailer->db_parent_dinode,
+ trailer->db_compat_rec_len);
+ fprintf(out,
+ "\tLargest hole: %u Next in list: %-15"PRIu64"\n",
+ trailer->db_free_rec_len, trailer->db_free_next);
+ dump_block_check(out, &trailer->db_check);
+}
+
+/*
* dump_dir_block()
*
*/
@@ -507,13 +528,9 @@ void dump_dir_block(FILE *out, char *buf)
};
if (!strncmp((char *)trailer->db_signature, OCFS2_DIR_TRAILER_SIGNATURE,
- sizeof(trailer->db_signature))) {
- fprintf(out,
- "\tTrailer Block: %-15"PRIu64" Inode: %-15"PRIu64" rec_len: %-4u\n",
- trailer->db_blkno, trailer->db_parent_dinode,
- trailer->db_compat_rec_len);
- dump_block_check(out, &trailer->db_check);
- } else
+ sizeof(trailer->db_signature)))
+ dump_dir_trailer(out, trailer);
+ else
end = gbls.fs->fs_blocksize;
fprintf(out, "\tEntries:\n");
@@ -533,6 +550,139 @@ void dump_dir_block(FILE *out, char *buf)
}
}
+static void dump_dx_entry(FILE *out, int i, struct ocfs2_dx_entry *dx_entry)
+{
+ fprintf(out, "\t %-2d (0x%08x 0x%08x) %-13"PRIu64"\n",
+ i, dx_entry->dx_major_hash, dx_entry->dx_minor_hash,
+ (uint64_t)dx_entry->dx_dirent_blk);
+}
+
+static void dump_dx_entry_list(FILE *out, struct ocfs2_dx_entry_list *dl_list,
+ int traverse)
+{
+ int i;
+
+ fprintf(out, "\tCount: %u Num Used: %u\n",
+ dl_list->de_count, dl_list->de_num_used);
+
+ if (traverse) {
+ fprintf(out, "\t## %-11s %-13s\n", "Hash (Major Minor)",
+ "Dir Block#");
+
+ for (i = 0; i < dl_list->de_num_used; i++)
+ dump_dx_entry(out, i, &dl_list->de_entries[i]);
+ }
+}
+
+void dump_dx_root(FILE *out, struct ocfs2_dx_root_block *dr)
+{
+ char tmp_str[30];
+ GString *flags = NULL;
+
+ flags = g_string_new(NULL);
+ if (dr->dr_flags & OCFS2_DX_FLAG_INLINE)
+ g_string_append(flags, "Inline ");
+
+ fprintf(out, "\tDir Index Root: %"PRIu64" FS Generation: %u (0x%x)\n",
+ (uint64_t)dr->dr_blkno, dr->dr_fs_generation,
+ dr->dr_fs_generation);
+
+ fprintf(out, "\tClusters: %u Last Extblk: %"PRIu64" "
+ "Dir Inode: %"PRIu64"\n",
+ dr->dr_clusters, (uint64_t)dr->dr_last_eb_blk,
+ (uint64_t)dr->dr_dir_blkno);
+
+ if (dr->dr_suballoc_slot == (uint16_t)OCFS2_INVALID_SLOT)
+ strcpy(tmp_str, "Global");
+ else
+ sprintf(tmp_str, "%d", dr->dr_suballoc_slot);
+ fprintf(out, "\tSub Alloc Slot: %s Sub Alloc Bit: %u "
+ "Flags: (0x%x) %s\n",
+ tmp_str, dr->dr_suballoc_bit, dr->dr_flags, flags->str);
+
+ dump_block_check(out, &dr->dr_check);
+
+ if (dr->dr_flags & OCFS2_DX_FLAG_INLINE)
+ dump_dx_entry_list(out, &dr->dr_entries, 0);
+
+ if (flags)
+ g_string_free(flags, 1);
+}
+
+void dump_dx_leaf (FILE *out, struct ocfs2_dx_leaf *dx_leaf)
+{
+ fprintf(out, "\tDir Index Leaf: %"PRIu64" FS Generation: %u (0x%x)\n",
+ (uint64_t)dx_leaf->dl_blkno, dx_leaf->dl_fs_generation,
+ dx_leaf->dl_fs_generation);
+ dump_block_check(out, &dx_leaf->dl_check);
+
+ dump_dx_entry_list(out, &dx_leaf->dl_list, 1);
+}
+
+static int entries_iter(ocfs2_filesys *fs,
+ struct ocfs2_dx_entry_list *entry_list,
+ struct ocfs2_dx_root_block *dx_root,
+ struct ocfs2_dx_leaf *dx_leaf,
+ void *priv_data)
+{
+ FILE *out = priv_data;
+
+ if (dx_leaf) {
+ dump_dx_leaf(out, dx_leaf);
+ return 0;
+ }
+
+ /* Inline entries. Dump the list directly. */
+ dump_dx_entry_list(out, entry_list, 1);
+
+ return 0;
+}
+
+void dump_dx_entries(FILE *out, struct ocfs2_dinode *inode)
+{
+ struct ocfs2_dx_root_block *dx_root;
+ uint64_t dx_blkno;
+ char *buf = NULL;
+ errcode_t ret = 0;
+
+ if (ocfs2_malloc_block(gbls.fs->fs_io, &buf))
+ return;
+
+ if (!(ocfs2_dir_indexed(inode)))
+ return;
+
+ dx_blkno = (uint64_t) inode->i_dx_root;
+
+ ret = ocfs2_read_dx_root(gbls.fs, dx_blkno, buf);
+ if (ret)
+ return;
+
+ dx_root = (struct ocfs2_dx_root_block *)buf;
+ dump_dx_root(out, dx_root);
+
+ ocfs2_dx_entries_iterate(gbls.fs, inode, 0, entries_iter, out);
+ return;
+}
+
+static int dx_space_iter(ocfs2_filesys *fs,
+ uint64_t blkno,
+ struct ocfs2_dir_block_trailer *trailer,
+ char *dirblock,
+ void *priv_data)
+{
+ FILE *out = priv_data;
+
+ dump_dir_trailer(out, trailer);
+
+ return 0;
+}
+
+void dump_dx_space(FILE *out, struct ocfs2_dinode *inode,
+ struct ocfs2_dx_root_block *dx_root)
+{
+ ocfs2_dx_frees_iterate(gbls.fs, inode, dx_root, 0, dx_space_iter, out);
+}
+
/*
* dump_jbd_header()
*
diff --git a/debugfs.ocfs2/include/dump.h b/debugfs.ocfs2/include/dump.h
index cb677c9..79b10b3 100644
--- a/debugfs.ocfs2/include/dump.h
+++ b/debugfs.ocfs2/include/dump.h
@@ -52,7 +52,12 @@ void dump_extent_block (FILE *out, struct ocfs2_extent_block *blk);
void dump_group_descriptor (FILE *out, struct ocfs2_group_desc *grp, int index);
int dump_dir_entry (struct ocfs2_dir_entry *rec, int offset, int blocksize,
char *buf, void *priv_data);
+void dump_dx_root (FILE *out, struct ocfs2_dx_root_block *dx_root);
+void dump_dx_leaf (FILE *out, struct ocfs2_dx_leaf *dx_leaf);
void dump_dir_block(FILE *out, char *buf);
+void dump_dx_entries(FILE *out, struct ocfs2_dinode *inode);
+void dump_dx_space(FILE *out, struct ocfs2_dinode *inode,
+ struct ocfs2_dx_root_block *dx_root);
void dump_jbd_header (FILE *out, journal_header_t *header);
void dump_jbd_superblock (FILE *out, journal_superblock_t *jsb);
void dump_jbd_block (FILE *out, journal_superblock_t *jsb,
--
1.7.0.2
++++++ 0003-dx_dirs-mkfs.ocfs2-support.patch ++++++
>From 585f52a5dfd8cb4301d29804e7e05ddff1f3fca1 Mon Sep 17 00:00:00 2001
From: Mark Fasheh <mfasheh(a)suse.com>
Date: Sun, 11 Apr 2010 16:10:00 +0800
Subject: [PATCH 03/30] dx_dirs: mkfs.ocfs2 support
This adds only basic support to mkfs.ocfs2 to write the seed fields used
in directory indexing. The feature string
'indexed-dirs' is already there from a previous patch, so it is possible
to create a new file system with the directory
indexing feature turned on.
Future improvements that are needed:
- mkfs.ocfs2 should create the root directory and orphan dirs as
indexed.
- possibly also we want to do this for the system dir, but that might
require some discussion.
[modified the patch for code rebase and cleanup -- Coly Li]
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
Signed-off-by: Coly Li <coly.li(a)suse.de>
---
mkfs.ocfs2/mkfs.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/mkfs.ocfs2/mkfs.c b/mkfs.ocfs2/mkfs.c
index 5d01e3e..b43a9ba 100644
--- a/mkfs.ocfs2/mkfs.c
+++ b/mkfs.ocfs2/mkfs.c
@@ -1004,6 +1004,8 @@ get_state(int argc, char **argv)
if ((optind == argc) && !show_version)
usage(progname);
+ srand48(time(NULL));
+
device_name = argv[optind];
optind++;
@@ -2240,11 +2242,9 @@ format_superblock(State *s, SystemFileDiskRecord *rec,
*/
s->feature_flags.opt_compat &= ~OCFS2_FEATURE_COMPAT_BACKUP_SB;
- if (s->feature_flags.opt_incompat & OCFS2_FEATURE_INCOMPAT_XATTR) {
+ if (s->feature_flags.opt_incompat & OCFS2_FEATURE_INCOMPAT_XATTR)
di->id2.i_super.s_xattr_inline_size =
OCFS2_MIN_XATTR_INLINE_SIZE;
- di->id2.i_super.s_uuid_hash = ocfs2_xattr_uuid_hash(s->uuid);
- }
di->id2.i_super.s_feature_incompat = s->feature_flags.opt_incompat;
di->id2.i_super.s_feature_compat = s->feature_flags.opt_compat;
@@ -2253,6 +2253,17 @@ format_superblock(State *s, SystemFileDiskRecord *rec,
strcpy((char *)di->id2.i_super.s_label, s->vol_label);
memcpy(di->id2.i_super.s_uuid, s->uuid, 16);
+ /* s_uuid_hash is also used by Indexed Dirs */
+ if (s->feature_flags.opt_incompat & OCFS2_FEATURE_INCOMPAT_XATTR ||
+ s->feature_flags.opt_incompat & OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS)
+ di->id2.i_super.s_uuid_hash = ocfs2_xattr_uuid_hash(s->uuid);
+
+ if (s->feature_flags.opt_incompat & OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS) {
+ di->id2.i_super.s_dx_seed[0] = mrand48();
+ di->id2.i_super.s_dx_seed[1] = mrand48();
+ di->id2.i_super.s_dx_seed[2] = mrand48();
+ }
+
mkfs_swap_inode_from_cpu(s, di);
mkfs_compute_meta_ecc(s, di, &di->i_check);
do_pwrite(s, di, s->blocksize, super_off);
--
1.7.0.2
++++++ 0004-dx_dirs-Add-tunefs.ocfs2-feature-for-indexed-directo.patch ++++++
>From 0afd7bae3557bd443eac4e388c0c3cbf47690e5d Mon Sep 17 00:00:00 2001
From: Mark Fasheh <mfasheh(a)suse.com>
Date: Sun, 11 Apr 2010 16:10:01 +0800
Subject: [PATCH 04/30] dx_dirs: Add tunefs.ocfs2 feature for indexed directories
This only enables them for now. Disabling is a bit more involved, and
will come later.
[modified the patch for code rebase and cleanup -- Coly Li]
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
Signed-off-by: Coly Li <coly.li(a)suse.de>
---
tunefs.ocfs2/Makefile | 1 +
tunefs.ocfs2/feature_indexed_dirs.c | 89 +++++++++++++++++++++++++++++++++++
tunefs.ocfs2/op_features.c | 2 +
3 files changed, 92 insertions(+), 0 deletions(-)
create mode 100644 tunefs.ocfs2/feature_indexed_dirs.c
diff --git a/tunefs.ocfs2/Makefile b/tunefs.ocfs2/Makefile
index dad7034..6219af6 100644
--- a/tunefs.ocfs2/Makefile
+++ b/tunefs.ocfs2/Makefile
@@ -26,6 +26,7 @@ OCFS2NE_FEATURES = \
feature_sparse_files \
feature_unwritten_extents \
feature_xattr \
+ feature_indexed_dirs \
feature_quota
OCFS2NE_OPERATIONS = \
diff --git a/tunefs.ocfs2/feature_indexed_dirs.c b/tunefs.ocfs2/feature_indexed_dirs.c
new file mode 100644
index 0000000..368eb87
--- /dev/null
+++ b/tunefs.ocfs2/feature_indexed_dirs.c
@@ -0,0 +1,89 @@
+/* -*- mode: c; c-basic-offset: 8; -*-
+ * vim: noexpandtab sw=8 ts=8 sts=0:
+ *
+ * feature_indexed_dirs.c
+ *
+ * ocfs2 tune utility for enabling and disabling the directory indexing
+ * feature.
+ *
+ * Copyright (C) 2009 Novell. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <inttypes.h>
+#include <assert.h>
+
+#include "ocfs2/ocfs2.h"
+
+#include "libocfs2ne.h"
+
+
+static int enable_indexed_dirs(ocfs2_filesys *fs, int flags)
+{
+ errcode_t ret = 0;
+ struct ocfs2_super_block *super = OCFS2_RAW_SB(fs->fs_super);
+ struct tools_progress *prog;
+
+ if (ocfs2_supports_indexed_dirs(super)) {
+ verbosef(VL_APP,
+ "Directory indexing feature is already enabled; "
+ "nothing to enable\n");
+ goto out;
+ }
+
+
+ if (!tools_interact("Enable the directory indexing feature on "
+ "device \"%s\"? ",
+ fs->fs_devname))
+ goto out;
+
+ prog = tools_progress_start("Enable directory indexing", "dir idx", 1);
+ if (!prog) {
+ ret = TUNEFS_ET_NO_MEMORY;
+ tcom_err(ret, "while initializing the progress display");
+ goto out;
+ }
+
+ OCFS2_SET_INCOMPAT_FEATURE(super,
+ OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS);
+ tunefs_block_signals();
+ ret = ocfs2_write_super(fs);
+ tunefs_unblock_signals();
+ if (ret)
+ tcom_err(ret, "while writing out the superblock");
+
+ tools_progress_step(prog, 1);
+ tools_progress_stop(prog);
+out:
+ return ret;
+}
+
+/*
+ * TUNEFS_FLAG_ALLOCATION because disabling will want to dealloc
+ * blocks.
+ */
+DEFINE_TUNEFS_FEATURE_INCOMPAT(indexed_dirs,
+ OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS,
+ TUNEFS_FLAG_RW | TUNEFS_FLAG_ALLOCATION,
+ enable_indexed_dirs,
+ NULL);
+
+#ifdef DEBUG_EXE
+int main(int argc, char *argv[])
+{
+ return tunefs_feature_main(argc, argv, &indexed_dirs_feature);
+}
+#endif
diff --git a/tunefs.ocfs2/op_features.c b/tunefs.ocfs2/op_features.c
index 91abca1..613ea7e 100644
--- a/tunefs.ocfs2/op_features.c
+++ b/tunefs.ocfs2/op_features.c
@@ -44,6 +44,7 @@ extern struct tunefs_feature xattr_feature;
extern struct tunefs_feature usrquota_feature;
extern struct tunefs_feature grpquota_feature;
extern struct tunefs_feature refcount_feature;
+extern struct tunefs_feature indexed_dirs_feature;
/* List of features supported by ocfs2ne */
static struct tunefs_feature *features[] = {
@@ -58,6 +59,7 @@ static struct tunefs_feature *features[] = {
&usrquota_feature,
&grpquota_feature,
&refcount_feature,
+ &indexed_dirs_feature,
NULL,
};
--
1.7.0.2
++++++ 0005-dx_dirs-Update-for-dr_num_entries.patch ++++++
>From 56f5ac553c2686271b657ed8be4f8ca001aa7ed6 Mon Sep 17 00:00:00 2001
From: Mark Fasheh <mfasheh(a)suse.com>
Date: Sun, 11 Apr 2010 16:10:02 +0800
Subject: [PATCH 05/30] dx_dirs: Update for dr_num_entries
This just adds the new field, swaps it appropriately, and prints it in
debuggs.
[Modified the patch for code rebase and cleanup -- Coly Li]
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
Signed-off-by: Coly Li <coly.li(a)suse.de>
---
debugfs.ocfs2/dump.c | 2 ++
include/ocfs2-kernel/ocfs2_fs.h | 5 ++++-
libocfs2/dirblock.c | 1 +
3 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/debugfs.ocfs2/dump.c b/debugfs.ocfs2/dump.c
index 2e887ce..88ec430 100644
--- a/debugfs.ocfs2/dump.c
+++ b/debugfs.ocfs2/dump.c
@@ -600,6 +600,8 @@ void dump_dx_root(FILE *out, struct ocfs2_dx_root_block *dr)
"Flags: (0x%x) %s\n",
tmp_str, dr->dr_suballoc_bit, dr->dr_flags, flags->str);
+ fprintf(out, "\tTotal Entry Count: %d\n", dr->dr_num_entries);
+
dump_block_check(out, &dr->dr_check);
if (dr->dr_flags & OCFS2_DX_FLAG_INLINE)
diff --git a/include/ocfs2-kernel/ocfs2_fs.h b/include/ocfs2-kernel/ocfs2_fs.h
index d4de181..f3c2450 100644
--- a/include/ocfs2-kernel/ocfs2_fs.h
+++ b/include/ocfs2-kernel/ocfs2_fs.h
@@ -810,7 +810,10 @@ struct ocfs2_dx_root_block {
__u8 dr_reserved0;
__le16 dr_reserved1;
__le64 dr_dir_blkno; /* Pointer to parent inode */
- __le64 dr_reserved2;
+ __le32 dr_num_entries; /* Total number of
+ * names stored in
+ * this directory.*/
+ __le32 dr_reserved2;
__le64 dr_free_blk; /* Pointer to head of free
* unindexed block list. */
__le64 dr_reserved3[15];
diff --git a/libocfs2/dirblock.c b/libocfs2/dirblock.c
index d68e5c0..4bf48f3 100644
--- a/libocfs2/dirblock.c
+++ b/libocfs2/dirblock.c
@@ -266,6 +266,7 @@ static void ocfs2_swap_dx_root_to_cpu(struct ocfs2_dx_root_block *dx_root)
dx_root->dr_last_eb_blk = bswap_64(dx_root->dr_last_eb_blk);
dx_root->dr_clusters = bswap_32(dx_root->dr_clusters);
dx_root->dr_dir_blkno = bswap_64(dx_root->dr_dir_blkno);
+ dx_root->dr_num_entries = bswap_32(dx_root->dr_num_entries);
dx_root->dr_free_blk = bswap_64(dx_root->dr_free_blk);
if (dx_root->dr_flags & OCFS2_DX_FLAG_INLINE)
--
1.7.0.2
++++++ 0006-dx_dirs-add-missing-ocfs2_filesys-fs-parameter.patch ++++++
>From 5110de09d64c84037e7e2ecdf76ab2d0d0f77ff4 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Sun, 11 Apr 2010 16:10:03 +0800
Subject: [PATCH 06/30] dx_dirs: add missing 'ocfs2_filesys *fs' parameter
This patch add 'ocfs2_filesys *fs' parameter to
ocfs2_swap_dx_root_to_cpu(), and fix the mismatched arguments when
alling ocfs2_swap_extent_list_to_cpu().
Signed-off-by: Coly Li <coly.li(a)suse.de>
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
libocfs2/dirblock.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libocfs2/dirblock.c b/libocfs2/dirblock.c
index 4bf48f3..06a1b64 100644
--- a/libocfs2/dirblock.c
+++ b/libocfs2/dirblock.c
@@ -254,7 +254,8 @@ static void ocfs2_swap_dx_entry_list_to_cpu(struct ocfs2_dx_entry_list *dl_list)
ocfs2_swap_dx_entry_to_cpu(&dl_list->de_entries[i]);
}
-static void ocfs2_swap_dx_root_to_cpu(struct ocfs2_dx_root_block *dx_root)
+static void ocfs2_swap_dx_root_to_cpu(ocfs2_filesys *fs,
+ struct ocfs2_dx_root_block *dx_root)
{
if (cpu_is_little_endian)
return;
@@ -272,7 +273,7 @@ static void ocfs2_swap_dx_root_to_cpu(struct ocfs2_dx_root_block *dx_root)
if (dx_root->dr_flags & OCFS2_DX_FLAG_INLINE)
ocfs2_swap_dx_entry_list_to_cpu(&dx_root->dr_entries);
else
- ocfs2_swap_extent_list_to_cpu(&dx_root->dr_list);
+ ocfs2_swap_extent_list_to_cpu(fs, dx_root, &dx_root->dr_list);
}
errcode_t ocfs2_read_dx_root(ocfs2_filesys *fs, uint64_t block,
@@ -294,7 +295,7 @@ errcode_t ocfs2_read_dx_root(ocfs2_filesys *fs, uint64_t block,
strlen(OCFS2_DX_ROOT_SIGNATURE)))
return OCFS2_ET_DIR_CORRUPTED;
- ocfs2_swap_dx_root_to_cpu(dx_root);
+ ocfs2_swap_dx_root_to_cpu(fs, dx_root);
return 0;
}
--
1.7.0.2
++++++ 0007-dx_dirs-more-library-support-for-directory-indexing.patch ++++++
++++ 2767 lines (skipped)
++++++ 0008-dx_dirs-fsck.ocfs2-support.patch ++++++
>From 2bbbdef8534534b12cf3dd3ad9db6a1ebd74d0a3 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Sun, 11 Apr 2010 16:10:05 +0800
Subject: [PATCH 08/30] dx_dirs: fsck.ocfs2 support
This patch does a basic indexed dirs support in fsck.ocfs2.
During pass2, if a directory block is changed, and indexed dirs in
enabled, the indexed tree of this directory will be
truncate, then rebuild with the modified directory data. All the
modified directories' inode numbers are recored in a
rb-tree, when all directories get scanned, truncate and rebuild the
directories whose inode recorded in the rb-tree.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
fsck.ocfs2/dirblocks.c | 125 ++++++++++++++++++++++++++++++++++++++-
fsck.ocfs2/include/dirblocks.h | 4 +
fsck.ocfs2/pass1.c | 54 +++++++++++++++++
fsck.ocfs2/pass1b.c | 4 +-
fsck.ocfs2/pass2.c | 48 +++++++++++++++-
fsck.ocfs2/pass3.c | 1 +
fsck.ocfs2/pass4.c | 1 +
7 files changed, 229 insertions(+), 8 deletions(-)
diff --git a/fsck.ocfs2/dirblocks.c b/fsck.ocfs2/dirblocks.c
index 1fd5560..085dd1f 100644
--- a/fsck.ocfs2/dirblocks.c
+++ b/fsck.ocfs2/dirblocks.c
@@ -34,6 +34,7 @@
#include "fsck.h"
#include "dirblocks.h"
#include "util.h"
+#include "extent.h"
errcode_t o2fsck_add_dir_block(o2fsck_dirblocks *db, uint64_t ino,
uint64_t blkno, uint64_t blkcount)
@@ -43,11 +44,9 @@ errcode_t o2fsck_add_dir_block(o2fsck_dirblocks *db, uint64_t ino,
o2fsck_dirblock_entry *dbe, *tmp_dbe;
errcode_t ret = 0;
- dbe = calloc(1, sizeof(*dbe));
- if (dbe == NULL) {
- ret = OCFS2_ET_NO_MEMORY;
+ ret = ocfs2_malloc0(sizeof(o2fsck_dirblock_entry), &dbe);
+ if (ret)
goto out;
- }
dbe->e_ino = ino;
dbe->e_blkno = blkno;
@@ -134,6 +133,73 @@ static int try_to_cache(ocfs2_filesys *fs, struct rb_node *node,
return cached_blocks;
}
+uint64_t o2fsck_search_reidx_dir(struct rb_root *root, uint64_t dino)
+{
+ struct rb_node *node = root->rb_node;
+ o2fsck_dirblock_entry *dbe;
+
+ while (node) {
+ dbe = rb_entry(node, o2fsck_dirblock_entry, e_node);
+
+ if (dino < dbe->e_ino)
+ node = node->rb_left;
+ else if (dino > dbe->e_ino)
+ node = node->rb_right;
+ else
+ return dbe->e_ino;
+ }
+ return 0;
+}
+
+static errcode_t o2fsck_add_reidx_dir_ino(struct rb_root *root, uint64_t dino)
+{
+ struct rb_node **p = &root->rb_node;
+ struct rb_node *parent = NULL;
+ o2fsck_dirblock_entry *dp, *tmp_dp;
+ errcode_t ret = 0;
+
+ ret = ocfs2_malloc0(sizeof (o2fsck_dirblock_entry), &dp);
+ if (ret)
+ goto out;
+
+ dp->e_ino = dino;
+
+ while(*p)
+ {
+ parent = *p;
+ tmp_dp = rb_entry(parent, o2fsck_dirblock_entry, e_node);
+
+ if (dp->e_ino < tmp_dp->e_ino)
+ p = &(*p)->rb_left;
+ else if (dp->e_ino > tmp_dp->e_ino)
+ p = &(*p)->rb_right;
+ else {
+ ret = OCFS2_ET_INTERNAL_FAILURE;
+ ocfs2_free(&dp);
+ goto out;
+ }
+ }
+
+ rb_link_node(&dp->e_node, parent, p);
+ rb_insert_color(&dp->e_node, root);
+
+out:
+ return ret;
+}
+
+errcode_t o2fsck_try_add_reidx_dir(struct rb_root *root, uint64_t dino)
+{
+ errcode_t ret = 0;
+ uint64_t ino;
+ ino = o2fsck_search_reidx_dir(root, dino);
+ if (ino)
+ goto out;
+ ret = o2fsck_add_reidx_dir_ino(root, dino);
+
+out:
+ return ret;
+}
+
void o2fsck_dir_block_iterate(o2fsck_state *ost, dirblock_iterator func,
void *priv_data)
{
@@ -174,3 +240,54 @@ void o2fsck_dir_block_iterate(o2fsck_state *ost, dirblock_iterator func,
if (pre_cache_buf)
ocfs2_free(&pre_cache_buf);
}
+
+static errcode_t ocfs2_rebuild_indexed_dir(ocfs2_filesys *fs, uint64_t ino)
+{
+ errcode_t ret = 0;
+ char *di_buf = NULL;
+ struct ocfs2_dinode *di;
+
+
+ ret = ocfs2_malloc_block(fs->fs_io, &di_buf);
+ if (ret)
+ goto out;
+
+ ret = ocfs2_read_inode(fs, ino, di_buf);
+ if (ret)
+ goto out;
+ di = (struct ocfs2_dinode *)di_buf;
+
+ /* do not rebuild indexed tree for inline directory */
+ if (di->i_dyn_features & OCFS2_INLINE_DATA_FL)
+ goto out;
+
+ ret = ocfs2_dx_dir_truncate(fs, ino);
+ if (ret)
+ goto out;
+
+ ret = ocfs2_dx_dir_build(fs, ino);
+out:
+ if (di_buf)
+ ocfs2_free(&di_buf);
+ return ret;
+}
+
+
+errcode_t o2fsck_rebuild_indexed_dirs(ocfs2_filesys *fs, struct rb_root *root)
+{
+ struct rb_node *node;
+ o2fsck_dirblock_entry *dbe;
+ uint64_t ino;
+ errcode_t ret = 0;
+
+ for (node = rb_first(root); node; node = rb_next(node)) {
+ dbe = rb_entry(node, o2fsck_dirblock_entry, e_node);
+ ino = dbe->e_ino;
+ ret = ocfs2_rebuild_indexed_dir(fs, ino);
+ if (ret)
+ goto out;
+ }
+out:
+ return ret;
+}
+
diff --git a/fsck.ocfs2/include/dirblocks.h b/fsck.ocfs2/include/dirblocks.h
index 7b3a2e9..f85974f 100644
--- a/fsck.ocfs2/include/dirblocks.h
+++ b/fsck.ocfs2/include/dirblocks.h
@@ -48,6 +48,10 @@ struct _o2fsck_state;
void o2fsck_dir_block_iterate(struct _o2fsck_state *ost, dirblock_iterator func,
void *priv_data);
+uint64_t o2fsck_search_reidx_dir(struct rb_root *root, uint64_t dino);
+errcode_t o2fsck_try_add_reidx_dir(struct rb_root *root, uint64_t dino);
+errcode_t o2fsck_rebuild_indexed_dirs(ocfs2_filesys *fs, struct rb_root *root);
+errcode_t o2fsck_check_dir_index(struct _o2fsck_state *ost, struct ocfs2_dinode *di);
#endif /* __O2FSCK_DIRBLOCKS_H__ */
diff --git a/fsck.ocfs2/pass1.c b/fsck.ocfs2/pass1.c
index 00f3d54..b53b908 100644
--- a/fsck.ocfs2/pass1.c
+++ b/fsck.ocfs2/pass1.c
@@ -781,6 +781,53 @@ static int clear_block(ocfs2_filesys *fs,
return 0;
}
+
+static errcode_t o2fsck_check_dx_dir(o2fsck_state *ost, struct ocfs2_dinode *di)
+{
+ errcode_t ret = 0;
+ char *buf = NULL;
+ struct ocfs2_dx_root_block *dx_root;
+ ocfs2_filesys *fs = ost->ost_fs;
+ struct extent_info ei = {0,};
+ int changed = 0;
+
+ if (!ocfs2_supports_indexed_dirs(OCFS2_RAW_SB(fs->fs_super)))
+ goto out;
+
+ if (!ocfs2_dir_indexed(di))
+ goto out;
+
+ ret = ocfs2_malloc_block(fs->fs_io, &buf);
+ if (ret)
+ goto out;
+
+ ret = ocfs2_read_dx_root(fs, (uint64_t)di->i_dx_root, buf);
+ if (ret)
+ goto out;
+
+ dx_root = (struct ocfs2_dx_root_block *)buf;
+ if (dx_root->dr_flags & OCFS2_DX_FLAG_INLINE)
+ goto out;
+
+ ret = check_el(ost, &ei, di->i_blkno, &dx_root->dr_list,
+ ocfs2_extent_recs_per_dx_root(fs->fs_blocksize),
+ &changed);
+ if (ret)
+ goto out;
+
+ if (changed) {
+ ret = ocfs2_write_dx_root(fs, (uint64_t)di->i_dx_root, (char *)dx_root);
+ if (ret)
+ com_err(whoami, ret, "while writing an updated "
+ "dx_root block at %"PRIu64" for inode %"PRIu64,
+ (uint64_t)di->i_dx_root, (uint64_t)di->i_blkno);
+ }
+out:
+ if (buf)
+ ocfs2_free(&buf);
+ return ret;
+}
+
/*
* this verifies i_size and i_clusters for inodes that use i_list to
* reference extents of data.
@@ -836,6 +883,13 @@ static errcode_t o2fsck_check_blocks(ocfs2_filesys *fs, o2fsck_state *ost,
goto out;
}
+ ret = o2fsck_check_dx_dir(ost, di);
+ if (ret) {
+ com_err(whoami, ret, "while iterating over the dir indexed "
+ "tree for directory inode %"PRIu64, (uint64_t)di->i_blkno);
+ goto out;
+ }
+
if (S_ISLNK(di->i_mode))
check_link_data(&vb);
diff --git a/fsck.ocfs2/pass1b.c b/fsck.ocfs2/pass1b.c
index 0ea87b4..3ca1d7d 100644
--- a/fsck.ocfs2/pass1b.c
+++ b/fsck.ocfs2/pass1b.c
@@ -902,8 +902,8 @@ static void name_inode(struct dir_scan_context *scan,
pass1c_warn(OCFS2_ET_NO_MEMORY);
}
-static int walk_iterate(struct ocfs2_dir_entry *de, int offset,
- int blocksize, char *buf, void *priv_data)
+static int walk_iterate(struct ocfs2_dir_entry *de, uint64_t blocknr,
+ int offset, int blocksize, char *buf, void *priv_data)
{
struct dir_scan_context *scan = priv_data;
diff --git a/fsck.ocfs2/pass2.c b/fsck.ocfs2/pass2.c
index d61c501..58efcd4 100644
--- a/fsck.ocfs2/pass2.c
+++ b/fsck.ocfs2/pass2.c
@@ -36,6 +36,7 @@
#include <time.h>
#include "ocfs2/ocfs2.h"
+#include "ocfs2/kernel-rbtree.h"
#include "dirparents.h"
#include "icount.h"
@@ -70,6 +71,7 @@ struct dirblock_data {
errcode_t ret;
o2fsck_strings strings;
uint64_t last_ino;
+ struct rb_root re_idx_dirs;
};
static int dirent_has_dots(struct ocfs2_dir_entry *dirent, int num_dots)
@@ -833,10 +835,11 @@ next:
}
if (ocfs2_dir_has_trailer(dd->fs, di))
- fix_dir_trailer(dd->ost, dbe,
+ fix_dir_trailer(dd->ost,
+ dbe,
ocfs2_dir_trailer_from_block(dd->fs,
dd->dirblock_buf),
- &ret_flags);
+ &ret_flags);
if (ret_flags & OCFS2_DIRENT_CHANGED) {
if (di->i_dyn_features & OCFS2_INLINE_DATA_FL) {
@@ -851,15 +854,47 @@ next:
com_err(whoami, ret, "while writing dir block %"PRIu64,
dbe->e_blkno);
dd->ost->ost_write_error = 1;
+ goto out;
+ }
+
+ if (ocfs2_supports_indexed_dirs(OCFS2_RAW_SB(dd->fs->fs_super)) &&
+ !(di->i_dyn_features & OCFS2_INLINE_DATA_FL) &&
+ (di->i_dyn_features & OCFS2_INDEXED_DIR_FL)) {
+ ret = o2fsck_try_add_reidx_dir(&dd->re_idx_dirs, dbe->e_ino);
+ if (ret) {
+ com_err(whoami, ret, "while adding block for "
+ "directory inode %"PRIu64" to rebuild "
+ "dir index", dbe->e_ino);
+ goto out;
+ }
}
}
+ /* truncate invalid indexed tree */
+ if ((!ocfs2_supports_indexed_dirs(OCFS2_RAW_SB(dd->fs->fs_super)))&&
+ di->i_dyn_features & OCFS2_INDEXED_DIR_FL ) {
+ /* ignore the return value */
+ ocfs2_dx_dir_truncate(dd->fs, dbe->e_ino);
+ }
+
out:
if (ret)
dd->ret = ret;
return ret_flags;
}
+static void release_re_idx_dirs_rbtree(struct rb_root * root)
+{
+ struct rb_node *node;
+ o2fsck_dirblock_entry *dp;
+
+ while ((node = rb_first(root)) != NULL) {
+ dp = rb_entry(node, o2fsck_dirblock_entry, e_node);
+ rb_erase(&dp->e_node, root);
+ ocfs2_free(&dp);
+ }
+}
+
errcode_t o2fsck_pass2(o2fsck_state *ost)
{
o2fsck_dir_parent *dp;
@@ -868,6 +903,7 @@ errcode_t o2fsck_pass2(o2fsck_state *ost)
.ost = ost,
.fs = ost->ost_fs,
.last_ino = 0,
+ .re_idx_dirs = RB_ROOT,
};
printf("Pass 2: Checking directory entries.\n");
@@ -905,6 +941,14 @@ errcode_t o2fsck_pass2(o2fsck_state *ost)
dp->dp_dirent = ost->ost_fs->fs_sysdir_blkno;
o2fsck_dir_block_iterate(ost, pass2_dir_block_iterate, &dd);
+
+ if (dd.re_idx_dirs.rb_node) {
+ ret = o2fsck_rebuild_indexed_dirs(ost->ost_fs, &dd.re_idx_dirs);
+ if (ret)
+ com_err(whoami, ret, "while rebuild indexed dirs.");
+ }
+ release_re_idx_dirs_rbtree(&dd.re_idx_dirs);
+
o2fsck_strings_free(&dd.strings);
out:
if (dd.dirblock_buf)
diff --git a/fsck.ocfs2/pass3.c b/fsck.ocfs2/pass3.c
index 457f312..94d9fbd 100644
--- a/fsck.ocfs2/pass3.c
+++ b/fsck.ocfs2/pass3.c
@@ -193,6 +193,7 @@ struct fix_dot_dot_args {
};
static int fix_dot_dot_dirent(struct ocfs2_dir_entry *dirent,
+ uint64_t blocknr,
int offset,
int blocksize,
char *buf,
diff --git a/fsck.ocfs2/pass4.c b/fsck.ocfs2/pass4.c
index d713d13..5ca4f17 100644
--- a/fsck.ocfs2/pass4.c
+++ b/fsck.ocfs2/pass4.c
@@ -101,6 +101,7 @@ out:
}
static int replay_orphan_iterate(struct ocfs2_dir_entry *dirent,
+ uint64_t blocknr,
int offset,
int blocksize,
char *buf,
--
1.7.0.2
++++++ 0009-dx_dirs-add-blocknr-in-callback-of-ocfs2_dir_iterate.patch ++++++
>From c797d07a1021d5c3a5541236739dabb5dfd4c620 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Sun, 11 Apr 2010 16:10:06 +0800
Subject: [PATCH 09/30] dx_dirs: add 'blocknr' in callback of ocfs2_dir_iterate()
In order to make ocfs2_dx_dir_insert() easier to set the dir block
number to a dx record, a new parameter 'uint64_t
blocknr' is added into the call back function parameter of
ocfs2_dir_iterate(). This patch includes (part of) the
related changes which are not mentioned in previous patches.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
debugfs.ocfs2/dump.c | 6 +++---
debugfs.ocfs2/find_inode_paths.c | 3 ++-
debugfs.ocfs2/include/dump.h | 2 +-
debugfs.ocfs2/utils.c | 4 ++--
extras/find_hardlinks.c | 1 +
extras/find_inode_paths.c | 1 +
fswreck/dir.c | 3 +++
ocfs2console/ocfs2interface/ocfs2module.c | 1 +
tunefs.ocfs2/feature_quota.c | 3 ++-
tunefs.ocfs2/op_list_sparse_files.c | 4 ++--
tunefs.ocfs2/op_set_slot_count.c | 10 ++++++----
11 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/debugfs.ocfs2/dump.c b/debugfs.ocfs2/dump.c
index 88ec430..d55fc0e 100644
--- a/debugfs.ocfs2/dump.c
+++ b/debugfs.ocfs2/dump.c
@@ -461,8 +461,8 @@ void dump_group_descriptor (FILE *out, struct ocfs2_group_desc *grp,
* dump_dir_entry()
*
*/
-int dump_dir_entry (struct ocfs2_dir_entry *rec, int offset, int blocksize,
- char *buf, void *priv_data)
+int dump_dir_entry (struct ocfs2_dir_entry *rec, uint64_t blocknr, int offset,
+ int blocksize, char *buf, void *priv_data)
{
list_dir_opts *ls = (list_dir_opts *)priv_data;
char tmp = rec->name[rec->name_len];
@@ -544,7 +544,7 @@ void dump_dir_block(FILE *out, char *buf)
return;
}
- dump_dir_entry(dirent, offset, gbls.fs->fs_blocksize, NULL,
+ dump_dir_entry(dirent, 0, offset, gbls.fs->fs_blocksize, NULL,
&ls_opts);
offset += dirent->rec_len;
}
diff --git a/debugfs.ocfs2/find_inode_paths.c b/debugfs.ocfs2/find_inode_paths.c
index e2d0e7d..cf9e88a 100644
--- a/debugfs.ocfs2/find_inode_paths.c
+++ b/debugfs.ocfs2/find_inode_paths.c
@@ -38,7 +38,8 @@ struct walk_path {
uint64_t *inode;
};
-static int walk_tree_func(struct ocfs2_dir_entry *dentry, int offset,
+static int walk_tree_func(struct ocfs2_dir_entry *dentry,
+ uint64_t blocknr, int offset,
int blocksize, char *buf, void *priv_data)
{
errcode_t ret;
diff --git a/debugfs.ocfs2/include/dump.h b/debugfs.ocfs2/include/dump.h
index 79b10b3..ae7b34a 100644
--- a/debugfs.ocfs2/include/dump.h
+++ b/debugfs.ocfs2/include/dump.h
@@ -50,7 +50,7 @@ void dump_extent_list (FILE *out, struct ocfs2_extent_list *ext);
void dump_chain_list (FILE *out, struct ocfs2_chain_list *cl);
void dump_extent_block (FILE *out, struct ocfs2_extent_block *blk);
void dump_group_descriptor (FILE *out, struct ocfs2_group_desc *grp, int index);
-int dump_dir_entry (struct ocfs2_dir_entry *rec, int offset, int blocksize,
+int dump_dir_entry (struct ocfs2_dir_entry *rec, uint64_t blocknr, int offset, int blocksize,
char *buf, void *priv_data);
void dump_dx_root (FILE *out, struct ocfs2_dx_root_block *dx_root);
void dump_dx_leaf (FILE *out, struct ocfs2_dx_leaf *dx_leaf);
diff --git a/debugfs.ocfs2/utils.c b/debugfs.ocfs2/utils.c
index 6107d9e..2c5b588 100644
--- a/debugfs.ocfs2/utils.c
+++ b/debugfs.ocfs2/utils.c
@@ -674,8 +674,8 @@ bail:
* Copyright (C) 1994 Theodore Ts'o. This file may be redistributed
* under the terms of the GNU Public License.
*/
-static int rdump_dirent(struct ocfs2_dir_entry *rec, int offset, int blocksize,
- char *buf, void *priv_data)
+static int rdump_dirent(struct ocfs2_dir_entry *rec, uint64_t blocknr,
+ int offset, int blocksize, char *buf, void *priv_data)
{
rdump_opts *rd = (rdump_opts *)priv_data;
char tmp = rec->name[rec->name_len];
diff --git a/extras/find_hardlinks.c b/extras/find_hardlinks.c
index b70f58b..2e1f697 100644
--- a/extras/find_hardlinks.c
+++ b/extras/find_hardlinks.c
@@ -55,6 +55,7 @@ struct walk_path {
};
static int walk_tree_func(struct ocfs2_dir_entry *dentry,
+ uint64_t blocknr,
int offset,
int blocksize,
char *buf,
diff --git a/extras/find_inode_paths.c b/extras/find_inode_paths.c
index 1725b40..b9ad920 100644
--- a/extras/find_inode_paths.c
+++ b/extras/find_inode_paths.c
@@ -53,6 +53,7 @@ struct walk_path {
};
static int walk_tree_func(struct ocfs2_dir_entry *dentry,
+ uint64_t blocknr,
int offset,
int blocksize,
char *buf,
diff --git a/fswreck/dir.c b/fswreck/dir.c
index 66309fd..eb8d0f2 100644
--- a/fswreck/dir.c
+++ b/fswreck/dir.c
@@ -112,6 +112,7 @@ static int corrupt_match_dirent(struct dirent_corrupt_struct *dcs,
}
static int rename_dirent_proc(struct ocfs2_dir_entry *dirent,
+ uint64_t blocknr,
int offset,
int blocksize,
char *buf,
@@ -157,6 +158,7 @@ static int rename_dirent(ocfs2_filesys *fs, uint64_t dir,
}
static int corrupt_dirent_ino_proc(struct ocfs2_dir_entry *dirent,
+ uint64_t blocknr,
int offset,
int blocksize,
char *buf,
@@ -200,6 +202,7 @@ static int corrupt_dirent_ino(ocfs2_filesys *fs, uint64_t dir,
}
static int corrupt_dirent_reclen_proc(struct ocfs2_dir_entry *dirent,
+ uint64_t blocknr,
int offset,
int blocksize,
char *buf,
diff --git a/ocfs2console/ocfs2interface/ocfs2module.c b/ocfs2console/ocfs2interface/ocfs2module.c
index bd3139d..18ad04c 100644
--- a/ocfs2console/ocfs2interface/ocfs2module.c
+++ b/ocfs2console/ocfs2interface/ocfs2module.c
@@ -735,6 +735,7 @@ typedef struct
static int
walk_dirs (struct ocfs2_dir_entry *dirent,
+ uint64_t blocknr,
int offset,
int blocksize,
char *buf,
diff --git a/tunefs.ocfs2/feature_quota.c b/tunefs.ocfs2/feature_quota.c
index 2da3cbe..08d7770 100644
--- a/tunefs.ocfs2/feature_quota.c
+++ b/tunefs.ocfs2/feature_quota.c
@@ -165,7 +165,8 @@ struct remove_quota_files_ctxt {
};
static int remove_quota_files_iterate(struct ocfs2_dir_entry *dirent,
- int offset, int blocksize, char *buf,
+ uint64_t blocknr, int offset,
+ int blocksize, char *buf,
void *priv_data)
{
struct remove_quota_files_ctxt *ctxt = priv_data;
diff --git a/tunefs.ocfs2/op_list_sparse_files.c b/tunefs.ocfs2/op_list_sparse_files.c
index 2f81d36..3127876 100644
--- a/tunefs.ocfs2/op_list_sparse_files.c
+++ b/tunefs.ocfs2/op_list_sparse_files.c
@@ -290,8 +290,8 @@ bail:
}
static int list_sparse_func(struct ocfs2_dir_entry *dirent,
- int offset, int blocksize,
- char *buf, void *priv_data)
+ uint64_t blocknr, int offset,
+ int blocksize, char *buf, void *priv_data)
{
errcode_t ret;
char *di_buf = NULL;
diff --git a/tunefs.ocfs2/op_set_slot_count.c b/tunefs.ocfs2/op_set_slot_count.c
index 46ce2de..cdd4f1a 100644
--- a/tunefs.ocfs2/op_set_slot_count.c
+++ b/tunefs.ocfs2/op_set_slot_count.c
@@ -699,8 +699,9 @@ static errcode_t truncate_orphan_dir(ocfs2_filesys *fs,
return ret;
}
-static int remove_slot_iterate(struct ocfs2_dir_entry *dirent, int offset,
- int blocksize, char *buf, void *priv_data)
+static int remove_slot_iterate(struct ocfs2_dir_entry *dirent,
+ uint64_t blocknr, int offset, int blocksize,
+ char *buf, void *priv_data)
{
struct remove_slot_ctxt *ctxt =
(struct remove_slot_ctxt *)priv_data;
@@ -783,8 +784,9 @@ bail:
return ret;
}
-static int orphan_iterate(struct ocfs2_dir_entry *dirent, int offset,
- int blocksize, char *buf, void *priv_data)
+static int orphan_iterate(struct ocfs2_dir_entry *dirent,
+ uint64_t blocknr, int offset, int blocksize,
+ char *buf, void *priv_data)
{
int *has_orphan = (int *)priv_data;
--
1.7.0.2
++++++ 0010-dx_dirs-add-disable-indexed-dirs-support-in-tunefs.o.patch ++++++
>From 88ed9a6f3d2bb06220c9188ad333b668b3936268 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Sun, 11 Apr 2010 16:10:07 +0800
Subject: [PATCH 10/30] dx_dirs: add disable indexed-dirs support in tunefs.ocfs2
This patch truncates all directories' indexed tree if '--fs-features
noindexed-tree' option is given. The indexed dirs
related flags on directory inodes and superblock are cleared too.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
tunefs.ocfs2/feature_indexed_dirs.c | 192 ++++++++++++++++++++++++++++++++++-
tunefs.ocfs2/o2ne_err.et | 9 ++
2 files changed, 199 insertions(+), 2 deletions(-)
diff --git a/tunefs.ocfs2/feature_indexed_dirs.c b/tunefs.ocfs2/feature_indexed_dirs.c
index 368eb87..e9f87fb 100644
--- a/tunefs.ocfs2/feature_indexed_dirs.c
+++ b/tunefs.ocfs2/feature_indexed_dirs.c
@@ -6,7 +6,7 @@
* ocfs2 tune utility for enabling and disabling the directory indexing
* feature.
*
- * Copyright (C) 2009 Novell. All rights reserved.
+ * Copyright (C) 2009, 2010 Novell. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -30,6 +30,17 @@
#include "libocfs2ne.h"
+struct dx_dirs_inode {
+ struct list_head list;
+ uint64_t ino;
+};
+
+struct dx_dirs_context {
+ errcode_t ret;
+ uint64_t dx_dirs_nr;
+ struct list_head inodes;
+ struct tools_progress *prog;
+};
static int enable_indexed_dirs(ocfs2_filesys *fs, int flags)
{
@@ -71,6 +82,183 @@ out:
return ret;
}
+static errcode_t dx_dir_iterate(ocfs2_filesys *fs, struct ocfs2_dinode *di,
+ void *user_data)
+{
+ errcode_t ret = 0;
+ struct dx_dirs_inode *dx_di = NULL;
+ struct dx_dirs_context *ctxt= (struct dx_dirs_context *)user_data;
+
+ if (!S_ISDIR(di->i_mode))
+ goto bail;
+
+ if (!(di->i_dyn_features & OCFS2_INDEXED_DIR_FL))
+ goto bail;
+
+ ret = ocfs2_malloc0(sizeof(struct dx_dirs_inode), &dx_di);
+ if (ret) {
+ ret = TUNEFS_ET_NO_MEMORY;
+ goto bail;
+ }
+
+ dx_di->ino = di->i_blkno;
+ ctxt->dx_dirs_nr ++;
+ list_add_tail(&dx_di->list, &ctxt->inodes);
+
+ tools_progress_step(ctxt->prog, 1);
+
+bail:
+ return ret;
+}
+
+
+static errcode_t find_indexed_dirs(ocfs2_filesys *fs,
+ struct dx_dirs_context *ctxt)
+{
+ errcode_t ret;
+
+ ctxt->prog = tools_progress_start("Scanning filesystem", "scanning", 0);
+ if (!ctxt->prog) {
+ ret = TUNEFS_ET_NO_MEMORY;
+ goto bail;
+ }
+
+ ret = tunefs_foreach_inode(fs, dx_dir_iterate, ctxt);
+ if (ret) {
+ if (ret != TUNEFS_ET_NO_MEMORY)
+ ret = TUNEFS_ET_DX_DIRS_SCAN_FAILED;
+ goto bail;
+ }
+
+ verbosef(VL_APP,
+ "We have %lu indexed %s to truncate.\n",
+ ctxt->dx_dirs_nr,
+ (ctxt->dx_dirs_nr > 1)?"directories":"directory");
+
+bail:
+ if (ctxt->prog)
+ tools_progress_stop(ctxt->prog);
+
+ return ret;
+}
+
+static errcode_t clean_indexed_dirs(ocfs2_filesys *fs,
+ struct dx_dirs_context *ctxt)
+{
+ errcode_t ret = 0;
+ struct list_head *pos;
+ struct dx_dirs_inode *dx_di;
+ struct tools_progress *prog;
+ uint64_t dirs_truncated = 0;
+
+ prog = tools_progress_start("Truncating indexed dirs", "truncating",
+ ctxt->dx_dirs_nr);
+ if (!prog) {
+ ret = TUNEFS_ET_NO_MEMORY;
+ goto bail;
+ }
+
+ list_for_each(pos, &ctxt->inodes) {
+ dx_di = list_entry(pos, struct dx_dirs_inode, list);
+
+ ret = ocfs2_dx_dir_truncate(fs, dx_di->ino);
+ if (ret) {
+ verbosef(VL_APP,
+ "Truncate directory (ino \"%lu\") failed.",
+ dx_di->ino);
+ ret = TUNEFS_ET_DX_DIRS_TRUNCATE_FAILED;
+ goto bail;
+ }
+ dirs_truncated ++;
+ tools_progress_step(prog, 1);
+ }
+
+bail:
+ tools_progress_stop(prog);
+ verbosef(VL_APP,
+ "\"%lu\" from \"%lu\" indexed %s truncated.",
+ dirs_truncated, ctxt->dx_dirs_nr,
+ (dirs_truncated <= 1) ? "directory is" : "directories are");
+
+ return ret;
+}
+
+static void release_dx_dirs_context(struct dx_dirs_context *ctxt)
+{
+ struct list_head *pos, *n;
+ struct dx_dirs_inode *dx_di;
+
+ list_for_each_safe(pos, n, &ctxt->inodes) {
+ dx_di = list_entry(pos, struct dx_dirs_inode, list);
+ list_del(&dx_di->list);
+ ocfs2_free(&dx_di);
+ }
+}
+
+static int disable_indexed_dirs(ocfs2_filesys *fs, int flags)
+{
+ errcode_t ret = 0;
+ struct ocfs2_super_block *super = OCFS2_RAW_SB(fs->fs_super);
+ struct dx_dirs_context ctxt;
+ struct tools_progress *prog = NULL;
+
+ if (!ocfs2_supports_indexed_dirs(super)) {
+ verbosef(VL_APP,
+ "Directory indexing feature is not enabled; "
+ "nothing to disable\n");
+ goto out;
+ }
+
+ if (!tools_interact("Disabling the directory indexing feature on "
+ "device \"%s\"? ",
+ fs->fs_devname))
+ goto out;
+
+ prog = tools_progress_start("Disable directory indexing", "no dir idx", 2);
+ if (!prog) {
+ ret = TUNEFS_ET_NO_MEMORY;
+ tcom_err(ret, "while initializing the progress display");
+ goto out;
+ }
+
+ memset(&ctxt, 0, sizeof (struct dx_dirs_context));
+ INIT_LIST_HEAD(&ctxt.inodes);
+ ret = find_indexed_dirs(fs, &ctxt);
+ if (ret) {
+ tcom_err(ret, "while scanning indexed directories");
+ goto out_cleanup;
+ }
+
+ tools_progress_step(prog, 1);
+
+ tunefs_block_signals();
+ ret = clean_indexed_dirs(fs, &ctxt);
+ if (ret) {
+ tcom_err(ret, "while truncate indexed directories");
+ }
+
+ /* We already touched file system, must disable dx dirs flag here.
+ * fsck.ocfs2 will handle the orphan indexed trees. */
+ OCFS2_CLEAR_INCOMPAT_FEATURE(super,
+ OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS);
+ ret = ocfs2_write_super(fs);
+ tunefs_unblock_signals();
+
+ if (ret) {
+ ret = TUNEFS_ET_IO_WRITE_FAILED;
+ tcom_err(ret, "while writing super block");
+ }
+
+ tools_progress_step(prog, 1);
+out_cleanup:
+ release_dx_dirs_context(&ctxt);
+out:
+ if (prog)
+ tools_progress_stop(prog);
+
+ return ret;
+}
+
/*
* TUNEFS_FLAG_ALLOCATION because disabling will want to dealloc
* blocks.
@@ -79,7 +267,7 @@ DEFINE_TUNEFS_FEATURE_INCOMPAT(indexed_dirs,
OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS,
TUNEFS_FLAG_RW | TUNEFS_FLAG_ALLOCATION,
enable_indexed_dirs,
- NULL);
+ disable_indexed_dirs);
#ifdef DEBUG_EXE
int main(int argc, char *argv[])
diff --git a/tunefs.ocfs2/o2ne_err.et b/tunefs.ocfs2/o2ne_err.et
index 20031a5..c2f700b 100644
--- a/tunefs.ocfs2/o2ne_err.et
+++ b/tunefs.ocfs2/o2ne_err.et
@@ -85,4 +85,13 @@ ec TUNEFS_ET_ONLINE_NOT_SUPPORTED,
ec TUNEFS_ET_CLUSTER_SKIPPED,
"Cluster stack initialization was skipped"
+ec TUNEFS_ET_DX_DIRS_SCAN_FAILED,
+ "Scanning inodes for directory indexing failed"
+
+ec TUNEFS_ET_IO_WRITE_FAILED,
+ "Write I/O failed"
+
+ec TUNEFS_ET_DX_DIRS_TRUNCATE_FAILED,
+ "Truncate directory indexed tree failed"
+
end
--
1.7.0.2
++++++ 0011-dx_dirs-build-indexed-trees-when-enabling-indexed-di.patch ++++++
>From 28f5939111c09de057750fb30ce40ade8bd2b8ef Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Sun, 11 Apr 2010 16:10:08 +0800
Subject: [PATCH 11/30] dx_dirs: build indexed trees when enabling indexed-dirs
Previos enable indexed-dirs implementation only set superblock flag,
does not build indexed trees for existed directories.
Tis patch tries to build indexed trees for directories when enable
indexed-dirs.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
tunefs.ocfs2/feature_indexed_dirs.c | 67 +++++++++++++++++++++++++++++++----
tunefs.ocfs2/o2ne_err.et | 3 ++
2 files changed, 63 insertions(+), 7 deletions(-)
diff --git a/tunefs.ocfs2/feature_indexed_dirs.c b/tunefs.ocfs2/feature_indexed_dirs.c
index e9f87fb..cfa0dd0 100644
--- a/tunefs.ocfs2/feature_indexed_dirs.c
+++ b/tunefs.ocfs2/feature_indexed_dirs.c
@@ -42,11 +42,46 @@ struct dx_dirs_context {
struct tools_progress *prog;
};
+/*
+ * If an indexed-dirs disabled directory has an indexed tree,
+ * this tree is unreliable. it must be truncated and rebuilt.
+ */
+static errcode_t build_dx_dir(ocfs2_filesys *fs, struct ocfs2_dinode *di,
+ void *user_data)
+{
+ errcode_t ret = 0;
+ struct dx_dirs_context *ctxt = (struct dx_dirs_context *)user_data;
+
+ if (!S_ISDIR(di->i_mode))
+ goto bail;
+
+ if (di->i_dyn_features & OCFS2_INDEXED_DIR_FL) {
+ verbosef(VL_APP,
+ "Directory inode %llu already has an indexed tree, "
+ "rebuild the indexed tree.\n", di->i_blkno);
+ ret = ocfs2_dx_dir_truncate(fs, di->i_blkno);
+ if (ret) {
+ ret = TUNEFS_ET_DX_DIRS_TRUNCATE_FAILED;
+ tcom_err(ret, "while rebulid indexed tree");
+ }
+ }
+ ret = ocfs2_dx_dir_build(fs, di->i_blkno);
+ if (ret) {
+ ret = TUNEFS_ET_DX_DIRS_BUILD_FAILED;
+ tcom_err(ret, "while enable indexed-dirs");
+ }
+
+bail:
+ tools_progress_step(ctxt->prog, 1);
+ return ret;
+}
+
static int enable_indexed_dirs(ocfs2_filesys *fs, int flags)
{
errcode_t ret = 0;
struct ocfs2_super_block *super = OCFS2_RAW_SB(fs->fs_super);
- struct tools_progress *prog;
+ struct tools_progress *prog = NULL;
+ struct dx_dirs_context ctxt;
if (ocfs2_supports_indexed_dirs(super)) {
verbosef(VL_APP,
@@ -55,30 +90,48 @@ static int enable_indexed_dirs(ocfs2_filesys *fs, int flags)
goto out;
}
-
if (!tools_interact("Enable the directory indexing feature on "
"device \"%s\"? ",
fs->fs_devname))
goto out;
- prog = tools_progress_start("Enable directory indexing", "dir idx", 1);
+ prog = tools_progress_start("Enable directory indexing", "dir idx", 2);
if (!prog) {
ret = TUNEFS_ET_NO_MEMORY;
tcom_err(ret, "while initializing the progress display");
goto out;
}
+ memset(&ctxt, 0, sizeof(struct dx_dirs_context));
+ ctxt.prog = tools_progress_start("Building indexed trees", "building", 0);
+ if (!ctxt.prog) {
+ ret = TUNEFS_ET_NO_MEMORY;
+ goto out;
+ }
+
OCFS2_SET_INCOMPAT_FEATURE(super,
OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS);
+
tunefs_block_signals();
ret = ocfs2_write_super(fs);
- tunefs_unblock_signals();
- if (ret)
+ if (ret) {
+ ret = TUNEFS_ET_IO_WRITE_FAILED;
tcom_err(ret, "while writing out the superblock");
-
+ goto unblock_out;
+ }
tools_progress_step(prog, 1);
- tools_progress_stop(prog);
+ ret = tunefs_foreach_inode(fs, build_dx_dir, &ctxt);
+ if (ret)
+ tcom_err(ret, "while building indexed trees");
+unblock_out:
+ tunefs_unblock_signals();
+ tools_progress_step(prog, 1);
+ if (ctxt.prog)
+ tools_progress_stop(ctxt.prog);
out:
+ if (prog)
+ tools_progress_stop(prog);
+
return ret;
}
diff --git a/tunefs.ocfs2/o2ne_err.et b/tunefs.ocfs2/o2ne_err.et
index c2f700b..3561d8c 100644
--- a/tunefs.ocfs2/o2ne_err.et
+++ b/tunefs.ocfs2/o2ne_err.et
@@ -94,4 +94,7 @@ ec TUNEFS_ET_IO_WRITE_FAILED,
ec TUNEFS_ET_DX_DIRS_TRUNCATE_FAILED,
"Truncate directory indexed tree failed"
+ec TUNEFS_ET_DX_DIRS_BUILD_FAILED,
+ "Build directory indexed tree failed"
+
end
--
1.7.0.2
++++++ 0012-dx_dirs-fix-return-value-of-walk_dirblock-when-enabl.patch ++++++
>From 183b0b3a12396e838dcb9c1e7dc0423eb3a4fbd5 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Sun, 11 Apr 2010 16:10:09 +0800
Subject: [PATCH 12/30] dx_dirs: fix return value of walk_dirblock() when enable metaecc
If there is no error, the return value 'ret' might be used with
undefined initial value. This patch fixes the error by initiating
it to 0.
Reported-by: Vit Pelcak <vpelcak(a)novell.com>
Signed-off-by: Coly Li <coly.li(a)suse.de>
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
tunefs.ocfs2/feature_metaecc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tunefs.ocfs2/feature_metaecc.c b/tunefs.ocfs2/feature_metaecc.c
index c4de8be..799b404 100644
--- a/tunefs.ocfs2/feature_metaecc.c
+++ b/tunefs.ocfs2/feature_metaecc.c
@@ -135,7 +135,7 @@ static errcode_t walk_dirblock(ocfs2_filesys *fs,
struct tunefs_trailer_context *tc,
struct tunefs_trailer_dirblock *db)
{
- errcode_t ret;
+ errcode_t ret = 0;
struct ocfs2_dir_entry *dirent, *prev = NULL;
unsigned int real_rec_len;
unsigned int offset = 0;
--
1.7.0.2
++++++ 0013-dx_dirs-try-to-install-dir-trailers-when-enable-inde.patch ++++++
>From 947d4450eed4a18299d7b14b828a69533eb4a2ed Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Sun, 11 Apr 2010 16:10:10 +0800
Subject: [PATCH 13/30] dx_dirs: try to install dir trailers when enable indexed-dirs
If metaecc feature is not enabled, previuos indexed-dirs patches in
ocfs2-tools does not install dir trailers and move the dir entries which
lie in the trailer area. This patch tries to install dir trailers when
enable indexed-dirs feature.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
tunefs.ocfs2/feature_indexed_dirs.c | 8 ++++++++
tunefs.ocfs2/feature_metaecc.c | 25 +++----------------------
tunefs.ocfs2/libocfs2ne.h | 25 +++++++++++++++++++++++++
tunefs.ocfs2/o2ne_err.et | 3 +++
4 files changed, 39 insertions(+), 22 deletions(-)
diff --git a/tunefs.ocfs2/feature_indexed_dirs.c b/tunefs.ocfs2/feature_indexed_dirs.c
index cfa0dd0..c26780e 100644
--- a/tunefs.ocfs2/feature_indexed_dirs.c
+++ b/tunefs.ocfs2/feature_indexed_dirs.c
@@ -65,6 +65,14 @@ static errcode_t build_dx_dir(ocfs2_filesys *fs, struct ocfs2_dinode *di,
tcom_err(ret, "while rebulid indexed tree");
}
}
+
+ ret = tunefs_install_dir_trailer(fs, di, NULL);
+ if (ret) {
+ ret = TUNEFS_ET_INSTALL_DIR_TRAILER_FAILED;
+ tcom_err(ret, "while enable indexed-dirs");
+ goto bail;
+ }
+
ret = ocfs2_dx_dir_build(fs, di->i_blkno);
if (ret) {
ret = TUNEFS_ET_DX_DIRS_BUILD_FAILED;
diff --git a/tunefs.ocfs2/feature_metaecc.c b/tunefs.ocfs2/feature_metaecc.c
index 799b404..e6b48b5 100644
--- a/tunefs.ocfs2/feature_metaecc.c
+++ b/tunefs.ocfs2/feature_metaecc.c
@@ -68,25 +68,6 @@ struct tunefs_trailer_dirblock {
struct ocfs2_dir_entry *db_last;
};
-/* A directory inode we're adding trailers to */
-struct tunefs_trailer_context {
- struct list_head d_list;
- uint64_t d_blkno; /* block number of the dir */
- struct ocfs2_dinode *d_di; /* The directory's inode */
- struct list_head d_dirblocks; /* List of its dirblocks */
- uint64_t d_bytes_needed; /* How many new bytes will
- cover the dirents we are moving
- to make way for trailers */
- uint64_t d_blocks_needed; /* How many blocks covers
- d_bytes_needed */
- char *d_new_blocks; /* Buffer of new blocks to fill */
- char *d_cur_block; /* Which block we're filling in
- d_new_blocks */
- struct ocfs2_dir_entry *d_next_dirent; /* Next dentry to use */
- errcode_t d_err; /* Any processing error during
- iteration of the directory */
-};
-
static void tunefs_trailer_context_free(struct tunefs_trailer_context *tc)
{
struct tunefs_trailer_dirblock *db;
@@ -529,9 +510,9 @@ out:
}
-static errcode_t tunefs_install_dir_trailer(ocfs2_filesys *fs,
- struct ocfs2_dinode *di,
- struct tunefs_trailer_context *tc)
+errcode_t tunefs_install_dir_trailer(ocfs2_filesys *fs,
+ struct ocfs2_dinode *di,
+ struct tunefs_trailer_context *tc)
{
errcode_t ret = 0;
struct tunefs_trailer_context *our_tc = NULL;
diff --git a/tunefs.ocfs2/libocfs2ne.h b/tunefs.ocfs2/libocfs2ne.h
index a8e1e5e..18380be 100644
--- a/tunefs.ocfs2/libocfs2ne.h
+++ b/tunefs.ocfs2/libocfs2ne.h
@@ -281,5 +281,30 @@ errcode_t tunefs_feature_run(ocfs2_filesys *master_fs,
int tunefs_feature_main(int argc, char *argv[], struct tunefs_feature *feat);
int tunefs_op_main(int argc, char *argv[], struct tunefs_operation *op);
+/* A directory inode we're adding trailers to */
+struct tunefs_trailer_context {
+ struct list_head d_list;
+ uint64_t d_blkno; /* block number of the dir */
+ struct ocfs2_dinode *d_di; /* The directory's inode */
+ struct list_head d_dirblocks; /* List of its dirblocks */
+ uint64_t d_bytes_needed; /* How many new bytes will
+ cover the dirents we are moving
+ to make way for trailers */
+ uint64_t d_blocks_needed; /* How many blocks covers
+ d_bytes_needed */
+ char *d_new_blocks; /* Buffer of new blocks to fill */
+ char *d_cur_block; /* Which block we're filling in
+ d_new_blocks */
+ struct ocfs2_dir_entry *d_next_dirent; /* Next dentry to use */
+ errcode_t d_err; /* Any processing error during
+ iteration of the directory */
+};
+
+/*
+ * called from feature_metaecc.c and feature_indexed_dirs.c
+ * to install dir trailers
+ */
+errcode_t tunefs_install_dir_trailer(ocfs2_filesys *fs, struct ocfs2_dinode *di,
+ struct tunefs_trailer_context *tc);
#endif /* _LIBTUNEFS_H */
diff --git a/tunefs.ocfs2/o2ne_err.et b/tunefs.ocfs2/o2ne_err.et
index 3561d8c..955c338 100644
--- a/tunefs.ocfs2/o2ne_err.et
+++ b/tunefs.ocfs2/o2ne_err.et
@@ -97,4 +97,7 @@ ec TUNEFS_ET_DX_DIRS_TRUNCATE_FAILED,
ec TUNEFS_ET_DX_DIRS_BUILD_FAILED,
"Build directory indexed tree failed"
+ec TUNEFS_ET_INSTALL_DIR_TRAILER_FAILED,
+ "Install directory trailer failed"
+
end
--
1.7.0.2
++++++ 0014-dx_dirs-add-an-initial-man-page-entry-for-indexed-di.patch ++++++
>From 0fe34f26335f1d2f10550b2e12f65f6f24f39a6f Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Sun, 11 Apr 2010 16:10:11 +0800
Subject: [PATCH 14/30] dx_dirs: add an initial man page entry for indexed-dirs
This patch add an initial man page entry for indexed-dirs feature
string.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
mkfs.ocfs2/mkfs.ocfs2.8.in | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/mkfs.ocfs2/mkfs.ocfs2.8.in b/mkfs.ocfs2/mkfs.ocfs2.8.in
index c7a7888..a148133 100644
--- a/mkfs.ocfs2/mkfs.ocfs2.8.in
+++ b/mkfs.ocfs2/mkfs.ocfs2.8.in
@@ -175,6 +175,10 @@ and number of inodes (files, directories, symbolic links) each group owns. It is
to limit the maximum amount of space or inodes user can have. See a documentation of
quota-tools package for more details.
.RE
+.TP
+\fBindexed-dirs\fR
+Enable directory indexing support. With this feature enabled, the file system creates indexed tree for non-inline directory entries. For large scale directories, directory entry lookup perfromance from the indexed tree is faster then from the legacy directory blocks.
+.RE
.TP
\fB\-\-fs\-feature\-level=\fR\fR\fIfeature\-level\fR
--
1.7.0.2
++++++ 0015-fsck.ocfs2-prompt-before-truncating-an-invalid-dir-i.patch ++++++
>From ed44744701bd4eeaf5ee0fcce9190cdf36b5b21c Mon Sep 17 00:00:00 2001
From: Mark Fasheh <mfasheh(a)suse.com>
Date: Mon, 19 Apr 2010 16:25:48 -0700
Subject: [PATCH 15/30] fsck.ocfs2: prompt before truncating an invalid dir index
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
fsck.ocfs2/fsck.ocfs2.checks.8.in | 6 ++++++
fsck.ocfs2/pass2.c | 6 +++++-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/fsck.ocfs2/fsck.ocfs2.checks.8.in b/fsck.ocfs2/fsck.ocfs2.checks.8.in
index 05561ae..5cda023 100644
--- a/fsck.ocfs2/fsck.ocfs2.checks.8.in
+++ b/fsck.ocfs2/fsck.ocfs2.checks.8.in
@@ -1055,6 +1055,12 @@ but fsck has already found quota limits for this user / group.
Answering yes will use new values of limits for the user / group.
+.SS "IV_DX_TREE"
+A directory index was found on an inode but that feature is not enabled on the
+file system.
+
+Answering yes will truncate the invalid index.
+
.SH "SEE ALSO"
.BR fsck.ocfs2(8)
diff --git a/fsck.ocfs2/pass2.c b/fsck.ocfs2/pass2.c
index 58efcd4..b999761 100644
--- a/fsck.ocfs2/pass2.c
+++ b/fsck.ocfs2/pass2.c
@@ -874,7 +874,11 @@ next:
if ((!ocfs2_supports_indexed_dirs(OCFS2_RAW_SB(dd->fs->fs_super)))&&
di->i_dyn_features & OCFS2_INDEXED_DIR_FL ) {
/* ignore the return value */
- ocfs2_dx_dir_truncate(dd->fs, dbe->e_ino);
+ if (prompt(dd->ost, PY, PR_IV_DX_TREE, "A directory index was "
+ "found on inode %"PRIu64" but the indexing feature "
+ "is not set on the fs. Truncate the invalid index?",
+ dbe->e_ino))
+ ocfs2_dx_dir_truncate(dd->fs, dbe->e_ino);
}
out:
--
1.7.0.2
++++++ 0016-tunefs.ocfs2-move-o2ne_add_tailers-into-libocfs2ne.c.patch ++++++
++++ 1152 lines (skipped)
++++++ 0017-dx_dirs-add-check-for-invalid-slot-in-ocfs2_new_dx_r.patch ++++++
>From e618ad9a6cafae5351f87ae0601d3b16ec9af96a Mon Sep 17 00:00:00 2001
From: Mark Fasheh <mfasheh(a)suse.com>
Date: Mon, 19 Apr 2010 21:36:37 -0700
Subject: [PATCH 17/30] dx_dirs: add check for invalid slot in ocfs2_new_dx_root()
This can happen in the case of a system inode, such as the root or orphan
directories.
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
libocfs2/alloc.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libocfs2/alloc.c b/libocfs2/alloc.c
index 84f3b05..7f85a34 100644
--- a/libocfs2/alloc.c
+++ b/libocfs2/alloc.c
@@ -658,6 +658,9 @@ errcode_t ocfs2_new_dx_root(ocfs2_filesys *fs,
goto out;
slot = di->i_suballoc_slot;
+ if (slot == (uint16_t)OCFS2_INVALID_SLOT)
+ slot = 0;
+
ret = ocfs2_load_allocator(fs, EXTENT_ALLOC_SYSTEM_INODE,
slot, &fs->fs_eb_allocs[slot]);
if (ret)
--
1.7.0.2
++++++ 0018-mkfs.ocfs2-create-root-and-orphan-directories-as-ind.patch ++++++
>From 88d139c22a91b17ff451a50e37d002d8714748f3 Mon Sep 17 00:00:00 2001
From: Mark Fasheh <mfasheh(a)suse.com>
Date: Mon, 19 Apr 2010 22:26:47 -0700
Subject: [PATCH 18/30] mkfs.ocfs2: create root and orphan directories as indexed
If the indexed dirs feature is enabled but the inline directories feature is
for some reason disabled, we'll create sub-optimal (non-indexed) root and
orphan directories. It's easy however at the end of mkfs.ocfs2 to simply
index these.
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
mkfs.ocfs2/mkfs.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++----
mkfs.ocfs2/mkfs.h | 1 +
2 files changed, 62 insertions(+), 6 deletions(-)
diff --git a/mkfs.ocfs2/mkfs.c b/mkfs.ocfs2/mkfs.c
index b43a9ba..5507872 100644
--- a/mkfs.ocfs2/mkfs.c
+++ b/mkfs.ocfs2/mkfs.c
@@ -82,6 +82,7 @@ static AllocGroup * initialize_alloc_group(State *s, const char *name,
uint64_t blkno,
uint16_t chain, uint16_t cpg,
uint16_t bpc);
+static void index_system_dirs(State *s, ocfs2_filesys *fs);
static void create_lost_found_dir(State *s, ocfs2_filesys *fs);
static void format_journals(State *s, ocfs2_filesys *fs);
static void format_slotmap(State *s, ocfs2_filesys *fs);
@@ -436,12 +437,6 @@ static void finish_normal_format(State *s)
printf("done\n");
if (!s->quiet)
- printf("Writing lost+found: ");
- create_lost_found_dir(s, fs);
- if (!s->quiet)
- printf("done\n");
-
- if (!s->quiet)
printf("Formatting quota files: ");
format_quota_files(s, fs);
@@ -449,6 +444,24 @@ static void finish_normal_format(State *s)
if (!s->quiet)
printf("done\n");
+ if (s->dx_dirs && !s->inline_data) {
+ /*
+ * We want to do this after quota, but before adding
+ * any new entries to directories.
+ */
+ if (!s->quiet)
+ printf("Indexing system directories: ");
+ index_system_dirs(s, fs);
+ if (!s->quiet)
+ printf("done\n");
+ }
+
+ if (!s->quiet)
+ printf("Writing lost+found: ");
+ create_lost_found_dir(s, fs);
+ if (!s->quiet)
+ printf("done\n");
+
ocfs2_close(fs);
}
@@ -1085,6 +1098,10 @@ get_state(int argc, char **argv)
s->no_backup_super = 0;
else
s->no_backup_super = 1;
+ if (s->feature_flags.opt_incompat & OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS)
+ s->dx_dirs = 1;
+ else
+ s->dx_dirs = 0;
/* Here if the user set these flags explicitly, we will use them and
@@ -2751,6 +2768,44 @@ clear_both_ends(State *s)
return ;
}
+static void index_system_dirs(State *s, ocfs2_filesys *fs)
+{
+ errcode_t ret;
+ int i, num_slots = OCFS2_RAW_SB(fs->fs_super)->s_max_slots;
+ uint64_t orphan_dir_blkno;
+
+
+ /* Start with the root directory */
+ ret = ocfs2_dx_dir_build(fs, fs->fs_root_blkno);
+ if (ret) {
+ com_err(s->progname, ret, "while indexing root directory");
+ goto bail;
+ }
+
+ for (i = 0; i < num_slots; i++) {
+ ret = ocfs2_lookup_system_inode(fs, ORPHAN_DIR_SYSTEM_INODE,
+ i, &orphan_dir_blkno);
+ if (ret) {
+ com_err(s->progname, ret,
+ "while looking up orphan dir %d for indexing",
+ i);
+ goto bail;
+ }
+
+ ret = ocfs2_dx_dir_build(fs, orphan_dir_blkno);
+ if (ret) {
+ com_err(s->progname, ret, "while indexing root directory");
+ goto bail;
+ }
+ }
+
+ return;
+
+bail:
+ clear_both_ends(s);
+ exit(1);
+}
+
static void create_lost_found_dir(State *s, ocfs2_filesys *fs)
{
errcode_t ret;
diff --git a/mkfs.ocfs2/mkfs.h b/mkfs.ocfs2/mkfs.h
index b702f00..c3aecd6 100644
--- a/mkfs.ocfs2/mkfs.h
+++ b/mkfs.ocfs2/mkfs.h
@@ -188,6 +188,7 @@ struct _State {
int mount;
int no_backup_super;
int inline_data;
+ int dx_dirs;
int dry_run;
uint32_t blocksize;
--
1.7.0.2
++++++ 0019-libocfs2-fix-flag-check-in-ocfs2_init_dir.patch ++++++
>From 912f3e698ed20eb14daad38ef79b106a30d39a02 Mon Sep 17 00:00:00 2001
From: Mark Fasheh <mfasheh(a)suse.com>
Date: Tue, 20 Apr 2010 10:19:54 -0700
Subject: [PATCH 19/30] libocfs2: fix flag check in ocfs2_init_dir()
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
libocfs2/expanddir.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libocfs2/expanddir.c b/libocfs2/expanddir.c
index ec05b74..eb18260 100644
--- a/libocfs2/expanddir.c
+++ b/libocfs2/expanddir.c
@@ -238,7 +238,7 @@ errcode_t ocfs2_init_dir(ocfs2_filesys *fs,
* directory to extent in ocfs2_expand_dir()
*/
if (ocfs2_supports_indexed_dirs(OCFS2_RAW_SB(fs->fs_super)) &&
- (!cinode->ci_inode->i_dyn_features & OCFS2_INLINE_DATA_FL)) {
+ !(cinode->ci_inode->i_dyn_features & OCFS2_INLINE_DATA_FL)) {
ret = ocfs2_dx_dir_build(fs, dir);
if (ret)
goto bail;
--
1.7.0.2
++++++ 0020-libocfs2-fix-ocfs2_init_dir-to-retain-indexed-flag.patch ++++++
>From 30a19b42c6da181fa3f96123041fb20e69d065d9 Mon Sep 17 00:00:00 2001
From: Mark Fasheh <mfasheh(a)suse.com>
Date: Tue, 20 Apr 2010 10:20:24 -0700
Subject: [PATCH 20/30] libocfs2: fix ocfs2_init_dir() to retain indexed flag
We were re-using the out of date 'cached inode' later in the function after
ocfs2_dx_dir_build() (which updates and writes out the inode internally).
As a result, ocfs2_init_dir() was accidentally clearing
OCFS2_INDEXED_DIR_FL. Fix this by refreshing the cache after the call to
ocfs2_dx_dir_build().
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
libocfs2/expanddir.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/libocfs2/expanddir.c b/libocfs2/expanddir.c
index eb18260..a81cfbe 100644
--- a/libocfs2/expanddir.c
+++ b/libocfs2/expanddir.c
@@ -242,6 +242,15 @@ errcode_t ocfs2_init_dir(ocfs2_filesys *fs,
ret = ocfs2_dx_dir_build(fs, dir);
if (ret)
goto bail;
+
+ /*
+ * Re-read the 'cached inode' as ocfs2_dx_dir_build()
+ * may have written out changes which won't be
+ * reflected in our copy.
+ */
+ ret = ocfs2_read_cached_inode(fs, dir, &cinode);
+ if (ret)
+ goto bail;
}
/* set link count of the parent */
--
1.7.0.2
++++++ 0021-fsck.ocfs2-verify-dirent-dx-entry-linkages.patch ++++++
>From 4c1cf61779ee71c828134d956f5779e272a3195e Mon Sep 17 00:00:00 2001
From: Mark Fasheh <mfasheh(a)suse.com>
Date: Fri, 23 Apr 2010 23:09:05 -0700
Subject: [PATCH 21/30] fsck.ocfs2: verify dirent -> dx entry linkages
During pass2 we can trivially do a lookup on dirents while walking the
directory tree. This will help us make sure that an index entry exists for
each dirent. If an entry is not found, the users is prompted and the parent
directory will be marked for an index rebuild.
Signed-off-by: Mark Fasheh <mfasheh(a)suse.com>
---
fsck.ocfs2/fsck.ocfs2.checks.8.in | 7 +++++++
fsck.ocfs2/pass2.c | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/fsck.ocfs2/fsck.ocfs2.checks.8.in b/fsck.ocfs2/fsck.ocfs2.checks.8.in
index 5cda023..cfbb12e 100644
--- a/fsck.ocfs2/fsck.ocfs2.checks.8.in
+++ b/fsck.ocfs2/fsck.ocfs2.checks.8.in
@@ -1061,6 +1061,13 @@ file system.
Answering yes will truncate the invalid index.
+.SS "DX_LOOKUP_FAILED"
+A directory entry is missing an entry in the directory index. Not
+found in directory index. The missing index entry will cause lookups
+on this name to fail.
+
+Answering yes will rebuild the directory index, restoring the missing entry.
+
.SH "SEE ALSO"
.BR fsck.ocfs2(8)
diff --git a/fsck.ocfs2/pass2.c b/fsck.ocfs2/pass2.c
index b999761..e03bd4e 100644
--- a/fsck.ocfs2/pass2.c
+++ b/fsck.ocfs2/pass2.c
@@ -648,6 +648,39 @@ out:
return ret;
}
+static errcode_t fix_dirent_index(o2fsck_dirblock_entry *dbe,
+ struct dirblock_data *dd,
+ struct ocfs2_dir_entry *dirent,
+ unsigned int *flags)
+{
+ errcode_t ret = 0;
+ struct ocfs2_dinode *di = (struct ocfs2_dinode *)dd->inoblock_buf;
+ uint64_t ino;
+
+ if (!ocfs2_supports_indexed_dirs(OCFS2_RAW_SB(dd->fs->fs_super)))
+ goto out;
+
+ if (di->i_dyn_features & OCFS2_INDEXED_DIR_FL) {
+ ret = ocfs2_lookup(dd->fs, dbe->e_ino, dirent->name,
+ dirent->name_len, NULL, &ino);
+ if (ret) {
+ if (ret != OCFS2_ET_FILE_NOT_FOUND)
+ goto out;
+ ret = 0;
+
+ if (prompt(dd->ost, PY, PR_DX_LOOKUP_FAILED,
+ "Directory inode %"PRIu64" is missing "
+ "an index entry for child inode %"PRIu64
+ "\n. Repair this by rebuilding the "
+ "directory index?", dbe->e_ino, ino))
+ *flags |= OCFS2_DIRENT_CHANGED;
+ goto out;
+ }
+ }
+out:
+ return ret;
+}
+
static int corrupt_dirent_lengths(struct ocfs2_dir_entry *dirent, int left)
{
if ((dirent->rec_len >= OCFS2_DIR_REC_LEN(1)) &&
@@ -805,6 +838,10 @@ static unsigned pass2_dir_block_iterate(o2fsck_dirblock_entry *dbe,
if (dirent->inode == 0)
goto next;
+ ret = fix_dirent_index(dbe, dd, dirent, &ret_flags);
+ if (ret)
+ goto out;
+
verbosef("dirent %.*s refs ino %"PRIu64"\n", dirent->name_len,
dirent->name, (uint64_t)dirent->inode);
o2fsck_icount_delta(dd->ost->ost_icount_refs, dirent->inode, 1);
--
1.7.0.2
++++++ 0022-dx_dirs-stop-iterate-dir-entries-for-I-O-error.patch ++++++
>From 24b059e1e75a0ff5dabb8a6dfdc09e82d488c244 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Mon, 26 Apr 2010 22:34:27 +0800
Subject: [PATCH 22/30] dx_dirs: stop iterate dir entries for I/O error
Callback dx_iterator() may encounter an I/O error when calling
ocfs2_read_dx_leaf(). The caller of dx_iterator is extent_iterate_el(),
which does not accept error code other than OCFS2_EXTENT_ERROR and
OCFS2_EXTENT_ABORT. The result is, dir entries iteration can not stop
if there is an I/O error happens in dx_iterator().
This patch add 'errcode_t err' member to struct dx_iterator_data, if
error returned from ocfs2_read_dx_leaf(), the error code will be
stored here, then dx_iterator() returns OCFS2_EXTENT_ERROR to make
extent_iterate_el() quit.
Thanks to Tao Ma for catching this error.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Cc: Mark Fasheh <mfasheh(a)suse.com>
Cc: Tao Ma <tao.ma(a)oracle.com>
---
libocfs2/dir_iterate.c | 22 +++++++++++++++-------
libocfs2/extents.c | 2 +-
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/libocfs2/dir_iterate.c b/libocfs2/dir_iterate.c
index 8a3f5a9..d044bb8 100644
--- a/libocfs2/dir_iterate.c
+++ b/libocfs2/dir_iterate.c
@@ -320,6 +320,7 @@ struct dx_iterator_data {
void *dx_priv_data;
char *leaf_buf;
struct ocfs2_dx_root_block *dx_root;
+ errcode_t err;
};
static int dx_iterator(ocfs2_filesys *fs,
@@ -330,7 +331,7 @@ static int dx_iterator(ocfs2_filesys *fs,
int ref_recno,
void *priv_data)
{
- int ret, i;
+ int err, i;
struct ocfs2_dx_leaf *dx_leaf;
struct dx_iterator_data *iter = priv_data;
uint64_t blkno, count;
@@ -339,9 +340,11 @@ static int dx_iterator(ocfs2_filesys *fs,
blkno = rec->e_blkno;
for (i = 0; i < count; i++) {
- ret = ocfs2_read_dx_leaf(fs, blkno, iter->leaf_buf);
- if (ret)
- return ret;
+ err = ocfs2_read_dx_leaf(fs, blkno, iter->leaf_buf);
+ if (err) {
+ iter->err = err;
+ return OCFS2_EXTENT_ERROR;
+ }
dx_leaf = (struct ocfs2_dx_leaf *)iter->leaf_buf;
iter->dx_func(fs, &dx_leaf->dl_list, iter->dx_root, dx_leaf,
@@ -387,8 +390,7 @@ extern errcode_t ocfs2_dx_entries_iterate(ocfs2_filesys *fs,
dx_root = (struct ocfs2_dx_root_block *)buf;
if (dx_root->dr_flags & OCFS2_DX_FLAG_INLINE) {
- func(fs, &dx_root->dr_entries, dx_root, NULL, priv_data);
- ret = 0;
+ ret = func(fs, &dx_root->dr_entries, dx_root, NULL, priv_data);
goto out;
}
@@ -404,10 +406,16 @@ extern errcode_t ocfs2_dx_entries_iterate(ocfs2_filesys *fs,
data.dx_priv_data = priv_data;
data.leaf_buf = leaf_buf;
data.dx_root = dx_root;
+ data.err = 0;
ret = ocfs2_extent_iterate_dx_root(fs, dx_root,
OCFS2_EXTENT_FLAG_DATA_ONLY, eb_buf,
dx_iterator, &data);
-
+ /* dx_iterator may set the error code for non-extents-related
+ * errors. If the error code is set by dx_iterator, no matter
+ * what ocfs2_extent_iterate_dx_root() returns, we should take
+ * data.err as retured error code. */
+ if (data.err)
+ ret = data.err;
out:
if (buf)
ocfs2_free(&buf);
diff --git a/libocfs2/extents.c b/libocfs2/extents.c
index 8c322b1..bb233f0 100644
--- a/libocfs2/extents.c
+++ b/libocfs2/extents.c
@@ -470,7 +470,7 @@ errcode_t ocfs2_extent_iterate_inode(ocfs2_filesys *fs,
uint64_t ref_blkno,
int ref_recno,
void *priv_data),
- void *priv_data)
+ void *priv_data)
{
int i;
int iret = 0;
--
1.7.0.2
++++++ 0023-dx_dirs-check-callback-iter-dx_func-return-value-in-.patch ++++++
>From d4bbb81a8e6870155eb939a1f9d6def456fa3b91 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Mon, 26 Apr 2010 22:35:02 +0800
Subject: [PATCH 23/30] dx_dirs: check callback iter->dx_func() return value in dx_iterator()
This patch makes dx_iterator() check returned value of callback
iter->dx_func(). If an error returned from the callback, dx_iterator()
returns OCFS2_EXTENT_ERROR to stop the iteration.
Thanks to Tao Ma for catching the error.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Cc: Mark Fasheh <mfasheh(a)suse.com>
Cc: Tao Ma <tao.ma(a)oracle.com>
---
libocfs2/dir_iterate.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/libocfs2/dir_iterate.c b/libocfs2/dir_iterate.c
index d044bb8..9f2ff7e 100644
--- a/libocfs2/dir_iterate.c
+++ b/libocfs2/dir_iterate.c
@@ -347,8 +347,13 @@ static int dx_iterator(ocfs2_filesys *fs,
}
dx_leaf = (struct ocfs2_dx_leaf *)iter->leaf_buf;
- iter->dx_func(fs, &dx_leaf->dl_list, iter->dx_root, dx_leaf,
+ err = iter->dx_func(fs, &dx_leaf->dl_list, iter->dx_root, dx_leaf,
iter->dx_priv_data);
+ /* callback dx_func() is defined by users, the return value does not
+ * follow libocfs2 error codes. Don't touch iter->err and just stop
+ * the iteration here.*/
+ if (err)
+ return OCFS2_EXTENT_ERROR;
blkno++;
}
--
1.7.0.2
++++++ 0024-dx_dirs-remove-unncessary-return-value-assignment.patch ++++++
>From c74da336c1e4eb2fac311c9e6ea8ef8fe9b0a6c1 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Mon, 26 Apr 2010 22:35:27 +0800
Subject: [PATCH 24/30] dx_dirs: remove unncessary return value assignment
This patch removes unnecessary return value assigned in
ocfs2_dx_entries_iterate() and ocfs2_dx_frees_iterate().
Thanks for Tao Ma for catching this.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Cc: Mark Fasheh <mfasheh(a)suse.com>
Cc: Tao Ma <tao.ma(a)oracle.com>
---
libocfs2/dir_iterate.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/libocfs2/dir_iterate.c b/libocfs2/dir_iterate.c
index 9f2ff7e..835305a 100644
--- a/libocfs2/dir_iterate.c
+++ b/libocfs2/dir_iterate.c
@@ -378,7 +378,6 @@ extern errcode_t ocfs2_dx_entries_iterate(ocfs2_filesys *fs,
struct dx_iterator_data data;
if (!S_ISDIR(dir->i_mode) && !ocfs2_dir_indexed(dir)) {
- ret = 0;
goto out;
}
@@ -448,12 +447,10 @@ extern errcode_t ocfs2_dx_frees_iterate(ocfs2_filesys *fs,
struct ocfs2_dir_block_trailer *trailer;
if (!S_ISDIR(dir->i_mode) || !(ocfs2_dir_indexed(dir))) {
- ret = 0;
goto out;
}
if (dx_root->dr_flags & OCFS2_DX_FLAG_INLINE) {
- ret = 0;
goto out;
}
--
1.7.0.2
++++++ 0025-dx_dirs-unifiy-feature-string-of-indexed-dirs.patch ++++++
>From 1e82ab1d1407d4578eda91214e843b5433a92d6f Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Mon, 26 Apr 2010 22:35:58 +0800
Subject: [PATCH 25/30] dx_dirs: unifiy feature string of indexed-dirs
This patch changes the indexed-dirs fn_name of ocfs2_feature_name array
from IndexedDirs to indexed-dirs. Which unitifies fn_name displayed in
debugfs.ocfs2 to feature string 'indexed-dirs' used in mkfs.ocfs2 and
tunefs.ocfs2.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Cc: Mark Fasheh <mfasheh(a)suse.com>
Cc: Tao Ma <tao.ma(a)oracle.com>
---
libocfs2/feature_string.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libocfs2/feature_string.c b/libocfs2/feature_string.c
index 9f395c6..83fec9a 100644
--- a/libocfs2/feature_string.c
+++ b/libocfs2/feature_string.c
@@ -254,7 +254,7 @@ static struct feature_name ocfs2_feature_names[] = {
.fn_flag = {0, OCFS2_FEATURE_INCOMPAT_XATTR, 0},
},
{
- .fn_name = "IndexedDirs",
+ .fn_name = "indexed-dirs",
.fn_flag = {0, OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS, 0},
},
{
--
1.7.0.2
++++++ 0026-dx_dirs-Improve-information-displayed-by-dump_dx_roo.patch ++++++
>From a3a8830774c41b90285d77ccc04a035c944080e9 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Mon, 26 Apr 2010 22:36:38 +0800
Subject: [PATCH 26/30] dx_dirs: Improve information displayed by dump_dx_root()
If dr->dr_suballoc_slot is OCFS2_INVALID_SLOT (which should not happen),
should not display "Global", because there is not "Global" conception
for dx root allocation slot. This patch fixes the display by
"Invalid Slot".
Signed-off-by: Coly Li <coly.li(a)suse.de>
Cc: Mark Fasheh <mfasheh(a)suse.com>
Cc: Tao Ma <tao.ma(a)oracle.com>
---
debugfs.ocfs2/dump.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/debugfs.ocfs2/dump.c b/debugfs.ocfs2/dump.c
index d55fc0e..6ad202c 100644
--- a/debugfs.ocfs2/dump.c
+++ b/debugfs.ocfs2/dump.c
@@ -593,7 +593,7 @@ void dump_dx_root(FILE *out, struct ocfs2_dx_root_block *dr)
(uint64_t)dr->dr_dir_blkno);
if (dr->dr_suballoc_slot == (uint16_t)OCFS2_INVALID_SLOT)
- strcpy(tmp_str, "Global");
+ strcpy(tmp_str, "Invalid Slot");
else
sprintf(tmp_str, "%d", dr->dr_suballoc_slot);
fprintf(out, "\tSub Alloc Slot: %s Sub Alloc Bit: %u "
--
1.7.0.2
++++++ 0027-dx_dirs-stop-iteration-of-dir-trailer-initialization.patch ++++++
>From cb9471a5f73c69858d9dd35ea90b86476e65e4ca Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Mon, 26 Apr 2010 22:37:05 +0800
Subject: [PATCH 27/30] dx_dirs: stop iteration of dir trailer initialization for I/O error
Callback dir_trailer_func() may encounter malloc or I/O error, these
errors can not return to its caller directly. This patch add a member
'errcode_t err' to struct trailer_ctxt, which can catch the error. By
this fix, dir_trailer_func() can return OCFS2_EXTENT_ERROR to stop dir
iteration immediately and can return the REAL error as well.
Thanks to Tao Ma catches this error.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Cc: Mark Fasheh <mfasheh(a)suse.com>
Cc: Tao Ma <tao.ma(a)oracle.com>
---
libocfs2/dir_indexed.c | 37 +++++++++++++++++++++++++++++--------
1 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/libocfs2/dir_indexed.c b/libocfs2/dir_indexed.c
index 9cae3d0..5f3db95 100644
--- a/libocfs2/dir_indexed.c
+++ b/libocfs2/dir_indexed.c
@@ -121,6 +121,7 @@ int ocfs2_find_max_rec_len(ocfs2_filesys *fs, char *buf)
struct trailer_ctxt {
struct ocfs2_dx_root_block *dx_root;
struct ocfs2_dinode *di;
+ errcode_t err;
};
/* make sure the space for trailer is reserved */
@@ -170,8 +171,8 @@ static int dir_trailer_func(ocfs2_filesys *fs,
struct ocfs2_dinode *di = ctxt->di;
struct ocfs2_dx_root_block *dx_root = ctxt->dx_root;
struct ocfs2_dir_block_trailer *trailer;
- int max_rec_len = 0;
- errcode_t ret = 0;
+ int max_rec_len = 0, ret = 0;
+ errcode_t err;
char *blk = NULL;
ret = ocfs2_malloc_block(fs->fs_io, &blk);
@@ -180,12 +181,20 @@ static int dir_trailer_func(ocfs2_filesys *fs,
/* here we don't trust trailer, cannot use
* ocfs2_read_dir_block() */
- ret = ocfs2_read_blocks(fs, blkno, 1, blk);
- if (ret)
+ err = ocfs2_read_blocks(fs, blkno, 1, blk);
+ if (err) {
+ ctxt->err = err;
+ ret = OCFS2_EXTENT_ERROR;
goto out;
- ret = ocfs2_check_dir_trailer_space(fs, di, blkno, blk);
- if (ret)
+ }
+
+ err = ocfs2_check_dir_trailer_space(fs, di, blkno, blk);
+ if (err) {
+ ctxt->err = err;
+ ret = OCFS2_EXTENT_ERROR;
goto out;
+ }
+
ocfs2_init_dir_trailer(fs, di, blkno, blk);
max_rec_len = ocfs2_find_max_rec_len(fs, blk);
trailer = ocfs2_dir_trailer_from_block(fs, blk);
@@ -198,7 +207,12 @@ static int dir_trailer_func(ocfs2_filesys *fs,
/* comput trailer->db_check here, after writes out,
* trailer is trustable */
- ret = ocfs2_write_dir_block(fs, di, blkno, blk);
+ err = ocfs2_write_dir_block(fs, di, blkno, blk);
+ if (err) {
+ ctxt->err = err;
+ ret = OCFS2_EXTENT_ERROR;
+ }
+
out:
if (blk)
ocfs2_free(&blk);
@@ -219,9 +233,16 @@ static errcode_t ocfs2_init_dir_trailers(ocfs2_filesys *fs,
ctxt.di = di;
ctxt.dx_root = dx_root;
-
+ ctxt.err = 0;
ret = ocfs2_block_iterate_inode(fs, di,
0, dir_trailer_func, &ctxt);
+
+ /* callback dir_trailer_func() may have error which can not
+ * return to its caller directly. If dir_trailer_func() sets
+ * error in ctxt.err, we should take this REAL error other
+ * than the value returned by ocfs2_block_iterate_inode(). */
+ if (ctxt.err)
+ ret = ctxt.err;
out:
return ret;
}
--
1.7.0.2
++++++ 0028-dx_dirs-stop-dx-insert-iteration-for-callback-error.patch ++++++
>From 1f49857cc5fa914ac0d3577f841b398421ca01a0 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Mon, 26 Apr 2010 22:37:32 +0800
Subject: [PATCH 28/30] dx_dirs: stop dx insert iteration for callback error
Callback ocfs2_dx_dir_insert() may encounter memory alloc or I/O error.
These kind of errors can not return to caller of the callback directly,
so the dir block iteration for dx insert can not stop immediately when
such errors occure.
This patch adds a member 'errcode_t err' to struct dx_insert_ctxt, which
can catch the error and permit ocfs2_dx_dir_insert() returns
OCFS2_EXTENT_ERROR to it's caller to stop the iteration immediately.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Cc: Mark Fasheh <mfasheh(a)suse.com>
Cc: Tao Ma <tao.ma(a)oracle.com>
---
libocfs2/dir_indexed.c | 61 +++++++++++++++++++++++++++++------------------
1 files changed, 38 insertions(+), 23 deletions(-)
diff --git a/libocfs2/dir_indexed.c b/libocfs2/dir_indexed.c
index 5f3db95..08c43b7 100644
--- a/libocfs2/dir_indexed.c
+++ b/libocfs2/dir_indexed.c
@@ -269,6 +269,7 @@ struct dx_insert_ctxt {
uint64_t dir_blkno;
uint64_t dx_root_blkno;
ocfs2_filesys *fs;
+ errcode_t err;
};
@@ -1069,7 +1070,8 @@ static int ocfs2_dx_dir_insert(struct ocfs2_dir_entry *dentry,
char *buf,
void *priv_data)
{
- errcode_t ret = 0;
+ int ret = 0;
+ errcode_t err;
char *dx_buf = NULL;
char *dx_leaf_buf = NULL;
struct ocfs2_dx_root_block *dx_root = NULL;
@@ -1081,17 +1083,17 @@ static int ocfs2_dx_dir_insert(struct ocfs2_dir_entry *dentry,
uint64_t dx_root_blkno = ctxt->dx_root_blkno;
int write_dx_leaf = 0;
- ret = ocfs2_malloc_block(fs->fs_io, &dx_buf);
- if (ret)
- goto out;
+ err = ocfs2_malloc_block(fs->fs_io, &dx_buf);
+ if (err)
+ goto set_err;
- ret = ocfs2_malloc_block(fs->fs_io, &dx_leaf_buf);
- if (ret)
- goto out;
+ err = ocfs2_malloc_block(fs->fs_io, &dx_leaf_buf);
+ if (err)
+ goto set_err;
- ret = ocfs2_read_dx_root(fs, dx_root_blkno, dx_buf);
- if (ret)
- goto out;
+ err = ocfs2_read_dx_root(fs, dx_root_blkno, dx_buf);
+ if (err)
+ goto set_err;
dx_root = (struct ocfs2_dx_root_block *)dx_buf;
memset(&lookup, 0, sizeof(struct ocfs2_dir_lookup_result));
@@ -1104,19 +1106,21 @@ static int ocfs2_dx_dir_insert(struct ocfs2_dir_entry *dentry,
goto insert_into_entries;
} else {
/* root block is full, expand it to an extent */
- ret = ocfs2_expand_inline_dx_root(fs, dx_root);
- if (ret)
- goto out;
+ err = ocfs2_expand_inline_dx_root(fs, dx_root);
+ if (err)
+ goto set_err;
}
}
- ret = ocfs2_find_dir_space_dx(fs, dx_root,
+ err = ocfs2_find_dir_space_dx(fs, dx_root,
dentry->name, dentry->name_len, &lookup);
- if (ret)
- goto out;
- ret = ocfs2_read_dx_leaf(fs, lookup.dl_dx_leaf_blkno, dx_leaf_buf);
- if (ret)
- goto out;
+ if (err)
+ goto set_err;
+
+ err = ocfs2_read_dx_leaf(fs, lookup.dl_dx_leaf_blkno, dx_leaf_buf);
+ if (err)
+ goto set_err;
+
dx_leaf = (struct ocfs2_dx_leaf *)dx_leaf_buf;
entry_list = &dx_leaf->dl_list;
write_dx_leaf = 1;
@@ -1124,12 +1128,18 @@ static int ocfs2_dx_dir_insert(struct ocfs2_dir_entry *dentry,
insert_into_entries:
ocfs2_dx_entry_list_insert(entry_list, &lookup.dl_hinfo, blocknr);
if (write_dx_leaf) {
- ret = ocfs2_write_dx_leaf(fs, dx_leaf->dl_blkno, dx_leaf);
- if (ret)
- goto out;
+ err = ocfs2_write_dx_leaf(fs, dx_leaf->dl_blkno, dx_leaf);
+ if (err)
+ goto set_err;
}
dx_root->dr_num_entries += 1;
- ret = ocfs2_write_dx_root(fs, dx_root_blkno, dx_buf);
+ err = ocfs2_write_dx_root(fs, dx_root_blkno, dx_buf);
+ if (!err)
+ goto out;
+
+set_err:
+ ctxt->err = err;
+ ret = OCFS2_EXTENT_ERROR;
out:
if (dx_leaf_buf)
ocfs2_free(&dx_leaf_buf);
@@ -1256,8 +1266,13 @@ errcode_t ocfs2_dx_dir_build(ocfs2_filesys *fs,
ctxt.dir_blkno = dir;
ctxt.dx_root_blkno = dr_blkno;
ctxt.fs = fs;
+ ctxt.err = 0;
ret = ocfs2_dir_iterate(fs, dir, 0, NULL,
ocfs2_dx_dir_insert, &ctxt);
+ if (ctxt.err)
+ ret = ctxt.err;
+ if (ret)
+ goto out;
/* check quota for dx_leaf */
ret = ocfs2_read_dx_root(fs, dr_blkno, dx_buf);
--
1.7.0.2
++++++ 0029-dx_dirs-set-OCFS2_INDEXED_DIR_FL-after-indexed-tree-.patch ++++++
>From 2dff67994c3d6015b2b989d79a00c2cd10669ed0 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Mon, 26 Apr 2010 22:37:59 +0800
Subject: [PATCH 29/30] dx_dirs: set OCFS2_INDEXED_DIR_FL after indexed tree gets built
In ocfs2_dx_dir_build(), current code set OCFS2_INDEXED_DIR_FL to
di->i_dyn_features before inserting dir entries into the indexed tree.
If there is any error during the insertion, the corresponded dirent will
be lost from the indexed tree. Though this error can be checked and
fixed in fsck.ocfs2, it should be fixed.
This patch modifies to set OCFS2_INDEXED_DIR_FL after
ocfs2_dir_iterate() returns successfully. If ocfs2_dir_iterate() returns
with error, ocfs2_dx_dir_build() will return error and stop to build the
indexed tree for a specific directory. In this case, no dirent will be
losted.
Thanks to Tao Ma to catch this.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Cc: Mark Fasheh <mfasheh(a)suse.com>
Cc: Tao Ma <tao.ma(a)oracle.com>
---
libocfs2/dir_indexed.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/libocfs2/dir_indexed.c b/libocfs2/dir_indexed.c
index 08c43b7..eb872fd 100644
--- a/libocfs2/dir_indexed.c
+++ b/libocfs2/dir_indexed.c
@@ -1254,7 +1254,6 @@ errcode_t ocfs2_dx_dir_build(ocfs2_filesys *fs,
dx_root->dr_entries.de_count = ocfs2_dx_entries_per_root(fs->fs_blocksize);
di->i_dx_root = dr_blkno;
- di->i_dyn_features |= OCFS2_INDEXED_DIR_FL;
ret = ocfs2_write_dx_root(fs, dr_blkno, dx_buf);
if (ret)
@@ -1274,14 +1273,20 @@ errcode_t ocfs2_dx_dir_build(ocfs2_filesys *fs,
if (ret)
goto out;
- /* check quota for dx_leaf */
ret = ocfs2_read_dx_root(fs, dr_blkno, dx_buf);
if (ret)
goto out;
ret = ocfs2_read_inode(fs, dir, di_buf);
if (ret)
goto out;
+ /* set inode to use indexed-dirs */
+ di->i_dyn_features |= OCFS2_INDEXED_DIR_FL;
+ ret = ocfs2_write_inode(fs, dir, di_buf);
+ if(ret)
+ goto out;
+
+ /* check quota for dx_leaf */
change = ocfs2_clusters_to_bytes(fs,
dx_root->dr_clusters);
uid = di->i_uid;
--
1.7.0.2
++++++ 0030-dx_dirs-fix-ocfs2_swap_dx_entry_list-for-big-endian.patch ++++++
>From 8cf3a61039b0bda46d8824e50c3989eae83b9a1a Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Mon, 26 Apr 2010 22:38:31 +0800
Subject: [PATCH 30/30] dx_dirs: fix ocfs2_swap_dx_entry_list() for big endian
As Tao Ma suggested, current ocfs2_swap_dx_entry_list() is
buggy for big endian hardware, because after dl_list->de_count
swapped, it is referenced in the following loop.
This patch fixes this bug with adding an 'int to_cpu' argument, also
modifies other routines who call ocfs2_swap_dx_entry_list().
Signed-off-by: Coly Li <coly.li(a)suse.de>
Cc: Mark Fasheh <mfasheh(a)suse.com>
Cc: Tao Ma <tao.ma(a)oracle.com>
---
libocfs2/dirblock.c | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/libocfs2/dirblock.c b/libocfs2/dirblock.c
index c22d843..e128d73 100644
--- a/libocfs2/dirblock.c
+++ b/libocfs2/dirblock.c
@@ -245,29 +245,34 @@ static void ocfs2_swap_dx_entry(struct ocfs2_dx_entry *dx_entry)
dx_entry->dx_dirent_blk = bswap_64(dx_entry->dx_dirent_blk);
}
-static void ocfs2_swap_dx_entry_list(struct ocfs2_dx_entry_list *dl_list)
+/* called for big endian */
+static void ocfs2_swap_dx_entry_list(struct ocfs2_dx_entry_list *dl_list, int to_cpu)
{
int i;
- dl_list->de_count = bswap_16(dl_list->de_count);
- dl_list->de_num_used = bswap_16(dl_list->de_num_used);
+ if (to_cpu)
+ dl_list->de_count = bswap_16(dl_list->de_count);
for (i = 0; i < dl_list->de_count; i++)
ocfs2_swap_dx_entry(&dl_list->de_entries[i]);
+ dl_list->de_num_used = bswap_16(dl_list->de_num_used);
+
+ if (!to_cpu)
+ dl_list->de_count = bswap_16(dl_list->de_count);
}
static void ocfs2_swap_dx_entry_list_to_cpu(struct ocfs2_dx_entry_list *dl_list)
{
if (cpu_is_little_endian)
return;
- ocfs2_swap_dx_entry_list(dl_list);
+ ocfs2_swap_dx_entry_list(dl_list, 1);
}
static void ocfs2_swap_dx_entry_list_from_cpu(struct ocfs2_dx_entry_list *dl_list)
{
if (cpu_is_little_endian)
return;
- ocfs2_swap_dx_entry_list(dl_list);
+ ocfs2_swap_dx_entry_list(dl_list, 0);
}
static void ocfs2_swap_dx_root_to_cpu(ocfs2_filesys *fs,
@@ -384,26 +389,26 @@ out:
return ret;
}
-static void ocfs2_swap_dx_leaf(struct ocfs2_dx_leaf *dx_leaf)
+static void ocfs2_swap_dx_leaf(struct ocfs2_dx_leaf *dx_leaf, int to_cpu)
{
dx_leaf->dl_blkno = bswap_64(dx_leaf->dl_blkno);
dx_leaf->dl_fs_generation = bswap_64(dx_leaf->dl_fs_generation);
- ocfs2_swap_dx_entry_list(&dx_leaf->dl_list);
+ ocfs2_swap_dx_entry_list(&dx_leaf->dl_list, to_cpu);
}
static void ocfs2_swap_dx_leaf_to_cpu(struct ocfs2_dx_leaf *dx_leaf)
{
if (cpu_is_little_endian)
return;
- ocfs2_swap_dx_leaf(dx_leaf);
+ ocfs2_swap_dx_leaf(dx_leaf, 1);
}
static void ocfs2_swap_dx_leaf_from_cpu(struct ocfs2_dx_leaf *dx_leaf)
{
if (cpu_is_little_endian)
return;
- ocfs2_swap_dx_leaf(dx_leaf);
+ ocfs2_swap_dx_leaf(dx_leaf, 0);
}
errcode_t ocfs2_read_dx_leaf(ocfs2_filesys *fs, uint64_t block,
--
1.7.0.2
++++++ 0031-dx_dirs-enable-metaecc-and-indexed-dirs-support-as-d.patch ++++++
>From 76e095ae3d132828bbb70bad68c428101d3652a9 Mon Sep 17 00:00:00 2001
From: Coly Li <coly.li(a)suse.de>
Date: Sun, 11 Apr 2010 00:03:33 +0800
Subject: [PATCH 15/15] dx_dirs v11: enable metaecc and indexed-dirs support as default features
metaecc feature enables ECC checking for meta data, which helps the file
system consistency. indexed-dirs feature enables indexed tree for
directories, which improves lookup performance for large scale
directories.
This patch enables metaecc and indexed-dirs support as default features.
Signed-off-by: Coly Li <coly.li(a)suse.de>
Cc: Mark Fasheh <mfasheh(a)suse.com>
---
libocfs2/feature_string.c | 18 ++++++++++++++----
mkfs.ocfs2/mkfs.ocfs2.8.in | 2 +-
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/libocfs2/feature_string.c b/libocfs2/feature_string.c
index 0974fb6..b2413bf 100644
--- a/libocfs2/feature_string.c
+++ b/libocfs2/feature_string.c
@@ -76,7 +76,9 @@ static ocfs2_fs_options feature_level_defaults[] = {
{OCFS2_FEATURE_COMPAT_BACKUP_SB | OCFS2_FEATURE_COMPAT_JBD2_SB,
OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC |
OCFS2_FEATURE_INCOMPAT_INLINE_DATA |
- OCFS2_FEATURE_INCOMPAT_XATTR,
+ OCFS2_FEATURE_INCOMPAT_XATTR |
+ OCFS2_FEATURE_INCOMPAT_META_ECC |
+ OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS,
OCFS2_FEATURE_RO_COMPAT_UNWRITTEN}, /* OCFS2_FEATURE_LEVEL_DEFAULT */
{OCFS2_FEATURE_COMPAT_BACKUP_SB | OCFS2_FEATURE_COMPAT_JBD2_SB,
@@ -100,25 +102,33 @@ static ocfs2_fs_options mkfstypes_features_defaults[] = {
{OCFS2_FEATURE_COMPAT_BACKUP_SB | OCFS2_FEATURE_COMPAT_JBD2_SB,
OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC |
OCFS2_FEATURE_INCOMPAT_INLINE_DATA |
- OCFS2_FEATURE_INCOMPAT_XATTR,
+ OCFS2_FEATURE_INCOMPAT_XATTR |
+ OCFS2_FEATURE_INCOMPAT_META_ECC |
+ OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS,
OCFS2_FEATURE_RO_COMPAT_UNWRITTEN}, /* OCFS2_MKFSTYPE_DEFAULT */
{OCFS2_FEATURE_COMPAT_BACKUP_SB | OCFS2_FEATURE_COMPAT_JBD2_SB,
OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC |
OCFS2_FEATURE_INCOMPAT_INLINE_DATA |
- OCFS2_FEATURE_INCOMPAT_XATTR,
+ OCFS2_FEATURE_INCOMPAT_XATTR |
+ OCFS2_FEATURE_INCOMPAT_META_ECC |
+ OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS,
OCFS2_FEATURE_RO_COMPAT_UNWRITTEN}, /* OCFS2_MKFSTYPE_DATAFILES */
{OCFS2_FEATURE_COMPAT_BACKUP_SB | OCFS2_FEATURE_COMPAT_JBD2_SB,
OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC |
OCFS2_FEATURE_INCOMPAT_INLINE_DATA |
- OCFS2_FEATURE_INCOMPAT_XATTR,
+ OCFS2_FEATURE_INCOMPAT_XATTR |
+ OCFS2_FEATURE_INCOMPAT_META_ECC |
+ OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS,
OCFS2_FEATURE_RO_COMPAT_UNWRITTEN}, /* OCFS2_MKFSTYPE_MAIL */
{OCFS2_FEATURE_COMPAT_BACKUP_SB | OCFS2_FEATURE_COMPAT_JBD2_SB,
OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC |
OCFS2_FEATURE_INCOMPAT_INLINE_DATA |
OCFS2_FEATURE_INCOMPAT_XATTR |
+ OCFS2_FEATURE_INCOMPAT_META_ECC |
+ OCFS2_FEATURE_INCOMPAT_INDEXED_DIRS |
OCFS2_FEATURE_INCOMPAT_REFCOUNT_TREE,
OCFS2_FEATURE_RO_COMPAT_UNWRITTEN}, /* OCFS2_MKFSTYPE_VMSTORE */
};
diff --git a/mkfs.ocfs2/mkfs.ocfs2.8.in b/mkfs.ocfs2/mkfs.ocfs2.8.in
index a148133..2fd7a70 100644
--- a/mkfs.ocfs2/mkfs.ocfs2.8.in
+++ b/mkfs.ocfs2/mkfs.ocfs2.8.in
@@ -191,7 +191,7 @@ Chooses fewer features but ensures that the file system can be mounted from olde
.RS 1.2i
.TP
\fBdefault\fR
-The default feature set tries to strike a balance between providing new features and maintaining compatibility with relatively recent versions of \fIOCFS2\fR. It currently enables \fBsparse\fR, \fBunwritten\fR \fBinline-data\fR and \fBxattr\fR. It also enables \fBrefcount\fR for the \fIvmstore\fR volumes.
+The default feature set tries to strike a balance between providing new features and maintaining compatibility with relatively recent versions of \fIOCFS2\fR. It currently enables \fBsparse\fR, \fBunwritten\fR, \fBinline-data\fR, \fRxattr\fR, \fRmetaecc\fR, and \fRindexed-dirs\fR. It also enables \fBrefcount\fR for the \fIvmstore\fR volumes.
.RE
.RS 1.2i
.TP
--
1.7.0.2
++++++ bug-470741-debug_start_failures.patch ++++++
Index: ocfs2-tools/libo2cb/o2cb_err.et
===================================================================
--- ocfs2-tools.orig/libo2cb/o2cb_err.et
+++ ocfs2-tools/libo2cb/o2cb_err.et
@@ -33,6 +33,12 @@ ec O2CB_ET_IO,
ec O2CB_ET_SERVICE_UNAVAILABLE,
"Unable to access cluster service"
+ec O2CB_ET_SERVICE_HANDSHAKE_UNAVAILABLE,
+ "Unable to access cluster serivce due to bad handshake"
+
+ec O2CB_ET_SERVICE_DEV_UNAVAILABLE,
+ "Unable to access cluster service device"
+
ec O2CB_ET_INTERNAL_FAILURE,
"Internal logic failure"
Index: ocfs2-tools/libo2cb/o2cb_abi.c
===================================================================
--- ocfs2-tools.orig/libo2cb/o2cb_abi.c
+++ ocfs2-tools/libo2cb/o2cb_abi.c
@@ -2095,7 +2095,7 @@ static errcode_t o2cb_control_handshake(
if (ret != 0)
err = O2CB_ET_IO;
else if (!found)
- err = O2CB_ET_SERVICE_UNAVAILABLE; /* no match */
+ err = O2CB_ET_SERVICE_HANDSHAKE_UNAVAILABLE; /* no match */
break;
}
@@ -2152,7 +2152,7 @@ errcode_t o2cb_control_open(unsigned int
case ENOTDIR:
case ENOENT:
case EISDIR:
- err = O2CB_ET_SERVICE_UNAVAILABLE;
+ err = O2CB_ET_SERVICE_DEV_UNAVAILABLE;
break;
case EACCES:
++++++ bug-543119-o2dlm.patch ++++++
diff -rup ocfs2-tools.orig//libo2dlm/o2dlm.c ocfs2-tools/libo2dlm/o2dlm.c
--- ocfs2-tools.orig//libo2dlm/o2dlm.c 2008-10-27 01:10:50.000000000 +0800
+++ ocfs2-tools/libo2dlm/o2dlm.c 2009-11-03 16:49:38.000000000 +0800
@@ -713,7 +713,7 @@ static errcode_t load_fsdlm(struct o2dlm
goto out;
}
- ctxt->ct_lib_handle = dlopen("libdlm_lt.so",
+ ctxt->ct_lib_handle = dlopen("libdlm_lt.so.3",
RTLD_NOW | RTLD_LOCAL);
if (!ctxt->ct_lib_handle)
goto out;
++++++ bug-585080-handle-symbolic-link.patch ++++++
This is a simple patch which fix the issue that tunefs.ocfs2 online
resize can't handle symbolic link of a device file. For example, in
the LVM using scenario, '/dev/vg1/lv1' and '/dev/mapper/vg1-lv1' are
the same device, '/dev/vg1/lv1' is just a symbolic link to
'/dev/mapper/vg1-lv1'. But if we try to do online resize like
'tunefs.ocfs2 -S /dev/vg1/lv1', it fails.
Signed-off-by: Jiaju Zhang <jjzhang(a)suse.de>
---
ocfs2_controld/mount.c | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/ocfs2_controld/mount.c b/ocfs2_controld/mount.c
--- a/ocfs2_controld/mount.c
+++ b/ocfs2_controld/mount.c
@@ -260,13 +260,27 @@ static void add_service(struct mountgroup *mg, const char *device,
const char *service, int ci, int fd)
{
struct service *ms;
+ struct stat st1, st2;
- log_debug("Adding service %s to device %s uuid %s",
+ log_debug("Adding service \"%s\" to device \"%s\" uuid \"%s\"",
service, device, mg->mg_uuid);
- if (strcmp(mg->mg_device, device)) {
+ if (stat(mg->mg_device, &st1)) {
+ fill_error(mg, errno, "Failed to stat device \"%s\": %s",
+ mg->mg_device, strerror(errno));
+ return;
+ }
+
+ if (stat(device, &st2)) {
+ fill_error(mg, errno, "Failed to stat device \"%s\": %s",
+ device, strerror(errno));
+ return;
+ }
+
+ if (st1.st_rdev != st2.st_rdev) {
fill_error(mg, EINVAL,
- "Trying to mount fs %s on device %s, but it is already mounted from device %s",
+ "Trying to mount fs \"%s\" on device \"%s\", "
+ "but it is already mounted from device \"%s\"",
mg->mg_uuid, device, mg->mg_device);
return;
}
++++++ debug-ocfs2_hb_ctl.patch ++++++
Index: ocfs2-tools/ocfs2_hb_ctl/ocfs2_hb_ctl.c
===================================================================
--- ocfs2-tools.orig/ocfs2_hb_ctl/ocfs2_hb_ctl.c
+++ ocfs2-tools/ocfs2_hb_ctl/ocfs2_hb_ctl.c
@@ -39,6 +39,7 @@
#include <string.h>
#include <sys/stat.h>
#include <signal.h>
+#include <syslog.h>
#include "ocfs2/ocfs2.h"
@@ -137,6 +138,7 @@ static errcode_t get_desc(const char *de
if (!region_desc->r_name || !region_desc->r_device_name)
err = OCFS2_ET_NO_MEMORY;
} else {
+ syslog(LOG_INFO, "filled heartbeat desc, err: %d\n", (int)err);
region_desc->r_name = NULL;
region_desc->r_device_name = NULL;
goto out_close;
@@ -157,6 +159,7 @@ static errcode_t get_desc(const char *de
err = OCFS2_ET_NO_MEMORY;
}
} else {
+ syslog(LOG_INFO, "filled cluster desc, err: %d\n", (int)err);
cluster_desc->c_stack = NULL;
cluster_desc->c_cluster = NULL;
}
@@ -202,9 +205,9 @@ static errcode_t compare_dev(const char
/* Any problem with getting the descriptor is NOT FOUND */
err = OCFS2_ET_FILE_NOT_FOUND;
- if (get_desc(device))
+ if (get_desc(device)) {
goto out;
-
+ }
if (!strcmp(region_desc->r_name, hbo->uuid_str)) {
hbo->dev_str = device;
err = 0;
@@ -381,12 +384,19 @@ static errcode_t stop_heartbeat(struct h
{
errcode_t err = 0;
- if (!hbo->dev_str)
+ if (!hbo->dev_str) {
err = lookup_dev(hbo);
+ if (err)
+ syslog(LOG_INFO, "looked up device, ret: %d\n",
+ (int)err);
+ }
if (!err) {
region_desc->r_persist = 1; /* hb_ctl is for reals */
region_desc->r_service = hbo->service;
err = o2cb_group_leave(cluster_desc, region_desc);
+ if (err)
+ syslog(LOG_INFO, "left group - err: %d\n",
+ (int)err);
}
return err;
@@ -536,14 +546,42 @@ static void print_usage(int err)
fprintf(output, " %s -h\n", progname);
}
+static int
+hack_enable_coredumps(void)
+{
+ struct rlimit rlim;
+
+ if (getrlimit(RLIMIT_CORE, &rlim) < 0) {
+ return -1;
+ }
+
+ rlim.rlim_max = RLIM_INFINITY;
+ setrlimit(RLIMIT_CORE, &rlim);
+ (void)chdir("/var/lib/openais");
+ return 0;
+}
+
+
int main(int argc, char **argv)
{
errcode_t err = 0;
int ret = 0;
+ int i;
struct hb_ctl_options hbo = {
.action = HB_ACTION_UNKNOWN,
};
char hbuuid[33];
+ char tmp[1024];
+
+ openlog("ocfs2_hb_ctl", LOG_CONS|LOG_NDELAY|LOG_PID, LOG_KERN);
+ sprintf(tmp, "ocfs2_hb_ctl");
+ for (i = 0; i < argc; i++) {
+ strncat(tmp, " ", sizeof(tmp)-1);
+ strncat(tmp, argv[i], sizeof(tmp)-1);
+ }
+ syslog(LOG_INFO, "%s\n", tmp);
+
+ hack_enable_coredumps();
setbuf(stdout, NULL);
setbuf(stderr, NULL);
++++++ extra-debug.patch ++++++
---
ocfs2_controld/ckpt.c | 2 -
ocfs2_controld/main.c | 53 ++++++++++++++++++++++++++++++++++------
ocfs2_controld/mount.c | 2 +
ocfs2_controld/ocfs2_controld.h | 1
ocfs2_controld/pacemaker.c | 2 -
5 files changed, 51 insertions(+), 9 deletions(-)
Index: ocfs2_controld/ckpt.c
===================================================================
--- a/ocfs2_controld/ckpt.c.orig
+++ b/ocfs2_controld/ckpt.c
@@ -381,7 +381,7 @@ static int call_section_read(struct ckpt
/* -ENOENT is a clean error for the caller to handle */
if (rc == -ENOENT) {
- log_debug("Checkpoint \"%.*s\" does not have a "
+ log_error("Checkpoint \"%.*s\" does not have a "
"section named \"%s\"",
handle->ch_name.length,
handle->ch_name.value, name);
Index: ocfs2_controld/main.c
===================================================================
--- a/ocfs2_controld/main.c.orig
+++ b/ocfs2_controld/main.c
@@ -73,7 +73,7 @@ static int time_to_die = 0;
static int sigpipe_write_fd;
char *prog_name;
-int daemon_debug_opt;
+int daemon_debug_opt = 0;
char daemon_debug_buf[1024];
char dump_buf[DUMP_SIZE];
int dump_point;
@@ -994,8 +994,7 @@ static void lockfile(void)
fd = open(LOCKFILE_NAME, O_CREAT|O_WRONLY,
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
if (fd < 0) {
- fprintf(stderr, "cannot open/create lock file %s\n",
- LOCKFILE_NAME);
+ log_error("cannot open/create lock file %s", LOCKFILE_NAME);
exit(EXIT_FAILURE);
}
@@ -1006,13 +1005,13 @@ static void lockfile(void)
error = fcntl(fd, F_SETLK, &lock);
if (error) {
- fprintf(stderr, "ocfs2_controld is already running\n");
+ log_error("ocfs2_controld is already running");
exit(EXIT_FAILURE);
}
error = ftruncate(fd, 0);
if (error) {
- fprintf(stderr, "cannot clear lock file %s\n", LOCKFILE_NAME);
+ log_error("cannot clear lock file %s", LOCKFILE_NAME);
exit(EXIT_FAILURE);
}
@@ -1020,7 +1019,7 @@ static void lockfile(void)
error = write(fd, buf, strlen(buf));
if (error <= 0) {
- fprintf(stderr, "cannot write lock file %s\n", LOCKFILE_NAME);
+ log_error("cannot write lock file %s", LOCKFILE_NAME);
exit(EXIT_FAILURE);
}
}
@@ -1030,13 +1029,13 @@ static void daemonize(void)
int fd;
pid_t pid = fork();
if (pid < 0) {
+ log_error("main: cannot fork");
perror("main: cannot fork");
exit(EXIT_FAILURE);
}
if (pid)
exit(EXIT_SUCCESS);
setsid();
- chdir("/");
umask(0);
close(0);
close(1);
@@ -1107,6 +1106,7 @@ static void decode_arguments(int argc, c
break;
default:
+ log_error("unknown option: %c\n", optchar);
fprintf(stderr, "unknown option: %c\n", optchar);
exit(EXIT_FAILURE);
break;
@@ -1144,12 +1144,53 @@ static void set_scheduler(void)
}
}
+#include <sys/time.h>
+#include <sys/resource.h>
+
+static int
+hack_enable_coredumps(void)
+{
+ int rc;
+ struct rlimit rlim;
+ int doenable = 1;
+
+ if ((rc = getrlimit(RLIMIT_CORE, &rlim)) < 0) {
+ int errsave = errno;
+ log_error("Cannot get current core limit value. %d", errsave);
+ errno = errsave;
+ return rc;
+ }
+ if (rlim.rlim_max == 0 && geteuid() == 0) {
+ rlim.rlim_max = RLIM_INFINITY;
+ }
+
+ rlim.rlim_cur = (doenable ? rlim.rlim_max : 0);
+
+ if (doenable && rlim.rlim_max == 0) {
+ log_error("Not possible to enable core dumps (rlim_max is 0)");
+ }
+
+ if ((rc = setrlimit(RLIMIT_CORE, &rlim)) < 0) {
+ int errsave = errno;
+ log_error("Unable to enable core dumps: %d", errsave);
+ errno = errsave;
+ return rc;
+ }
+ chdir("/var/lib/openais");
+ log_debug("Core dumps enabled: /var/lib/openais");
+ return 0;
+}
+
int main(int argc, char **argv)
{
errcode_t err;
prog_name = argv[0];
const char *stack = NULL;
+ decode_arguments(argc, argv);
+
+ hack_enable_coredumps();
+
init_mounts();
initialize_o2cb_error_table();
@@ -1165,13 +1206,11 @@ int main(int argc, char **argv)
return 1;
}
if (strcmp(stack, stackname)) {
- fprintf(stderr, "%s: This daemon supports the \"%s\" stack, but the \"%s\" stack is in use\n",
- prog_name, stackname, stack);
+ log_error("%s: This daemon supports the \"%s\" stack, but the \"%s\" stack is in use",
+ prog_name, stackname, stack);
return 1;
}
- decode_arguments(argc, argv);
-
if (!daemon_debug_opt)
daemonize();
Index: ocfs2_controld/mount.c
===================================================================
--- a/ocfs2_controld/mount.c.orig
+++ b/ocfs2_controld/mount.c
@@ -176,6 +176,8 @@ static void notify_mount_client(struct m
else
mg->mg_mount_notified = 1;
+ log_debug("Notified client: %d", mg->mg_mount_notified);
+
/*
* XXX If we failed to notify the client, what can we do? I'm
* guessing that our main loop will get POLLHUP and we'll clean
Index: ocfs2_controld/ocfs2_controld.h
===================================================================
--- a/ocfs2_controld/ocfs2_controld.h.orig
+++ b/ocfs2_controld/ocfs2_controld.h
@@ -60,6 +60,7 @@ do { \
#define log_error(fmt, args...) \
do { \
log_debug(fmt, ##args); \
+ fprintf(stderr, fmt "\n", ##args); \
syslog(LOG_ERR, fmt, ##args); \
} while (0)
++++++ fix-configure-check-libs.patch ++++++
Index: ocfs2-tools/configure.in
===================================================================
--- ocfs2-tools.orig/configure.in
+++ ocfs2-tools/configure.in
@@ -255,9 +255,12 @@ if test "x$cpg_found" = "xyes"; then
# TRY="$TRY"
saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $TRY -lcpg"
+ saved_LIBS="$LIBS"
+ LDFLAGS="$LDFLAGS $TRY"
+ LIBS="-lcpg"
AC_LINK_IFELSE([AC_LANG_CALL([], [cpg_initialize])],
cpg_found=yes)
+ LIBS="$saved_LIBS"
LDFLAGS="$saved_LDFLAGS"
if test "x$cpg_found" = "xyes"; then
@@ -294,9 +297,12 @@ if test "x$ckpt_found" = "xyes"; then
# TRY="$TRY"
saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $TRY -lSaCkpt"
+ saved_LIBS="$LIBS"
+ LDFLAGS="$LDFLAGS $TRY"
+ LIBS="-lSaCkpt"
AC_LINK_IFELSE([AC_LANG_CALL([], [saCkptInitialize])],
ckpt_found=yes)
+ LIBS="$saved_LIBS"
LDFLAGS="$saved_LDFLAGS"
if test "x$ckpt_found" = "xyes"; then
++++++ force-debug.patch ++++++
---
ocfs2_controld/ocfs2_controld.h | 7 +++++++
1 file changed, 7 insertions(+)
Index: ocfs2_controld/ocfs2_controld.h
===================================================================
--- a/ocfs2_controld/ocfs2_controld.h.orig 2008-10-26 18:10:50.000000000 +0100
+++ b/ocfs2_controld/ocfs2_controld.h 2009-03-10 22:22:52.719197000 +0100
@@ -44,12 +44,19 @@ extern void daemon_dump_save(void);
#define log_debug(fmt, args...) \
do { \
+ syslog(LOG_DEBUG, fmt, ##args); \
snprintf(daemon_debug_buf, 1023, "%ld %s@%d: " fmt "\n", \
time(NULL), __FUNCTION__, __LINE__, ##args); \
if (daemon_debug_opt) fprintf(stderr, "%s", daemon_debug_buf); \
daemon_dump_save(); \
} while (0)
+#define log_info(fmt, args...) \
+do { \
+ log_debug(fmt, ##args); \
+ syslog(LOG_INFO, fmt, ##args); \
+} while (0)
+
#define log_error(fmt, args...) \
do { \
log_debug(fmt, ##args); \
++++++ gcc45-ftbfs-deb-565100.patch ++++++
Index: ocfs2-tools/mount.ocfs2/mount.ocfs2.c
===================================================================
--- ocfs2-tools.orig/mount.ocfs2/mount.ocfs2.c
+++ ocfs2-tools/mount.ocfs2/mount.ocfs2.c
@@ -261,7 +261,7 @@ int main(int argc, char **argv)
char *extra = NULL;
int dev_ro = 0;
char *hbstr = NULL;
- char stackstr[strlen(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN + 1] = "";
+ char stackstr[strlen(OCFS2_CLUSTER_STACK_ARG) + OCFS2_STACK_LABEL_LEN + 1];
ocfs2_filesys *fs = NULL;
struct o2cb_cluster_desc cluster;
struct o2cb_region_desc desc;
@@ -269,6 +269,8 @@ int main(int argc, char **argv)
int hb_started = 0;
struct stat statbuf;
+ stackstr[0] = '\0';
+
initialize_ocfs_error_table();
initialize_o2dl_error_table();
initialize_o2cb_error_table();
++++++ o2cb.ocf ++++++
--- /var/tmp/diff_new_pack.CUanKp/_old 2010-06-30 10:43:52.000000000 +0200
+++ /var/tmp/diff_new_pack.CUanKp/_new 2010-06-30 10:43:52.000000000 +0200
@@ -168,19 +168,18 @@
kill_daemon()
{
status_daemon; rc=$?
- if [ $rc != $OCF_SUCCESS ]; then
- return $rc
+ if [ $rc == $OCF_NOT_RUNNING ]; then
+ return 0
fi
ocf_log info "Stopping `basename "$DAEMON"`"
killproc "$DAEMON"
- while [ $rc = $OCF_NOT_RUNNING ]; do
- sleep 1
+ while [ $rc != $OCF_NOT_RUNNING ]; do
+ sleep 1
status_daemon; rc=$?
done
-
- return $OCF_SUCCESS
+ return 0
}
#
++++++ ocfs2_controld-pacemaker.diff ++++++
--- /var/tmp/diff_new_pack.CUanKp/_old 2010-06-30 10:43:52.000000000 +0200
+++ /var/tmp/diff_new_pack.CUanKp/_new 2010-06-30 10:43:52.000000000 +0200
@@ -1,487 +1,26 @@
-diff --git a/ocfs2_controld/pacemaker.c b/ocfs2_controld/pacemaker.c
---- a/ocfs2_controld/pacemaker.c
-+++ b/ocfs2_controld/pacemaker.c
-@@ -20,20 +20,31 @@
- #include <unistd.h>
- #include <syslog.h>
-
--#include <crm/crm.h>
--#include <crm/common/cluster.h>
--#include <fencing/stonithd_api.h>
-+#include <bzlib.h>
-+
-+#include <pacemaker/crm_config.h>
-+
-+/* heartbeat support is irrelevant here */
-+#undef SUPPORT_HEARTBEAT
-+#define SUPPORT_HEARTBEAT 0
-+
-+#include <pacemaker/crm/crm.h>
-+#include <pacemaker/crm/ais.h>
-+#include <pacemaker/crm/attrd.h>
-+#include <pacemaker/crm/common/cluster.h>
-+#include <pacemaker/crm/common/stack.h>
+Index: ocfs2-tools/ocfs2_controld/pacemaker.c
+===================================================================
+--- ocfs2-tools.orig/ocfs2_controld/pacemaker.c
++++ ocfs2-tools/ocfs2_controld/pacemaker.c
+@@ -31,6 +31,8 @@
+ #include <pacemaker/crm/ais.h>
+ #include <pacemaker/crm/common/cluster.h>
+ #include <pacemaker/crm/common/stack.h>
+#include <pacemaker/crm/common/ipc.h>
+#include <pacemaker/crm/msg_xml.h>
#include "ocfs2-kernel/kernel-list.h"
#include "o2cb/o2cb.h"
-
- #include "ocfs2_controld.h"
-
--#include <bzlib.h>
--#include <crm/crm.h>
--#include <crm/ais.h>
- #include <sys/utsname.h>
-
-+#define log_printf(level, format, args...) syslog(level, "%s:%d " format "\n", __FILE__, __LINE__, ##args)
-+
- int our_nodeid = 0;
- static int pcmk_ci;
- static int stonithd_ci;
-@@ -44,29 +55,57 @@ const char *stackname = "pcmk";
- extern int ais_fd_async;
- char *local_node_uname = NULL;
-
--int kill_stack_node(int nodeid)
--{
-- int error = 1;
-- stonith_ops_t st_op;
-- char *target = nodeid2name(nodeid);
--
-- log_debug("killing node %d (aka. %s)", nodeid, target);
--
-- if(target) {
-- st_op.timeout = 150;
-- st_op.node_uuid = NULL;
-- st_op.private_data = NULL;
-- st_op.node_name = target;
-- st_op.optype = POWEROFF;
--
-- error = stonithd_node_fence(&st_op);
-- }
-+static IPC_Channel *attrd = NULL;
-
-- if (error)
-- log_debug("Unable to kill node %d, %d %d", nodeid, error,
-- errno);
-+static void attrd_deadfn(int ci)
-+{
-+ log_printf(LOG_ERR, "Lost connection to attrd");
-+ attrd = NULL;
-+ return;
-+}
-
-- return error;
-+int kill_stack_node(int nodeid)
-+{
-+ gboolean rc = FALSE;
-+ xmlNode *update = NULL;
-+ time_t now = time(NULL);
-+ crm_node_t *node = crm_get_peer(nodeid, NULL);
-+
-+ if(node == NULL || node->uname == NULL) {
-+ log_printf(LOG_ERR, "%s: Don't know how to kick node %d/%p", __FUNCTION__, nodeid, node);
-+ return -1;
-+ }
-+
-+ if(attrd == NULL) {
-+ log_printf(LOG_INFO, "Connecting to attrd...");
-+ attrd = init_client_ipc_comms_nodispatch(T_ATTRD);
-+ if(attrd) {
-+ connection_add(attrd->ops->get_recv_select_fd(attrd), NULL, attrd_deadfn);
-+ }
-+ }
-+
-+ if(attrd != NULL) {
-+ update = create_xml_node(NULL, __FUNCTION__);
-+ crm_xml_add(update, F_TYPE, T_ATTRD);
-+ crm_xml_add(update, F_ORIG, crm_system_name);
-+
-+ crm_xml_add(update, F_ATTRD_TASK, "update");
-+ crm_xml_add(update, F_ATTRD_SECTION, XML_CIB_TAG_STATUS);
-+ crm_xml_add(update, F_ATTRD_ATTRIBUTE, "terminate");
-+ crm_xml_add_int(update, F_ATTRD_VALUE, now);
-+ crm_xml_add(update, F_ATTRD_HOST, node->uname);
-+
-+ rc = send_ipc_message(attrd, update);
-+ free_xml(update);
-+ }
-+
-+ if(rc) {
-+ log_printf(LOG_INFO, "Requested that node %d/%s be kicked from the cluster", nodeid, node->uname);
-+ return 1;
-+ }
-+
-+ log_printf(LOG_ERR, "Could not kick node %d/%s from the cluster", nodeid, node->uname);
-+ return 0;
- }
-
- char *nodeid2name(int nodeid) {
-@@ -81,7 +120,7 @@ char *nodeid2name(int nodeid) {
- int validate_cluster(const char *cluster)
- {
- if (!clustername) {
-- log_error("Trying to validate before pacemaker is alive");
-+ log_printf(LOG_ERR, "Trying to validate before pacemaker is alive");
- return 0;
- }
-
-@@ -94,12 +133,12 @@ int validate_cluster(const char *cluster)
- int get_clustername(const char **cluster)
- {
- if (!clustername) {
-- log_error("Trying to validate before pacemaker is alive");
-+ log_printf(LOG_ERR, "Trying to validate before pacemaker is alive");
- return -EIO;
- }
-
- if (!cluster) {
-- log_error("NULL passed!");
-+ log_printf(LOG_ERR, "NULL passed!");
- return -EINVAL;
- }
-
-@@ -110,316 +149,36 @@ int get_clustername(const char **cluster)
- static void dead_pcmk(int ci)
- {
- if (ci != pcmk_ci) {
-- log_error("Unknown connection %d", ci);
-+ log_printf(LOG_ERR, "Unknown connection %d", ci);
- return;
- }
-
-- log_error("pacemaker connection died");
-+ log_printf(LOG_ERR, "pacemaker connection died");
- shutdown_daemon();
- connection_dead(ci);
- }
-
-+extern void terminate_ais_connection(void);
-+
- void exit_stack(void)
- {
-- log_debug("closing stonithd connection");
-- stonithd_signoff();
--
- log_debug("closing pacemaker connection");
-- if (ais_fd_async) {
-- close(ais_fd_async);
-- ais_fd_async = 0;
-- }
-- if (ais_fd_sync) {
-- close(ais_fd_sync);
-- ais_fd_sync = 0;
-- }
-+ terminate_ais_connection();
- }
-
- static void process_pcmk(int ci)
- {
-- /* ci ::= client number */
-- char *data = NULL;
-- char *uncompressed = NULL;
-- AIS_Message *msg = NULL;
-- SaAisErrorT rc = SA_AIS_OK;
-- mar_res_header_t *header = NULL;
-- static int header_len = sizeof(mar_res_header_t);
--
-- header = malloc(header_len);
-- memset(header, 0, header_len);
--
-- errno = 0;
-- rc = saRecvRetry(ais_fd_async, header, header_len);
-- if (rc != SA_AIS_OK) {
-- cl_perror("Receiving message header failed: (%d) %s", rc,
-- ais_error2text(rc));
-- goto bail;
-- } else if(header->size == header_len) {
-- log_error("Empty message: id=%d, size=%d, error=%d, header_len=%d",
-- header->id, header->size, header->error, header_len);
-- goto done;
-- } else if(header->size == 0 || header->size < header_len) {
-- log_error("Mangled header: size=%d, header=%d, error=%d",
-- header->size, header_len, header->error);
-- goto done;
-- } else if(header->error != 0) {
-- log_error("Header contined error: %d", header->error);
-- }
--
-- header = realloc(header, header->size);
-- /* Use a char* so we can store the remainder into an offset */
-- data = (char*)header;
--
-- errno = 0;
-- rc = saRecvRetry(ais_fd_async, data+header_len, header->size - header_len);
-- msg = (AIS_Message*)data;
--
-- if (rc != SA_AIS_OK) {
-- cl_perror("Receiving message body failed: (%d) %s", rc, ais_error2text(rc));
-- goto bail;
-- }
--
-- data = msg->data;
-- if(msg->is_compressed && msg->size > 0) {
-- int rc = BZ_OK;
-- unsigned int new_size = msg->size;
--
-- if (check_message_sanity(msg, NULL) == FALSE)
-- goto badmsg;
--
-- log_debug("Decompressing message data");
-- uncompressed = malloc(new_size);
-- memset(uncompressed, 0, new_size);
--
-- rc = BZ2_bzBuffToBuffDecompress(
-- uncompressed, &new_size, data, msg->compressed_size,
-- 1, 0);
--
-- if(rc != BZ_OK) {
-- log_error("Decompression failed: %d", rc);
-- goto badmsg;
-- }
--
-- CRM_ASSERT(rc == BZ_OK);
-- CRM_ASSERT(new_size == msg->size);
--
-- data = uncompressed;
--
-- } else if(check_message_sanity(msg, data) == FALSE) {
-- goto badmsg;
--
-- } else if(safe_str_eq("identify", data)) {
-- int pid = getpid();
-- char *pid_s = crm_itoa(pid);
--
-- send_ais_text(0, pid_s, TRUE, NULL, crm_msg_ais);
-- crm_free(pid_s);
-- goto done;
-- }
--
-- if (msg->header.id == crm_class_members) {
-- xmlNode *xml = string2xml(data);
--
-- if(xml != NULL) {
-- const char *value = crm_element_value(xml, "id");
-- if(value)
-- crm_peer_seq = crm_int_helper(value, NULL);
--
-- log_debug("Updating membership %llu", crm_peer_seq);
-- /* crm_log_xml_info(xml, __PRETTY_FUNCTION__); */
-- xml_child_iter(xml, node, crm_update_ais_node(node, crm_peer_seq));
-- crm_calculate_quorum();
-- free_xml(xml);
-- } else {
-- log_error("Invalid peer update: %s", data);
-- }
-- } else {
-- log_error("Unexpected AIS message type: %d", msg->header.id);
-- }
--
--done:
-- free(uncompressed);
-- free(msg);
-- return;
--
--badmsg:
-- log_error("Invalid message (id=%d, dest=%s:%s, from=%s:%s.%d):"
-- " min=%d, total=%d, size=%d, bz2_size=%d",
-- msg->id, ais_dest(&(msg->host)), msg_type2text(msg->host.type),
-- ais_dest(&(msg->sender)), msg_type2text(msg->sender.type),
-- msg->sender.pid, (int)sizeof(AIS_Message),
-- msg->header.size, msg->size, msg->compressed_size);
-- free(uncompressed);
-- free(msg);
-- return;
--
--bail:
-- log_error("AIS connection failed");
-- return;
--}
--
--static void dead_stonithd(int ci)
--{
-- if (ci != stonithd_ci) {
-- log_error("Unknown connection %d", ci);
-- return;
-- }
--
-- log_error("stonithd connection died");
-- shutdown_daemon();
-- connection_dead(ci);
--}
--
--static void process_stonithd(int ci)
--{
-- IPC_Channel *stonithd_ch = stonithd_input_IPC_channel();
--
-- while (stonithd_op_result_ready()) {
-- if (stonithd_ch->ch_status != IPC_CONNECT) {
-- /* The message which was pending for us is that
-- * the IPC status is now IPC_DISCONNECT */
-- break;
-- }
--
-- if (ST_FAIL == stonithd_receive_ops_result(FALSE)) {
-- log_error("stonithd_receive_ops_result() failed");
-- }
-- }
--
-- if (stonithd_ch->ch_status != IPC_CONNECT)
-- dead_stonithd(stonithd_ci);
--}
--
--static void result_stonithd(stonith_ops_t *op)
--{
-- if (op == NULL) {
-- log_error("Called with a NULL op!");
-- return;
-- }
--
-- log_debug("Stonithd result: call=%d, optype=%d, node_name=%s, result=%d, node_list=%s, action=%s",
-- op->call_id, op->optype, op->node_name, op->op_result,
-- (char *)op->node_list, op->private_data);
--
-- switch(op->op_result) {
-- case STONITH_SUCCEEDED:
-- break;
-- case STONITH_CANNOT:
-- case STONITH_TIMEOUT:
-- case STONITH_GENERIC:
-- log_error("Stonith of %s failed (%d)",
-- op->node_name, op->op_result);
-- break;
-- default:
-- log_error("Unsupported action result: %d", op->op_result);
-- }
--}
--
--static gboolean setup_stonith(void)
--{
-- int lpc = 0;
-- int rc = ST_OK;
-- int stonithd_fd;
-- const char *reason = NULL;
-- IPC_Channel *stonithd_ch = NULL;
--
-- for(lpc = 0; lpc < 30; lpc++) {
-- log_debug("Attempting connection to fencing daemon...");
--
-- sleep(1);
-- rc = stonithd_signon("ocfs2-tools");
-- if(rc == ST_OK)
-- break;
--
-- log_error("Sign-in failed: pausing and trying again in 2s...");
-- sleep(1);
-- }
--
-- if(rc != ST_OK) {
-- reason = "Sign-in failed";
-- goto bail;
-- }
--
-- rc = stonithd_set_stonith_ops_callback(result_stonithd);
-- if(rc != ST_OK) {
-- reason = "Setup failed";
-- goto bail;
-- }
--
-- stonithd_ch = stonithd_input_IPC_channel();
-- if(stonithd_ch == NULL) {
-- reason = "No connection";
-- goto bail;
-- }
-- stonithd_fd = stonithd_ch->ops->get_recv_select_fd(stonithd_ch);
-- if(stonithd_ch <= 0) {
-- reason = "No fd";
-- goto bail;
-- }
--
-- stonithd_ci = connection_add(stonithd_fd, process_stonithd,
-- dead_stonithd);
-- if (stonithd_ci < 0) {
-- log_error("Unable to add stonithd client: %s",
-- strerror(-stonithd_ci));
-- goto bail;
-- }
--
-- return TRUE;
--
--bail:
-- log_error("Unable to add stonithd client: %s", reason);
-- return FALSE;
-+ ais_dispatch(ais_fd_async, NULL);
- }
+@@ -152,10 +154,10 @@ static void process_pcmk(int ci)
int setup_stack(void)
{
-- int retries = 0;
-- int pid;
-- char *pid_s;
-- int rc = SA_AIS_OK;
-- struct utsname name;
--
- crm_log_init("ocfs2_controld", LOG_INFO, FALSE, TRUE, 0, NULL);
-- crm_peer_init();
+- crm_log_init("ocfs2_controld", LOG_INFO, FALSE, TRUE, 0, NULL);
++ crm_log_init("ocfs2_controld", LOG_INFO, FALSE, TRUE, 0, NULL, FALSE);
-- if (local_node_uname == NULL) {
-- if (uname(&name) < 0) {
-- cl_perror("uname(2) call failed");
-- exit(100);
-+ if(init_ais_connection(NULL, NULL, NULL, &local_node_uname, &our_nodeid) == FALSE) {
-+ log_printf(LOG_ERR, "Connection to our AIS plugin (%d) failed", CRM_SERVICE);
-+ return -1;
- }
-- local_node_uname = crm_strdup(name.nodename);
-- log_debug("Local node name: %s", local_node_uname);
-- }
--
--retry:
-- log_debug("Creating connection to our AIS plugin");
-- rc = saServiceConnect (&ais_fd_sync, &ais_fd_async, CRM_SERVICE);
-- if (rc != SA_AIS_OK)
-- log_error("Connection to our AIS plugin (%d) failed: %s (%d)",
-- CRM_SERVICE, ais_error2text(rc), rc);
--
-- switch(rc) {
-- case SA_AIS_OK:
-- break;
-- case SA_AIS_ERR_TRY_AGAIN:
-- if(retries < 30) {
-- sleep(1);
-- retries++;
-- goto retry;
-- }
-- log_error("Retry count exceeded");
-- return 0;
-- default:
-- return 0;
-- }
--
-- log_debug("AIS connection established");
--
-- pid = getpid();
-- pid_s = crm_itoa(pid);
-- send_ais_text(0, pid_s, TRUE, NULL, crm_msg_ais);
-- crm_free(pid_s);
-
- /* Sign up for membership updates */
- send_ais_text(crm_class_notify, "true", TRUE, NULL, crm_msg_ais);
-@@ -427,14 +186,11 @@ retry:
- /* Requesting the current list of known nodes */
- send_ais_text(crm_class_members, __FUNCTION__, TRUE, NULL, crm_msg_ais);
-
-- our_nodeid = get_ais_nodeid();
-- log_debug("Local node id: %d", our_nodeid);
--
- pcmk_ci = connection_add(ais_fd_async, process_pcmk, dead_pcmk);
-- if (pcmk_ci >= 0 && setup_stonith())
-+ if (pcmk_ci >= 0)
- return ais_fd_async;
+ if(init_ais_connection(NULL, NULL, NULL, &local_node_uname, &our_nodeid) == FALSE) {
+- log_error("Connection to our AIS plugin (%d) failed", CRM_SERVICE);
++ log_error("Connection to our AIS plugin (CRM) failed");
+ return -1;
+ }
-- log_error("Unable to add pacemaker client: %s", strerror(-pcmk_ci));
-+ log_printf(LOG_ERR, "Unable to add pacemaker client: %s", strerror(-pcmk_ci));
- exit_stack();
- return pcmk_ci;
- }
++++++ ocfs2-devel.diff ++++++
--- /var/tmp/diff_new_pack.CUanKp/_old 2010-06-30 10:43:53.000000000 +0200
+++ /var/tmp/diff_new_pack.CUanKp/_new 2010-06-30 10:43:53.000000000 +0200
@@ -1,33 +1,6 @@
---- ocfs2-tools/ocfs2_controld/main.c
-+++ ocfs2-tools/ocfs2_controld/main.c
-@@ -1027,6 +1027,7 @@
-
- static void daemonize(void)
- {
-+ int fd;
- pid_t pid = fork();
- if (pid < 0) {
- perror("main: cannot fork");
-@@ -1040,6 +1041,18 @@
- close(0);
- close(1);
- close(2);
-+ fd = open("/dev/null", O_RDWR);
-+ if (fd >= 0) {
-+ /* dup2 to 0 / 1 / 2 (stdin / stdout / stderr) */
-+ dup2(fd, STDIN_FILENO); /* 0 */
-+ dup2(fd, STDOUT_FILENO); /* 1 */
-+ dup2(fd, STDERR_FILENO); /* 2 */
-+
-+ /* Should be 0, but just in case it isn't... */
-+ if (fd > 2) {
-+ close(fd);
-+ }
-+ }
- openlog("ocfs2_controld", LOG_PID, LOG_DAEMON);
-
- lockfile();
---- ocfs2-tools/vendor/common/o2cb.init.sh
+Index: ocfs2-tools/vendor/common/o2cb.init.sh
+===================================================================
+--- ocfs2-tools.orig/vendor/common/o2cb.init.sh
+++ ocfs2-tools/vendor/common/o2cb.init.sh
@@ -8,7 +8,8 @@
# Provides: o2cb
@@ -39,7 +12,7 @@
# Default-Start: 2 3 5
# Default-Stop:
# Short-Description: Load O2CB cluster services at system boot.
-@@ -653,7 +654,7 @@
+@@ -653,7 +654,7 @@ status_filesystem()
status_daemon()
{
@@ -48,16 +21,7 @@
echo -n "Checking for control daemon: "
if [ -n "$(pidofproc "$DAEMON")" ]
then
-@@ -667,7 +668,7 @@
-
- bringup_daemon()
- {
-- DAEMON="/sbin/ocfs2_controld.${O2CB_STACK}"
-+ DAEMON="/usr/sbin/ocfs2_controld.${O2CB_STACK}"
- echo -n "Starting $(basename "$DAEMON"): "
- start_daemon "$DAEMON"
- [ $? != 0 ] && return 1
-@@ -682,6 +683,7 @@
+@@ -682,6 +683,7 @@ bringup_daemon()
fi
sleep 1
done
@@ -65,7 +29,7 @@
return 0
}
-@@ -689,7 +691,7 @@
+@@ -689,7 +691,7 @@ bringup_daemon()
kill_daemon()
{
SIGNAL="$1"
@@ -74,7 +38,9 @@
status_daemon >/dev/null 2>&1 || return 2
---- ocfs2-tools/vendor/common/ocfs2.init
+Index: ocfs2-tools/vendor/common/ocfs2.init
+===================================================================
+--- ocfs2-tools.orig/vendor/common/ocfs2.init
+++ ocfs2-tools/vendor/common/ocfs2.init
@@ -8,9 +8,9 @@
### BEGIN INIT INFO
++++++ ocfs2-o2cb_ctl-static-glibc.diff ++++++
Index: ocfs2-tools/o2cb_ctl/Makefile
===================================================================
--- ocfs2-tools.orig/o2cb_ctl/Makefile
+++ ocfs2-tools/o2cb_ctl/Makefile
@@ -40,6 +40,6 @@ o2cb_config_CPPFLAGS = $(GLIB_CFLAGS) -D
o2cb_ctl_CPPFLAGS = $(GLIB_CFLAGS) -DG_DISABLE_DEPRECATED
o2cb_ctl: $(O2CB_CTL_OBJS) $(LIBOCFS2_DEPS) $(LIBO2CB_DEPS)
- $(LINK) $(LIBO2CB_LIBS) $(GLIB_LIBS) $(LIBOCFS2_LIBS) $(COM_ERR_LIBS)
+ $(LINK) $(LIBO2CB_LIBS) -Wl,-Bstatic $(GLIB_LIBS) -Wl,-Bdynamic $(LIBOCFS2_LIBS) $(COM_ERR_LIBS)
include $(TOPDIR)/Postamble.make
++++++ ocfs2-tools.tar.bz2 ++++++
++++ 40531 lines of diff (skipped)
++++++ reflink-no-syscall.patch ++++++
Index: reflink/coreutils-6.9/src/ln.c
===================================================================
--- reflink.orig/coreutils-6.9/src/ln.c
+++ reflink/coreutils-6.9/src/ln.c
@@ -152,52 +152,6 @@ target_directory_operand (char const *fi
return is_a_dir;
}
-#ifndef HAVE_REFLINK
-# ifndef HAVE_REFLINKAT
-# include <sys/syscall.h>
-
-# ifndef SYS_reflinkat
-# ifdef __i386__
-# define __NR_reflinkat 337
-# endif
-# ifdef __x86_64__
-# define __NR_reflinkat 299
-# endif
-# define SYS_reflinkat __NR_reflinkat
-# endif /* SYS_reflinkat */
-
-# ifdef SYS_reflinkat
-static int reflinkat(int olddirfd, const char *oldpath,
- int newdirfd, const char *newpath,
- int preserve, int flags)
-{
- return syscall(SYS_reflinkat, olddirfd, oldpath, newdirfd, newpath,
- preserve, flags);
-}
-# else
-static int reflinkat(int olddirfd, const char *oldpath,
- int newdirfd, const char *newpath,
- int preserve, int flags)
-{
- return -ENOSYS;
-}
-# endif /* SYS_reflinkat */
-# endif /* HAVE_REFLINKAT */
-
-/*
- * We've now defined reflinkat of some sort. We can use it to build
- * reflink.
- */
-# ifndef AT_FDCWD
-# define AT_FDCWD -100
-# endif
-static int reflink(const char *oldpath, const char *newpath,
- int preserve)
-{
- return reflinkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, preserve, 0);
-}
-#endif /* HAVE_REFLINK */
-
#ifndef REFLINK_ATTR_NONE
# define REFLINK_ATTR_NONE 0
#endif
++++++ version-1.4.3.patch ++++++
This patch keeps ocfs2-tools version as 1.4.3, until we decide to update the package version.
Signed-off-by: Coly Li <coly.li(a)suse.de>
---
diff -ur ocfs2-tools/configure.in ocfs2-tools-new//configure.in
--- ocfs2-tools/configure.in 2010-02-20 01:21:46.000000000 +0800
+++ ocfs2-tools-new//configure.in 2010-03-11 09:38:01.000000000 +0800
@@ -8,8 +8,8 @@
# Adjust these for the software version.
MAJOR_VERSION=1
-MINOR_VERSION=6
-MICRO_VERSION=0
+MINOR_VERSION=4
+MICRO_VERSION=3
EXTRA_VERSION=
DIST_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package MozillaFirefox for openSUSE:Factory
checked in at Wed Jun 30 10:43:12 CEST 2010.
--------
--- MozillaFirefox/MozillaFirefox.changes 2010-06-23 14:42:01.000000000 +0200
+++ /mounts/work_src_done/STABLE/MozillaFirefox/MozillaFirefox.changes 2010-06-27 21:03:32.000000000 +0200
@@ -1,0 +2,8 @@
+Sun Jun 27 20:24:31 CEST 2010 - wr(a)rosenauer.org
+
+- update to 3.6.6 release
+ * modifies the crash protection feature to increase the amount
+ of time that plugins are allowed to be non-responsive before
+ being terminated.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
firefox-3.6.4-source.tar.bz2
l10n-3.6.4.tar.bz2
New:
----
firefox-3.6.6-source.tar.bz2
l10n-3.6.6.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ MozillaFirefox.spec ++++++
--- /var/tmp/diff_new_pack.mRdBPg/_old 2010-06-30 10:42:44.000000000 +0200
+++ /var/tmp/diff_new_pack.mRdBPg/_new 2010-06-30 10:42:44.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package MozillaFirefox (Version 3.6.4)
+# spec file for package MozillaFirefox (Version 3.6.6)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 2006-2010 Wolfgang Rosenauer
@@ -22,7 +22,7 @@
Name: MozillaFirefox
%define xulrunner mozilla-xulrunner192
BuildRequires: autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip
-BuildRequires: %{xulrunner}-devel = 1.9.2.4
+BuildRequires: %{xulrunner}-devel = 1.9.2.6
%if %suse_version > 1020
BuildRequires: fdupes
%endif
@@ -34,9 +34,9 @@
License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
Provides: web_browser
Provides: firefox
-Version: 3.6.4
-Release: 3
-%define releasedate 2010061100
+Version: 3.6.6
+Release: 1
+%define releasedate 2010062600
Summary: Mozilla Firefox Web Browser
Url: http://www.mozilla.org/
Group: Productivity/Networking/Web/Browsers
++++++ firefox-3.6.4-source.tar.bz2 -> firefox-3.6.6-source.tar.bz2 ++++++
MozillaFirefox/firefox-3.6.4-source.tar.bz2 /mounts/work_src_done/STABLE/MozillaFirefox/firefox-3.6.6-source.tar.bz2 differ: byte 11, line 1
++++++ l10n-3.6.4.tar.bz2 -> l10n-3.6.6.tar.bz2 ++++++
MozillaFirefox/l10n-3.6.4.tar.bz2 /mounts/work_src_done/STABLE/MozillaFirefox/l10n-3.6.6.tar.bz2 differ: byte 11, line 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package hawk for openSUSE:Factory
checked in at Wed Jun 30 10:42:19 CEST 2010.
--------
New Changes file:
--- /dev/null 2010-05-08 11:31:08.000000000 +0200
+++ /mounts/work_src_done/STABLE/hawk/hawk.changes 2010-06-25 05:26:13.000000000 +0200
@@ -0,0 +1,154 @@
+-------------------------------------------------------------------
+Fri Jun 25 03:20:25 UTC 2010 - tserong(a)novell.com
+
+- Allow default rack version (1.1.0) to build against Rails 2.3.8
+
+-------------------------------------------------------------------
+Mon May 10 05:14:13 UTC 2010 - tserong(a)novell.com
+
+- Misc: Update translations
+- Upstream version cs:2a79e0d9cb43
+
+-------------------------------------------------------------------
+Fri Apr 23 10:17:10 UTC 2010 - tserong(a)novell.com
+
+- GUI: Fixed inability to click menu button for M/S sets in Internet Explorer
+- Upstream version cs:067bef4c4f72
+
+-------------------------------------------------------------------
+Fri Apr 23 04:16:11 UTC 2010 - tserong(a)novell.com
+
+- GUI: Use absolute (instead of fixed) position in confirmation dialogs on Android (bnc#596052)
+- GUI: Add ability to promote/demote master/slave resource sets (bnc#593019)
+- GUI: Show children of Master/Slave sets correctly as either Master or Slave (not just "Started")
+- GUI: Use "Move" instead of "Migrate" in menus, dialogs
+- Upstream version cs:fd621b9c8595
+
+-------------------------------------------------------------------
+Mon Apr 19 13:43:17 UTC 2010 - tserong(a)novell.com
+
+- Revert to unix2_chkpwd instead of hawk_chkpwd (interim measure)
+
+-------------------------------------------------------------------
+Fri Apr 16 12:30:40 UTC 2010 - tserong(a)novell.com
+
+- Misc: Use hawk_chkpwd helper binary for user authentication (instead of unix2_chkpwd)
+- Upstream version cs:86861933b048
+
+-------------------------------------------------------------------
+Mon Apr 12 04:45:31 UTC 2010 - tserong(a)novell.com
+
+- Show Master/Slave sets (but just shows children as "started", not yet M/S)
+- Upstream version cs:033fd682b8f3
+
+-------------------------------------------------------------------
+Fri Apr 9 10:08:01 UTC 2010 - tserong(a)novell.com
+
+- Specify rack version 1.0.1 to ensure compatibility with ActionPack 2.3.5
+
+-------------------------------------------------------------------
+Fri Apr 9 09:46:55 UTC 2010 - tserong(a)novell.com
+
+- Misc: Port number is now 7630 (registered with IANA)
+- Misc: Update zh_TW translation
+- GUI: Add confirmation prompt for node ops (bnc#593003)
+- GUI: Add confirmation prompt for resource ops
+- GUI: Allow resource mgmt ops on groups (in addition to resources *in* groups)
+- GUI: Add ability to migrate resources (bnc#593005)
+- Upstream version cs:3675f11f3448
+
+-------------------------------------------------------------------
+Mon Mar 29 05:32:25 UTC 2010 - tserong(a)novell.com
+
+- Misc: Add translations for ar, cs, de, es, fr, hu, it, ja, ko, nl, pl, pt_BR, ru, sv, zh_CN, zh_TW
+- GUI: Invoke "crm" for resource ops, report invocation errors in UI (bnc#583605 again)
+- GUI: Add mgmt buttons for new resources that appear via JSON update (bnc#590037)
+- GUI: Fix blank login page on first load in IE, and auto-focus input fields
+- Upstream version cs:f1369a200773
+
+-------------------------------------------------------------------
+Wed Mar 3 14:56:10 UTC 2010 - tserong(a)novell.com
+
+- Upstream version cs:13717d154bbc
+- GUI: Add login screen (user must be in 'haclient' group, same as python GUI)
+- GUI: Fix "start/stop clone-of-group has no effect" (bnc#583605)
+
+-------------------------------------------------------------------
+Mon Feb 22 14:27:25 UTC 2010 - tserong(a)novell.com
+
+- Enable mgmt ops by default
+
+-------------------------------------------------------------------
+Mon Feb 22 13:59:50 UTC 2010 - tserong(a)novell.com
+
+- Upstream version cs:d7041bcbfbc9
+- GUI: Basic mgmt ops for resource (start/stop/cleanup) and nodes (online/standby/fence)
+- GUI: Borders around nodelist, reslist. Clones & groups reflect status color of children.
+- GUI: Various IE display fixes
+- GUI: Don't rely on existence of specific properties to render status display
+
+-------------------------------------------------------------------
+Sat Feb 20 09:13:37 UTC 2010 - tserong(a)novell.com
+
+- Workaround for bnc#579874 (String#unpack("V") broken on s390x)
+
+-------------------------------------------------------------------
+Tue Feb 9 10:29:31 UTC 2010 - tserong(a)novell.com
+
+- Require startproc respecting -p (bnc#570334)
+
+-------------------------------------------------------------------
+Mon Feb 8 11:53:57 UTC 2010 - tserong(a)novell.com
+
+- Upstream version cs:cb1b9ee863f1
+- GUI: Auto-refresh handles adding/removing nodes/resources
+- GUI: Auto-refresh error bar & summary info
+
+-------------------------------------------------------------------
+Wed Feb 3 14:33:36 UTC 2010 - tserong(a)novell.com
+
+- Upstream version cs:a033a52078bb
+- Misc: Use HTTPS instead of HTTP by default
+
+-------------------------------------------------------------------
+Fri Jan 29 04:44:00 UTC 2010 - tserong(a)novell.com
+
+- Embed rubygems in vendor directory (bnc#574718)
+
+-------------------------------------------------------------------
+Thu Jan 28 13:37:55 UTC 2010 - tserong(a)novell.com
+
+- Upstream version cs:9be77a99ca2f
+- GUI: sort node list in "natural" order
+- GUI: Get resource state from LRM ops, show "stopped" not "unknown" (bnc#574060)
+- GUI: Clean up node state logic (derived from pengine/unpack.c) (bnc#574057)
+- GUI: Add summary of cluster stack, version, DC, options
+
+-------------------------------------------------------------------
+Thu Jan 28 11:38:36 UTC 2010 - tserong(a)novell.com
+
+- Remove subsequent dependency on FastCGI (filter out libfcgi.so.0)
+
+-------------------------------------------------------------------
+Thu Jan 28 10:50:17 UTC 2010 - tserong(a)novell.com
+
+- Remove ruby-fcgi dependency (embedded into vendor dir) (bnc#574340)
+
+-------------------------------------------------------------------
+Mon Jan 25 02:36:36 UTC 2010 - tserong(a)novell.com
+
+- Upstream version cs:bfc8e9919f08
+- Remove dependency on lighttpd-mod_magnet (bnc#572173)
+- Pull in rails, gettext gems etc. at build time (bnc#570334)
+- Include copy of GPL (bnc#571573)
+
+-------------------------------------------------------------------
+Wed Jan 13 14:38:28 UTC 2010 - lmb(a)novell.com
+
+- Correct directory permissions.
+
+-------------------------------------------------------------------
+Tue Jan 12 12:00:00 UTC 2010 - tserong(a)novell.com
+
+- Initial checkin
+
calling whatdependson for head-i586
New:
----
allow-default-rack-version.patch
filter-requires.sh
hawk-0.3.5.tar.bz2
hawk.changes
hawk.spec
string-unpack-s390x.patch
use-unix2_chkpwd.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hawk.spec ++++++
#
# spec file for package hawk (Version 0.3.5)
#
# Copyright (c) 2010 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/
#
%define www_base /srv/www
%define vendor_ruby vendor_ruby
%define init_style suse
%define pkg_group Productivity/Clustering/HA
%define gname haclient
%define uname hacluster
Name: hawk
Summary: HA Web Konsole
Version: 0.3.5
Release: 1
License: GPLv2
Group: Productivity/Clustering/HA
Source: %{name}-%{version}.tar.bz2
Source1: filter-requires.sh
Patch1: string-unpack-s390x.patch
Patch2: use-unix2_chkpwd.patch
Patch3: allow-default-rack-version.patch
%define _use_internal_dependency_generator 0
%define __find_requires /bin/sh %{SOURCE1}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
AutoReqProv: on
Requires: pacemaker
Requires: ruby
Requires: lighttpd >= 1.4.20
BuildRequires: rubygems
BuildRequires: rubygem-rake
BuildRequires: rubygem-gettext_rails
Requires: pam-modules
BuildRequires: ruby-fcgi
BuildRequires: rubygem-rails-2_3
BuildRequires: fdupes
# Require startproc respecting -p, bnc#559534#c44
%if 0%{?suse_version} > 1110
# 11.2 or newer;
Requires: sysvinit > 2.86-215.2
%else
# 11.1 or SLES11
Requires: sysvinit > 2.86-195.3.1
%endif
%description
A web-based GUI for monitoring the Pacemaker High-Availability cluster
resource manager
Authors: Tim Serong <tserong(a)novell.com>
%prep
%setup
%patch1 -p0
%patch2 -p0
%patch3 -p0
%build
make WWW_BASE=%{www_base} INIT_STYLE=%{init_style}
%install
make WWW_BASE=%{www_base} INIT_STYLE=%{init_style} DESTDIR=%{buildroot} install
# copy of GPL
cp COPYING %{buildroot}%{www_base}/hawk/
# evil magic to get ruby-fcgi into the vendor directory
for f in $(rpm -ql ruby-fcgi|grep %{vendor_ruby}); do
# gives something simliar to:
# /usr/lib64/ruby/vendor_ruby/1.8/fcgi.rb
# /usr/lib64/ruby/vendor_ruby/1.8/x86_64-linux/fcgi.so
r=$(echo $f | sed 's/.*%{vendor_ruby}\/[^\/]*\///')
mkdir -p %{buildroot}%{www_base}/hawk/vendor/$(dirname $r)
cp $f %{buildroot}%{www_base}/hawk/vendor/$r
done
# even more evil magic to get rubygems into the vendor directory
for f in $(rpm -ql rubygems|grep %{vendor_ruby}); do
# gives something simliar to:
# /usr/lib64/ruby/vendor_ruby/1.8/rubygems.rb
# /usr/lib64/ruby/vendor_ruby/1.8/rubygems/...
[ -f $f ] || continue
r=$(echo $f | sed 's/.*%{vendor_ruby}\/[^\/]*\///')
mkdir -p %{buildroot}%{www_base}/hawk/vendor/$(dirname $r)
cp $f %{buildroot}%{www_base}/hawk/vendor/$r
done
# get rid of gem sample and test cruft
rm -rf %{buildroot}%{www_base}/hawk/vendor/gems/*/sample
rm -rf %{buildroot}%{www_base}/hawk/vendor/gems/*/samples
rm -rf %{buildroot}%{www_base}/hawk/vendor/gems/*/test
# mark .mo files as such (works on SUSE but not FC12, as the latter wants directory to
# be "share/locale", not just "locale", and it also doesn't support appending to %{name}.lang)
%find_lang %{name} %{name}.lang
%find_lang rgettext %{name}.lang
%find_lang gettext_rails %{name}.lang
# hard link duplicate files
%fdupes %{buildroot}
# more cruft to clean up (WTF?)
rm -f %{buildroot}%{www_base}/hawk/log/*
find %{buildroot}%{www_base}/hawk/vendor/rails -type f -name '*.css' -o -name '*.js' -o -name '*LICENSE' | xargs chmod a-x
# init script
%{__install} -d -m 0755 \
%{buildroot}%{_sbindir}
%{__install} -D -m 0755 scripts/hawk.%{init_style} \
%{buildroot}%{_sysconfdir}/init.d/hawk
%{__ln_s} -f %{_sysconfdir}/init.d/hawk %{buildroot}%{_sbindir}/rchawk
%clean
rm -rf %{buildroot}
%post
%fillup_and_insserv hawk
%preun
%stop_on_removal hawk
%postun
%restart_on_update hawk
%{insserv_cleanup}
%triggerin -- lighttpd
%restart_on_update hawk
%files -f %{name}.lang
%defattr(-,root,root)
%dir %{www_base}/hawk
%{www_base}/hawk/app
%{www_base}/hawk/config
%{www_base}/hawk/db
%{www_base}/hawk/doc
%{www_base}/hawk/lib
%attr(0750, %{uname},%{gname})%{www_base}/hawk/log
%attr(0750, %{uname},%{gname})%{www_base}/hawk/tmp
%{www_base}/hawk/po
%{www_base}/hawk/public
%{www_base}/hawk/Rakefile
%{www_base}/hawk/COPYING
%{www_base}/hawk/script
%{www_base}/hawk/test
# itemizing content in %{www_base}/hawk/vendor and locale to avoid
# duplicate files that would otherwise be the result of including hawk.lang
%dir %{www_base}/hawk/locale
%dir %{www_base}/hawk/vendor
%{www_base}/hawk/vendor/*rb
# architecture-specific .so files
%{www_base}/hawk/vendor/*-linux
# this is moderatly disgusting - the intent is to get everything except
# the content of "data/locale" which is covered by files in hawk.lang
%dir %{www_base}/hawk/vendor/gems
%dir %{www_base}/hawk/vendor/gems/*
%dir %{www_base}/hawk/vendor/gems/*/data
%dir %{www_base}/hawk/vendor/gems/*/data/locale
%{www_base}/hawk/vendor/gems/*/[!d]*
%{www_base}/hawk/vendor/gems/*/.specification
%{www_base}/hawk/vendor/rails
%{www_base}/hawk/vendor/rbconfig
%{www_base}/hawk/vendor/rubygems
%config(noreplace) %attr(-,root,root) %{_sysconfdir}/init.d/hawk
%attr(-,root,root) %{_sbindir}/rchawk
%changelog
++++++ allow-default-rack-version.patch ++++++
Index: hawk/config/environment.rb
===================================================================
--- hawk/config/environment.rb.orig
+++ hawk/config/environment.rb
@@ -24,11 +24,7 @@ Rails::Initializer.run do |config|
config.gem "locale_rails"
config.gem "gettext"
config.gem "gettext_rails"
- # Explicitly require any rack version in the 1.0 series. This is necessary because
- # ActionPack 2.3.5 explicitly specifies this as well, so if we run on a system with
- # rack 1.1, it all breaks horribly if we don't force it back to 1.0 here. Some further
- # discussion is at https://rails.lighthouseapp.com/projects/8994/tickets/3685-actionpack-235-g…
- config.gem "rack", :version => '~> 1.0.0'
+ config.gem "rack"
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named
++++++ filter-requires.sh ++++++
#!/bin/sh
# Courtesy of http://fedoraproject.org/wiki/PackagingDrafts/FilteringAutomaticDependencies
if [ -x /usr/lib/rpm/redhat/find-requires ] ; then
FINDREQ=/usr/lib/rpm/redhat/find-requires
else
FINDREQ=/usr/lib/rpm/find-requires
fi
$FINDREQ $* | sed -e '/libfcgi.so/d'
++++++ string-unpack-s390x.patch ++++++
Index: hawk/public/dispatch.fcgi
===================================================================
--- hawk/public/dispatch.fcgi.orig
+++ hawk/public/dispatch.fcgi
@@ -23,6 +23,42 @@
# we can pull rubygems from there
$LOAD_PATH.unshift(File.dirname(__FILE__) + "/../vendor")
+# Workaround for bnc#579874 (ruby: String#unpack("V") does not work correctly on s390x)
+if [1].pack('V').unpack('V')[0] != 1
+ class String
+ alias_method :broken_unpack, :unpack
+ def unpack(spec)
+ # use regular unpack first...
+ unpacked = broken_unpack(spec)
+ if spec.include? 'V'
+ # ...then, if there's a 'V' anywhere, expand the spec
+ # (need this to handle numeric and '*' parts of spec)...
+ parts = spec.scan(/[0-9]+|[^0-9]/)
+ spec = ''
+ final = ''
+ parts.each_with_index do |x,i|
+ n = x.to_i
+ if n > 0
+ (n-1).times { spec += parts[i-1] }
+ else
+ spec += x
+ final = x unless x == '*'
+ end
+ end
+ # ...and match the expanded spec against the unpacked array...
+ unpacked = unpacked.each_with_index.map do |x,i|
+ # cope with '*' at end of spec
+ format = (i >= spec.length || spec[i] == ?*) ? final[0] : spec[i]
+ # if we've hit a 'V', shift it right 32 bits to get the correct value
+ x >>= 32 if format == ?V
+ x
+ end
+ end
+ unpacked
+ end
+ end
+end
+
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'
++++++ use-unix2_chkpwd.patch ++++++
Index: Makefile
===================================================================
--- Makefile.orig
+++ Makefile
@@ -54,16 +54,12 @@ WWW_BASE = /srv/www
# Override this to get a different init script (e.g. "redhat")
INIT_STYLE = suse
-all: scripts/hawk.$(INIT_STYLE) hawk/config/lighttpd.conf tools/hawk_chkpwd
+all: scripts/hawk.$(INIT_STYLE) hawk/config/lighttpd.conf
(cd hawk; rake makemo; rake freeze:rails; rake freeze:gems)
%: %.in
sed -e 's|@WWW_BASE@|$(WWW_BASE)|' $< > $@
-tools/hawk_chkpwd: tools/hawk_chkpwd.c
- gcc -o $@ $< -lpam
-
-
clean:
rm -rf hawk/locale
rm -rf hawk/vendor
@@ -87,8 +83,6 @@ install:
rm $(DESTDIR)$(WWW_BASE)/hawk/config/lighttpd.conf.in
-chown -R hacluster.haclient $(DESTDIR)$(WWW_BASE)/hawk
install -D -m 0755 scripts/hawk.$(INIT_STYLE) $(DESTDIR)/etc/init.d/hawk
- install -D -m 4750 tools/hawk_chkpwd $(DESTDIR)/usr/sbin/hawk_chkpwd
- -chown root.haclient $(DESTDIR)/usr/sbin/hawk_chkpwd
# Make a tar.bz2 named for the most recent human-readable tag
archive:
Index: hawk/app/controllers/sessions_controller.rb
===================================================================
--- hawk/app/controllers/sessions_controller.rb.orig
+++ hawk/app/controllers/sessions_controller.rb
@@ -45,7 +45,7 @@ class SessionsController < ApplicationCo
end
# called from login screen
- HAWK_CHKPWD = '/usr/sbin/hawk_chkpwd'
+ UNIX2_CHKPWD = '/sbin/unix2_chkpwd'
def create
if params[:username].blank?
flash[:warning] = _('Username not specified')
@@ -58,12 +58,12 @@ class SessionsController < ApplicationCo
flash[:warning] = _('Password not specified')
redirect_to :action => 'new', :username => params[:username]
else
- if File.exists?(HAWK_CHKPWD) && File.executable?(HAWK_CHKPWD)
- IO.popen("#{HAWK_CHKPWD} passwd '#{params[:username]}'", 'w+') do |pipe|
+ if File.exists?(UNIX2_CHKPWD) && File.executable?(UNIX2_CHKPWD)
+ IO.popen("#{UNIX2_CHKPWD} passwd '#{params[:username]}'", 'w+') do |pipe|
pipe.write params[:password]
pipe.close_write
end
- if $?.exitstatus == 0
+ if $?.exitstatus == 0 && allow_group(params[:username])
# The user can log in, and they're in our required group
reset_session
session[:username] = params[:username]
@@ -74,12 +74,25 @@ class SessionsController < ApplicationCo
redirect_to :action => 'new', :username => params[:username]
end
else
- flash[:warning] = _('%s is not installed') % HAWK_CHKPWD
+ flash[:warning] = _('%s is not installed') % UNIX2_CHKPWD
redirect_to :action => 'new', :username => params[:username]
end
end
end
+ ALLOW_GROUP = 'haclient'
+ def allow_group(username)
+ require 'etc'
+ pwnam = Etc.getpwnam(username)
+ return false unless pwnam
+ grgid = Etc.getgrgid(pwnam.gid)
+ return false unless grgid
+ return true if grgid.name == ALLOW_GROUP
+ grnam = Etc.getgrnam(ALLOW_GROUP)
+ return false unless grnam
+ return grnam.mem.include?(username)
+ end
+
def destroy
session[:username] = nil
reset_session
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0