Hello community, here is the log from the commit of package microos-tools for openSUSE:Factory checked in at 2020-05-11 13:25:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/microos-tools (Old) and /work/SRC/openSUSE:Factory/.microos-tools.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "microos-tools" Mon May 11 13:25:58 2020 rev:6 rq:802478 version:2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/microos-tools/microos-tools.changes 2020-02-19 12:40:02.795567570 +0100 +++ /work/SRC/openSUSE:Factory/.microos-tools.new.2738/microos-tools.changes 2020-05-11 13:26:00.451187403 +0200 @@ -1,0 +2,6 @@ +Sun May 10 09:32:13 UTC 2020 - Thorsten Kukuk <[email protected]> + +- Update to version 2.0 + - use autoconf tools to support libexecdir + +------------------------------------------------------------------- Old: ---- _service _servicedata microos-tools-1.0+git20200214.c7654a7.tar.xz New: ---- microos-tools-2.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ microos-tools.spec ++++++ --- /var/tmp/diff_new_pack.Bb7hgX/_old 2020-05-11 13:26:01.183188938 +0200 +++ /var/tmp/diff_new_pack.Bb7hgX/_new 2020-05-11 13:26:01.183188938 +0200 @@ -17,7 +17,7 @@ Name: microos-tools -Version: 1.0+git20200214.c7654a7 +Version: 2.0 Release: 0 Summary: Files and Scripts for openSUSE MicroOS License: GPL-2.0-or-later @@ -25,9 +25,10 @@ URL: https://github.com/kubic-project/microos-tools Source: microos-tools-%{version}.tar.xz BuildRequires: distribution-release +BuildRequires: pkgconfig +BuildRequires: pkgconfig(systemd) Requires: read-only-root-fs Conflicts: systemd-coredump -Obsoletes: caasp-tools BuildArch: noarch %description @@ -37,9 +38,11 @@ %setup -q %build +%configure +%make_build %install -cp -a {etc,usr} %{buildroot} +%make_install %pre %service_add_pre setup-systemd-proxy-env.service @@ -58,7 +61,12 @@ %config %{_sysconfdir}/systemd/system/systemd-firstboot.service %dir %{_sysconfdir}/systemd %dir %{_sysconfdir}/systemd/system -%{_unitdir} +%{_unitdir}/MicroOS-firstboot.service +%{_unitdir}/printenv.service +%{_unitdir}/setup-systemd-proxy-env.path +%{_unitdir}/setup-systemd-proxy-env.service +%{_unitdir}/sysinit.target.wants +%{_unitdir}/sysinit.target.wants/MicroOS-firstboot.service %{_prefix}/lib/sysctl.d/30-corefiles.conf %{_libexecdir}/MicroOS-firstboot %{_sbindir}/setup-systemd-proxy-env ++++++ microos-tools-1.0+git20200214.c7654a7.tar.xz -> microos-tools-2.0.tar.xz ++++++ ++++ 9221 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/Makefile.am new/microos-tools-2.0/Makefile.am --- old/microos-tools-1.0+git20200214.c7654a7/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/Makefile.am 2020-05-10 11:28:46.000000000 +0200 @@ -0,0 +1,7 @@ +AUTOMAKE_OPTIONS = 1.6 foreign check-news dist-xz + +SUBDIRS = firstboot systemd-proxy-env systemd-printenv sysctl + +CLEANFILES = *~ + +EXTRA_DIST = README.md diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/NEWS new/microos-tools-2.0/NEWS --- old/microos-tools-1.0+git20200214.c7654a7/NEWS 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/NEWS 2020-05-10 11:03:27.000000000 +0200 @@ -0,0 +1,2 @@ +Version 2.0 + - change to autotools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/caasp/cloud-init/cc_suse_caasp.py new/microos-tools-2.0/caasp/cloud-init/cc_suse_caasp.py --- old/microos-tools-1.0+git20200214.c7654a7/caasp/cloud-init/cc_suse_caasp.py 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/caasp/cloud-init/cc_suse_caasp.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,71 +0,0 @@ -# vi: ts=4 expandtab -# -# Copyright (C) 2017,2018 SUSE LLC -# -# Author: Thorsten Kukuk <[email protected]> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# in Version 2 or later as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -from cloudinit.settings import PER_INSTANCE -from cloudinit import util - -frequency = PER_INSTANCE - -DEFAULT_PERMS = 0o644 - -# suse_caasp: -# role: [admin|cluster] -# admin_node: admin-node.example.com - -def enable_service(service): - cmd = ['systemctl', 'enable', '--now', service] - util.subp(cmd, capture=True) - -def handle(name, cfg, cloud, log, args): - if len(args) != 0: - caasp_cfg = util.read_conf(args[0]) - else: - if 'suse_caasp' not in cfg: - log.debug(("Skipping module named %s, " - "no 'suse_caasp' configuration found"), name) - return - caasp_cfg = cfg['suse_caasp'] - - if 'role' not in caasp_cfg: - log.warn(("Skipping module named %s, " - "no 'role' found in 'suse_caasp' configuration"), name) - return - system_role = caasp_cfg['role'] - - if system_role == 'admin': - log.debug(("role administration node found")) - enable_service('admin-node-init') - enable_service('admin-node-setup') - enable_service('docker') - enable_service('etcd') - enable_service('kubelet') - enable_service('salt-minion') - elif system_role == 'cluster': - log.debug(("role cluster node found")) - if 'admin_node' not in caasp_cfg: - log.warn(("Skipping module named %s, " - "no 'admin_node' found for cluster system role"), name) - return - admin_node = caasp_cfg['admin_node'] - - contents = "master: %s" % (admin_node) - util.write_file('/etc/salt/minion.d/master.conf', contents, mode=DEFAULT_PERMS) - enable_service('docker') - enable_service('salt-minion') - else: - log.warn(("Unknown role %s, skipping module named %s"), role, name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/caasp/etc/salt/minion.d/grains_refresh.conf new/microos-tools-2.0/caasp/etc/salt/minion.d/grains_refresh.conf --- old/microos-tools-1.0+git20200214.c7654a7/caasp/etc/salt/minion.d/grains_refresh.conf 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/caasp/etc/salt/minion.d/grains_refresh.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -grains_refresh_every: 10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/caasp/usr/lib/systemd/system/adjust-cloud-cfg.service new/microos-tools-2.0/caasp/usr/lib/systemd/system/adjust-cloud-cfg.service --- old/microos-tools-1.0+git20200214.c7654a7/caasp/usr/lib/systemd/system/adjust-cloud-cfg.service 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/caasp/usr/lib/systemd/system/adjust-cloud-cfg.service 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -[Unit] -Description=Adjust cloud.cfg for network configuration -DefaultDependencies=no -Wants=local-fs.target -After=local-fs.target -Before=cloud-init-local.service -ConditionPathExists=/etc/cloud/cloud.cfg.d -ConditionPathExists=!/etc/cloud/cloud.cfg.d/01-network.cfg - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/sbin/adjust-cloud-cfg - -[Install] -WantedBy=multi-user.target diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/caasp/usr/lib/systemd/system/setup-salt-minion.service new/microos-tools-2.0/caasp/usr/lib/systemd/system/setup-salt-minion.service --- old/microos-tools-1.0+git20200214.c7654a7/caasp/usr/lib/systemd/system/setup-salt-minion.service 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/caasp/usr/lib/systemd/system/setup-salt-minion.service 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -[Unit] -Description=Setup SALT minion ID -DefaultDependencies=no -Conflicts=shutdown.target -After=local-fs.target -Before=salt-minion.service -ConditionPathExists=/etc/machine-id -ConditionPathExists=/etc/salt/minion.d -ConditionPathExists=!/etc/salt/minion.d/minion_id.conf - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=-/bin/sh -c "echo -n 'id: ' > /etc/salt/minion.d/minion_id.conf; cat /etc/machine-id >> /etc/salt/minion.d/minion_id.conf" - -[Install] -WantedBy=multi-user.target - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/caasp/usr/sbin/adjust-cloud-cfg new/microos-tools-2.0/caasp/usr/sbin/adjust-cloud-cfg --- old/microos-tools-1.0+git20200214.c7654a7/caasp/usr/sbin/adjust-cloud-cfg 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/caasp/usr/sbin/adjust-cloud-cfg 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -#!/bin/bash - -# go through the list of network devices. If we have for one a -# configuration file, tell cloud-init to not configure the network. - -CFG=/etc/cloud/cloud.cfg.d/01-network.cfg - -test -f ${CFG} && exit 0 - -for dev in `/sbin/ip -o link show | awk -F': ' '{print $2}'` ; do - if [ "${dev}" != "lo" ]; then - if [ -f /etc/sysconfig/network/ifcfg-${dev} ]; then - echo "network: {config: disabled}" > ${CFG} - exit 0 - fi - fi -done -# if we end here, there was no network configuration, so cloud-init -# will do the job. -touch ${CFG} -exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/caasp/usr/sbin/create_autoyast_profile new/microos-tools-2.0/caasp/usr/sbin/create_autoyast_profile --- old/microos-tools-1.0+git20200214.c7654a7/caasp/usr/sbin/create_autoyast_profile 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/caasp/usr/sbin/create_autoyast_profile 1970-01-01 01:00:00.000000000 +0100 @@ -1,482 +0,0 @@ -#!/usr/bin/perl -# -# Copyright (C) 2017 Thorsten Kukuk -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# in Version 2 or later as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, see <http://www.gnu.org/licenses/>. -# - -=head1 NAME - - create_autoyast_profile - Create autoyast profile for SUSE CaaSP - -=head1 SYNOPSIS - - create_autoyast_profile [options] - -=head1 DESCRIPTION - - Create an autoyast profile for fully automatic installation of - SUSE Container as a Service Platform Cluster Node. - -=head1 OPTIONS - - -o|--output file Write autoyast profile as 'file' to disk - --salt-master Specify the name of the salt master server - --ntp-server Specify name of ntp server - --smt-url Specify url of SMT server - --regcode Specify registration code for SUSE CaaSP - --reg-email Specify email address for registration - --usage Print usage - -h|-?|--help Help - -=cut - -use strict; -use warnings; -use locale; -use Pod::Usage; -use Getopt::Long; -use Net::Domain qw(hostname hostfqdn); -use JSON qw(decode_json); - -my $outputfile = "-"; -my $saltmaster = hostfqdn(); -my $ntp_server = ""; -my $smturl = ""; -my $reg_email = ""; -my $regcode = ""; -my $help = 0; -my $man = 0; -my $usage = 0; - -GetOptions('o|output=s' => \$outputfile, - 'salt-master=s' => \$saltmaster, - 'smt-url=s' => \$smturl, - 'reg-email=s' => \$reg_email, - 'regcode=s' => \$regcode, - 'ntp-server=s'=>\$ntp_server, - 'man' => \$man, - 'u|usage' => \$usage, - 'help|h|?' => \$help) or pod2usage(2); -pod2usage(0) if $help; -pod2usage(-exitstatus => 0, -verbose => 2) if $man; -pod2usage(-exitstatus => 0, -verbose => 0) if $usage; - - - -open(OUTPUT,">$outputfile") || die("Can't open output file $outputfile: $!."); - -print_header(); -print_bootloader(); -print_general_section(); -print_languages(); -setup_networking(); -setup_ntp(); -print_software(); -print_services(); -print_scripts(); -set_root_password(); -setup_registration(); -setup_salt_minion(); -print_footer(); - -close(OUTPUT); - -#------------------------------------------------------------------------------ - -sub print_header { - print OUTPUT <<"HeaderText"; -<?xml version="1.0"?> -<!DOCTYPE profile> -<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> -HeaderText -} - -#------------------------------------------------------------------------------ - -sub print_footer { - print OUTPUT <<"EOT"; -</profile> -EOT -} - -#------------------------------------------------------------------------------ - -sub print_bootloader { - print OUTPUT <<"EOT"; - <bootloader> - <global> - <generic_mbr>true</generic_mbr> - <gfxmode>auto</gfxmode> - <hiddenmenu>false</hiddenmenu> - <os_prober>false</os_prober> - <terminal>gfxterm</terminal> - <timeout config:type="integer">8</timeout> - <suse_btrfs config:type="boolean">true</suse_btrfs> - </global> - </bootloader> -EOT -} - -#------------------------------------------------------------------------------ - -sub print_general_section { - print OUTPUT <<"EOT"; - <general> - <ask-list config:type="list"/> - <mode> - <confirm config:type="boolean">false</confirm> - <second_stage config:type="boolean">false</second_stage> - <self_update config:type="boolean">false</self_update> - </mode> - <proposals config:type="list"/> - <storage> - <partition_alignment config:type="symbol">align_optimal</partition_alignment> - <start_multipath config:type="boolean">false</start_multipath> - </storage> - </general> - <partitioning config:type="list"> - <drive> - <use>all</use> - <partitions config:type="list"> - <partition> - <mount>/boot/efi</mount> - <size>200mb</size> - <partition_id config:type="integer">1</partition_id> - <filesystem config:type="symbol">vfat</filesystem> - </partition> - <partition> - <mount>/</mount> - <size>30gb</size> - </partition> - <partition> - <filesystem config:type="symbol">btrfs</filesystem> - <mount>/var/lib/docker</mount> - <size>max</size> - </partition> - </partitions> - </drive> - </partitioning> - <ssh_import> - <copy_config config:type="boolean">false</copy_config> - <import config:type="boolean">false</import> - </ssh_import> -EOT -} - -#------------------------------------------------------------------------------ - -sub print_languages { - print OUTPUT <<"EOT"; - <keyboard> - <keymap>english-us</keymap> - </keyboard> - <language> - <language>en_US</language> - <languages/> - </language> - <timezone> - <hwclock>UTC</hwclock> - <timezone>Etc/GMT</timezone> - </timezone> -EOT -} - -#------------------------------------------------------------------------------ - -sub set_root_password { - - my $password = "!"; - my $encrypted = "true"; - - open(PASSWD, '/etc/passwd'); - while (<PASSWD>) { - chomp; - my($login, $passwd, $uid, $gid, $gcos, $home, $shell) = split(/:/); - - if ($login eq "root") { - if ($passwd eq "x") { - if (open(SHADOW, '/etc/shadow')) { - while (<SHADOW>) { - chomp; - my($slogin, $spasswd, $sp_lstchg, $sp_min, $sp_max, - $sp_warn, $sp_inact, $sp_expire, $sp_flag) = split(/:/); - if ($slogin eq "root") { - $password = $spasswd; - $encrypted = "true"; - } - } - close(SHADOW); - } - } else { - $password = $passwd; - } - } - } - close(PASSWD); - - print OUTPUT <<"EOT"; - <users config:type="list"> - <user> - <username>root</username> -EOT - -print OUTPUT " <user_password>$password</user_password>\n"; -print OUTPUT " <encrypted config:type=\"boolean\">$encrypted</encrypted>\n"; - - print OUTPUT <<"EOT" - </user> - </users> -EOT -} - -#------------------------------------------------------------------------------ - -sub print_software { - print OUTPUT <<"EOT"; - <software> - <image/> - <install_recommended config:type="boolean">false</install_recommended> - <instsource/> - <patterns config:type="list"> - <pattern>SUSE-MicroOS</pattern> - <pattern>SUSE-MicroOS-hardware</pattern> - <pattern>SUSE-MicroOS-apparmor</pattern> - <pattern>SUSE-CaaSP-Stack</pattern> - </patterns> - </software> -EOT -} - -#------------------------------------------------------------------------------ - -sub print_services { - print OUTPUT <<"EOT"; - <services-manager> - <default_target>multi-user</default_target> - <services> - <disable config:type="list"> - <service>purge-kernels</service> - </disable> - <enable config:type="list"> - <service>sshd</service> - <service>cloud-init-local</service> - <service>cloud-init</service> - <service>cloud-config</service> - <service>cloud-final</service> - <service>issue-generator</service> - <service>issue-add-ssh-keys</service> - <service>docker</service> - <service>container-feeder</service> -EOT - print OUTPUT " <service>salt-minion</service>\n" if ($saltmaster ne ""); - print OUTPUT " <service>systemd-timesyncd</service>\n" if ($ntp_server eq ""); - print OUTPUT <<"EOT"; - </enable> - </services> - </services-manager> -EOT -} - -#------------------------------------------------------------------------------ - -sub print_scripts { - - if ($saltmaster ne "" || $ntp_server eq "") { - print OUTPUT <<"EOT"; - <scripts> - <chroot-scripts config:type="list"> -EOT - if ($saltmaster ne "") { - print OUTPUT <<"EOT"; - <script> - <filename>configure-salt.sh</filename> - <interpreter>shell</interpreter> - <chrooted config:type="boolean">true</chrooted> - <source> -<![CDATA[ -#!/bin/sh -EOT - print OUTPUT "echo \"master: $saltmaster\" > /etc/salt/minion.d/master.conf" if ($saltmaster ne ""); - print OUTPUT <<"EOT"; -]]> - </source> - </script> -EOT -} - if ($ntp_server eq "") { - print OUTPUT <<"EOT"; - <script> - <filename>configure-timesyncd.sh</filename> - <interpreter>shell</interpreter> - <chrooted config:type="boolean">true</chrooted> - <source> -<![CDATA[ -#!/bin/sh -EOT - my $my_hostname = hostfqdn(); - print OUTPUT "sed -i -e 's|#NTP=.*|NTP=$my_hostname|g' /etc/systemd/timesyncd.conf\n"; - print OUTPUT <<"EOT"; -]]> - </source> - </script> -EOT -} - print OUTPUT " </chroot-scripts>\n"; - print OUTPUT " </scripts>\n"; - } -} - -#------------------------------------------------------------------------------ - -sub find_smturl { - if (open(INPUTFILE, "</etc/SUSEConnect")) { - while (<INPUTFILE>) { - chomp; - if ( $_ =~ m/^url:/ ) { - $_ =~ s/url: //; - close (INPUTFILE); - return $_; - } - } - } - close (INPUTFILE); - return ""; -} - -sub setup_registration { - my $is_active = 0; - - if ($smturl ne "" || $regcode ne "") { - $is_active = 1; - } else { - my $connectoutput = `/usr/sbin/SUSEConnect -s 2>/dev/null`; - if ($? == 0) { - my $decoded = decode_json($connectoutput); - foreach my $prod ( @{$decoded} ) { - if ($prod->{"identifier"} eq "CAASP") { - $regcode = $prod->{"regcode"} if ($regcode eq ""); - $is_active = 1 if ($prod->{"status"} eq "Registered"); - } - } - } - } - - print OUTPUT " <suse_register>\n"; - if ($is_active) { - $smturl = find_smturl() if ($smturl eq ""); - - print OUTPUT " <do_registration config:type=\"boolean\">true</do_registration>\n"; - print OUTPUT " <email>$reg_email</email>\n" unless ($reg_email eq ""); - print OUTPUT " <reg_code>$regcode</reg_code>\n" if (defined $regcode && $regcode ne ""); - print OUTPUT " <install_updates config:type=\"boolean\">true</install_updates>\n"; - print OUTPUT " <slp_discovery config:type=\"boolean\">false</slp_discovery>\n"; - print OUTPUT " <reg_server>$smturl</reg_server>\n" if ($smturl ne ""); - } else { - print OUTPUT " <do_registration config:type=\"boolean\">false</do_registration>\n"; - } - print OUTPUT " </suse_register>\n"; -} - -#------------------------------------------------------------------------------ - -sub setup_salt_minion { - - if ($saltmaster ne "") { - print OUTPUT <<"EOT"; - <files config:type="list"> - <file> - <file_path>/etc/salt/minion.d/master.conf</file_path> - <file_contents> -<![CDATA[ -EOT - print OUTPUT "master: $saltmaster\n"; - print OUTPUT <<"EOT"; -]]> - </file_contents> - <file_owner>root.root</file_owner> - <file_permissions>640</file_permissions> - </file> - </files> -EOT - } -} - -#------------------------------------------------------------------------------ - -sub setup_networking { - print OUTPUT <<"EOT"; - <networking> - <dhcp_options> - <dhclient_client_id/> - <dhclient_hostname_option>AUTO</dhclient_hostname_option> - </dhcp_options> - <dns> - <dhcp_hostname config:type="boolean">true</dhcp_hostname> - <resolv_conf_policy>auto</resolv_conf_policy> - <write_hostname config:type="boolean">false</write_hostname> - </dns> - <interfaces config:type="list"> - <interface> - <bootproto>dhcp</bootproto> - <device>eth0</device> - <dhclient_set_default_route>yes</dhclient_set_default_route> - <startmode>auto</startmode> - </interface> - <interface> - <bootproto>static</bootproto> - <device>lo</device> - <firewall>no</firewall> - <ipaddr>127.0.0.1</ipaddr> - <netmask>255.0.0.0</netmask> - <network>127.0.0.0</network> - <prefixlen>8</prefixlen> - <startmode>nfsroot</startmode> - <usercontrol>no</usercontrol> - </interface> - </interfaces> - <ipv6 config:type="boolean">true</ipv6> - <keep_install_network config:type="boolean">true</keep_install_network> - <setup_before_proposal config:type="boolean">true</setup_before_proposal> - <managed config:type="boolean">false</managed> - <routing> - <ipv4_forward config:type="boolean">false</ipv4_forward> - <ipv6_forward config:type="boolean">false</ipv6_forward> - </routing> - </networking> -EOT -} - -#------------------------------------------------------------------------------ - -sub setup_ntp { - return if ($ntp_server eq ""); - print OUTPUT <<"EOT"; - <ntp-client> - <configure_dhcp config:type="boolean">false</configure_dhcp> - <peers config:type="list"> - <peer> -EOT - print OUTPUT " <address>$ntp_server</address>\n"; - print OUTPUT <<"EOT"; - <options>iburst</options> - <type>server</type> - </peer> - </peers> - <start_at_boot config:type="boolean">true</start_at_boot> - <start_in_chroot config:type="boolean">false</start_in_chroot> - </ntp-client> -EOT -} - -#------------------------------------------------------------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/caasp/usr/sbin/migrate-ntp2chrony new/microos-tools-2.0/caasp/usr/sbin/migrate-ntp2chrony --- old/microos-tools-1.0+git20200214.c7654a7/caasp/usr/sbin/migrate-ntp2chrony 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/caasp/usr/sbin/migrate-ntp2chrony 1970-01-01 01:00:00.000000000 +0100 @@ -1,32 +0,0 @@ -#!/bin/bash - -BACKUPDIR=/var/lib/ntp2chrony/backup -LOGFILE=/var/log/migrate-ntp2chrony.log - -# if this directory exist, we did already migrate -test -d ${BACKUPDIR} && exit 0 - -# if ntp is not installed, exit -rpm -q --quiet ntp || exit 0 - -# if chrony is not installed, exit -rpm -q --quiet chrony || exit 0 - -# ntpd is not enabled, exit -systemctl is-enabled -q ntpd || exit 0 - -# ntpd is enabled, chrony installed. Backup -# configuration, convert configuration, disable -# ntpd, enable chrony, but do not restart. -mkdir -p ${BACKUPDIR} || exit 1 -cp -a /etc/ntp.* ${BACKUPDIR}/ -cp -a /etc/chrony.* ${BACKUPDIR}/ -echo "Migrate /etc/ntp.conf to /etc/chrony.conf (`date \"+%Y-%m-%d %H:%M:%S\"`)" | tee -a ${LOGFILE} -echo "Ignored lines:" | tee -a ${LOGFILE} -/usr/sbin/ntp2chrony --backup --ignored-lines |& tee -a ${LOGFILE} -if [ ${PIPESTATUS[0]} -ne 0 ]; then - exit 1 -fi -systemctl disable ntpd |& tee -a ${LOGFILE} -systemctl enable chronyd |& tee -a ${LOGFILE} - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/configure.ac new/microos-tools-2.0/configure.ac --- old/microos-tools-1.0+git20200214.c7654a7/configure.ac 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/configure.ac 2020-05-10 11:26:40.000000000 +0200 @@ -0,0 +1,24 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(microos-tools, 2.0) +AM_INIT_AUTOMAKE +AC_PREFIX_DEFAULT(/usr) + +AC_SUBST(PACKAGE) +AC_SUBST(VERSION) + +PKG_CHECK_VAR([systemdsystemunitdir], [systemd], [systemdsystemunitdir], [], + [AC_MSG_ERROR([Could not determine value for 'systemdsystemunitdir' - is the 'systemd.pc' file installed?])]) + +if test "${exec_prefix}" = "NONE" +then + SYSCTLDIR=${prefix}/lib/sysctl.d +else + SYSCTLDIR=${exec_prefix}/lib/sysctl.d +fi +AC_SUBST(SYSCTLDIR) + +AC_PROG_INSTALL +AC_PROG_LN_S + +AC_OUTPUT([Makefile firstboot/Makefile firstboot/MicroOS-firstboot.service \ + systemd-proxy-env/Makefile systemd-printenv/Makefile sysctl/Makefile]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/etc/systemd/system/systemd-firstboot.service new/microos-tools-2.0/etc/systemd/system/systemd-firstboot.service --- old/microos-tools-1.0+git20200214.c7654a7/etc/systemd/system/systemd-firstboot.service 2020-05-11 13:26:01.247189071 +0200 +++ new/microos-tools-2.0/etc/systemd/system/systemd-firstboot.service 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -symbolic link to /dev/null diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/firstboot/Makefile.am new/microos-tools-2.0/firstboot/Makefile.am --- old/microos-tools-1.0+git20200214.c7654a7/firstboot/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/firstboot/Makefile.am 2020-05-10 11:05:38.000000000 +0200 @@ -0,0 +1,14 @@ +systemddir = $(systemdsystemunitdir) + +libexec_SCRIPTS = MicroOS-firstboot +systemd_DATA = MicroOS-firstboot.service + +EXTRA_DIST = MicroOS-firstboot.service.in $(SCRIPTS) + +install-data-hook: + mkdir -p $(DESTDIR)@sysconfdir@/systemd/system + ln -sf /dev/null $(DESTDIR)@sysconfdir@/systemd/system/systemd-firstboot.service + +install-exec-hook: + mkdir -p $(DESTDIR)/$(systemdsystemunitdir)/sysinit.target.wants + ln -sf ../MicroOS-firstboot.service $(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants/MicroOS-firstboot.service diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/firstboot/MicroOS-firstboot new/microos-tools-2.0/firstboot/MicroOS-firstboot --- old/microos-tools-1.0+git20200214.c7654a7/firstboot/MicroOS-firstboot 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/firstboot/MicroOS-firstboot 2020-04-30 16:06:17.000000000 +0200 @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright (c) 2016 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 -e + +cleanup() { + setterm -msg on +} +trap cleanup EXIT + +# avoid kernel messages spamming our console +setterm -msg off + +systemd_firstboot_args=('--setup-machine-id') + +systemd-firstboot "${systemd_firstboot_args[@]}" + +# vim: sw=4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/firstboot/MicroOS-firstboot.service.in new/microos-tools-2.0/firstboot/MicroOS-firstboot.service.in --- old/microos-tools-1.0+git20200214.c7654a7/firstboot/MicroOS-firstboot.service.in 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/firstboot/MicroOS-firstboot.service.in 2020-05-10 10:49:41.000000000 +0200 @@ -0,0 +1,17 @@ +[Unit] +Description=openSUSE MicroOS Firstboot Service +DefaultDependencies=no +Conflicts=shutdown.target +After=systemd-remount-fs.service +Before=systemd-sysusers.service sysinit.target shutdown.target +ConditionPathIsReadWrite=/etc +ConditionFirstBoot=yes + +[Service] +Environment=SYSTEMCTL_OPTIONS=--ignore-dependencies TERM=linux +Type=oneshot +RemainAfterExit=yes +ExecStart=@libexecdir@/MicroOS-firstboot +StandardOutput=tty +StandardInput=tty +StandardError=tty diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/missing new/microos-tools-2.0/missing --- old/microos-tools-1.0+git20200214.c7654a7/missing 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/missing 2020-05-10 10:51:32.000000000 +0200 @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2016-01-11.22; # UTC + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard <[email protected]>, 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to <[email protected]>." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/sysctl/30-corefiles.conf new/microos-tools-2.0/sysctl/30-corefiles.conf --- old/microos-tools-1.0+git20200214.c7654a7/sysctl/30-corefiles.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/sysctl/30-corefiles.conf 2020-04-30 16:06:17.000000000 +0200 @@ -0,0 +1,10 @@ +# Create core files in /tmp with an unique name +# %p: pid +# %%: output one '%' +# %u: uid +# %g: gid +# %s: signal number +# %t: UNIX time of dump +# %h: hostname +# %e: executable filename +kernel.core_pattern=/var/tmp/core.%h.%e.%p.%t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/sysctl/Makefile.am new/microos-tools-2.0/sysctl/Makefile.am --- old/microos-tools-1.0+git20200214.c7654a7/sysctl/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/sysctl/Makefile.am 2020-05-10 11:27:41.000000000 +0200 @@ -0,0 +1,5 @@ +sysctldir = $(SYSCTLDIR) + +sysctl_DATA = 30-corefiles.conf + +EXTRA_DIST = $(DATA) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/systemd-printenv/Makefile.am new/microos-tools-2.0/systemd-printenv/Makefile.am --- old/microos-tools-1.0+git20200214.c7654a7/systemd-printenv/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/systemd-printenv/Makefile.am 2020-05-10 11:23:53.000000000 +0200 @@ -0,0 +1,5 @@ +systemddir = $(systemdsystemunitdir) + +systemd_DATA = printenv.service + +EXTRA_DIST = $(DATA) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/systemd-printenv/printenv.service new/microos-tools-2.0/systemd-printenv/printenv.service --- old/microos-tools-1.0+git20200214.c7654a7/systemd-printenv/printenv.service 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/systemd-printenv/printenv.service 2020-04-30 16:06:17.000000000 +0200 @@ -0,0 +1,11 @@ +[Unit] +Description=Print systemd environment +Wants=local-fs.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/printenv + +[Install] +WantedBy=default.target + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/systemd-proxy-env/Makefile.am new/microos-tools-2.0/systemd-proxy-env/Makefile.am --- old/microos-tools-1.0+git20200214.c7654a7/systemd-proxy-env/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/systemd-proxy-env/Makefile.am 2020-05-10 11:20:18.000000000 +0200 @@ -0,0 +1,6 @@ +systemddir = $(systemdsystemunitdir) + +sbin_SCRIPTS = setup-systemd-proxy-env +systemd_DATA = setup-systemd-proxy-env.path setup-systemd-proxy-env.service + +EXTRA_DIST = $(DATA) $(SCRIPTS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/systemd-proxy-env/setup-systemd-proxy-env new/microos-tools-2.0/systemd-proxy-env/setup-systemd-proxy-env --- old/microos-tools-1.0+git20200214.c7654a7/systemd-proxy-env/setup-systemd-proxy-env 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/systemd-proxy-env/setup-systemd-proxy-env 2020-04-30 16:06:17.000000000 +0200 @@ -0,0 +1,69 @@ +#!/bin/bash + +# Look at /etc/sysconfig/proxy and make the proxy configuration +# available as environment variable in systemd services + +CFG=/etc/sysconfig/proxy +SYSTEMD_CFG=/etc/systemd/system.conf.d/proxy.conf + +test -f ${CFG} || exit 0 + +DefaultEnvironment="" + +while read line ; do + case "$line" in + \#*|"") continue ;; + esac + eval val=${line#*=} + test -z "$val" && continue + case "$line" in + PROXY_ENABLED=*) + test "$val" = "yes" && continue + if [ -f $SYSTEMD_CFG ]; then + rm $SYSTEMD_CFG + systemctl daemon-reload + fi + exit 0 + ;; + HTTP_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"HTTP_PROXY=${val}\" \"http_proxy=${val}\"" + ;; + HTTPS_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"HTTPS_PROXY=${val}\" \"https_proxy=${val}\"" + ;; + FTP_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"FTP_PROXY=${val}\" \"ftp_proxy=${val}\"" + ;; + GOPHER_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"GOPHER_PROXY=${val}\" \"gopher_proxy=${val}\"" + ;; + SOCKS_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"SOCKS_PROXY=${val}\" \"socks_proxy=${val}\"" + ;; + SOCKS5_SERVER=*) + DefaultEnvironent="$DefaultEnvironent \"SOCKS5_PROXY=${val}\" \"socks5_proxy=${val}\"" + ;; + NO_PROXY=*) + DefaultEnvironent="$DefaultEnvironent \"NO_PROXY=${val}\" \"no_proxy=${val}\"" + ;; + esac +done < $CFG + +test -z "$DefaultEnvironent" && exit 0 + +if [ ! -d /etc/systemd/system.conf.d ]; then + mkdir -p /etc/systemd/system.conf.d || exit 1 +fi + +TMPCFGFILE=`mktemp ${SYSTEMD_CFG}.XXXXXXXXXX` || exit 1 +echo -e "[Manager]\nDefaultEnvironment=${DefaultEnvironent}" > ${TMPCFGFILE} +cmp -s ${TMPCFGFILE} ${SYSTEMD_CFG} +if [ $? -ne 0 ]; then + chmod 0644 ${TMPCFGFILE} + mv ${TMPCFGFILE} ${SYSTEMD_CFG} + systemctl daemon-reload +else + rm -f $TMPCFGFIlE +fi + +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/systemd-proxy-env/setup-systemd-proxy-env.path new/microos-tools-2.0/systemd-proxy-env/setup-systemd-proxy-env.path --- old/microos-tools-1.0+git20200214.c7654a7/systemd-proxy-env/setup-systemd-proxy-env.path 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/systemd-proxy-env/setup-systemd-proxy-env.path 2020-04-30 16:06:17.000000000 +0200 @@ -0,0 +1,11 @@ +[Unit] +Description=Watch for changes in proxy configuration +After=local-fs.target + +[Path] +Unit=setup-systemd-proxy-env.service +PathChanged=/etc/sysconfig/proxy + +[Install] +WantedBy=default.target + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/systemd-proxy-env/setup-systemd-proxy-env.service new/microos-tools-2.0/systemd-proxy-env/setup-systemd-proxy-env.service --- old/microos-tools-1.0+git20200214.c7654a7/systemd-proxy-env/setup-systemd-proxy-env.service 1970-01-01 01:00:00.000000000 +0100 +++ new/microos-tools-2.0/systemd-proxy-env/setup-systemd-proxy-env.service 2020-04-30 16:06:17.000000000 +0200 @@ -0,0 +1,11 @@ +[Unit] +Description=Update system wide proxy setup for systemd services +Wants=local-fs.target + +[Service] +Type=oneshot +ExecStart=/usr/sbin/setup-systemd-proxy-env + +[Install] +WantedBy=default.target + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/usr/lib/MicroOS-firstboot new/microos-tools-2.0/usr/lib/MicroOS-firstboot --- old/microos-tools-1.0+git20200214.c7654a7/usr/lib/MicroOS-firstboot 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/usr/lib/MicroOS-firstboot 1970-01-01 01:00:00.000000000 +0100 @@ -1,36 +0,0 @@ -#!/bin/bash -# Copyright (c) 2016 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 -e - -cleanup() { - setterm -msg on -} -trap cleanup EXIT - -# avoid kernel messages spamming our console -setterm -msg off - -systemd_firstboot_args=('--setup-machine-id') - -systemd-firstboot "${systemd_firstboot_args[@]}" - -# vim: sw=4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/usr/lib/sysctl.d/30-corefiles.conf new/microos-tools-2.0/usr/lib/sysctl.d/30-corefiles.conf --- old/microos-tools-1.0+git20200214.c7654a7/usr/lib/sysctl.d/30-corefiles.conf 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/usr/lib/sysctl.d/30-corefiles.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -# Create core files in /tmp with an unique name -# %p: pid -# %%: output one '%' -# %u: uid -# %g: gid -# %s: signal number -# %t: UNIX time of dump -# %h: hostname -# %e: executable filename -kernel.core_pattern=/var/tmp/core.%h.%e.%p.%t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/usr/lib/systemd/system/MicroOS-firstboot.service new/microos-tools-2.0/usr/lib/systemd/system/MicroOS-firstboot.service --- old/microos-tools-1.0+git20200214.c7654a7/usr/lib/systemd/system/MicroOS-firstboot.service 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/usr/lib/systemd/system/MicroOS-firstboot.service 1970-01-01 01:00:00.000000000 +0100 @@ -1,17 +0,0 @@ -[Unit] -Description=openSUSE MicroOS Firstboot Service -DefaultDependencies=no -Conflicts=shutdown.target -After=systemd-remount-fs.service -Before=systemd-sysusers.service sysinit.target shutdown.target -ConditionPathIsReadWrite=/etc -ConditionFirstBoot=yes - -[Service] -Environment=SYSTEMCTL_OPTIONS=--ignore-dependencies TERM=linux -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/lib/MicroOS-firstboot -StandardOutput=tty -StandardInput=tty -StandardError=tty diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/usr/lib/systemd/system/printenv.service new/microos-tools-2.0/usr/lib/systemd/system/printenv.service --- old/microos-tools-1.0+git20200214.c7654a7/usr/lib/systemd/system/printenv.service 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/usr/lib/systemd/system/printenv.service 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -[Unit] -Description=Print systemd environment -Wants=local-fs.target - -[Service] -Type=oneshot -ExecStart=/usr/bin/printenv - -[Install] -WantedBy=default.target - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/usr/lib/systemd/system/setup-systemd-proxy-env.path new/microos-tools-2.0/usr/lib/systemd/system/setup-systemd-proxy-env.path --- old/microos-tools-1.0+git20200214.c7654a7/usr/lib/systemd/system/setup-systemd-proxy-env.path 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/usr/lib/systemd/system/setup-systemd-proxy-env.path 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -[Unit] -Description=Watch for changes in proxy configuration -After=local-fs.target - -[Path] -Unit=setup-systemd-proxy-env.service -PathChanged=/etc/sysconfig/proxy - -[Install] -WantedBy=default.target - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/usr/lib/systemd/system/setup-systemd-proxy-env.service new/microos-tools-2.0/usr/lib/systemd/system/setup-systemd-proxy-env.service --- old/microos-tools-1.0+git20200214.c7654a7/usr/lib/systemd/system/setup-systemd-proxy-env.service 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/usr/lib/systemd/system/setup-systemd-proxy-env.service 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -[Unit] -Description=Update system wide proxy setup for systemd services -Wants=local-fs.target - -[Service] -Type=oneshot -ExecStart=/usr/sbin/setup-systemd-proxy-env - -[Install] -WantedBy=default.target - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/usr/lib/systemd/system/sysinit.target.wants/MicroOS-firstboot.service new/microos-tools-2.0/usr/lib/systemd/system/sysinit.target.wants/MicroOS-firstboot.service --- old/microos-tools-1.0+git20200214.c7654a7/usr/lib/systemd/system/sysinit.target.wants/MicroOS-firstboot.service 2020-05-11 13:26:01.243189063 +0200 +++ new/microos-tools-2.0/usr/lib/systemd/system/sysinit.target.wants/MicroOS-firstboot.service 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -symbolic link to ../MicroOS-firstboot.service diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/microos-tools-1.0+git20200214.c7654a7/usr/sbin/setup-systemd-proxy-env new/microos-tools-2.0/usr/sbin/setup-systemd-proxy-env --- old/microos-tools-1.0+git20200214.c7654a7/usr/sbin/setup-systemd-proxy-env 2020-02-14 10:57:32.000000000 +0100 +++ new/microos-tools-2.0/usr/sbin/setup-systemd-proxy-env 1970-01-01 01:00:00.000000000 +0100 @@ -1,69 +0,0 @@ -#!/bin/bash - -# Look at /etc/sysconfig/proxy and make the proxy configuration -# available as environment variable in systemd services - -CFG=/etc/sysconfig/proxy -SYSTEMD_CFG=/etc/systemd/system.conf.d/proxy.conf - -test -f ${CFG} || exit 0 - -DefaultEnvironment="" - -while read line ; do - case "$line" in - \#*|"") continue ;; - esac - eval val=${line#*=} - test -z "$val" && continue - case "$line" in - PROXY_ENABLED=*) - test "$val" = "yes" && continue - if [ -f $SYSTEMD_CFG ]; then - rm $SYSTEMD_CFG - systemctl daemon-reload - fi - exit 0 - ;; - HTTP_PROXY=*) - DefaultEnvironent="$DefaultEnvironent \"HTTP_PROXY=${val}\" \"http_proxy=${val}\"" - ;; - HTTPS_PROXY=*) - DefaultEnvironent="$DefaultEnvironent \"HTTPS_PROXY=${val}\" \"https_proxy=${val}\"" - ;; - FTP_PROXY=*) - DefaultEnvironent="$DefaultEnvironent \"FTP_PROXY=${val}\" \"ftp_proxy=${val}\"" - ;; - GOPHER_PROXY=*) - DefaultEnvironent="$DefaultEnvironent \"GOPHER_PROXY=${val}\" \"gopher_proxy=${val}\"" - ;; - SOCKS_PROXY=*) - DefaultEnvironent="$DefaultEnvironent \"SOCKS_PROXY=${val}\" \"socks_proxy=${val}\"" - ;; - SOCKS5_SERVER=*) - DefaultEnvironent="$DefaultEnvironent \"SOCKS5_PROXY=${val}\" \"socks5_proxy=${val}\"" - ;; - NO_PROXY=*) - DefaultEnvironent="$DefaultEnvironent \"NO_PROXY=${val}\" \"no_proxy=${val}\"" - ;; - esac -done < $CFG - -test -z "$DefaultEnvironent" && exit 0 - -if [ ! -d /etc/systemd/system.conf.d ]; then - mkdir -p /etc/systemd/system.conf.d || exit 1 -fi - -TMPCFGFILE=`mktemp ${SYSTEMD_CFG}.XXXXXXXXXX` || exit 1 -echo -e "[Manager]\nDefaultEnvironment=${DefaultEnvironent}" > ${TMPCFGFILE} -cmp -s ${TMPCFGFILE} ${SYSTEMD_CFG} -if [ $? -ne 0 ]; then - chmod 0644 ${TMPCFGFILE} - mv ${TMPCFGFILE} ${SYSTEMD_CFG} - systemctl daemon-reload -else - rm -f $TMPCFGFIlE -fi - -exit 0
