Stage CUPS authorization as settings override (#237)
This commit is contained in:
@@ -38,7 +38,8 @@ makedepends=(
|
|||||||
# backup=() is pacman's hook for protecting user edits to package-owned files
|
# backup=() is pacman's hook for protecting user edits to package-owned files
|
||||||
# on upgrade. Only the paths the package actually installs into /etc qualify.
|
# on upgrade. Only the paths the package actually installs into /etc qualify.
|
||||||
# The etc-overrides set (faillock.conf, nsswitch.conf, cups-browsed.conf,
|
# The etc-overrides set (faillock.conf, nsswitch.conf, cups-browsed.conf,
|
||||||
# plymouthd.conf, /etc/skel/.bashrc) ships at /usr/share/omarchy/etc-overrides/
|
# cups-files.conf, plymouthd.conf, /etc/skel/.bashrc) ships at
|
||||||
|
# /usr/share/omarchy/etc-overrides/
|
||||||
# and is cp -f'd by post_install — those paths are unowned by pacman and the
|
# and is cp -f'd by post_install — those paths are unowned by pacman and the
|
||||||
# scriptlet WILL clobber user edits on each upgrade (documented limitation).
|
# scriptlet WILL clobber user edits on each upgrade (documented limitation).
|
||||||
backup=(
|
backup=(
|
||||||
@@ -90,6 +91,7 @@ _etc_override_paths=(
|
|||||||
'etc/security/faillock.conf'
|
'etc/security/faillock.conf'
|
||||||
'etc/nsswitch.conf'
|
'etc/nsswitch.conf'
|
||||||
'etc/cups/cups-browsed.conf'
|
'etc/cups/cups-browsed.conf'
|
||||||
|
'etc/cups/cups-files.conf'
|
||||||
'etc/plymouth/plymouthd.conf'
|
'etc/plymouth/plymouthd.conf'
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -224,6 +226,8 @@ EOF
|
|||||||
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/nsswitch.conf" ;;
|
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/nsswitch.conf" ;;
|
||||||
'etc/cups/cups-browsed.conf')
|
'etc/cups/cups-browsed.conf')
|
||||||
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/cups-cups-browsed.conf" ;;
|
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/cups-cups-browsed.conf" ;;
|
||||||
|
'etc/cups/cups-files.conf')
|
||||||
|
[[ ! -f $pkgdir/$path ]] || mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/cups-cups-files.conf" ;;
|
||||||
'etc/plymouth/plymouthd.conf')
|
'etc/plymouth/plymouthd.conf')
|
||||||
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/plymouth-plymouthd.conf" ;;
|
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/plymouth-plymouthd.conf" ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ _etc_overrides_apply() {
|
|||||||
|
|
||||||
# NOTE: these cp -f's are intentionally destructive on every install/upgrade.
|
# NOTE: these cp -f's are intentionally destructive on every install/upgrade.
|
||||||
# Users who customize /etc/os-release, /etc/plymouth/plymouthd.conf (theme
|
# Users who customize /etc/os-release, /etc/plymouth/plymouthd.conf (theme
|
||||||
# switch), /etc/cups/cups-browsed.conf, /etc/nsswitch.conf,
|
# switch), /etc/cups/cups-browsed.conf, /etc/cups/cups-files.conf, /etc/nsswitch.conf,
|
||||||
# /etc/security/faillock.conf, or /etc/skel/.bashrc WILL have their changes
|
# /etc/security/faillock.conf, or /etc/skel/.bashrc WILL have their changes
|
||||||
# reset to Omarchy defaults each time omarchy-settings-dev is upgraded. This is
|
# reset to Omarchy defaults each time omarchy-settings-dev is upgraded. This is
|
||||||
# the trade-off of routing upstream-owned paths through etc-overrides instead
|
# the trade-off of routing upstream-owned paths through etc-overrides instead
|
||||||
@@ -21,6 +21,10 @@ _etc_overrides_apply() {
|
|||||||
install -d /etc/cups
|
install -d /etc/cups
|
||||||
cp -f /usr/share/omarchy/etc-overrides/cups-cups-browsed.conf /etc/cups/cups-browsed.conf
|
cp -f /usr/share/omarchy/etc-overrides/cups-cups-browsed.conf /etc/cups/cups-browsed.conf
|
||||||
fi
|
fi
|
||||||
|
if [[ -f /etc/cups/cups-files.conf && -f /usr/share/omarchy/etc-overrides/cups-cups-files.conf ]]; then
|
||||||
|
systemd-sysusers /etc/sysusers.d/omarchy-cups-browsed.conf
|
||||||
|
install -m 0640 -o root -g cups /usr/share/omarchy/etc-overrides/cups-cups-files.conf /etc/cups/cups-files.conf
|
||||||
|
fi
|
||||||
cp -f /usr/share/omarchy/etc-overrides/plymouth-plymouthd.conf /etc/plymouth/plymouthd.conf
|
cp -f /usr/share/omarchy/etc-overrides/plymouth-plymouthd.conf /etc/plymouth/plymouthd.conf
|
||||||
cp -f /usr/share/omarchy/etc-overrides/dot.bashrc /etc/skel/.bashrc
|
cp -f /usr/share/omarchy/etc-overrides/dot.bashrc /etc/skel/.bashrc
|
||||||
chmod 0644 /etc/os-release /etc/security/faillock.conf /etc/nsswitch.conf \
|
chmod 0644 /etc/os-release /etc/security/faillock.conf /etc/nsswitch.conf \
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ makedepends=(
|
|||||||
# backup=() is pacman's hook for protecting user edits to package-owned files
|
# backup=() is pacman's hook for protecting user edits to package-owned files
|
||||||
# on upgrade. Only the paths the package actually installs into /etc qualify.
|
# on upgrade. Only the paths the package actually installs into /etc qualify.
|
||||||
# The etc-overrides set (faillock.conf, nsswitch.conf, cups-browsed.conf,
|
# The etc-overrides set (faillock.conf, nsswitch.conf, cups-browsed.conf,
|
||||||
# plymouthd.conf, /etc/skel/.bashrc) ships at /usr/share/omarchy/etc-overrides/
|
# cups-files.conf, plymouthd.conf, /etc/skel/.bashrc) ships at
|
||||||
|
# /usr/share/omarchy/etc-overrides/
|
||||||
# and is cp -f'd by post_install — those paths are unowned by pacman and the
|
# and is cp -f'd by post_install — those paths are unowned by pacman and the
|
||||||
# scriptlet WILL clobber user edits on each upgrade (documented limitation).
|
# scriptlet WILL clobber user edits on each upgrade (documented limitation).
|
||||||
backup=(
|
backup=(
|
||||||
@@ -99,6 +100,7 @@ _etc_override_paths=(
|
|||||||
'etc/security/faillock.conf'
|
'etc/security/faillock.conf'
|
||||||
'etc/nsswitch.conf'
|
'etc/nsswitch.conf'
|
||||||
'etc/cups/cups-browsed.conf'
|
'etc/cups/cups-browsed.conf'
|
||||||
|
'etc/cups/cups-files.conf'
|
||||||
'etc/plymouth/plymouthd.conf'
|
'etc/plymouth/plymouthd.conf'
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -219,6 +221,8 @@ EOF
|
|||||||
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/nsswitch.conf" ;;
|
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/nsswitch.conf" ;;
|
||||||
'etc/cups/cups-browsed.conf')
|
'etc/cups/cups-browsed.conf')
|
||||||
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/cups-cups-browsed.conf" ;;
|
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/cups-cups-browsed.conf" ;;
|
||||||
|
'etc/cups/cups-files.conf')
|
||||||
|
[[ ! -f $pkgdir/$path ]] || mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/cups-cups-files.conf" ;;
|
||||||
'etc/plymouth/plymouthd.conf')
|
'etc/plymouth/plymouthd.conf')
|
||||||
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/plymouth-plymouthd.conf" ;;
|
mv "$pkgdir/$path" "$pkgdir/usr/share/omarchy/etc-overrides/plymouth-plymouthd.conf" ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ _etc_overrides_apply() {
|
|||||||
|
|
||||||
# NOTE: these cp -f's are intentionally destructive on every install/upgrade.
|
# NOTE: these cp -f's are intentionally destructive on every install/upgrade.
|
||||||
# Users who customize /etc/os-release, /etc/plymouth/plymouthd.conf (theme
|
# Users who customize /etc/os-release, /etc/plymouth/plymouthd.conf (theme
|
||||||
# switch), /etc/cups/cups-browsed.conf, /etc/nsswitch.conf,
|
# switch), /etc/cups/cups-browsed.conf, /etc/cups/cups-files.conf, /etc/nsswitch.conf,
|
||||||
# /etc/security/faillock.conf, or /etc/skel/.bashrc WILL have their changes
|
# /etc/security/faillock.conf, or /etc/skel/.bashrc WILL have their changes
|
||||||
# reset to Omarchy defaults each time omarchy-settings is upgraded. This is
|
# reset to Omarchy defaults each time omarchy-settings is upgraded. This is
|
||||||
# the trade-off of routing upstream-owned paths through etc-overrides instead
|
# the trade-off of routing upstream-owned paths through etc-overrides instead
|
||||||
@@ -21,6 +21,10 @@ _etc_overrides_apply() {
|
|||||||
install -d /etc/cups
|
install -d /etc/cups
|
||||||
cp -f /usr/share/omarchy/etc-overrides/cups-cups-browsed.conf /etc/cups/cups-browsed.conf
|
cp -f /usr/share/omarchy/etc-overrides/cups-cups-browsed.conf /etc/cups/cups-browsed.conf
|
||||||
fi
|
fi
|
||||||
|
if [[ -f /etc/cups/cups-files.conf && -f /usr/share/omarchy/etc-overrides/cups-cups-files.conf ]]; then
|
||||||
|
systemd-sysusers /etc/sysusers.d/omarchy-cups-browsed.conf
|
||||||
|
install -m 0640 -o root -g cups /usr/share/omarchy/etc-overrides/cups-cups-files.conf /etc/cups/cups-files.conf
|
||||||
|
fi
|
||||||
cp -f /usr/share/omarchy/etc-overrides/plymouth-plymouthd.conf /etc/plymouth/plymouthd.conf
|
cp -f /usr/share/omarchy/etc-overrides/plymouth-plymouthd.conf /etc/plymouth/plymouthd.conf
|
||||||
cp -f /usr/share/omarchy/etc-overrides/dot.bashrc /etc/skel/.bashrc
|
cp -f /usr/share/omarchy/etc-overrides/dot.bashrc /etc/skel/.bashrc
|
||||||
chmod 0644 /etc/os-release /etc/security/faillock.conf /etc/nsswitch.conf \
|
chmod 0644 /etc/os-release /etc/security/faillock.conf /etc/nsswitch.conf \
|
||||||
|
|||||||
Reference in New Issue
Block a user