Hello community, here is the log from the commit of package jeos-firstboot for openSUSE:Factory checked in at 2019-07-28 10:21:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/jeos-firstboot (Old) and /work/SRC/openSUSE:Factory/.jeos-firstboot.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jeos-firstboot" Sun Jul 28 10:21:45 2019 rev:27 rq:718440 version:0.0+git20190724.7f3b281 Changes: -------- --- /work/SRC/openSUSE:Factory/jeos-firstboot/jeos-firstboot.changes 2019-07-08 15:00:58.610530188 +0200 +++ /work/SRC/openSUSE:Factory/.jeos-firstboot.new.4126/jeos-firstboot.changes 2019-07-28 10:21:46.816572333 +0200 @@ -1,0 +2,9 @@ +Wed Jul 24 14:06:09 UTC 2019 - [email protected] + +- Update to version 0.0+git20190724.7f3b281: + * Set DHCLIENT(6)_SET_HOSTNAME=yes in sysconfig/network/dhcp + * Remove examples dir + * Remove useless rm + * Move snapshot creation into a separate service (bsc#1129730) + +------------------------------------------------------------------- Old: ---- jeos-firstboot-0.0+git20190705.e2889c3.tar.xz New: ---- jeos-firstboot-0.0+git20190724.7f3b281.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jeos-firstboot.spec ++++++ --- /var/tmp/diff_new_pack.0Tlkuk/_old 2019-07-28 10:21:47.324572160 +0200 +++ /var/tmp/diff_new_pack.0Tlkuk/_new 2019-07-28 10:21:47.324572160 +0200 @@ -17,7 +17,7 @@ Name: jeos-firstboot -Version: 0.0+git20190705.e2889c3 +Version: 0.0+git20190724.7f3b281 Release: 0 Summary: Simple text based JeOS first boot wizard License: MIT @@ -67,13 +67,15 @@ %service_add_post jeos-firstboot.service %files -%doc README examples/ifcfg-eth0 +%doc README %license LICENSE %{_unitdir}/jeos-firstboot.service +%{_unitdir}/jeos-firstboot-snapshot.service %dir %{_datadir}/defaults/ %{_datadir}/defaults/jeos-firstboot.conf %dir %{_datadir}/jeos-firstboot %{_libexecdir}/jeos-firstboot +%{_libexecdir}/jeos-firstboot-snapshot %{_libexecdir}/jeos-firstboot-functions %files rpiwifi ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.0Tlkuk/_old 2019-07-28 10:21:47.368572145 +0200 +++ /var/tmp/diff_new_pack.0Tlkuk/_new 2019-07-28 10:21:47.372572144 +0200 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/openSUSE/jeos-firstboot.git</param> - <param name="changesrevision">ee552534f667ea1bc5b176cf99c2fdefebdfd403</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">7f3b281fcec967516f199188aaa894269b9704db</param></service></servicedata> \ No newline at end of file ++++++ jeos-firstboot-0.0+git20190705.e2889c3.tar.xz -> jeos-firstboot-0.0+git20190724.7f3b281.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-0.0+git20190705.e2889c3/examples/ifcfg-eth0 new/jeos-firstboot-0.0+git20190724.7f3b281/examples/ifcfg-eth0 --- old/jeos-firstboot-0.0+git20190705.e2889c3/examples/ifcfg-eth0 2019-07-05 14:52:49.000000000 +0200 +++ new/jeos-firstboot-0.0+git20190724.7f3b281/examples/ifcfg-eth0 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -BOOTPROTO='dhcp' -MTU='' -REMOTE_IPADDR='' -STARTMODE='auto' -ETHTOOL_OPTIONS='' -USERCONTROL='no' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-0.0+git20190705.e2889c3/files/usr/lib/jeos-firstboot new/jeos-firstboot-0.0+git20190724.7f3b281/files/usr/lib/jeos-firstboot --- old/jeos-firstboot-0.0+git20190705.e2889c3/files/usr/lib/jeos-firstboot 2019-07-05 14:52:49.000000000 +0200 +++ new/jeos-firstboot-0.0+git20190724.7f3b281/files/usr/lib/jeos-firstboot 2019-07-24 16:03:28.000000000 +0200 @@ -365,12 +365,13 @@ # Create a configuration file for each interface that provides # an IPADDR if [ -n "$IPADDR" ]; then - rm -f "/etc/sysconfig/network/ifcfg-$d" || exit 1 printf "STARTMODE=auto\nBOOTPROTO=dhcp\n" \ > "/etc/sysconfig/network/ifcfg-$d" fi done +run sed -i -E 's/^DHCLIENT(6?)_SET_HOSTNAME=.*$/DHCLIENT\1_SET_HOSTNAME=yes/' /etc/sysconfig/network/dhcp + call_module_hook systemd_firstboot d --infobox $"Applying firstboot settings ..." 3 40 || true @@ -394,13 +395,6 @@ # Run snapper to setup quota for btrfs run /usr/bin/snapper --no-dbus setup-quota || warn $"Could not setup quota for btrfs" fi - - if [ ! -e /.snapshots/2 ]; then - run create_snapshot 2 "Initial Status" "yes" || true - fi - if [ -x /usr/lib/snapper/plugins/grub ]; then - run /usr/lib/snapper/plugins/grub --refresh - fi fi call_module_hook post diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-0.0+git20190705.e2889c3/files/usr/lib/jeos-firstboot-functions new/jeos-firstboot-0.0+git20190724.7f3b281/files/usr/lib/jeos-firstboot-functions --- old/jeos-firstboot-0.0+git20190705.e2889c3/files/usr/lib/jeos-firstboot-functions 2019-07-05 14:52:49.000000000 +0200 +++ new/jeos-firstboot-0.0+git20190724.7f3b281/files/usr/lib/jeos-firstboot-functions 2019-07-24 16:03:28.000000000 +0200 @@ -1,48 +1,3 @@ -create_snapshot() { - local num="$1" - local desc="$2" - local important="$3" - pushd / - if ! mountpoint -q .snapshots; then - echo "/.snapshots is not mounted!" >&2 - return 1 - fi - # we can't use snapper here due to missing dbus daemon in - # firstboot. So we have to create a snapshot manually. - #snapper --no-dbus -v create -d "Factory Status" --userdata "important=yes" - mkdir ".snapshots/$num" - btrfs subvolume snapshot -r / ".snapshots/$num/snapshot" - retrofit_snapper_info "$num" "$desc" "$important" - popd -} - -retrofit_snapper_info() { - local num="$1" - local desc="$2" - local important="$3" - if [ -n "$important" ]; then - if [ "$important" = "yes" ]; then - important="<userdata><key>important</key><value>yes</value></userdata>" - else - important='' - fi - fi - - now="`date '+%Y-%m-%d %H:%M:%S'`" - cat > "/.snapshots/$num/info.xml" <<-EOF - <?xml version="1.0"?> - <snapshot> - <type>single</type> - <num>$num</num> - <uid>0</uid> - <date>$now</date> - <description>$desc</description> - <cleanup>number</cleanup> - $important - </snapshot> - EOF -} - kmscon_available() { # kmscon itself is installed kmscon --help >/dev/null 2>&1 || return 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-0.0+git20190705.e2889c3/files/usr/lib/jeos-firstboot-snapshot new/jeos-firstboot-0.0+git20190724.7f3b281/files/usr/lib/jeos-firstboot-snapshot --- old/jeos-firstboot-0.0+git20190705.e2889c3/files/usr/lib/jeos-firstboot-snapshot 1970-01-01 01:00:00.000000000 +0100 +++ new/jeos-firstboot-0.0+git20190724.7f3b281/files/usr/lib/jeos-firstboot-snapshot 2019-07-24 16:03:28.000000000 +0200 @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Copyright (c) 2019 SUSE LLC +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +set -euo pipefail + +if ! mountpoint /.snapshots &>/dev/null; then + echo "Snapshots not enabled, skipping" + exit 0 +fi + +if [ ! -e /.snapshots/2 ]; then + snapper -v create -d "After jeos-firstboot configuration" --userdata "important=yes" +fi + +if [ -x /usr/lib/snapper/plugins/grub ]; then + /usr/lib/snapper/plugins/grub --refresh +fi + +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-0.0+git20190705.e2889c3/files/usr/lib/systemd/system/jeos-firstboot-snapshot.service new/jeos-firstboot-0.0+git20190724.7f3b281/files/usr/lib/systemd/system/jeos-firstboot-snapshot.service --- old/jeos-firstboot-0.0+git20190705.e2889c3/files/usr/lib/systemd/system/jeos-firstboot-snapshot.service 1970-01-01 01:00:00.000000000 +0100 +++ new/jeos-firstboot-0.0+git20190724.7f3b281/files/usr/lib/systemd/system/jeos-firstboot-snapshot.service 2019-07-24 16:03:28.000000000 +0200 @@ -0,0 +1,30 @@ +[Unit] +Description=SUSE JeOS First Boot Wizard - create system snapshot + +# Same as YaST2-Firstboot.service here +After=apparmor.service local-fs.target plymouth-start.service YaST2-Second-Stage.service +Conflicts=plymouth-start.service [email protected] [email protected] [email protected] [email protected] +Before=display-manager.service +ConditionPathExists=/var/lib/YaST2/reconfig_system +# The configuration is already done - so this doesn't make much sense +#OnFailure=poweroff.target + +# jeos-firstboot-snapshot starts between jeos-firstboot and login +Wants=time-sync.target +Requires=jeos-firstboot.service +After=jeos-firstboot.service time-sync.target +Before=systemd-user-sessions.service + +[Service] +Type=oneshot +RemainAfterExit=yes +# In Pre - if creation fails, don't do the configuration again +ExecStartPre=/usr/bin/rm -f /var/lib/YaST2/reconfig_system +ExecStart=/usr/lib/jeos-firstboot-snapshot +StandardOutput=tty +StandardInput=tty +#StandardError=tty + +[Install] +WantedBy=default.target diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-0.0+git20190705.e2889c3/files/usr/lib/systemd/system/jeos-firstboot.service new/jeos-firstboot-0.0+git20190724.7f3b281/files/usr/lib/systemd/system/jeos-firstboot.service --- old/jeos-firstboot-0.0+git20190705.e2889c3/files/usr/lib/systemd/system/jeos-firstboot.service 2019-07-05 14:52:49.000000000 +0200 +++ new/jeos-firstboot-0.0+git20190724.7f3b281/files/usr/lib/systemd/system/jeos-firstboot.service 2019-07-24 16:03:28.000000000 +0200 @@ -23,13 +23,15 @@ # If it does not exist, cloud-init won't run, so it's our turn. ConditionPathExists=!/run/cloud-init/enabled +# jeos-firstboot-snapshot.service deletes the flag file, but starts after us +Wants=jeos-firstboot-snapshot.service + [Service] Type=oneshot -Environment=SYSTEMCTL_OPTIONS=--ignore-dependencies TERM=linux +Environment=TERM=linux RemainAfterExit=yes ExecStartPre=/bin/sh -c "/usr/bin/plymouth quit 2>/dev/null || :" ExecStart=/usr/lib/jeos-firstboot -ExecStartPost=/usr/bin/rm -f /var/lib/YaST2/reconfig_system StandardOutput=tty StandardInput=tty #StandardError=tty
