Skip to content

Commit 5ccd9a6

Browse files
authored
Merge pull v0.4.7.0
Merge pull v0.4.7.0
2 parents 5955036 + 7e32eb9 commit 5ccd9a6

35 files changed

+831
-317
lines changed

.github/workflows/release.yml

Lines changed: 76 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ jobs:
3434
with:
3535
go-version: '1.25.x'
3636

37-
- name: Cache Go modules
38-
uses: actions/cache@v4
39-
with:
40-
path: ~/go/pkg/mod
41-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
42-
restore-keys: |
43-
${{ runner.os }}-go-
44-
4537
- name: Install dependencies
4638
run: go mod download
4739

@@ -117,12 +109,33 @@ jobs:
117109
fi
118110
done
119111
112+
- name: Generate SHA256 checksums
113+
run: |
114+
OS="${{ matrix.os }}"
115+
ARCH="${{ matrix.arch }}"
116+
CHECKSUMS_FILE="checksums-${OS}-${ARCH}.sha256"
117+
118+
echo "Generating SHA256 checksums for ${OS}-${ARCH} binaries..."
119+
cd build
120+
sha256sum * > "../${CHECKSUMS_FILE}"
121+
cd ..
122+
123+
echo "CHECKSUMS_FILE=${CHECKSUMS_FILE}" >> $GITHUB_ENV
124+
echo ""
125+
echo "Generated checksums for ${OS}-${ARCH}:"
126+
echo "================================="
127+
cat "${CHECKSUMS_FILE}"
128+
120129
- name: Create release archive
121130
run: |
122131
VERSION="${{ steps.version.outputs.version }}"
123132
OS="${{ matrix.os }}"
124133
ARCH="${{ matrix.arch }}"
125134
ARCHIVE_NAME="go-pugleaf-v${VERSION}-${OS}-${ARCH}"
135+
136+
# Include checksums in the archive
137+
cp "${{ env.CHECKSUMS_FILE }}" build/checksums.sha256
138+
126139
if [ "${{ matrix.os }}" = "windows" ]; then
127140
zip -r "${ARCHIVE_NAME}.zip" build/ README.md LICENSE
128141
echo "ARCHIVE_FILE=${ARCHIVE_NAME}.zip" >> $GITHUB_ENV
@@ -135,7 +148,9 @@ jobs:
135148
uses: actions/upload-artifact@v4
136149
with:
137150
name: go-pugleaf-${{ matrix.os }}-${{ matrix.arch }}
138-
path: ${{ env.ARCHIVE_FILE }}
151+
path: |
152+
${{ env.ARCHIVE_FILE }}
153+
${{ env.CHECKSUMS_FILE }}
139154
140155
release:
141156
name: Create release
@@ -163,6 +178,38 @@ jobs:
163178
with:
164179
path: artifacts
165180

181+
- name: Create comprehensive checksums file
182+
run: |
183+
echo "Creating comprehensive SHA256 checksums file..."
184+
echo "# Go-Pugleaf v${{ steps.version.outputs.version }} - SHA256 Checksums" > SHA256SUMS.txt
185+
echo "# Generated on $(date -u '+%Y-%m-%d %H:%M:%S UTC')" >> SHA256SUMS.txt
186+
echo "" >> SHA256SUMS.txt
187+
188+
# Process each platform's checksums
189+
for artifact_dir in artifacts/go-pugleaf-*; do
190+
if [ -d "$artifact_dir" ]; then
191+
platform=$(basename "$artifact_dir" | sed 's/go-pugleaf-//')
192+
echo "## Platform: $platform" >> SHA256SUMS.txt
193+
194+
# Find and process checksums file for this platform
195+
checksums_file=$(find "$artifact_dir" -name "checksums-*.sha256" | head -1)
196+
if [ -f "$checksums_file" ]; then
197+
echo "Processing checksums for $platform..."
198+
while IFS= read -r line; do
199+
# Extract hash and filename
200+
hash=$(echo "$line" | cut -d' ' -f1)
201+
filename=$(echo "$line" | cut -d' ' -f2-)
202+
echo "$hash $filename ($platform)" >> SHA256SUMS.txt
203+
done < "$checksums_file"
204+
fi
205+
echo "" >> SHA256SUMS.txt
206+
fi
207+
done
208+
209+
echo "Comprehensive checksums file created:"
210+
echo "====================================="
211+
cat SHA256SUMS.txt
212+
166213
- name: Create release
167214
uses: softprops/action-gh-release@v2
168215
with:
@@ -193,8 +240,27 @@ jobs:
193240
- macOS (amd64, arm64)
194241
- Windows (amd64)
195242
243+
### Binary Verification:
244+
All binaries include SHA256 checksums for integrity verification:
245+
- **SHA256SUMS.txt** - Comprehensive checksums for all platforms
246+
- **checksums-{os}-{arch}.sha256** - Individual platform checksums
247+
- Each archive also contains a `checksums.sha256` file for verification after extraction
248+
249+
**Verification Examples:**
250+
```bash
251+
# Verify individual platform binaries
252+
sha256sum -c checksums-linux-amd64.sha256
253+
254+
# Verify after archive extraction
255+
tar -xzf go-pugleaf-v${{ steps.version.outputs.version }}-linux-amd64.tar.gz
256+
cd build/
257+
sha256sum -c checksums.sha256
258+
```
259+
196260
Extract the archive for your platform and run the binaries.
197261
See README.md for usage instructions.
198-
files: artifacts/*/*
262+
files: |
263+
artifacts/*/*
264+
SHA256SUMS.txt
199265
draft: false
200266
prerelease: false

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ go.work
2929
/demo_history
3030
internal/nntp/analysis_*
3131
update.tar.gz
32+
checksums.sha256
33+
checksums.sha256.archive
3234
active_files/local-mode.active.filtered
3335
active_files/local-mode.active.filtered.sorted
3436
active_files/local-mode.active.new

