@@ -61,7 +61,7 @@ class PkgCreator:
6161
6262 origin - name of your package (String)
6363 label - label of your package (could be same as the name) (String)
64- flavor - flavor you want this to be distributed for (List of Strings)
64+ release - release you want this to be distributed for (List of Strings)
6565 components - could be a channel like main/stable/beta
6666 archs - Architecture (List of Strings)
6767 description - (String)
@@ -71,20 +71,20 @@ def create_distribution_conf(self,
7171 file_path ,
7272 origin ,
7373 label ,
74- flavors ,
74+ releases ,
7575 archs ,
7676 components ,
7777 description ,
7878 gpg_key_id ):
7979 with open (file_path , "w" ) as distributions_file :
80- for flavor in flavors :
80+ for release in releases :
8181 distributions_file .write (f"Origin: { origin } \n " )
8282 distributions_file .write (f"Label: { label } \n " )
83- distributions_file .write (f"Codename: { flavor } \n " )
83+ distributions_file .write (f"Codename: { release } \n " )
8484 archs_list = " " .join (archs )
8585 distributions_file .write (f"Architectures: { archs_list } \n " )
8686 distributions_file .write (f"Components: { components } \n " )
87- distributions_file .write (f"Description: { description } - { flavor } \n " )
87+ distributions_file .write (f"Description: { description } - { release } \n " )
8888 distributions_file .write (f"SignWith: { gpg_key_id } \n " )
8989 distributions_file .write ("\n " )
9090 return distributions_file
@@ -97,9 +97,9 @@ def create_distribution_conf(self,
9797 db and pool contain information and metadata about builds. We can ignore these.
9898 dist: contains all the pkgs and signed releases that are necessary for an apt download.
9999 """
100- def create_deb_pkgs (self , flavor , deb_file ):
100+ def create_deb_pkgs (self , release , deb_file ):
101101 self ._clean_build_resources ()
102- subprocess .call (("reprepro" , "includedeb" , flavor , deb_file ))
102+ subprocess .call (("reprepro" , "includedeb" , release , deb_file ))
103103
104104 """
105105 This is mostly useful to clear previously built db, dist and pool resources.
@@ -139,24 +139,24 @@ def upload_from_directories(pkg_uploader, directory, release, binary):
139139
140140 release_version: is the cloudflared release version.
141141"""
142- def create_deb_packaging (pkg_creator , pkg_uploader , flavors , gpg_key_id , binary_name , archs , package_component , release_version ):
142+ def create_deb_packaging (pkg_creator , pkg_uploader , releases , gpg_key_id , binary_name , archs , package_component , release_version ):
143143 # set configuration for package creation.
144144 print (f"initialising configuration for { binary_name } , { archs } " )
145145 pkg_creator .create_distribution_conf (
146146 "./conf/distributions" ,
147147 binary_name ,
148148 binary_name ,
149- flavors ,
149+ releases ,
150150 archs ,
151151 package_component ,
152152 f"apt repository for { binary_name } " ,
153153 gpg_key_id )
154154
155155 # create deb pkgs
156- for flavor in flavors :
156+ for release in releases :
157157 for arch in archs :
158- print (f"creating deb pkgs for { flavor } and { arch } ..." )
159- pkg_creator .create_deb_pkgs (flavor , f"./built_artifacts/cloudflared-linux-{ arch } .deb" )
158+ print (f"creating deb pkgs for { release } and { arch } ..." )
159+ pkg_creator .create_deb_pkgs (release , f"./built_artifacts/cloudflared-linux-{ arch } .deb" )
160160
161161 print ("uploading latest to r2..." )
162162 upload_from_directories (pkg_uploader , "dists" , None , binary_name )
@@ -182,5 +182,7 @@ def create_deb_packaging(pkg_creator, pkg_uploader, flavors, gpg_key_id, binary_
182182 pkg_uploader = PkgUploader (tunnel_account_id , bucket_name , client_id , client_secret )
183183
184184 archs = ["amd64" , "386" , "arm64" ]
185- flavors = ["bullseye" , "buster" , "bionic" ]
186- create_deb_packaging (pkg_creator , pkg_uploader , flavors , gpg_key_id , "cloudflared" , archs , "main" , release_version )
185+ debian_releases = ["bookworm" , "bullseye" , "buster" ]
186+ ubuntu_releases = ["jammy" , "impish" , "focal" , "bionic" ]
187+ deb_based_releases = debian_releases + ubuntu_releases
188+ create_deb_packaging (pkg_creator , pkg_uploader , deb_based_releases , gpg_key_id , "cloudflared" , archs , "main" , release_version )
0 commit comments