From 72ef5ff294561540a685ac70784fafe248d99661 Mon Sep 17 00:00:00 2001 From: MarkS Date: Tue, 19 Apr 2022 13:57:58 -0600 Subject: [PATCH] flatpak: use lowercase URLs for nuget dependencies Change-Id: I5918d067bb87a8df28d8498f7e79c2bf4071c299 --- flatpak/compose-nuget-sources | 11 ++-- flatpak/fieldworks-sources-nuget-common.yml | 50 +++++++++++++------ flatpak/fieldworks-sources-nuget-linux.yml | 6 ++- flatpak/flexbridge-sources-nuget-specific.yml | 12 ++--- flatpak/org.sil.FieldWorks.yml | 9 ++-- 5 files changed, 57 insertions(+), 31 deletions(-) diff --git a/flatpak/compose-nuget-sources b/flatpak/compose-nuget-sources index 2ba1748846..159137a76f 100755 --- a/flatpak/compose-nuget-sources +++ b/flatpak/compose-nuget-sources @@ -62,20 +62,23 @@ def processPackagesConfig(path): root = packagesTree.getroot() packageElements = root.findall('./package') for package in packageElements: - name = package.attrib['id'] #.lower() - version = package.attrib['version'] #.lower() + name = package.attrib['id'] + version = package.attrib['version'] packageSet.add(PackageAndVersionSpecification(name=name, version=version)) def writeSourceRecord(name, version): - url = 'https://api.nuget.org/v3-flatcontainer/{}/{}/{}.{}.nupkg'.format(name, version, name, version) + nameLower = name.lower() + url = 'https://api.nuget.org/v3-flatcontainer/{}/{}/{}.{}.nupkg'.format(nameLower, version, nameLower, version) wget --timestamping --directory-prefix=@(cachePath) @(url) - filename = '{}.{}.nupkg'.format(name, version) + filename = '{}.{}.nupkg'.format(nameLower, version) + destFilename = '{}.{}.nupkg'.format(name, version) pathToCachedFile = '{}/{}'.format(cachePath, filename) sha512 = $(sha512sum @(pathToCachedFile) | perl -p -e 's/ .*$//').rstrip() nugetSources.append('- type: file') nugetSources.append(' url: {}'.format(url)) nugetSources.append(' sha512: {}'.format(sha512)) nugetSources.append(' dest: {}'.format(destDir)) + nugetSources.append(' dest-filename: {}'.format(destFilename)) for packagesConfigPath in packagesConfigPaths: processPackagesConfig(packagesConfigPath) diff --git a/flatpak/fieldworks-sources-nuget-common.yml b/flatpak/fieldworks-sources-nuget-common.yml index b317fe7a19..fd1f737b7c 100644 --- a/flatpak/fieldworks-sources-nuget-common.yml +++ b/flatpak/fieldworks-sources-nuget-common.yml @@ -1,73 +1,91 @@ # Generated file - type: file - url: https://api.nuget.org/v3-flatcontainer/DialogAdapters.Gtk2/0.1.11/DialogAdapters.Gtk2.0.1.11.nupkg + url: https://api.nuget.org/v3-flatcontainer/dialogadapters.gtk2/0.1.11/dialogadapters.gtk2.0.1.11.nupkg sha512: c810dfda0fd4d7a83bfd6d44a8966e1a45b1a1fe1cd72b6388a82c376ce40c09dbd9f2bb3d7562eb75b81d306d8c91f40fa921b729225316eca5bd8ef564a50f dest: . + dest-filename: DialogAdapters.Gtk2.0.1.11.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/DotNetZip/1.13.3/DotNetZip.1.13.3.nupkg + url: https://api.nuget.org/v3-flatcontainer/dotnetzip/1.13.3/dotnetzip.1.13.3.nupkg sha512: 3a504cf0da92541dc0af475f39fda24885d5acb39d23e16a20444b6faed40ad2d13f09281be693cd30308a299be059272b1c74fbe46955299acda64734dcfdb1 dest: . + dest-filename: DotNetZip.1.13.3.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/ILRepack/2.0.16/ILRepack.2.0.16.nupkg + url: https://api.nuget.org/v3-flatcontainer/ilrepack/2.0.16/ilrepack.2.0.16.nupkg sha512: 2b3ebedbc3bdc5b97f0df0d508594dfac91c67713fc72cc1df3a0f7fde73c5dd4d0600628ea875387979134aa9108a186f528a5ff9db95cf8c32b30408b96784 dest: . + dest-filename: ILRepack.2.0.16.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/MSBuild.Extension.Pack/1.9.0/MSBuild.Extension.Pack.1.9.0.nupkg + url: https://api.nuget.org/v3-flatcontainer/msbuild.extension.pack/1.9.0/msbuild.extension.pack.1.9.0.nupkg sha512: e1c1144b91d23238481f8d0a3a7a806ade44f965fc6ed8ec4fbdd7e50c37abee655d0657cacfb4b4f8bcaef66245b0fc023388f17646c4179378345f44900170 dest: . + dest-filename: MSBuild.Extension.Pack.1.9.0.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/Microsoft.Extensions.DependencyModel/2.0.4/Microsoft.Extensions.DependencyModel.2.0.4.nupkg + url: https://api.nuget.org/v3-flatcontainer/microsoft.extensions.dependencymodel/2.0.4/microsoft.extensions.dependencymodel.2.0.4.nupkg sha512: 61c129ecfa7afa3f28630b23c6bb3f069e57f3580df047857ebda8ab14f0a0c8bd2a78288d5b9e2f1f776238727ada7bbf71334d8371054042aa5cdd30b802a9 dest: . + dest-filename: Microsoft.Extensions.DependencyModel.2.0.4.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/Mono.Posix-4.5/4.5.0/Mono.Posix-4.5.4.5.0.nupkg + url: https://api.nuget.org/v3-flatcontainer/mono.posix-4.5/4.5.0/mono.posix-4.5.4.5.0.nupkg sha512: d7d429d17119c44a83f8a8d65c231bead27c56dd6b09029b563a9cee707fc56a28711f984444e104428115f1455b145e9f0fb63f09b1f045320885e4f549046d dest: . + dest-filename: Mono.Posix-4.5.4.5.0.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/NAudio/1.10.0/NAudio.1.10.0.nupkg + url: https://api.nuget.org/v3-flatcontainer/naudio/1.10.0/naudio.1.10.0.nupkg sha512: a4d0cf699bc475758a7740d34d4f640444032527876316fe7098870164c00aac64cb77b3de0a8db0840752db3ff2cfb5cfd6e3dbeda7e7fdad0aa4ab865e8621 dest: . + dest-filename: NAudio.1.10.0.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/NAudio.Lame/1.1.5/NAudio.Lame.1.1.5.nupkg + url: https://api.nuget.org/v3-flatcontainer/naudio.lame/1.1.5/naudio.lame.1.1.5.nupkg sha512: bf528a497e037e63785b6ce019ee33803fc9a11ff35260b5095c4f192440ac1b9d52b9b107fa972f1fa8fc973e8a75490619b8f42af8db4d745087e50c3fc34b dest: . + dest-filename: NAudio.Lame.1.1.5.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/NDesk.DBus/0.15.0/NDesk.DBus.0.15.0.nupkg + url: https://api.nuget.org/v3-flatcontainer/ndesk.dbus/0.15.0/ndesk.dbus.0.15.0.nupkg sha512: c1f1d3cac04b26e2d068ebb555ea22763ae297d09f0d7fde63059cb707d460987ed3487f847ce9a567e20e9bc39b2b7a2b16f5a1abe608c914a10617fe693620 dest: . + dest-filename: NDesk.DBus.0.15.0.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/NUnit/2.6.4/NUnit.2.6.4.nupkg + url: https://api.nuget.org/v3-flatcontainer/nunit/2.6.4/nunit.2.6.4.nupkg sha512: e0510c05364d512d810d8bc5741462cb8eeef06b45101f81106f5489fd9f9987d07050320d4306c41c9bc76fe186735a8e3544be0b496dc416617cf0bdb99600 dest: . + dest-filename: NUnit.2.6.4.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/Newtonsoft.Json/12.0.3/Newtonsoft.Json.12.0.3.nupkg + url: https://api.nuget.org/v3-flatcontainer/newtonsoft.json/12.0.3/newtonsoft.json.12.0.3.nupkg sha512: 6934665f0479c58bbe996c44f2bf16d435a72f4d92795f0bc1d40cb0bc1358ff0e660ac20b24eabce01ee6145bd553506178e59fbaabd0f2a94b23bfa5c735f5 dest: . + dest-filename: Newtonsoft.Json.12.0.3.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/ParatextData/9.0.3/ParatextData.9.0.3.nupkg + url: https://api.nuget.org/v3-flatcontainer/paratextdata/9.0.3/paratextdata.9.0.3.nupkg sha512: 03df03bb38153a28fcbcbf351919a537199dddf7af565d0150990efcb2e8222d31e87df11f0cdd0a40f075a11a5875a845fc230b5b9a4e4a73258acd17934d47 dest: . + dest-filename: ParatextData.9.0.3.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/SIL.Chorus.l10ns/3.0.1/SIL.Chorus.l10ns.3.0.1.nupkg + url: https://api.nuget.org/v3-flatcontainer/sil.chorus.l10ns/3.0.1/sil.chorus.l10ns.3.0.1.nupkg sha512: 5e565e540ca8cb535ad0897bab58de6bacd72bbe420ea1fa0b48e537e3288a370b64a366fad7c08daec7355a3d6692a29c62d57d32b7dc1b0c3df83764e825c6 dest: . + dest-filename: SIL.Chorus.l10ns.3.0.1.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/SIL.Lib/6.0.11/SIL.Lib.6.0.11.nupkg + url: https://api.nuget.org/v3-flatcontainer/sil.lib/6.0.11/sil.lib.6.0.11.nupkg sha512: 3569905e449e323c059fea7aed34aa01b3088ceda8c07b96bb08a41b3b0460fc7b13b0ff1299ba68fe9335a692b32bd935634ff984be6fe5c508354c81ae146d dest: . + dest-filename: SIL.Lib.6.0.11.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/SIL.libpalaso.l10ns/6.0.0/SIL.libpalaso.l10ns.6.0.0.nupkg + url: https://api.nuget.org/v3-flatcontainer/sil.libpalaso.l10ns/6.0.0/sil.libpalaso.l10ns.6.0.0.nupkg sha512: 48f8a1f6341e3fe1d58c6fa91d4c4945ed122b65c0ee544d390c834dd2c7f440ef4695d5e82de2a70e0da9a371abbbc0cdb894b0518b74d275a98fa6097429a1 dest: . + dest-filename: SIL.libpalaso.l10ns.6.0.0.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/System.ValueTuple/4.5.0/System.ValueTuple.4.5.0.nupkg + url: https://api.nuget.org/v3-flatcontainer/system.valuetuple/4.5.0/system.valuetuple.4.5.0.nupkg sha512: fa00ebb5045d12c51274f64411c551981beceb1266a8606a4731063109b95ea1f15939197bf3d2ba899db61e593dc39bfce876908bba34286823525093ae3d8e dest: . + dest-filename: System.ValueTuple.4.5.0.nupkg - type: file url: https://api.nuget.org/v3-flatcontainer/ibusdotnet/2.1.0-beta.19/ibusdotnet.2.1.0-beta.19.nupkg sha512: 205cdef18176c94eab66422b8dcbfc1b5bdf5d2c5d06134c606df9aa3369adf2f7e5b3c7cdf05bc5d5437bdf8daa9147f461df4bdeba5940bc1a14f4db3d768f dest: . + dest-filename: ibusdotnet.2.1.0-beta.19.nupkg - type: file url: https://api.nuget.org/v3-flatcontainer/icu.net/2.7.0-beta.10/icu.net.2.7.0-beta.10.nupkg sha512: 412a3c7360c42f428c3c6c01598919f56f7aed0ed41a8bd6ceb391e273c404afbd3a280a778078fcdec1a51ecb67cc6501d16f5a3c1d85f77e2f7d975e22008b dest: . + dest-filename: icu.net.2.7.0-beta.10.nupkg diff --git a/flatpak/fieldworks-sources-nuget-linux.yml b/flatpak/fieldworks-sources-nuget-linux.yml index 5f75017a14..88ddb527fb 100644 --- a/flatpak/fieldworks-sources-nuget-linux.yml +++ b/flatpak/fieldworks-sources-nuget-linux.yml @@ -1,9 +1,11 @@ # Generated file - type: file - url: https://api.nuget.org/v3-flatcontainer/Geckofx45.32.Linux/45.0.36/Geckofx45.32.Linux.45.0.36.nupkg + url: https://api.nuget.org/v3-flatcontainer/geckofx45.32.linux/45.0.36/geckofx45.32.linux.45.0.36.nupkg sha512: fd2b180b4d9cba3bd3091d712d9b1f34b6a96d63745b80bfcd01db8ccba37c9f4d40ae418d25d93c4c95d01069a57eae6679735d6455e868dd2021dff10be6d7 dest: . + dest-filename: Geckofx45.32.Linux.45.0.36.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/Geckofx45.64.Linux/45.0.36/Geckofx45.64.Linux.45.0.36.nupkg + url: https://api.nuget.org/v3-flatcontainer/geckofx45.64.linux/45.0.36/geckofx45.64.linux.45.0.36.nupkg sha512: 3996fe0dbb79884a005e98f863cc1b6ced560420f51650b677e892d0f71a86f282497e177ec32a5cb543a9b4eb4f004d6b2c3d0e6872d4db14be4ac220a3ad1c dest: . + dest-filename: Geckofx45.64.Linux.45.0.36.nupkg diff --git a/flatpak/flexbridge-sources-nuget-specific.yml b/flatpak/flexbridge-sources-nuget-specific.yml index 7ae0598af3..46e0848d93 100644 --- a/flatpak/flexbridge-sources-nuget-specific.yml +++ b/flatpak/flexbridge-sources-nuget-specific.yml @@ -1,31 +1,31 @@ # These nuget packages need to be extracted into packages/package-name-without-version/ . - type: file - url: https://api.nuget.org/v3-flatcontainer/GitVersion.MsBuild/5.6.10/GitVersion.MsBuild.5.6.10.nupkg + url: https://api.nuget.org/v3-flatcontainer/gitversion.msbuild/5.6.10/gitversion.msbuild.5.6.10.nupkg sha512: 9148ad80c714bf7d0fd660f607e9089f6941062c6393e6f753d95f105b5ef05a732781d0d1c8a2556680d9a0dadae363b06980c2d0f4089e0a591b29418c5b99 dest: nuget-specific/ dest-filename: GitVersion.MsBuild.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/SIL.BuildTasks/2.5.0/SIL.BuildTasks.2.5.0.nupkg + url: https://api.nuget.org/v3-flatcontainer/sil.buildtasks/2.5.0/sil.buildtasks.2.5.0.nupkg sha512: 88def0001dbd63ff244c09a245df4c12b1e549729f4ce8a76afba5e0bb3fc795d13c84cf613bdff451ca4a0d72ecd4169b443494a84bc72d3b469071d7612cae dest: nuget-specific/ dest-filename: SIL.BuildTasks.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/SIL.ReleaseTasks/2.5.0/SIL.ReleaseTasks.2.5.0.nupkg + url: https://api.nuget.org/v3-flatcontainer/sil.releasetasks/2.5.0/sil.releasetasks.2.5.0.nupkg sha512: 461acfe39cc268d38b798a5c95ce3df55fcda37c33eddcf85f98225dd865025defab88dd3db6ab9a7677f572dce616ab7e76c197a41e36445c9d3a1d8d7fc59d dest: nuget-specific/ dest-filename: SIL.ReleaseTasks.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/NUnit.Console/3.12.0/NUnit.Console.3.12.0.nupkg + url: https://api.nuget.org/v3-flatcontainer/nunit.console/3.12.0/nunit.console.3.12.0.nupkg sha512: c04181ea6ee33a9a6af2cdcba09454f855d0cac5b66898ba2248d4bd2de2433404508ed6cd0aaa2458d891050da3806ff85c7c36a936c79eb03af4763d9833c2 dest: nuget-specific/ dest-filename: NUnit.Console.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/BuildDependencyTasks/0.4.3/BuildDependencyTasks.0.4.3.nupkg + url: https://api.nuget.org/v3-flatcontainer/builddependencytasks/0.4.3/builddependencytasks.0.4.3.nupkg sha512: e936cfd251c6da0494d275dfac87a60039e90cb1cbd48cae48ebe9fff439478a49735051a59aba07c4bcf69d6b73a54bfc73bfab38fb295d540d1e351aaecdd5 dest: nuget-specific/ dest-filename: BuildDependencyTasks.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/SIL.Windows.Forms.GeckoBrowserAdapter/9.0.0-beta0076/SIL.Windows.Forms.GeckoBrowserAdapter.9.0.0-beta0076.nupkg + url: https://api.nuget.org/v3-flatcontainer/sil.windows.forms.geckobrowseradapter/9.0.0-beta0076/sil.windows.forms.geckobrowseradapter.9.0.0-beta0076.nupkg sha512: 4455e171836cd1733f0494ffb5e491d594316faa974b655555c6bf064c0360c5c257af3a8df52380bdfc59de7a70681025df05f985bbfad5c0f79d8722663441 dest: nuget-sources/ dest-filename: sil.windows.forms.geckobrowseradapter.9.0.0-beta0076.nupkg diff --git a/flatpak/org.sil.FieldWorks.yml b/flatpak/org.sil.FieldWorks.yml index 2a7bb5347d..93a6161c62 100644 --- a/flatpak/org.sil.FieldWorks.yml +++ b/flatpak/org.sil.FieldWorks.yml @@ -526,17 +526,20 @@ modules: 's|/usr/lib/fieldworks/icu-bin/icu-config|/app/lib/fieldworks/icu-bin/icu-config|' \ Makefile.in - type: file - url: https://api.nuget.org/v3-flatcontainer/Geckofx45.64.Linux/45.0.21/Geckofx45.64.Linux.45.0.21.nupkg + url: https://api.nuget.org/v3-flatcontainer/geckofx45.64.linux/45.0.21/geckofx45.64.linux.45.0.21.nupkg sha512: d34f7175793bdfc4dcfa0b404bf7d6f2a27ba29389623a23c4d6383281fedf7f8014474775f4321af21ad9eab2817e5309934b81b918296fb518c23064272dfe dest: nuget-sources/ + dest-filename: Geckofx45.64.Linux.45.0.21.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/Geckofx45.32.Linux/45.0.21/Geckofx45.32.Linux.45.0.21.nupkg + url: https://api.nuget.org/v3-flatcontainer/geckofx45.32.linux/45.0.21/geckofx45.32.linux.45.0.21.nupkg sha512: 677c1dea32bd8631e859a7ddb2e72971a5db5561e9bc3ddced9a5bd451395f78719d3001b1cea908025707bb34175ecbc698c9ca965a44535bb4e9c83687832f dest: nuget-sources/ + dest-filename: Geckofx45.32.Linux.45.0.21.nupkg - type: file - url: https://api.nuget.org/v3-flatcontainer/NUnit/2.6.4/NUnit.2.6.4.nupkg + url: https://api.nuget.org/v3-flatcontainer/nunit/2.6.4/nunit.2.6.4.nupkg sha512: e0510c05364d512d810d8bc5741462cb8eeef06b45101f81106f5489fd9f9987d07050320d4306c41c9bc76fe186735a8e3544be0b496dc416617cf0bdb99600 dest: nuget-sources/ + dest-filename: NUnit.2.6.4.nupkg - type: file url: https://dist.nuget.org/win-x86-commandline/v3.4.4/nuget.exe sha512: 3b404655c39cfc39334c8437ff2c7d6007e23262daa7bb34863fdd6f2e7da9a89ab97176a52b1e8a99327fde3e9decc29c450664492af73680f5a715a72aacf3