Openembedded Core Discussions
 help / color / mirror / Atom feed
* [Patch] Update dpkg to one available
@ 2012-05-04 11:29 Marko Lindqvist
  2012-05-04 16:06 ` Saul Wold
  0 siblings, 1 reply; 2+ messages in thread
From: Marko Lindqvist @ 2012-05-04 11:29 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

 I'm trying to make my first openembedded-core build. That failed due
to dpkg-1.15.8.5 being not available for download any more.

 Attached patch allowed me to get past that point (updating dpkg
recipe to use latest (1.16.3) dpkg), but as I'm just learning my way
around, this has not been subject to any real testing.

 - Changes equivalent to dpkg-deb-avoid-fflush.patch seem now to be in
upstream (probably this exact patch applied)
 - I just adjusted perllibdir.patch, but I'm not sure if it's needed
at all any more. It was used to remove unconditional PERL_LIBDIR
assignment, but now the assignment is conditional in upstream anyway


 - ML

[-- Attachment #2: dpkg1163.diff --]
[-- Type: application/octet-stream, Size: 8787 bytes --]

diff --git a/meta/recipes-devtools/dpkg/dpkg/check_version.patch b/meta/recipes-devtools/dpkg/dpkg/check_version.patch
index 524e715..41a5bb1 100644
--- a/meta/recipes-devtools/dpkg/dpkg/check_version.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/check_version.patch
@@ -1,23 +1,17 @@
-Adapt to linux-wrs kernel version, which has character '_' inside.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-
-Upstream-Status: Inappropriate [embedded specific]
-
-diff -ruN dpkg-1.15.8.5-orig/lib/dpkg/parsehelp.c dpkg-1.15.8.5/lib/dpkg/parsehelp.c
---- dpkg-1.15.8.5-orig/lib/dpkg/parsehelp.c	2010-10-08 12:27:15.058572774 +0800
-+++ dpkg-1.15.8.5/lib/dpkg/parsehelp.c	2010-10-09 11:18:15.484190771 +0800
-@@ -268,11 +268,11 @@
- 
-   /* XXX: Would be faster to use something like cisversion and cisrevision. */
-   for (ptr = rversion->version; *ptr; ptr++) {
+diff -Nurd dpkg-1.16.3/lib/dpkg/parsehelp.c dpkg-1.16.3/lib/dpkg/parsehelp.c
+--- dpkg-1.16.3/lib/dpkg/parsehelp.c	2012-04-27 05:49:02.000000000 +0300
++++ dpkg-1.16.3/lib/dpkg/parsehelp.c	2012-05-04 13:46:27.000000000 +0300
+@@ -253,11 +253,11 @@
+   if (*ptr && !cisdigit(*ptr++))
+     return dpkg_put_warn(err, _("version number does not start with digit"));
+   for (; *ptr; ptr++) {
 -    if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~:", *ptr) == NULL)
 +    if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~:_", *ptr) == NULL)
-       return _("invalid character in version number");
+       return dpkg_put_warn(err, _("invalid character in version number"));
    }
    for (ptr = rversion->revision; *ptr; ptr++) {
--    if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~", *ptr) == NULL)
-+    if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~_", *ptr) == NULL)
-       return _("invalid character in revision number");
+-    if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".+~", *ptr) == NULL)
++    if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".+~_", *ptr) == NULL)
+       return dpkg_put_warn(err, _("invalid character in revision number"));
    }
  
diff --git a/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch b/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
index 0ff09e7..600abc8 100644
--- a/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch
@@ -1,22 +1,19 @@
-Upstream-Status: Inappropriate [workaround]
-
-diff -ruN dpkg-1.15.8.5-orig/dpkg-deb/build.c dpkg-1.15.8.5/dpkg-deb/build.c
---- dpkg-1.15.8.5-orig/dpkg-deb/build.c	2010-10-08 12:27:15.042083703 +0800
-+++ dpkg-1.15.8.5/dpkg-deb/build.c	2010-10-08 12:31:53.822534277 +0800
-@@ -275,14 +275,14 @@
-               controlfile, checkedinfo->otherpriority);
-       warns++;
-     }
--    for (field= checkedinfo->available.arbs; field; field= field->next) {
-+    /*for (field= checkedinfo->available.arbs; field; field= field->next) {
-       if (known_arbitrary_field(field))
-         continue;
+diff -Nurd dpkg-1.16.3/dpkg-deb/build.c dpkg-1.16.3/dpkg-deb/build.c
+--- dpkg-1.16.3/dpkg-deb/build.c	2012-04-27 05:49:02.000000000 +0300
++++ dpkg-1.16.3/dpkg-deb/build.c	2012-05-04 13:28:39.000000000 +0300
+@@ -340,6 +340,7 @@
+   if (pkg->priority == pri_other)
+     warning(_("'%s' contains user-defined Priority value '%s'"),
+             controlfile, pkg->otherpriority);
++#if 0
+   for (field = pkg->available.arbs; field; field = field->next) {
+     if (known_arbitrary_field(field))
+       continue;
+@@ -347,6 +348,7 @@
+     warning(_("'%s' contains user-defined field '%s'"), controlfile,
+             field->name);
+   }
++#endif
  
-       warning(_("'%s' contains user-defined field '%s'"),
-               controlfile, field->name);
-       warns++;
--    }
-+    }*/
+   free(controlfile);
  
-     if (subdir) {
-       versionstring= versiondescribe(&checkedinfo->available.version,vdew_never);
diff --git a/meta/recipes-devtools/dpkg/dpkg/perllibdir.patch b/meta/recipes-devtools/dpkg/dpkg/perllibdir.patch
index 45973f0..743ef0b 100644
--- a/meta/recipes-devtools/dpkg/dpkg/perllibdir.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/perllibdir.patch
@@ -1,22 +1,16 @@
-We want to be able to set PERL_LIBDIR from the environment. This
-hardcoded assignment prevents us from doing so and obtains an 
-incorrect value.
-
-Upstream-Status: Inappropriate [in this form at least]
-
-RP 14/11/2011
-
-Index: dpkg-1.15.8.7/m4/dpkg-progs.m4
-===================================================================
---- dpkg-1.15.8.7.orig/m4/dpkg-progs.m4	2011-11-14 17:32:21.252053239 +0000
-+++ dpkg-1.15.8.7/m4/dpkg-progs.m4	2011-11-14 17:32:55.180052455 +0000
-@@ -9,9 +9,6 @@
- [AC_ARG_VAR([PERL], [Perl interpreter])dnl
- AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])dnl
+diff -Nurd dpkg-1.16.3/m4/dpkg-progs.m4 dpkg-1.16.3/m4/dpkg-progs.m4
+--- dpkg-1.16.3/m4/dpkg-progs.m4	2012-04-27 05:49:02.000000000 +0300
++++ dpkg-1.16.3/m4/dpkg-progs.m4	2012-05-04 13:51:13.000000000 +0300
+@@ -12,12 +12,6 @@
+   AC_MSG_ERROR([cannot find the Perl interpreter])
+ fi
  AC_ARG_VAR([PERL_LIBDIR], [Perl library directory])dnl
+-# Let the user override the variable.
+-if test -z "$PERL_LIBDIR"; then
 -PERL_LIBDIR=$($PERL -MConfig -e 'my $r = $Config{vendorlibexp};
 -                                 $r =~ s/$Config{vendorprefixexp}/\$(prefix)/;
--                                 print $r')dnl
+-                                 print $r')
+-fi
  ])# DPKG_PROG_PERL
  
  # DPKG_PROG_PO4A
diff --git a/meta/recipes-devtools/dpkg/dpkg/preinst.patch b/meta/recipes-devtools/dpkg/dpkg/preinst.patch
index 06d2aac..6e7ae88 100644
--- a/meta/recipes-devtools/dpkg/dpkg/preinst.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/preinst.patch
@@ -1,46 +1,41 @@
-Our pre/postinsts expect $D to be set when running in a sysroot and
-don't expect a chroot. This matches up our system expectations with
-what dpkg does.
-
-Upstream-Status: Inappropriate [OE Specific]
-
-RP 2011/12/07
-
-Index: dpkg-1.15.8.7/src/help.c
-===================================================================
---- dpkg-1.15.8.7.orig/src/help.c	2010-12-20 01:25:36.000000000 +0000
-+++ dpkg-1.15.8.7/src/help.c	2011-12-07 14:51:02.783461487 +0000
-@@ -181,30 +181,9 @@
-    * FIXME: none of the stuff here will work if admindir isn't inside
-    * instdir as expected.
-    */
--  size_t instdirl;
+diff -Nurd dpkg-1.16.3/src/help.c dpkg-1.16.3/src/help.c
+--- dpkg-1.16.3/src/help.c	2012-04-27 05:49:03.000000000 +0300
++++ dpkg-1.16.3/src/help.c	2012-05-04 13:55:44.000000000 +0300
+@@ -204,35 +204,10 @@
+ static const char *
+ preexecscript(struct command *cmd)
+ {
+-  const char *admindir = dpkg_db_get_dir();
+-  size_t instdirl = strlen(instdir);
+-
+   if (*instdir) {
+-    if (strncmp(admindir, instdir, instdirl) != 0)
+-      ohshit(_("admindir must be inside instdir for dpkg to work properly"));
+-    if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0)
+-      ohshite(_("unable to setenv for subprocesses"));
 -
--  if (*instdir) {
 -    if (chroot(instdir)) ohshite(_("failed to chroot to `%.250s'"),instdir);
 -    if (chdir("/"))
 -      ohshite(_("failed to chdir to `%.255s'"), "/");
 -  }
--  if (f_debug & dbg_scripts) {
+-  if (debug_has_flag(dbg_scripts)) {
 -    struct varbuf args = VARBUF_INIT;
 -    const char **argv = cmd->argv;
 -
 -    while (*++argv) {
--      varbufaddc(&args, ' ');
--      varbufaddstr(&args, *argv);
+-      varbuf_add_char(&args, ' ');
+-      varbuf_add_str(&args, *argv);
 -    }
--    varbufaddc(&args, '\0');
+-    varbuf_end_str(&args);
 -    debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, args.buf);
 -    varbuf_destroy(&args);
--  }
--  instdirl= strlen(instdir);
++    setenv("D", instdir, 1);
+   }
 -  if (!instdirl)
 -    return cmd->filename;
 -  assert(strlen(cmd->filename) >= instdirl);
 -  return cmd->filename + instdirl;
-+  if (*instdir)
-+    setenv("D", instdir, 1);
 +  return cmd->filename;
- }  
+ }
  
  void
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.16.3.bb b/meta/recipes-devtools/dpkg/dpkg_1.16.3.bb
index 1e7ef25..ae37702 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.16.3.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.16.3.bb
@@ -5,11 +5,10 @@ SRC_URI += "file://noman.patch \
             file://check_snprintf.patch \
             file://check_version.patch \
             file://perllibdir.patch \
-            file://preinst.patch \
-            file://dpkg-deb-avoid-fflush.patch"
+            file://preinst.patch"
 
