Skip to content

Commit

Permalink
Check debian rules file content
Browse files Browse the repository at this point in the history
  • Loading branch information
ononoki1 committed Feb 15, 2024
1 parent 6985d31 commit 4d34865
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: build
on:
schedule:
- cron: '0 */12 * * *'
- cron: "0 0 * * *"
push:
branches: [ main ]
paths:
- '**.sh'
branches: [main]
paths:
- "**.sh"
- Dockerfile
workflow_dispatch:
jobs:
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Upload
uses: actions/[email protected]
with:
name: v5.${{ env.minor }}.${{ env.patch }}
name: v6.${{ env.minor }}.${{ env.patch }}
path: /home/runner/work/_temp/_github_home/nginx.deb
- name: Update
if: ${{ env.change }}
Expand All @@ -33,5 +33,5 @@ jobs:
with:
files: /home/runner/work/_temp/_github_home/nginx.deb
body: "SHA256: ${{ env.hash }}"
tag_name: v5.${{ env.minor }}.${{ env.patch }}
tag_name: v6.${{ env.minor }}.${{ env.patch }}
generate_release_notes: false
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: test
on:
push:
branches-ignore: [ main ]
branches-ignore: [main]
paths:
- '**.sh'
- "**.sh"
- Dockerfile
workflow_dispatch:
jobs:
Expand All @@ -18,5 +18,5 @@ jobs:
- name: Upload
uses: actions/[email protected]
with:
name: v5.${{ env.minor }}.${{ env.patch }}
name: v6.${{ env.minor }}.${{ env.patch }}
path: /home/runner/work/_temp/_github_home/nginx.deb
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM debian:bullseye-slim
FROM debian:bullseye
COPY build.sh /build.sh
ENTRYPOINT ["bash", "/build.sh"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you really need these directives, you should consider [nginx-quictls](https:/

## Removed modules

- All modules that are not built by default, except `http_ssl_module`, `http_sub_module` and `http_v2_module`
- All modules that are not built by default, except `http_ssl_module` and `http_v2_module`
- `http_access_module`
- `http_autoindex_module`
- `http_browser_module`
Expand Down Expand Up @@ -65,9 +65,9 @@ For example, if you want to add `http_scgi_module` back, you need to remove `--h

## Use in another distribution

Fork this repo, enable GitHub Actions, edit `Dockerfile` and `build.sh`, and change `bullseye-slim` to the one you like. Then wait for GitHub Actions to run. After it finishes, you can download from releases.
Fork this repo, enable GitHub Actions, edit `Dockerfile` and `build.sh`, and change `bullseye` to the one you like. Then wait for GitHub Actions to run. After it finishes, you can download from releases.

For example, if you want to use in Debian bookworm, you need to change `bullseye-slim` to `bookworm-slim` in `Dockerfile`.
For example, if you want to use in Debian buster, you need to change `bullseye` to `buster`.

Note: if you are using newer version of Debian (e.g. Debian bookworm or unstable), you can simply use releases from this repo as Debian is backward compatible.

Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ git clone --depth 1 --recursive https://github.com/openresty/headers-more-nginx-
echo Build nginx.
cd ..
sed -i 's|NGINX Packaging <[email protected]>|ononoki <[email protected]>|g' control
cat rules
exit 1
sed -i 's|CFLAGS=""|CFLAGS="-Wno-ignored-qualifiers"|g' rules
sed -i 's|--sbin-path=/usr/sbin/nginx|--sbin-path=/usr/sbin/nginx --add-module=$(CURDIR)/debian/modules/ngx_brotli --add-module=$(CURDIR)/debian/modules/ngx_http_geoip2_module --add-module=$(CURDIR)/debian/modules/headers-more-nginx-module|g' rules
sed -i 's|--with-cc-opt="$(CFLAGS)" --with-ld-opt="$(LDFLAGS)"|--with-cc-opt="-I../modules/boringssl/include $(CFLAGS)" --with-ld-opt="-L../modules/boringssl/build/ssl -L../modules/boringssl/build/crypto $(LDFLAGS)"|g' rules
Expand Down

0 comments on commit 4d34865

Please sign in to comment.