Fix some build errors on ubuntu 24.04 37/314537/18 devel master
authorxuhy <huayong.xu@samsung.com>
Mon, 24 Jun 2024 02:35:47 +0000 (10:35 +0800)
committerxuhy <huayong.xu@samsung.com>
Mon, 22 Jul 2024 06:03:42 +0000 (14:03 +0800)
sgml2x is not available on ubuntu 24.04.
version is slower than that from ubuntu 24.04 mirrors.

Change-Id: I209cf79a219d016c40e6ec71d80879572bb6ec97
Signed-off-by: xuhy <huayong.xu@samsung.com>
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 6a209ec..eced6a8 100755 (executable)
@@ -1,3 +1,10 @@
+git-buildpackage (0.9.36+tizen20240605) unstable; urgency=medium
+
+  * Upgrade version to override the version from mirrors.
+  * Fix build errors on ubuntu 24.04.
+
+ -- 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 b068b91..23509a5 100755 (executable)
@@ -16,7 +16,6 @@ Build-Depends:
  python3-pkg-resources,
  python3-setuptools,
  python3-dateutil,
- sgml2x,
  librpm-tizen,
 # For rpm (epydoc)
  python3-rpm
index c76b64b..c19db95 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 5283d54..4ab7714 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/bin
+usr/local/bin/gbp-clone /usr/bin
+usr/local/bin/gbp-pull /usr/bin
+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 8c49491..28b07a2 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/bin
+usr/local/lib/python*/dist-packages/gbp/rpm/*.py*
+usr/local/lib/python*/dist-packages/gbp/scripts/*rpm*.py*
index 7a276d7..e43e847 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/bin
+usr/local/bin/git-buildpackage /usr/bin
+usr/local/bin/git-dch /usr/bin
+usr/local/bin/git-import-dsc /usr/bin
+usr/local/bin/git-import-dscs /usr/bin
+usr/local/bin/git-import-orig /usr/bin
+usr/local/bin/git-pbuilder /usr/bin
+usr/local/bin/gbp-create-remote-repo /usr/bin
+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 e5804d0..df15f80 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 0ac72e4..3ca35af 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 cd65701..b2220d1 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 8b65924..ab24f22 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 4d82d28..9d94b82 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 a4e6b79..6395680 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 82e877d..9af2809 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 bd49e94..fd53eb7 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 88ca481..2806e59 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 91c749e..20a58d9 100755 (executable)
@@ -1,3 +1,7 @@
+* Wed Jun 05 2024 Xu Huayong <huayong.xu@samsung.com> tizen/0.9.36-20240605
+- Upgrade version to override the version from mirrors.
+- Fix build errors on ubuntu 24.04.
+
 * 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 4a04715..c8cede6 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 a0a94b9..93ab02c 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@
 # END OF COPYRIGHT #
 
 import subprocess
-from setuptools import setup, find_packages
+from setuptools import setup
 import os
 
 
@@ -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=[