All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] Revert "wic/utils/partitionedfs.py: assemble .wic images as sparse files"
@ 2016-04-12 14:51 Ross Burton
  2016-04-12 14:51 ` [PATCH 2/5] Revert "oeqa/selftest/wic: add test case for sparse images" Ross Burton
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ross Burton @ 2016-04-12 14:51 UTC (permalink / raw)
  To: openembedded-core

It turns out that dd's conv=sparse doesn't look at the file extents, but simply
checks if a "block" is all zero.  If the block of zero was meaningful it gets
lost and if the image is subsequently written to media using a sparse-aware
writer then the block of zeros won't be written at all.

This reverts commit 5fd592fbae2e046bcb8c3a6c3ef4993fe0400676.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 scripts/lib/wic/utils/partitionedfs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 3e2b420..5a103bb 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -340,7 +340,7 @@ class Image(object):
             source = part['source_file']
             if source:
                 # install source_file contents into a partition
-                cmd = "dd if=%s of=%s bs=%d seek=%d count=%d conv=notrunc,sparse" % \
+                cmd = "dd if=%s of=%s bs=%d seek=%d count=%d conv=notrunc" % \
                       (source, image_file, self.sector_size,
                        part['start'], part['size'])
                 exec_cmd(cmd)
-- 
2.8.0.rc3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/5] Revert "oeqa/selftest/wic: add test case for sparse images"
  2016-04-12 14:51 [PATCH 1/5] Revert "wic/utils/partitionedfs.py: assemble .wic images as sparse files" Ross Burton
@ 2016-04-12 14:51 ` Ross Burton
  2016-04-12 14:51 ` [PATCH 3/5] rsync: don't install acinclude.m4 Ross Burton
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ross Burton @ 2016-04-12 14:51 UTC (permalink / raw)
  To: openembedded-core

This reverts commit 43150ab7ec63d804e8a998ecee9d00295b8b2bc7.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/lib/oeqa/selftest/wic.py | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index dd32075..a569fbf 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -276,16 +276,3 @@ class Wic(oeSelfTest):
             status, output = qemu.run_serial(command)
             self.assertEqual(1, status, 'Failed to run command "%s": %s' % (command, output))
             self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt')
-
-    def test_sparseness(self):
-        """Test that assembled images are sparse; apparent size > disk usage"""
-        self.assertEqual(0, runCmd("wic create directdisk "
-                                   "--image-name core-image-minimal").status)
-        images = glob(self.resultdir + "directdisk-*.direct")
-        self.assertEqual(1, len(images))
-
-        imagestat = os.stat(images.pop())
-        # st_blocks is the "number of 512-byte blocks allocated for file"
-        used = imagestat.st_blocks*512
-        apparent = imagestat.st_size
-        self.assertLess(used, apparent)
-- 
2.8.0.rc3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/5] rsync: don't install acinclude.m4
  2016-04-12 14:51 [PATCH 1/5] Revert "wic/utils/partitionedfs.py: assemble .wic images as sparse files" Ross Burton
  2016-04-12 14:51 ` [PATCH 2/5] Revert "oeqa/selftest/wic: add test case for sparse images" Ross Burton
@ 2016-04-12 14:51 ` Ross Burton
  2016-04-12 14:51 ` [PATCH 4/5] rsync: pass cached configure values through the right variable Ross Burton
  2016-04-12 14:51 ` [PATCH 5/5] rsync: remove upstream's rebuild logic Ross Burton
  3 siblings, 0 replies; 5+ messages in thread
From: Ross Burton @ 2016-04-12 14:51 UTC (permalink / raw)
  To: openembedded-core

This acinclude.m4 was actually a stale copy of upstream's generated aclocal.m4.
This generates correctly now, so there isn't a need to install this by hand
anymore.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-devtools/rsync/files/acinclude.m4 | 95 --------------------------
 meta/recipes-devtools/rsync/rsync_3.1.2.bb     |  5 --
 2 files changed, 100 deletions(-)
 delete mode 100644 meta/recipes-devtools/rsync/files/acinclude.m4

diff --git a/meta/recipes-devtools/rsync/files/acinclude.m4 b/meta/recipes-devtools/rsync/files/acinclude.m4
deleted file mode 100644
index 735b41d..0000000
--- a/meta/recipes-devtools/rsync/files/acinclude.m4
+++ /dev/null
@@ -1,95 +0,0 @@
-dnl verbatim renamed from aclocal.m4 in rsync_3.0.7
-dnl 07/06/2010 - qhe
-
-dnl AC_VALIDATE_CACHE_SYSTEM_TYPE[(cmd)]
-dnl if the cache file is inconsistent with the current host,
-dnl target and build system types, execute CMD or print a default
-dnl error message.
-AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
-    AC_REQUIRE([AC_CANONICAL_SYSTEM])
-    AC_MSG_CHECKING([config.cache system type])
-    if { test x"${ac_cv_host_system_type+set}" = x"set" &&
-         test x"$ac_cv_host_system_type" != x"$host"; } ||
-       { test x"${ac_cv_build_system_type+set}" = x"set" &&
-         test x"$ac_cv_build_system_type" != x"$build"; } ||
-       { test x"${ac_cv_target_system_type+set}" = x"set" &&
-         test x"$ac_cv_target_system_type" != x"$target"; }; then
-	AC_MSG_RESULT([different])
-	ifelse($#, 1, [$1],
-		[AC_MSG_ERROR(["you must remove config.cache and restart configure"])])
-    else
-	AC_MSG_RESULT([same])
-    fi
-    ac_cv_host_system_type="$host"
-    ac_cv_build_system_type="$build"
-    ac_cv_target_system_type="$target"
-])
-
-dnl Check for socklen_t: historically on BSD it is an int, and in
-dnl POSIX 1g it is a type of its own, but some platforms use different
-dnl types for the argument to getsockopt, getpeername, etc.  So we
-dnl have to test to find something that will work.
-
-dnl This is no good, because passing the wrong pointer on C compilers is
-dnl likely to only generate a warning, not an error.  We don't call this at
-dnl the moment.
-
-AC_DEFUN([TYPE_SOCKLEN_T],
-[
-   AC_CHECK_TYPE([socklen_t], ,[
-      AC_MSG_CHECKING([for socklen_t equivalent])
-      AC_CACHE_VAL([rsync_cv_socklen_t_equiv],
-      [
-         # Systems have either "struct sockaddr *" or
-         # "void *" as the second argument to getpeername
-         rsync_cv_socklen_t_equiv=
-         for arg2 in "struct sockaddr" void; do
-            for t in int size_t unsigned long "unsigned long"; do
-               AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>
-
-                  int getpeername (int, $arg2 *, $t *);
-               ],[
-                  $t len;
-                  getpeername(0,0,&len);
-               ],[
-                  rsync_cv_socklen_t_equiv="$t"
-                  break
-               ])
-            done
-         done
-
-         if test "x$rsync_cv_socklen_t_equiv" = x; then
-            AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
-         fi
-      ])
-      AC_MSG_RESULT($rsync_cv_socklen_t_equiv)
-      AC_DEFINE_UNQUOTED(socklen_t, $rsync_cv_socklen_t_equiv,
-			[type to use in place of socklen_t if not defined])],
-      [#include <sys/types.h>
-#include <sys/socket.h>])
-])
-
-dnl AC_HAVE_TYPE(TYPE,INCLUDES)
-AC_DEFUN([AC_HAVE_TYPE], [
-AC_REQUIRE([AC_HEADER_STDC])
-cv=`echo "$1" | sed 'y%./+- %__p__%'`
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL([ac_cv_type_$cv],
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-AC_INCLUDES_DEFAULT
-$2]],
-[[$1 foo;]])],
-[eval "ac_cv_type_$cv=yes"],
-[eval "ac_cv_type_$cv=no"]))dnl
-ac_foo=`eval echo \\$ac_cv_type_$cv`
-AC_MSG_RESULT($ac_foo)
-if test "$ac_foo" = yes; then
-  ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
-if false; then
-	AC_CHECK_TYPES($1)
-fi
-  AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])
-fi
-])
diff --git a/meta/recipes-devtools/rsync/rsync_3.1.2.bb b/meta/recipes-devtools/rsync/rsync_3.1.2.bb
index 7237f43..5f4733f 100644
--- a/meta/recipes-devtools/rsync/rsync_3.1.2.bb
+++ b/meta/recipes-devtools/rsync/rsync_3.1.2.bb
@@ -1,9 +1,5 @@
 require rsync.inc
 
-
-SRC_URI += "file://acinclude.m4 \
-"
-
 SRC_URI[md5sum] = "0f758d7e000c0f7f7d3792610fad70cb"
 SRC_URI[sha256sum] = "ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2"
 
@@ -15,7 +11,6 @@ PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
 # makefile checks the existence of configure.sh
 do_configure_prepend () {
 	rm -f ${S}/configure ${S}/configure.sh
-	cp -f ${WORKDIR}/acinclude.m4 ${S}/
 
 	# By default, if crosscompiling, rsync disables a number of
 	# capabilities, hardlinking symlinks and special files (i.e. devices)
-- 
2.8.0.rc3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/5] rsync: pass cached configure values through the right variable
  2016-04-12 14:51 [PATCH 1/5] Revert "wic/utils/partitionedfs.py: assemble .wic images as sparse files" Ross Burton
  2016-04-12 14:51 ` [PATCH 2/5] Revert "oeqa/selftest/wic: add test case for sparse images" Ross Burton
  2016-04-12 14:51 ` [PATCH 3/5] rsync: don't install acinclude.m4 Ross Burton
@ 2016-04-12 14:51 ` Ross Burton
  2016-04-12 14:51 ` [PATCH 5/5] rsync: remove upstream's rebuild logic Ross Burton
  3 siblings, 0 replies; 5+ messages in thread
From: Ross Burton @ 2016-04-12 14:51 UTC (permalink / raw)
  To: openembedded-core

Passing these through CACHED_CONFIGUREVARS doesn't change the build, but makes
the recipe clearer.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-devtools/rsync/rsync_3.1.2.bb | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/rsync/rsync_3.1.2.bb b/meta/recipes-devtools/rsync/rsync_3.1.2.bb
index 5f4733f..4b91ac7 100644
--- a/meta/recipes-devtools/rsync/rsync_3.1.2.bb
+++ b/meta/recipes-devtools/rsync/rsync_3.1.2.bb
@@ -7,15 +7,14 @@ PACKAGECONFIG ??= "acl attr"
 PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
 PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
 
+# By default, if crosscompiling, rsync disables a number of
+# capabilities, hardlinking symlinks and special files (i.e. devices)
+CACHED_CONFIGUREVARS += "rsync_cv_can_hardlink_special=yes rsync_cv_can_hardlink_symlink=yes"
+
 # rsync 3.0 uses configure.sh instead of configure, and
 # makefile checks the existence of configure.sh
 do_configure_prepend () {
 	rm -f ${S}/configure ${S}/configure.sh
-
-	# By default, if crosscompiling, rsync disables a number of
-	# capabilities, hardlinking symlinks and special files (i.e. devices)
-	export rsync_cv_can_hardlink_special=yes
-	export rsync_cv_can_hardlink_symlink=yes
 }
 
 do_configure_append () {
-- 
2.8.0.rc3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 5/5] rsync: remove upstream's rebuild logic
  2016-04-12 14:51 [PATCH 1/5] Revert "wic/utils/partitionedfs.py: assemble .wic images as sparse files" Ross Burton
                   ` (2 preceding siblings ...)
  2016-04-12 14:51 ` [PATCH 4/5] rsync: pass cached configure values through the right variable Ross Burton
@ 2016-04-12 14:51 ` Ross Burton
  3 siblings, 0 replies; 5+ messages in thread
