Fix some build errors on ubuntu 24.04 12/313312/2
authorxuhy <huayong.xu@samsung.com>
Mon, 24 Jun 2024 02:35:47 +0000 (10:35 +0800)
committerxuhy <huayong.xu@samsung.com>
Tue, 16 Jul 2024 03:28:14 +0000 (11:28 +0800)
sgml2x is not available on ubuntu 24.04.
version is slower than that from ubuntu 24.04 mirrors.

Change-Id: I209cf79a219d016c40e6ec71d80879572bb6ec97

18 files changed:
debian/changelog
debian/control
debian/git-buildpackage-bb.install
debian/git-buildpackage-common.install
debian/git-buildpackage-rpm.install
debian/git-buildpackage.install
debian/not-installed
debian/rules
docs/Makefile
gbp/config.py
gbp/git/repository.py
gbp/rpm/__init__.py
gbp/rpm/policy.py
gbp/scripts/common/pq.py
gbp/scripts/import_srpm.py
packaging/git-buildpackage.changes
packaging/git-buildpackage.spec
setup.py

index 6a209ec0834f7b70a147032ed1366c0319ad8077..de0abf237c849e91c23e3629cb004471304ed183 100755 (executable)
@@ -1,3 +1,10 @@
+git-buildpackage (0.9.36) unstable; urgency=medium
+
+  * Upgrade version to override the version from mirrors.
+  * Upgrade version to follow PEP 440.
+
+ -- Xu Huayong <huayong.xu@samsung.com> Tue, 18 Jun 2024 18::02 +0800
+
 git-buildpackage (0.9.28-tizen20231130) unstable; urgency=medium
 
   * Fix git-buildpackage issue to adapt the librpm-tizen 4.14 version.
index b068b917e95f37f3f933ebfda7647ecc7f9b05ff..23509a597db61cc797f2a7cfabc8d96e8d7a64bd 100755 (executable)
@@ -16,7 +16,6 @@ Build-Depends:
  python3-pkg-resources,
  python3-setuptools,
  python3-dateutil,
- sgml2x,
  librpm-tizen,
 # For rpm (epydoc)
  python3-rpm
