[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Permission to upload debomatic 0.5-2



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I would like to upload to unstable revision 0.5-2 of debomatic. It adds
two patches backported from trunk which fix a couple of issues not
addressed in time for 0.5 release.

The first one removes .orig.tar.gz file fetched from archives, sometimes
it happens it doesn't get deleted correctly, this fix solves this.
The second one fixes a race condition. If a package is accepted and its
signature dropped (by design), and if it's waiting for a lock, when it
receives a regular scheduled scan, files are deleted because no valid
signature is found in .changes file. Adding acceptedqueue fixes this.

The second patch is serious because program gives an unwanted behaviour
and makes it unusable when race condition is triggered.

I attach a full debdiff of changes I would like to introduce to better
analyze changes and regression potential.

Regards,

- --
 . ''`.      Luca Falavigna
 : :'  :  Ubuntu MOTU Developer
 `. `'`     Debian Maintainer
   `-      GPG Key: 0x86BC2A50
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjSqpgACgkQnXjXEYa8KlDioACff0E3vDa59sGYEAR6gLNmn038
65QAnRkRQmb3uT38x0r/BkczQUJ2S9s2
=3olH
-----END PGP SIGNATURE-----
diff -u debomatic-0.5/debian/control debomatic-0.5/debian/control
--- debomatic-0.5/debian/control
+++ debomatic-0.5/debian/control
@@ -2,7 +2,7 @@
 Section: devel
 Priority: extra
 Maintainer: Luca Falavigna <dktrkranz@ubuntu.com>
-Build-Depends: debhelper (>= 6)
+Build-Depends: debhelper (>= 6), quilt
 Build-Depends-Indep: python-central (>= 0.5.6), python-all-dev, docbook2x, docbook-xml
 XS-Python-Version: all
 Standards-Version: 3.8.0
diff -u debomatic-0.5/debian/changelog debomatic-0.5/debian/changelog
--- debomatic-0.5/debian/changelog
+++ debomatic-0.5/debian/changelog
@@ -1,3 +1,14 @@
+debomatic (0.5-2) unstable; urgency=low
+
+  * debian/patches/packagequeue_files:
+    - Add files to packagequeue even if they are already available, so
+      they can be removed when packages have been successfully built.
+  * debian/patches/acceptedqueue:
+    - Add acceptedqueue to allow packages waiting for a lock to be built
+      if previously accepted.
+
+ -- Luca Falavigna <dktrkranz@ubuntu.com>  Thu, 18 Sep 2008 13:48:45 +0200
+
 debomatic (0.5-1) unstable; urgency=low
 
   * Initial release (Closes: #426231)
diff -u debomatic-0.5/debian/rules debomatic-0.5/debian/rules
--- debomatic-0.5/debian/rules
+++ debomatic-0.5/debian/rules
@@ -1,12 +1,14 @@
 #!/usr/bin/make -f
 
-build: build-stamp
+include /usr/share/quilt/quilt.make
+
+build: patch build-stamp
 build-stamp:
 	dh_testdir
 	touch $@
 	$(MAKE) BUILD_BASE=$(CURDIR)/debian/debomatic/build
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp
only in patch2:
unchanged:
--- debomatic-0.5.orig/debian/patches/packagequeue_files
+++ debomatic-0.5/debian/patches/packagequeue_files
@@ -0,0 +1,14 @@
+Index: debomatic-0.5/Debomatic/packages.py
+===================================================================
+--- debomatic-0.5.orig/Debomatic/packages.py	2008-09-18 00:20:19.595677708 +0200
++++ debomatic-0.5/Debomatic/packages.py	2008-09-18 00:20:41.824943654 +0200
+@@ -93,7 +93,7 @@
+                 entryfd = os.open(os.path.join(packagedir, entry), os.O_WRONLY | os.O_CREAT)
+                 os.write(entryfd, data)
+                 os.close(entryfd)
+-                if not (os.path.join(packagedir, entry)) in files:
+-                    globals.packagequeue[package].append(os.path.join(packagedir, entry))
++        if not (os.path.join(packagedir, entry)) in files:
++            globals.packagequeue[package].append(os.path.join(packagedir, entry))
+     os.close(fd)
+ 
only in patch2:
unchanged:
--- debomatic-0.5.orig/debian/patches/acceptedqueue
+++ debomatic-0.5/debian/patches/acceptedqueue
@@ -0,0 +1,56 @@
+Index: debomatic-0.5/Debomatic/globals.py
+===================================================================
+--- debomatic-0.5.orig/Debomatic/globals.py	2008-09-18 13:43:40.552021076 +0200
++++ debomatic-0.5/Debomatic/globals.py	2008-09-18 13:44:24.222516441 +0200
+@@ -25,5 +25,6 @@
+ 
+ Options = ConfigParser()
+ sema = Semaphores()
++acceptedqueue = list()
+ packagequeue = dict()
+ 
+Index: debomatic-0.5/Debomatic/gpg.py
+===================================================================
+--- debomatic-0.5.orig/Debomatic/gpg.py	2008-09-18 13:43:40.168000030 +0200
++++ debomatic-0.5/Debomatic/gpg.py	2008-09-18 13:45:00.044551135 +0200
+@@ -26,14 +26,15 @@
+     if globals.Options.getint('gpg', 'gpg'):
+         if not globals.Options.has_option('gpg', 'keyring') or not os.path.exists(globals.Options.get('gpg', 'keyring')):
+             return False
+-        gpgresult = Popen(['gpg', '--primary-keyring', globals.Options.get('gpg', 'keyring'), '--verify', package], stderr=PIPE).communicate()[1]
+-        ID = findall('Good signature from "(.*) <(.*)>"', gpgresult)
+-        if not len(ID):
+-            return False
+-        fd = os.open(package, os.O_RDONLY)
+-        data = os.read(fd, os.fstat(fd).st_size)
+-        os.close(fd)
+-        fd = os.open(package, os.O_WRONLY | os.O_TRUNC)
+-        os.write(fd, findall('Hash: \S+\n\n(.*)\n\n\-\-\-\-\-BEGIN PGP SIGNATURE\-\-\-\-\-', data, DOTALL)[0])
+-        os.close(fd)
++        if not package in globals.acceptedqueue:
++            gpgresult = Popen(['gpg', '--primary-keyring', globals.Options.get('gpg', 'keyring'), '--verify', package], stderr=PIPE).communicate()[1]
++            ID = findall('Good signature from "(.*) <(.*)>"', gpgresult)
++            if not len(ID):
++                return False
++            fd = os.open(package, os.O_RDONLY)
++            data = os.read(fd, os.fstat(fd).st_size)
++            os.close(fd)
++            fd = os.open(package, os.O_WRONLY | os.O_TRUNC)
++            os.write(fd, findall('Hash: \S+\n\n(.*)\n\n\-\-\-\-\-BEGIN PGP SIGNATURE\-\-\-\-\-', data, DOTALL)[0])
++            os.close(fd)
+ 
+Index: debomatic-0.5/Debomatic/packages.py
+===================================================================
+--- debomatic-0.5.orig/Debomatic/packages.py	2008-09-18 13:43:40.352009678 +0200
++++ debomatic-0.5/Debomatic/packages.py	2008-09-18 13:45:33.170440563 +0200
+@@ -72,6 +72,10 @@
+         if os.path.exists(pkgfile):
+             os.remove(pkgfile)
+     del_package(package)
++    try:
++        globals.acceptedqueue.remove(package)
++    except:
++        pass
+ 
+ def fetch_missing_files(package, files, packagedir, distopts):
+     dscfile = None
only in patch2:
unchanged:
--- debomatic-0.5.orig/debian/patches/series
+++ debomatic-0.5/debian/patches/series
@@ -0,0 +1,2 @@
+packagequeue_files
+acceptedqueue

Reply to: