Skip to content

Commit

Permalink
fix: Drop use of /usr/etc/ and instead place files in /etc (#310)
Browse files Browse the repository at this point in the history
ostree handles the conversion to /usr/etc automatically
  • Loading branch information
KyleGospo authored Aug 8, 2024
1 parent 2acba39 commit 3a450a1
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 23 deletions.
12 changes: 6 additions & 6 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ADD files/etc/udev/rules.d /tmp/ublue-os/udev-rules/etc/udev/rules.d

# Install OpenTabletDriver udev rules from their portable releases
RUN mkdir -p /tmp/OpenTabletDriver/ && \
mkdir -p /usr/etc/udev/rules.d/ && \
mkdir -p /etc/udev/rules.d/ && \
curl -s https://api.github.com/repos/OpenTabletDriver/OpenTabletDriver/releases/latest \
| jq -r '.assets | sort_by(.created_at) | .[] | select (.name|test("opentabletdriver.*tar.gz$")) | .browser_download_url' \
| wget -qi - -O /tmp/OpenTabletDriver/opentabletdriver.tar.gz && \
Expand All @@ -20,23 +20,23 @@ rm -rf /tmp/OpenTabletDriver

# Install Sunshine udev rules from their github repo
RUN mkdir -p /tmp/Sunshine/ && \
mkdir -p /usr/etc/udev/rules.d/ && \
mkdir -p /etc/udev/rules.d/ && \
pushd /tmp/Sunshine && \
git clone --depth 1 https://github.com/LizardByte/Sunshine . && \
mv /tmp/Sunshine/src_assets/linux/misc/60-sunshine.rules /tmp/ublue-os/udev-rules/etc/udev/rules.d/60-sunshine-ublue.rules && \
popd && \
rm -rf /tmp/Sunshine

# Install Framework Computer udev rules from their inputmodule-rs package
RUN mkdir -p /usr/etc/udev/rules.d/ && \
RUN mkdir -p /etc/udev/rules.d/ && \
wget https://raw.githubusercontent.com/FrameworkComputer/inputmodule-rs/main/release/50-framework-inputmodule.rules -O /tmp/ublue-os/udev-rules/etc/udev/rules.d/50-framework-inputmodule.rules

ADD files/etc/rpm-ostreed.conf /tmp/ublue-os/update-services/etc/rpm-ostreed.conf
ADD files/usr/etc/systemd /tmp/ublue-os/update-services/usr/etc/systemd
ADD files/etc/systemd /tmp/ublue-os/update-services/etc/systemd
ADD files/usr/lib/systemd /tmp/ublue-os/update-services/usr/lib/systemd

ADD files/usr/etc/containers /tmp/ublue-os/signing/usr/etc/containers
ADD files/usr/etc/pki /tmp/ublue-os/signing/usr/etc/pki
ADD files/etc/containers /tmp/ublue-os/signing/etc/containers
ADD files/etc/pki /tmp/ublue-os/signing/etc/pki

RUN tar cf /tmp/ublue-os/rpmbuild/SOURCES/ublue-os-udev-rules.tar.gz -C /tmp ublue-os/udev-rules
RUN tar cf /tmp/ublue-os/rpmbuild/SOURCES/ublue-os-update-services.tar.gz -C /tmp ublue-os/update-services
Expand Down
2 changes: 1 addition & 1 deletion build/ublue-os-just/etc-distrobox/distrobox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Add more distros and then use:
# distrobox assemble create --replace --file /usr/etc/distrobox/distrobox.ini --name containername
# distrobox assemble create --replace --file /etc/distrobox/distrobox.ini --name containername
# This will replace your distroboxes in place
# Tip: Use additional_packages as declarative config!
# See https://distrobox.privatedns.org/usage/distrobox-assemble/
Expand Down
File renamed without changes.
File renamed without changes.
29 changes: 16 additions & 13 deletions rpmspec/ublue-os-signing.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: ublue-os-signing
Packager: ublue-os
Vendor: ublue-os
Version: 0.2
Version: 0.3
Release: 1%{?dist}
Summary: Signing files and keys for Universal Blue
License: MIT
Expand All @@ -21,26 +21,29 @@ Adds files and keys for signing Universal Blue images

%build
mkdir -p -m0755 %{buildroot}%{_datadir}/%{VENDOR}
mkdir -p -m0755 %{buildroot}%{_exec_prefix}/etc/containers/registries.d
mkdir -p -m0755 %{buildroot}%{_exec_prefix}/etc/pki
mkdir -p -m0755 %{buildroot}%{_sysconfdir}/containers/registries.d
mkdir -p -m0755 %{buildroot}%{_sysconfdir}/pki

tar xf %{SOURCE0} -C %{buildroot}%{_datadir}/%{VENDOR} --strip-components=1
tar xf %{SOURCE0} -C %{buildroot} --strip-components=2

%files
%dir %attr(0755,root,root) %{_datadir}/%{VENDOR}/%{sub_name}
%attr(0644,root,root) %{_datadir}/%{VENDOR}/%{sub_name}/%{_exec_prefix}/etc/containers/policy.json
%attr(0644,root,root) %{_datadir}/%{VENDOR}/%{sub_name}/%{_exec_prefix}/etc/containers/registries.d/ublue-os.yaml
%attr(0644,root,root) %{_datadir}/%{VENDOR}/%{sub_name}/%{_exec_prefix}/etc/pki/containers/ublue-os.pub
%attr(0644,root,root) %{_datadir}/%{VENDOR}/%{sub_name}/%{_exec_prefix}/etc/containers/registries.d/quay.io-toolbx-images.yaml
%attr(0644,root,root) %{_datadir}/%{VENDOR}/%{sub_name}/%{_exec_prefix}/etc/pki/containers/quay.io-toolbx-images.pub
%attr(0644,root,root) %{_exec_prefix}/etc/containers/policy.json
%attr(0644,root,root) %{_exec_prefix}/etc/containers/registries.d/ublue-os.yaml
%attr(0644,root,root) %{_exec_prefix}/etc/pki/containers/ublue-os.pub
%attr(0644,root,root) %{_exec_prefix}/etc/containers/registries.d/quay.io-toolbx-images.yaml
%attr(0644,root,root) %{_exec_prefix}/etc/pki/containers/quay.io-toolbx-images.pub
%attr(0644,root,root) %{_datadir}/%{VENDOR}/%{sub_name}/%{_sysconfdir}/containers/policy.json
%attr(0644,root,root) %{_datadir}/%{VENDOR}/%{sub_name}/%{_sysconfdir}/containers/registries.d/ublue-os.yaml
%attr(0644,root,root) %{_datadir}/%{VENDOR}/%{sub_name}/%{_sysconfdir}/pki/containers/ublue-os.pub
%attr(0644,root,root) %{_datadir}/%{VENDOR}/%{sub_name}/%{_sysconfdir}/containers/registries.d/quay.io-toolbx-images.yaml
%attr(0644,root,root) %{_datadir}/%{VENDOR}/%{sub_name}/%{_sysconfdir}/pki/containers/quay.io-toolbx-images.pub
%attr(0644,root,root) %{_sysconfdir}/containers/policy.json
%attr(0644,root,root) %{_sysconfdir}/containers/registries.d/ublue-os.yaml
%attr(0644,root,root) %{_sysconfdir}/pki/containers/ublue-os.pub
%attr(0644,root,root) %{_sysconfdir}/containers/registries.d/quay.io-toolbx-images.yaml
%attr(0644,root,root) %{_sysconfdir}/pki/containers/quay.io-toolbx-images.pub

%changelog
* Wed Aug 07 2024 Kyle Gospodnetich <[email protected]> - 0.3
- Moved files from /usr/etc/ to /etc/

* Sat May 18 2024 qoijjj <[email protected]> - 0.2
- Add signature verification for toolbx images

Expand Down
9 changes: 6 additions & 3 deletions rpmspec/ublue-os-update-services.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: ublue-os-update-services
Packager: ublue-os
Vendor: ublue-os
Version: 0.8
Version: 0.9
Release: 1%{?dist}
Summary: Automatic updates for rpm-ostree and flatpak
License: MIT
Expand Down Expand Up @@ -59,12 +59,15 @@ tar xf %{SOURCE0} -C %{buildroot} --strip-components=2 --exclude etc/rpm-ostreed
%attr(0644,root,root) %{_exec_prefix}/lib/systemd/user-preset/10-flatpak-user-update.preset
%attr(0644,root,root) %{_exec_prefix}/lib/systemd/user/flatpak-user-update.service
%attr(0644,root,root) %{_exec_prefix}/lib/systemd/user/flatpak-user-update.timer
%attr(0644,root,root) %{_exec_prefix}/%{_sysconfdir}/systemd/system/rpm-ostreed-automatic.timer.d/override.conf
%attr(0644,root,root) %{_exec_prefix}/%{_sysconfdir}/systemd/system/rpm-ostreed-automatic.service.d/override.conf
%attr(0644,root,root) %{_sysconfdir}/systemd/system/rpm-ostreed-automatic.timer.d/override.conf
%attr(0644,root,root) %{_sysconfdir}/systemd/system/rpm-ostreed-automatic.service.d/override.conf



%changelog
* Wed Aug 7 2024 Kyle Gospodnetich <[email protected]> - 0.9
- Use etc over usr etc folder

* Mon Oct 2 2023 ArtikusHG <[email protected]> - 0.8
- Add metered connection check to system and flatpak update services

Expand Down

0 comments on commit 3a450a1

Please sign in to comment.