Add debian for tools usage accepted/tools/devbase/tools/legacy/20240422.110918 accepted/tools/devbase/tools/legacy/20240423.040750 accepted/tools/devbase/tools/legacy/20240424.050730
authorbiao716.wang <biao716.wang@samsung.com>
Wed, 13 May 2020 08:18:03 +0000 (17:18 +0900)
committerbiao716.wang <biao716.wang@samsung.com>
Thu, 21 May 2020 10:23:40 +0000 (19:23 +0900)
createrepo paakcage will use it
Change-Id: I37d09429cba7467c8637b1bb2750d4bcd5a823d6
Signed-off-by: biao716.wang <biao716.wang@samsung.com>
14 files changed:
debian/README.Debian [new file with mode: 0755]
debian/README.source [new file with mode: 0755]
debian/changelog [new file with mode: 0755]
debian/compat [new file with mode: 0755]
debian/control [new file with mode: 0755]
debian/copyright [new file with mode: 0755]
debian/dirs [new file with mode: 0755]
debian/docs [new file with mode: 0755]
debian/gbp.conf [new file with mode: 0755]
debian/patches/02_Get-correct-rpmdb-path-from-rpm-configuration.patch [new file with mode: 0755]
debian/patches/fixes-AttributeError-module-object-has-no-attribute-uses_fragment.patch [new file with mode: 0755]
debian/patches/series [new file with mode: 0755]
debian/rules [new file with mode: 0755]
debian/yum-doc.docs [new file with mode: 0755]

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100755 (executable)
index 0000000..caa8290
--- /dev/null
@@ -0,0 +1,21 @@
+yum for Debian
+--------------
+Yum requires a working rpm installation. By default the rpm package does not
+create a completely working one lest beginners shoot themselves in the foot.
+
+You should:
+       - mkdir /var/lib/rpm
+       - rpm --initdb
+prior to using yum.
+
+Be aware that the only usage of yum in Debian is to perform chroot (Xen, UML)
+of Fedora, RHEL, CentOS, etc. installs. We, at GPLHost, use a specific
+bootstrap script for doing this with CentOS. Such script is shipped with
+DTC-Xen (also in Debian).
+
+This package was not, is not, and will never be, a replacement for apt-get when
+using Debian or any other .deb based distribution. So please, do NOT ask about
+it, or do not send any bug entry for this, or you'll get flamed for not reading
+the README.Debian as anyone should.
+
+ -- Thomas Goirand <thomas@goirand.fr>  Sat, 26 Dec 2009 13:05:37 +0800
diff --git a/debian/README.source b/debian/README.source
new file mode 100755 (executable)
index 0000000..ef78689
--- /dev/null
@@ -0,0 +1,3 @@
+This package uses the old dpatch system, and not yet Quilt, so it's easy to
+backport to Lenny. Please bare with me. As soon as Squeeze will be out, I'll
+switch to using the more powerful Quilt format for the next Debian release.
diff --git a/debian/changelog b/debian/changelog
new file mode 100755 (executable)
index 0000000..31a956e
--- /dev/null
@@ -0,0 +1,5 @@
+yum (3.4.3-0) experimental; urgency=low
+
+  * Add debian.
+
+ -- Biao Wang <biao716.wang@samsung.com>  Wed, 21 May 2020 15:37:12 +0000
diff --git a/debian/compat b/debian/compat
new file mode 100755 (executable)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100755 (executable)
index 0000000..856b00e
--- /dev/null
@@ -0,0 +1,40 @@
+Source: yum
+Section: admin
+Priority: extra
+Maintainer: Thomas Goirand <zigo@debian.org>
+Uploaders: Mike Miller <mtmiller@ieee.org>
+Build-Depends: debhelper (>= 9), python-all (>= 2.6.6-3~), python, python-dev
+Build-Depends-Indep: intltool
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/yum.git
+Vcs-Git: git://anonscm.debian.org/collab-maint/yum.git
+Standards-Version: 3.9.4
+Homepage: http://yum.baseurl.org/
+
+Package: yum
+Architecture: all
+Depends: python (>= 2.5) | python-celementtree,
+ python-libxml2,
+ python-rpm,
+ python-sqlite,
+ python-sqlitecachec,
+ python-urlgrabber,
+ rpm (>= 4.4.1),
+ ${misc:Depends},
+ ${python:Depends},
+ ${shlibs:Depends}
+Description: Advanced front-end for rpm
+ Yum (Yellow dog Updater, Modified) is an automatic updater and package
+ installer/remover for rpm systems. It automatically computes dependencies
+ and figures out what things should occur to install packages. It makes it
+ easier to maintain groups of machines without having to manually update
+ each one using rpm.
+ .
+ Features include:
+ .
+     * Multiple Repositories
+     * Simple config file
+     * Correct dependency calculation
+     * Fast operation
+     * rpm-consistent behavior
+     * comps.xml group support, including multiple repository groups
+     * Simple interface
diff --git a/debian/copyright b/debian/copyright
new file mode 100755 (executable)
index 0000000..f52507d
--- /dev/null
@@ -0,0 +1,81 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: yum
+Upstream-Contact: yum development <yum-devel@lists.baseurl.org>
+Source: http://yum.baseurl.org/
+
+Files: debian/*
+Copyright: (c) 2008-2009, Thomas Goirand <thomas@goirand.fr>
+       (c) 2005-2006, Anand Kumria <wildfire@progsoc.org>
+License: LGPL-2.1+
+ This library 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.1 of the License, or (at your option)
+ any later version.
+ .
+ This library 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 library; 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
+ (LGPL) v2.1 may be found in /usr/share/common-licenses/LGPL-2.1
+
+Files: *
+Copyright: (c) 2003-2004, Seth Vidal, Duke University <skvidal@fedoraproject.org>
+  (c) 2005-2009, Seth Vidal <skvidal@fedoraproject.org>
+ .
+ YUM aythors, list taken from the upstream AUTHORS file, email addresses taken
+ from the <yum-devel@lists.baseurl.org> mailing list (as there was none in the
+ AUTHORS file) where patches are sent and few names added from there:
+ .
+  Seth Vidal <skvidal@fedoraproject.org> (lead)
+  Jeremy Katz <katzj@fedoraproject.org>
+  Adrian Likins
+  Matthew Miller
+  Michael Stenner
+  Icon Riabitsev
+  Ryan Tomayko
+  Paul Nasrat
+  Robert G. Brown
+  Hollis Blanchard
+  Grigory Bakunov
+  Menno Smits
+  Gijs Hollestelle
+  Terje Rosten
+  Luke Macken
+  James Bowes
+  Tim Lauridsen <tim.lauridsen@googlemail.com>
+  Florian Festi
+  Jack Neely
+  James Antill <james@and.org>
+  Panu Matilainen
+  Tambet Ingo
+  Mike Bonnet <mikeb@redhat.com>
+  Ville-Pekka Vainio <vpivaini@cs.helsinki.fi>
+  Ville Skyttä <ville.skytta@iki.fi>
+ .
+ Original Yup people:
+  Bryan Stillwell
+  Stephen Edie
+  Dan Burcaw
+  Troy Bengegerdes
+License: GPL-2+
+ 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-2
diff --git a/debian/dirs b/debian/dirs
new file mode 100755 (executable)
index 0000000..4511b67
--- /dev/null
@@ -0,0 +1,3 @@
+etc/yum/repos.d
+var/cache/yum
+var/lib/yum
diff --git a/debian/docs b/debian/docs
new file mode 100755 (executable)
index 0000000..8c6c743
--- /dev/null
@@ -0,0 +1,7 @@
+debian/README.source
+debian/README.Debian
+FAQ
+PLUGINS
+README
+TODO
+AUTHORS
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100755 (executable)
index 0000000..0848de8
--- /dev/null
@@ -0,0 +1,6 @@
+[DEFAULT]
+upstream-branch = upstream-sid
+debian-branch = debian-sid
+
+[git-buildpackage]
+export-dir = ../build-area/
diff --git a/debian/patches/02_Get-correct-rpmdb-path-from-rpm-configuration.patch b/debian/patches/02_Get-correct-rpmdb-path-from-rpm-configuration.patch
new file mode 100755 (executable)
index 0000000..1143a0e
--- /dev/null
@@ -0,0 +1,54 @@
+Description: Get correct rpmdb path from rpm configuration
+Author: Mike Miller <mtmiller@ieee.org>
+Forwarded: http://lists.baseurl.org/pipermail/yum-devel/2012-June/009354.html
+
+--- a/yum/rpmsack.py
++++ b/yum/rpmsack.py
+@@ -222,6 +222,11 @@ class RPMDBPackageSack(PackageSackBase):
+             self._persistdir = root +  '/' + persistdir
+         else:
+             self._persistdir = persistdir
++        if hasattr(rpm, 'expandMacro'):
++            dbpath = rpm.expandMacro('%_dbpath')
++        else:
++            dbpath = '/var/lib/rpm'
++        self._rpmdbpath = os.path.normpath(root + '/' + dbpath)
+         self._have_cached_rpmdbv_data = None
+         self._cached_conflicts_data = None
+         # Store the result of what happens, if a transaction completes.
+@@ -325,7 +330,7 @@ class RPMDBPackageSack(PackageSackBase):
+         #  We are keeping some data from before, and sometimes (Eg. remove only)
+         # we never open the rpmdb again ... so get the mtime now.
+-        rpmdbfname  = self.root + "/var/lib/rpm/Packages"
++        rpmdbfname  = self._rpmdbpath + "/Packages"
+         self._cached_rpmdb_mtime = os.path.getmtime(rpmdbfname)
+         def _safe_del(x, y):
+@@ -1049,7 +1054,7 @@ class RPMDBPackageSack(PackageSackBase):
+         # http://lists.rpm.org/pipermail/rpm-maint/2007-November/001719.html
+         # ...if anything gets implemented, we should change.
+         rpmdbvfname = self._cachedir + "/version"
+-        rpmdbfname  = self.root + "/var/lib/rpm/Packages"
++        rpmdbfname  = self._rpmdbpath + "/Packages"
+         if os.path.exists(rpmdbvfname) and os.path.exists(rpmdbfname):
+             # See if rpmdb has "changed" ...
+@@ -1072,7 +1077,7 @@ class RPMDBPackageSack(PackageSackBase):
+         if self._cached_rpmdb_mtime is None:
+             return # We haven't loaded any packages!!!
+-        rpmdbfname  = self.root + "/var/lib/rpm/Packages"
++        rpmdbfname  = self._rpmdbpath + "/Packages"
+         if not os.path.exists(rpmdbfname):
+             return # haha
+@@ -1268,7 +1273,7 @@ class RPMDBPackageSack(PackageSackBase):
+         self._name2pkg.setdefault(po.name, []).append(po)
+         self._tup2pkg[po.pkgtup] = po
+         if self.__cache_rpmdb__ and self._cached_rpmdb_mtime is None:
+-            rpmdbfname  = self.root + "/var/lib/rpm/Packages"
++            rpmdbfname  = self._rpmdbpath + "/Packages"
+             self._cached_rpmdb_mtime = os.path.getmtime(rpmdbfname)
+         return po
diff --git a/debian/patches/fixes-AttributeError-module-object-has-no-attribute-uses_fragment.patch b/debian/patches/fixes-AttributeError-module-object-has-no-attribute-uses_fragment.patch
new file mode 100755 (executable)
index 0000000..a279099
--- /dev/null
@@ -0,0 +1,40 @@
+Description: urlparse: AttributeError: 'module' object has no attribute 'uses_fragment'
+Author: Johannes Graumann <johannes_graumann@web.de>
+Bug-Debian: http://bugs.debian.org/679067
+Forwarded: no
+
+diff --git a/yum/packages.py b/yum/packages.py
+index 5ef9951..3d81745 100644
+--- a/yum/packages.py
++++ b/yum/packages.py
+@@ -39,7 +39,12 @@ from constants import *
+ from operator import itemgetter
+ import urlparse
+-urlparse.uses_fragment.append("media")
++
++try:
++    urlparse.uses_fragment.append("media")
++except AttributeError, err:
++    print err
++
+ from urlgrabber.grabber import URLGrabber, URLGrabError
+ try:
+diff --git a/yum/yumRepo.py b/yum/yumRepo.py
+index e5e9ece..3e6d78a 100644
+--- a/yum/yumRepo.py
++++ b/yum/yumRepo.py
+@@ -19,7 +19,11 @@ import re
+ import time
+ import types
+ import urlparse
+-urlparse.uses_fragment.append("media")
++
++try:
++    urlparse.uses_fragment.append("media")
++except AttributeError, err:
++    print err
+ import Errors
+ from urlgrabber.grabber import URLGrabber
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100755 (executable)
index 0000000..aa7feab
--- /dev/null
@@ -0,0 +1,2 @@
+fixes-AttributeError-module-object-has-no-attribute-uses_fragment.patch
+02_Get-correct-rpmdb-path-from-rpm-configuration.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..d1766df
--- /dev/null
@@ -0,0 +1,84 @@
+#!/usr/bin/make -f
+
+#export DH_VERBOSE=1
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       
+       touch configure-stamp
+
+#Architecture 
+build-arch: build
+build: build-indep
+build-indep: build-indep-stamp
+build-indep-stamp: configure-stamp 
+
+       # Add here commands to compile the indep part of the package.
+       #$(MAKE) doc
+       $(MAKE) 
+       touch build-indep-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-indep-stamp
+
+       # Delete po/yum.pot so it doesn't polute the diff.gz
+       #rm -f po/yum.pot
+
+       # Add here commands to clean up after the build process.
+       [ ! -f Makefile ] || $(MAKE) clean
+
+       dh_clean 
+
+install: install-indep
+install-indep:
+       dh_testdir
+       dh_testroot
+       dh_prep
+       dh_installdirs -i
+
+       $(MAKE) install DESTDIR=$(CURDIR)/debian/yum
+
+       # Remove all traces of yum-cron and yum-updatesd from the package.
+       rm -rf $(CURDIR)/debian/yum/etc/rc.d
+       rm -rf $(CURDIR)/debian/yum/etc/yum/yum-updatesd.conf
+       rm -rf $(CURDIR)/debian/yum/etc/dbus-1
+       rm -rf $(CURDIR)/debian/yum/etc/cron.daily
+       rm -rf $(CURDIR)/debian/yum/etc/sysconfig
+       rm -f $(CURDIR)/debian/yum/usr/sbin/yum-updatesd
+       rm -f $(CURDIR)/debian/yum/usr/share/man/man*/yum-updatesd*
+       rm -f $(CURDIR)/debian/yum/usr/share/yum-cli/yumupd.py*
+       rmdir $(CURDIR)/debian/yum/usr/sbin
+       if [ -d $(CURDIR)/debian/yum/usr/lib/python2.7/site-packages ] ; then \
+               mv $(CURDIR)/debian/yum/usr/lib/python2.7/site-packages $(CURDIR)/debian/yum/usr/lib/python2.7/dist-packages ; \
+       fi
+
+binary-common:
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs ChangeLog
+       dh_installdocs
+       dh_installexamples
+       dh_installman
+       dh_link
+       dh_strip
+       dh_compress 
+       dh_fixperms
+       dh_python2 --skip-private
+       dh_python2 /usr/share/yum-cli
+       dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+# Build architecture independant packages using the common target.
+binary-indep: build-indep install-indep
+       $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+binary: binary-indep
+.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
diff --git a/debian/yum-doc.docs b/debian/yum-doc.docs
new file mode 100755 (executable)
index 0000000..299950c
--- /dev/null
@@ -0,0 +1,2 @@
+#DOCS#
+