Debian Bug report logs - #867680
osc: support both obs-build and vanilla build

version graph

Package: osc; Maintainer for osc is RPM packaging team <team+pkg-rpm@tracker.debian.org>; Source for osc is src:osc (PTS, buildd, popcon).

Reported by: Luca Boccassi <luca.boccassi@gmail.com>

Date: Sat, 8 Jul 2017 13:00:01 UTC

Severity: wishlist

Tags: patch

Found in version osc/0.156.0-1

Fixed in version osc/0.158.0-1

Done: Michal Čihař <nijel@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, RPM packaging team <pkg-rpm-devel@lists.alioth.debian.org>:
Bug#867680; Package osc. (Sat, 08 Jul 2017 13:00:04 GMT) (full text, mbox, link).


Acknowledgement sent to Luca Boccassi <luca.boccassi@gmail.com>:
New Bug report received and forwarded. Copy sent to RPM packaging team <pkg-rpm-devel@lists.alioth.debian.org>. (Sat, 08 Jul 2017 13:00:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Luca Boccassi <luca.boccassi@gmail.com>
To: submit@bugs.debian.org
Subject: osc: support both obs-build and vanilla build
Date: Sat, 08 Jul 2017 13:56:36 +0100
[Message part 1 (text/plain, inline)]
Package: osc
Version: 0.156.0-1
Severity: wishlist
Tags: patch

Dear Maintainer,

In Debian SUSE's "build" package is renamed to "obs-build", and so osc
carries a patch to make it compatible.

Unfortunately the patch makes it incompatible with SUSE's version. Very
often when doing development, upstream sources are used.
This is a constant cause of problems and confusion among many users in
my workplace, myself included.

I have sent a patch upstream, which was just merged, to make osc
compatible with both obs-build and build. This will make things much
easier for users:

https://github.com/openSUSE/osc/pull/306

The patch is attached inline, and it would be great if it could be used
in place of the existing one. It's adapted to apply on top of 0.156.

As a stretch goal, it would be nice if the Recommends could be changed
from "obs-build" to "obs-build | build", so that things won't break
when using SUSE's upstream repository.

Thank you!

Kind regards,
Luca Boccassi


From 5f47b5ca7b689997646c9504dfc64cb419141d48 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@gmail.com>
Date: Fri, 7 Jul 2017 17:47:43 +0100
Subject: [PATCH] Add compatibility with Debian's obs-build

In Debian and Ubuntu build is renamed to obs-build for disambiguation
purposes.
Add a simple check to use the correct paths if running on Debian and
use /usr/bin/obs-build and /usr/lib/obs-build if so.
---
 osc/conf.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/osc/conf.py b/osc/conf.py
index e49014d..2fd8e80 100644
--- a/osc/conf.py
+++ b/osc/conf.py
@@ -183,6 +183,12 @@ DEFAULTS = {'apiurl': 'https://api.opensuse.org',
             'vc-cmd': '/usr/lib/build/vc'
 }
 
+# some distros like Debian rename and move build to obs-build
+if not os.path.isfile('/usr/bin/build') and os.path.isfile('/usr/bin/obs-build'):
+    DEFAULTS['build-cmd'] = '/usr/bin/obs-build'
+if not os.path.isfile('/usr/lib/build/vc') and os.path.isfile('/usr/lib/obs-build/vc'):
+    DEFAULTS['vc-cmd'] = '/usr/lib/obs-build/vc'
+
 # being global to this module, this dict can be accessed from outside
 # it will hold the parsed configuration
 config = DEFAULTS.copy()
-- 
2.11.0
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, RPM packaging team <pkg-rpm-devel@lists.alioth.debian.org>:
Bug#867680; Package osc. (Sun, 09 Jul 2017 05:57:02 GMT) (full text, mbox, link).


Acknowledgement sent to Michal Čihař <michal@cihar.com>:
Extra info received and forwarded to list. Copy sent to RPM packaging team <pkg-rpm-devel@lists.alioth.debian.org>. (Sun, 09 Jul 2017 05:57:02 GMT) (full text, mbox, link).


Message #10 received at 867680@bugs.debian.org (full text, mbox, reply):

From: Michal Čihař <michal@cihar.com>
To: Luca Boccassi <luca.boccassi@gmail.com>, 867680@bugs.debian.org
Subject: Re: Bug#867680: osc: support both obs-build and vanilla build
Date: Sun, 09 Jul 2017 07:52:31 +0200
[Message part 1 (text/plain, inline)]
Hello

Luca Boccassi píše v So 08. 07. 2017 v 13:56 +0100:
> In Debian SUSE's "build" package is renamed to "obs-build", and so
> osc
> carries a patch to make it compatible.
> 
> Unfortunately the patch makes it incompatible with SUSE's version.
> Very
> often when doing development, upstream sources are used.
> This is a constant cause of problems and confusion among many users
> in
> my workplace, myself included.
> 
> I have sent a patch upstream, which was just merged, to make osc
> compatible with both obs-build and build. This will make things much
> easier for users:
> 
> https://github.com/openSUSE/osc/pull/306
> 
> The patch is attached inline, and it would be great if it could be
> used
> in place of the existing one. It's adapted to apply on top of 0.156.

I will anyway update the package, so maybe it's better to wait for
upstream version with integrated your patch.

> As a stretch goal, it would be nice if the Recommends could be
> changed
> from "obs-build" to "obs-build | build", so that things won't break
> when using SUSE's upstream repository.

I'm not really sure about this - the build is really too generic
package name. In the end this is only recommends, so it really doesn't
force you to install obs-build if you know what you are doing with
third party packages.

-- 
	Michal Čihař | https://cihar.com/ | https://weblate.org/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, RPM packaging team <pkg-rpm-devel@lists.alioth.debian.org>:
Bug#867680; Package osc. (Sun, 09 Jul 2017 16:42:11 GMT) (full text, mbox, link).


Acknowledgement sent to Luca Boccassi <luca.boccassi@gmail.com>:
Extra info received and forwarded to list. Copy sent to RPM packaging team <pkg-rpm-devel@lists.alioth.debian.org>. (Sun, 09 Jul 2017 16:42:12 GMT) (full text, mbox, link).


Message #15 received at 867680@bugs.debian.org (full text, mbox, reply):

From: Luca Boccassi <luca.boccassi@gmail.com>
To: Michal Čihař <michal@cihar.com>, 867680@bugs.debian.org
Subject: Re: Bug#867680: osc: support both obs-build and vanilla build
Date: Sun, 09 Jul 2017 17:38:41 +0100
[Message part 1 (text/plain, inline)]
On Sun, 2017-07-09 at 07:52 +0200, Michal Čihař wrote:
> Hello

Hello Michal,

> Luca Boccassi píše v So 08. 07. 2017 v 13:56 +0100:
> > In Debian SUSE's "build" package is renamed to "obs-build", and so
> > osc
> > carries a patch to make it compatible.
> > 
> > Unfortunately the patch makes it incompatible with SUSE's version.
> > Very
> > often when doing development, upstream sources are used.
> > This is a constant cause of problems and confusion among many users
> > in
> > my workplace, myself included.
> > 
> > I have sent a patch upstream, which was just merged, to make osc
> > compatible with both obs-build and build. This will make things
> > much
> > easier for users:
> > 
> > https://github.com/openSUSE/osc/pull/306
> > 
> > The patch is attached inline, and it would be great if it could be
> > used
> > in place of the existing one. It's adapted to apply on top of
> > 0.156.
> 
> I will anyway update the package, so maybe it's better to wait for
> upstream version with integrated your patch.

I do not know when 0.159 is going to be released.

In case you wish to apply the change on 0.158, the backported patch for
that version is inlined.

> > As a stretch goal, it would be nice if the Recommends could be
> > changed
> > from "obs-build" to "obs-build | build", so that things won't break
> > when using SUSE's upstream repository.
> 
> I'm not really sure about this - the build is really too generic
> package name. In the end this is only recommends, so it really
> doesn't
> force you to install obs-build if you know what you are doing with
> third party packages.

Yes it is very unfortunate that it is such a generic name.

On the other hand, there is no "build" binary package in the archive,
and it would be "second" choice, so it should not cause any problem nor
confusion, while solving issues that I have seen users experience in
the past couple of years.

Thanks!

Kind regards,
Luca Boccassi


From af5a38f4c8fd23159beff69a833529f0ad5ea868 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@gmail.com>
Date: Fri, 7 Jul 2017 17:47:43 +0100
Subject: [PATCH] Add compatibility with Debian's obs-build

In Debian and Ubuntu build is renamed to obs-build for disambiguation
purposes.
Add a simple check to use the correct paths if running on Debian and
use /usr/bin/obs-build and /usr/lib/obs-build if so.
---
 osc/commandline.py | 8 +++++++-
 osc/conf.py        | 6 ++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/osc/commandline.py b/osc/commandline.py
index 410199c..1e6b2fc 100644
--- a/osc/commandline.py
+++ b/osc/commandline.py
@@ -12,6 +12,7 @@ import sys
 import time
 import imp
 import inspect
+import os
 try:
     from urllib.parse import urlsplit
     from urllib.error import HTTPError
@@ -5867,7 +5868,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
                 with tempfile.NamedTemporaryFile() as f:
                     f.write(bc)
                     f.flush()
-                    recipe = return_external('/usr/lib/build/queryconfig', '--dist', f.name, 'type')
+                    # some distros like Debian rename and move build to obs-build
+                    if not os.path.isfile('/usr/lib/build/queryconfig') and os.path.isfile('/usr/lib/obs-build/queryconfig'):
+                        queryconfig = '/usr/lib/obs-build/queryconfig'
+                    else:
+                        queryconfig = '/usr/lib/build/queryconfig'
+                    recipe = return_external(queryconfig, '--dist', f.name, 'type')
                 recipe = recipe.strip()
                 if recipe == 'arch':
                     recipe = 'PKGBUILD'
diff --git a/osc/conf.py b/osc/conf.py
index e49014d..2fd8e80 100644
--- a/osc/conf.py
+++ b/osc/conf.py
@@ -183,6 +183,12 @@ DEFAULTS = {'apiurl': 'https://api.opensuse.org',
             'vc-cmd': '/usr/lib/build/vc'
 }
 
+# some distros like Debian rename and move build to obs-build
+if not os.path.isfile('/usr/bin/build') and os.path.isfile('/usr/bin/obs-build'):
+    DEFAULTS['build-cmd'] = '/usr/bin/obs-build'
+if not os.path.isfile('/usr/lib/build/vc') and os.path.isfile('/usr/lib/obs-build/vc'):
+    DEFAULTS['vc-cmd'] = '/usr/lib/obs-build/vc'
+
 # being global to this module, this dict can be accessed from outside
 # it will hold the parsed configuration
 config = DEFAULTS.copy()
-- 
2.11.0
[signature.asc (application/pgp-signature, inline)]

Added tag(s) pending. Request was from Michal Čihař <nijel@debian.org> to control@bugs.debian.org. (Mon, 10 Jul 2017 18:21:05 GMT) (full text, mbox, link).


Message sent on to Luca Boccassi <luca.boccassi@gmail.com>:
Bug#867680. (Mon, 10 Jul 2017 18:21:11 GMT) (full text, mbox, link).


Message #20 received at 867680-submitter@bugs.debian.org (full text, mbox, reply):

From: Michal Čihař <nijel@debian.org>
To: 867680-submitter@bugs.debian.org
Subject: Bug#867680 marked as pending
Date: Mon, 10 Jul 2017 18:16:12 +0000
tag 867680 pending
thanks

Hello,

Bug #867680 reported by you has been fixed in the Git repository. You can
see the changelog below, and you can check the diff of the fix at:

    https://anonscm.debian.org/cgit/pkg-rpm/osc.git/commit/?id=88aaaaf

---
commit 88aaaafb02c8537874846d343626b0cf77942aee
Author: Michal Čihař <nijel@debian.org>
Date:   Mon Jul 10 20:14:41 2017 +0200

    Apply upstream patch to work with both osc-build and build  (Closes: #867680).

diff --git a/debian/changelog b/debian/changelog
index f56cd10..fcf3cd3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ osc (0.158.0-1) UNRELEASED; urgency=medium
     for python-keyring already which is preferred upstream 
     (Closes: #844158).
   * Bump standards to 4.0.0.
+  * Apply upstream patch to work with both osc-build and build 
+    (Closes: #867680).
 
  -- Michal Čihař <nijel@debian.org>  Mon, 10 Jul 2017 20:11:40 +0200
 



Reply sent to Michal Čihař <nijel@debian.org>:
You have taken responsibility. (Mon, 10 Jul 2017 18:39:10 GMT) (full text, mbox, link).


Notification sent to Luca Boccassi <luca.boccassi@gmail.com>:
Bug acknowledged by developer. (Mon, 10 Jul 2017 18:39:10 GMT) (full text, mbox, link).


Message #25 received at 867680-close@bugs.debian.org (full text, mbox, reply):

From: Michal Čihař <nijel@debian.org>
To: 867680-close@bugs.debian.org
Subject: Bug#867680: fixed in osc 0.158.0-1
Date: Mon, 10 Jul 2017 18:35:22 +0000
Source: osc
Source-Version: 0.158.0-1

We believe that the bug you reported is fixed in the latest version of
osc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 867680@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michal Čihař <nijel@debian.org> (supplier of updated osc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 10 Jul 2017 20:14:52 +0200
Source: osc
Binary: osc
Architecture: source all
Version: 0.158.0-1
Distribution: unstable
Urgency: medium
Maintainer: RPM packaging team <pkg-rpm-devel@lists.alioth.debian.org>
Changed-By: Michal Čihař <nijel@debian.org>
Description:
 osc        - Open Build Service commander
Closes: 844158 867680
Changes:
 osc (0.158.0-1) unstable; urgency=medium
 .
   * New upstream release.
   * Do not sugest (deprecated) python-gnomekeyring. There is support
     for python-keyring already which is preferred upstream
     (Closes: #844158).
   * Bump standards to 4.0.0.
   * Apply upstream patch to work with both osc-build and build
     (Closes: #867680).
Checksums-Sha1:
 ffac609d46fbc92d01d84176d3e6da962ee7be29 1958 osc_0.158.0-1.dsc
 d30145b0804227a14f75383116f5a58b4fb9e899 346966 osc_0.158.0.orig.tar.gz
 d97757396efb85a0bd39fbda56addda8979bb0fd 6724 osc_0.158.0-1.debian.tar.xz
 c2b680eac9a26036bdef46deb31ff53fcf2b621e 229876 osc_0.158.0-1_all.deb
 9974be9baf92c58be7bf48efc1c6fc099ba97517 6947 osc_0.158.0-1_amd64.buildinfo
Checksums-Sha256:
 0922dd5d6c33ae9ecc1d21f487cb8e00acc5ed314c2cf4c931ed58bac07ad841 1958 osc_0.158.0-1.dsc
 8fcd45784843ffb0c4accf1e727c284f32843c52c07a8f197f76ff0f1b27494d 346966 osc_0.158.0.orig.tar.gz
 f18114e2f1261883a3a3a7f8e8a930e024b2d25bc9a63b531f4fcb704b0cac0f 6724 osc_0.158.0-1.debian.tar.xz
 4ebf3b94fb22c64b2bacd97e94a173c8954962a8adcc1a34ce3ed33873265f06 229876 osc_0.158.0-1_all.deb
 a425a214a4b949844d7fb27d707a192e004992fc4f99ddac7ed5a17ddd4f550f 6947 osc_0.158.0-1_amd64.buildinfo
Files:
 d3f9fba69252c7cddeda03406aa6d4b7 1958 devel extra osc_0.158.0-1.dsc
 1e274f57cef42d9c04e718336a76d4a4 346966 devel extra osc_0.158.0.orig.tar.gz
 41b11b12d656d54908d3286fe6d16bd9 6724 devel extra osc_0.158.0-1.debian.tar.xz
 ae95988fe14d80f95cf2622b440fb348 229876 devel extra osc_0.158.0-1_all.deb
 7644948cd72a7dcc275a7ef32a495cd8 6947 devel extra osc_0.158.0-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEh+Zzr4P2w6DDRMjD9KoinU1YwkUFAlljxFwACgkQ9KoinU1Y
wkU2HxAApZMx9xJzlV+CAGJQ+YoGgrniQXN87rj05ep7IOGiK1ClhS7IWUrjVI65
OFRdK3v6ss+ztAdcQrC0l8zNymQl4TiprXlrZ1D/Vpi+JDuNLf2Rfk7HeWIPliAa
R2OlfqxFnqhv/6M1ZVdWeeKwG6aDPe6dhBI3RhwqHHMDTCNdn8SA0dF3T3ODaEB0
6mxRh3GgUqp23P8kEw58ygngpHYIr6dLVEK9yQ4FIgFJjKAGnFbWnE39peI2A1nE
D/YPTzWJVOcbVSjqlWCEb/+NrjGpopVQ/iOTfhiJNqgcNMbjtxS2Wc05LTU6cAZV
/CeIml100l1NF+38gvUgvmwUns2MLJNu28VimTw8IiP8cmxMUd05gkvHS7fjc95R
mzXJ8rXw42WXu7JxAwglYLEqZmhNPQ4W43w8yLUXjrrfIRBoMbDtcuGDU0Ch53il
0dQFYO+F3p7w73MrZCDq0p7DRe2wiTw7SCg8k4m72Y3Ts246b+rzg/pGDb8EMlaO
EhJ6reoLpyqxkJdnGby8QIiJT0xOjoGu8DujaGv4+SIQTsLQUCEgIRZ7UPHJy6Ww
GDjCMIA2gO/LES99GIonck9pCG8k+COOQjwKt5X6gGbUWrToTTYUE8FkK3wou2/+
o3Mupm5jluYfOKYLY0fQWru5gKWcRLhzkEsXQNIcw9hA0EQZ4g8=
=Xhb5
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 13 Aug 2017 07:29:48 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 08:23:06 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.