openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
February 2013
- 1 participants
- 1989 discussions
Hello community,
here is the log from the commit of package powerpc-utils for openSUSE:Factory checked in at 2013-02-25 20:40:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/powerpc-utils (Old)
and /work/SRC/openSUSE:Factory/.powerpc-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "powerpc-utils", Maintainer is "JLoeser(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/powerpc-utils/powerpc-utils.changes 2012-08-13 14:45:30.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.powerpc-utils.new/powerpc-utils.changes 2013-02-25 20:40:20.000000000 +0100
@@ -1,0 +2,132 @@
+Sun Feb 24 16:37:47 UTC 2013 - dvaleev(a)suse.com
+
+- Update to 1.2.16
+ * The drmgr command does not currently allow users to specify the
+ drc index of the resource they wish to add/remove. This patch
+ updates the drmgr command so that users can specify either a
+ drc name or a drc index with the -s option.
+
+ * This functionality is needed for the upcoming userspace handling
+ of PRRN RTAS events. The rtas_errd will already have the drc
+ index for the resources it needs, adding the capability to
+ parse drc names from the device tree is not supported in
+ rtas_errd though.
+
+ * Update the man page for update_flash which had an out of date link
+ to instructions for resetting a managed system to a non-partitioned
+ configuration.
+
+ * The upstream kernel has a feature in the pseries PCI code called DDW
+ that inserts TCEs transparently to device drivers. The upstream kernel
+ was recently sent a fix for DLPAR that ensured those TCEs would get
+ cleared upon DLPAR remove (http://patchwork.ozlabs.org/patch/213735/)
+ but for it to work, we need a corresponding change to drmgr for, at
+ least, PHB remove, so that the notifier chain has fired before we call
+ into the slot isolate code. Without such a change, there is no way to
+ ensure the DDW TCEs are cleared, and the DLPAR will always fail.
+
+ * Add and use dt_swap_int() to byte swap on little endian.
+
+ * Also declare buf as unsigned char, so that we don't sign extend when
+ printing values from it.
+
+-------------------------------------------------------------------
+Thu Dec 20 09:59:34 UTC 2012 - dvaleev(a)suse.com
+
+- Update to 1.2.15
+ * The frequency determination for a system can fail if we can not
+ open enough files to make the determination. This patch
+ pre-emptively updates the rlimit to ensure we can open all the
+ files necessary.
+
+ * The latest firmware levels allow for setting different power
+ savings modes. This updates the ppc64_cpu command to display
+ the power savings mode that is currently set for the partition,
+ or for the partition and the system if they are different,
+ when displaying the results for the --frequency option.
+
+ * Add support to convert device-mapper multipath device names to
+ OFW device path.
+ As multipath devices are seen by the OFW as multiple
+ (equivalent) devices, only one of them is printed so we don't
+ break user scripts expecting one line output. We can add an
+ option later to print all the paths to the multipath device.
+
+ * We have introduced full fledged Light Path Diagnostics support
+ on PowerLinux. To bring all Light Path Diagnostics related
+ code into common tree and re-use common functionalities across
+ tools, we have re-implemented usysident/usysattn commands.
+ Light Path Diagnostics including new implentation of
+ usysident/usysattn will be hosted in PowerLinux diagnostic
+ package (ppc64-diag).
+
+ ppc64-diag source:
+ http://sourceforge.net/projects/linux-diag/files/ppc64-diag
+
+ This will introduce package conflict between ppc64-diag and
+ powerpc-utils. To avoid the conflict we need to deprecate the
+ usysident/usysattn commands from powerpc-utils.
+
+ This patch deprecates usysident/usysattn commands.
+
+ * Update the values reported in the ppc64_cpu --frequency output to
+ be displayed to three digits of precision instead of two.
+
+ This update to help with test teams that are making this update
+ to their code base already so as to get this precision in
+ the reporting.
+
+- Comment Obsoletes/Provides for now, there is no such packages for
+ long time already. Let see if somebody will complain
+
+- Require powerpc-utils-python package
+
+-------------------------------------------------------------------
+Tue Dec 18 18:02:04 UTC 2012 - dvaleev(a)suse.com
+
+- Update to 1.2.14
+
+- The latest kernels allow for users to get/set the DSCR value on a per proces
+ This allows for more refined DSCR setting in applications. This is implement
+ by using the ptrace peekuser capabilites in the kernel and simply doing a
+ ptrace attach and peek from the ppc64_cpu command. Note: this does not actua
+ stop the process we are attaching to while under ptrace control.
+
+ The patch does a little more than just adding this functionality since the
+ --dscr commad now takes an optional -p <pid> option. This required an
+ updated to the command parsing code to allow this.
+
+- Includes the status field for Ethernet devices. This field is necessary for
+ the End-to-End Virtual Device View feature. The field is blindly set to 1
+ because we're trying to mimic AIX's lsdevinfo behavior that always sets it t
+ unless the device doesn't have a driver, which can't happen in Linux.
+
+- Adding more power specific files/commands to snap
+
+- There are two parameters on lparstat, count and interval, that were
+ undocumented on the man page. This patch adds these parameters to the
+ option section in the lparstat manpage.
+
+- snap uses temporary directory to gather system data (files and command
+ output), and finally creates compressed output file in tar or tar.gz
+ format. We do not need to keep the temporary directory.
+
+ snap now deletes the temprory directory it used.
+
+- Currently by default snap output is stored in snap.tar.gz file. This
+ makes difficult to identify when the snap output was collected.
+
+ This patch introduces new option -t which adds hostname adds and
+ system time to output filename. With -t output filename will be
+ snap-<hostname>-<systemtime>.tar.gz. This patch also creates
+ snap_commands directory inside $outdir to save output of commands
+ executed by snap.
+
+- Restrict the unsafe constructs by using "use strict" perl pragma
+ and hence make snap code better.
+
+- Adds support for physical ethernet devices so that the HMCs end-to-end
+ virtual device view can show SR-IOV VFs. Moves common virtual and physical
+ ethernet code to show_eth() function
+
+-------------------------------------------------------------------
Old:
----
powerpc-utils-1.2.12.tar.gz
New:
----
powerpc-utils-1.2.16.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ powerpc-utils.spec ++++++
--- /var/tmp/diff_new_pack.LuYv3a/_old 2013-02-25 20:40:22.000000000 +0100
+++ /var/tmp/diff_new_pack.LuYv3a/_new 2013-02-25 20:40:22.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package powerpc-utils
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,17 +26,17 @@
Requires: findutils
Requires: gawk
Requires: grep
+Requires: powerpc-utils-python
Requires: tgt
Requires: udev
Requires: util-linux
BuildRequires: librtas-devel
BuildRequires: zlib-devel
-#BuildRequires: libservicelog-devel
-Obsoletes: powerpc-utils-papr
-Obsoletes: ppc64-utils
-Provides: powerpc-utils-papr
-Provides: ppc64-utils
-Version: 1.2.12
+#Obsoletes: powerpc-utils-papr
+#Obsoletes: ppc64-utils
+#Provides: powerpc-utils-papr
+#Provides: ppc64-utils
+Version: 1.2.16
Release: 0
Url: http://sourceforge.net/projects/powerpc-utils
Summary: Utilities for PowerPC Hardware
@@ -76,9 +76,7 @@
mkdir $RPM_BUILD_ROOT/sbin
mv $RPM_BUILD_ROOT/usr/sbin/lsprop $RPM_BUILD_ROOT/sbin
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/nvsetenv
-ln -sf /usr/sbin/usysattn $RPM_BUILD_ROOT/usr/sbin/usysfault
ln -sf /usr/sbin/serv_config $RPM_BUILD_ROOT/usr/sbin/uspchrp
-ln -sf /usr/share/man/man8/usysattn.8 $RPM_BUILD_ROOT/usr/share/man/man8/usysfault.8
ln -sf /usr/share/man/man8/serv_config.8 $RPM_BUILD_ROOT/usr/share/man/man8/uspchrp.8
ln -sf /usr/sbin/drmgr $RPM_BUILD_ROOT/usr/sbin/drslot_chrp_slot
ln -sf /usr/sbin/drmgr $RPM_BUILD_ROOT/usr/sbin/drslot_chrp_pci
++++++ powerpc-utils-1.2.12.tar.gz -> powerpc-utils-1.2.16.tar.gz ++++++
++++ 9048 lines of diff (skipped)
++++++ powerpc-utils-lsprop.patch ++++++
--- /var/tmp/diff_new_pack.LuYv3a/_old 2013-02-25 20:40:22.000000000 +0100
+++ /var/tmp/diff_new_pack.LuYv3a/_new 2013-02-25 20:40:22.000000000 +0100
@@ -1,11 +1,13 @@
---- powerpc-utils-1.2.6.orig/src/lsprop.c 2010-12-16 15:52:43.000000000 +0100
-+++ powerpc-utils-1.2.6/src/lsprop.c 2010-12-23 17:26:27.000000000 +0100
-@@ -15,7 +15,7 @@
- #include <dirent.h>
+Index: powerpc-utils-1.2.16/src/lsprop.c
+===================================================================
+--- powerpc-utils-1.2.16.orig/src/lsprop.c
++++ powerpc-utils-1.2.16/src/lsprop.c
+@@ -26,7 +26,7 @@ static inline unsigned int dt_swap_int(u
+ }
int recurse;
-int maxbytes = 128;
+int maxbytes = 64 * 1024;
int words_per_line = 0;
- char *buf;
+ unsigned char *buf;
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package polkit-default-privs for openSUSE:Factory checked in at 2013-02-25 20:40:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/polkit-default-privs (Old)
and /work/SRC/openSUSE:Factory/.polkit-default-privs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "polkit-default-privs", Maintainer is "meissner(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/polkit-default-privs/polkit-default-privs.changes 2013-02-22 16:57:27.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.polkit-default-privs.new/polkit-default-privs.changes 2013-02-25 20:40:02.000000000 +0100
@@ -1,0 +2,6 @@
+Sat Feb 23 07:17:06 UTC 2013 - coolo(a)suse.com
+
+- do not own the polkit directories (with different user, creating
+ conflict), but buildrequire polkit
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ polkit-default-privs.spec ++++++
--- /var/tmp/diff_new_pack.1kNjGZ/_old 2013-02-25 20:40:03.000000000 +0100
+++ /var/tmp/diff_new_pack.1kNjGZ/_new 2013-02-25 20:40:03.000000000 +0100
@@ -25,6 +25,8 @@
Group: Productivity/Security
Source: polkit-default-privs-%version.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: polkit
+Requires: polkit
Supplements: PolicyKit
Supplements: libpolkit0, polkit
BuildArch: noarch
@@ -65,7 +67,5 @@
/sbin/set_polkit_default_privs
%_mandir/man*/*
/var/adm/fillup-templates/sysconfig.security-polkit_default_privs
-%attr(0755,root,root)%dir /etc/polkit-1/
-%attr(0755,root,root)%dir /etc/polkit-1/rules.d/
%changelog
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package osc for openSUSE:12.3 checked in at 2013-02-25 20:39:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3/osc (Old)
and /work/SRC/openSUSE:12.3/.osc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "osc", Maintainer is "adrian(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:12.3/osc/osc.changes 2013-02-05 15:36:57.000000000 +0100
+++ /work/SRC/openSUSE:12.3/.osc.new/osc.changes 2013-02-25 20:39:54.000000000 +0100
@@ -2 +2,14 @@
-Thu Jan 31 15:45:58 UTC 2013 - adrian(a)suse.com
+Mon Feb 25 14:41:27 UTC 2013 - adrian(a)suse.de
+
+- update to 0.139.0:
+ - bugfixes for owner search
+ - support generic emulator virtualization
+ - added "--host" argument to "osc build" (used to perform the build on a remote host)
+ - "search --maintained" is obsolete. Abort on usage.
+ - "maintainer --user" support to search for all official maintained instance for given user or group
+ - added support to abort a commit after displaying a default commit message in $EDITOR. As a result
+ other commands like "submitrequest" will also ask if the user wants to proceed if the default
+ comment/message wasn't changed.
+
+-------------------------------------------------------------------
+Thu Jan 31 15:45:58 UTC 2013 - adrian(a)suse.de
Old:
----
osc-0.138.0.tar.gz
New:
----
osc-0.139.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ osc.spec ++++++
--- /var/tmp/diff_new_pack.FiwM8V/_old 2013-02-25 20:39:55.000000000 +0100
+++ /var/tmp/diff_new_pack.FiwM8V/_new 2013-02-25 20:39:55.000000000 +0100
@@ -17,7 +17,7 @@
Name: osc
-Version: 0.138.0
+Version: 0.139.0
Release: 0
Summary: openSUSE Build Service Commander
License: GPL-2.0+
++++++ _service ++++++
--- /var/tmp/diff_new_pack.FiwM8V/_old 2013-02-25 20:39:55.000000000 +0100
+++ /var/tmp/diff_new_pack.FiwM8V/_new 2013-02-25 20:39:55.000000000 +0100
@@ -1,6 +1,6 @@
<services>
<service name="tar_scm" mode="disabled">
- <param name="version">0.138.0</param>
+ <param name="version">0.139.0</param>
<param name="url">git://github.com/openSUSE/osc.git</param>
<param name="scm">git</param>
</service>
++++++ osc-0.138.0.tar.gz -> osc-0.139.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/NEWS new/osc-0.139.0/NEWS
--- old/osc-0.138.0/NEWS 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/NEWS 2013-02-25 15:41:16.000000000 +0100
@@ -1,3 +1,12 @@
+0.139
+ - support generic emulator virtualization
+ - added "--host" argument to "osc build" (used to perform the build on a remote host)
+ - "search --maintained" is obsolete. Abort on usage.
+ - "maintainer --user" support to search for all official maintained instance for given user or group
+ - added support to abort a commit after displaying a default commit message in $EDITOR. As a result
+ other commands like "submitrequest" will also ask if the user wants to proceed if the default
+ comment/message wasn't changed.
+
0.138
- add support to remove repositories recursively (mostly only usefull for admins)
- submitrequest: old not anymore used maintenance code got removed. It is possible now
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/osc/build.py new/osc-0.139.0/osc/build.py
--- old/osc-0.138.0/osc/build.py 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/osc/build.py 2013-02-25 15:41:16.000000000 +0100
@@ -41,10 +41,11 @@
'ppc', 'ppc64',
's390', 's390x',
'sparc64v', 'sparcv9v', 'sparcv9', 'sparcv8', 'sparc',
- 'hppa'
+ 'hppa',
]
can_also_build = {
+ 'aarch64':['aarch64'],
'armv4l': [ 'armv4l' ],
'armv6l' :[ 'armv4l', 'armv5l', 'armv6l', 'armv5el', 'armv6el' ],
'armv7l' :[ 'armv4l', 'armv5l', 'armv6l', 'armv7l', 'armv5el', 'armv6el', 'armv7el' ],
@@ -413,6 +414,8 @@
buildargs.append('--changelog')
if opts.root:
build_root = opts.root
+ if opts.target:
+ buildargs.append('--target=%s' % opts.target)
if opts.jobs:
buildargs.append('--jobs=%s' % opts.jobs)
elif config['build-jobs'] > 1:
@@ -651,7 +654,7 @@
elif hostarch != bi.buildarch:
if not bi.buildarch in can_also_build.get(hostarch, []):
# OBSOLETE: qemu_can_build should not be needed anymore since OBS 2.3
- if not bi.buildarch in qemu_can_build:
+ if vm_type != "emulator" and not bi.buildarch in qemu_can_build:
print >>sys.stderr, 'Error: hostarch \'%s\' cannot build \'%s\'.' % (hostarch, bi.buildarch)
return 1
print >>sys.stderr, 'WARNING: It is guessed to build on hostarch \'%s\' for \'%s\' via QEMU.' % (hostarch, bi.buildarch)
@@ -812,17 +815,16 @@
else:
os.symlink(path + "/" + filename, tffn)
- if bi.pacsuffix == 'rpm':
+ if vm_type == "xen" or vm_type == "kvm" or vm_type == "lxc":
+ print 'Skipping verification of package signatures due to secure VM build'
+ elif bi.pacsuffix == 'rpm':
if opts.no_verify:
print 'Skipping verification of package signatures'
else:
print 'Verifying integrity of cached packages'
verify_pacs(bi)
-
elif bi.pacsuffix == 'deb':
- if vm_type == "xen" or vm_type == "kvm" or vm_type == "lxc":
- print 'Skipping verification of package signatures due to secure VM build'
- elif opts.no_verify or opts.noinit:
+ if opts.no_verify or opts.noinit:
print 'Skipping verification of package signatures'
else:
print 'WARNING: deb packages get not verified, they can compromise your system !'
@@ -865,7 +867,7 @@
my_build_swap = build_root + '/swap'
vm_options = [ '--vm-type=%s'%vm_type ]
- if vm_type != 'lxc':
+ if vm_type != 'lxc' and vm_type != 'emulator':
vm_options += [ '--vm-disk=' + my_build_device ]
vm_options += [ '--vm-swap=' + my_build_swap ]
vm_options += [ '--logfile=%s/.build.log' % build_root ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/osc/commandline.py new/osc-0.139.0/osc/commandline.py
--- old/osc-0.138.0/osc/commandline.py 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/osc/commandline.py 2013-02-25 15:41:16.000000000 +0100
@@ -9,6 +9,7 @@
import oscerr
import sys
import time
+import urlparse
from optparse import SUPPRESS_HELP
@@ -913,11 +914,11 @@
# loop via all packages for checking their state
for p in meta_get_packagelist(apiurl, project):
- print "XXX", p
# get _link info from server, that knows about the local state ...
u = makeurl(apiurl, ['source', project, p])
f = http_GET(u)
root = ET.parse(f).getroot()
+ target_project = None
if len(args) == 1:
target_project = args[0]
linkinfo = root.find('linkinfo')
@@ -968,7 +969,7 @@
if actionxml != "":
xml = """<request> %s <state name="new"/> <description>%s</description> </request> """ % \
(actionxml, cgi.escape(opts.message or ""))
- u = makeurl(apiurl, ['request'], query='cmd=create')
+ u = makeurl(apiurl, ['request'], query='cmd=create&addrevision=1')
f = http_POST(u, data=xml)
root = ET.parse(f).getroot()
@@ -1089,7 +1090,7 @@
rdiff = None
if opts.diff or not opts.message:
try:
- rdiff = 'old: %s/%s\nnew: %s/%s rev %s' %(dst_project, dst_package, src_project, src_package, rev)
+ rdiff = 'old: %s/%s\nnew: %s/%s rev %s\n' %(dst_project, dst_package, src_project, src_package, rev)
rdiff += server_diff(apiurl,
dst_project, dst_package, None,
src_project, src_package, rev, True)
@@ -1293,7 +1294,7 @@
rdiff = None
if opts.diff:
try:
- rdiff = 'old: %s/%s\nnew: %s/%s' %(dst_project, dst_package, src_project, src_package)
+ rdiff = 'old: %s/%s\nnew: %s/%s\n' %(dst_project, dst_package, src_project, src_package)
rdiff += server_diff(apiurl,
dst_project, dst_package, opts.revision,
src_project, src_package, None, True)
@@ -3254,7 +3255,7 @@
for pac in pacs:
if not rev2:
for i in pac.get_diff(rev1):
- sys.stdout.write(''.join(i))
+ diff += ''.join(i)
else:
diff += server_diff_noex(pac.apiurl, pac.prjname, pac.name, rev1,
pac.prjname, pac.name, rev2, not opts.plain, opts.missingok)
@@ -5089,7 +5090,7 @@
print row
- def parse_repoarchdescr(self, args, noinit = False, alternative_project = None, ignore_descr = False):
+ def parse_repoarchdescr(self, args, noinit = False, alternative_project = None, ignore_descr = False, vm_type = None):
"""helper to parse the repo, arch and build description from args"""
import osc.build
import glob
@@ -5099,10 +5100,10 @@
if arg.endswith('.spec') or arg.endswith('.dsc') or arg.endswith('.kiwi') or arg == 'PKGBUILD':
arg_descr = arg
else:
- if (arg in osc.build.can_also_build.get(osc.build.hostarch, [])
- or arg in osc.build.qemu_can_build
- or arg in osc.build.hostarch) and arg_arch is None:
+ if osc.build.can_also_build.get(arg) != None and arg_arch is None:
arg_arch = arg
+ if not (arg in osc.build.can_also_build.get(osc.build.hostarch, []) or arg in osc.build.hostarch):
+ print "WARNING: native compile is not possible, an emulator must be configured!"
elif not arg_repository:
arg_repository = arg
else:
@@ -5244,6 +5245,8 @@
help='use hard links instead of a deep copied source')
@cmdln.option('--vm-type', metavar='TYPE',
help='use VM type TYPE (e.g. kvm)')
+ @cmdln.option('--target', metavar='TARGET',
+ help='define target plattform')
@cmdln.option('--alternative-project', metavar='PROJECT',
help='specify the build target project')
@cmdln.option('-d', '--debuginfo', action='store_true',
@@ -5264,6 +5267,8 @@
help='take previous build from DIR (special values: _self, _link)')
@cmdln.option('--shell', action='store_true',
help=SUPPRESS_HELP)
+ @cmdln.option('--host', metavar='HOST',
+ help='perform the build on a remote server - user@server:~/remote/directory')
def do_build(self, subcmd, opts, *args):
"""${cmd_name}: Build a package on your local machine
@@ -5320,7 +5325,7 @@
if len(args) > 3:
raise oscerr.WrongArgs('Too many arguments')
- args = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project)
+ args = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project, False, opts.vm_type)
# check for source services
r = None
@@ -5362,7 +5367,142 @@
raise oscerr.WrongOptions('--offline and --preload are mutually exclusive')
print 'Building %s for %s/%s' % (args[2], args[0], args[1])
- return osc.build.main(self.get_api_url(), opts, args)
+ if not opts.host:
+ return osc.build.main(self.get_api_url(), opts, args)
+ else:
+ return self._do_rbuild(subcmd, opts, *args)
+
+ def _do_rbuild(self, subcmd, opts, *args):
+
+ # drop the --argument, value tuple from the list
+ def drop_arg2(lst, name):
+ if not name: return lst
+ while name in lst:
+ i = lst.index(name)
+ lst.pop(i+1)
+ lst.pop(i)
+ return lst
+
+ # change the local directory to more suitable remote one in hostargs
+ # and perform the rsync to such location as well
+ def rsync_dirs_2host(hostargs, short_name, long_name, dirs):
+
+ drop_arg2(hostargs, short_name)
+ drop_arg2(hostargs, long_name)
+
+ for pdir in dirs:
+ # drop the last '/' from pdir name - this is because
+ # rsync foo remote:/bar create /bar/foo on remote machine
+ # rsync foo/ remote:/bar copy the content of foo in the /bar
+ if pdir[-1:] == os.path.sep:
+ pdir = pdir[:-1]
+
+ hostprefer = os.path.join(
+ hostpath,
+ basename,
+ "%s__" % (long_name.replace('-','_')),
+ os.path.basename(os.path.abspath(pdir)))
+ hostargs.append(long_name)
+ hostargs.append(hostprefer)
+
+ rsync_prefer_cmd = ['rsync', '-az', '-delete', '-e', 'ssh',
+ pdir,
+ "%s:%s" % (hostname, os.path.dirname(hostprefer))]
+ print 'Run: %s' % " ".join(rsync_prefer_cmd)
+ ret = subprocess.call(rsync_prefer_cmd)
+ if ret != 0:
+ return ret
+
+ return 0
+
+
+ cwd = os.getcwdu()
+ basename = os.path.basename(cwd)
+ if not ':' in opts.host:
+ hostname = opts.host
+ hostpath = "~/"
+ else:
+ hostname, hostpath = opts.host.split(':', 1)
+
+ # arguments for build: use all arguments behind build and drop --host 'HOST'
+ hostargs = sys.argv[sys.argv.index(subcmd)+1:]
+ drop_arg2(hostargs, '--host')
+
+ # global arguments: use first '-' up to subcmd
+ gi = 0
+ for i, a in enumerate(sys.argv):
+ if a == subcmd:
+ break
+ if a[0] == '-':
+ gi = i
+ break
+
+ if gi:
+ hostglobalargs = sys.argv[gi : sys.argv.index(subcmd)+1]
+ else:
+ hostglobalargs = (subcmd, )
+
+ # keep-pkgs
+ hostkeep = None
+ if opts.keep_pkgs:
+ drop_arg2(hostargs, '-k')
+ drop_arg2(hostargs, '--keep-pkgs')
+ hostkeep = os.path.join(
+ hostpath,
+ basename,
+ "__keep_pkgs__",
+ "") # <--- this adds last '/', thus triggers correct rsync behavior
+ hostargs.append('--keep-pkgs')
+ hostargs.append(hostkeep)
+
+ ### run all commands ###
+ # 1.) rsync sources
+ rsync_source_cmd = ['rsync', '-az', '-delete', '-e', 'ssh', cwd, "%s:%s" % (hostname, hostpath)]
+ print 'Run: %s' % " ".join(rsync_source_cmd)
+ ret = subprocess.call(rsync_source_cmd)
+ if ret != 0:
+ return ret
+
+ # 2.) rsync prefer-pkgs dirs, overlay and rsyns-src
+ if opts.prefer_pkgs:
+ ret = rsync_dirs_2host(hostargs, '-p', '--prefer-pkgs', opts.prefer_pkgs)
+ if ret != 0:
+ return ret
+
+ for arg, long_name in ((opts.rsyncsrc, '--rsync-src'), (opts.overlay, '--overlay')):
+ if not arg: continue
+ ret = rsync_dirs_2host(hostargs, None, long_name, (arg, ))
+ if ret != 0:
+ return ret
+
+ # 3.) call osc build
+ osc_cmd = "osc"
+ for var in ('OSC_SU_WRAPPER', 'OSC_BUILD_ROOT', 'OSC_PACKAGECACHEDIR'):
+ if os.getenv(var):
+ osc_cmd = "%s=%s %s" % (var, os.getenv(var), osc_cmd)
+
+ ssh_cmd = \
+ ['ssh', '-t', hostname,
+ "cd %(remote_dir)s; %(osc_cmd)s %(global_args)s %(local_args)s" % dict(
+ remote_dir = os.path.join(hostpath, basename),
+ osc_cmd = osc_cmd,
+ global_args = " ".join(hostglobalargs),
+ local_args = " ".join(hostargs))
+ ]
+ print 'Run: %s' % " ".join(ssh_cmd)
+ build_ret = subprocess.call(ssh_cmd)
+ if build_ret != 0:
+ return build_ret
+
+ # 4.) get keep-pkgs back
+ if opts.keep_pkgs:
+ ret = rsync_keep_cmd = ['rsync', '-az', '-e', 'ssh', "%s:%s" % (hostname, hostkeep), opts.keep_pkgs]
+ print 'Run: %s' % " ".join(rsync_keep_cmd)
+ ret = subprocess.call(rsync_keep_cmd)
+ if ret != 0:
+ return ret
+
+ return build_ret
@cmdln.option('--local-package', action='store_true',
@@ -5404,8 +5544,9 @@
package = os.path.splitext(descr)[0]
else:
package = store_read_package('.')
+ apihost = urlparse.urlsplit(self.get_api_url())[1]
buildroot = os.environ.get('OSC_BUILD_ROOT', conf.config['build-root']) \
- % {'repo': repository, 'arch': arch, 'project': project, 'package': package}
+ % {'repo': repository, 'arch': arch, 'project': project, 'package': package, 'apihost': apihost}
if not os.path.isdir(buildroot):
raise oscerr.OscIOError(None, '\'%s\' is not a directory' % buildroot)
@@ -5417,7 +5558,7 @@
else:
cmd = [sucmd, 'chroot', buildroot, 'su', '-', user]
if suargs:
- cmd.insert(1, suargs)
+ cmd[1:1] = suargs.split()
print 'running: %s' % ' '.join(cmd)
os.execvp(sucmd, cmd)
@@ -5970,7 +6111,7 @@
"""${cmd_name}: show waiting work, packages, projects or requests involving yourself
Examples:
- # list all tasks where it is expected to work on
+ # list all open tasks for me
osc ${cmd_name} [work]
# list packages where I am bugowner
osc ${cmd_name} pkg -b
@@ -6208,7 +6349,7 @@
@cmdln.option('-m', '--maintainer', action='store_true',
help='as -i, but only maintainer')
@cmdln.option('--maintained', action='store_true',
- help='limit search results to packages with maintained attribute set.')
+ help='OBSOLETE: please use maintained command instead.')
@cmdln.option('-M', '--mine', action='store_true',
help='shorthand for --bugowner --package')
@cmdln.option('--csv', action='store_true',
@@ -6251,6 +6392,9 @@
else:
search_term = args[0]
+ if opts.maintained:
+ raise oscerr.WrongOptions('The --maintained option is not anymore supported. Please use the maintained command instead.')
+
# XXX: is it a good idea to make this the default?
# support perl symbols:
if re.match('^perl\(\w+(::\w+)*\)$', search_term):
@@ -6625,6 +6769,10 @@
help='Set the bugowner to specified person')
@cmdln.option('-S', '--set-bugowner-request', metavar='user',
help='Set the bugowner to specified person via a request')
+ @cmdln.option('-U', '--user', metavar='USER',
+ help='All official maintained instances for the specified USER')
+ @cmdln.option('-G', '--group', metavar='GROUP',
+ help='All official maintained instances for the specified GROUP')
@cmdln.option('-d', '--delete', metavar='user',
help='delete a maintainer/bugowner (can be specified via --role)')
@cmdln.option('-r', '--role', metavar='role', action='append', default=[],
@@ -6633,8 +6781,13 @@
def do_maintainer(self, subcmd, opts, *args):
"""${cmd_name}: Show maintainers of a project/package
- osc maintainer <options>
+ # Search for official maintained sources in OBS instance
osc maintainer BINARY <options>
+ osc maintainer -U <user> <options>
+ osc maintainer -G <group> <options>
+
+ # Lookup in specific containers
+ osc maintainer <options>
osc maintainer PRJ <options>
osc maintainer PRJ PKG <options>
@@ -6656,11 +6809,14 @@
roles = [ 'bugowner', 'maintainer' ]
if len(opts.role):
roles = opts.role
- if opts.bugowner_only or opts.bugowner or opts.set_bugowner or opts.set_bugowner_request or subcmd == 'bugowner':
+ if opts.bugowner_only or opts.bugowner or subcmd == 'bugowner':
roles = [ 'bugowner' ]
args = slash_split(args)
- if len(args) == 0:
+ if opts.user or opts.group:
+ if len(args) != 0:
+ raise oscerr.WrongArgs('Either search for user or for packages.')
+ elif len(args) == 0:
try:
pac = store_read_package('.')
except oscerr.NoWorkingCopy:
@@ -6678,7 +6834,7 @@
apiurl = self.get_api_url()
# Try the OBS 2.4 way first.
- if pac==None and binary:
+ if binary or opts.user or opts.group:
limit=None
if opts.all:
limit=0
@@ -6686,7 +6842,14 @@
if filterroles == [ 'bugowner', 'maintainer' ]:
# use server side configured default
filterroles=None
- searchresult = owner(apiurl, binary, usefilter=filterroles, devel=None, limit=limit)
+ if binary:
+ searchresult = owner(apiurl, binary, "binary", usefilter=filterroles, devel=None, limit=limit)
+ elif opts.user:
+ searchresult = owner(apiurl, opts.user, "user", usefilter=filterroles, devel=None)
+ elif opts.group:
+ searchresult = owner(apiurl, opts.group, "group", usefilter=filterroles, devel=None)
+ else:
+ raise oscerr.WrongArgs('osc bug, no valid search criteria')
if opts.add:
if searchresult:
@@ -6726,7 +6889,26 @@
else:
for role in roles:
- setBugowner(apiurl, prj, pac, opts.delete, role)
+ try:
+ setBugowner(apiurl, prj, pac, opts.delete, role)
+ except urllib2.HTTPError, e:
+ if e.code == 403:
+ print "No write permission in", result.get('project'),
+ if result.get('package'):
+ print "/", result.get('package'),
+ print
+ repl = raw_input('\nCreating a request instead? (y/n) ')
+ if repl.lower() == 'y':
+ opts.set_bugowner_request = opts.set_bugowner
+ opts.set_bugowner = None
+ break
+
+ if opts.set_bugowner_request:
+ for role in roles:
+ args = [bugowner, prj]
+ if pac:
+ args = args + [pac]
+ requestactionsxml += self._set_bugowner(args,opts)
if requestactionsxml != "":
message = edit_message()
@@ -6772,7 +6954,7 @@
metaroot = ET.fromstring(''.join(m))
else:
# fallback to project lookup for old servers
- if not searchresult:
+ if prj and not searchresult:
m = show_project_meta(apiurl, prj)
metaroot = ET.fromstring(''.join(m))
@@ -6806,38 +6988,40 @@
print "Defined in package: %s/%s " %(definingproject, definingpackage)
else:
print "Defined in project: ", definingproject
-
- for role in roles:
- if opts.bugowner and not len(maintainers.get(role, [])):
- role = 'maintainer'
- if pac:
- print "%s%s of %s/%s : " %(indent, role, prj, pac)
- else:
- print "%s%s of %s : " %(indent, role, prj)
- if opts.email:
- emails = []
- for maintainer in maintainers.get(role, []):
- user = get_user_data(apiurl, maintainer, 'email')
- if len(user):
- emails.append(''.join(user))
- print indent,
- print ', '.join(emails) or '-'
- elif opts.verbose:
- userdata = []
- for maintainer in maintainers.get(role, []):
- user = get_user_data(apiurl, maintainer, 'login', 'realname', 'email')
- userdata.append(user[0])
- if user[1] != '-':
- userdata.append("%s <%s>"%(user[1], user[2]))
- else:
- userdata.append(user[2])
- for row in build_table(2, userdata, None, 3):
+
+ if prj:
+ # not for user/group search
+ for role in roles:
+ if opts.bugowner and not len(maintainers.get(role, [])):
+ role = 'maintainer'
+ if pac:
+ print "%s%s of %s/%s : " %(indent, role, prj, pac)
+ else:
+ print "%s%s of %s : " %(indent, role, prj)
+ if opts.email:
+ emails = []
+ for maintainer in maintainers.get(role, []):
+ user = get_user_data(apiurl, maintainer, 'email')
+ if len(user):
+ emails.append(''.join(user))
print indent,
- print row
- else:
- print indent,
- print ', '.join(maintainers.get(role, [])) or '-'
- print
+ print ', '.join(emails) or '-'
+ elif opts.verbose:
+ userdata = []
+ for maintainer in maintainers.get(role, []):
+ user = get_user_data(apiurl, maintainer, 'login', 'realname', 'email')
+ userdata.append(user[0])
+ if user[1] != '-':
+ userdata.append("%s <%s>"%(user[1], user[2]))
+ else:
+ userdata.append(user[2])
+ for row in build_table(2, userdata, None, 3):
+ print indent,
+ print row
+ else:
+ print indent,
+ print ', '.join(maintainers.get(role, [])) or '-'
+ print
@cmdln.alias('who')
@cmdln.alias('user')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/osc/conf.py new/osc-0.139.0/osc/conf.py
--- old/osc-0.138.0/osc/conf.py 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/osc/conf.py 2013-02-25 15:41:16.000000000 +0100
@@ -496,6 +496,8 @@
elif os.path.isdir(i):
capath = i
break
+ if not cafile and not capath:
+ raise Exception('No CA certificates found')
ctx = oscssl.mySSLContext()
if ctx.load_verify_locations(capath=capath, cafile=cafile) != 1:
raise Exception('No CA certificates found')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/osc/core.py new/osc-0.139.0/osc/core.py
--- old/osc-0.138.0/osc/core.py 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/osc/core.py 2013-02-25 15:41:16.000000000 +0100
@@ -3,7 +3,7 @@
# and distributed under the terms of the GNU General Public Licence,
# either version 2, or version 3 (at your option).
-__version__ = '0.138'
+__version__ = '0.139'
# __store_version__ is to be incremented when the format of the working copy
# "store" changes in an incompatible way. Please add any needed migration
@@ -765,7 +765,7 @@
upstream_del = [ pac for pac in self.pacs_have if not pac in self.pacs_available and self.get_state(pac) != 'A']
for pac in upstream_del:
- if self.status(pac) != '!' or pac in self.pacs_broken:
+ if self.status(pac) != '!':
p = Package(os.path.join(self.dir, pac))
self.delPackage(p, force = True)
delete_storedir(p.storedir)
@@ -773,7 +773,7 @@
os.rmdir(pac)
except:
pass
- self.pac_root.remove(self.get_package_node(p.name))
+ self.pac_root.remove(self.get_package_node(pac))
self.pacs_have.remove(pac)
for pac in self.pacs_have:
@@ -3481,12 +3481,13 @@
while 1:
run_editor(filename)
msg = open(filename).read().split(delim)[0].rstrip()
-
- if len(msg):
+ if msg and template != msg:
break
else:
- ri = raw_input('Log message not specified\n'
- 'a)bort, c)ontinue, e)dit: ')
+ reason = 'Log message not specified'
+ if template and template == msg:
+ reason = 'Log template was not changed'
+ ri = raw_input('%s\na)bort, c)ontinue, e)dit: ' % reason)
if ri in 'aA':
raise oscerr.UserAbort()
elif ri in 'cC':
@@ -5302,10 +5303,12 @@
et = int(node.get('endtime'))
endtime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(et))
waittm = time.gmtime(et-st)
- if waittm.tm_hour:
- waitbuild = "%2dh %2dm %2ds" % (waittm.tm_hour, waittm.tm_min, waittm.tm_sec)
+ if waittm.tm_mday>1:
+ waitbuild = "%1dd %2dh %2dm %2ds" % (waittm.tm_mday-1, waittm.tm_hour, waittm.tm_min, waittm.tm_sec)
+ elif waittm.tm_hour:
+ waitbuild = " %2dh %2dm %2ds" % (waittm.tm_hour, waittm.tm_min, waittm.tm_sec)
else:
- waitbuild = " %2dm %2ds" % (waittm.tm_min, waittm.tm_sec)
+ waitbuild = " %2dm %2ds" % (waittm.tm_min, waittm.tm_sec)
if format == 'csv':
print '%s|%s|%s|%s|%s|%s' % (endtime, package, reason, code, waitbuild, worker)
@@ -5732,12 +5735,12 @@
res[urlpath] = ET.parse(f).getroot()
return res
-def owner(apiurl, binary, attribute=None, project=None, usefilter=None, devel=None, limit=None):
+def owner(apiurl, binary, mode="binary", attribute=None, project=None, usefilter=None, devel=None, limit=None):
"""
Perform a binary package owner search. This is supported since OBS 2.4.
"""
# find default project, if not specified
- query = { 'binary': binary }
+ query = { mode: binary }
if attribute:
query['attribute'] = attribute
if project:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/setup.py new/osc-0.139.0/setup.py
--- old/osc-0.138.0/setup.py 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/setup.py 2013-02-25 15:41:16.000000000 +0100
@@ -57,7 +57,7 @@
author = 'openSUSE project',
author_email = 'opensuse-buildservice(a)opensuse.org',
license = 'GPL',
- platforms = ['Linux', 'Mac OSX', 'Windows XP/2000/NT', 'Windows 95/98/ME'],
+ platforms = ['Linux', 'Mac OSX', 'Windows XP/2000/NT', 'Windows 95/98/ME', 'FreeBSD'],
keywords = ['openSUSE', 'SUSE', 'RPM', 'build', 'buildservice'],
url = 'http://en.opensuse.org/openSUSE:OSC',
download_url = 'https://github.com/openSUSE/osc',
++++++ osc.dsc ++++++
--- /var/tmp/diff_new_pack.FiwM8V/_old 2013-02-25 20:39:55.000000000 +0100
+++ /var/tmp/diff_new_pack.FiwM8V/_new 2013-02-25 20:39:55.000000000 +0100
@@ -1,6 +1,6 @@
Format: 1.0
Source: osc
-Version: 0.138.0
+Version: 0.139.0
Binary: osc
Maintainer: Adrian Schroeter <adrian(a)suse.de>
Architecture: any
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package osc for openSUSE:Factory checked in at 2013-02-25 20:39:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/osc (Old)
and /work/SRC/openSUSE:Factory/.osc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "osc", Maintainer is "adrian(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/osc/osc.changes 2013-02-01 09:49:26.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.osc.new/osc.changes 2013-02-25 20:39:43.000000000 +0100
@@ -2 +2,14 @@
-Thu Jan 31 15:45:58 UTC 2013 - adrian(a)suse.com
+Mon Feb 25 14:41:27 UTC 2013 - adrian(a)suse.de
+
+- update to 0.139.0:
+ - bugfixes for owner search
+ - support generic emulator virtualization
+ - added "--host" argument to "osc build" (used to perform the build on a remote host)
+ - "search --maintained" is obsolete. Abort on usage.
+ - "maintainer --user" support to search for all official maintained instance for given user or group
+ - added support to abort a commit after displaying a default commit message in $EDITOR. As a result
+ other commands like "submitrequest" will also ask if the user wants to proceed if the default
+ comment/message wasn't changed.
+
+-------------------------------------------------------------------
+Thu Jan 31 15:45:58 UTC 2013 - adrian(a)suse.de
Old:
----
osc-0.138.0.tar.gz
New:
----
osc-0.139.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ osc.spec ++++++
--- /var/tmp/diff_new_pack.Iz2uE3/_old 2013-02-25 20:39:45.000000000 +0100
+++ /var/tmp/diff_new_pack.Iz2uE3/_new 2013-02-25 20:39:45.000000000 +0100
@@ -17,7 +17,7 @@
Name: osc
-Version: 0.138.0
+Version: 0.139.0
Release: 0
Summary: openSUSE Build Service Commander
License: GPL-2.0+
++++++ _service ++++++
--- /var/tmp/diff_new_pack.Iz2uE3/_old 2013-02-25 20:39:46.000000000 +0100
+++ /var/tmp/diff_new_pack.Iz2uE3/_new 2013-02-25 20:39:46.000000000 +0100
@@ -1,6 +1,6 @@
<services>
<service name="tar_scm" mode="disabled">
- <param name="version">0.138.0</param>
+ <param name="version">0.139.0</param>
<param name="url">git://github.com/openSUSE/osc.git</param>
<param name="scm">git</param>
</service>
++++++ osc-0.138.0.tar.gz -> osc-0.139.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/NEWS new/osc-0.139.0/NEWS
--- old/osc-0.138.0/NEWS 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/NEWS 2013-02-25 15:41:16.000000000 +0100
@@ -1,3 +1,12 @@
+0.139
+ - support generic emulator virtualization
+ - added "--host" argument to "osc build" (used to perform the build on a remote host)
+ - "search --maintained" is obsolete. Abort on usage.
+ - "maintainer --user" support to search for all official maintained instance for given user or group
+ - added support to abort a commit after displaying a default commit message in $EDITOR. As a result
+ other commands like "submitrequest" will also ask if the user wants to proceed if the default
+ comment/message wasn't changed.
+
0.138
- add support to remove repositories recursively (mostly only usefull for admins)
- submitrequest: old not anymore used maintenance code got removed. It is possible now
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/osc/build.py new/osc-0.139.0/osc/build.py
--- old/osc-0.138.0/osc/build.py 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/osc/build.py 2013-02-25 15:41:16.000000000 +0100
@@ -41,10 +41,11 @@
'ppc', 'ppc64',
's390', 's390x',
'sparc64v', 'sparcv9v', 'sparcv9', 'sparcv8', 'sparc',
- 'hppa'
+ 'hppa',
]
can_also_build = {
+ 'aarch64':['aarch64'],
'armv4l': [ 'armv4l' ],
'armv6l' :[ 'armv4l', 'armv5l', 'armv6l', 'armv5el', 'armv6el' ],
'armv7l' :[ 'armv4l', 'armv5l', 'armv6l', 'armv7l', 'armv5el', 'armv6el', 'armv7el' ],
@@ -413,6 +414,8 @@
buildargs.append('--changelog')
if opts.root:
build_root = opts.root
+ if opts.target:
+ buildargs.append('--target=%s' % opts.target)
if opts.jobs:
buildargs.append('--jobs=%s' % opts.jobs)
elif config['build-jobs'] > 1:
@@ -651,7 +654,7 @@
elif hostarch != bi.buildarch:
if not bi.buildarch in can_also_build.get(hostarch, []):
# OBSOLETE: qemu_can_build should not be needed anymore since OBS 2.3
- if not bi.buildarch in qemu_can_build:
+ if vm_type != "emulator" and not bi.buildarch in qemu_can_build:
print >>sys.stderr, 'Error: hostarch \'%s\' cannot build \'%s\'.' % (hostarch, bi.buildarch)
return 1
print >>sys.stderr, 'WARNING: It is guessed to build on hostarch \'%s\' for \'%s\' via QEMU.' % (hostarch, bi.buildarch)
@@ -812,17 +815,16 @@
else:
os.symlink(path + "/" + filename, tffn)
- if bi.pacsuffix == 'rpm':
+ if vm_type == "xen" or vm_type == "kvm" or vm_type == "lxc":
+ print 'Skipping verification of package signatures due to secure VM build'
+ elif bi.pacsuffix == 'rpm':
if opts.no_verify:
print 'Skipping verification of package signatures'
else:
print 'Verifying integrity of cached packages'
verify_pacs(bi)
-
elif bi.pacsuffix == 'deb':
- if vm_type == "xen" or vm_type == "kvm" or vm_type == "lxc":
- print 'Skipping verification of package signatures due to secure VM build'
- elif opts.no_verify or opts.noinit:
+ if opts.no_verify or opts.noinit:
print 'Skipping verification of package signatures'
else:
print 'WARNING: deb packages get not verified, they can compromise your system !'
@@ -865,7 +867,7 @@
my_build_swap = build_root + '/swap'
vm_options = [ '--vm-type=%s'%vm_type ]
- if vm_type != 'lxc':
+ if vm_type != 'lxc' and vm_type != 'emulator':
vm_options += [ '--vm-disk=' + my_build_device ]
vm_options += [ '--vm-swap=' + my_build_swap ]
vm_options += [ '--logfile=%s/.build.log' % build_root ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/osc/commandline.py new/osc-0.139.0/osc/commandline.py
--- old/osc-0.138.0/osc/commandline.py 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/osc/commandline.py 2013-02-25 15:41:16.000000000 +0100
@@ -9,6 +9,7 @@
import oscerr
import sys
import time
+import urlparse
from optparse import SUPPRESS_HELP
@@ -913,11 +914,11 @@
# loop via all packages for checking their state
for p in meta_get_packagelist(apiurl, project):
- print "XXX", p
# get _link info from server, that knows about the local state ...
u = makeurl(apiurl, ['source', project, p])
f = http_GET(u)
root = ET.parse(f).getroot()
+ target_project = None
if len(args) == 1:
target_project = args[0]
linkinfo = root.find('linkinfo')
@@ -968,7 +969,7 @@
if actionxml != "":
xml = """<request> %s <state name="new"/> <description>%s</description> </request> """ % \
(actionxml, cgi.escape(opts.message or ""))
- u = makeurl(apiurl, ['request'], query='cmd=create')
+ u = makeurl(apiurl, ['request'], query='cmd=create&addrevision=1')
f = http_POST(u, data=xml)
root = ET.parse(f).getroot()
@@ -1089,7 +1090,7 @@
rdiff = None
if opts.diff or not opts.message:
try:
- rdiff = 'old: %s/%s\nnew: %s/%s rev %s' %(dst_project, dst_package, src_project, src_package, rev)
+ rdiff = 'old: %s/%s\nnew: %s/%s rev %s\n' %(dst_project, dst_package, src_project, src_package, rev)
rdiff += server_diff(apiurl,
dst_project, dst_package, None,
src_project, src_package, rev, True)
@@ -1293,7 +1294,7 @@
rdiff = None
if opts.diff:
try:
- rdiff = 'old: %s/%s\nnew: %s/%s' %(dst_project, dst_package, src_project, src_package)
+ rdiff = 'old: %s/%s\nnew: %s/%s\n' %(dst_project, dst_package, src_project, src_package)
rdiff += server_diff(apiurl,
dst_project, dst_package, opts.revision,
src_project, src_package, None, True)
@@ -3254,7 +3255,7 @@
for pac in pacs:
if not rev2:
for i in pac.get_diff(rev1):
- sys.stdout.write(''.join(i))
+ diff += ''.join(i)
else:
diff += server_diff_noex(pac.apiurl, pac.prjname, pac.name, rev1,
pac.prjname, pac.name, rev2, not opts.plain, opts.missingok)
@@ -5089,7 +5090,7 @@
print row
- def parse_repoarchdescr(self, args, noinit = False, alternative_project = None, ignore_descr = False):
+ def parse_repoarchdescr(self, args, noinit = False, alternative_project = None, ignore_descr = False, vm_type = None):
"""helper to parse the repo, arch and build description from args"""
import osc.build
import glob
@@ -5099,10 +5100,10 @@
if arg.endswith('.spec') or arg.endswith('.dsc') or arg.endswith('.kiwi') or arg == 'PKGBUILD':
arg_descr = arg
else:
- if (arg in osc.build.can_also_build.get(osc.build.hostarch, [])
- or arg in osc.build.qemu_can_build
- or arg in osc.build.hostarch) and arg_arch is None:
+ if osc.build.can_also_build.get(arg) != None and arg_arch is None:
arg_arch = arg
+ if not (arg in osc.build.can_also_build.get(osc.build.hostarch, []) or arg in osc.build.hostarch):
+ print "WARNING: native compile is not possible, an emulator must be configured!"
elif not arg_repository:
arg_repository = arg
else:
@@ -5244,6 +5245,8 @@
help='use hard links instead of a deep copied source')
@cmdln.option('--vm-type', metavar='TYPE',
help='use VM type TYPE (e.g. kvm)')
+ @cmdln.option('--target', metavar='TARGET',
+ help='define target plattform')
@cmdln.option('--alternative-project', metavar='PROJECT',
help='specify the build target project')
@cmdln.option('-d', '--debuginfo', action='store_true',
@@ -5264,6 +5267,8 @@
help='take previous build from DIR (special values: _self, _link)')
@cmdln.option('--shell', action='store_true',
help=SUPPRESS_HELP)
+ @cmdln.option('--host', metavar='HOST',
+ help='perform the build on a remote server - user@server:~/remote/directory')
def do_build(self, subcmd, opts, *args):
"""${cmd_name}: Build a package on your local machine
@@ -5320,7 +5325,7 @@
if len(args) > 3:
raise oscerr.WrongArgs('Too many arguments')
- args = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project)
+ args = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project, False, opts.vm_type)
# check for source services
r = None
@@ -5362,7 +5367,142 @@
raise oscerr.WrongOptions('--offline and --preload are mutually exclusive')
print 'Building %s for %s/%s' % (args[2], args[0], args[1])
- return osc.build.main(self.get_api_url(), opts, args)
+ if not opts.host:
+ return osc.build.main(self.get_api_url(), opts, args)
+ else:
+ return self._do_rbuild(subcmd, opts, *args)
+
+ def _do_rbuild(self, subcmd, opts, *args):
+
+ # drop the --argument, value tuple from the list
+ def drop_arg2(lst, name):
+ if not name: return lst
+ while name in lst:
+ i = lst.index(name)
+ lst.pop(i+1)
+ lst.pop(i)
+ return lst
+
+ # change the local directory to more suitable remote one in hostargs
+ # and perform the rsync to such location as well
+ def rsync_dirs_2host(hostargs, short_name, long_name, dirs):
+
+ drop_arg2(hostargs, short_name)
+ drop_arg2(hostargs, long_name)
+
+ for pdir in dirs:
+ # drop the last '/' from pdir name - this is because
+ # rsync foo remote:/bar create /bar/foo on remote machine
+ # rsync foo/ remote:/bar copy the content of foo in the /bar
+ if pdir[-1:] == os.path.sep:
+ pdir = pdir[:-1]
+
+ hostprefer = os.path.join(
+ hostpath,
+ basename,
+ "%s__" % (long_name.replace('-','_')),
+ os.path.basename(os.path.abspath(pdir)))
+ hostargs.append(long_name)
+ hostargs.append(hostprefer)
+
+ rsync_prefer_cmd = ['rsync', '-az', '-delete', '-e', 'ssh',
+ pdir,
+ "%s:%s" % (hostname, os.path.dirname(hostprefer))]
+ print 'Run: %s' % " ".join(rsync_prefer_cmd)
+ ret = subprocess.call(rsync_prefer_cmd)
+ if ret != 0:
+ return ret
+
+ return 0
+
+
+ cwd = os.getcwdu()
+ basename = os.path.basename(cwd)
+ if not ':' in opts.host:
+ hostname = opts.host
+ hostpath = "~/"
+ else:
+ hostname, hostpath = opts.host.split(':', 1)
+
+ # arguments for build: use all arguments behind build and drop --host 'HOST'
+ hostargs = sys.argv[sys.argv.index(subcmd)+1:]
+ drop_arg2(hostargs, '--host')
+
+ # global arguments: use first '-' up to subcmd
+ gi = 0
+ for i, a in enumerate(sys.argv):
+ if a == subcmd:
+ break
+ if a[0] == '-':
+ gi = i
+ break
+
+ if gi:
+ hostglobalargs = sys.argv[gi : sys.argv.index(subcmd)+1]
+ else:
+ hostglobalargs = (subcmd, )
+
+ # keep-pkgs
+ hostkeep = None
+ if opts.keep_pkgs:
+ drop_arg2(hostargs, '-k')
+ drop_arg2(hostargs, '--keep-pkgs')
+ hostkeep = os.path.join(
+ hostpath,
+ basename,
+ "__keep_pkgs__",
+ "") # <--- this adds last '/', thus triggers correct rsync behavior
+ hostargs.append('--keep-pkgs')
+ hostargs.append(hostkeep)
+
+ ### run all commands ###
+ # 1.) rsync sources
+ rsync_source_cmd = ['rsync', '-az', '-delete', '-e', 'ssh', cwd, "%s:%s" % (hostname, hostpath)]
+ print 'Run: %s' % " ".join(rsync_source_cmd)
+ ret = subprocess.call(rsync_source_cmd)
+ if ret != 0:
+ return ret
+
+ # 2.) rsync prefer-pkgs dirs, overlay and rsyns-src
+ if opts.prefer_pkgs:
+ ret = rsync_dirs_2host(hostargs, '-p', '--prefer-pkgs', opts.prefer_pkgs)
+ if ret != 0:
+ return ret
+
+ for arg, long_name in ((opts.rsyncsrc, '--rsync-src'), (opts.overlay, '--overlay')):
+ if not arg: continue
+ ret = rsync_dirs_2host(hostargs, None, long_name, (arg, ))
+ if ret != 0:
+ return ret
+
+ # 3.) call osc build
+ osc_cmd = "osc"
+ for var in ('OSC_SU_WRAPPER', 'OSC_BUILD_ROOT', 'OSC_PACKAGECACHEDIR'):
+ if os.getenv(var):
+ osc_cmd = "%s=%s %s" % (var, os.getenv(var), osc_cmd)
+
+ ssh_cmd = \
+ ['ssh', '-t', hostname,
+ "cd %(remote_dir)s; %(osc_cmd)s %(global_args)s %(local_args)s" % dict(
+ remote_dir = os.path.join(hostpath, basename),
+ osc_cmd = osc_cmd,
+ global_args = " ".join(hostglobalargs),
+ local_args = " ".join(hostargs))
+ ]
+ print 'Run: %s' % " ".join(ssh_cmd)
+ build_ret = subprocess.call(ssh_cmd)
+ if build_ret != 0:
+ return build_ret
+
+ # 4.) get keep-pkgs back
+ if opts.keep_pkgs:
+ ret = rsync_keep_cmd = ['rsync', '-az', '-e', 'ssh', "%s:%s" % (hostname, hostkeep), opts.keep_pkgs]
+ print 'Run: %s' % " ".join(rsync_keep_cmd)
+ ret = subprocess.call(rsync_keep_cmd)
+ if ret != 0:
+ return ret
+
+ return build_ret
@cmdln.option('--local-package', action='store_true',
@@ -5404,8 +5544,9 @@
package = os.path.splitext(descr)[0]
else:
package = store_read_package('.')
+ apihost = urlparse.urlsplit(self.get_api_url())[1]
buildroot = os.environ.get('OSC_BUILD_ROOT', conf.config['build-root']) \
- % {'repo': repository, 'arch': arch, 'project': project, 'package': package}
+ % {'repo': repository, 'arch': arch, 'project': project, 'package': package, 'apihost': apihost}
if not os.path.isdir(buildroot):
raise oscerr.OscIOError(None, '\'%s\' is not a directory' % buildroot)
@@ -5417,7 +5558,7 @@
else:
cmd = [sucmd, 'chroot', buildroot, 'su', '-', user]
if suargs:
- cmd.insert(1, suargs)
+ cmd[1:1] = suargs.split()
print 'running: %s' % ' '.join(cmd)
os.execvp(sucmd, cmd)
@@ -5970,7 +6111,7 @@
"""${cmd_name}: show waiting work, packages, projects or requests involving yourself
Examples:
- # list all tasks where it is expected to work on
+ # list all open tasks for me
osc ${cmd_name} [work]
# list packages where I am bugowner
osc ${cmd_name} pkg -b
@@ -6208,7 +6349,7 @@
@cmdln.option('-m', '--maintainer', action='store_true',
help='as -i, but only maintainer')
@cmdln.option('--maintained', action='store_true',
- help='limit search results to packages with maintained attribute set.')
+ help='OBSOLETE: please use maintained command instead.')
@cmdln.option('-M', '--mine', action='store_true',
help='shorthand for --bugowner --package')
@cmdln.option('--csv', action='store_true',
@@ -6251,6 +6392,9 @@
else:
search_term = args[0]
+ if opts.maintained:
+ raise oscerr.WrongOptions('The --maintained option is not anymore supported. Please use the maintained command instead.')
+
# XXX: is it a good idea to make this the default?
# support perl symbols:
if re.match('^perl\(\w+(::\w+)*\)$', search_term):
@@ -6625,6 +6769,10 @@
help='Set the bugowner to specified person')
@cmdln.option('-S', '--set-bugowner-request', metavar='user',
help='Set the bugowner to specified person via a request')
+ @cmdln.option('-U', '--user', metavar='USER',
+ help='All official maintained instances for the specified USER')
+ @cmdln.option('-G', '--group', metavar='GROUP',
+ help='All official maintained instances for the specified GROUP')
@cmdln.option('-d', '--delete', metavar='user',
help='delete a maintainer/bugowner (can be specified via --role)')
@cmdln.option('-r', '--role', metavar='role', action='append', default=[],
@@ -6633,8 +6781,13 @@
def do_maintainer(self, subcmd, opts, *args):
"""${cmd_name}: Show maintainers of a project/package
- osc maintainer <options>
+ # Search for official maintained sources in OBS instance
osc maintainer BINARY <options>
+ osc maintainer -U <user> <options>
+ osc maintainer -G <group> <options>
+
+ # Lookup in specific containers
+ osc maintainer <options>
osc maintainer PRJ <options>
osc maintainer PRJ PKG <options>
@@ -6656,11 +6809,14 @@
roles = [ 'bugowner', 'maintainer' ]
if len(opts.role):
roles = opts.role
- if opts.bugowner_only or opts.bugowner or opts.set_bugowner or opts.set_bugowner_request or subcmd == 'bugowner':
+ if opts.bugowner_only or opts.bugowner or subcmd == 'bugowner':
roles = [ 'bugowner' ]
args = slash_split(args)
- if len(args) == 0:
+ if opts.user or opts.group:
+ if len(args) != 0:
+ raise oscerr.WrongArgs('Either search for user or for packages.')
+ elif len(args) == 0:
try:
pac = store_read_package('.')
except oscerr.NoWorkingCopy:
@@ -6678,7 +6834,7 @@
apiurl = self.get_api_url()
# Try the OBS 2.4 way first.
- if pac==None and binary:
+ if binary or opts.user or opts.group:
limit=None
if opts.all:
limit=0
@@ -6686,7 +6842,14 @@
if filterroles == [ 'bugowner', 'maintainer' ]:
# use server side configured default
filterroles=None
- searchresult = owner(apiurl, binary, usefilter=filterroles, devel=None, limit=limit)
+ if binary:
+ searchresult = owner(apiurl, binary, "binary", usefilter=filterroles, devel=None, limit=limit)
+ elif opts.user:
+ searchresult = owner(apiurl, opts.user, "user", usefilter=filterroles, devel=None)
+ elif opts.group:
+ searchresult = owner(apiurl, opts.group, "group", usefilter=filterroles, devel=None)
+ else:
+ raise oscerr.WrongArgs('osc bug, no valid search criteria')
if opts.add:
if searchresult:
@@ -6726,7 +6889,26 @@
else:
for role in roles:
- setBugowner(apiurl, prj, pac, opts.delete, role)
+ try:
+ setBugowner(apiurl, prj, pac, opts.delete, role)
+ except urllib2.HTTPError, e:
+ if e.code == 403:
+ print "No write permission in", result.get('project'),
+ if result.get('package'):
+ print "/", result.get('package'),
+ print
+ repl = raw_input('\nCreating a request instead? (y/n) ')
+ if repl.lower() == 'y':
+ opts.set_bugowner_request = opts.set_bugowner
+ opts.set_bugowner = None
+ break
+
+ if opts.set_bugowner_request:
+ for role in roles:
+ args = [bugowner, prj]
+ if pac:
+ args = args + [pac]
+ requestactionsxml += self._set_bugowner(args,opts)
if requestactionsxml != "":
message = edit_message()
@@ -6772,7 +6954,7 @@
metaroot = ET.fromstring(''.join(m))
else:
# fallback to project lookup for old servers
- if not searchresult:
+ if prj and not searchresult:
m = show_project_meta(apiurl, prj)
metaroot = ET.fromstring(''.join(m))
@@ -6806,38 +6988,40 @@
print "Defined in package: %s/%s " %(definingproject, definingpackage)
else:
print "Defined in project: ", definingproject
-
- for role in roles:
- if opts.bugowner and not len(maintainers.get(role, [])):
- role = 'maintainer'
- if pac:
- print "%s%s of %s/%s : " %(indent, role, prj, pac)
- else:
- print "%s%s of %s : " %(indent, role, prj)
- if opts.email:
- emails = []
- for maintainer in maintainers.get(role, []):
- user = get_user_data(apiurl, maintainer, 'email')
- if len(user):
- emails.append(''.join(user))
- print indent,
- print ', '.join(emails) or '-'
- elif opts.verbose:
- userdata = []
- for maintainer in maintainers.get(role, []):
- user = get_user_data(apiurl, maintainer, 'login', 'realname', 'email')
- userdata.append(user[0])
- if user[1] != '-':
- userdata.append("%s <%s>"%(user[1], user[2]))
- else:
- userdata.append(user[2])
- for row in build_table(2, userdata, None, 3):
+
+ if prj:
+ # not for user/group search
+ for role in roles:
+ if opts.bugowner and not len(maintainers.get(role, [])):
+ role = 'maintainer'
+ if pac:
+ print "%s%s of %s/%s : " %(indent, role, prj, pac)
+ else:
+ print "%s%s of %s : " %(indent, role, prj)
+ if opts.email:
+ emails = []
+ for maintainer in maintainers.get(role, []):
+ user = get_user_data(apiurl, maintainer, 'email')
+ if len(user):
+ emails.append(''.join(user))
print indent,
- print row
- else:
- print indent,
- print ', '.join(maintainers.get(role, [])) or '-'
- print
+ print ', '.join(emails) or '-'
+ elif opts.verbose:
+ userdata = []
+ for maintainer in maintainers.get(role, []):
+ user = get_user_data(apiurl, maintainer, 'login', 'realname', 'email')
+ userdata.append(user[0])
+ if user[1] != '-':
+ userdata.append("%s <%s>"%(user[1], user[2]))
+ else:
+ userdata.append(user[2])
+ for row in build_table(2, userdata, None, 3):
+ print indent,
+ print row
+ else:
+ print indent,
+ print ', '.join(maintainers.get(role, [])) or '-'
+ print
@cmdln.alias('who')
@cmdln.alias('user')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/osc/conf.py new/osc-0.139.0/osc/conf.py
--- old/osc-0.138.0/osc/conf.py 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/osc/conf.py 2013-02-25 15:41:16.000000000 +0100
@@ -496,6 +496,8 @@
elif os.path.isdir(i):
capath = i
break
+ if not cafile and not capath:
+ raise Exception('No CA certificates found')
ctx = oscssl.mySSLContext()
if ctx.load_verify_locations(capath=capath, cafile=cafile) != 1:
raise Exception('No CA certificates found')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/osc/core.py new/osc-0.139.0/osc/core.py
--- old/osc-0.138.0/osc/core.py 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/osc/core.py 2013-02-25 15:41:16.000000000 +0100
@@ -3,7 +3,7 @@
# and distributed under the terms of the GNU General Public Licence,
# either version 2, or version 3 (at your option).
-__version__ = '0.138'
+__version__ = '0.139'
# __store_version__ is to be incremented when the format of the working copy
# "store" changes in an incompatible way. Please add any needed migration
@@ -765,7 +765,7 @@
upstream_del = [ pac for pac in self.pacs_have if not pac in self.pacs_available and self.get_state(pac) != 'A']
for pac in upstream_del:
- if self.status(pac) != '!' or pac in self.pacs_broken:
+ if self.status(pac) != '!':
p = Package(os.path.join(self.dir, pac))
self.delPackage(p, force = True)
delete_storedir(p.storedir)
@@ -773,7 +773,7 @@
os.rmdir(pac)
except:
pass
- self.pac_root.remove(self.get_package_node(p.name))
+ self.pac_root.remove(self.get_package_node(pac))
self.pacs_have.remove(pac)
for pac in self.pacs_have:
@@ -3481,12 +3481,13 @@
while 1:
run_editor(filename)
msg = open(filename).read().split(delim)[0].rstrip()
-
- if len(msg):
+ if msg and template != msg:
break
else:
- ri = raw_input('Log message not specified\n'
- 'a)bort, c)ontinue, e)dit: ')
+ reason = 'Log message not specified'
+ if template and template == msg:
+ reason = 'Log template was not changed'
+ ri = raw_input('%s\na)bort, c)ontinue, e)dit: ' % reason)
if ri in 'aA':
raise oscerr.UserAbort()
elif ri in 'cC':
@@ -5302,10 +5303,12 @@
et = int(node.get('endtime'))
endtime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(et))
waittm = time.gmtime(et-st)
- if waittm.tm_hour:
- waitbuild = "%2dh %2dm %2ds" % (waittm.tm_hour, waittm.tm_min, waittm.tm_sec)
+ if waittm.tm_mday>1:
+ waitbuild = "%1dd %2dh %2dm %2ds" % (waittm.tm_mday-1, waittm.tm_hour, waittm.tm_min, waittm.tm_sec)
+ elif waittm.tm_hour:
+ waitbuild = " %2dh %2dm %2ds" % (waittm.tm_hour, waittm.tm_min, waittm.tm_sec)
else:
- waitbuild = " %2dm %2ds" % (waittm.tm_min, waittm.tm_sec)
+ waitbuild = " %2dm %2ds" % (waittm.tm_min, waittm.tm_sec)
if format == 'csv':
print '%s|%s|%s|%s|%s|%s' % (endtime, package, reason, code, waitbuild, worker)
@@ -5732,12 +5735,12 @@
res[urlpath] = ET.parse(f).getroot()
return res
-def owner(apiurl, binary, attribute=None, project=None, usefilter=None, devel=None, limit=None):
+def owner(apiurl, binary, mode="binary", attribute=None, project=None, usefilter=None, devel=None, limit=None):
"""
Perform a binary package owner search. This is supported since OBS 2.4.
"""
# find default project, if not specified
- query = { 'binary': binary }
+ query = { mode: binary }
if attribute:
query['attribute'] = attribute
if project:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.138.0/setup.py new/osc-0.139.0/setup.py
--- old/osc-0.138.0/setup.py 2013-01-31 16:46:36.000000000 +0100
+++ new/osc-0.139.0/setup.py 2013-02-25 15:41:16.000000000 +0100
@@ -57,7 +57,7 @@
author = 'openSUSE project',
author_email = 'opensuse-buildservice(a)opensuse.org',
license = 'GPL',
- platforms = ['Linux', 'Mac OSX', 'Windows XP/2000/NT', 'Windows 95/98/ME'],
+ platforms = ['Linux', 'Mac OSX', 'Windows XP/2000/NT', 'Windows 95/98/ME', 'FreeBSD'],
keywords = ['openSUSE', 'SUSE', 'RPM', 'build', 'buildservice'],
url = 'http://en.opensuse.org/openSUSE:OSC',
download_url = 'https://github.com/openSUSE/osc',
++++++ osc.dsc ++++++
--- /var/tmp/diff_new_pack.Iz2uE3/_old 2013-02-25 20:39:46.000000000 +0100
+++ /var/tmp/diff_new_pack.Iz2uE3/_new 2013-02-25 20:39:46.000000000 +0100
@@ -1,6 +1,6 @@
Format: 1.0
Source: osc
-Version: 0.138.0
+Version: 0.139.0
Binary: osc
Maintainer: Adrian Schroeter <adrian(a)suse.de>
Architecture: any
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ntp for openSUSE:12.3 checked in at 2013-02-25 20:39:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3/ntp (Old)
and /work/SRC/openSUSE:12.3/.ntp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ntp", Maintainer is "varkoly(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:12.3/ntp/ntp.changes 2013-01-31 01:28:29.000000000 +0100
+++ /work/SRC/openSUSE:12.3/.ntp.new/ntp.changes 2013-02-25 20:39:30.000000000 +0100
@@ -1,0 +2,5 @@
+Fri Feb 22 09:19:08 CET 2013 - mhrusecky(a)suse.cz
+
+- disable Undisciplined Local Clock in default conf file (bnc#784760)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ conf.ntp.conf ++++++
--- /var/tmp/diff_new_pack.RO5ksw/_old 2013-02-25 20:39:31.000000000 +0100
+++ /var/tmp/diff_new_pack.RO5ksw/_new 2013-02-25 20:39:31.000000000 +0100
@@ -33,8 +33,8 @@
## Undisciplined Local Clock. This is a fake driver intended for backup
## and when no outside source of synchronized time is available.
##
-server 127.127.1.0 # local clock (LCL)
-fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
+# server 127.127.1.0 # local clock (LCL)
+# fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
##
## Add external Servers using
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package ntp for openSUSE:Factory checked in at 2013-02-25 20:39:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ntp (Old)
and /work/SRC/openSUSE:Factory/.ntp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ntp", Maintainer is "varkoly(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ntp/ntp.changes 2013-01-20 12:58:23.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ntp.new/ntp.changes 2013-02-25 20:39:24.000000000 +0100
@@ -1,0 +2,5 @@
+Fri Feb 22 09:19:08 CET 2013 - mhrusecky(a)suse.cz
+
+- disable Undisciplined Local Clock in default conf file (bnc#784760)
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ conf.ntp.conf ++++++
--- /var/tmp/diff_new_pack.xtVDjF/_old 2013-02-25 20:39:26.000000000 +0100
+++ /var/tmp/diff_new_pack.xtVDjF/_new 2013-02-25 20:39:26.000000000 +0100
@@ -33,8 +33,8 @@
## Undisciplined Local Clock. This is a fake driver intended for backup
## and when no outside source of synchronized time is available.
##
-server 127.127.1.0 # local clock (LCL)
-fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
+# server 127.127.1.0 # local clock (LCL)
+# fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
##
## Add external Servers using
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package nepomuk-core for openSUSE:12.3 checked in at 2013-02-25 20:39:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3/nepomuk-core (Old)
and /work/SRC/openSUSE:12.3/.nepomuk-core.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nepomuk-core", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:12.3/nepomuk-core/nepomuk-core.changes 2013-02-15 18:48:25.000000000 +0100
+++ /work/SRC/openSUSE:12.3/.nepomuk-core.new/nepomuk-core.changes 2013-02-25 20:39:14.000000000 +0100
@@ -1,0 +2,6 @@
+Sat Feb 23 12:17:57 UTC 2013 - hrvoje.senjan(a)gmail.com
+
+- Added Check-DateTime-for-negative-years.patch, fixes kde#315678,
+ indexing of audio files that had incorrect year in tag set
+
+-------------------------------------------------------------------
New:
----
Check-DateTime-for-negative-years.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nepomuk-core.spec ++++++
--- /var/tmp/diff_new_pack.wlMyPi/_old 2013-02-25 20:39:15.000000000 +0100
+++ /var/tmp/diff_new_pack.wlMyPi/_new 2013-02-25 20:39:15.000000000 +0100
@@ -54,6 +54,8 @@
Patch6: initialize-the-m_indexhidden-variable.patch
# PATCH-FIX-UPSTREAM initialize-m_state-to-its-correct-value.patch
Patch7: initialize-m_state-to-its-correct-value.patch
+# PATCH-FIX-UPSTREAM Check-DateTime-for-negative-years.patch
+Patch8: Check-DateTime-for-negative-years.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: kdelibs4 >= %version
Requires: soprano-backend-redland
@@ -82,6 +84,7 @@
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
%build
%cmake_kde4 -d build -- -DKDE4_ENABLE_FPIE=1
++++++ Check-DateTime-for-negative-years.patch ++++++
--- a/services/fileindexer/indexer/taglibextractor.cpp
+++ b/services/fileindexer/indexer/taglibextractor.cpp
@@ -119,6 +119,8 @@
QDateTime dt = QDateTime::currentDateTime();
QDate date = dt.date();
date.setDate( tags->year(), date.month(), date.day() );
+ if( date.year() < 0 )
+ date.setDate( 1, date.month(), date.day() );
dt.setDate( date );
fileRes.setProperty( NIE::contentCreated(), dt );
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package nepomuk-core for openSUSE:Factory checked in at 2013-02-25 20:39:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nepomuk-core (Old)
and /work/SRC/openSUSE:Factory/.nepomuk-core.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nepomuk-core", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/nepomuk-core/nepomuk-core.changes 2013-02-15 18:48:21.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.nepomuk-core.new/nepomuk-core.changes 2013-02-25 20:39:10.000000000 +0100
@@ -1,0 +2,6 @@
+Sat Feb 23 12:17:57 UTC 2013 - hrvoje.senjan(a)gmail.com
+
+- Added Check-DateTime-for-negative-years.patch, fixes kde#315678,
+ indexing of audio files that had incorrect year in tag set
+
+-------------------------------------------------------------------
New:
----
Check-DateTime-for-negative-years.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nepomuk-core.spec ++++++
--- /var/tmp/diff_new_pack.MCcNh8/_old 2013-02-25 20:39:11.000000000 +0100
+++ /var/tmp/diff_new_pack.MCcNh8/_new 2013-02-25 20:39:11.000000000 +0100
@@ -54,6 +54,8 @@
Patch6: initialize-the-m_indexhidden-variable.patch
# PATCH-FIX-UPSTREAM initialize-m_state-to-its-correct-value.patch
Patch7: initialize-m_state-to-its-correct-value.patch
+# PATCH-FIX-UPSTREAM Check-DateTime-for-negative-years.patch
+Patch8: Check-DateTime-for-negative-years.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: kdelibs4 >= %version
Requires: soprano-backend-redland
@@ -82,6 +84,7 @@
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
%build
%cmake_kde4 -d build -- -DKDE4_ENABLE_FPIE=1
++++++ Check-DateTime-for-negative-years.patch ++++++
--- a/services/fileindexer/indexer/taglibextractor.cpp
+++ b/services/fileindexer/indexer/taglibextractor.cpp
@@ -119,6 +119,8 @@
QDateTime dt = QDateTime::currentDateTime();
QDate date = dt.date();
date.setDate( tags->year(), date.month(), date.day() );
+ if( date.year() < 0 )
+ date.setDate( 1, date.month(), date.day() );
dt.setDate( date );
fileRes.setProperty( NIE::contentCreated(), dt );
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package linuxrc for openSUSE:12.3 checked in at 2013-02-25 20:38:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3/linuxrc (Old)
and /work/SRC/openSUSE:12.3/.linuxrc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc", Maintainer is "snwint(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:12.3/linuxrc/linuxrc.changes 2013-01-31 01:26:23.000000000 +0100
+++ /work/SRC/openSUSE:12.3/.linuxrc.new/linuxrc.changes 2013-02-25 20:38:38.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Feb 25 14:09:56 CET 2013 - snwint(a)suse.de
+
+- nfs: use mount(8) and mount.nfs(8) to mount nfs exports (bnc #799496)
+- if no install url given, try dvds, then hds
+
+-------------------------------------------------------------------
Old:
----
linuxrc-4.1.4.tar.bz2
New:
----
linuxrc-4.1.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.rVdsdu/_old 2013-02-25 20:38:39.000000000 +0100
+++ /var/tmp/diff_new_pack.rVdsdu/_new 2013-02-25 20:38:39.000000000 +0100
@@ -24,9 +24,9 @@
Summary: SUSE Installation Program
License: GPL-3.0+
Group: System/Boot
-Version: 4.1.4
+Version: 4.1.5
Release: 0
-Source: linuxrc-4.1.4.tar.bz2
+Source: linuxrc-4.1.5.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
++++++ linuxrc-4.1.4.tar.bz2 -> linuxrc-4.1.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-4.1.4/VERSION new/linuxrc-4.1.5/VERSION
--- old/linuxrc-4.1.4/VERSION 2013-01-16 14:42:31.000000000 +0100
+++ new/linuxrc-4.1.5/VERSION 2013-02-25 15:55:40.000000000 +0100
@@ -1 +1 @@
-4.1.4
+4.1.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-4.1.4/auto2.c new/linuxrc-4.1.5/auto2.c
--- old/linuxrc-4.1.4/auto2.c 2012-11-26 13:43:57.000000000 +0100
+++ new/linuxrc-4.1.5/auto2.c 2013-02-25 15:54:14.000000000 +0100
@@ -56,10 +56,19 @@
*/
int auto2_init()
{
- int ok, win_old;
+ int ok, win_old, install_unset = 0;
auto2_scan_hardware();
+ /* set default repository: try dvd drives */
+ if(!config.url.install) {
+ install_unset = 1;
+ config.url.install = url_set("cd:/");
+ }
+ if(!config.url.instsys) {
+ config.url.instsys = url_set(config.url.instsys_default ?: config.rescue ? config.rescueimage : config.rootimage);
+ }
+
if(config.sig_failed) return 0;
util_splash_bar(40, SPLASH_40);
@@ -83,6 +92,12 @@
ok = auto2_find_repo();
+ /* try again, hard disks */
+ if(!ok && install_unset) {
+ config.url.install = url_set("hd:/");
+ ok = auto2_find_repo();
+ }
+
if(config.debug) fprintf(stderr, "ZyppRepoURL: %s\n", url_print(config.url.install, 4));
LXRC_WAIT
@@ -414,12 +429,6 @@
}
}
}
-
- /* set default repository */
- if(!config.url.install) config.url.install = url_set("cd:/");
- if(!config.url.instsys) {
- config.url.instsys = url_set(config.url.instsys_default ?: config.rescue ? config.rescueimage : config.rootimage);
- }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-4.1.4/changelog new/linuxrc-4.1.5/changelog
--- old/linuxrc-4.1.4/changelog 2013-01-16 14:42:32.000000000 +0100
+++ new/linuxrc-4.1.5/changelog 2013-02-25 15:55:41.000000000 +0100
@@ -1,4 +1,8 @@
-2013-01-16: HEAD
+2013-02-25: sl_12.3-4.1.5
+ - nfs: use mount(8) and mount.nfs(8) to mount nfs exports (bnc #799496)
+ - if no install url given, try dvds, then hds
+
+2013-01-16: sl_12.3-4.1.4
- drop /etc/nothing
2013-01-15: 4.1.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-4.1.4/net.c new/linuxrc-4.1.5/net.c
--- old/linuxrc-4.1.4/net.c 2012-11-26 13:43:57.000000000 +0100
+++ new/linuxrc-4.1.5/net.c 2013-02-25 15:54:14.000000000 +0100
@@ -6,6 +6,7 @@
*
*/
+#define _GNU_SOURCE 1
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@@ -34,6 +35,7 @@
#include <netinet/in.h>
#include <netinet/ether.h>
#include <nfs/nfs.h>
+#include <sys/wait.h>
#include "nfs_mount4.h"
/* this is probably the wrong solution... */
@@ -78,7 +80,6 @@
static int net_choose_device(void);
static int net_input_data(void);
#endif
-static void net_show_error(enum nfs_stat status_rv);
static int _net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, unsigned port, int flags);
static void if_down(char *dev);
@@ -1209,117 +1210,67 @@
*/
int _net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, unsigned port, int flags)
{
- struct sockaddr_in server_in, mount_server_in;
- struct nfs_mount_data mount_data;
- CLIENT *client;
- int sock, fsock, err, i;
- struct timeval tv;
- struct fhstatus fhs;
- char *buf = NULL;
+ int i = 0;
+ char addr[INET6_ADDRSTRLEN];
+ char *args[6];
+ char *path;
+ char options[4096];
+ int err, len = 0;
+ pid_t mount_pid;
if(net_check_address(server, 1)) return -2;
if(!hostdir) hostdir = "/";
if(!mountpoint || !*mountpoint) mountpoint = "/";
- memset(&server_in, 0, sizeof server_in);
- server_in.sin_family = AF_INET;
- server_in.sin_addr.s_addr = server->ip.s_addr;
- memcpy(&mount_server_in, &server_in, sizeof mount_server_in);
- memset(&mount_data, 0, sizeof mount_data);
- mount_data.flags = flags;
- mount_data.rsize = config.net.nfs.rsize;
- mount_data.wsize = config.net.nfs.wsize;
- mount_data.retrans = 3;
- mount_data.acregmin = 3;
- mount_data.acregmax = 60;
- mount_data.acdirmin = 30;
- mount_data.acdirmax = 60;
- mount_data.namlen = NAME_MAX;
- mount_data.version = NFS_MOUNT_VERSION;
-
- /* two tries */
- for(i = 0, client = NULL; i < 2 && !client; i++) {
- if(i) sleep(2);
- mount_data.timeo = 7;
- mount_server_in.sin_port = htons(0);
- sock = RPC_ANYSOCK;
- tv.tv_sec = 3;
- tv.tv_usec = 0;
- client = clntudp_create(&mount_server_in, MOUNTPROG, MOUNTVERS, tv, &sock);
- }
-
- if(!client) {
- net_show_error(-1);
-
- return -1;
- }
-
- client->cl_auth = authunix_create_default();
- tv.tv_sec = 20;
- tv.tv_usec = 0;
-
- err = clnt_call(client, MOUNTPROC_MNT,
- (xdrproc_t) xdr_dirpath, (caddr_t) &hostdir,
- (xdrproc_t) xdr_fhstatus, (caddr_t) &fhs,
- tv
- );
-
- if(err) {
- net_show_error(-1);
- return -1;
- }
-
- if(fhs.fhs_status) {
- net_show_error(fhs.fhs_status);
-
- return -1;
- }
-
- memcpy(&mount_data.root.data, fhs.fhstatus_u.fhs_fhandle, NFS_FHSIZE);
- mount_data.root.size = NFS_FHSIZE;
-
- memcpy(&mount_data.old_root.data, fhs.fhstatus_u.fhs_fhandle, NFS_FHSIZE);
-
- fsock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
- if(fsock < 0) {
- net_show_error(-1);
-
- return -1;
- }
-
- if(bindresvport(fsock, 0) < 0) {
- net_show_error(-1);
-
- return -1;
- }
-
- if(!port) {
- server_in.sin_port = PMAPPORT;
- port = pmap_getport(&server_in, NFS_PROGRAM, NFS_VERSION, IPPROTO_UDP);
- if(!port) port = NFS_PORT;
- }
-
- server_in.sin_port = htons(port);
-
- mount_data.fd = fsock;
- memcpy(&mount_data.addr, &server_in, sizeof mount_data.addr);
-
- strncpy(mount_data.hostname, inet_ntoa(server->ip), sizeof mount_data.hostname);
-
- auth_destroy(client->cl_auth);
- clnt_destroy(client);
- close(sock);
-
- strprintf(&buf, "%s:%s", inet_ntoa(server->ip), hostdir);
-
- err = mount(buf, mountpoint, "nfs", MS_RDONLY | MS_MGC_VAL, &mount_data);
-
- free(buf);
-
- if(err == -1) return errno;
-
- return err;
+ mount_pid = fork();
+ if (mount_pid < 0) {
+ perror("fork");
+ return mount_pid;
+ } else if (mount_pid > 0) {
+ int err;
+ pid_t pid;
+ while((pid = waitpid(-1, &err, 0)) && pid != mount_pid);
+ return WEXITSTATUS(err);
+ }
+
+ if (server->ipv4)
+ err = asprintf(&path, "%s:%s",
+ inet_ntop(AF_INET, &server->ip.s_addr, addr,
+ INET_ADDRSTRLEN), hostdir);
+ else
+ err = asprintf(&path, "[%s]:%s",
+ inet_ntop(AF_INET6, &server->ip6.s6_addr, addr,
+ INET6_ADDRSTRLEN), hostdir);
+ if (err < 0) {
+ perror("asprintf");
+ return err;
+ }
+
+ len = snprintf(options, sizeof(options), "%s%s%sretrans=%d,timeo=%d",
+ flags & NFS_MOUNT_TCP ? "tcp," : "",
+ flags & NFS_MOUNT_VER3 ? "vers=3," : "",
+ flags & NFS_MOUNT_NONLM ? "nolock," : "",
+ 3, 7);
+
+ if (config.net.nfs.rsize && len < sizeof(options))
+ len += snprintf(options, sizeof(options) - len,
+ ",rsize=%d", config.net.nfs.rsize);
+ if (config.net.nfs.wsize && len < sizeof(options))
+ len += snprintf(options, sizeof(options) - len,
+ ",wsize=%d", config.net.nfs.wsize);
+
+ args[i++] = "mount";
+ args[i++] = "-o";
+ args[i++] = options;
+ args[i++] = path;
+ args[i++] = mountpoint;
+ args[i++] = NULL;
+
+ signal(SIGUSR1, SIG_IGN);
+ execvp("mount", args);
+ perror("execvp(\"mount\")");
+ exit(EXIT_FAILURE);
}
@@ -1540,71 +1491,6 @@
}
#endif
-
-/*
- * Show NFS error messages.
- *
- * Helper for net_mount_nfs().
- *
- * nfs_stat: NFS status
- */
-static void net_show_error(enum nfs_stat status_rv)
-{
- int i;
- char *s, tmp[1024], tmp2[64];
-
- struct {
- enum nfs_stat stat;
- int errnumber;
- } nfs_err[] = {
- { NFS_OK, 0 },
- { NFSERR_PERM, EPERM },
- { NFSERR_NOENT, ENOENT },
- { NFSERR_IO, EIO },
- { NFSERR_NXIO, ENXIO },
- { NFSERR_ACCES, EACCES },
- { NFSERR_EXIST, EEXIST },
- { NFSERR_NODEV, ENODEV },
- { NFSERR_NOTDIR, ENOTDIR },
- { NFSERR_ISDIR, EISDIR },
- { NFSERR_INVAL, EINVAL },
- { NFSERR_FBIG, EFBIG },
- { NFSERR_NOSPC, ENOSPC },
- { NFSERR_ROFS, EROFS },
- { NFSERR_NAMETOOLONG, ENAMETOOLONG },
- { NFSERR_NOTEMPTY, ENOTEMPTY },
- { NFSERR_DQUOT, EDQUOT },
- { NFSERR_STALE, ESTALE }
- };
-
- s = NULL;
-
- for(i = 0; (unsigned) i < sizeof nfs_err / sizeof *nfs_err; i++) {
- if(nfs_err[i].stat == status_rv) {
- s = strerror(nfs_err[i].errnumber);
- break;
- }
- }
-
- if(!s) {
- sprintf(tmp2, "unknown error %d\n", status_rv);
- s = tmp2;
- }
-
- sprintf(tmp,
- config.win ? txt_get(TXT_ERROR_NFSMOUNT) : "mount: nfs mount failed, server says: %s\n",
- s
- );
-
- if(config.win) {
- dia_message(tmp, MSGTYPE_ERROR);
- }
- else {
- fprintf(stderr, "%s\n", tmp);
- }
-}
-
-
/*
* Let user enter nameservers.
*
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package linuxrc for openSUSE:Factory checked in at 2013-02-25 20:38:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/linuxrc (Old)
and /work/SRC/openSUSE:Factory/.linuxrc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc", Maintainer is "snwint(a)suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes 2013-01-17 09:48:38.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.linuxrc.new/linuxrc.changes 2013-02-25 20:38:32.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Feb 25 14:09:56 CET 2013 - snwint(a)suse.de
+
+- nfs: use mount(8) and mount.nfs(8) to mount nfs exports (bnc #799496)
+- if no install url given, try dvds, then hds
+
+-------------------------------------------------------------------
Old:
----
linuxrc-4.1.4.tar.bz2
New:
----
linuxrc-4.1.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ linuxrc.spec ++++++
--- /var/tmp/diff_new_pack.iH16Fw/_old 2013-02-25 20:38:33.000000000 +0100
+++ /var/tmp/diff_new_pack.iH16Fw/_new 2013-02-25 20:38:33.000000000 +0100
@@ -24,9 +24,9 @@
Summary: SUSE Installation Program
License: GPL-3.0+
Group: System/Boot
-Version: 4.1.4
+Version: 4.1.5
Release: 0
-Source: linuxrc-4.1.4.tar.bz2
+Source: linuxrc-4.1.5.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
++++++ linuxrc-4.1.4.tar.bz2 -> linuxrc-4.1.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-4.1.4/VERSION new/linuxrc-4.1.5/VERSION
--- old/linuxrc-4.1.4/VERSION 2013-01-16 14:42:31.000000000 +0100
+++ new/linuxrc-4.1.5/VERSION 2013-02-25 15:55:40.000000000 +0100
@@ -1 +1 @@
-4.1.4
+4.1.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-4.1.4/auto2.c new/linuxrc-4.1.5/auto2.c
--- old/linuxrc-4.1.4/auto2.c 2012-11-26 13:43:57.000000000 +0100
+++ new/linuxrc-4.1.5/auto2.c 2013-02-25 15:54:14.000000000 +0100
@@ -56,10 +56,19 @@
*/
int auto2_init()
{
- int ok, win_old;
+ int ok, win_old, install_unset = 0;
auto2_scan_hardware();
+ /* set default repository: try dvd drives */
+ if(!config.url.install) {
+ install_unset = 1;
+ config.url.install = url_set("cd:/");
+ }
+ if(!config.url.instsys) {
+ config.url.instsys = url_set(config.url.instsys_default ?: config.rescue ? config.rescueimage : config.rootimage);
+ }
+
if(config.sig_failed) return 0;
util_splash_bar(40, SPLASH_40);
@@ -83,6 +92,12 @@
ok = auto2_find_repo();
+ /* try again, hard disks */
+ if(!ok && install_unset) {
+ config.url.install = url_set("hd:/");
+ ok = auto2_find_repo();
+ }
+
if(config.debug) fprintf(stderr, "ZyppRepoURL: %s\n", url_print(config.url.install, 4));
LXRC_WAIT
@@ -414,12 +429,6 @@
}
}
}
-
- /* set default repository */
- if(!config.url.install) config.url.install = url_set("cd:/");
- if(!config.url.instsys) {
- config.url.instsys = url_set(config.url.instsys_default ?: config.rescue ? config.rescueimage : config.rootimage);
- }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-4.1.4/changelog new/linuxrc-4.1.5/changelog
--- old/linuxrc-4.1.4/changelog 2013-01-16 14:42:32.000000000 +0100
+++ new/linuxrc-4.1.5/changelog 2013-02-25 15:55:41.000000000 +0100
@@ -1,4 +1,8 @@
-2013-01-16: HEAD
+2013-02-25: sl_12.3-4.1.5
+ - nfs: use mount(8) and mount.nfs(8) to mount nfs exports (bnc #799496)
+ - if no install url given, try dvds, then hds
+
+2013-01-16: sl_12.3-4.1.4
- drop /etc/nothing
2013-01-15: 4.1.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-4.1.4/net.c new/linuxrc-4.1.5/net.c
--- old/linuxrc-4.1.4/net.c 2012-11-26 13:43:57.000000000 +0100
+++ new/linuxrc-4.1.5/net.c 2013-02-25 15:54:14.000000000 +0100
@@ -6,6 +6,7 @@
*
*/
+#define _GNU_SOURCE 1
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
@@ -34,6 +35,7 @@
#include <netinet/in.h>
#include <netinet/ether.h>
#include <nfs/nfs.h>
+#include <sys/wait.h>
#include "nfs_mount4.h"
/* this is probably the wrong solution... */
@@ -78,7 +80,6 @@
static int net_choose_device(void);
static int net_input_data(void);
#endif
-static void net_show_error(enum nfs_stat status_rv);
static int _net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, unsigned port, int flags);
static void if_down(char *dev);
@@ -1209,117 +1210,67 @@
*/
int _net_mount_nfs(char *mountpoint, inet_t *server, char *hostdir, unsigned port, int flags)
{
- struct sockaddr_in server_in, mount_server_in;
- struct nfs_mount_data mount_data;
- CLIENT *client;
- int sock, fsock, err, i;
- struct timeval tv;
- struct fhstatus fhs;
- char *buf = NULL;
+ int i = 0;
+ char addr[INET6_ADDRSTRLEN];
+ char *args[6];
+ char *path;
+ char options[4096];
+ int err, len = 0;
+ pid_t mount_pid;
if(net_check_address(server, 1)) return -2;
if(!hostdir) hostdir = "/";
if(!mountpoint || !*mountpoint) mountpoint = "/";
- memset(&server_in, 0, sizeof server_in);
- server_in.sin_family = AF_INET;
- server_in.sin_addr.s_addr = server->ip.s_addr;
- memcpy(&mount_server_in, &server_in, sizeof mount_server_in);
- memset(&mount_data, 0, sizeof mount_data);
- mount_data.flags = flags;
- mount_data.rsize = config.net.nfs.rsize;
- mount_data.wsize = config.net.nfs.wsize;
- mount_data.retrans = 3;
- mount_data.acregmin = 3;
- mount_data.acregmax = 60;
- mount_data.acdirmin = 30;
- mount_data.acdirmax = 60;
- mount_data.namlen = NAME_MAX;
- mount_data.version = NFS_MOUNT_VERSION;
-
- /* two tries */
- for(i = 0, client = NULL; i < 2 && !client; i++) {
- if(i) sleep(2);
- mount_data.timeo = 7;
- mount_server_in.sin_port = htons(0);
- sock = RPC_ANYSOCK;
- tv.tv_sec = 3;
- tv.tv_usec = 0;
- client = clntudp_create(&mount_server_in, MOUNTPROG, MOUNTVERS, tv, &sock);
- }
-
- if(!client) {
- net_show_error(-1);
-
- return -1;
- }
-
- client->cl_auth = authunix_create_default();
- tv.tv_sec = 20;
- tv.tv_usec = 0;
-
- err = clnt_call(client, MOUNTPROC_MNT,
- (xdrproc_t) xdr_dirpath, (caddr_t) &hostdir,
- (xdrproc_t) xdr_fhstatus, (caddr_t) &fhs,
- tv
- );
-
- if(err) {
- net_show_error(-1);
- return -1;
- }
-
- if(fhs.fhs_status) {
- net_show_error(fhs.fhs_status);
-
- return -1;
- }
-
- memcpy(&mount_data.root.data, fhs.fhstatus_u.fhs_fhandle, NFS_FHSIZE);
- mount_data.root.size = NFS_FHSIZE;
-
- memcpy(&mount_data.old_root.data, fhs.fhstatus_u.fhs_fhandle, NFS_FHSIZE);
-
- fsock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
- if(fsock < 0) {
- net_show_error(-1);
-
- return -1;
- }
-
- if(bindresvport(fsock, 0) < 0) {
- net_show_error(-1);
-
- return -1;
- }
-
- if(!port) {
- server_in.sin_port = PMAPPORT;
- port = pmap_getport(&server_in, NFS_PROGRAM, NFS_VERSION, IPPROTO_UDP);
- if(!port) port = NFS_PORT;
- }
-
- server_in.sin_port = htons(port);
-
- mount_data.fd = fsock;
- memcpy(&mount_data.addr, &server_in, sizeof mount_data.addr);
-
- strncpy(mount_data.hostname, inet_ntoa(server->ip), sizeof mount_data.hostname);
-
- auth_destroy(client->cl_auth);
- clnt_destroy(client);
- close(sock);
-
- strprintf(&buf, "%s:%s", inet_ntoa(server->ip), hostdir);
-
- err = mount(buf, mountpoint, "nfs", MS_RDONLY | MS_MGC_VAL, &mount_data);
-
- free(buf);
-
- if(err == -1) return errno;
-
- return err;
+ mount_pid = fork();
+ if (mount_pid < 0) {
+ perror("fork");
+ return mount_pid;
+ } else if (mount_pid > 0) {
+ int err;
+ pid_t pid;
+ while((pid = waitpid(-1, &err, 0)) && pid != mount_pid);
+ return WEXITSTATUS(err);
+ }
+
+ if (server->ipv4)
+ err = asprintf(&path, "%s:%s",
+ inet_ntop(AF_INET, &server->ip.s_addr, addr,
+ INET_ADDRSTRLEN), hostdir);
+ else
+ err = asprintf(&path, "[%s]:%s",
+ inet_ntop(AF_INET6, &server->ip6.s6_addr, addr,
+ INET6_ADDRSTRLEN), hostdir);
+ if (err < 0) {
+ perror("asprintf");
+ return err;
+ }
+
+ len = snprintf(options, sizeof(options), "%s%s%sretrans=%d,timeo=%d",
+ flags & NFS_MOUNT_TCP ? "tcp," : "",
+ flags & NFS_MOUNT_VER3 ? "vers=3," : "",
+ flags & NFS_MOUNT_NONLM ? "nolock," : "",
+ 3, 7);
+
+ if (config.net.nfs.rsize && len < sizeof(options))
+ len += snprintf(options, sizeof(options) - len,
+ ",rsize=%d", config.net.nfs.rsize);
+ if (config.net.nfs.wsize && len < sizeof(options))
+ len += snprintf(options, sizeof(options) - len,
+ ",wsize=%d", config.net.nfs.wsize);
+
+ args[i++] = "mount";
+ args[i++] = "-o";
+ args[i++] = options;
+ args[i++] = path;
+ args[i++] = mountpoint;
+ args[i++] = NULL;
+
+ signal(SIGUSR1, SIG_IGN);
+ execvp("mount", args);
+ perror("execvp(\"mount\")");
+ exit(EXIT_FAILURE);
}
@@ -1540,71 +1491,6 @@
}
#endif
-
-/*
- * Show NFS error messages.
- *
- * Helper for net_mount_nfs().
- *
- * nfs_stat: NFS status
- */
-static void net_show_error(enum nfs_stat status_rv)
-{
- int i;
- char *s, tmp[1024], tmp2[64];
-
- struct {
- enum nfs_stat stat;
- int errnumber;
- } nfs_err[] = {
- { NFS_OK, 0 },
- { NFSERR_PERM, EPERM },
- { NFSERR_NOENT, ENOENT },
- { NFSERR_IO, EIO },
- { NFSERR_NXIO, ENXIO },
- { NFSERR_ACCES, EACCES },
- { NFSERR_EXIST, EEXIST },
- { NFSERR_NODEV, ENODEV },
- { NFSERR_NOTDIR, ENOTDIR },
- { NFSERR_ISDIR, EISDIR },
- { NFSERR_INVAL, EINVAL },
- { NFSERR_FBIG, EFBIG },
- { NFSERR_NOSPC, ENOSPC },
- { NFSERR_ROFS, EROFS },
- { NFSERR_NAMETOOLONG, ENAMETOOLONG },
- { NFSERR_NOTEMPTY, ENOTEMPTY },
- { NFSERR_DQUOT, EDQUOT },
- { NFSERR_STALE, ESTALE }
- };
-
- s = NULL;
-
- for(i = 0; (unsigned) i < sizeof nfs_err / sizeof *nfs_err; i++) {
- if(nfs_err[i].stat == status_rv) {
- s = strerror(nfs_err[i].errnumber);
- break;
- }
- }
-
- if(!s) {
- sprintf(tmp2, "unknown error %d\n", status_rv);
- s = tmp2;
- }
-
- sprintf(tmp,
- config.win ? txt_get(TXT_ERROR_NFSMOUNT) : "mount: nfs mount failed, server says: %s\n",
- s
- );
-
- if(config.win) {
- dia_message(tmp, MSGTYPE_ERROR);
- }
- else {
- fprintf(stderr, "%s\n", tmp);
- }
-}
-
-
/*
* Let user enter nameservers.
*
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0