Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

56 components/ca-certificates getting xhr error (#115) #116

Merged
merged 12 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,13 @@ jobs:
run: |
${IGNITE} checkout installer/image.yml ${SERVER_REPO_PATH}/releases/${VERSION}/
(cd ${SERVER_REPO_PATH}/releases/${VERSION}/; zsyncmake -b 2048 -C -u ${SERVER_REPO_URL}/releases/${VERSION}/rlxos-x86_64-${VERSION}.iso rlxos-x86_64-${VERSION}.iso)

- name: Update Extensions
run: |
for ext in elements/extensions/*.yml ; do
ELEMENT=${ext#*/}
EXT_ID=${ELEMENT#*/}
EXT_ID=${EXT_ID%.*}
${IGNITE} build ${ELEMENT}
COMMIT_MESSAGE="UPDATED WITH BASE" OSTREE_BRANCH="x86_64/extension/${EXT_ID}/${VERSION}" ELEMENT_FILE=${ELEMENT} make update-ostree
done
2 changes: 0 additions & 2 deletions TODO.ELEMENTS
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ components/gc.yml: check patch
components/openjdk.yml: fix update url
components/nvidia-settings.yml: check patch
components/udisks.yml: check update url
components/make-ca.yml: fix certdata.txt file
components/make-ca.yml: do we need this after ca-certificates
components/openjdk-bin.yml: fix update url
components/openldap.yml: fix post-script and configurations
components/apr-util.yml: fix update url
Expand Down
2 changes: 1 addition & 1 deletion elements/collections/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ merge: [version.yml, elements/include/meta.yml]

depends:
- components/busybox.yml
- components/ca-certificates.yml
- components/make-ca.yml
- components/coreutils.yml
- components/dbus.yml
- components/diffutils.yml
Expand Down
10 changes: 0 additions & 10 deletions elements/components/at-spi2-atk.yml

This file was deleted.

15 changes: 0 additions & 15 deletions elements/components/ca-certificates.yml

This file was deleted.

2 changes: 1 addition & 1 deletion elements/components/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ script: |

depends:
- components/busybox.yml
- components/ca-certificates.yml
- components/make-ca.yml
- components/coreutils.yml
- components/dbus.yml
- components/diffutils.yml
Expand Down
3 changes: 1 addition & 2 deletions elements/components/curl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ sources:
build-type: autotools
depends:
- components/glibc.yml
- components/ca-certificates.yml
configure: >-
--enable-threaded-resolver
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
--with-ca-path=/etc/ssl/certs
--with-openssl
4 changes: 1 addition & 3 deletions elements/components/gnutls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ about:
transport layer

configure: >-
--disable-guile
--disable-rpath
--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt
--with-default-trust-store-pkcs11="pkcs11:"

depends:
- components/nettle.yml
Expand Down
2 changes: 1 addition & 1 deletion elements/components/gtk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build-depends:
- components/gtk-doc.yml

depends:
- components/at-spi2-atk.yml
- components/at-spi2-core.yml
- components/gdk-pixbuf.yml
- components/libepoxy.yml
- components/pango.yml
Expand Down
2 changes: 2 additions & 0 deletions elements/components/libcap-ng.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ id: libcap-ng
version: 0.8.3
about: A library for Linux that makes using posix capabilities easy

build-type: autotools

configure: >-
--enable-static=no
--without-python
Expand Down
19 changes: 12 additions & 7 deletions elements/components/make-ca.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
id: make-ca
version: "1.7"
version: 1.13
about: MakeCA
release: 0

depends:
- components/p11-kit.yml
- components/nss.yml
sources:
- https://github.com/djlucas/make-ca/releases/download/v1.7/make-ca-1.7.tar.xz
- https://github.com/lfs-book/make-ca/releases/download/v%{version}/make-ca-%{version}.tar.xz

script: |-
# install -v -D -m 0644 /files/certdata.txt -t %{install-root}%{sysconfdir}/ssl/
make install LIBEXECDIR=/usr/lib SBINDIR=/usr/bin DESTDIR=%{install-root}
make install LIBEXECDIR=%{libdir}/make-ca SBINDIR=%{bindir} DESTDIR=%{install-root}

install -vDm 0754 /dev/stdin %{install-root}%{sysconfdir}/cron.weekly/update-pki.sh << "EOF"
#!/bin/bash
%{bindir}/make-ca -g
EOF

# TODO: fix certdata.txt file
# TODO: do we need this after ca-certificates
integration: |-
make-ca -g
2 changes: 1 addition & 1 deletion elements/components/mercurial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ script: |-
install -m 755 -d %{install-root}%{sysconfdir}/mercurial
cat <<-EOF > %{install-root}%{sysconfdir}/mercurial/hgrc
[web]
cacerts = %{sysconfdir}/ssl/certs/ca-certificates.crt
cacerts = %{sysconfdir}/pki/tls/certs/ca-bundle.crt
EOF
1 change: 0 additions & 1 deletion elements/components/mono.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ version: 6.12.0.205
about: Free implementation of the .NET platform including runtime and compiler

depends:
- components/ca-certificates.yml
- components/libgdiplus.yml
- components/python.yml
- components/zlib.yml
Expand Down
26 changes: 26 additions & 0 deletions elements/components/networkmanager-openvpn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
id: networkmanager-openvpn
version: 1.10.2
about: NetworkManager VPN plugin for OpenVPN

build-type: autotools

pre-script: |-
autoreconf -fiv

variables:
run-autogen: false
seperate-build-dir: false

depends:
- components/libnma.yml
- components/libsecret.yml
- components/openvpn.yml
- components/networkmanager.yml

post-script: |-
install -v -D -m 0644 /dev/stdin %{install-root}/%{libdir}/sysusers.d/%{id}.conf << "EOF"
u nm-openvpn - "NetworkManager OpenVPN"
EOF

sources:
- https://gitlab.gnome.org/GNOME/NetworkManager-openvpn/-/archive/%{version}/NetworkManager-openvpn-%{version}.tar.gz
47 changes: 47 additions & 0 deletions elements/components/openvpn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
id: openvpn
version: 2.6.8
about: An easy-to-use, robust and highly configurable VPN (Virtual Private Network)

build-type: autotools

pre-script: |-
sed -i '/^CONFIGURE_DEFINES=/s/set/env/g' configure.ac
patch -Np1 -i /patches/%{id}/0001-unprivileged.patch

autoreconf --force --install

configure: >-
--enable-plugins
--enable-systemd
--enable-x509-alt-username

post-script: |-
install -v -D -m 0644 /dev/stdin %{install-root}/%{libdir}/sysusers.d/%{id}.conf << "EOF"
u openvpn - "OpenVPN"
EOF

install -v -D -m 0644 /dev/stdin %{install-root}/%{libdir}/tmpfiles.d/%{id}.conf << "EOF"
d /etc/openvpn/client 0750 openvpn network -
d /etc/openvpn/server 0750 openvpn network -
d /run/openvpn-client 0750 openvpn network -
d /run/openvpn-server 0750 openvpn network -
EOF

for FILE in $(find contrib -type f); do
case "$(file --brief --mime-type --no-sandbox "${FILE}")" in
"text/x-shellscript")
install -D -m0755 ${FILE} "%{install-root}/%{datadir}/%{id}/${FILE}" ;;
*)
install -D -m0644 ${FILE} "%{install-root}/%{datadir}/%{id}/${FILE}" ;;
esac
done

