Skip to content

Commit 36d27dc

Browse files
committed
repo adapters initial
1 parent cbef635 commit 36d27dc

31 files changed

Lines changed: 3205 additions & 3 deletions

PACKAGE_REPOS.md

Lines changed: 314 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,314 @@
1+
# Consulo Plugin Package Repositories
2+
3+
Native package manager repositories for installing and updating Consulo IDE and its plugins.
4+
5+
## Channels
6+
7+
Choose a channel based on your stability preference:
8+
9+
| Channel | Cadence | Use case |
10+
|---------|---------|----------|
11+
| `release` | Monthly | **Recommended** — stable builds |
12+
| `beta` | Weekly | Pre-release testing |
13+
| `alpha` | Daily | Early access |
14+
| `nightly` | Per commit | Bleeding edge |
15+
| `valhalla` | Snapshot | Platform SNAPSHOT builds |
16+
17+
**Important:** each channel is independent. A plugin only appears in a channel once it has been
18+
explicitly deployed to that channel. If a plugin is missing from `release`, it means it has not
19+
been promoted there yet — switch to `beta` or `alpha` to access it sooner.
20+
Channels are not cumulative: `release` does **not** automatically include everything from `nightly`.
21+
22+
Replace `{channel}` in the examples below with your chosen channel name.
23+
24+
---
25+
26+
## APT — Debian / Ubuntu / Linux Mint
27+
28+
Supports architectures: `amd64`, `arm64`, `i386`, `riscv64`, `loong64`.
29+
30+
### Add repository
31+
32+
```bash
33+
echo "deb [trusted=yes] https://api.consulo.io/apt {channel} main" \
34+
| sudo tee /etc/apt/sources.list.d/consulo.list
35+
sudo apt update
36+
```
37+
38+
Example (release channel):
39+
```bash
40+
echo "deb [trusted=yes] https://api.consulo.io/apt release main" \
41+
| sudo tee /etc/apt/sources.list.d/consulo.list
42+
sudo apt update
43+
```
44+
45+
> `trusted=yes` is required until GPG signing is set up.
46+
47+
### Install the IDE
48+
49+
```bash
50+
# With bundled JDK (recommended)
51+
sudo apt install consulo-with-jdk
52+
53+
# Without bundled JDK (uses system Java)
54+
sudo apt install consulo-without-jdk
55+
```
56+
57+
### Install a plugin
58+
59+
```bash
60+
sudo apt install consulo-plugin-com.intellij.git
61+
```
62+
63+
Plugin packages declare a dependency on `consulo-with-jdk | consulo-without-jdk`,
64+
so installing any plugin will pull in the IDE if it is not already present.
65+
66+
### Update IDE and all plugins
67+
68+
```bash
69+
sudo apt upgrade "consulo*"
70+
```
71+
72+
### Update plugins only
73+
74+
```bash
75+
sudo apt upgrade "consulo-plugin-*"
76+
```
77+
78+
### Remove a plugin
79+
80+
```bash
81+
sudo apt remove consulo-plugin-com.intellij.git
82+
```
83+
84+
---
85+
86+
## DNF / YUM — Fedora / RHEL / CentOS
87+
88+
### Add repository
89+
90+
Create `/etc/yum.repos.d/consulo.repo`:
91+
92+
```ini
93+
[consulo-release]
94+
name=Consulo Plugin Repository (release)
95+
baseurl=https://api.consulo.io/rpm/release
96+
enabled=1
97+
gpgcheck=0
98+
```
99+
100+
Or for a different channel, e.g. beta:
101+
102+
```ini
103+
[consulo-beta]
104+
name=Consulo Plugin Repository (beta)
105+
baseurl=https://api.consulo.io/rpm/beta
106+
enabled=1
107+
gpgcheck=0
108+
```
109+
110+
### Install the IDE
111+
112+
```bash
113+
sudo dnf install consulo-with-jdk
114+
```
115+
116+
### Install a plugin
117+
118+
```bash
119+
sudo dnf install consulo-plugin-com.intellij.git
120+
```
121+
122+
### Update IDE and all plugins
123+
124+
```bash
125+
sudo dnf upgrade "consulo*"
126+
```
127+
128+
---
129+
130+
## Zypper — openSUSE
131+
132+
### Add repository
133+
134+
```bash
135+
sudo zypper addrepo --no-gpgcheck \
136+
https://api.consulo.io/rpm/release \
137+
consulo-release
138+
sudo zypper refresh
139+
```
140+
141+
### Install a plugin
142+
143+
```bash
144+
sudo zypper install consulo-plugin-com.intellij.git
145+
```
146+
147+
### Update all Consulo packages
148+
149+
```bash
150+
sudo zypper update consulo*
151+
```
152+
153+
---
154+
155+
## Pacman — Arch Linux / Manjaro
156+
157+
### Add repository
158+
159+
Add to `/etc/pacman.conf` (before the `[extra]` section):
160+
161+
```ini
162+
[consulo-release]
163+
Server = https://api.consulo.io/pacman/release
164+
SigLevel = Never
165+
```
166+
167+
Then sync:
168+
169+
```bash
170+
sudo pacman -Sy
171+
```
172+
173+
> `SigLevel = Never` is required until package signing is set up.
174+
175+
### Install the IDE
176+
177+
```bash
178+
sudo pacman -S consulo-with-jdk
179+
```
180+
181+
### Install a plugin
182+
183+
```bash
184+
sudo pacman -S consulo-plugin-com.intellij.git
185+
```
186+
187+
Both `consulo-with-jdk` and `consulo-without-jdk` provide the virtual package `consulo`,
188+
which plugin packages depend on.
189+
190+
### Update IDE and all plugins
191+
192+
```bash
193+
sudo pacman -Syu
194+
```
195+
196+
---
197+
198+
## Homebrew — macOS
199+
200+
Formulas are hosted in per-channel tap repositories on GitHub.
201+
202+
### Add tap
203+
204+
```bash
205+
brew tap consulo/release
206+
```
207+
208+
Homebrew infers the URL from the tap name (`consulo/release``https://github.com/consulo/homebrew-release`).
209+
You can also specify it explicitly:
210+
211+
```bash
212+
brew tap consulo/release https://github.com/consulo/homebrew-release
213+
```
214+
215+
For other channels (replace `release` with `beta`, `alpha`, or `nightly`):
216+
```bash
217+
brew tap consulo/nightly
218+
# resolves to https://github.com/consulo/homebrew-nightly
219+
```
220+
221+
### Install the IDE
222+
223+
```bash
224+
# With bundled JDK (recommended)
225+
brew install consulo-with-jdk
226+
227+
# Without bundled JDK (uses system Java)
228+
brew install consulo-without-jdk
229+
```
230+
231+
### Install a plugin
232+
233+
```bash
234+
brew install consulo-plugin-com.intellij.git
235+
```
236+
237+
### Update IDE and all plugins
238+
239+
```bash
240+
brew upgrade --greedy "consulo*"
241+
```
242+
243+
### Direct install (without adding a tap)
244+
245+
Formula files can be installed directly by URL without adding a tap:
246+
247+
```bash
248+
brew install https://api.consulo.io/homebrew/release/formula/consulo-plugin-com.intellij.git.rb
249+
```
250+
---
251+
252+
## WinGet — Windows
253+
254+
Consulo is available as a WinGet REST source, covering both the IDE and plugins.
255+
256+
### Add source
257+
258+
```powershell
259+
winget source add --name consulo --arg https://api.consulo.io/winget/{channel} --type Microsoft.Rest
260+
```
261+
262+
Example (release channel):
263+
```powershell
264+
winget source add --name consulo --arg https://api.consulo.io/winget/release --type Microsoft.Rest
265+
```
266+
267+
### Install the IDE
268+
269+
```powershell
270+
winget install consulo.with-jdk
271+
```
272+
273+
### Install a plugin
274+
275+
```powershell
276+
winget install consulo.plugin-com.intellij.git
277+
```
278+
279+
### Update IDE and all plugins
280+
281+
```powershell
282+
winget upgrade --source consulo --all
283+
```
284+
285+
### Remove source
286+
287+
```powershell
288+
winget source remove consulo
289+
```
290+
291+
---
292+
293+
## Platform package names
294+
295+
| Linux/macOS package | WinGet ID | Description |
296+
|---------------------|-----------|-------------|
297+
| `consulo-with-jdk` | `consulo.with-jdk` | Consulo IDE with bundled JDK (recommended) |
298+
| `consulo-without-jdk` | `consulo.without-jdk` | Consulo IDE without bundled JDK (requires system Java 21+) |
299+
| `consulo-plugin-{id}` | `consulo.plugin-{id}` | Plugin with the given plugin ID |
300+
301+
Plugin packages declare a dependency on `consulo-with-jdk` **or** `consulo-without-jdk`,
302+
so installing any plugin will automatically pull in the IDE if not already installed.
303+
304+
## Plugin naming convention
305+
306+
Plugin IDs map directly to package names:
307+
308+
```
309+
Plugin ID: com.intellij.git
310+
Package name: consulo-plugin-com.intellij.git
311+
312+
Plugin ID: org.jetbrains.plugins.gradle
313+
Package name: consulo-plugin-org.jetbrains.plugins.gradle
314+
```