.update

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 57 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -53,31 +53,31 @@ git checkout testing-001
5353
### Initial Setup
5454

5555
1. **Create admin account** - Choose one of two methods:
56-
- **Web registration**: First registered user becomes administrator
57-
- **Command line**: Use the usermgr tool to create admin users directly
58-
```bash
59-
go build -o build/usermgr ./cmd/usermgr
60-
mv build/usermgr .
61-
./usermgr -create -username admin -email admin@example.com -display "Administrator" -admin
62-
```
56+
- **Web registration**: First registered user becomes administrator
57+
- **Command line**: Use the usermgr tool to create admin users directly
58+
```bash
59+
./build_usermgr.sh
60+
mv build/usermgr .
61+
./usermgr -create -username admin -email admin@example.com -display "Administrator" -admin
62+
```
6363
2. **Secure your instance** - Login → Statistics → Disable registrations
6464
3. **Add newsgroups** - Admin → Add groups you want to follow
65-
- or bulk import newsgroups
65+
- Or bulk import newsgroups:
6666
```bash
67-
./webserver -import-active preload/active.txt
68-
./webserver -update-desc preload/newsgroups.descriptions
69-
- rslight section import:
70-
- see etc/menu.conf and creating sections aka folders in etc/ containing a groups.txt
71-
- like etc/section/groups.txt
67+
./webserver -import-active preload/active.txt -nntphostname your.domain.com
68+
./webserver -update-desc preload/newsgroups.descriptions -nntphostname your.domain.com
7269
./rslight-importer -data data -etc etc -spool spool -nntphostname your.domain.com
73-
- spool folder can be empty if you don't want to import rocksolid backups.
7470
```
71+
- rslight section import: see etc/menu.conf and creating sections aka folders in etc/ containing a groups.txt (e.g., etc/section/groups.txt)
72+
- spool folder can be empty if you don't want to import rocksolid backups.
7573
4. **Configure provider** - Admin → Providers (defaults works)
7674

7775
5. **Limit Connections**
78-
- Please limit to max 500 connections at lux-feed1.newsdeef.eu
76+
- Please limit to max 50 connections at 81-171-22-215.pugleaf.net
7977
- this is a free service and we want to keep it running for everyone.
8078
- blueworldhosting and eternal-september have hardcoded limit of 3 conns!
79+
- There is NO NEED to download all usenet from archives again!
80+
- Unfiltered databases will be shared via torrent soon!
8181

8282
6. **Fetch articles** - Use `pugleaf-fetcher` to download articles from subscribed groups
8383
7. **Runtime Mode** - Set connections to max 10 when your back filling is finished.
@@ -163,7 +163,7 @@ The usermgr tool is particularly useful for:
163163
- Batch user management and automation
164164
- Managing users when web interface is unavailable
165165

166-
📖 **For complete documentation of all 19 available binaries and their flags, see [Binary Documentation](#-binary-documentation) below.**
166+
📖 **For complete documentation of all 19 available binaries and their flags, see [Binary Documentation](#binary-documentation) below.**
167167

168168
### Building individual tools
169169

@@ -180,6 +180,43 @@ Or build a single tool manually, e.g.:
180180
go build -o build/usermgr ./cmd/usermgr
181181
```
182182

183+
### Building and Release
184+
185+
**Build all binaries:**
186+
```bash
187+
# Build all binaries (automatically generates checksums)
188+
./build_ALL.sh
189+
```
190+
191+
**Generate checksums manually:**
192+
```bash
193+
# Generate SHA256 checksums for all executables in build/
194+
./createChecksums.sh
195+
```
196+
197+
**Build and create release package:**
198+
```bash
199+
# Build all binaries and create release package with checksums
200+
./build_ALL.sh update
201+
```
202+
203+
This creates:
204+
- `checksums.sha256` - SHA256 hashes for all individual executables (with build/ paths)
205+
- `checksums.sha256.archive` - SHA256 hashes with relative paths for archive inclusion
206+
- `update.tar.gz` - Compressed archive of all binaries including checksums.sha256
207+
- `.update` - SHA256 hash of the tar.gz file
208+
209+
**Verify checksums:**
210+
```bash
211+
# Verify all executable checksums (from repository root)
212+
sha256sum -c checksums.sha256
213+
214+
# Verify checksums after extracting release archive
215+
tar -xzf update.tar.gz
216+
cd extracted-directory/
217+
sha256sum -c checksums.sha256 # Verify all executables in release
218+
```
219+
183220
## 📚 Binary Documentation
184221

185222
go-pugleaf includes command-line applications for various newsgroup management tasks.
@@ -190,6 +227,7 @@ go-pugleaf includes command-line applications for various newsgroup management t
190227

191228
#### `webserver` (cmd/web)
192229
**Main web interface**
230+
```bash
193231
./webserver -nntphostname your.domain.com
194232
```
195233

@@ -252,7 +290,7 @@ go-pugleaf includes command-line applications for various newsgroup management t
252290
- `-nntphostname string` - Your hostname must be set!
253291

254292
**Connection Configuration:**
255-
- `-host string` - NNTP hostname (default: "lux-feed1.newsdeef.eu")
293+
- `-host string` - NNTP hostname (default: "81-171-22-215.pugleaf.net")
256294
- `-port int` - NNTP port (default: 563)
257295
- `-username string` - NNTP username (default: "read")
258296
- `-password string` - NNTP password (default: "only")
@@ -303,7 +341,7 @@ go-pugleaf includes command-line applications for various newsgroup management t
303341
```
304342

305343
**Connection Configuration:**
306-
- `-host string` - NNTP hostname (default: "lux-feed1.newsdeef.eu")
344+
- `-host string` - NNTP hostname (default: "81-171-22-215.pugleaf.net")
307345
- `-port int` - NNTP port (default: 563)
308346
- `-username string` - NNTP username (default: "read")
309347
- `-password string` - NNTP password (default: "only")
@@ -573,3 +611,4 @@ GPL v2 - see [LICENSE](LICENSE)
573611
This project is inspired by the work of Thomas "Retro Guy" Miller and the original RockSolid Light project.
574612

575613
-- the pugleaf.net development team -
614+
```

appVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.6.9
1+
4.7.0

build_ALL.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ rm -v build/*
1717
./build_recover-db.sh
1818
./build_expire-news.sh
1919

20+
# Always generate checksums after building
21+
echo "Generating checksums for built executables..."
22+
./createChecksums.sh
23+
2024
test "$1" = "update" && ./createUpdate.sh

build_webserver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22
echo "$0"
3-
go build -race -o build/webserver -ldflags "-X main.appVersion=$(cat appVersion.txt)" ./cmd/web/
3+
GOEXPERIMENT=greenteagc go build -race -o build/webserver -ldflags "-X main.appVersion=$(cat appVersion.txt)" ./cmd/web/
44
exit $?

cmd/nntp-analyze/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func main() {
129129

130130
// Command line flags for NNTP server connection
131131
var (
132-
host = flag.String("host", "lux-feed1.newsdeef.eu", "NNTP hostname")
132+
host = flag.String("host", "81-171-22-215.pugleaf.net", "NNTP hostname")
133133
port = flag.Int("port", 563, "NNTP port")
134134
username = flag.String("username", "read", "NNTP username")
135135
password = flag.String("password", "only", "NNTP password")

0 commit comments

Comments
 (0)