index c76b64bb9bb9880f98d64dc51f5932caed8267e1..c19db95550ac4a92178bb49b812981bca5391c9c 100644 (file)
@@ -1,2 +1,2 @@
-usr/lib/python*/dist-packages/gbp/bb/
-usr/lib/python*/dist-packages/gbp/scripts/*bb*.py*
+usr/local/lib/python*/dist-packages/gbp/bb/
+usr/local/lib/python*/dist-packages/gbp/scripts/*bb*.py*
index 5283d546992de71882973f9b17c75fb392a8878f..556eb76bc416e8c3873ebe22238e10560b67fc6f 100644 (file)
@@ -1,13 +1,13 @@
-usr/bin/gbp
-usr/bin/gbp-clone
-usr/bin/gbp-pull
-usr/lib/python*/dist-packages/gbp/*.py*
-usr/lib/python*/dist-packages/gbp/scripts/__init__.py*
-usr/lib/python*/dist-packages/gbp/scripts/clone.py*
-usr/lib/python*/dist-packages/gbp/scripts/config.py*
-usr/lib/python*/dist-packages/gbp/scripts/pull.py*
-usr/lib/python*/dist-packages/gbp/scripts/supercommand.py*
-usr/lib/python*/dist-packages/gbp/scripts/common/*.py*
-usr/lib/python*/dist-packages/gbp/git/*.py*
-usr/lib/python*/dist-packages/gbp/pkg/*.py*
+usr/local/bin/gbp
+usr/local/bin/gbp-clone
+usr/local/bin/gbp-pull
+usr/local/lib/python*/dist-packages/gbp/*.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/__init__.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/clone.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/config.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/pull.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/supercommand.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/common/*.py*
+usr/local/lib/python*/dist-packages/gbp/git/*.py*
+usr/local/lib/python*/dist-packages/gbp/pkg/*.py*
 etc/git-buildpackage/gbp.conf
index 8c49491e2a1a18df29116d6f6ffe503ebce2e75d..c0199f9a9447b221029f57fecfab8c66fb8d61ba 100644 (file)
@@ -1,3 +1,3 @@
-usr/bin/*rpm*
-usr/lib/python*/dist-packages/gbp/rpm/*.py*
-usr/lib/python*/dist-packages/gbp/scripts/*rpm*.py*
+usr/local/bin/*rpm*
+usr/local/lib/python*/dist-packages/gbp/rpm/*.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/*rpm*.py*
index 7a276d7ef115763941b5f4b75a481cd0dcc462ff..6fb88542349ae4625fe9e41509cdf3bfcdd0363b 100644 (file)
@@ -1,16 +1,16 @@
-usr/bin/gbp-pq
-usr/bin/git-buildpackage
-usr/bin/git-dch
-usr/bin/git-import-dsc
-usr/bin/git-import-dscs
-usr/bin/git-import-orig
-usr/bin/git-pbuilder
-usr/bin/gbp-create-remote-repo
-usr/lib/python*/dist-packages/gbp/deb/*.py*
-usr/lib/python*/dist-packages/gbp/scripts/pq.py*
-usr/lib/python*/dist-packages/gbp/scripts/buildpackage.py*
-usr/lib/python*/dist-packages/gbp/scripts/dch.py*
-usr/lib/python*/dist-packages/gbp/scripts/import_dsc.py*
-usr/lib/python*/dist-packages/gbp/scripts/import_dscs.py*
-usr/lib/python*/dist-packages/gbp/scripts/import_orig.py*
-usr/lib/python*/dist-packages/gbp/scripts/create_remote_repo.py*
+usr/local/bin/gbp-pq
+usr/local/bin/git-buildpackage
+usr/local/bin/git-dch
+usr/local/bin/git-import-dsc
+usr/local/bin/git-import-dscs
+usr/local/bin/git-import-orig
+usr/local/bin/git-pbuilder
+usr/local/bin/gbp-create-remote-repo
+usr/local/lib/python*/dist-packages/gbp/deb/*.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/pq.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/buildpackage.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/dch.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/import_dsc.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/import_dscs.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/import_orig*.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/create_remote_repo.py*
index e5804d047529b1a3a0f8b4b0efee59a481c3f064..df15f808618912d7fc6c04afac3268a6c23f3781 100644 (file)
@@ -1,7 +1,7 @@
-debian/tmp/usr/lib/python3.*/dist-packages/gbp/deb/__pycache__
-debian/tmp/usr/lib/python3.*/dist-packages/gbp/git/__pycache__
-debian/tmp/usr/lib/python3.*/dist-packages/gbp/pkg/__pycache__
-debian/tmp/usr/lib/python3.*/dist-packages/gbp/__pycache__
-debian/tmp/usr/lib/python3.*/dist-packages/gbp/rpm/__pycache__
-debian/tmp/usr/lib/python3.*/dist-packages/gbp/scripts/common/__pycache__
-debian/tmp/usr/lib/python3.*/dist-packages/gbp/scripts/__pycache__
+debian/tmp/usr/local/lib/python3.*/dist-packages/gbp/deb/__pycache__
+debian/tmp/usr/local/lib/python3.*/dist-packages/gbp/git/__pycache__
+debian/tmp/usr/local/lib/python3.*/dist-packages/gbp/pkg/__pycache__
+debian/tmp/usr/local/lib/python3.*/dist-packages/gbp/__pycache__
+debian/tmp/usr/local/lib/python3.*/dist-packages/gbp/rpm/__pycache__
+debian/tmp/usr/local/lib/python3.*/dist-packages/gbp/scripts/common/__pycache__
+debian/tmp/usr/local/lib/python3.*/dist-packages/gbp/scripts/__pycache__
index 0ac72e4871ee3386cf6de275fb7aec7f654da280..3ca35afe301f176d86d9142d65cf15cc9749f60c 100755 (executable)
@@ -39,7 +39,7 @@ override_dh_auto_build:
        make -C docs
 
 override_dh_auto_install:
-       dh_auto_install
+       python3 setup.py install --root=debian/tmp --prefix=/usr/local
        dh_bash-completion
        mkdir -p debian/git-buildpackage/$(ZSH_COMPDIR)
        install -m644 debian/git-buildpackage.zsh-completion \
@@ -59,3 +59,5 @@ override_dh_auto_clean:
 override_dh_compress:
        dh_compress --exclude=usr/share/doc/git-buildpackage/examples/
 
