Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package combustion for openSUSE:Factory checked in at 2024-08-07 09:15:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/combustion (Old) and /work/SRC/openSUSE:Factory/.combustion.new.7232 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "combustion" Wed Aug 7 09:15:03 2024 rev:32 rq:1191883 version:1.4 Changes: -------- --- /work/SRC/openSUSE:Factory/combustion/combustion.changes 2024-07-14 08:48:56.305013506 +0200 +++ /work/SRC/openSUSE:Factory/.combustion.new.7232/combustion.changes 2024-08-07 09:15:05.607974612 +0200 @@ -1,0 +2,6 @@ +Tue Aug 06 13:39:27 UTC 2024 - Fabian Vogt <[email protected]> + +- Update to version 1.4: + * Add support for remote config files using combustion.url (jsc#PED-8591) + +------------------------------------------------------------------- Old: ---- combustion-1.3+git11.obscpio New: ---- combustion-1.4.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ combustion.spec ++++++ --- /var/tmp/diff_new_pack.NhUJkD/_old 2024-08-07 09:15:06.163997584 +0200 +++ /var/tmp/diff_new_pack.NhUJkD/_new 2024-08-07 09:15:06.167997749 +0200 @@ -17,7 +17,7 @@ Name: combustion -Version: 1.3+git11 +Version: 1.4 Release: 0 Summary: System for initial configuration of appliances License: GPL-2.0-or-later ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.NhUJkD/_old 2024-08-07 09:15:06.207999402 +0200 +++ /var/tmp/diff_new_pack.NhUJkD/_new 2024-08-07 09:15:06.207999402 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/combustion.git</param> - <param name="changesrevision">0a589ce0494fe7bffa00b99d8a314f9a70c96d8c</param></service></servicedata> + <param name="changesrevision">ce777bfa81279a2b746b13abb766a8613b26ae1a</param></service></servicedata> (No newline at EOF) ++++++ combustion-1.3+git11.obscpio -> combustion-1.4.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/combustion-1.3+git11/README.md new/combustion-1.4/README.md --- old/combustion-1.3+git11/README.md 2024-07-12 10:24:02.000000000 +0200 +++ new/combustion-1.4/README.md 2024-08-06 15:37:03.000000000 +0200 @@ -45,6 +45,10 @@ If the VMware guestinfo parameter "guestinfo.combustion.script" is set and nonempty, it is treated as a base64 encoded gzipped script. +If a dracut cmdline parammeter "combustion.url" is set, the script is +downloaded using curl. In this case, the prepare step is run with the default +initrd network configuration already applied. + You can do everything necessary for initial system configuration from this script, including addition of ssh keys, adding users, changing passwords or even doing partitioning changes. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/combustion-1.3+git11/combustion new/combustion-1.4/combustion --- old/combustion-1.3+git11/combustion 2024-07-12 10:24:02.000000000 +0200 +++ new/combustion-1.4/combustion 2024-08-06 15:37:03.000000000 +0200 @@ -8,10 +8,42 @@ exchangedir="/dev/shm/combustion/" config_dir="${exchangedir}/config" +get_combustion_url() { + (set +eu; . /lib/dracut-lib.sh; getarg combustion.url) +} + if [ "${1-}" = "--prepare" ]; then rm -rf "${exchangedir}" mkdir "${exchangedir}" + enable_network() { + sh -s <<'EOF' + . /lib/dracut-lib.sh + # Set rd.neednet if not already done and reevaluate it (module-specific) + getargbool 0 'rd.neednet' && exit 0 + echo rd.neednet=1 > /etc/cmdline.d/40-combustion-neednet.conf + if [ -e "${hookdir}/pre-udev/60-net-genrules.sh" ]; then + # Wicked + . "${hookdir}/pre-udev/60-net-genrules.sh" + # Re-trigger generation of network rules and apply them + udevadm control --reload + udevadm trigger --subsystem-match net --action add + elif [ -e "${hookdir}/cmdline/99-nm-config.sh" ]; then + # NetworkManager + . "${hookdir}/cmdline/99-nm-config.sh" + else + echo "ERROR: unknown network framework" >&2 + exit 1 + fi +EOF + } + + if [ -n "$(get_combustion_url)" ]; then + echo "URL provided, downloading config later" + enable_network + exit 0 + fi + # Try fw_cfg first if [ -e "/sys/firmware/qemu_fw_cfg/by_name/opt/org.opensuse.combustion" ]; then mkdir -p "${config_dir}" @@ -95,25 +127,7 @@ # Check for the magic flag "# combustion: network" in the script if grep -qE '^# combustion:(.*)\<network\>' "${config_dir}/script"; then - sh -s <<'EOF' - . /lib/dracut-lib.sh - # Set rd.neednet if not already done and reevaluate it (module-specific) - getargbool 0 'rd.neednet' && exit 0 - echo rd.neednet=1 > /etc/cmdline.d/40-combustion-neednet.conf - if [ -e "${hookdir}/pre-udev/60-net-genrules.sh" ]; then - # Wicked - . "${hookdir}/pre-udev/60-net-genrules.sh" - # Re-trigger generation of network rules and apply them - udevadm control --reload - udevadm trigger --subsystem-match net --action add - elif [ -e "${hookdir}/cmdline/99-nm-config.sh" ]; then - # NetworkManager - . "${hookdir}/cmdline/99-nm-config.sh" - else - echo "ERROR: unknown network framework" >&2 - exit 1 - fi -EOF + enable_network fi exit 0 @@ -134,7 +148,7 @@ rm -rf "${exchangedir}" || true if [ "${delete_resolv_conf}" -eq 1 ]; then - rm -f /sysroot/etc/resolv.conf || true + rm -f /sysroot/etc/resolv.conf || true fi if findmnt /sysroot >/dev/null; then @@ -166,6 +180,24 @@ chmod a+x "${config_dir}/script" fi +# Download and use a script from the given URL +combustion_url="$(get_combustion_url)" || : +if ! [ -d "${config_dir}" ] && [ -n "${combustion_url}" ]; then + echo "Downloading config..." + mkdir -p "${config_dir}" + curl --globoff --location --retry 3 --retry-connrefused --fail --show-error --output "${config_dir}/script" -- "${combustion_url}" + chmod a+x "${config_dir}/script" + + # Check for the magic flag "# combustion: prepare" in the script + if grep -qE '^# combustion:(.*)\<prepare\>' "${config_dir}/script"; then + # Run the script with the --prepare option + if ! (cd "${config_dir}"; exec ./script --prepare); then + echo "script --prepare failed with $?" + exit 1 + fi + fi +fi + [ -d "${config_dir}" ] || exit 0 # Make sure /sysroot is mounted ++++++ combustion.obsinfo ++++++ --- /var/tmp/diff_new_pack.NhUJkD/_old 2024-08-07 09:15:06.308003533 +0200 +++ /var/tmp/diff_new_pack.NhUJkD/_new 2024-08-07 09:15:06.312003699 +0200 @@ -1,5 +1,5 @@ name: combustion -version: 1.3+git11 -mtime: 1720772642 -commit: 0a589ce0494fe7bffa00b99d8a314f9a70c96d8c +version: 1.4 +mtime: 1722951423 +commit: ce777bfa81279a2b746b13abb766a8613b26ae1a
