diff options
| author | Khem Raj <raj.khem@gmail.com> | 2013-01-05 19:53:10 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2013-01-08 09:31:33 -0800 |
| commit | 4c735f36f64476320c130ffe14a5c831f65b9c42 (patch) | |
| tree | 19838881494864f938aed0610a86f314c5ed6830 /meta-networking | |
| parent | eca536954a392daf481c13faf3615ae489b0b552 (diff) | |
| download | meta-openembedded-4c735f36f64476320c130ffe14a5c831f65b9c42.tar.gz | |
autofs: Add recipes for 5.0.7
Forward port from OE classic
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
24 files changed, 1318 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/Makefile.rules-cross.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/Makefile.rules-cross.patch new file mode 100644 index 0000000000..7dc7096c2e --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/Makefile.rules-cross.patch | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | Index: autofs-5.0.7/Makefile.rules | ||
| 2 | =================================================================== | ||
| 3 | --- autofs-5.0.7.orig/Makefile.rules 2012-07-24 23:05:26.000000000 -0700 | ||
| 4 | +++ autofs-5.0.7/Makefile.rules 2012-10-26 09:23:40.270204270 -0700 | ||
| 5 | @@ -34,14 +34,14 @@ | ||
| 6 | else | ||
| 7 | CFLAGS ?= -O2 -Wall | ||
| 8 | LDFLAGS = -s | ||
| 9 | -STRIP = strip --strip-debug | ||
| 10 | +STRIP = ${TARGET_PREFIX}strip --strip-debug | ||
| 11 | endif | ||
| 12 | endif | ||
| 13 | |||
| 14 | -CC = gcc | ||
| 15 | -CXX = g++ | ||
| 16 | +CC ?= ${TARGET_PREFIX}gcc | ||
| 17 | +CXX ?= ${TARGET_PREFIX}g++ | ||
| 18 | CXXFLAGS = $(CFLAGS) | ||
| 19 | -LD = ld | ||
| 20 | +LD ?= ${TARGET_PREFIX}ld | ||
| 21 | SOLDFLAGS = -shared | ||
| 22 | |||
| 23 | CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64 | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-fix-recursive-mount-deadlock.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-fix-recursive-mount-deadlock.patch new file mode 100644 index 0000000000..e6549a7c8f --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-fix-recursive-mount-deadlock.patch | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | autofs-5.0.6 - fix recursive mount deadlock | ||
| 2 | |||
| 3 | From: Ian Kent <raven@themaw.net> | ||
| 4 | |||
| 5 | Prior to the vfs-automount changes that went into 2.6.38 | ||
| 6 | and were finalized in 3.1 it was not possible to block | ||
| 7 | path walks into multi-mounts whose root was covered by | ||
| 8 | another mount. To deal with that a write lock was used | ||
| 9 | to ensure the mount tree construction was completed. This | ||
| 10 | restricts the types of recursively defined mount maps that | ||
| 11 | can be used and can lead to a deadlock during lookup. | ||
| 12 | |||
| 13 | Now that we can prevent processes walking into multi-mounts | ||
| 14 | that are under construction we no longer need to use a | ||
| 15 | write lock. | ||
| 16 | |||
| 17 | Also, in the patch below, a cache writelock is changed to | ||
| 18 | a read lock because a write lock isn't needed since the | ||
| 19 | map cache entry isn't being updated. | ||
| 20 | --- | ||
| 21 | |||
| 22 | CHANGELOG | 1 + | ||
| 23 | daemon/direct.c | 14 ++++++++++++-- | ||
| 24 | 2 files changed, 13 insertions(+), 2 deletions(-) | ||
| 25 | |||
| 26 | |||
| 27 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 28 | index 936c9ab..9cdad6e 100644 | ||
| 29 | --- a/CHANGELOG | ||
| 30 | +++ b/CHANGELOG | ||
| 31 | @@ -12,6 +12,7 @@ | ||
| 32 | - configure.in: allow cross compilation. | ||
| 33 | - README: update mailing list subscription info. | ||
| 34 | - allow non root user to check status. | ||
| 35 | +- fix recursive mount deadlock. | ||
| 36 | |||
| 37 | 25/07/2012 autofs-5.0.7 | ||
| 38 | ======================= | ||
| 39 | diff --git a/daemon/direct.c b/daemon/direct.c | ||
| 40 | index 7e2f0d7..3e09c5d 100644 | ||
| 41 | --- a/daemon/direct.c | ||
| 42 | +++ b/daemon/direct.c | ||
| 43 | @@ -1285,6 +1285,8 @@ int handle_packet_missing_direct(struct autofs_point *ap, autofs_packet_missing_ | ||
| 44 | struct timespec wait; | ||
| 45 | struct timeval now; | ||
| 46 | int ioctlfd, len, state; | ||
| 47 | + unsigned int kver_major = get_kver_major(); | ||
| 48 | + unsigned int kver_minor = get_kver_minor(); | ||
| 49 | |||
| 50 | pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &state); | ||
| 51 | |||
| 52 | @@ -1297,8 +1299,16 @@ int handle_packet_missing_direct(struct autofs_point *ap, autofs_packet_missing_ | ||
| 53 | * cache entry we will not be able to find the mapent. So | ||
| 54 | * we must take the source writelock to ensure the parent | ||
| 55 | * has mount is complete before we look for the entry. | ||
| 56 | + * | ||
| 57 | + * Since the vfs-automount kernel changes we can now block | ||
| 58 | + * on covered mounts during mount tree construction so a | ||
| 59 | + * write lock is no longer needed. So we now can handle a | ||
| 60 | + * wider class of recursively define mount lookups. | ||
| 61 | */ | ||
| 62 | - master_source_writelock(ap->entry); | ||
| 63 | + if (kver_major > 5 || (kver_major == 5 && kver_minor > 1)) | ||
| 64 | + master_source_readlock(ap->entry); | ||
| 65 | + else | ||
| 66 | + master_source_writelock(ap->entry); | ||
| 67 | map = ap->entry->maps; | ||
| 68 | while (map) { | ||
| 69 | /* | ||
| 70 | @@ -1311,7 +1321,7 @@ int handle_packet_missing_direct(struct autofs_point *ap, autofs_packet_missing_ | ||
| 71 | } | ||
| 72 | |||
| 73 | mc = map->mc; | ||
| 74 | - cache_writelock(mc); | ||
| 75 | + cache_readlock(mc); | ||
| 76 | me = cache_lookup_ino(mc, pkt->dev, pkt->ino); | ||
| 77 | if (me) | ||
| 78 | break; | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-increase-file-map-read-buffer-size.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-increase-file-map-read-buffer-size.patch new file mode 100644 index 0000000000..39b22212a7 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.6-increase-file-map-read-buffer-size.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | autofs-5.0.6 - increase file map read buffer size | ||
| 2 | |||
| 3 | From: Ian Kent <raven@themaw.net> | ||
| 4 | |||
| 5 | The file map entry read buffer can be too small for larger | ||
| 6 | multi-mount map entries so increase it. | ||
| 7 | --- | ||
| 8 | |||
| 9 | CHANGELOG | 1 + | ||
| 10 | include/automount.h | 2 +- | ||
| 11 | 2 files changed, 2 insertions(+), 1 deletions(-) | ||
| 12 | |||
| 13 | |||
| 14 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 15 | index 9cdad6e..3bdf8a4 100644 | ||
| 16 | --- a/CHANGELOG | ||
| 17 | +++ b/CHANGELOG | ||
| 18 | @@ -13,6 +13,7 @@ | ||
| 19 | - README: update mailing list subscription info. | ||
| 20 | - allow non root user to check status. | ||
| 21 | - fix recursive mount deadlock. | ||
| 22 | +- increase file map read buffer size. | ||
| 23 | |||
| 24 | 25/07/2012 autofs-5.0.7 | ||
| 25 | ======================= | ||
| 26 | diff --git a/include/automount.h b/include/automount.h | ||
| 27 | index 561fcc2..37541f5 100644 | ||
| 28 | --- a/include/automount.h | ||
| 29 | +++ b/include/automount.h | ||
| 30 | @@ -233,7 +233,7 @@ int rmdir_path(struct autofs_point *ap, const char *path, dev_t dev); | ||
| 31 | #define AUTOFS_LOOKUP_VERSION 5 | ||
| 32 | |||
| 33 | #define KEY_MAX_LEN NAME_MAX | ||
| 34 | -#define MAPENT_MAX_LEN 4095 | ||
| 35 | +#define MAPENT_MAX_LEN 16384 | ||
| 36 | #define PARSE_MAX_BUF KEY_MAX_LEN + MAPENT_MAX_LEN + 2 | ||
| 37 | |||
| 38 | int lookup_nss_read_master(struct master *master, time_t age); | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-README-update-mailing-list-subscription-info.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-README-update-mailing-list-subscription-info.patch new file mode 100644 index 0000000000..99b61818ca --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-README-update-mailing-list-subscription-info.patch | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | autofs-5.0.7 - README: update mailing list subscription info | ||
| 2 | |||
| 3 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
| 4 | |||
| 5 | Following the kernel.org compromise the mailing list was moved to | ||
| 6 | vger.kernel.org. Update the subscription info and add URLs for the gmane | ||
| 7 | mailing list archive. | ||
| 8 | |||
| 9 | Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
| 10 | --- | ||
| 11 | |||
| 12 | CHANGELOG | 1 + | ||
| 13 | README | 17 ++++++++++++++--- | ||
| 14 | 2 files changed, 15 insertions(+), 3 deletions(-) | ||
| 15 | |||
| 16 | |||
| 17 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 18 | index fe801e8..44c9fb2 100644 | ||
| 19 | --- a/CHANGELOG | ||
| 20 | +++ b/CHANGELOG | ||
| 21 | @@ -10,6 +10,7 @@ | ||
| 22 | - fix null map entry order handling. | ||
| 23 | - make description of default MOUNT_WAIT setting clear. | ||
| 24 | - configure.in: allow cross compilation. | ||
| 25 | +- README: update mailing list subscription info. | ||
| 26 | |||
| 27 | 25/07/2012 autofs-5.0.7 | ||
| 28 | ======================= | ||
| 29 | diff --git a/README b/README | ||
| 30 | index cef16a9..9024e64 100644 | ||
| 31 | --- a/README | ||
| 32 | +++ b/README | ||
| 33 | @@ -43,9 +43,20 @@ Fitzhardinge's <jeremy@goop.org> work on autofs 3. Further enhancements | ||
| 34 | have been made by Ian Kent <raven@themaw.net>. | ||
| 35 | |||
| 36 | If you use or want to help develop autofs, please join the autofs | ||
| 37 | -mailing list by visiting: | ||
| 38 | +mailing list by sending an email to: | ||
| 39 | |||
| 40 | - http://linux.kernel.org/mailman/listinfo/autofs | ||
| 41 | + majordomo@vger.kernel.org | ||
| 42 | |||
| 43 | -and folling the instructions there to subscribe to the autofs mailing list. | ||
| 44 | +With the body text: | ||
| 45 | + | ||
| 46 | + subscribe autofs | ||
| 47 | + | ||
| 48 | +Once subscribed you can send patches to: | ||
| 49 | + | ||
| 50 | + autofs@vger.kernel.org | ||
| 51 | + | ||
| 52 | +The autofs mailing list archive can be viewed on gmane: | ||
| 53 | + | ||
| 54 | + http://news.gmane.org/gmane.linux.kernel.autofs | ||
| 55 | + http://blog.gmane.org/gmane.linux.kernel.autofs | ||
| 56 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-add-timeout-option-description-to-man-page.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-add-timeout-option-description-to-man-page.patch new file mode 100644 index 0000000000..ac598dd729 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-add-timeout-option-description-to-man-page.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | autofs-5.0.7 - add timeout option description to man page | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | The pseudo option used t set the timeout for map entries is one of | ||
| 6 | the most most frequently used autofs options but is not mentioned | ||
| 7 | in auto.master(5). | ||
| 8 | --- | ||
| 9 | |||
| 10 | CHANGELOG | 1 + | ||
| 11 | man/auto.master.5.in | 5 +++++ | ||
| 12 | 2 files changed, 6 insertions(+), 0 deletions(-) | ||
| 13 | |||
| 14 | |||
| 15 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 16 | index 93b9c26..7b8d185 100644 | ||
| 17 | --- a/CHANGELOG | ||
| 18 | +++ b/CHANGELOG | ||
| 19 | @@ -6,6 +6,7 @@ | ||
| 20 | - fix parse buffer initialization. | ||
| 21 | - fix typo in automount(8). | ||
| 22 | - dont wait forever to restart. | ||
| 23 | +- add timeout option description to man page. | ||
| 24 | |||
| 25 | 25/07/2012 autofs-5.0.7 | ||
| 26 | ======================= | ||
| 27 | diff --git a/man/auto.master.5.in b/man/auto.master.5.in | ||
| 28 | index 54269f8..21d7544 100644 | ||
| 29 | --- a/man/auto.master.5.in | ||
| 30 | +++ b/man/auto.master.5.in | ||
| 31 | @@ -167,6 +167,11 @@ server is specified in the map entry. If no server weights are given | ||
| 32 | then each available server will be tried in the order listed, within | ||
| 33 | proximity. | ||
| 34 | .TP | ||
| 35 | +.I "\-t, \-\-timeout <seconds>" | ||
| 36 | +Set the expire timeout for map entries. This option can be used to | ||
| 37 | +override the global default given either on the command line | ||
| 38 | +or in the configuration. | ||
| 39 | +.TP | ||
| 40 | .I "\-n, \-\-negative\-timeout <seconds>" | ||
| 41 | Set the timeout for caching failed key lookups. This option can be | ||
| 42 | used to override the global default given either on the command line | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch new file mode 100644 index 0000000000..6020c31e23 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-allow-non-root-user-to-check-status.patch | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | autofs-5.0.7 - allow non root user to check status | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | |||
| 6 | --- | ||
| 7 | |||
| 8 | CHANGELOG | 1 + | ||
| 9 | redhat/autofs.init.in | 20 +++++++++++++------- | ||
| 10 | 2 files changed, 14 insertions(+), 7 deletions(-) | ||
| 11 | |||
| 12 | |||
| 13 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 14 | index 44c9fb2..936c9ab 100644 | ||
| 15 | --- a/CHANGELOG | ||
| 16 | +++ b/CHANGELOG | ||
| 17 | @@ -11,6 +11,7 @@ | ||
| 18 | - make description of default MOUNT_WAIT setting clear. | ||
| 19 | - configure.in: allow cross compilation. | ||
| 20 | - README: update mailing list subscription info. | ||
| 21 | +- allow non root user to check status. | ||
| 22 | |||
| 23 | 25/07/2012 autofs-5.0.7 | ||
| 24 | ======================= | ||
| 25 | diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in | ||
| 26 | index cd5cb34..fe18b3e 100644 | ||
| 27 | --- a/redhat/autofs.init.in | ||
| 28 | +++ b/redhat/autofs.init.in | ||
| 29 | @@ -167,6 +167,19 @@ function usage_message() { | ||
| 30 | |||
| 31 | RETVAL=0 | ||
| 32 | |||
| 33 | +# allow non-root users to read status / usage | ||
| 34 | + | ||
| 35 | +case "$1" in | ||
| 36 | + status) | ||
| 37 | + status -p @@autofspiddir@@/autofs.pid -l autofs $prog | ||
| 38 | + exit 0; | ||
| 39 | + ;; | ||
| 40 | + usage) | ||
| 41 | + usage_message | ||
| 42 | + exit 0; | ||
| 43 | + ;; | ||
| 44 | +esac | ||
| 45 | + | ||
| 46 | # Only the root user may change the service status | ||
| 47 | if [ `id -u` -ne 0 ] && [ "$1" != "status" ]; then | ||
| 48 | echo "insufficient privilege to change service status" | ||
| 49 | @@ -184,9 +197,6 @@ case "$1" in | ||
| 50 | stop) | ||
| 51 | stop | ||
| 52 | ;; | ||
| 53 | - status) | ||
| 54 | - status -p @@autofspiddir@@/autofs.pid -l autofs $prog | ||
| 55 | - ;; | ||
| 56 | restart|force-reload) | ||
| 57 | restart | ||
| 58 | ;; | ||
| 59 | @@ -202,10 +212,6 @@ case "$1" in | ||
| 60 | restart | ||
| 61 | fi | ||
| 62 | ;; | ||
| 63 | - usage) | ||
| 64 | - usage_message | ||
| 65 | - exit 0 | ||
| 66 | - ;; | ||
| 67 | *) | ||
| 68 | usage_message | ||
| 69 | exit 2 | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-configure-allow-cross-compilation-update.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-configure-allow-cross-compilation-update.patch new file mode 100644 index 0000000000..a8bc3ce857 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-configure-allow-cross-compilation-update.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | autofs-5.0.7 - configure: allow cross compilation update | ||
| 2 | |||
| 3 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
| 4 | |||
| 5 | Run "make distclean" to update configure. This should have been included | ||
| 6 | in 5936c738 when configure.in was updated but it was missed. | ||
| 7 | --- | ||
| 8 | |||
| 9 | configure | 5 +---- | ||
| 10 | 1 files changed, 1 insertions(+), 4 deletions(-) | ||
| 11 | |||
| 12 | |||
| 13 | diff --git a/configure b/configure | ||
| 14 | index bf62203..ba3bba6 100755 | ||
| 15 | --- a/configure | ||
| 16 | +++ b/configure | ||
| 17 | @@ -5378,10 +5378,7 @@ DAEMON_LDFLAGS= | ||
| 18 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc -fPIE works" >&5 | ||
| 19 | $as_echo_n "checking whether gcc -fPIE works... " >&6; } | ||
| 20 | if test "$cross_compiling" = yes; then : | ||
| 21 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | ||
| 22 | -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | ||
| 23 | -as_fn_error $? "cannot run test program while cross compiling | ||
| 24 | -See \`config.log' for more details" "$LINENO" 5; } | ||
| 25 | + gcc_supports_pie=no | ||
| 26 | else | ||
| 27 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
| 28 | /* end confdefs.h. */ | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-configure-in-allow-cross-compilation.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-configure-in-allow-cross-compilation.patch new file mode 100644 index 0000000000..ac18bd94bd --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-configure-in-allow-cross-compilation.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | autofs-5.0.7 - configure.in: allow cross compilation | ||
| 2 | |||
| 3 | From: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
| 4 | |||
| 5 | The default behaviour of AC_RUN_IFELSE is to stop with an error if cross | ||
| 6 | compiling. Avoid this by providing the optional 4th argument to set | ||
| 7 | gcc_supports_pie=no if support for PIE cannot be detected. | ||
| 8 | |||
| 9 | Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> | ||
| 10 | --- | ||
| 11 | |||
| 12 | CHANGELOG | 1 + | ||
| 13 | configure.in | 2 +- | ||
| 14 | 2 files changed, 2 insertions(+), 1 deletions(-) | ||
| 15 | |||
| 16 | |||
| 17 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 18 | index 961e340..fe801e8 100644 | ||
| 19 | --- a/CHANGELOG | ||
| 20 | +++ b/CHANGELOG | ||
| 21 | @@ -9,6 +9,7 @@ | ||
| 22 | - add timeout option description to man page. | ||
| 23 | - fix null map entry order handling. | ||
| 24 | - make description of default MOUNT_WAIT setting clear. | ||
| 25 | +- configure.in: allow cross compilation. | ||
| 26 | |||
| 27 | 25/07/2012 autofs-5.0.7 | ||
| 28 | ======================= | ||
| 29 | diff --git a/configure.in b/configure.in | ||
| 30 | index 1a24e34..90bda62 100644 | ||
| 31 | --- a/configure.in | ||
| 32 | +++ b/configure.in | ||
| 33 | @@ -307,7 +307,7 @@ DAEMON_CFLAGS= | ||
| 34 | DAEMON_LDFLAGS= | ||
| 35 | AC_MSG_CHECKING([whether gcc -fPIE works]) | ||
| 36 | AC_RUN_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])], | ||
| 37 | - [gcc_supports_pie=yes], [gcc_supports_pie=no]) | ||
| 38 | + [gcc_supports_pie=yes], [gcc_supports_pie=no], [gcc_supports_pie=no]) | ||
| 39 | AC_MSG_RESULT([$gcc_supports_pie]) | ||
| 40 | if test $gcc_supports_pie = yes ; then | ||
| 41 | DAEMON_CFLAGS="-fPIE" | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-wait-forever-to-restart.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-wait-forever-to-restart.patch new file mode 100644 index 0000000000..9973b47faf --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-dont-wait-forever-to-restart.patch | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | autofs-5.0.7 - dont wait forever to restart | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | When restarting autofs the daemon must be stopped before it is started | ||
| 6 | again if it is to function properly. At the moment the init script waits | ||
| 7 | forever which is not ok if the daemon won't exit for some reason. | ||
| 8 | |||
| 9 | So, if the daemon is still running after the stop, run stop() again, wait | ||
| 10 | a bit longer and if it still hasn't stopped kill it with a SIGKILL to clear | ||
| 11 | the way for the startup. | ||
| 12 | --- | ||
| 13 | |||
| 14 | CHANGELOG | 1 + | ||
| 15 | redhat/autofs.init.in | 13 ++++++++++--- | ||
| 16 | 2 files changed, 11 insertions(+), 3 deletions(-) | ||
| 17 | |||
| 18 | |||
| 19 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 20 | index 6051723..93b9c26 100644 | ||
| 21 | --- a/CHANGELOG | ||
| 22 | +++ b/CHANGELOG | ||
| 23 | @@ -5,6 +5,7 @@ | ||
| 24 | - fix ipv6 proximity calculation. | ||
| 25 | - fix parse buffer initialization. | ||
| 26 | - fix typo in automount(8). | ||
| 27 | +- dont wait forever to restart. | ||
| 28 | |||
| 29 | 25/07/2012 autofs-5.0.7 | ||
| 30 | ======================= | ||
| 31 | diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in | ||
| 32 | index ec6d5d6..cd5cb34 100644 | ||
| 33 | --- a/redhat/autofs.init.in | ||
| 34 | +++ b/redhat/autofs.init.in | ||
| 35 | @@ -129,9 +129,16 @@ function restart() { | ||
| 36 | status autofs > /dev/null 2>&1 | ||
| 37 | if [ $? -eq 0 ]; then | ||
| 38 | stop | ||
| 39 | - while [ -n "`pidof $prog`" ] ; do | ||
| 40 | - sleep 5 | ||
| 41 | - done | ||
| 42 | + if [ -n "`pidof $prog`" ]; then | ||
| 43 | + # If we failed to stop, try at least one more time | ||
| 44 | + # after waiting a little while | ||
| 45 | + sleep 20 | ||
| 46 | + stop | ||
| 47 | + auto_pid=`pidof $prog` | ||
| 48 | + if [ -n "$auto_pid" ]; then | ||
| 49 | + kill -9 $auto_pid | ||
| 50 | + fi | ||
| 51 | + fi | ||
| 52 | fi | ||
| 53 | start | ||
| 54 | } | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-ipv6-proximity-calculation.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-ipv6-proximity-calculation.patch new file mode 100644 index 0000000000..b341ecdd50 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-ipv6-proximity-calculation.patch | |||
| @@ -0,0 +1,297 @@ | |||
| 1 | autofs-5.0.7 - fix ipv6 proximity calculation | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | The socket based ioctl used to get interface information only | ||
| 6 | return IPv4 information. Change get_proximity() function to use | ||
| 7 | getifaddrs(3) instead. | ||
| 8 | --- | ||
| 9 | |||
| 10 | CHANGELOG | 1 | ||
| 11 | modules/replicated.c | 149 ++++++++++++++------------------------------------ | ||
| 12 | 2 files changed, 42 insertions(+), 108 deletions(-) | ||
| 13 | |||
| 14 | |||
| 15 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 16 | index dc38580..34c70fa 100644 | ||
| 17 | --- a/CHANGELOG | ||
| 18 | +++ b/CHANGELOG | ||
| 19 | @@ -2,6 +2,7 @@ | ||
| 20 | ======================= | ||
| 21 | - fix nobind sun escaped map entries. | ||
| 22 | - fix use cache entry after free in lookup_prune_one_cache(). | ||
| 23 | +- fix ipv6 proximity calculation. | ||
| 24 | |||
| 25 | 25/07/2012 autofs-5.0.7 | ||
| 26 | ======================= | ||
| 27 | diff --git a/modules/replicated.c b/modules/replicated.c | ||
| 28 | index 78046c6..bd6003b 100644 | ||
| 29 | --- a/modules/replicated.c | ||
| 30 | +++ b/modules/replicated.c | ||
| 31 | @@ -52,6 +52,7 @@ | ||
| 32 | #include <net/if.h> | ||
| 33 | #include <netinet/in.h> | ||
| 34 | #include <netdb.h> | ||
| 35 | +#include <ifaddrs.h> | ||
| 36 | |||
| 37 | #include "rpc_subs.h" | ||
| 38 | #include "replicated.h" | ||
| 39 | @@ -110,58 +111,18 @@ void seed_random(void) | ||
| 40 | return; | ||
| 41 | } | ||
| 42 | |||
| 43 | -static int alloc_ifreq(struct ifconf *ifc, int sock) | ||
| 44 | -{ | ||
| 45 | - int ret, lastlen = ifc_last_len, len = ifc_buf_len; | ||
| 46 | - char err_buf[MAX_ERR_BUF], *buf; | ||
| 47 | - | ||
| 48 | - while (1) { | ||
| 49 | - buf = malloc(len); | ||
| 50 | - if (!buf) { | ||
| 51 | - char *estr = strerror_r(errno, err_buf, MAX_ERR_BUF); | ||
| 52 | - logerr("malloc: %s", estr); | ||
| 53 | - return 0; | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - ifc->ifc_len = len; | ||
| 57 | - ifc->ifc_req = (struct ifreq *) buf; | ||
| 58 | - | ||
| 59 | - ret = ioctl(sock, SIOCGIFCONF, ifc); | ||
| 60 | - if (ret == -1) { | ||
| 61 | - char *estr = strerror_r(errno, err_buf, MAX_ERR_BUF); | ||
| 62 | - logerr("ioctl: %s", estr); | ||
| 63 | - free(buf); | ||
| 64 | - return 0; | ||
| 65 | - } | ||
| 66 | - | ||
| 67 | - if (ifc->ifc_len <= lastlen) | ||
| 68 | - break; | ||
| 69 | - | ||
| 70 | - lastlen = ifc->ifc_len; | ||
| 71 | - len += MAX_IFC_BUF; | ||
| 72 | - free(buf); | ||
| 73 | - } | ||
| 74 | - | ||
| 75 | - if (lastlen != ifc_last_len) { | ||
| 76 | - ifc_last_len = lastlen; | ||
| 77 | - ifc_buf_len = len; | ||
| 78 | - } | ||
| 79 | - | ||
| 80 | - return 1; | ||
| 81 | -} | ||
| 82 | - | ||
| 83 | static unsigned int get_proximity(struct sockaddr *host_addr) | ||
| 84 | { | ||
| 85 | + struct ifaddrs *ifa = NULL; | ||
| 86 | + struct ifaddrs *this; | ||
| 87 | struct sockaddr_in *addr, *msk_addr, *if_addr; | ||
| 88 | struct sockaddr_in6 *addr6, *msk6_addr, *if6_addr; | ||
| 89 | struct in_addr *hst_addr; | ||
| 90 | struct in6_addr *hst6_addr; | ||
| 91 | int addr_len; | ||
| 92 | - char buf[MAX_ERR_BUF], *ptr; | ||
| 93 | - struct ifconf ifc; | ||
| 94 | - struct ifreq *ifr, nmptr; | ||
| 95 | - int sock, ret, i; | ||
| 96 | + char buf[MAX_ERR_BUF]; | ||
| 97 | uint32_t mask, ha, ia, *mask6, *ha6, *ia6; | ||
| 98 | + int ret; | ||
| 99 | |||
| 100 | addr = NULL; | ||
| 101 | addr6 = NULL; | ||
| 102 | @@ -170,13 +131,14 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
| 103 | mask6 = NULL; | ||
| 104 | ha6 = NULL; | ||
| 105 | ia6 = NULL; | ||
| 106 | + ha = 0; | ||
| 107 | |||
| 108 | switch (host_addr->sa_family) { | ||
| 109 | case AF_INET: | ||
| 110 | addr = (struct sockaddr_in *) host_addr; | ||
| 111 | hst_addr = (struct in_addr *) &addr->sin_addr; | ||
| 112 | ha = ntohl((uint32_t) hst_addr->s_addr); | ||
| 113 | - addr_len = sizeof(hst_addr); | ||
| 114 | + addr_len = sizeof(*hst_addr); | ||
| 115 | break; | ||
| 116 | |||
| 117 | case AF_INET6: | ||
| 118 | @@ -186,7 +148,7 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
| 119 | addr6 = (struct sockaddr_in6 *) host_addr; | ||
| 120 | hst6_addr = (struct in6_addr *) &addr6->sin6_addr; | ||
| 121 | ha6 = &hst6_addr->s6_addr32[0]; | ||
| 122 | - addr_len = sizeof(hst6_addr); | ||
| 123 | + addr_len = sizeof(*hst6_addr); | ||
| 124 | break; | ||
| 125 | #endif | ||
| 126 | |||
| 127 | @@ -194,36 +156,29 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
| 128 | return PROXIMITY_ERROR; | ||
| 129 | } | ||
| 130 | |||
| 131 | - sock = open_sock(AF_INET, SOCK_DGRAM, 0); | ||
| 132 | - if (sock < 0) { | ||
| 133 | + ret = getifaddrs(&ifa); | ||
| 134 | + if (ret) { | ||
| 135 | char *estr = strerror_r(errno, buf, MAX_ERR_BUF); | ||
| 136 | - logerr("socket creation failed: %s", estr); | ||
| 137 | + logerr("getifaddrs: %s", estr); | ||
| 138 | return PROXIMITY_ERROR; | ||
| 139 | } | ||
| 140 | |||
| 141 | - if (!alloc_ifreq(&ifc, sock)) { | ||
| 142 | - close(sock); | ||
| 143 | - return PROXIMITY_ERROR; | ||
| 144 | - } | ||
| 145 | - | ||
| 146 | - /* For each interface */ | ||
| 147 | - | ||
| 148 | - /* Is the address a local interface */ | ||
| 149 | - i = 0; | ||
| 150 | - ptr = (char *) &ifc.ifc_buf[0]; | ||
| 151 | - | ||
| 152 | - while (ptr < (char *) ifc.ifc_req + ifc.ifc_len) { | ||
| 153 | - ifr = (struct ifreq *) ptr; | ||
| 154 | + this = ifa; | ||
| 155 | + while (this) { | ||
| 156 | + if (this->ifa_flags & IFF_POINTOPOINT || | ||
| 157 | + this->ifa_addr->sa_data == NULL) { | ||
| 158 | + this = this->ifa_next; | ||
| 159 | + continue; | ||
| 160 | + } | ||
| 161 | |||
| 162 | - switch (ifr->ifr_addr.sa_family) { | ||
| 163 | + switch (this->ifa_addr->sa_family) { | ||
| 164 | case AF_INET: | ||
| 165 | if (host_addr->sa_family == AF_INET6) | ||
| 166 | break; | ||
| 167 | - if_addr = (struct sockaddr_in *) &ifr->ifr_addr; | ||
| 168 | + if_addr = (struct sockaddr_in *) this->ifa_addr; | ||
| 169 | ret = memcmp(&if_addr->sin_addr, hst_addr, addr_len); | ||
| 170 | if (!ret) { | ||
| 171 | - close(sock); | ||
| 172 | - free(ifc.ifc_req); | ||
| 173 | + freeifaddrs(ifa); | ||
| 174 | return PROXIMITY_LOCAL; | ||
| 175 | } | ||
| 176 | break; | ||
| 177 | @@ -234,55 +189,41 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
| 178 | #else | ||
| 179 | if (host_addr->sa_family == AF_INET) | ||
| 180 | break; | ||
| 181 | - | ||
| 182 | - if6_addr = (struct sockaddr_in6 *) &ifr->ifr_addr; | ||
| 183 | + if6_addr = (struct sockaddr_in6 *) this->ifa_addr; | ||
| 184 | ret = memcmp(&if6_addr->sin6_addr, hst6_addr, addr_len); | ||
| 185 | if (!ret) { | ||
| 186 | - close(sock); | ||
| 187 | - free(ifc.ifc_req); | ||
| 188 | + freeifaddrs(ifa); | ||
| 189 | return PROXIMITY_LOCAL; | ||
| 190 | } | ||
| 191 | #endif | ||
| 192 | - | ||
| 193 | default: | ||
| 194 | break; | ||
| 195 | } | ||
| 196 | - | ||
| 197 | - i++; | ||
| 198 | - ptr = (char *) &ifc.ifc_req[i]; | ||
| 199 | + this = this->ifa_next; | ||
| 200 | } | ||
| 201 | |||
| 202 | - i = 0; | ||
| 203 | - ptr = (char *) &ifc.ifc_buf[0]; | ||
| 204 | - | ||
| 205 | - while (ptr < (char *) ifc.ifc_req + ifc.ifc_len) { | ||
| 206 | - ifr = (struct ifreq *) ptr; | ||
| 207 | - | ||
| 208 | - nmptr = *ifr; | ||
| 209 | - ret = ioctl(sock, SIOCGIFNETMASK, &nmptr); | ||
| 210 | - if (ret == -1) { | ||
| 211 | - char *estr = strerror_r(errno, buf, MAX_ERR_BUF); | ||
| 212 | - logerr("ioctl: %s", estr); | ||
| 213 | - close(sock); | ||
| 214 | - free(ifc.ifc_req); | ||
| 215 | - return PROXIMITY_ERROR; | ||
| 216 | + this = ifa; | ||
| 217 | + while (this) { | ||
| 218 | + if (this->ifa_flags & IFF_POINTOPOINT || | ||
| 219 | + this->ifa_addr->sa_data == NULL) { | ||
| 220 | + this = this->ifa_next; | ||
| 221 | + continue; | ||
| 222 | } | ||
| 223 | |||
| 224 | - switch (ifr->ifr_addr.sa_family) { | ||
| 225 | + switch (this->ifa_addr->sa_family) { | ||
| 226 | case AF_INET: | ||
| 227 | if (host_addr->sa_family == AF_INET6) | ||
| 228 | break; | ||
| 229 | - if_addr = (struct sockaddr_in *) &ifr->ifr_addr; | ||
| 230 | + if_addr = (struct sockaddr_in *) this->ifa_addr; | ||
| 231 | ia = ntohl((uint32_t) if_addr->sin_addr.s_addr); | ||
| 232 | |||
| 233 | - /* Is the address within a localiy attached subnet */ | ||
| 234 | + /* Is the address within a localy attached subnet */ | ||
| 235 | |||
| 236 | - msk_addr = (struct sockaddr_in *) &nmptr.ifr_netmask; | ||
| 237 | + msk_addr = (struct sockaddr_in *) this->ifa_netmask; | ||
| 238 | mask = ntohl((uint32_t) msk_addr->sin_addr.s_addr); | ||
| 239 | |||
| 240 | if ((ia & mask) == (ha & mask)) { | ||
| 241 | - close(sock); | ||
| 242 | - free(ifc.ifc_req); | ||
| 243 | + freeifaddrs(ifa); | ||
| 244 | return PROXIMITY_SUBNET; | ||
| 245 | } | ||
| 246 | |||
| 247 | @@ -304,8 +245,7 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
| 248 | break; | ||
| 249 | |||
| 250 | if ((ia & mask) == (ha & mask)) { | ||
| 251 | - close(sock); | ||
| 252 | - free(ifc.ifc_req); | ||
| 253 | + freeifaddrs(ifa); | ||
| 254 | return PROXIMITY_NET; | ||
| 255 | } | ||
| 256 | break; | ||
| 257 | @@ -316,35 +256,28 @@ static unsigned int get_proximity(struct sockaddr *host_addr) | ||
| 258 | #else | ||
| 259 | if (host_addr->sa_family == AF_INET) | ||
| 260 | break; | ||
| 261 | - | ||
| 262 | - if6_addr = (struct sockaddr_in6 *) &ifr->ifr_addr; | ||
| 263 | + if6_addr = (struct sockaddr_in6 *) this->ifa_addr; | ||
| 264 | ia6 = &if6_addr->sin6_addr.s6_addr32[0]; | ||
| 265 | |||
| 266 | /* Is the address within the network of the interface */ | ||
| 267 | |||
| 268 | - msk6_addr = (struct sockaddr_in6 *) &nmptr.ifr_netmask; | ||
| 269 | + msk6_addr = (struct sockaddr_in6 *) this->ifa_netmask; | ||
| 270 | mask6 = &msk6_addr->sin6_addr.s6_addr32[0]; | ||
| 271 | |||
| 272 | if (ipv6_mask_cmp(ha6, ia6, mask6)) { | ||
| 273 | - close(sock); | ||
| 274 | - free(ifc.ifc_req); | ||
| 275 | + freeifaddrs(ifa); | ||
| 276 | return PROXIMITY_SUBNET; | ||
| 277 | } | ||
| 278 | |||
| 279 | /* How do we define "local network" in ipv6? */ | ||
| 280 | #endif | ||
| 281 | - break; | ||
| 282 | - | ||
| 283 | default: | ||
| 284 | break; | ||
| 285 | } | ||
| 286 | - | ||
| 287 | - i++; | ||
| 288 | - ptr = (char *) &ifc.ifc_req[i]; | ||
| 289 | + this = this->ifa_next; | ||
| 290 | } | ||
| 291 | |||
| 292 | - close(sock); | ||
| 293 | - free(ifc.ifc_req); | ||
| 294 | + freeifaddrs(ifa); | ||
| 295 | |||
| 296 | return PROXIMITY_OTHER; | ||
| 297 | } | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch new file mode 100644 index 0000000000..b5d7ad26ca --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | autofs-5.0.7 - fix nobind sun escaped map entries | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | If a map contains a Sun colon escape to indicate the mount is a local | ||
| 6 | file system and the "nobind" option is present there is no hostname in | ||
| 7 | the mount location and the mount fails. | ||
| 8 | --- | ||
| 9 | |||
| 10 | CHANGELOG | 4 ++++ | ||
| 11 | modules/mount_nfs.c | 5 +++-- | ||
| 12 | 2 files changed, 7 insertions(+), 2 deletions(-) | ||
| 13 | |||
| 14 | |||
| 15 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 16 | index 67fdcec..faf4c80 100644 | ||
| 17 | --- a/CHANGELOG | ||
| 18 | +++ b/CHANGELOG | ||
| 19 | @@ -1,3 +1,7 @@ | ||
| 20 | +??/??/2012 autofs-5.0.8 | ||
| 21 | +======================= | ||
| 22 | +- fix nobind sun escaped map entries. | ||
| 23 | + | ||
| 24 | 25/07/2012 autofs-5.0.7 | ||
| 25 | ======================= | ||
| 26 | - fix ipv6 name for lookup fix. | ||
| 27 | diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c | ||
| 28 | index 9b8e5f1..bbbb1de 100644 | ||
| 29 | --- a/modules/mount_nfs.c | ||
| 30 | +++ b/modules/mount_nfs.c | ||
| 31 | @@ -263,13 +263,14 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int | ||
| 32 | } else | ||
| 33 | strcpy(loc, n_addr); | ||
| 34 | } else { | ||
| 35 | - loc = malloc(strlen(this->name) + strlen(this->path) + 2); | ||
| 36 | + char *host = this->name ? this->name : "localhost"; | ||
| 37 | + loc = malloc(strlen(host) + strlen(this->path) + 2); | ||
| 38 | if (!loc) { | ||
| 39 | char *estr = strerror_r(errno, buf, MAX_ERR_BUF); | ||
| 40 | error(ap->logopt, "malloc: %s", estr); | ||
| 41 | goto forced_fail; | ||
| 42 | } | ||
| 43 | - strcpy(loc, this->name); | ||
| 44 | + strcpy(loc, host); | ||
| 45 | } | ||
| 46 | strcat(loc, ":"); | ||
| 47 | strcat(loc, this->path); | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch new file mode 100644 index 0000000000..610afaaa7a --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-null-map-entry-order-handling.patch | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | autofs-5.0.7 - fix null map entry order handling | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | If a null map entry appears after a corresponding indirect map entry | ||
| 6 | autofs doesn't handle it properly. | ||
| 7 | |||
| 8 | Since it appears after the map entry it should'nt affect it but autofs | ||
| 9 | doesn't account for this case and assumes the map entry is already | ||
| 10 | mounted and tries to shut it down causing attempted access to facilities | ||
| 11 | that don't exist. | ||
| 12 | --- | ||
| 13 | |||
| 14 | CHANGELOG | 1 + | ||
| 15 | lib/master.c | 32 +++++++++++++++++++++++++++++--- | ||
| 16 | 2 files changed, 30 insertions(+), 3 deletions(-) | ||
| 17 | |||
| 18 | |||
| 19 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 20 | index 7b8d185..79cf673 100644 | ||
| 21 | --- a/CHANGELOG | ||
| 22 | +++ b/CHANGELOG | ||
| 23 | @@ -7,6 +7,7 @@ | ||
| 24 | - fix typo in automount(8). | ||
| 25 | - dont wait forever to restart. | ||
| 26 | - add timeout option description to man page. | ||
| 27 | +- fix null map entry order handling. | ||
| 28 | |||
| 29 | 25/07/2012 autofs-5.0.7 | ||
| 30 | ======================= | ||
| 31 | diff --git a/lib/master.c b/lib/master.c | ||
| 32 | index 904b13d..a0e62f2 100644 | ||
| 33 | --- a/lib/master.c | ||
| 34 | +++ b/lib/master.c | ||
| 35 | @@ -1179,9 +1179,35 @@ int master_mount_mounts(struct master *master, time_t age, int readall) | ||
| 36 | |||
| 37 | cache_readlock(nc); | ||
| 38 | ne = cache_lookup_distinct(nc, this->path); | ||
| 39 | - if (ne && this->age > ne->age) { | ||
| 40 | + /* | ||
| 41 | + * If this path matched a nulled entry the master map entry | ||
| 42 | + * must be an indirect mount so the master map entry line | ||
| 43 | + * number may be obtained from this->maps. | ||
| 44 | + */ | ||
| 45 | + if (ne) { | ||
| 46 | + int lineno = ne->age; | ||
| 47 | cache_unlock(nc); | ||
| 48 | - st_add_task(ap, ST_SHUTDOWN_PENDING); | ||
| 49 | + | ||
| 50 | + /* null entry appears after map entry */ | ||
| 51 | + if (this->maps->master_line < lineno) { | ||
| 52 | + warn(ap->logopt, | ||
| 53 | + "ignoring null entry that appears after " | ||
| 54 | + "existing entry for %s", this->path); | ||
| 55 | + goto cont; | ||
| 56 | + } | ||
| 57 | + if (ap->state != ST_INIT) { | ||
| 58 | + st_add_task(ap, ST_SHUTDOWN_PENDING); | ||
| 59 | + continue; | ||
| 60 | + } | ||
| 61 | + /* | ||
| 62 | + * The map entry hasn't been started yet and we've | ||
| 63 | + * seen a preceeding null map entry for it so just | ||
| 64 | + * delete it from the master map entry list so it | ||
| 65 | + * doesn't get in the road. | ||
| 66 | + */ | ||
| 67 | + list_del_init(&this->list); | ||
| 68 | + master_free_mapent_sources(ap->entry, 1); | ||
| 69 | + master_free_mapent(ap->entry); | ||
| 70 | continue; | ||
| 71 | } | ||
| 72 | nested = cache_partial_match(nc, this->path); | ||
| 73 | @@ -1194,7 +1220,7 @@ int master_mount_mounts(struct master *master, time_t age, int readall) | ||
| 74 | cache_delete(nc, nested->key); | ||
| 75 | } | ||
| 76 | cache_unlock(nc); | ||
| 77 | - | ||
| 78 | +cont: | ||
| 79 | st_mutex_lock(); | ||
| 80 | |||
| 81 | state_pipe = this->ap->state_pipe[1]; | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch new file mode 100644 index 0000000000..22bd5da25d --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | autofs-5.0.7 - fix parse buffer initialization | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | When parsing a master map entry, if the mount point path is longer than | ||
| 6 | the following map string the lexical analyzer buffer may not have a null | ||
| 7 | terminator where it is expected. If the map name string also contains a | ||
| 8 | string that is the same as a map type at the end the map name the map | ||
| 9 | name is not constructed correctly because of this lack of a string | ||
| 10 | terminator in the buffer. | ||
| 11 | --- | ||
| 12 | |||
| 13 | CHANGELOG | 1 + | ||
| 14 | lib/master_tok.l | 4 +++- | ||
| 15 | 2 files changed, 4 insertions(+), 1 deletions(-) | ||
| 16 | |||
| 17 | |||
| 18 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 19 | index 34c70fa..276d6ba 100644 | ||
| 20 | --- a/CHANGELOG | ||
| 21 | +++ b/CHANGELOG | ||
| 22 | @@ -3,6 +3,7 @@ | ||
| 23 | - fix nobind sun escaped map entries. | ||
| 24 | - fix use cache entry after free in lookup_prune_one_cache(). | ||
| 25 | - fix ipv6 proximity calculation. | ||
| 26 | +- fix parse buffer initialization. | ||
| 27 | |||
| 28 | 25/07/2012 autofs-5.0.7 | ||
| 29 | ======================= | ||
| 30 | diff --git a/lib/master_tok.l b/lib/master_tok.l | ||
| 31 | index 0d6edb7..30abb15 100644 | ||
| 32 | --- a/lib/master_tok.l | ||
| 33 | +++ b/lib/master_tok.l | ||
| 34 | @@ -74,7 +74,8 @@ int my_yyinput(char *, int); | ||
| 35 | #define unput(c) (*(char *) --line = c) | ||
| 36 | #endif | ||
| 37 | |||
| 38 | -char buff[1024]; | ||
| 39 | +#define BUFF_LEN 1024 | ||
| 40 | +char buff[BUFF_LEN]; | ||
| 41 | char *bptr; | ||
| 42 | char *optr = buff; | ||
| 43 | unsigned int tlen; | ||
| 44 | @@ -174,6 +175,7 @@ OPTNTOUT (-n{OPTWS}|-n{OPTWS}={OPTWS}|--negative-timeout{OPTWS}|--negative-timeo | ||
| 45 | *bptr = '\0'; | ||
| 46 | strcpy(master_lval.strtype, buff); | ||
| 47 | bptr = buff; | ||
| 48 | + memset(buff, 0, BUFF_LEN); | ||
| 49 | return(PATH); | ||
| 50 | } | ||
| 51 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-typo-in-automount-8.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-typo-in-automount-8.patch new file mode 100644 index 0000000000..6d88ce0cbd --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-typo-in-automount-8.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | autofs-5.0.7 - fix typo in automount(8) | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | |||
| 6 | --- | ||
| 7 | |||
| 8 | CHANGELOG | 1 + | ||
| 9 | man/automount.8 | 2 +- | ||
| 10 | 2 files changed, 2 insertions(+), 1 deletions(-) | ||
| 11 | |||
| 12 | |||
| 13 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 14 | index 276d6ba..6051723 100644 | ||
| 15 | --- a/CHANGELOG | ||
| 16 | +++ b/CHANGELOG | ||
| 17 | @@ -4,6 +4,7 @@ | ||
| 18 | - fix use cache entry after free in lookup_prune_one_cache(). | ||
| 19 | - fix ipv6 proximity calculation. | ||
| 20 | - fix parse buffer initialization. | ||
| 21 | +- fix typo in automount(8). | ||
| 22 | |||
| 23 | 25/07/2012 autofs-5.0.7 | ||
| 24 | ======================= | ||
| 25 | diff --git a/man/automount.8 b/man/automount.8 | ||
| 26 | index 0186984..dddebce 100644 | ||
| 27 | --- a/man/automount.8 | ||
| 28 | +++ b/man/automount.8 | ||
| 29 | @@ -51,7 +51,7 @@ are over-ridden macro definitions of the same name specified in | ||
| 30 | mount entries. | ||
| 31 | .TP | ||
| 32 | .I "\-f, \-\-foreground" | ||
| 33 | -Run the daemon in the forground and log to stderr instead of syslog." | ||
| 34 | +Run the daemon in the foreground and log to stderr instead of syslog." | ||
| 35 | .TP | ||
| 36 | .I "\-r, \-\-random-multimount-selection" | ||
| 37 | Enables the use of ramdom selection when choosing a host from a | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-use-cache-entry-after-free-mistake.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-use-cache-entry-after-free-mistake.patch new file mode 100644 index 0000000000..a469c16868 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-use-cache-entry-after-free-mistake.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | autofs-5.0.7 - fix use cache entry after free mistake | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | Fix an obvious use after free mistake in lookup_prune_one_cache(). | ||
| 6 | --- | ||
| 7 | |||
| 8 | CHANGELOG | 1 + | ||
| 9 | daemon/lookup.c | 7 +++++-- | ||
| 10 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
| 11 | |||
| 12 | |||
| 13 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 14 | index faf4c80..dc38580 100644 | ||
| 15 | --- a/CHANGELOG | ||
| 16 | +++ b/CHANGELOG | ||
| 17 | @@ -1,6 +1,7 @@ | ||
| 18 | ??/??/2012 autofs-5.0.8 | ||
| 19 | ======================= | ||
| 20 | - fix nobind sun escaped map entries. | ||
| 21 | +- fix use cache entry after free in lookup_prune_one_cache(). | ||
| 22 | |||
| 23 | 25/07/2012 autofs-5.0.7 | ||
| 24 | ======================= | ||
| 25 | diff --git a/daemon/lookup.c b/daemon/lookup.c | ||
| 26 | index 7909536..e3d9536 100644 | ||
| 27 | --- a/daemon/lookup.c | ||
| 28 | +++ b/daemon/lookup.c | ||
| 29 | @@ -1103,15 +1103,18 @@ void lookup_prune_one_cache(struct autofs_point *ap, struct mapent_cache *mc, ti | ||
| 30 | if (valid) | ||
| 31 | cache_delete(mc, key); | ||
| 32 | else if (!is_mounted(_PROC_MOUNTS, path, MNTS_AUTOFS)) { | ||
| 33 | + dev_t devid = ap->dev; | ||
| 34 | status = CHE_FAIL; | ||
| 35 | + if (ap->type == LKP_DIRECT) | ||
| 36 | + devid = this->dev; | ||
| 37 | if (this->ioctlfd == -1) | ||
| 38 | status = cache_delete(mc, key); | ||
| 39 | if (status != CHE_FAIL) { | ||
| 40 | if (ap->type == LKP_INDIRECT) { | ||
| 41 | if (ap->flags & MOUNT_FLAG_GHOST) | ||
| 42 | - rmdir_path(ap, path, ap->dev); | ||
| 43 | + rmdir_path(ap, path, devid); | ||
| 44 | } else | ||
| 45 | - rmdir_path(ap, path, this->dev); | ||
| 46 | + rmdir_path(ap, path, devid); | ||
| 47 | } | ||
| 48 | } | ||
| 49 | cache_unlock(mc); | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-handle-new-location-of-systemd.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-handle-new-location-of-systemd.patch new file mode 100644 index 0000000000..1c26794f50 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-handle-new-location-of-systemd.patch | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | autofs-5.0.7 - Handle new location of systemd | ||
| 2 | |||
| 3 | From: Frederic Crozat <fcrozat@suse.com> | ||
| 4 | |||
| 5 | Some distributions are moving systemd unit files from /lib to | ||
| 6 | /usr/lib, so we need to test both directories. | ||
| 7 | |||
| 8 | edit: imk | ||
| 9 | It occurs to me I've forgotten to check for the 64 bit variants | ||
| 10 | of the directories, so add them as well. | ||
| 11 | end edit: imk | ||
| 12 | --- | ||
| 13 | |||
| 14 | CHANGELOG | 1 + | ||
| 15 | aclocal.m4 | 2 +- | ||
| 16 | configure | 2 +- | ||
| 17 | 3 files changed, 3 insertions(+), 2 deletions(-) | ||
| 18 | |||
| 19 | |||
| 20 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 21 | index 3bdf8a4..8f6bb3a 100644 | ||
| 22 | --- a/CHANGELOG | ||
| 23 | +++ b/CHANGELOG | ||
| 24 | @@ -14,6 +14,7 @@ | ||
| 25 | - allow non root user to check status. | ||
| 26 | - fix recursive mount deadlock. | ||
| 27 | - increase file map read buffer size. | ||
| 28 | +- handle new location of systemd. | ||
| 29 | |||
| 30 | 25/07/2012 autofs-5.0.7 | ||
| 31 | ======================= | ||
| 32 | diff --git a/aclocal.m4 b/aclocal.m4 | ||
| 33 | index 1798c8b..47bca0c 100644 | ||
| 34 | --- a/aclocal.m4 | ||
| 35 | +++ b/aclocal.m4 | ||
| 36 | @@ -234,7 +234,7 @@ AC_DEFUN([AF_WITH_SYSTEMD], | ||
| 37 | [if test "$withval" = yes; then | ||
| 38 | if test -z "$systemddir"; then | ||
| 39 | AC_MSG_CHECKING([location of the systemd unit files directory]) | ||
| 40 | - for systemd_d in /lib/systemd/system; do | ||
| 41 | + for systemd_d in /usr/lib/systemd/system /usr/lib64/systemd/system /lib/systemd/system /lib64/systemd/system; do | ||
| 42 | if test -z "$systemddir"; then | ||
| 43 | if test -d "$systemd_d"; then | ||
| 44 | systemddir="$systemd_d" | ||
| 45 | diff --git a/configure b/configure | ||
| 46 | index ba3bba6..3722a46 100755 | ||
| 47 | --- a/configure | ||
| 48 | +++ b/configure | ||
| 49 | @@ -2157,7 +2157,7 @@ if test "${with_systemd+set}" = set; then : | ||
| 50 | if test -z "$systemddir"; then | ||
| 51 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking location of the systemd unit files directory" >&5 | ||
| 52 | $as_echo_n "checking location of the systemd unit files directory... " >&6; } | ||
| 53 | - for systemd_d in /lib/systemd/system; do | ||
| 54 | + for systemd_d in /usr/lib/systemd/system /usr/lib64/systemd/system /lib/systemd/system /lib64/systemd/system; do | ||
| 55 | if test -z "$systemddir"; then | ||
| 56 | if test -d "$systemd_d"; then | ||
| 57 | systemddir="$systemd_d" | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-include-usage-in-usage-message.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-include-usage-in-usage-message.patch new file mode 100644 index 0000000000..1c8a565a29 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-include-usage-in-usage-message.patch | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | autofs-5.0.7 - include usage in usage message | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | Since usage is a case entry we should also nclude it in the usage | ||
| 6 | message. | ||
| 7 | --- | ||
| 8 | |||
| 9 | redhat/autofs.init.in | 2 +- | ||
| 10 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
| 11 | |||
| 12 | |||
| 13 | diff --git a/redhat/autofs.init.in b/redhat/autofs.init.in | ||
| 14 | index 8e355da..ec6d5d6 100644 | ||
| 15 | --- a/redhat/autofs.init.in | ||
| 16 | +++ b/redhat/autofs.init.in | ||
| 17 | @@ -155,7 +155,7 @@ function reload() { | ||
| 18 | } | ||
| 19 | |||
| 20 | function usage_message() { | ||
| 21 | - echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart}" | ||
| 22 | + echo $"Usage: $0 {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart|usage}" | ||
| 23 | } | ||
| 24 | |||
| 25 | RETVAL=0 | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-description-of-default-MOUNT_WAIT-setting-clear.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-description-of-default-MOUNT_WAIT-setting-clear.patch new file mode 100644 index 0000000000..a3dd3fb691 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-make-description-of-default-MOUNT_WAIT-setting-clear.patch | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | autofs-5.0.7 - make description of default MOUNT_WAIT setting clear | ||
| 2 | |||
| 3 | From: Ian Kent <ikent@redhat.com> | ||
| 4 | |||
| 5 | |||
| 6 | --- | ||
| 7 | |||
| 8 | CHANGELOG | 1 + | ||
| 9 | redhat/autofs.sysconfig.in | 5 +++-- | ||
| 10 | samples/autofs.conf.default.in | 5 +++-- | ||
| 11 | 3 files changed, 7 insertions(+), 4 deletions(-) | ||
| 12 | |||
| 13 | |||
| 14 | diff --git a/CHANGELOG b/CHANGELOG | ||
| 15 | index 79cf673..961e340 100644 | ||
| 16 | --- a/CHANGELOG | ||
| 17 | +++ b/CHANGELOG | ||
| 18 | @@ -8,6 +8,7 @@ | ||
| 19 | - dont wait forever to restart. | ||
| 20 | - add timeout option description to man page. | ||
| 21 | - fix null map entry order handling. | ||
| 22 | +- make description of default MOUNT_WAIT setting clear. | ||
| 23 | |||
| 24 | 25/07/2012 autofs-5.0.7 | ||
| 25 | ======================= | ||
| 26 | diff --git a/redhat/autofs.sysconfig.in b/redhat/autofs.sysconfig.in | ||
| 27 | index 36b924d..a8992c4 100644 | ||
| 28 | --- a/redhat/autofs.sysconfig.in | ||
| 29 | +++ b/redhat/autofs.sysconfig.in | ||
| 30 | @@ -18,8 +18,9 @@ TIMEOUT=300 | ||
| 31 | # Setting this timeout can cause problems when | ||
| 32 | # mount would otherwise wait for a server that | ||
| 33 | # is temporarily unavailable, such as when it's | ||
| 34 | -# restarting. The defailt of waiting for mount(8) | ||
| 35 | -# usually results in a wait of around 3 minutes. | ||
| 36 | +# restarting. The default setting (-1) of waiting | ||
| 37 | +# for mount(8) usually results in a wait of around | ||
| 38 | +# 3 minutes. | ||
| 39 | # | ||
| 40 | #MOUNT_WAIT=-1 | ||
| 41 | # | ||
| 42 | diff --git a/samples/autofs.conf.default.in b/samples/autofs.conf.default.in | ||
| 43 | index ac2f63b..1da89cf 100644 | ||
| 44 | --- a/samples/autofs.conf.default.in | ||
| 45 | +++ b/samples/autofs.conf.default.in | ||
| 46 | @@ -18,8 +18,9 @@ TIMEOUT=300 | ||
| 47 | # Setting this timeout can cause problems when | ||
| 48 | # mount would otherwise wait for a server that | ||
| 49 | # is temporarily unavailable, such as when it's | ||
| 50 | -# restarting. The defailt of waiting for mount(8) | ||
| 51 | -# usually results in a wait of around 3 minutes. | ||
| 52 | +# restarting. The default setting (-1) of waiting | ||
| 53 | +# for mount(8) usually results in a wait of around | ||
| 54 | +# 3 minutes. | ||
| 55 | # | ||
| 56 | #MOUNT_WAIT=-1 | ||
| 57 | # | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-additional-distros.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-additional-distros.patch new file mode 100644 index 0000000000..6a35843cea --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-additional-distros.patch | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | --- autofs-4.1.4/samples/rc.autofs.in~ 2005-04-11 06:30:54.000000000 -0500 | ||
| 2 | +++ autofs-4.1.4/samples/rc.autofs.in 2007-04-07 13:18:44.000000000 -0500 | ||
| 3 | @@ -43,6 +43,9 @@ | ||
| 4 | system=debian | ||
| 5 | elif [ -f /etc/redhat-release ]; then | ||
| 6 | system=redhat | ||
| 7 | +elif [ -f /etc/issue ] && grep -q "^SlugOS\|Yocto" /etc/issue ; then | ||
| 8 | + # SlugOS and Yocto behave like Debian, at least for autofs purposes. | ||
| 9 | + system=debian | ||
| 10 | else | ||
| 11 | echo "$0: Unknown system, please port and contact autofs@linux.kernel.org" 1>&2 | ||
| 12 | exit 1 | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/cross.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/cross.patch new file mode 100644 index 0000000000..8f1af625f0 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/cross.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | Index: autofs-5.0.7/aclocal.m4 | ||
| 2 | =================================================================== | ||
| 3 | --- autofs-5.0.7.orig/aclocal.m4 2012-10-28 04:45:07.000000000 -0700 | ||
| 4 | +++ autofs-5.0.7/aclocal.m4 2012-10-28 10:47:53.263996910 -0700 | ||
| 5 | @@ -7,6 +7,8 @@ | ||
| 6 | AC_DEFUN(AF_PATH_INCLUDE, | ||
| 7 | [AC_PATH_PROGS($1,$2,$3,$4) | ||
| 8 | if test -n "$$1"; then | ||
| 9 | + AH_TEMPLATE([HAVE_$1], [Have $2]) | ||
| 10 | + AH_TEMPLATE([PATH_$1], [Have $2]) | ||
| 11 | AC_DEFINE(HAVE_$1,1,[define if you have $1]) | ||
| 12 | AC_DEFINE_UNQUOTED(PATH_$1, "$$1", [define if you have $1]) | ||
| 13 | HAVE_$1=1 | ||
| 14 | Index: autofs-5.0.7/configure.in | ||
| 15 | =================================================================== | ||
| 16 | --- autofs-5.0.7.orig/configure.in 2012-10-28 04:45:06.000000000 -0700 | ||
| 17 | +++ autofs-5.0.7/configure.in 2012-10-28 10:50:07.580000628 -0700 | ||
| 18 | @@ -301,13 +301,15 @@ | ||
| 19 | cat > pietest.c <<EOF | ||
| 20 | int main(void) { return 0; } | ||
| 21 | EOF | ||
| 22 | +AF_tmp_ldflags="$LDFLAGS" | ||
| 23 | +AF_tmp_cflags="$CFLAGS" | ||
| 24 | CFLAGS=-fPIE | ||
| 25 | LDFLAGS=-pie | ||
| 26 | DAEMON_CFLAGS= | ||
| 27 | DAEMON_LDFLAGS= | ||
| 28 | AC_MSG_CHECKING([whether gcc -fPIE works]) | ||
| 29 | -AC_RUN_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])], | ||
| 30 | - [gcc_supports_pie=yes], [gcc_supports_pie=no], [gcc_supports_pie=no]) | ||
| 31 | +AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])], | ||
| 32 | + [gcc_supports_pie=yes], [gcc_supports_pie=no], [gcc_supports_pie=no]) | ||
| 33 | AC_MSG_RESULT([$gcc_supports_pie]) | ||
| 34 | if test $gcc_supports_pie = yes ; then | ||
| 35 | DAEMON_CFLAGS="-fPIE" | ||
| 36 | @@ -316,6 +318,8 @@ | ||
| 37 | rm -f pietest.c | ||
| 38 | AC_SUBST(DAEMON_CFLAGS) | ||
| 39 | AC_SUBST(DAEMON_LDFLAGS) | ||
| 40 | +CFLAGS="${AF_tmp_cflags}" | ||
| 41 | +LDFLAGS="${AF_tmp_ldflags}" | ||
| 42 | |||
| 43 | # | ||
| 44 | # Enable ability to access value in external env variable | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/libtirpc-name-clash-backout.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/libtirpc-name-clash-backout.patch new file mode 100644 index 0000000000..104724014d --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/libtirpc-name-clash-backout.patch | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | Index: autofs-5.0.7/lib/rpc_subs.c | ||
| 2 | =================================================================== | ||
| 3 | --- autofs-5.0.7.orig/lib/rpc_subs.c 2012-07-24 23:05:26.000000000 -0700 | ||
| 4 | +++ autofs-5.0.7/lib/rpc_subs.c 2012-10-28 14:47:49.008382116 -0700 | ||
| 5 | @@ -34,16 +34,6 @@ | ||
| 6 | #include <pthread.h> | ||
| 7 | #include <poll.h> | ||
| 8 | |||
| 9 | -#ifdef WITH_LIBTIRPC | ||
| 10 | -#undef auth_destroy | ||
| 11 | -#define auth_destroy(auth) \ | ||
| 12 | - do { \ | ||
| 13 | - int refs; \ | ||
| 14 | - if ((refs = auth_put((auth))) == 0) \ | ||
| 15 | - ((*((auth)->ah_ops->ah_destroy))(auth));\ | ||
| 16 | - } while (0) | ||
| 17 | -#endif | ||
| 18 | - | ||
| 19 | #include "mount.h" | ||
| 20 | #include "rpc_subs.h" | ||
| 21 | #include "automount.h" | ||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/libtirpc.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/libtirpc.patch new file mode 100644 index 0000000000..04f52c6f0e --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/libtirpc.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | Index: autofs-5.0.7/aclocal.m4 | ||
| 2 | =================================================================== | ||
| 3 | --- autofs-5.0.7.orig/aclocal.m4 2012-10-28 13:17:45.504237027 -0700 | ||
| 4 | +++ autofs-5.0.7/aclocal.m4 2012-10-28 13:20:50.108242739 -0700 | ||
| 5 | @@ -403,7 +403,7 @@ | ||
| 6 | # save current flags | ||
| 7 | af_check_libtirpc_save_cflags="$CFLAGS" | ||
| 8 | af_check_libtirpc_save_ldflags="$LDFLAGS" | ||
| 9 | -CFLAGS="$CFLAGS -I/usr/include/tirpc" | ||
| 10 | +CFLAGS="$CFLAGS -I=/usr/include/tirpc" | ||
| 11 | LDFLAGS="$LDFLAGS -ltirpc" | ||
| 12 | |||
| 13 | AC_TRY_LINK( | ||
| 14 | Index: autofs-5.0.7/Makefile.rules | ||
| 15 | =================================================================== | ||
| 16 | --- autofs-5.0.7.orig/Makefile.rules 2012-10-28 13:17:45.308237022 -0700 | ||
| 17 | +++ autofs-5.0.7/Makefile.rules 2012-10-28 13:21:25.720242803 -0700 | ||
| 18 | @@ -48,7 +48,7 @@ | ||
| 19 | LDFLAGS += -lpthread | ||
| 20 | |||
| 21 | ifdef TIRPCLIB | ||
| 22 | -CFLAGS += -I/usr/include/tirpc | ||
| 23 | +CFLAGS += -I=/usr/include/tirpc | ||
| 24 | LDFLAGS += $(TIRPCLIB) | ||
| 25 | endif | ||
| 26 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/no-bash.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/no-bash.patch new file mode 100644 index 0000000000..cf03635270 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/no-bash.patch | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | Index: autofs-5.0.7/samples/auto.net | ||
| 2 | =================================================================== | ||
| 3 | --- autofs-5.0.7.orig/samples/auto.net 2012-07-24 23:05:26.000000000 -0700 | ||
| 4 | +++ autofs-5.0.7/samples/auto.net 2012-10-28 10:44:25.035991715 -0700 | ||
| 5 | @@ -1,4 +1,4 @@ | ||
| 6 | -#!/bin/bash | ||
| 7 | +#!/bin/sh | ||
| 8 | |||
| 9 | # This file must be executable to work! chmod 755! | ||
| 10 | |||
| 11 | Index: autofs-5.0.7/samples/auto.smb | ||
| 12 | =================================================================== | ||
| 13 | --- autofs-5.0.7.orig/samples/auto.smb 2012-07-24 23:05:26.000000000 -0700 | ||
| 14 | +++ autofs-5.0.7/samples/auto.smb 2012-10-28 10:44:25.035991715 -0700 | ||
| 15 | @@ -1,4 +1,4 @@ | ||
| 16 | -#!/bin/bash | ||
| 17 | +#!/bin/sh | ||
| 18 | |||
| 19 | # This file must be executable to work! chmod 755! | ||
| 20 | |||
diff --git a/meta-networking/recipes-daemons/autofs/autofs_5.0.7.bb b/meta-networking/recipes-daemons/autofs/autofs_5.0.7.bb new file mode 100644 index 0000000000..c1b0b46295 --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs_5.0.7.bb | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | DESCRIPTION = "Kernel based automounter for linux." | ||
| 2 | SECTION = "base" | ||
| 3 | LICENSE = "GPL-2.0" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | ||
| 5 | |||
| 6 | DEPENDS += "openldap libtirpc flex-native bison-native" | ||
| 7 | |||
| 8 | inherit autotools systemd | ||
| 9 | |||
| 10 | SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.bz2 \ | ||
| 11 | file://autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch \ | ||
| 12 | file://autofs-5.0.7-fix-use-cache-entry-after-free-mistake.patch \ | ||
| 13 | file://autofs-5.0.7-fix-ipv6-proximity-calculation.patch \ | ||
| 14 | file://autofs-5.0.7-fix-parse-buffer-initialization.patch \ | ||
| 15 | file://autofs-5.0.7-fix-typo-in-automount-8.patch \ | ||
| 16 | file://autofs-5.0.7-include-usage-in-usage-message.patch \ | ||
| 17 | file://autofs-5.0.7-dont-wait-forever-to-restart.patch \ | ||
| 18 | file://autofs-5.0.7-add-timeout-option-description-to-man-page.patch \ | ||
| 19 | file://autofs-5.0.7-fix-null-map-entry-order-handling.patch \ | ||
| 20 | file://autofs-5.0.7-make-description-of-default-MOUNT_WAIT-setting-clear.patch \ | ||
| 21 | file://autofs-5.0.7-configure-in-allow-cross-compilation.patch \ | ||
| 22 | file://autofs-5.0.7-README-update-mailing-list-subscription-info.patch \ | ||
| 23 | file://autofs-5.0.7-allow-non-root-user-to-check-status.patch \ | ||
| 24 | file://autofs-5.0.7-configure-allow-cross-compilation-update.patch \ | ||
| 25 | file://autofs-5.0.6-fix-recursive-mount-deadlock.patch \ | ||
| 26 | file://autofs-5.0.6-increase-file-map-read-buffer-size.patch \ | ||
| 27 | file://autofs-5.0.7-handle-new-location-of-systemd.patch \ | ||
| 28 | file://Makefile.rules-cross.patch \ | ||
| 29 | file://no-bash.patch \ | ||
| 30 | file://cross.patch \ | ||
| 31 | file://libtirpc.patch \ | ||
| 32 | file://libtirpc-name-clash-backout.patch \ | ||
| 33 | " | ||
| 34 | |||
| 35 | SRC_URI[md5sum] = "bc46838dece83c02d800ff144ed9f431" | ||
| 36 | SRC_URI[sha256sum] = "08c4304d8076dc80c14df559bc5fd821b67ef3457b245f61068bd053d8f94ccc" | ||
| 37 | |||
| 38 | inherit update-rc.d | ||
| 39 | |||
| 40 | INITSCRIPT_NAME = "autofs" | ||
| 41 | INITSCRIPT_PARAMS = "defaults" | ||
| 42 | |||
| 43 | SYSTEMD_PACKAGES = "${PN}-systemd" | ||
| 44 | SYSTEMD_SERVICE = "autofs.service" | ||
| 45 | |||
| 46 | # FIXME: modules/Makefile has crappy rules that don't obey LDFLAGS | ||
| 47 | CFLAGS += "${LDFLAGS}" | ||
| 48 | |||
| 49 | EXTRA_OEMAKE = "DONTSTRIP=1" | ||
| 50 | EXTRA_OECONF += "--with-systemd --disable-mount-locking \ | ||
| 51 | --enable-ignore-busy --with-openldap=no \ | ||
| 52 | --with-sasl=no --with-libtirpc=yes \ | ||
| 53 | --with-path=${STAGING_BINDIR_NATIVE} \ | ||
| 54 | " | ||
| 55 | CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ | ||
| 56 | ac_cv_path_RPCGEN=rpcgen \ | ||
| 57 | " | ||
| 58 | |||
| 59 | do_configure_prepend () { | ||
| 60 | if [ ! -e acinclude.m4 ]; then | ||
| 61 | cp aclocal.m4 acinclude.m4 | ||
| 62 | fi | ||
| 63 | } | ||
| 64 | |||
| 65 | INSANE_SKIP_${PN} = "dev-so" | ||
