Mailinglist Archive: opensuse-commit (640 mails)

< Previous Next >
commit autofs for openSUSE:Factory

Hello community,

here is the log from the commit of package autofs for openSUSE:Factory
checked in at Fri Apr 8 11:10:53 CEST 2011.



--------
--- autofs/autofs.changes 2011-03-03 15:28:14.000000000 +0100
+++ /mounts/work_src_done/STABLE/autofs/autofs.changes 2011-04-07
16:40:01.000000000 +0200
@@ -1,0 +2,36 @@
+Mon Apr 4 21:04:35 UTC 2011 - lchiquitto@xxxxxxxxxx
+
+- init script: use misc device (/dev/autofs) by default, unless it
+ is explicitly disabled in sysconfig (bnc#684997)
+
+-------------------------------------------------------------------
+Mon Apr 4 20:49:38 UTC 2011 - lchiquitto@xxxxxxxxxx
+
+- fix out of order locking in readmap (bnc#667967)
+
+-------------------------------------------------------------------
+Mon Apr 4 20:40:04 UTC 2011 - lchiquitto@xxxxxxxxxx
+
+- add upstream fixes for the "non-expiring mounts" problem and
+ put the "fix direct map not updating on reread" patch back in
+ (bnc#677143)
+
+-------------------------------------------------------------------
+Tue Mar 29 17:47:28 UTC 2011 - lchiquitto@xxxxxxxxxx
+
+- ship init script as a source file and not as a patch against the
+ upstream sample
+
+-------------------------------------------------------------------
+Tue Mar 29 14:54:08 UTC 2011 - lchiquitto@xxxxxxxxxx
+
+- update 5.0.5 upstream patches to 20110318, fixing one bug:
+ * replace GPLv3 code (bnc#682268)
+
+-------------------------------------------------------------------
+Thu Mar 24 21:04:16 UTC 2011 - lchiquitto@xxxxxxxxxx
+
+- revert "fix direct map not updating on reread" due to expiration
+ problems (bnc#677143)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
autofs-5.0.5-upstream-patches-20110302.bz2
autofs-suse-autofs_init.patch

New:
----
autofs-5.0.5-fix-next-task-list-update.patch
autofs-5.0.5-fix-out-of-order-locking-in-readmap.patch
autofs-5.0.5-fix-stale-map-read.patch
autofs-5.0.5-upstream-patches-20110318.bz2
autofs.init

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

Other differences:
------------------
++++++ autofs.spec ++++++
--- /var/tmp/diff_new_pack.k68aQT/_old 2011-04-08 11:10:09.000000000 +0200
+++ /var/tmp/diff_new_pack.k68aQT/_new 2011-04-08 11:10:09.000000000 +0200
@@ -26,21 +26,24 @@
Group: System/Daemons
AutoReqProv: on
Version: 5.0.5
-Release: 17
+Release: 18
Summary: A Kernel-Based Automounter
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source:
ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/%{name}-%{version}.tar.bz2
Source1: sysconfig.autofs
+Source2: autofs.init
Source3: autofs.schema
Source4: README.SuSE.ldap
Source5: README.SuSE
Source7: NetworkManager-autofs
Source8: get-upstream-patches
-%define patchdate 20110302
+%define patchdate 20110318
Patch0: autofs-%{version}-upstream-patches-%{patchdate}.bz2
-Patch1: autofs-5.0.5-invalid-ghost-dirs.patch
+Patch1: autofs-5.0.5-fix-next-task-list-update.patch
+Patch2: autofs-5.0.5-fix-stale-map-read.patch
+Patch3: autofs-5.0.5-invalid-ghost-dirs.patch
+Patch4: autofs-5.0.5-fix-out-of-order-locking-in-readmap.patch
Patch10: autofs-suse-auto_master_default.patch
-Patch11: autofs-suse-autofs_init.patch
Patch12: autofs-suse-build.patch
PreReq: %fillup_prereq %insserv_prereq aaa_base
Recommends: nfs-client
@@ -66,8 +69,10 @@
#
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
%patch10 -p1
-%patch11 -p1
%patch12 -p1

%build
@@ -85,9 +90,10 @@

%install
make install INSTALLROOT=$RPM_BUILD_ROOT
-ln -s ../../etc/init.d/autofs $RPM_BUILD_ROOT/usr/sbin/rcautofs
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 %{S:1} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.autofs
+install -m 755 %{S:2} $RPM_BUILD_ROOT/etc/init.d/autofs
+ln -s ../../etc/init.d/autofs $RPM_BUILD_ROOT/usr/sbin/rcautofs
mkdir -p $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d
install -m 755 %{S:7} $RPM_BUILD_ROOT/etc/NetworkManager/dispatcher.d/autofs
# will be installed by fillup scripts

++++++ README.SuSE.ldap ++++++
--- /var/tmp/diff_new_pack.k68aQT/_old 2011-04-08 11:10:09.000000000 +0200
+++ /var/tmp/diff_new_pack.k68aQT/_new 2011-04-08 11:10:09.000000000 +0200
@@ -3,7 +3,7 @@
----------------

You can configure autofs via LDAP using the nis.schema or rfc2307bis.schema.
-You can find this schema at /etc/openldap/schema/nis.schema and
+You can find this schema at /etc/openldap/schema/nis.schema and
/etc/openldap/schema/rfc2307bis.schema resp.

1. Change the "automount:" entry in /etc/nsswitch.conf to
@@ -31,7 +31,7 @@

dn: cn=/mounts,nisMapName=auto.master,ou=AUTOFS,dc=example,dc=org
objectClass: nisObject
-nisMapName: auto.master
+nisMapName: auto.master
cn: /mounts
nisMapEntry: ldap
ldapserver.example.org:nisMapName=auto.mounts,ou=AUTOFS,dc=example,dc=org


++++++ autofs-5.0.5-fix-next-task-list-update.patch ++++++
From: Ian Kent <raven@xxxxxxxxxx>
Subject: [PATCH 1/2] autofs-5.0.5 - fix next task list update

When the state queue task manager transfered an automount point pending
task to its task queue for execution the state queue as mistakenly being
seen as empty when the completing task was the only task in the state
queue.
---

CHANGELOG | 1 +
daemon/state.c | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 347d7d7..a9687b7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -62,6 +62,7 @@
- fix mountd vers retry.
- fix expire race.
- replace GPLv3 code.
+- fix next task list update.

03/09/2009 autofs-5.0.5
-----------------------
diff --git a/daemon/state.c b/daemon/state.c
index 38617c3..85587bd 100644
--- a/daemon/state.c
+++ b/daemon/state.c
@@ -1150,11 +1150,13 @@ remove:
next = list_entry((&task->pending)->next,
struct state_queue,
pending);

- list_del_init(&next->pending);
- list_add_tail(&next->list, p);
-
list_del(&task->list);
free(task);
+
+ list_del_init(&next->pending);
+ list_add_tail(&next->list, head);
+ if (p == head)
+ p = head->next;
}

if (list_empty(head))

++++++ autofs-5.0.5-fix-out-of-order-locking-in-readmap.patch ++++++
autofs-5.0.5 - fix out of order locking in readmap

From: Ian Kent <raven@xxxxxxxxxx>

When re-reading the master map and a mount lookup for a particular map
entry arrives at the same time a map source is being added to the map
entry and a map entry re-read is also initiated at the same time an
out of order mutex locking bug which results in a hang.
---

CHANGELOG | 1 +
lib/master.c | 8 ++------
2 files changed, 3 insertions(+), 6 deletions(-)


Index: autofs-5.0.5/lib/master.c
===================================================================
--- autofs-5.0.5.orig/lib/master.c
+++ autofs-5.0.5/lib/master.c
@@ -624,8 +624,6 @@ struct master_mapent *master_find_mapent
{
struct list_head *head, *p;

- master_mutex_lock();
-
head = &master->mounts;
list_for_each(p, head) {
struct master_mapent *entry;
@@ -638,8 +636,6 @@ struct master_mapent *master_find_mapent
}
}

- master_mutex_unlock();
-
return NULL;
}

@@ -716,9 +712,7 @@ struct master_mapent *master_new_mapent(

void master_add_mapent(struct master *master, struct master_mapent *entry)
{
- master_mutex_lock();
list_add_tail(&entry->list, &master->mounts);
- master_mutex_unlock();
return;
}

@@ -826,6 +820,7 @@ int master_read_master(struct master *ma
* We need to clear and re-populate the null map entry cache
* before alowing anyone else to use it.
*/
+ master_mutex_lock();
if (master->nc) {
cache_writelock(master->nc);
nc = master->nc;
@@ -844,6 +839,7 @@ int master_read_master(struct master *ma
master_init_scan();
lookup_nss_read_master(master, age);
cache_unlock(nc);
+ master_mutex_unlock();

if (!master->read_fail)
master_mount_mounts(master, age, readall);
Index: autofs-5.0.5/CHANGELOG
===================================================================
--- autofs-5.0.5.orig/CHANGELOG
+++ autofs-5.0.5/CHANGELOG
@@ -64,6 +64,7 @@
- replace GPLv3 code.
- fix next task list update.
- fix stale map read.
+- fix out of order locking in readmap.

03/09/2009 autofs-5.0.5
-----------------------
++++++ autofs-5.0.5-fix-stale-map-read.patch ++++++
From: Ian Kent <raven@xxxxxxxxxx>
Subject: [PATCH 2/2] autofs-5.0.5 - fix stale map read

A previous patch to fix direct maps not updating on re-read has
a side effect of causing maps to always be re-read on lookup.
This is because, following the application of the previous patch,
the map stale status is no longer being updated on a successful
map read.
---

CHANGELOG | 1 +
daemon/lookup.c | 1 +
daemon/state.c | 1 -
include/master.h | 1 +
lib/master.c | 37 +++++++++++++++++++++++++------------
5 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index a9687b7..fcf9145 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -63,6 +63,7 @@
- fix expire race.
- replace GPLv3 code.
- fix next task list update.
+- fix stale map read.

03/09/2009 autofs-5.0.5
-----------------------
diff --git a/daemon/lookup.c b/daemon/lookup.c
index 36e60c9..0f7051b 100644
--- a/daemon/lookup.c
+++ b/daemon/lookup.c
@@ -1139,6 +1139,7 @@ int lookup_prune_cache(struct autofs_point *ap, time_t
age)
cache_readlock(map->mc);
lookup_prune_one_cache(ap, map->mc, age);
pthread_cleanup_pop(1);
+ clear_stale_instances(map);
map->stale = 0;
map = map->next;
}
diff --git a/daemon/state.c b/daemon/state.c
index 85587bd..3645440 100644
--- a/daemon/state.c
+++ b/daemon/state.c
@@ -501,7 +501,6 @@ static void *do_readmap(void *arg)
pthread_cleanup_pop(1);
pthread_cleanup_pop(1);
pthread_cleanup_pop(1);
- lookup_prune_cache(ap, now);
}

pthread_cleanup_pop(1);
diff --git a/include/master.h b/include/master.h
index bef59d3..1c1a7d5 100644
--- a/include/master.h
+++ b/include/master.h
@@ -89,6 +89,7 @@ struct map_source *
master_find_source_instance(struct map_source *, const char *, const char *,
int, const char **);
struct map_source *
master_add_source_instance(struct map_source *, const char *, const char *,
time_t, int, const char **);
+void clear_stale_instances(struct map_source *);
void send_map_update_request(struct autofs_point *);
void master_source_writelock(struct master_mapent *);
void master_source_readlock(struct master_mapent *);
diff --git a/lib/master.c b/lib/master.c
index 95bd3fb..4b48883 100644
--- a/lib/master.c
+++ b/lib/master.c
@@ -465,7 +465,26 @@ master_add_source_instance(struct map_source *source,
const char *type, const ch
return new;
}

-static void check_stale_instances(struct map_source *source)
+static int check_stale_instances(struct map_source *source)
+{
+ struct map_source *map;
+
+ if (!source)
+ return 0;
+
+ map = source->instance;
+ while (map) {
+ if (map->stale)
+ return 1;
+ if (check_stale_instances(map))
+ return 1;
+ map = map->next;
+ }
+
+ return 0;
+}
+
+void clear_stale_instances(struct map_source *source)
{
struct map_source *map;

@@ -474,11 +493,9 @@ static void check_stale_instances(struct map_source
*source)

map = source->instance;
while (map) {
- if (map->stale) {
- source->stale = 1;
- break;
- }
- check_stale_instances(map->instance);
+ clear_stale_instances(map);
+ if (map->stale)
+ map->stale = 0;
map = map->next;
}

@@ -496,12 +513,8 @@ void send_map_update_request(struct autofs_point *ap)

map = ap->entry->maps;
while (map) {
- check_stale_instances(map);
- map = map->next;
- }
-
- map = ap->entry->maps;
- while (map) {
+ if (check_stale_instances(map))
+ map->stale = 1;
if (map->stale) {
need_update = 1;
break;

++++++ autofs.init ++++++
#!/bin/bash
#
# Copyright (C) 2011 SUSE Linux Products GmbH, Nuernberg, Germany.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

### BEGIN INIT INFO
# Provides: autofs
# Required-Start: $network $syslog $remote_fs
# Should-Start: $portmap ypbind keyserv ldap nfsserver network-remotefs
# Required-Stop: $network $syslog $remote_fs
# Should-Stop: $portmap ypbind keyserv ldap nfsserver network-remotefs
# Default-Start: 3 5
# Default-Stop:
# Short-Description: automatic mounting of filesystems
# Description: Start the autofs daemon for automatic mounting of filesystems.
### END INIT INFO

#
# Location of the automount daemon and the init directory
#
DAEMON=/usr/sbin/automount
prog=`basename $DAEMON`
MODULE="autofs4"
DEVICE="autofs"
confdir=/etc/sysconfig
PIDFILE=/var/run/automount.pid

test -x $DAEMON || exit 5

PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH

. /etc/rc.status

#
# Load customized configuration settings
#
if [ -r $confdir/autofs ]; then
. $confdir/autofs
fi

function start() {
# Make sure autofs4 module is loaded
if ! grep -q autofs /proc/filesystems; then
# Try load the autofs4 module fail if we can't
modprobe -q $MODULE >/dev/null 2>&1
if [ $? -eq 1 ]; then
echo "Error: failed to load $MODULE module."
return 1
fi
elif ([ -f /proc/modules ] && lsmod) | grep -q autofs[^4]; then
# Wrong autofs filesystem module loaded
echo
echo "Error: autofs kernel module is loaded, $MODULE required"
return 1
fi

# Use the AutoFS misc device unless it is explicitly disabled
if [ -z "$USE_MISC_DEVICE" -o "x$USE_MISC_DEVICE" = "xyes" ]; then
sleep 1
if [ -e "/proc/misc" ]; then
MINOR=`awk "/$DEVICE/ {print \\$1}" /proc/misc`
if [ -n "$MINOR" -a ! -c "/dev/$DEVICE" ]; then
mknod -m 0600 /dev/$DEVICE c 10 $MINOR
fi
fi
if [ -x /sbin/restorecon -a -c /dev/$DEVICE ]; then
/sbin/restorecon /dev/$DEVICE
fi
else
if [ -c /dev/$DEVICE ]; then
rm /dev/$DEVICE
fi
fi

if [ "$LOCAL_OPTIONS" ]; then
AUTOFS_OPTIONS="-O $LOCAL_OPTIONS $AUTOFS_OPTIONS"
fi
/sbin/startproc -w $DAEMON -p $PIDFILE $AUTOFS_OPTIONS

return $?
}

function stop() {
# Send SIGTERM first and set a maximum wait time of 45 seconds
# before sending SIGKILL
/sbin/killproc -t 45 -p $PIDFILE $DAEMON
}

RETVAL=0

case "$1" in
start)
echo -n "Starting $prog "
# Check if already running
if ! /sbin/checkproc $DAEMON; then
start
fi

rc_status -v
;;
stop)
echo -n "Shutting down $prog "
stop

rc_status -v
;;
force-stop)
$0 stop

;;
try-restart|condrestart)
## Do a restart only if the service was active before.
## Note: try-restart is now part of LSB (as of 1.9).
if test "$1" = "condrestart"; then
echo "${attn}Use try-restart ${done}(LSB)${attn}${norm}"
fi
$0 status
if test $? = 0; then
$0 restart
else
rc_reset # Not running is not a failure.
fi
# Remember status and be quiet
rc_status
;;
restart)
$0 stop
$0 start

rc_status
;;
force-reload|reload)
echo -n "Reload service $prog "
/sbin/killproc -HUP $DAEMON

rc_status -v
;;
force-expire)
echo -n "Forcing expire of auto mounted filesystems "
/sbin/killproc -USR1 $DAEMON

rc_status -v
;;
status)
echo -n "Checking for service $prog "
/sbin/checkproc $DAEMON
# NOTE: rc_status knows that we called this init script with
# "status" option and adapts its messages accordingly.
rc_status -v
;;
*)
echo "Usage: $0
{start|stop|status|try-restart|restart|reload|force-expire}"
exit 1
;;
esac

rc_exit
++++++ sysconfig.autofs ++++++
--- /var/tmp/diff_new_pack.k68aQT/_old 2011-04-08 11:10:09.000000000 +0200
+++ /var/tmp/diff_new_pack.k68aQT/_new 2011-04-08 11:10:09.000000000 +0200
@@ -18,7 +18,7 @@
## Type: string
## Default: "yes"
#
-# Determine whether LOCAL_OPTIONS are appended to map entry options
+# Determine whether LOCAL_OPTIONS are appended to map entry options
# or if the map entry options replace the global options
# (program default "yes", append options).
APPEND_OPTIONS="yes"


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



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages