Control: tag -1 + patch

On Mon, 11 Mar 2013 17:59:53 -0700, tony mancill wrote:

> > I think I found something -- the .orig.tar.gt contain a .pc directory
> > with debian-changes-3.5.3-1. D'oh.
> Yop, that's a mess - sorry about that.  Trying to prevent the upstream
> source from modifying itself during the build obviously trashed what
> little fu I had to bear on the packaging in the first place.

Don't worry, little mistakes happen :)
 
> So given that we need a new/repacked upstream tarball, what's the right
> way to approach this bug with respect to wheezy?

I guess there's no way around creating a new upstream tarball with
the accidentally included patch unapplied and the .pc and patches
directories removed.

Let's try:

% apt-get source -d service-wrapper-java # or grab the current .orig.tar.gz 
locally
% tar xzf service-wrapper-java_3.5.3.orig.tar.gz
% cd service-wrapper-java-3.5.3

% quilt applied
debian-changes-3.5.3-1
% quilt pop
Patch debian-changes-3.5.3-1 does not remove cleanly (refresh it or enforce 
with -f)
% quilt refresh
Refreshed patch debian-changes-3.5.3-1
% quilt pop    
Removing patch debian-changes-3.5.3-1
Restoring src/c/wrapperinfo.c
Restoring src/java/org/tanukisoftware/wrapper/WrapperInfo.java

No patches applied
% rm -r .pc
% ls patches
debian-changes-3.5.3-1
% rm -r patches

% cd ..
% mv service-wrapper-java-3.5.3 service-wrapper-java-3.5.3+ds
% tar czf service-wrapper-java_3.5.3+ds.orig.tar.gz 
service-wrapper-java-3.5.3+ds

% debcheckout -a --git-track '*' service-wrapper-java # or use your local clone
% cd service-wrapper-java
% git-import-orig ../service-wrapper-java_3.5.3+ds.orig.tar.gz
What is the upstream version? [3.5.3+ds]                              
gbp:info: Importing '../service-wrapper-java_3.5.3+ds.orig.tar.gz' to branch 
'upstream'...
gbp:info: Source package is service-wrapper-java
gbp:info: Upstream version is 3.5.3+ds
pristine-tar: committed service-wrapper-java_3.5.3+ds.orig.tar.gz.delta to 
branch pristine-tar
gbp:info: Merging to 'master'
Removing 
.pc/debian-changes-3.5.3-1/src/java/org/tanukisoftware/wrapper/WrapperInfo.java
Removing .pc/debian-changes-3.5.3-1/src/c/wrapperinfo.c
Removing .pc/applied-patches
Removing .pc/.version
Merge made by the 'recursive' strategy.
gbp:info: Successfully imported version 3.5.3+ds of 
../service-wrapper-java_3.5.3+ds.orig.tar.gz

% git diff debian/3.5.3-4

% [build]
dpkg-source: info: applying 01_disable_buildtime_in_buildfile.patch
dpkg-source: info: applying 02_update_buildtime.patch
patching file src/c/wrapperinfo.c
Hunk #1 FAILED at 30.
1 out of 1 hunk FAILED
patching file src/java/org/tanukisoftware/wrapper/WrapperInfo.java
Hunk #1 FAILED at 56.
1 out of 1 hunk FAILED
dpkg-source: info: fuzz is not allowed when applying patches
dpkg-source: info: if patch '02_update_buildtime.patch' is correctly applied by 
quilt, use 'quilt refresh' to update it
dpkg-source: info: restoring quilt backup files for 02_update_buildtime.patch
dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -g0 -E -b -B 
.pc/02_update_buildtime.patch/ --reject-file=- < 
service-wrapper-java-3.5.3+ds/debian/patches/02_update_buildtime.patch gave 
error exit status 1
dpkg-buildpackage: error: dpkg-source --before-build 
service-wrapper-java-3.5.3+ds gave error exit status 2

Mhm; somehow the problem is that there are _three_ different "times"
in those files. I guess we can either fix the Debian patch here; or
the refresh of the debian-changes-3.5.3-1 patch in the .orig.tar.gz
above was wrong ... But I think it's the first, so:

