add debian packaging
authorGui Chen <gui.chen@intel.com>
Sun, 12 Oct 2014 23:18:38 +0000 (23:18 +0000)
committerGui Chen <gui.chen@intel.com>
Sun, 12 Oct 2014 23:18:38 +0000 (23:18 +0000)
Signed-off-by: Gui Chen <gui.chen@intel.com>
13 files changed:
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/patches/00list [new file with mode: 0644]
debian/patches/createrepo-0.9.8-cache_utime.patch [new file with mode: 0644]
debian/patches/createrepo-0.9.8-cachefix.patch [new file with mode: 0644]
debian/patches/createrepo-0.9.8-disable-deltarpm-1.patch [new file with mode: 0644]
debian/patches/createrepo-0.9.8-disable-deltarpm-2.patch [new file with mode: 0644]
debian/patches/createrepo-0.9.8-license-to-confirm.patch [new file with mode: 0644]
debian/pyversions [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/watch [new file with mode: 0644]

diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..272ddf3
--- /dev/null
@@ -0,0 +1,18 @@
+Source: createrepo
+Section: admin
+Priority: optional
+Maintainer: Adam Cécile (Le_Vert) <gandalf@le-vert.net>
+Build-Depends: debhelper (>= 5.0.37.2)
+Build-Depends-Indep: python-all-dev (>= 2.3.5-11), python-support (>= 0.5.3)
+Standards-Version: 3.7.3
+Homepage: http://linux.duke.edu/projects/metadata/
+
+Package: createrepo
+Architecture: all
+Depends: ${python:Depends}, python-rpm, rpm (>= 4.1.1), python-libxml2, python-sqlitecachec, deltarpm, yum
+Description: generates the metadata necessary for a RPM package repository
+ This tool will generates all XML metadata required by a RPM (Redhat Package
+ Manager) package repository.
+ .
+ This repository format is supported by apt, red-carpet(zen), smart, up2date, 
+ Yast and yum.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..c0f2322
--- /dev/null
@@ -0,0 +1,54 @@
+This package was debianized by Adam Cécile (Le_Vert) <gandalf@le-vert.net> on
+Mon, 11 Sep 2006 10:14:17 +0200.
+
+It was downloaded from http://linux.duke.edu/projects/metadata/
+
+Upstream Author: Duke University <admim@linux.duke.edu>
+
+Copyright: (C) 2004-2006 Duke University
+          (C) 2006 Red Hat, Inc (modifyrepo.py and readMetadata.py)
+
+
+License:
+
+   This package is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This package is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this package; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+
+The library (dumpMetadata.py, genpkgmetadata.py and readMetadata.py) is
+released under terms of GNU Lesser General Public License:
+
+    This package is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This package is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL'.
+
+
+The Debian packaging is (C) 2006, Adam Cécile (Le_Vert) <gandalf@le-vert.net>
+and is licensed under the GPL, see above.
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..e845566
--- /dev/null
@@ -0,0 +1 @@
+README
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644 (file)
index 0000000..f4bdcaa
--- /dev/null
@@ -0,0 +1,5 @@
+createrepo-0.9.8-cachefix.patch
+createrepo-0.9.8-cache_utime.patch
+createrepo-0.9.8-disable-deltarpm-1.patch
+createrepo-0.9.8-disable-deltarpm-2.patch
+createrepo-0.9.8-license-to-confirm.patch
diff --git a/debian/patches/createrepo-0.9.8-cache_utime.patch b/debian/patches/createrepo-0.9.8-cache_utime.patch
new file mode 100644 (file)
index 0000000..76614a4
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+##
+##
+##
+
+@DPATCH@
+
+--- createrepo/yumbased.py.orig        2010-04-09 10:22:09.000000000 +0200
++++ createrepo/yumbased.py     2010-04-09 10:22:26.000000000 +0200
+@@ -70,7 +70,7 @@
+             csumo = open(csumfile, 'r')
+             checksum = csumo.readline()
+             csumo.close()
+-
++            os.path.os.utime(csumfile, None)
+         else:
+             checksum = misc.checksum(self.checksum_type, self.localpath)
diff --git a/debian/patches/createrepo-0.9.8-cachefix.patch b/debian/patches/createrepo-0.9.8-cachefix.patch
new file mode 100644 (file)
index 0000000..0d9feee
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+##
+##
+##
+
+@DPATCH@
+
+--- createrepo/yumbased.py.orig        2010-04-09 10:22:09.000000000 +0200
++++ createrepo/yumbased.py     2010-04-09 10:28:58.000000000 +0200
+@@ -55,8 +55,8 @@
+             t.append("".join(self.hdr[rpm.RPMTAG_SIGGPG]))
+         if type(self.hdr[rpm.RPMTAG_SIGPGP]) is not types.NoneType:
+             t.append("".join(self.hdr[rpm.RPMTAG_SIGPGP]))
+-        if type(self.hdr[rpm.RPMTAG_HDRID]) is not types.NoneType:
+-            t.append("".join(self.hdr[rpm.RPMTAG_HDRID]))
++        if type(self.hdr[rpm.RPMTAG_SHA1HEADER]) is not types.NoneType:
++            t.append("".join(self.hdr[rpm.RPMTAG_SHA1HEADER]))
+         kcsum = misc.Checksums(checksums=[self.checksum_type])
+         kcsum.update("".join(t))
diff --git a/debian/patches/createrepo-0.9.8-disable-deltarpm-1.patch b/debian/patches/createrepo-0.9.8-disable-deltarpm-1.patch
new file mode 100644 (file)
index 0000000..c43584a
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+##
+##
+##
+
+@DPATCH@
+
+--- createrepo/deltarpms.py.orig       2010-03-31 16:18:27.000000000 +0200
++++ createrepo/deltarpms.py    2010-03-31 16:23:24.000000000 +0200
+@@ -18,7 +18,7 @@
+ import os.path
+ import commands
+ from yum import misc
+-import deltarpm
++# import deltarpm
+ from utils import MDError
+ class DeltaRPMPackage:
+@@ -62,10 +62,11 @@
+         return length
+     def _getDRPMInfo(self, filename):
+-        d = deltarpm.readDeltaRPM(filename)
+-        self.oldnevrstring = d['old_nevr']
+-        self.oldnevr = self._stringToNEVR(d['old_nevr'])
+-        self.sequence = d['seq']
++        # d = deltarpm.readDeltaRPM(filename)
++        # self.oldnevrstring = d['old_nevr']
++        # self.oldnevr = self._stringToNEVR(d['old_nevr'])
++        # self.sequence = d['seq']
++        return
+     def _stringToVersion(self, strng):
+         i = strng.find(':')
diff --git a/debian/patches/createrepo-0.9.8-disable-deltarpm-2.patch b/debian/patches/createrepo-0.9.8-disable-deltarpm-2.patch
new file mode 100644 (file)
index 0000000..0cd9195
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+##
+##
+##
+
+@DPATCH@
+
+--- genpkgmetadata.py.orig     2010-03-31 16:55:03.000000000 +0200
++++ genpkgmetadata.py  2010-03-31 16:55:14.000000000 +0200
+@@ -106,8 +106,8 @@
+         action="append", help="tags to describe the repository itself")
+     parser.add_option("--revision", default=None,
+         help="user-specified revision for this repository")
+-    parser.add_option("--deltas", default=False, action="store_true",
+-        help="create delta rpms and metadata")
++    #parser.add_option("--deltas", default=False, action="store_true",
++    #    help="create delta rpms and metadata")
+     parser.add_option("--oldpackagedirs", default=[], dest="oldpackage_paths",
+         action="append", help="paths to look for older pkgs to delta against")
+     parser.add_option("--num-deltas", default=1, dest='num_deltas', type='int',
diff --git a/debian/patches/createrepo-0.9.8-license-to-confirm.patch b/debian/patches/createrepo-0.9.8-license-to-confirm.patch
new file mode 100644 (file)
index 0000000..0eee035
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+##
+##
+##
+
+@DPATCH@
+
+--- createrepo/__init__.py.orig        2010-04-09 11:09:01.000000000 +0200
++++ createrepo/__init__.py     2010-04-09 11:13:01.000000000 +0200
+@@ -391,6 +392,7 @@
+         fo = _gzipOpen(primaryfilepath, 'w')
+         fo.write('<?xml version="1.0" encoding="UTF-8"?>\n')
+         fo.write('<metadata xmlns="http://linux.duke.edu/metadata/common"' \
++            ' xmlns:suse="http://novell.com/package/metadata/suse/common"' \
+             ' xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="%s">' %
+                        self.pkgcount)
+         return fo
+@@ -806,6 +829,7 @@
+         rpmns = reporoot.newNs("http://linux.duke.edu/metadata/rpm", 'rpm')
+         repopath = os.path.join(self.conf.outputdir, self.conf.tempdir)
+         repofilepath = os.path.join(repopath, self.conf.repomdfile)
++        susens = reporoot.newNs("http://novell.com/package/metadata/suse/common", 'suse')
+         revision = reporoot.newChild(None, 'revision', self.conf.revision)
+         if self.conf.content_tags or self.conf.distro_tags or self.conf.repo_tags:
diff --git a/debian/pyversions b/debian/pyversions
new file mode 100644 (file)
index 0000000..57a7586
--- /dev/null
@@ -0,0 +1 @@
+2.3-
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..684c630
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+build:
+
+clean:
+       dh_testdir
+       dh_testroot
+       $(MAKE) clean
+       dh_clean 
+
+install:
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+       $(MAKE) install DESTDIR=$(CURDIR)/debian/createrepo sysconfdir=/etc
+       rm -rf $(CURDIR)/debian/createrepo/etc
+
+binary-indep: install
+       dh_testdir -i
+       dh_testroot -i
+       dh_installchangelogs -i ChangeLog
+       dh_installdocs -i
+       dh_pysupport -i
+       dh_link -i
+       dh_compress -i
+       dh_fixperms -i
+       dh_installdeb -i
+       dh_gencontrol -i
+       dh_md5sums -i
+       dh_builddeb -i
+
+binary-arch: build install
+
+binary: binary-indep
+
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/watch b/debian/watch
new file mode 100644 (file)
index 0000000..b8574af
--- /dev/null
@@ -0,0 +1,2 @@
+version=3
+http://linux.duke.edu/projects/metadata/generate/createrepo-(.*).tar.gz