Skip to content

Commit

Permalink
feat: Sync from downstream (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonN3 authored Feb 28, 2024
1 parent 76fa2f0 commit f1756f7
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 15 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Existing Dockerfile",
// "build": {
// "context": "..",
// "dockerfile": "../Dockerfile",
// "dockerfile": "../Containerfile",
// "args": {
// "version": "39"
// }
Expand All @@ -13,4 +13,5 @@
"overrideCommand": true,
"shutdownAction": "stopContainer",
"privileged": true
}
}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
/lorax.conf
/output
/*.log

3 changes: 2 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ RUN dnf install -y make && make install-deps

VOLUME /build-container-installer/build

ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ build/deploy.iso: boot.iso container/$(IMAGE_NAME)-$(IMAGE_TAG) xorriso/input.t

# Step 1: Generate Lorax Templates
lorax_templates/%.tmpl: lorax_templates/%.tmpl.in
$(eval _VARS = IMAGE_NAME IMAGE_TAG IMAGE_REPO_DOUBLE_ESCAPED)
$(eval _VARS = IMAGE_NAME IMAGE_TAG _IMAGE_REPO_DOUBLE_ESCAPED)
$(foreach var,$(_VARS),$(var)=$($(var))) envsubst '$(foreach var,$(_VARS),$$$(var))' < $(_BASE_DIR)/lorax_templates/$*.tmpl.in > $(_BASE_DIR)/lorax_templates/$*.tmpl


Expand Down Expand Up @@ -98,9 +98,9 @@ clean:
rm -f $(_BASE_DIR)/lorax.conf || true
rm -f $(_BASE_DIR)/*.iso || true
rm -f $(_BASE_DIR)/*.log || true


install-deps:
dnf install -y lorax xorriso podman

.PHONY: clean install-deps
.PHONY: clean install-deps

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Use existing container image:
"name": "Existing Dockerfile",
// "build": {
// "context": "..",
// "dockerfile": "../Dockerfile",
// "dockerfile": "../Containerfile",
// "args": {
// "version": "39"
// }
Expand All @@ -95,7 +95,7 @@ Build a new container image:
"name": "Existing Dockerfile",
"build": {
"context": "..",
"dockerfile": "../Dockerfile",
"dockerfile": "../Containerfile",
"args": {
"version": "39"
}
Expand All @@ -105,4 +105,5 @@ Build a new container image:
"shutdownAction": "stopContainer",
"privileged": true
}
```
```

1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ runs:
IMAGE_TAG=${{ inputs.image_tag || inputs.version }} \
WEB_UI=${{ inputs.web_ui }} \
"ADDITIONAL_TEMPLATES=${{ inputs.additional_templates }}"
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ mkdir /github/workspace/build || true

# Copy resulting iso to github workspace and fix permissions
cp build/deploy.iso /github/workspace/build
chmod -R ugo=rwX /github/workspace/build
chmod -R ugo=rwX /github/workspace/build

7 changes: 4 additions & 3 deletions lorax_templates/configure_upgrades.tmpl.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
append usr/share/anaconda/interactive-defaults.ks "%post --erroronfail"
append usr/share/anaconda/interactive-defaults.ks "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${IMAGE_REPO_DOUBLE_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}/' /ostree/deploy/default/deploy/*.origin"
append usr/share/anaconda/interactive-defaults.ks "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${_IMAGE_REPO_DOUBLE_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}/' /ostree/deploy/default/deploy/*.origin"
append usr/share/anaconda/interactive-defaults.ks "%end"

append usr/share/anaconda/post-scripts/configure_upgrades.ks "%post --erroronfail"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${IMAGE_REPO_DOUBLE_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}/' /ostree/deploy/default/deploy/*.origin"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "%end"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "sed -i 's/container-image-reference=.*/container-image-reference=ostree-image-signed:docker:\/\/${_IMAGE_REPO_DOUBLE_ESCAPED}\/${IMAGE_NAME}:${IMAGE_TAG}/' /ostree/deploy/default/deploy/*.origin"
append usr/share/anaconda/post-scripts/configure_upgrades.ks "%end"

3 changes: 2 additions & 1 deletion lorax_templates/set_installer.tmpl.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
append usr/share/anaconda/interactive-defaults.ks "ostreecontainer --url=/run/install/repo/${IMAGE_NAME}-${IMAGE_TAG} --transport=oci --no-signature-verification"
append usr/share/anaconda/interactive-defaults.ks "ostreecontainer --url=/run/install/repo/${IMAGE_NAME}-${IMAGE_TAG} --transport=oci --no-signature-verification"

3 changes: 2 additions & 1 deletion xorriso/gen_input.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ do
echo "-chmod 0444 ${file}"
done
popd > /dev/null
echo "-end"
echo "-end"

0 comments on commit f1756f7

Please sign in to comment.