% quilt push
Applying patch 01_disable_buildtime_in_buildfile.patch
patching file build.xml

Now at patch 01_disable_buildtime_in_buildfile.patch
% quilt push
Applying patch 02_update_buildtime.patch
patching file src/c/wrapperinfo.c
Hunk #1 FAILED at 30.
1 out of 1 hunk FAILED -- rejects in file src/c/wrapperinfo.c
patching file src/java/org/tanukisoftware/wrapper/WrapperInfo.java
Hunk #1 FAILED at 56.
1 out of 1 hunk FAILED -- rejects in file 
src/java/org/tanukisoftware/wrapper/WrapperInfo.java
Patch 02_update_buildtime.patch does not apply (enforce with -f)

% quilt push -f

[fix patched files]

% quilt refresh
Refreshed patch 02_update_buildtime.patch
% quilt pop -a

% [build]

Yeah! Looks better.
Starting with and without applied patches works.

(And it even builds twice in a row. -- Well almost:
  cp: cannot stat './lib/daemon.sh': No such file or directory
  dh_install: cp -a ./lib/daemon.sh debian/service-wrapper/usr/share/wrapper// 
returned exit code 1
  make: *** [binary-arch] Error 2
But that's not related to the patches or recreating files, I guess.)


I'm attaching the output of "git diff" (refreshed path 02_*, minus
the removed debian/service-wrapper-java.debhelper.log) and a debdiff
for the "new" release.

(What's missing is some explanation in d/copyright how and why the
+ds version is created, I suppose. Oh, and a note in d/changelog that
debian/patches/02_update_buildtime.patch was refreshed.)


Cheers,
gregor


-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Josh With: Badly mistreated man
diff -Nru service-wrapper-java-3.5.3/.pc/.version service-wrapper-java-3.5.3+ds/.pc/.version
--- service-wrapper-java-3.5.3/.pc/.version	2010-08-04 19:21:15.000000000 +0200
+++ service-wrapper-java-3.5.3+ds/.pc/.version	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-2
diff -Nru service-wrapper-java-3.5.3/.pc/applied-patches service-wrapper-java-3.5.3+ds/.pc/applied-patches
--- service-wrapper-java-3.5.3/.pc/applied-patches	2010-08-04 20:09:23.000000000 +0200
+++ service-wrapper-java-3.5.3+ds/.pc/applied-patches	1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-debian-changes-3.5.3-1
-debian-changes-3.5.3-1
diff -Nru service-wrapper-java-3.5.3/.pc/debian-changes-3.5.3-1/src/c/wrapperinfo.c service-wrapper-java-3.5.3+ds/.pc/debian-changes-3.5.3-1/src/c/wrapperinfo.c
--- service-wrapper-java-3.5.3/.pc/debian-changes-3.5.3-1/src/c/wrapperinfo.c	2010-08-05 09:27:44.000000000 +0200
+++ service-wrapper-java-3.5.3+ds/.pc/debian-changes-3.5.3-1/src/c/wrapperinfo.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1999, 2010 Tanuki Software, Ltd.
- * http://www.tanukisoftware.com
- * All rights reserved.
- *
- * This software is the proprietary information of Tanuki Software.
- * You shall use it only in accordance with the terms of the
- * license agreement you entered into with Tanuki Software.
- * http://wrapper.tanukisoftware.org/doc/english/licenseOverview.html
- */
-
-
-
-#include "wrapper_i18n.h"
-#ifdef WIN32
-#include <tchar.h>
-#include <windows.h>
-#endif
-/**
- * wrapperinfo.c is built as part of the build process.  Ant creates this
- *  file by making a copy of wrapperinfo.c.in, replacing tokens as it does
- *  so.  If you need to make modifications to this file, the changes should
- *  always be made to wrapperinfo.c.in.
- */
-
-TCHAR *wrapperVersionRoot = TEXT("3.5.3");
-TCHAR *wrapperVersion = TEXT("3.5.3");
-TCHAR *wrapperBits = TEXT("32");
-TCHAR *wrapperArch = TEXT("x86");
-TCHAR *wrapperOS = TEXT("linux");
-TCHAR *wrapperReleaseDate = TEXT("20100803");
-TCHAR *wrapperReleaseTime = TEXT("0000");
-TCHAR *wrapperBuildDate = TEXT("20100804");
-TCHAR *wrapperBuildTime = TEXT("2004");
-
diff -Nru service-wrapper-java-3.5.3/.pc/debian-changes-3.5.3-1/src/java/org/tanukisoftware/wrapper/WrapperInfo.java service-wrapper-java-3.5.3+ds/.pc/debian-changes-3.5.3-1/src/java/org/tanukisoftware/wrapper/WrapperInfo.java
--- service-wrapper-java-3.5.3/.pc/debian-changes-3.5.3-1/src/java/org/tanukisoftware/wrapper/WrapperInfo.java	2010-08-05 09:27:44.000000000 +0200
+++ service-wrapper-java-3.5.3+ds/.pc/debian-changes-3.5.3-1/src/java/org/tanukisoftware/wrapper/WrapperInfo.java	1970-01-01 01:00:00.000000000 +0100
@@ -1,106 +0,0 @@
-package org.tanukisoftware.wrapper;

-

-/*

- * Copyright (c) 1999, 2010 Tanuki Software, Ltd.

- * http://www.tanukisoftware.com

- * All rights reserved.

- *

- * This software is the proprietary information of Tanuki Software.

- * You shall use it only in accordance with the terms of the

- * license agreement you entered into with Tanuki Software.

- * http://wrapper.tanukisoftware.org/doc/english/licenseOverview.html

- * 

- * 

- * Portions of the Software have been derived from source code

- * developed by Silver Egg Technology under the following license:

- * 

- * Copyright (c) 2001 Silver Egg Technology

- * 

- * Permission is hereby granted, free of charge, to any person

- * obtaining a copy of this software and associated documentation

- * files (the "Software"), to deal in the Software without 

- * restriction, including without limitation the rights to use, 

- * copy, modify, merge, publish, distribute, sub-license, and/or 

- * sell copies of the Software, and to permit persons to whom the

- * Software is furnished to do so, subject to the following 

- * conditions:

- * 

- * The above copyright notice and this permission notice shall be

- * included in all copies or substantial portions of the Software.

- */

-

-import java.util.Calendar;

-import java.text.DateFormat;

-import java.text.SimpleDateFormat;

-import java.text.ParseException;

-

-/**

- * WrapperInfo.java is build as part of the build process and should not be

- *  modified.  Any changes to this class should be made to WrapperInfo.java.in

- *

- * @author Leif Mortenson <l...@tanukisoftware.com>

- */

-final class WrapperInfo

-{

-    /** Version of the Wrapper. */

-    private static final String   m_version         = "3.5.3";

-

-    /** Date that the Wrapper was built. */

-    private static final Calendar m_build           = Calendar.getInstance();

-    

-    /** Static initializer to create the build calendar from info hardcoded

-     *   during the build. */

-    static

-    {

-        Calendar buildDate = Calendar.getInstance();

-        Calendar buildTime = Calendar.getInstance();

-        try

-        {

-            buildDate.setTime( new SimpleDateFormat( "yyyyMMdd" ).parse( "20100804" ) );

-            buildTime.setTime( new SimpleDateFormat( "HHmm" ).parse( "2004" ) );

-            

-            m_build.set( buildDate.get( Calendar.YEAR ), 

-                        buildDate.get( Calendar.MONTH ), 

-                        buildDate.get( Calendar.DATE ),

-                        buildTime.get( Calendar.HOUR_OF_DAY ),

-                        buildTime.get( Calendar.MINUTE ) );

-

-        }

-        catch ( ParseException e )

-        {

-            System.out.println( "WrapperInfo: Can not parse build date: " + e.getMessage() );

-        }

-    }

-

-    /**

-     * Returns the version of the Wrapper.

-     *

-     * @return the version of the Wrapper.

-     */

-    static String getVersion()

-    {

-        return m_version;

-    }

-    

-    /**

-     * Returns the time that the Wrapper was built.

-     *

-     * @return The time that the Wrapper was built.

-     */

-    static String getBuildTime()

-    {

-        DateFormat df = new SimpleDateFormat( "HH:mm zz MMM d, yyyy" ); 

-        return df.format( m_build.getTime() );

-    }

-    

-    /*---------------------------------------------------------------

-     * Constructors

-     *-------------------------------------------------------------*/

-    /**

-     * Can not be instantiated.

-     */

-    private WrapperInfo()

-    {

-    }

-}

