From 084321dd972d555b3ec034cd109b2341302eaeac Mon Sep 17 00:00:00 2001 From: stepan_oksanichenko Date: Tue, 15 Jun 2021 16:16:10 +0300 Subject: [PATCH] LNX-326: Add the ability to include any package by mask in packages.json to the generator - The ability is added - Also the generator includes only the latest by version packages to packages.json - The generator has key `--is-reference` for an each repo. This key marks a repo as reference. An reference repo is used as main source of packages. A not reference repo is used as source of packages which don't exist in the reference repos. - All cases are covered by the unittest @BS-NOBUILD @BS-TARGET-CL8 Change-Id: I2f80ba4fbfce27fb9a30500ae46c0b8a2f2aabcd --- pungi/scripts/create_extra_repo.py | 2 +- pungi/scripts/create_packages_json.py | 53 ++- .../test_repo/repodata/primary.xml | 332 ++++++++++++++++++ .../test_repo/repodata/primary.xml.gz | Bin 3094 -> 0 bytes .../test_repo/repodata/repomd.xml | 2 +- .../test_repo_2/repodata/filelists.xml.gz | Bin 0 -> 3970 bytes .../test_repo_2/repodata/other.xml.gz | Bin 0 -> 2191 bytes .../test_repo_2/repodata/primary.xml | 332 ++++++++++++++++++ .../test_repo_2/repodata/repomd.xml | 28 ++ tests/test_create_packages_json.py | 7 + 10 files changed, 744 insertions(+), 12 deletions(-) create mode 100644 tests/data/test_create_packages_json/test_repo/repodata/primary.xml delete mode 100755 tests/data/test_create_packages_json/test_repo/repodata/primary.xml.gz create mode 100755 tests/data/test_create_packages_json/test_repo_2/repodata/filelists.xml.gz create mode 100755 tests/data/test_create_packages_json/test_repo_2/repodata/other.xml.gz create mode 100644 tests/data/test_create_packages_json/test_repo_2/repodata/primary.xml create mode 100644 tests/data/test_create_packages_json/test_repo_2/repodata/repomd.xml diff --git a/pungi/scripts/create_extra_repo.py b/pungi/scripts/create_extra_repo.py index fd5898ae..6cf9c186 100644 --- a/pungi/scripts/create_extra_repo.py +++ b/pungi/scripts/create_extra_repo.py @@ -33,7 +33,7 @@ class CreateExtraRepo(PackagesGenerator): clear_target_repo: bool = True, ): self.repos = [] # type: List[ExtraRepoInfo] - super().__init__(repos, []) + super().__init__(repos, [], []) self.auth_headers = { 'Authorization': f'Bearer {bs_auth_token}', } diff --git a/pungi/scripts/create_packages_json.py b/pungi/scripts/create_packages_json.py index 2a875640..72996c03 100644 --- a/pungi/scripts/create_packages_json.py +++ b/pungi/scripts/create_packages_json.py @@ -40,6 +40,11 @@ class RepoInfo: arch: AnyStr # Is a repo remote or local is_remote: bool + # Is an reference repository (usually it's a RHEL repo) + # Layout of packages from such repository will be taken as example + # Only layout of specific package (which don't exist + # in an reference repository) will be taken as example + is_reference: bool = False class PackagesGenerator: @@ -47,9 +52,11 @@ class PackagesGenerator: self, repos: List[RepoInfo], excluded_packages: List[AnyStr], + included_packages: List[AnyStr], ): self.repos = repos self.excluded_packages = excluded_packages + self.included_packages = included_packages @staticmethod def _warning_callback(warning_type, message): @@ -277,12 +284,19 @@ class PackagesGenerator: ) for package in packages.values(): package_key = f'{package.name}.{package.arch}' - if 'module' in package.release: + if 'module' in package.release and not any( + re.search(included_package, package.name) + for included_package in self.included_packages + ): + # Even a module package will be added to packages.json if + # it presents in the list of included packages continue if package_key not in all_packages: all_packages[package_key]['variant'] = repo_info.name all_packages[package_key]['arch'] = repo_info.arch all_packages[package_key]['package'] = package + elif not repo_info.is_reference: + continue elif self.compare_pkgs_version( package, all_packages[package_key]['package'] @@ -297,8 +311,6 @@ class PackagesGenerator: package = package_dict['package'] package_name = package.name package_arch = package.arch - if 'module' in package.release: - continue if any(re.search(excluded_package, package_name) for excluded_package in self.excluded_packages): continue @@ -358,6 +370,14 @@ def create_parser(): choices=['yes', 'no'], required=True, ) + parser.add_argument( + '--is-reference', + action='append', + type=str, + help='A repository is used as reference for packages layout', + choices=['yes', 'no'], + required=True, + ) parser.add_argument( '--excluded-packages', nargs='+', @@ -367,6 +387,15 @@ def create_parser(): 'All of list elements should be separated by space', required=False, ) + parser.add_argument( + '--included-packages', + nargs='+', + type=str, + default=[], + help='A list of globally included packages from generated json.' + 'All of list elements should be separated by space', + required=False, + ) parser.add_argument( '--json-output-path', type=str, @@ -380,23 +409,27 @@ def create_parser(): def cli_main(): args = create_parser().parse_args() repos = [] - for repo_path, repo_folder, repo_name, repo_arch, is_remote in zip( - args.repo_path, - args.repo_folder, - args.repo_name, - args.repo_arch, - args.is_remote, - ): + for repo_path, repo_folder, repo_name, \ + repo_arch, is_remote, is_reference in zip( + args.repo_path, + args.repo_folder, + args.repo_name, + args.repo_arch, + args.is_remote, + args.is_reference, + ): repos.append(RepoInfo( path=repo_path, folder=repo_folder, name=repo_name, arch=repo_arch, is_remote=True if is_remote == 'yes' else False, + is_reference=True if is_reference == 'yes' else False )) pg = PackagesGenerator( repos=repos, excluded_packages=args.excluded_packages, + included_packages=args.included_packages, ) result = pg.generate_packages_json() with open(args.json_output_path, 'w') as packages_file: diff --git a/tests/data/test_create_packages_json/test_repo/repodata/primary.xml b/tests/data/test_create_packages_json/test_repo/repodata/primary.xml new file mode 100644 index 00000000..f95638eb --- /dev/null +++ b/tests/data/test_create_packages_json/test_repo/repodata/primary.xml @@ -0,0 +1,332 @@ + + + + 389-ds-base + x86_64 + + 12505e39ee5a8ce6e954a3cabd4a92165711b4961bfc74a50c938250eeb56356 + 389 Directory Server (base) + 389 Directory Server is an LDAPv3 compliant server. The base package includes +the LDAP server and command line utilities for server administration. + Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> + https://www.port389.org + + + zziplib-utils + x86_64 + + 26d838b257f0890c3abf408bc200ebcf53ff1e40f16654cad9b1cb4c059f0d42 + Utilities for the zziplib library + The zziplib library is intentionally lightweight, it offers the ability to +easily extract data from files archived in a single zip file. Applications +can bundle files into a single zip archive and access them. The implementation +is based only on the (free) subset of compression with the zlib algorithm +which is actually used by the zip/unzip tools. + +This packages contains all the utilities that come with the zziplib library. + Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> + http://zziplib.sourceforge.net/ + + + zziplib + i686 + + 207d3ba8e031d11bd13923e6027e17e5db12d76e915a28e9cd1589ef796a6e6b + Lightweight library to easily extract data from zip files + The zziplib library is intentionally lightweight, it offers the ability to +easily extract data from files archived in a single zip file. Applications +can bundle files into a single zip archive and access them. The implementation +is based only on the (free) subset of compression with the zlib algorithm +which is actually used by the zip/unzip tools. + Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> + http://zziplib.sourceforge.net/ + + + zziplib + x86_64 + + 30cee6c1adcaee7b24c1079072299ee55a9c3bbdcb91697544242c7567d18621 + Lightweight library to easily extract data from zip files + The zziplib library is intentionally lightweight, it offers the ability to +easily extract data from files archived in a single zip file. Applications +can bundle files into a single zip archive and access them. The implementation +is based only on the (free) subset of compression with the zlib algorithm +which is actually used by the zip/unzip tools. + Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> + http://zziplib.sourceforge.net/ + + diff --git a/tests/data/test_create_packages_json/test_repo/repodata/primary.xml.gz b/tests/data/test_create_packages_json/test_repo/repodata/primary.xml.gz deleted file mode 100755 index eb2f101e2ebc6674e2b0eeb441c57e756d161087..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3094 zcmV+x4C(V9iwFP!000001MOVfa@)2RefL*z^w4p}<^3YkwSC5Q+%z*zn^QY8>5~Tp zAPL936#ymMUw<}8N|tPi7sYk^ke5gz*TQ9EV`Bl>&dGo7(?pw7E?AzOj%>pkX*9z* zVcGO_^yTIkJskb#?BFD&5)mYk2JlRrj%HF8$EKOEth_f!c}ERON^^-aah|4mHmcFb zyhuA4fEj58!gpv&p?uqSop1ydH;**=P|(wnLY*CG+DV2|dgg|aPJ|vKK~K!;iF$=N zo}Jx?!ENB3nAH#UwCSQoiyY5RN6<}pqB`sumf^rpP80ZP8EH<+gdWi(gcsJ4Yem74 zZP}sY6Mtk@W#JjcccM(2Mu{16`~X^iH)Z5>^ylUE=*)I}%cpKcsgFWT0~+}raxsdD zha$%g{IPAvUKH5z1dl!BTR3u|3X9U%4_rSuF_)E8HNt0#_=D=P_MUNyWzHY8Ys#S$ z+MzPQyAyK>QUpQ;=B$v=yQ&WvBv6o}4MB0P13~Fp8W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rOV#9TRZWp^kDU$G8+YJg@Kxu-__D<43Fhk;{%U&y~N z 2826d3f5dd3b03cfb5d2c079123f7add3a7d068e8dfd210873eb27eb32586a8e 78efcf6b74f4c56aaab183336eab44fcbcc9cb6c25045fe5980ab83a85e48db7 - + 1610968715 3094 16878 diff --git a/tests/data/test_create_packages_json/test_repo_2/repodata/filelists.xml.gz b/tests/data/test_create_packages_json/test_repo_2/repodata/filelists.xml.gz new file mode 100755 index 0000000000000000000000000000000000000000..920e81535eae997bb364e60e9281eb14bfe1cabe GIT binary patch literal 3970 zcmV-|4}I_-iwFP!000001Fc+HbK}Mle$TH^>D5JI?jyBp=kUhms`XKE@{qi^dM*hT zNH74XV}E@b6jv*eAUOlO%37I3f79rhK4+%&?wiL|b9EoPzHZm=uj!IpU&Xa=L%qIv zfBo-&{bOOSzxn!4?^4~wrtXLS3hCGV`|I0b*!;PwntHu`T!!skT*k1iR&js;15_{c z*H;_xcW@ICLnUYC8b{lIb+x&>sRMq`B$1KZ7$q1VRkTt7_uzs6%czo?QYWmUE_p3L z5^uRdOpHz{F4gtb8dmZBH8*w<`h|l&USC1yZ{J@(8uhCZ$n)yz-CoM8xM{~nC@Fq3 z$}E;-$?#(r8~jL?t2S(#_*HBSJ|JIlV%1laP-Ge8b+sF7l<#VI+920Zch_H6aqt!X zU*Fxo+X;V(s`BkR)i(#k6BLz?-LQhqa{QP<-Z!ub3*R;k3@B}%iyPuJ)qv_>%KMOhnyBI; zl0>PN5r5kxbYjXzorovi1;95-#vj_u1>Q$CIZae~MHETkl=c#B%A>|p<%o|Fq7qJ7 z5TsOYbsTA?h$<~4`VLOLP|gI@wm>P<5Q0VBqt*+ji7nJ~<#Tvr*preF2$4mG+>?w3 z(6S>({ljm)Oaa%SRPLPhR^xhmt{t@rjPfKgskvkcbv*j0RZ7VuRcd4EI9^W?q1@h~ zMn@wEG7Om2rDR1w-=b||_+yo#hhtsft#e|DmX$(XRv~Gg(2^BLV-`e6rWq$%M|3*T z235G;+UD@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m=bs15xl@|5=K$_R4G9H5+Er9#!Ci}7GYGPXvtBxpc(~; zW0se+D0o@qC`(cVeHevh8Yd~oJ`e_Xq` + + + 389-ds-base-new + x86_64 + + 12505e39ee5a8ce6e954a3cabd4a92165711b4961bfc74a50c938250eeb56356 + 389 Directory Server (base) + 389 Directory Server is an LDAPv3 compliant server. The base package includes +the LDAP server and command line utilities for server administration. + Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> + https://www.port389.org + + + zziplib-utils + x86_64 + + 26d838b257f0890c3abf408bc200ebcf53ff1e40f16654cad9b1cb4c059f0d42 + Utilities for the zziplib library + The zziplib library is intentionally lightweight, it offers the ability to +easily extract data from files archived in a single zip file. Applications +can bundle files into a single zip archive and access them. The implementation +is based only on the (free) subset of compression with the zlib algorithm +which is actually used by the zip/unzip tools. + +This packages contains all the utilities that come with the zziplib library. + Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> + http://zziplib.sourceforge.net/ + + + zziplib + i686 + + 207d3ba8e031d11bd13923e6027e17e5db12d76e915a28e9cd1589ef796a6e6b + Lightweight library to easily extract data from zip files + The zziplib library is intentionally lightweight, it offers the ability to +easily extract data from files archived in a single zip file. Applications +can bundle files into a single zip archive and access them. The implementation +is based only on the (free) subset of compression with the zlib algorithm +which is actually used by the zip/unzip tools. + Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> + http://zziplib.sourceforge.net/ + + + zziplib + x86_64 + + 30cee6c1adcaee7b24c1079072299ee55a9c3bbdcb91697544242c7567d18621 + Lightweight library to easily extract data from zip files + The zziplib library is intentionally lightweight, it offers the ability to +easily extract data from files archived in a single zip file. Applications +can bundle files into a single zip archive and access them. The implementation +is based only on the (free) subset of compression with the zlib algorithm +which is actually used by the zip/unzip tools. + Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> + http://zziplib.sourceforge.net/ + + diff --git a/tests/data/test_create_packages_json/test_repo_2/repodata/repomd.xml b/tests/data/test_create_packages_json/test_repo_2/repodata/repomd.xml new file mode 100644 index 00000000..2d14f784 --- /dev/null +++ b/tests/data/test_create_packages_json/test_repo_2/repodata/repomd.xml @@ -0,0 +1,28 @@ + + + 1610968727 + + dcfe621a2c74f0f58fce6da4a4fbbc3670d889ec207350a90ec1d082b206f98a + 14cb7ce7edc80fa750d5139170112073325af0badbf8bd9c294e033bf4518b83 + + 1610968715 + 3193 + 20480 + + + e41805c927fc4ad1b9bde52509afb37e47acc153283b23da17560d4e250b3a3e + 5f659e8c05b7d056748bf809bec8aa9fa5f791c2b0546d6c49b02a7ebfb26ce2 + + 1610968715 + 3970 + 19897 + + + db6d0d88abcaf06dc8ef09207fdbb9ba5e3ffb505a7dd2bf94fdbc953a6de11e + 3ae1b186b4c3037805e2cf28a78b2204c37b4dc04acbd8bef98a7b24ab5b52a8 + + 1610968715 + 2191 + 8337 + + diff --git a/tests/test_create_packages_json.py b/tests/test_create_packages_json.py index f5ffbcf4..122fd870 100644 --- a/tests/test_create_packages_json.py +++ b/tests/test_create_packages_json.py @@ -19,6 +19,7 @@ test_repo_info = RepoInfo( name='TestRepo', arch='x86_64', is_remote=False, + is_reference=True, ) test_repo_info_2 = RepoInfo( @@ -27,6 +28,7 @@ test_repo_info_2 = RepoInfo( name='TestRepo2', arch='x86_64', is_remote=False, + is_reference=True, ) @@ -64,6 +66,7 @@ class TestPackagesJson(TestCase): test_repo_info_2, ], excluded_packages=['zziplib-utils'], + included_packages=['389-ds-base-new*'], ) test_packages = defaultdict( lambda: defaultdict( @@ -80,6 +83,10 @@ class TestPackagesJson(TestCase): [ 'zziplib.i686', ] + test_packages['TestRepo2']['x86_64']['389-ds-base-new'] = \ + [ + '389-ds-base-new.x86_64', + ] result = pg.generate_packages_json() self.assertEqual( test_packages,