+override_dh_usrlocal:
+
index cd6570175e9215ac4d31c99aaf22b918bf8da254..b2220d1353a8756d71576db1ae74da3d2bcc919c 100644 (file)
@@ -31,7 +31,7 @@ DEB_VERSION=$(shell sed -ne 's/^gbp_version="\([.a-z0-9~-]\+\)"/\1/p' $(GBP_VERS
 CHANGELOG=../debian/changelog
 
 # Stuff to build docs outside Debian
-HAVE_SGML2X ?= 1
+HAVE_SGML2X ?= 0
 GTK_DOC_CATALOG_FILE ?= /usr/share/sgml/gtk-doc/gtk-doc.cat
 
 all: $(MANUAL) $(MANPAGES)
index 8b6592400cf1240f0c22c184551880f089e2c82b..ab24f222f727223f50ba00869054b671fd8e9ad3 100644 (file)
@@ -17,7 +17,7 @@
 """handles command line and config file option parsing for the gbp commands"""
 
 from optparse import OptionParser, OptionGroup, Option, OptionValueError
-from configparser import SafeConfigParser, NoSectionError
+from configparser import ConfigParser, NoSectionError
 from copy import copy
 import os.path
 import tempfile
@@ -393,7 +393,7 @@ class GbpOptionParser(OptionParser):
         Parse the possible config files and set appropriate values
         default values
         """
-        parser = SafeConfigParser()
+        parser = ConfigParser()
         # Fill in the built in values
         self.config = dict(self.__class__.defaults)
         # Update with the values from the defaults section. This is needed
index 4d82d28ace6d8ab170ac5c77a993c10a7315238d..9d94b822805a507d8212788351af9560a9b65a15 100644 (file)
@@ -1197,10 +1197,10 @@ class GitRepository(object):
             fetch_url = None
             push_urls = []
             for line in out.decode().splitlines():
-                match = re.match('\s*Fetch\s+URL:\s*(\S.*)', line)
+                match = re.match(r'\s*Fetch\s+URL:\s*(\S.*)', line)
                 if match:
                     fetch_url = match.group(1)
-                match = re.match('\s*Push\s+URL:\s*(\S.*)', line)
+                match = re.match(r'\s*Push\s+URL:\s*(\S.*)', line)
                 if match:
                     push_urls.append(match.group(1))
             remotes[remote] = GitRemote(remote, fetch_url, push_urls)
index a4e6b791e3039064563f4e6fb1dcc0d66a82a82f..6395680493bb0534561520533af79b12bdad4e42 100644 (file)
@@ -111,11 +111,11 @@ class SrcRpmFile(object):
 class SpecFile(object):
     """Class for parsing/modifying spec files"""
     tag_re = re.compile(r'^(?P<name>[a-z]+)(?P<num>[0-9]+)?\s*:\s*'
-                         '(?P<value>\S(.*\S)?)\s*$', flags=re.I)
+                         r'(?P<value>\S(.*\S)?)\s*$', flags=re.I)
     directive_re = re.compile(r'^%(?P<name>[a-z]+)(?P<num>[0-9]+)?'
-                               '(\s+(?P<args>.*))?$', flags=re.I)
+                               r'(\s+(?P<args>.*))?$', flags=re.I)
     gbptag_re = re.compile(r'^\s*#\s*gbp-(?P<name>[a-z-]+)'
-                            '(\s*:\s*(?P<args>\S.*))?$', flags=re.I)
+                            r'(\s*:\s*(?P<args>\S.*))?$', flags=re.I)
     # Here "sections" stand for all scripts, scriptlets and other directives,
     # but not macros
     section_identifiers = ('package', 'description', 'prep', 'build', 'install',
@@ -622,7 +622,7 @@ class SpecFile(object):
             if not tag['num'] in ignored:
                 tag_prev = self._delete_tag('patch', tag['num'])
                 # Remove a preceding comment if it seems to originate from GBP
-                if re.match("^\s*#.*patch.*auto-generated",
+                if re.match(r"^\s*#.*patch.*auto-generated",
                             str(tag_prev), flags=re.I):
                     tag_prev = self._content.delete(tag_prev)
 
@@ -639,7 +639,7 @@ class SpecFile(object):
 
                 # Remove a preceding comment line if it ends with '.patch' or
                 # '.diff' plus an optional compression suffix
-                if re.match("^\s*#.+(patch|diff)(\.(gz|bz2|xz|lzma))?\s*$",
+                if re.match(r"^\s*#.+(patch|diff)(\.(gz|bz2|xz|lzma))?\s*$",
                             str(macro_prev), flags=re.I):
                     macro_prev = self._content.delete(macro_prev)
 
index 82e877dacbb9ad1a312110b776160b2fa350a188..9af2809519d1fa18450949208024d7ce359cb57f 100644 (file)
@@ -29,7 +29,7 @@ class RpmPkgPolicy(PkgPolicy):
 
     alnum = 'a-zA-Z0-9'
     # Valid characters for RPM pkg name
-    name_whitelist_chars = '._+%{}\-'
+    name_whitelist_chars = r'._+%{}\-'
     # Valid characters for RPM pkg version
     version_whitelist_chars = '._+%{}~'
 
index bd49e94dca21dcfa05194142d432f4d02375834a..fd53eb79847eccdc88725afd0827f60be6afd5b2 100644 (file)
@@ -50,7 +50,7 @@ def pq_branch_match(branch, pq_fmt_str):
     >>> pq_branch_match('foo/bar/1.0/pq', 'foo/%(br)s/%(ver)s/pq').groupdict()
     {'ver': '1.0', 'br': 'bar'}
     """
-    pq_re = '^%s$' % re.sub('%\(([a-z_\-]+)\)s', r'(?P<\1>\\S+)', pq_fmt_str)
+    pq_re = '^%s$' % re.sub(r'%\(([a-z_\-]+)\)s', r'(?P<\1>\\S+)', pq_fmt_str)
     return  re.match(pq_re, branch)
 
 
@@ -207,7 +207,7 @@ def write_patch_file(filename, commit_info, diff):
             name = commit_info['author']['name']
             email = commit_info['author']['email']
             # Git compat: put name in quotes if special characters found
-            if re.search("[,.@()\[\]\\\:;]", name):
+            if re.search(r"[,.@()\[\]\\\:;]", name):
                 name = '"%s"' % name
             from_header = Header(header_name='from')
             try:
index 88ca48194651c032d4e95de5bae6926037bf3a43..2806e59e6a7823ccea77f30aa9d9b4adbcc8763d 100755 (executable)
@@ -382,7 +382,7 @@ def main(argv):
         # for both upstream sources and packaging files
         author = None
         if spec.packager:
-            match = re.match('(?P<name>.*[^ ])\s*<(?P<email>\S*)>',
+            match = re.match(r'(?P<name>.*[^ ])\s*<(?P<email>\S*)>',
                              spec.packager.strip())
             if match:
                 author = GitModifier(match.group('name'), match.group('email'))
index 91c749e9380c231c88c3bad564a81be2bf001970..5d31c9e473ea0d1867f016dc64c38803cdcf83af 100755 (executable)
@@ -1,3 +1,7 @@
+* Wed Jun 05 2024 Xu Huayong <huayong.xu@samsung.com> tizen/0.9.36
+- Upgrade version to override the version from mirrors.
+- Upgrade version to follow PEP 440.
+
 * Thu Nov 30 2023 Xu Huayong <huayong.xu@samsung.com> tizen/0.9.28-20231130
 - Fix git-buildpackage issue to adapt the librpm-tizen 4.14 version
 
index 4a04715d0b6dc1ae6e004cbfc8e1b64007c4b65c..c8cede67405d971c95b67fe11382a5cdd6b5f07c 100755 (executable)
@@ -5,7 +5,7 @@
 
 Name:       git-buildpackage
 Summary:    Build packages from git
-Version:    0.9.28
+Version:    0.9.36
 Release:    0
 Group:      Development/Tools/Building
 License:    GPLv2
@@ -115,7 +115,7 @@ Recommends: rpm-build
 %else
 Requires:   rpm-build
 %endif
-Provides:   tizen-gbp-rpm = 20231130
+Provides:   tizen-gbp-rpm = 20240605
 
 %description rpm
 Set of tools from Debian that integrate the package build system with Git.
index a0a94b925be5b6a669fe7b9617f6da7e937c6b23..7dc44d880d07424f578217956608174fa99f779c 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -76,7 +76,8 @@ setup(name = "gbp",
                   'bin/git-buildpackage-rpm',
                   'bin/git-import-orig-rpm',
                   'bin/git-rpm-ch'],
-      packages = find_packages(exclude=['tests', 'tests.*']),
+      packages = ['gbp', 'gbp.bb', 'gbp.rpm', 'gbp.scripts', 'gbp.scripts.common',
+                  'gbp.git', 'gbp.deb', 'gbp.pkg'],
       data_files = [("/etc/git-buildpackage/", ["gbp.conf"]),],
       requires=['dateutil'],
       install_requires=[