-

diff -Nru service-wrapper-java-3.5.3/debian/changelog service-wrapper-java-3.5.3+ds/debian/changelog
--- service-wrapper-java-3.5.3/debian/changelog	2012-04-02 02:13:08.000000000 +0200
+++ service-wrapper-java-3.5.3+ds/debian/changelog	2013-03-12 17:32:24.000000000 +0100
@@ -1,3 +1,11 @@
+service-wrapper-java (3.5.3+ds-1) UNRELEASED; urgency=low
+
+  * New "release": Repack .orig.tar.gz:
+    unapply and remove the Debian patch that slipped into the tarball.
+    Closes: #702790
+
+ -- gregor herrmann <gre...@debian.org>  Tue, 12 Mar 2013 17:28:14 +0100
+
 service-wrapper-java (3.5.3-4) unstable; urgency=low
 
   * Fix binary-arch build (Closes: #666309)
diff -Nru service-wrapper-java-3.5.3/debian/patches/02_update_buildtime.patch service-wrapper-java-3.5.3+ds/debian/patches/02_update_buildtime.patch
--- service-wrapper-java-3.5.3/debian/patches/02_update_buildtime.patch	2012-04-02 02:13:08.000000000 +0200
+++ service-wrapper-java-3.5.3+ds/debian/patches/02_update_buildtime.patch	2013-03-12 17:32:24.000000000 +0100
@@ -6,8 +6,8 @@
  TCHAR *wrapperOS = TEXT("linux");
  TCHAR *wrapperReleaseDate = TEXT("20100803");
  TCHAR *wrapperReleaseTime = TEXT("0000");
--TCHAR *wrapperBuildDate = TEXT("20100805");
--TCHAR *wrapperBuildTime = TEXT("0928");
+-TCHAR *wrapperBuildDate = TEXT("20100804");
+-TCHAR *wrapperBuildTime = TEXT("2004");
 +TCHAR *wrapperBuildDate = TEXT("20111002");
 +TCHAR *wrapperBuildTime = TEXT("0000");
  
@@ -19,8 +19,8 @@
          Calendar buildTime = Calendar.getInstance();

          try

          {

--            buildDate.setTime( new SimpleDateFormat( "yyyyMMdd" ).parse( "20100805" ) );

--            buildTime.setTime( new SimpleDateFormat( "HHmm" ).parse( "0928" ) );

+-            buildDate.setTime( new SimpleDateFormat( "yyyyMMdd" ).parse( "20100804" ) );

+-            buildTime.setTime( new SimpleDateFormat( "HHmm" ).parse( "2004" ) );

 +            buildDate.setTime( new SimpleDateFormat( "yyyyMMdd" ).parse( "20111002" ) );

 +            buildTime.setTime( new SimpleDateFormat( "HHmm" ).parse( "0000" ) );

              

diff -Nru service-wrapper-java-3.5.3/src/c/wrapperinfo.c service-wrapper-java-3.5.3+ds/src/c/wrapperinfo.c
--- service-wrapper-java-3.5.3/src/c/wrapperinfo.c	2010-08-05 09:28:11.000000000 +0200
+++ service-wrapper-java-3.5.3+ds/src/c/wrapperinfo.c	2013-03-12 17:26:44.000000000 +0100
@@ -30,6 +30,6 @@
 TCHAR *wrapperOS = TEXT("linux");
 TCHAR *wrapperReleaseDate = TEXT("20100803");
 TCHAR *wrapperReleaseTime = TEXT("0000");
-TCHAR *wrapperBuildDate = TEXT("20100805");
-TCHAR *wrapperBuildTime = TEXT("0928");
+TCHAR *wrapperBuildDate = TEXT("20100804");
+TCHAR *wrapperBuildTime = TEXT("2004");
 
diff -Nru service-wrapper-java-3.5.3/src/java/org/tanukisoftware/wrapper/WrapperInfo.java service-wrapper-java-3.5.3+ds/src/java/org/tanukisoftware/wrapper/WrapperInfo.java
--- service-wrapper-java-3.5.3/src/java/org/tanukisoftware/wrapper/WrapperInfo.java	2010-08-05 09:28:05.000000000 +0200
+++ service-wrapper-java-3.5.3+ds/src/java/org/tanukisoftware/wrapper/WrapperInfo.java	2013-03-12 17:26:44.000000000 +0100
@@ -56,8 +56,8 @@
         Calendar buildTime = Calendar.getInstance();

         try

         {

-            buildDate.setTime( new SimpleDateFormat( "yyyyMMdd" ).parse( "20100805" ) );

-            buildTime.setTime( new SimpleDateFormat( "HHmm" ).parse( "0928" ) );

+            buildDate.setTime( new SimpleDateFormat( "yyyyMMdd" ).parse( "20100804" ) );

+            buildTime.setTime( new SimpleDateFormat( "HHmm" ).parse( "2004" ) );

             

             m_build.set( buildDate.get( Calendar.YEAR ), 

                         buildDate.get( Calendar.MONTH ), 

diff --git a/debian/changelog b/debian/changelog
index 9d62833..65f9af0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+service-wrapper-java (3.5.3+ds-1) UNRELEASED; urgency=low
+
+  * New "release": Repack .orig.tar.gz:
+    unapply and remove the Debian patch that slipped into the tarball.
+    Closes: #702790
+
+ -- gregor herrmann <gre...@debian.org>  Tue, 12 Mar 2013 17:28:14 +0100
+
 service-wrapper-java (3.5.3-4) unstable; urgency=low
 
   * Fix binary-arch build (Closes: #666309)
diff --git a/debian/patches/02_update_buildtime.patch b/debian/patches/02_update_buildtime.patch
index c84440d..bfc879e 100644
--- a/debian/patches/02_update_buildtime.patch
+++ b/debian/patches/02_update_buildtime.patch
@@ -6,8 +6,8 @@ index 2461b00..5732357 100644
  TCHAR *wrapperOS = TEXT("linux");
  TCHAR *wrapperReleaseDate = TEXT("20100803");
  TCHAR *wrapperReleaseTime = TEXT("0000");
--TCHAR *wrapperBuildDate = TEXT("20100805");
--TCHAR *wrapperBuildTime = TEXT("0928");
+-TCHAR *wrapperBuildDate = TEXT("20100804");
+-TCHAR *wrapperBuildTime = TEXT("2004");
 +TCHAR *wrapperBuildDate = TEXT("20111002");
 +TCHAR *wrapperBuildTime = TEXT("0000");
  
@@ -19,8 +19,8 @@ index 17f5ef7..839542a 100644
          Calendar buildTime = Calendar.getInstance();
          try
          {
--            buildDate.setTime( new SimpleDateFormat( "yyyyMMdd" ).parse( "20100805" ) );
--            buildTime.setTime( new SimpleDateFormat( "HHmm" ).parse( "0928" ) );
+-            buildDate.setTime( new SimpleDateFormat( "yyyyMMdd" ).parse( "20100804" ) );
+-            buildTime.setTime( new SimpleDateFormat( "HHmm" ).parse( "2004" ) );
 +            buildDate.setTime( new SimpleDateFormat( "yyyyMMdd" ).parse( "20111002" ) );
 +            buildTime.setTime( new SimpleDateFormat( "HHmm" ).parse( "0000" ) );
              

Attachment: signature.asc
Description: Digital signature

Reply via email to