hub-backend/pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<dependency>
7272
<groupId>org.apache.commons</groupId>
7373
<artifactId>commons-lang3</artifactId>
74-
<version>3.4</version>
74+
<version>3.17.0</version>
7575
</dependency>
7676

7777
<dependency>
@@ -262,6 +262,12 @@
262262
<artifactId>commons-logging</artifactId>
263263
<version>1.3.5</version>
264264
</dependency>
265+
266+
<dependency>
267+
<groupId>org.apache.velocity</groupId>
268+
<artifactId>velocity-engine-core</artifactId>
269+
<version>2.4.1</version>
270+
</dependency>
265271
</dependencies>
266272

267273
<build>

hub-backend/src/main/java/consulo/hub/backend/BackendSecurity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ public OAuth2ClientCredentialsAuthenticationProvider postProcess(OAuth2ClientCre
255255

256256
registry.requestMatchers("/error").permitAll();
257257

258+
// package manager repository endpoints (APT, RPM, Pacman, Homebrew)
259+
registry.requestMatchers("/api/apt/**").permitAll();
260+
registry.requestMatchers("/api/rpm/**").permitAll();
261+
registry.requestMatchers("/api/pacman/**").permitAll();
262+
registry.requestMatchers("/api/homebrew/**").permitAll();
263+
258264
registry.requestMatchers("/**").denyAll();
259265
});
260266

hub-backend/src/main/java/consulo/hub/backend/repository/cleanup/RepositoryCleanupService.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,13 @@ public void runCleanUp() {
176176
}
177177

178178
for (PluginNode node : pluginNodes) {
179-
filesToRemove.add(Objects.requireNonNull(node.targetPath));
179+
Path artifactPath = Objects.requireNonNull(node.targetPath);
180+
filesToRemove.add(artifactPath);
181+
182+
// co-located native packages built by PluginPackageStore
183+
Path pkgDir = artifactPath.getParent();
184+
filesToRemove.add(pkgDir.resolve(node.id + "_" + node.version + ".deb"));
185+
filesToRemove.add(pkgDir.resolve(node.id + "_" + node.version + ".pkg.tar.gz"));
180186

181187
state.remove(node.version, node.platformVersion);
182188
}

0 commit comments

Comments
 (0)