From: Ross Burton @ 2016-04-12 14:51 UTC (permalink / raw)
  To: openembedded-core

Upstream some well intended but broken logic to reimplement the rebuild
functionality of automake. However this isn't out-of-tree safe and quite basic,
which means if it ever does execute (say, configure.ac or aclocal.m4 is touched)
then the build fails.

As we delete ${B} and re-run autoreconf on every build this is redundant, so
just delete it all.

[ YOCTO #9445 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 .../rsync/files/makefile-no-rebuild.patch          | 69 ++++++++++++++++++++++
 meta/recipes-devtools/rsync/rsync_3.1.2.bb         |  2 +
 2 files changed, 71 insertions(+)
 create mode 100644 meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch

diff --git a/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch b/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch
new file mode 100644
index 0000000..3d27fe7
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch
@@ -0,0 +1,69 @@
+Remove the Makefile rules to reinvoke autoconf, they're not out-of-tree safe and
+generally overcomplicated, and we ensure that autoreconf is invoked if required.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile.in b/Makefile.in
+index 151247d..8f3fdb6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -141,58 +141,6 @@ gen: conf proto.h man
+ gensend: gen
+ 	rsync -aivzc $(GENFILES) $${SAMBA_HOST-samba.org}:/home/ftp/pub/rsync/generated-files/
+ 
+-conf:
+-	cd $(srcdir) && $(MAKE) -f prepare-source.mak conf
+-
+-aclocal.m4: $(srcdir)/m4/*.m4
+-	aclocal -I $(srcdir)/m4
+-
+-configure.sh config.h.in: configure.ac aclocal.m4
+-	@if test -f configure.sh; then cp -p configure.sh configure.sh.old; else touch configure.sh.old; fi
+-	@if test -f config.h.in; then cp -p config.h.in config.h.in.old; else touch config.h.in.old; fi
+-	autoconf -o configure.sh
+-	autoheader && touch config.h.in
+-	@if diff configure.sh configure.sh.old >/dev/null 2>&1; then \
+-	    echo "configure.sh is unchanged."; \
+-	    rm configure.sh.old; \
+-	else \
+-	    echo "configure.sh has CHANGED."; \
+-	fi
+-	@if diff config.h.in config.h.in.old >/dev/null 2>&1; then \
+-	    echo "config.h.in is unchanged."; \
+-	    rm config.h.in.old; \
+-	else \
+-	    echo "config.h.in has CHANGED."; \
+-	fi
+-	@if test -f configure.sh.old -o -f config.h.in.old; then \
+-	    if test "$(MAKECMDGOALS)" = reconfigure; then \
+-		echo 'Continuing with "make reconfigure".'; \
+-	    else \
+-		echo 'You may need to run:'; \
+-		echo '  make reconfigure'; \
+-		exit 1; \
+-	    fi \
+-	fi
+-
+-reconfigure: configure.sh
+-	./config.status --recheck
+-	./config.status
+-
+-Makefile: Makefile.in config.status configure.sh config.h.in
+-	@if test -f Makefile; then cp -p Makefile Makefile.old; else touch Makefile.old; fi
+-	@./config.status
+-	@if diff Makefile Makefile.old >/dev/null 2>&1; then \
+-	    echo "Makefile is unchanged."; \
+-	    rm Makefile.old; \
+-	else \
+-	    if test "$(MAKECMDGOALS)" = reconfigure; then \
+-		echo 'Continuing with "make reconfigure".'; \
+-	    else \
+-		echo "Makefile updated -- rerun your make command."; \
+-		exit 1; \
+-	    fi \
+-	fi
+-
+ rsync-ssl: $(srcdir)/rsync-ssl.in Makefile
+ 	sed 's;\@bindir\@;$(bindir);g' <$(srcdir)/rsync-ssl.in >rsync-ssl
+ 	@chmod +x rsync-ssl
diff --git a/meta/recipes-devtools/rsync/rsync_3.1.2.bb b/meta/recipes-devtools/rsync/rsync_3.1.2.bb
index 4b91ac7..9637ed4 100644
--- a/meta/recipes-devtools/rsync/rsync_3.1.2.bb
+++ b/meta/recipes-devtools/rsync/rsync_3.1.2.bb
@@ -1,5 +1,7 @@
 require rsync.inc
 
+SRC_URI += "file://makefile-no-rebuild.patch"
+
 SRC_URI[md5sum] = "0f758d7e000c0f7f7d3792610fad70cb"
 SRC_URI[sha256sum] = "ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2"
 
-- 
2.8.0.rc3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-12 14:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12 14:51 [PATCH 1/5] Revert "wic/utils/partitionedfs.py: assemble .wic images as sparse files" Ross Burton
2016-04-12 14:51 ` [PATCH 2/5] Revert "oeqa/selftest/wic: add test case for sparse images" Ross Burton
2016-04-12 14:51 ` [PATCH 3/5] rsync: don't install acinclude.m4 Ross Burton
2016-04-12 14:51 ` [PATCH 4/5] rsync: pass cached configure values through the right variable Ross Burton
2016-04-12 14:51 ` [PATCH 5/5] rsync: remove upstream's rebuild logic Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.