Skip to content

Instantly share code, notes, and snippets.

@Trucido
Trucido / linux_os_detection_from_facter.include.spec
Last active June 28, 2018 14:07
rpm spec macros to do linux detection
%ifos Linux
%define is_suse_family %((test -e /etc/SUSE-brand || test -e /etc/SuSE-release) && echo 1 || echo 0)
%define is_sle_family %(grep -qi 'SUSE LINUX Enterprise' /etc/SuSE-release && echo 1 || echo 0)
%define is_sles %(grep -qi 'SUSE LINUX Enterprise Server' /etc/SuSE-release && echo 1 || echo 0)
%define is_sled %(grep -qi 'SUSE LINUX Enterprise Desktop' /etc/SuSE-release && echo 1 || echo 0)
%define is_opensuse %((grep -qi 'openSUSE' /etc/SUSE-brand || grep -qi 'openSuSE' /etc/SuSE-release) && echo 1 || echo 0)
%define is_redhat_family %(test -e /etc/redhat-release && echo 1 || echo 0)
# refer to http://fedoraproject.org/wiki/Packaging:DistTag
%define is_rhel %(grep -qi 'Red Hat Enterprise Linux Server' /etc/redhat-release && echo 1 || echo 0)
@Trucido
Trucido / openSUSE-Leap-42.3-pam_kwallet-guide.md
Last active October 14, 2023 18:32 — forked from benediktg/pam_kwallet-guide.md
How to configure pam_kwallet to auto-unlock kdewallet from sddm login credentials on openSUSE Leap 42.3 KDE Plasma5

How to configure pam_kwallet to auto-unlock the default kwallet5 "kdewallet" from sddm login credentials on openSUSE Leap 42.3 KDE Plasma5

Note: Many other guides & posts were attempted before creating this, however they either no longer work or are ugly hacks which don't follow SUSE's odd pam.d layouts. Essentially, this solution boils down to this: pam_kwallet needs to be loaded from it's own substack just like pam_gnome_keyring already is configured to do so, so new substacks were created based on the gnome_keyring ones so that they could be added to sddm. I'm unsure how both gnome_keyring and kwallet behave if both are loaded from the same substack so I kept them in separate stacks. This was tested with only kwallet5 installed but it should also optionally load the old kwallet4 if it's present. My understanding of PAM is limited, so I'm open to suggestions, but this seemed like the cleanest solution which doesn't get overwritten on updates, though it should probably be globally registered as a

## /etc/udev/rules.d/80-udisks2-ignore-zfs.rules
# Ignore ZFS vdev filesystem type "zfs_member" with partition ID "Solaris /usr & Apple ZFS"
ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_FS_TYPE}=="zfs_member", ENV{ID_PART_ENTRY_TYPE}=="6a898cc3-1dd2-11b2-99a6-080020736631", ENV{UDISKS_IGNORE}="1"