swm_version: 1 base: distro_version: dev pins: {} mutations: - type: source_patch tarball: https://github.com/shadow-maint/shadow/releases/download/4.18.0/shadow-4.18.0.tar.xz sha256: add4604d3bc410344433122a819ee4154b79dd8316a56298c60417e637c07608 patches: - "From: Jakub Jirutka \nDate: Sun, 19 Dec 2021 21:50:00 +0100\nSubject: [PATCH] Change some useradd defaults\n\n--- a/src/useradd.c\n+++ b/src/useradd.c\n@@ -87,14 +87,14 @@\n /*\n * These defaults are used if there is no defaults file.\n */\n-static gid_t def_group = 1000;\n+static gid_t def_group = 100;\n static const char *def_groups = \"\";\n static const char *def_gname = \"other\";\n static const char *def_home = \"/home\";\n-static const char *def_shell = \"/bin/bash\";\n+static const char *def_shell = \"/bin/ash\";\n static const char *def_template = SKEL_DIR;\n static const char *def_usrtemplate = USRSKELDIR;\n-static const char *def_create_mail_spool = \"yes\";\n+static const char *def_create_mail_spool = \"no\";\n static const char *def_log_init = \"yes\";\n \n static long def_inactive = -1;\n" build: compiler: zig-cc target: x86_64-linux-musl link: static flags: [] phases: configure: "./configure \\\n\t--build=$CBUILD \\\n\t--host=$CHOST \\\n\t--prefix=/usr \\\n\t--libdir=/usr/lib \\\n\t--sysconfdir=/etc \\\n\t--mandir=/usr/share/man \\\n\t--localstatedir=/var \\\n\t--disable-nls \\\n\t--disable-shared \\\n\t--enable-static \\\n\t--disable-account-tools-setuid \\\n\t--without-libbsd \\\n\t--without-libpam \\\n\t--without-audit \\\n\t--without-selinux \\\n\t--without-acl \\\n\t--without-attr \\\n\t--without-tcb \\\n\t--with-yescrypt \\\n\t--without-nscd \\\n\t--without-fcaps\n" compile: | # libtool se come el `-static` (lo lee como flag de libtool, no de link real). # El único camino a binarios musl 100% estáticos es su flag propio `-all-static`. make LDFLAGS="-all-static" install: | make DESTDIR="/out" install make -C man DESTDIR="/out" install-man || true cd "/out" # Avoid conflict with man-pages package. rm -f usr/share/man/man3/getspnam.3* rm -f usr/share/man/man5/passwd.5* # /etc/login.defs is not very useful - replace it with an *almost* blank file. rm -f etc/login.defs echo "USERGROUPS_ENAB yes" > etc/login.defs echo "UID_MIN 1000" >> etc/login.defs # Used e.g. for unprivileged LXC containers. install -m644 /dev/null etc/subuid install -m644 /dev/null etc/subgid target_bin: /usr/bin/shadow expected_hash: b3:843e909862de03b7460eef56e433de6ae0e6cdc1657b0659c8bb1d776e056f53 deps: build: - linux-headers - make runtime: []