depends:
- components/lz4.yml
- components/lzo.yml
- components/openssl.yml
- components/libnl.yml
- components/libcap-ng.yml

sources:
- https://github.com/OpenVPN/openvpn/releases/download/v%{version}/openvpn-%{version}.tar.gz
15 changes: 11 additions & 4 deletions elements/components/p11-kit.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
id: p11-kit
version: 0.25.0
version: 0.25.3
about: |
Provides a way to load and enumerate PKCS #11 (a Cryptographic Token Interface Standard) modules

pre-script: |-
sed '20,$ d' -i trust/trust-extract-compat
cat >> trust/trust-extract-compat << "EOF"
%{libdir}/make-ca/copy-trust-modifications
%{bindir}/make-ca -f -g
EOF

post-script: |-
ln -sfv ./pkcs11/p11-kit-trust.so %{install-root}%{libdir}/libnssckbi.so

build-type: autotools
ln -s %{libdir}/p11-kit/trust-extract-compat %{install-root}%{bindir}/update-ca-trust

configure: >-
--with-trust-paths=%{sysconfdir}/pki/anchors
-D trust_paths=%{sysconfdir}/pki/anchors
-D module_path=%{libdir}/pkcs11

depends:
- components/libtasn1.yml
Expand Down
3 changes: 2 additions & 1 deletion elements/components/qemu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ post-script: |-
# chgrp kvm %{install-root}/%{libdir}/qemu-bridge-helper
chmod -v 4750 %{install-root}/%{libdir}/qemu-bridge-helper

rmdir %{install-root}/var/run

configure: >-
--audio-drv-list=alsa
--smbd=/usr/bin/smbd
--target-list=x86_64-softmmu
--enable-modules
--enable-sdl
--enable-gtk
Expand Down
1 change: 0 additions & 1 deletion elements/components/rustc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ build-depends:
- components/cmake.yml
- components/gdb.yml
- components/ninja.yml
- components/ca-certificates.yml

