Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package opi for openSUSE:Factory checked in at 2022-05-16 18:09:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/opi (Old) and /work/SRC/openSUSE:Factory/.opi.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "opi" Mon May 16 18:09:02 2022 rev:31 rq:977555 version:2.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/opi/opi.changes 2022-04-25 23:35:49.686441738 +0200 +++ /work/SRC/openSUSE:Factory/.opi.new.1538/opi.changes 2022-05-16 18:11:29.909420409 +0200 @@ -1,0 +2,11 @@ +Mon May 16 15:08:38 UTC 2022 - Dominik Heidler <dheid...@suse.de> + +- Version 2.5.0 +- Improve testsuite when ran locally +- Fix 01_install_from_packman.py test for leap +- Fix 02_install_from_home.py test for leap +- Run ci for both tumbleweed and leap +- Use $releasever in repo creation on Leap +- Run "osc up" in release.sh + +------------------------------------------------------------------- Old: ---- opi-2.4.7.tar.gz New: ---- opi-2.5.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ opi.spec ++++++ --- /var/tmp/diff_new_pack.X7LR3w/_old 2022-05-16 18:11:30.385420788 +0200 +++ /var/tmp/diff_new_pack.X7LR3w/_new 2022-05-16 18:11:30.389420791 +0200 @@ -17,7 +17,7 @@ Name: opi -Version: 2.4.7 +Version: 2.5.0 Release: 0 Summary: OBS Package Installer (CLI) License: GPL-3.0-only ++++++ opi-2.4.7.tar.gz -> opi-2.5.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.4.7/.github/workflows/ci.yaml new/opi-2.5.0/.github/workflows/ci.yaml --- old/opi-2.4.7/.github/workflows/ci.yaml 2022-04-25 10:55:07.000000000 +0200 +++ new/opi-2.5.0/.github/workflows/ci.yaml 2022-05-16 17:08:24.000000000 +0200 @@ -9,7 +9,7 @@ workflow_dispatch: jobs: - test: + tumbleweed: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -20,4 +20,13 @@ # Runs a single command using the runners shell - name: Run testsuite - run: ./test/run_all.sh + run: ./test/run_all.sh opensuse/tumbleweed + leap: + runs-on: ubuntu-latest + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Run testsuite + run: ./test/run_all.sh opensuse/leap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.4.7/opi/__init__.py new/opi-2.5.0/opi/__init__.py --- old/opi-2.4.7/opi/__init__.py 2022-04-25 10:55:07.000000000 +0200 +++ new/opi-2.5.0/opi/__init__.py 2022-05-16 17:08:24.000000000 +0200 @@ -36,7 +36,7 @@ cpu_arch = 'i586' return cpu_arch -def get_distribution(prefix=False): +def get_os_release(): os_release = {} with open('/etc/os-release') as f: for line in f.readlines(): @@ -49,6 +49,10 @@ if '"' in value: value = value.split('"', 1)[1].split('"', 1)[0] os_release[key] = value + return os_release + +def get_distribution(prefix=False, use_releasever_variable=False): + os_release = get_os_release() name = os_release['NAME'] version = os_release.get('VERSION') # VERSION is not set for TW if version: @@ -57,20 +61,27 @@ if name == 'openSUSE Tumbleweed' or name == 'openSUSE MicroOS': project = 'openSUSE:Factory' elif name == 'openSUSE Leap': - project = 'openSUSE:Leap:' + version + if use_releasever_variable: + project = 'openSUSE:Leap:$releasever' + else: + project = 'openSUSE:Leap:' + version elif name.startswith('SLE'): project = 'SLE' + version if prefix: project = 'openSUSE.org:' + project return project +def get_version(): + os_release = get_os_release() + version = os_release.get('VERSION') # VERSION is not set for TW + return version ############### ### PACKMAN ### ############### def add_packman_repo(dup=False): - project = get_distribution() + project = get_distribution(use_releasever_variable=True) project = project.replace(':', '_') project = project.replace('Factory', 'Tumbleweed') @@ -105,7 +116,7 @@ tf.file.write("type=%s\n" % repo_type) tf.file.write("gpgcheck=%i\n" % gpgcheck) if gpgkey: - subprocess.call(['sudo', 'rpm', '--import', gpgkey]) + subprocess.call(['sudo', 'rpm', '--import', gpgkey.replace('$releasever', get_version() or '$releasever')]) tf.file.write("gpgkey=%s\n" % gpgkey) if auto_refresh: tf.file.write("autorefresh=1\n") @@ -274,6 +285,10 @@ else: repo_alias = project.replace(':', '_') project_path = project.replace(':', ':/') + version = get_version() + if version: + # version is None on tw + repository = repository.replace(version, '$releasever') add_repo( filename = repo_alias, name = project, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.4.7/opi/version.py new/opi-2.5.0/opi/version.py --- old/opi-2.4.7/opi/version.py 2022-04-25 10:55:07.000000000 +0200 +++ new/opi-2.5.0/opi/version.py 2022-05-16 17:08:24.000000000 +0200 @@ -1 +1 @@ -__version__ = '2.4.7' +__version__ = '2.5.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.4.7/opi.changes new/opi-2.5.0/opi.changes --- old/opi-2.4.7/opi.changes 2022-04-25 10:55:07.000000000 +0200 +++ new/opi-2.5.0/opi.changes 2022-05-16 17:08:24.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Mon May 16 15:07:53 UTC 2022 - Dominik Heidler <dheid...@suse.de> + +- Version 2.5.0 +- Run ci for both tumbleweed and leap +- Use $releasever in repo creation on Leap + +------------------------------------------------------------------- Mon Apr 25 08:54:45 UTC 2022 - Dominik Heidler <dheid...@suse.de> - Version 2.4.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.4.7/release.sh new/opi-2.5.0/release.sh --- old/opi-2.4.7/release.sh 2022-04-25 10:55:07.000000000 +0200 +++ new/opi-2.5.0/release.sh 2022-05-16 17:08:24.000000000 +0200 @@ -15,6 +15,7 @@ read -p "Update RPM? " cd ~/devel/obs/utilities/opi +osc up sed -i -e "s/^\(Version: *\)[^ ]*$/\1${version}/" opi.spec osc vc -m "Version ${version}\n${changes}" osc rm opi-*.tar.gz diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.4.7/test/01_install_from_packman.py new/opi-2.5.0/test/01_install_from_packman.py --- old/opi-2.4.7/test/01_install_from_packman.py 2022-04-25 10:55:07.000000000 +0200 +++ new/opi-2.5.0/test/01_install_from_packman.py 2022-05-16 17:08:24.000000000 +0200 @@ -4,9 +4,9 @@ import pexpect import subprocess -c = pexpect.spawn('./bin/opi gstreamer-plugins-ugly-codecs', logfile=sys.stdout.buffer, echo=False) +c = pexpect.spawn('./bin/opi x265', logfile=sys.stdout.buffer, echo=False) -c.expect('1. gstreamer-plugins-ugly-codecs\r\n') +c.expect('1. x265\r\n') c.sendline('q') c.expect('Pick a number') c.sendline('1') @@ -25,4 +25,4 @@ c.close() assert c.exitstatus == 0, 'Exit code: %i' % c.exitstatus -subprocess.check_call(['rpm', '-qi', 'gstreamer-plugins-ugly-codecs']) +subprocess.check_call(['rpm', '-qi', 'x265']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.4.7/test/02_install_from_home.py new/opi-2.5.0/test/02_install_from_home.py --- old/opi-2.4.7/test/02_install_from_home.py 2022-04-25 10:55:07.000000000 +0200 +++ new/opi-2.5.0/test/02_install_from_home.py 2022-05-16 17:08:24.000000000 +0200 @@ -4,17 +4,19 @@ import pexpect import subprocess -c = pexpect.spawn('./bin/opi xosview', logfile=sys.stdout.buffer, echo=False) +c = pexpect.spawn('./bin/opi rtl8812au', logfile=sys.stdout.buffer, echo=False) -c.expect('1. xosview\r\n') +c.expect('1. rtl8812au\r\n') c.sendline('q') c.expect('Pick a number') c.sendline('1') -c.expect('2. .*X11:Utilities', timeout=10) -c.sendline('2') +c.expect(r'([0-9]+)\. [^ ]*hardware', timeout=10) +hwentryid = c.match.groups()[0] +print("PEXPECT: Found hardware entry id %r" % hwentryid) +c.sendline(hwentryid) -c.expect('new packages to install', timeout=60) +c.expect('new packages? to install', timeout=60) c.expect('Continue', timeout=60) c.sendline('y') @@ -26,5 +28,5 @@ c.close() assert c.exitstatus == 0, 'Exit code: %i' % c.exitstatus -subprocess.check_call(['rpm', '-qi', 'xosview']) -subprocess.check_call('zypper lr -u | grep -v X11', shell=True) +subprocess.check_call(['rpm', '-qi', 'rtl8812au']) +subprocess.check_call('zypper lr -u | grep -v hardware', shell=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.4.7/test/run_all.sh new/opi-2.5.0/test/run_all.sh --- old/opi-2.4.7/test/run_all.sh 2022-04-25 10:55:07.000000000 +0200 +++ new/opi-2.5.0/test/run_all.sh 2022-05-16 17:08:24.000000000 +0200 @@ -9,7 +9,7 @@ for t in *.py ; do let total_tests++ - if ! sudo ./run_container_test.sh "$t" ; then + if ! sudo ./run_container_test.sh "$t" "$1" ; then let failed_tests++ fi done diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opi-2.4.7/test/run_container_test.sh new/opi-2.5.0/test/run_container_test.sh --- old/opi-2.4.7/test/run_container_test.sh 2022-04-25 10:55:07.000000000 +0200 +++ new/opi-2.5.0/test/run_container_test.sh 2022-05-16 17:08:24.000000000 +0200 @@ -1,9 +1,12 @@ #!/bin/bash +base_image="${2:-opensuse/tumbleweed}" +opi_base_image="opi_base_${base_image/\//_}" + # prepare container image -if ! podman images -n | grep -q opi_base ; then +if ! podman images exists $opi_base_image ; then echo "Preparing container" - podman run -td --dns=1.1.1.1 --name=opi_base opensuse/tumbleweed + podman run -td --dns=1.1.1.1 --name=opi_base ${2:-opensuse/tumbleweed} podman exec -it opi_base zypper -n ref # opi dependencies podman exec -it opi_base zypper -n install sudo python3 python3-requests python3-lxml python3-termcolor python3-curses curl @@ -11,12 +14,13 @@ # test dependencies podman exec -it opi_base zypper -n install python3-pexpect - podman commit opi_base opi_base + podman commit opi_base $opi_base_image podman kill opi_base + podman rm opi_base fi opi_dir="$(dirname $(pwd)/$0)/../" -podman run -ti --volume "${opi_dir}:/opi/" opi_base /opi/test/run.sh $1 +podman run -ti --rm --volume "${opi_dir}:/opi/" $opi_base_image /opi/test/run.sh $1 exit $?