-SRC_URI[md5sum] = "d1731d4147c1ea3b537a4d094519a6dc"
-SRC_URI[sha256sum] = "1ec1376471b04717a4497e5d7a27cd545248c92116898ce0c53ced8ea94267b5"
+SRC_URI[md5sum] = "20189e2926ada3dda4f77ef2e36999af"
+SRC_URI[sha256sum] = "8048890ca92a3ca317a4fdd557f8e9b2b3ce560743e8e70813496f9a7096d8d8"
 
-PR = "${INC_PR}.4"
+PR = "${INC_PR}.1"
 

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

* Re: [Patch] Update dpkg to one available
  2012-05-04 11:29 [Patch] Update dpkg to one available Marko Lindqvist
@ 2012-05-04 16:06 ` Saul Wold
  0 siblings, 0 replies; 2+ messages in thread
From: Saul Wold @ 2012-05-04 16:06 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 05/04/2012 04:29 AM, Marko Lindqvist wrote:
>   I'm trying to make my first openembedded-core build. That failed due
> to dpkg-1.15.8.5 being not available for download any more.
>
This should be still available on our MIRROR.

>   Attached patch allowed me to get past that point (updating dpkg
> recipe to use latest (1.16.3) dpkg), but as I'm just learning my way
> around, this has not been subject to any real testing.
>
>   - Changes equivalent to dpkg-deb-avoid-fflush.patch seem now to be in
> upstream (probably this exact patch applied)
>   - I just adjusted perllibdir.patch, but I'm not sure if it's needed
> at all any more. It was used to remove unconditional PERL_LIBDIR
> assignment, but now the assignment is conditional in upstream anyway
>

Thanks for creating this update, we would like to take this, but if you
could you please re-format this and send a proper patch to the list, 
best to use either the "git format-patch" with "git send-email or the 
scripts create-pull-request/send-pull-request, also review the commit 
message guidelines at

http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

Thanks for the patch!

>
>   - ML
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



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

end of thread, other threads:[~2012-05-04 16:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-04 11:29 [Patch] Update dpkg to one available Marko Lindqvist
2012-05-04 16:06 ` Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox