Fix SecureStore binding for plugins
Some plugins like uploadvalidator, will now not load because of missing binding for SecureStore in CopyConfigModule. To be able to bind SecureStoreProvider there we need to move it from pgm module to server. Then because it is using IoUtils and SiteLibraryLoaderUtil to common module and adjust BUCK configuration to make it compile Gerrit. Change-Id: I20d7f56750e5290872b984881cd4dbd1add5988c Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
This commit is contained in:
parent
7b3cb8d8cf
commit
7f4662fd4a
@ -7,8 +7,10 @@ ANNOTATIONS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
EXCLUDES = [
|
EXCLUDES = [
|
||||||
|
SRC + 'common/SiteLibraryLoaderUtil.java',
|
||||||
SRC + 'common/PluginData.java',
|
SRC + 'common/PluginData.java',
|
||||||
SRC + 'common/FileUtil.java',
|
SRC + 'common/FileUtil.java',
|
||||||
|
SRC + 'common/IoUtil.java',
|
||||||
]
|
]
|
||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.pgm.util;
|
package com.google.gerrit.common;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.pgm.util;
|
package com.google.gerrit.common;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileFilter;
|
import java.io.FileFilter;
|
@ -40,7 +40,6 @@ import com.google.gerrit.pgm.util.ErrorLogFile;
|
|||||||
import com.google.gerrit.pgm.util.GarbageCollectionLogFile;
|
import com.google.gerrit.pgm.util.GarbageCollectionLogFile;
|
||||||
import com.google.gerrit.pgm.util.LogFileCompressor;
|
import com.google.gerrit.pgm.util.LogFileCompressor;
|
||||||
import com.google.gerrit.pgm.util.RuntimeShutdown;
|
import com.google.gerrit.pgm.util.RuntimeShutdown;
|
||||||
import com.google.gerrit.pgm.util.SecureStoreProvider;
|
|
||||||
import com.google.gerrit.pgm.util.SiteProgram;
|
import com.google.gerrit.pgm.util.SiteProgram;
|
||||||
import com.google.gerrit.reviewdb.client.AuthType;
|
import com.google.gerrit.reviewdb.client.AuthType;
|
||||||
import com.google.gerrit.server.account.InternalAccountDirectory;
|
import com.google.gerrit.server.account.InternalAccountDirectory;
|
||||||
@ -69,6 +68,7 @@ import com.google.gerrit.server.plugins.PluginRestApiModule;
|
|||||||
import com.google.gerrit.server.schema.DataSourceProvider;
|
import com.google.gerrit.server.schema.DataSourceProvider;
|
||||||
import com.google.gerrit.server.schema.SchemaVersionCheck;
|
import com.google.gerrit.server.schema.SchemaVersionCheck;
|
||||||
import com.google.gerrit.server.securestore.SecureStore;
|
import com.google.gerrit.server.securestore.SecureStore;
|
||||||
|
import com.google.gerrit.server.securestore.SecureStoreProvider;
|
||||||
import com.google.gerrit.server.ssh.NoSshKeyCache;
|
import com.google.gerrit.server.ssh.NoSshKeyCache;
|
||||||
import com.google.gerrit.server.ssh.NoSshModule;
|
import com.google.gerrit.server.ssh.NoSshModule;
|
||||||
import com.google.gerrit.server.ssh.SshAddressesModule;
|
import com.google.gerrit.server.ssh.SshAddressesModule;
|
||||||
|
@ -17,6 +17,7 @@ package com.google.gerrit.pgm;
|
|||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import com.google.gerrit.common.IoUtil;
|
||||||
import com.google.gerrit.common.PageLinks;
|
import com.google.gerrit.common.PageLinks;
|
||||||
import com.google.gerrit.common.PluginData;
|
import com.google.gerrit.common.PluginData;
|
||||||
import com.google.gerrit.pgm.init.BaseInit;
|
import com.google.gerrit.pgm.init.BaseInit;
|
||||||
@ -24,11 +25,10 @@ import com.google.gerrit.pgm.init.Browser;
|
|||||||
import com.google.gerrit.pgm.init.InitPlugins;
|
import com.google.gerrit.pgm.init.InitPlugins;
|
||||||
import com.google.gerrit.pgm.init.api.ConsoleUI;
|
import com.google.gerrit.pgm.init.api.ConsoleUI;
|
||||||
import com.google.gerrit.pgm.util.ErrorLogFile;
|
import com.google.gerrit.pgm.util.ErrorLogFile;
|
||||||
import com.google.gerrit.pgm.util.IoUtil;
|
|
||||||
import com.google.gerrit.pgm.util.SecureStoreProvider;
|
|
||||||
import com.google.gerrit.server.config.GerritServerConfigModule;
|
import com.google.gerrit.server.config.GerritServerConfigModule;
|
||||||
import com.google.gerrit.server.config.SitePath;
|
import com.google.gerrit.server.config.SitePath;
|
||||||
import com.google.gerrit.server.securestore.SecureStore;
|
import com.google.gerrit.server.securestore.SecureStore;
|
||||||
|
import com.google.gerrit.server.securestore.SecureStoreProvider;
|
||||||
import com.google.gerrit.server.util.HostPlatform;
|
import com.google.gerrit.server.util.HostPlatform;
|
||||||
import com.google.inject.AbstractModule;
|
import com.google.inject.AbstractModule;
|
||||||
import com.google.inject.Guice;
|
import com.google.inject.Guice;
|
||||||
|
@ -17,8 +17,8 @@ package com.google.gerrit.pgm.init;
|
|||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
import com.google.common.io.Files;
|
import com.google.common.io.Files;
|
||||||
import com.google.gerrit.common.Die;
|
import com.google.gerrit.common.Die;
|
||||||
|
import com.google.gerrit.common.IoUtil;
|
||||||
import com.google.gerrit.pgm.init.api.ConsoleUI;
|
import com.google.gerrit.pgm.init.api.ConsoleUI;
|
||||||
import com.google.gerrit.pgm.util.IoUtil;
|
|
||||||
import com.google.gerrit.server.config.SitePaths;
|
import com.google.gerrit.server.config.SitePaths;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
package com.google.gerrit.pgm.util;
|
package com.google.gerrit.pgm.util;
|
||||||
|
|
||||||
|
import com.google.gerrit.common.SiteLibraryLoaderUtil;
|
||||||
import com.google.gerrit.server.config.GerritServerConfig;
|
import com.google.gerrit.server.config.GerritServerConfig;
|
||||||
import com.google.gerrit.server.config.SitePaths;
|
import com.google.gerrit.server.config.SitePaths;
|
||||||
import com.google.gerrit.server.schema.DataSourceProvider;
|
import com.google.gerrit.server.schema.DataSourceProvider;
|
||||||
|
@ -31,6 +31,7 @@ import com.google.gerrit.server.schema.DataSourceType;
|
|||||||
import com.google.gerrit.server.schema.DatabaseModule;
|
import com.google.gerrit.server.schema.DatabaseModule;
|
||||||
import com.google.gerrit.server.schema.SchemaModule;
|
import com.google.gerrit.server.schema.SchemaModule;
|
||||||
import com.google.gerrit.server.securestore.SecureStore;
|
import com.google.gerrit.server.securestore.SecureStore;
|
||||||
|
import com.google.gerrit.server.securestore.SecureStoreProvider;
|
||||||
import com.google.gwtorm.server.OrmException;
|
import com.google.gwtorm.server.OrmException;
|
||||||
import com.google.inject.AbstractModule;
|
import com.google.inject.AbstractModule;
|
||||||
import com.google.inject.Binding;
|
import com.google.inject.Binding;
|
||||||
|
@ -23,6 +23,8 @@ import com.google.gerrit.server.config.SitePath;
|
|||||||
import com.google.gerrit.server.config.SitePaths;
|
import com.google.gerrit.server.config.SitePaths;
|
||||||
import com.google.gerrit.server.config.TrackingFooters;
|
import com.google.gerrit.server.config.TrackingFooters;
|
||||||
import com.google.gerrit.server.git.GitRepositoryManager;
|
import com.google.gerrit.server.git.GitRepositoryManager;
|
||||||
|
import com.google.gerrit.server.securestore.SecureStore;
|
||||||
|
import com.google.gerrit.server.securestore.SecureStoreProvider;
|
||||||
import com.google.gwtorm.server.SchemaFactory;
|
import com.google.gwtorm.server.SchemaFactory;
|
||||||
import com.google.inject.AbstractModule;
|
import com.google.inject.AbstractModule;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
@ -121,5 +123,6 @@ class CopyConfigModule extends AbstractModule {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure() {
|
protected void configure() {
|
||||||
|
bind(SecureStore.class).toProvider(SecureStoreProvider.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,12 +12,11 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.pgm.util;
|
package com.google.gerrit.server.securestore;
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
import com.google.common.base.Strings;
|
||||||
|
import com.google.gerrit.common.SiteLibraryLoaderUtil;
|
||||||
import com.google.gerrit.server.config.SitePaths;
|
import com.google.gerrit.server.config.SitePaths;
|
||||||
import com.google.gerrit.server.securestore.DefaultSecureStore;
|
|
||||||
import com.google.gerrit.server.securestore.SecureStore;
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Injector;
|
import com.google.inject.Injector;
|
||||||
import com.google.inject.Provider;
|
import com.google.inject.Provider;
|
Loading…
Reference in New Issue
Block a user