mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-15 07:00:52 +00:00
Rediff patches
Add 0002-disable-new-azure-sdk.patch: <REASON> Drop 0002-Disable-new-azure-sdk.patch: <REASON>
This commit is contained in:
+33
-14
@@ -2,29 +2,28 @@ From: =?utf-8?q?Andr=C3=A9_Roth?= <neolynx@gmail.com>
|
||||
Date: Tue, 15 Oct 2024 12:09:33 +0200
|
||||
Subject: Disable swagger
|
||||
|
||||
|
||||
This can be enabled once the following modules make it into Debian:
|
||||
|
||||
- github.com/swaggo/files v1.0.1
|
||||
- github.com/swaggo/gin-swagger v1.6.0
|
||||
- github.com/swaggo/swag v1.16.3
|
||||
---
|
||||
api/router.go | 16 ++++++++--------
|
||||
docs/index.go | 3 ---
|
||||
docs/index.go.disabled | 3 +++
|
||||
3 files changed, 11 insertions(+), 11 deletions(-)
|
||||
api/router.go | 22 +++++++++++-----------
|
||||
docs/index.go | 10 ----------
|
||||
docs/index.go.disabled | 10 ++++++++++
|
||||
3 files changed, 21 insertions(+), 21 deletions(-)
|
||||
delete mode 100644 docs/index.go
|
||||
create mode 100644 docs/index.go.disabled
|
||||
|
||||
diff --git a/api/router.go b/api/router.go
|
||||
index ada14b8..835abb1 100644
|
||||
index 3536ab0..7dbf16e 100644
|
||||
--- a/api/router.go
|
||||
+++ b/api/router.go
|
||||
@@ -12,9 +12,9 @@
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
- _ "github.com/aptly-dev/aptly/docs" // import docs
|
||||
- "github.com/aptly-dev/aptly/docs"
|
||||
- swaggerFiles "github.com/swaggo/files"
|
||||
- ginSwagger "github.com/swaggo/gin-swagger"
|
||||
+ // _ "github.com/aptly-dev/aptly/docs" // import docs
|
||||
@@ -33,16 +32,22 @@ index ada14b8..835abb1 100644
|
||||
)
|
||||
|
||||
var context *ctx.AptlyContext
|
||||
@@ -72,11 +72,11 @@ func Router(c *ctx.AptlyContext) http.Handler {
|
||||
@@ -68,14 +68,14 @@ func Router(c *ctx.AptlyContext) http.Handler {
|
||||
|
||||
router.Use(gin.Recovery(), gin.ErrorLogger())
|
||||
|
||||
- if c.Config().EnableSwaggerEndpoint {
|
||||
- router.GET("docs.html", func(c *gin.Context) {
|
||||
- c.Data(http.StatusOK, "text/html; charset=utf-8", docs.DocsHTML)
|
||||
- })
|
||||
- router.Use(redirectSwagger)
|
||||
- url := ginSwagger.URL("/docs/doc.json")
|
||||
- router.GET("/docs/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, url))
|
||||
- }
|
||||
+ // if c.Config().EnableSwaggerEndpoint {
|
||||
+ // router.GET("docs.html", func(c *gin.Context) {
|
||||
+ // c.Data(http.StatusOK, "text/html; charset=utf-8", docs.DocsHTML)
|
||||
+ // })
|
||||
+ // router.Use(redirectSwagger)
|
||||
+ // url := ginSwagger.URL("/docs/doc.json")
|
||||
+ // router.GET("/docs/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, url))
|
||||
@@ -52,19 +57,33 @@ index ada14b8..835abb1 100644
|
||||
MetricsCollectorRegistrar.Register(router)
|
||||
diff --git a/docs/index.go b/docs/index.go
|
||||
deleted file mode 100644
|
||||
index da325d0..0000000
|
||||
index ca4c914..0000000
|
||||
--- a/docs/index.go
|
||||
+++ /dev/null
|
||||
@@ -1,3 +0,0 @@
|
||||
@@ -1,10 +0,0 @@
|
||||
-package docs
|
||||
-
|
||||
-import _ "github.com/swaggo/swag" // make sure swag is in go.mod
|
||||
-import (
|
||||
- _ "embed" // embed html below
|
||||
-
|
||||
- _ "github.com/swaggo/swag" // make sure swag is in go.mod
|
||||
-)
|
||||
-
|
||||
-//go:embed docs.html
|
||||
-var DocsHTML []byte
|
||||
diff --git a/docs/index.go.disabled b/docs/index.go.disabled
|
||||
new file mode 100644
|
||||
index 0000000..da325d0
|
||||
index 0000000..ca4c914
|
||||
--- /dev/null
|
||||
+++ b/docs/index.go.disabled
|
||||
@@ -0,0 +1,3 @@
|
||||
@@ -0,0 +1,10 @@
|
||||
+package docs
|
||||
+
|
||||
+import _ "github.com/swaggo/swag" // make sure swag is in go.mod
|
||||
+import (
|
||||
+ _ "embed" // embed html below
|
||||
+
|
||||
+ _ "github.com/swaggo/swag" // make sure swag is in go.mod
|
||||
+)
|
||||
+
|
||||
+//go:embed docs.html
|
||||
+var DocsHTML []byte
|
||||
|
||||
Vendored
+13
-13
@@ -1,5 +1,5 @@
|
||||
From: =?utf-8?q?S=C3=A9bastien_Delafond?= <seb@debian.org>
|
||||
Date: Sun, 17 Nov 2024 18:51:45 +0100
|
||||
From: =?utf-8?q?Andr=C3=A9_Roth?= <neolynx@gmail.com>
|
||||
Date: Sun, 17 Nov 2024 17:58:04 +0100
|
||||
Subject: Disable new azure-sdk
|
||||
|
||||
This reverts commit e2cbd637b82a153a6756f2af0519e8fe769ee9ab.
|
||||
@@ -673,10 +673,10 @@ index 3acd767..767f249 100644
|
||||
err = s.prefixedStorage.LinkFromPool("", filepath.Join("pool", "main", "m/mars-invaders"), "mars-invaders_1.03.deb", pool, "wrong-looks-like-pathcache-doesnt-work", cksum1, false)
|
||||
c.Check(err, IsNil)
|
||||
diff --git a/context/context.go b/context/context.go
|
||||
index e599102..6e0dfe6 100644
|
||||
index 5df5bbf..f9deaf3 100644
|
||||
--- a/context/context.go
|
||||
+++ b/context/context.go
|
||||
@@ -101,6 +101,7 @@ func (context *AptlyContext) config() *utils.ConfigStructure {
|
||||
@@ -100,6 +100,7 @@ func (context *AptlyContext) config() *utils.ConfigStructure {
|
||||
configLocations := []string{homeLocation, "/usr/local/etc/aptly.conf", "/etc/aptly.conf"}
|
||||
|
||||
for _, configLocation := range configLocations {
|
||||
@@ -685,19 +685,19 @@ index e599102..6e0dfe6 100644
|
||||
if os.IsPermission(err) || os.IsNotExist(err) {
|
||||
continue
|
||||
diff --git a/deb/list.go b/deb/list.go
|
||||
index 4f863cc..ada6fab 100644
|
||||
index 28644e4..14a311c 100644
|
||||
--- a/deb/list.go
|
||||
+++ b/deb/list.go
|
||||
@@ -549,6 +549,7 @@ func (l *PackageList) FilterWithProgress(queries []PackageQuery, withDependencie
|
||||
@@ -598,6 +598,7 @@ func (l *PackageList) Filter(options FilterOptions) (*PackageList, error) {
|
||||
//
|
||||
// when follow-all-variants is enabled, we need to try to expand anyway,
|
||||
// as even if dependency is satisfied now, there might be other ways to satisfy dependency
|
||||
+ // FIXME: do not search twice
|
||||
if result.Search(dep, false, true) != nil {
|
||||
if dependencyOptions&DepVerboseResolve == DepVerboseResolve && progress != nil {
|
||||
progress.ColoredPrintf("@{y}Already satisfied dependency@|: %s with %s", &dep, result.Search(dep, true, true))
|
||||
if options.DependencyOptions&DepVerboseResolve == DepVerboseResolve && options.Progress != nil {
|
||||
options.Progress.ColoredPrintf("@{y}Already satisfied dependency@|: %s with %s", &dep, result.Search(dep, true, true))
|
||||
diff --git a/go.mod b/go.mod
|
||||
index b1e030c..d053f1d 100644
|
||||
index 35786eb..8b95506 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -4,6 +4,7 @@ go 1.22.7
|
||||
@@ -734,17 +734,17 @@ index b1e030c..d053f1d 100644
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.15 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.15 // indirect
|
||||
@@ -117,8 +119,6 @@ require (
|
||||
@@ -116,8 +118,6 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
- github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0
|
||||
- github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.1
|
||||
github.com/ProtonMail/go-crypto v1.0.0
|
||||
github.com/aws/aws-sdk-go-v2 v1.30.3
|
||||
github.com/aws/aws-sdk-go-v2/config v1.25.1
|
||||
github.com/aws/aws-sdk-go-v2 v1.32.5
|
||||
github.com/aws/aws-sdk-go-v2/config v1.28.5
|
||||
diff --git a/go.sum b/go.sum
|
||||
index 43c4b54..ac476e3 100644
|
||||
index 4425614..391c836 100644
|
||||
--- a/go.sum
|
||||
+++ b/go.sum
|
||||
@@ -1,17 +1,20 @@
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
0001-disable-swagger.patch
|
||||
0002-Disable-new-azure-sdk.patch
|
||||
0002-disable-new-azure-sdk.patch
|
||||
|
||||
Reference in New Issue
Block a user