sources:
- https://static.rust-lang.org/dist/rustc-%{version}-src.tar.xz
Expand Down
2 changes: 1 addition & 1 deletion elements/components/swupd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 0.1.0
about: Software Updater Daemon

variables:
commit: 35e069d6ee4e2df2f8c31b5a30ff86e1127a6e74
commit: 226c4c21b652821e073efb267bcce2ff08de6b84

post-script: |-
install -v -D -m 0755 -t %{install-root}%{bindir} target/release/%{id}
Expand Down
1 change: 0 additions & 1 deletion elements/components/wget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ sources:

depends:
- components/glibc.yml
- components/ca-certificates.yml
- components/openssl.yml
- components/util-linux.yml
- components/libidn2.yml
Expand Down
8 changes: 8 additions & 0 deletions elements/extensions/qemu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
id: qemu
about: RLXOS QEMU Virtualization Kit
include:
- components/qemu.yml
- components/libcacard.yml
- components/usbredir.yml

merge: [elements/include/extension.yml]
2 changes: 1 addition & 1 deletion elements/layers/sdk.yml → elements/extensions/sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ include:
- components/autoconf-archive.yml
- components/pkg-config.yml

merge: [elements/include/layer.yml]
merge: [elements/include/extension.yml]
12 changes: 12 additions & 0 deletions elements/include/extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
merge: [version.yml, elements/include/ostree.yml]
variables:
force-rebuild: true
include-depends: false
include-root: /sysroot
strip: false
extra-commands: ""
initial-commands: |-
[ -d %{include-root}/%{sysconfdir} ] && mv %{include-root}/%{sysconfdir} %{include-root}/%{prefix}/
%{extra-commands}

ostree-branch: x86_64/extension/%{id}/%{version}
19 changes: 0 additions & 19 deletions elements/include/layer.yml

This file was deleted.

2 changes: 2 additions & 0 deletions elements/system/repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ include:
- components/network-manager-applet.yml
- components/system-config-printer.yml

- components/networkmanager-openvpn.yml

- apps/firefox.yml

- components/lightdm-gtk-greeter.yml
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ require (
github.com/dustin/go-humanize v1.0.1
gopkg.in/yaml.v2 v2.4.0
)

require github.com/itsmanjeet/framework v0.0.0-20231010170234-a2978b10eaf1
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/itsmanjeet/framework v0.0.0-20231010170234-a2978b10eaf1 h1:lvkd7p4mPPXC1suOm7BaYlMl9mC25h7U6b8RDPe445g=
github.com/itsmanjeet/framework v0.0.0-20231010170234-a2978b10eaf1/go.mod h1:EwFUbJJY2SbZJFs1j/prHjCNkSEDf7ZQwePk4U7EcTo=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
Expand Down
28 changes: 28 additions & 0 deletions patches/openvpn/0001-unprivileged.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/distro/systemd/openvpn-client@.service.in b/distro/systemd/openvpn-client@.service.in
index 159fb4dc..2277a7d9 100644
--- a/distro/systemd/openvpn-client@.service.in
+++ b/distro/systemd/openvpn-client@.service.in
@@ -11,6 +11,9 @@ Type=notify
PrivateTmp=true
WorkingDirectory=/etc/openvpn/client
ExecStart=@sbindir@/openvpn --suppress-timestamps --nobind --config %i.conf
+User=openvpn
+Group=network
+AmbientCapabilities=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SETPCAP CAP_SYS_CHROOT CAP_DAC_OVERRIDE
CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SETPCAP CAP_SYS_CHROOT CAP_DAC_OVERRIDE
LimitNPROC=10
DeviceAllow=/dev/null rw
diff --git a/distro/systemd/openvpn-server@.service.in b/distro/systemd/openvpn-server@.service.in
index 6e8e7d94..b2814e4b 100644
--- a/distro/systemd/openvpn-server@.service.in
+++ b/distro/systemd/openvpn-server@.service.in
@@ -11,6 +11,9 @@ Type=notify
PrivateTmp=true
WorkingDirectory=/etc/openvpn/server
ExecStart=@sbindir@/openvpn --status %t/openvpn-server/status-%i.log --status-version 2 --suppress-timestamps --config %i.conf
+User=openvpn
+Group=network
+AmbientCapabilities=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SETPCAP CAP_SYS_CHROOT CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SETPCAP CAP_SYS_CHROOT CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
LimitNPROC=10
DeviceAllow=/dev/null rw