Accepting request 1058838 from home:dmach:branches:openSUSE:Tools
1.0.0b3 - add create-pbuild-config (cpc) command which allows to create a working config for pbuild tool based on OBS server side data - branch: Add --disable-build option - linkpac: Add --disable-build option - linkpac: Fix linking a locked package by not copying the lock to the target package - sr: Do not error out on using an alias to apiurl - rq: Fix the -M/--mine option to show only requests created by the user - rq list: Avoid conflict between --all and --state options - rq list: Fix traceback when there's no search criteria - rq list -i: Enable forwarding requests to the parent projects - rq show: Improve output - sr accept: Enable forwarding requests to the parent projects - setlinkrev: Write a log message on setting a revision - buildhistory: Produce proper output using build_table() and a CSV writer - buildinfo: Bring the -d/--debug option back - build: Bring the --verbose' option back as --verbose-mode=MODE to avoid conflicts with global --verbose - service: Add verbose option for running local services - service: Fix manual run of source service - conf: Avoid crash when deleting a password - connection: Fix the '9 - review the server certificate' option in cert trust prompt - Handle uncompressed Debian packages - Fix osc add for github /archive/ URLs - Handle empty EDITOR=/PAGER= env variable properly - Mute ssl/tls deprecation warnings - Add "--extra-pkgs-from" ("-X") option to osc build. - Fix a scenario when OBS sends unexpected md5s - Replace core.findpacs() with Package.from_paths() and Package.from_paths_nofail() - Always list requests with 'new,review' states by default - Change get_request_collection() not to list declined requests by default - Add information about osc vc using the EDITOR envar to the help output - Improve argument handling in many commands - Implement Store class handling '.osc' dirs, migrate some code to it - Code cleanups - Deprecated: - core.get_request_list() function - core.store_write_apiurl() function - core.store_read_scmurl() function - core.store_read_apiurl() function 1.0.0b2 - Support ssh-agent forwarding - ssh auth: Avoid password prompt when using TransientCredentialsManager - Properly handle missing ssh-keygen and ssh-add - Add ssh-keygen as a recommends for ssh MFA authentication - Print user and apiurl when prompting for a password - Pass apiurl to all auth handlers - Do not list declined requests by default - Fix 'osc up' on project level for scm packages - Lock cookiejar to prevent unnecessary signature auth - Process input with configurable project separators - Add project_separator to config file - Fix race condition in using .old directory in Serviceinfo.execute() - Send HTTP header Accept: application/xml - Print URLs and xpaths in debug rather than verbose mode - Inject no-op print() into http.client when http debugging is off - Reset "file current position" on errors in HTTP requests - Create ~/.config/osc/trusted-certs if not exists - conf: Convert defaults to their expected types - Document `build` repo selection logic - Add debug print for REPO (and desc just in case) - Shortened `build` help and add debug prints - Replace unmaintained cmdln.py with a custom code - Allow intermixing positional and optional args - Add global options to subcommands so they can be specified in any place - Remove the '-A' option from the 'maintainer' command - Replace the '-q/--hide-legend' option in 'prjresults' command with global '-q/--quiet' option - Remove duplicated --debug and --verbose options - Add version command to print the used version - Remove deprecated 'plaintext_passwd' config option - Remove deprecated 'GnomeKeyringCredentialsManager' and related code - Remove deprecated '--skip-validation' option from the 'commit' command - Remove deprecated '--oldpkg', '--oldprj' options from the 'rdiff' command - Remove deprecated subcommands 'create', 'list', 'log', 'show', 'decline', 'accept', 'delete', 'revoke' from the 'submitrequest' command - Remove deprecated '--seperate-requests' option from the 'submitrequest' command - Remove deprecated '--raw' option from the 'develproject' command - Remove deprecated '--maintained' option from the 'search' command - Remove deprecated 'rlog' command - Remove deprecated 'rprjresults' command - Remove deprecated 'rresults' command - Remove deprecated 'results_meta' command - Remove deprecated 'deleteprj' command - Remove deprecated 'deletepac' command - Remove deprecated 'editmeta' command - Remove deprecated Request.get_creator() - Remove PROJ_PACK.txt file, move its content to GitHub issue #1099 - Remove TODO file, move its content to GitHub issue #1098 - Remove fuse support - Remove unused run_bandit.sh - Remove obsolete osc_expand_link.pl - Remove unused icons - Replace imp with importlib - Move files from dist/ to contrib/ - Move osc.fish under contrib/ - Move python package metadata from setup.py to setup.cfg - Move __version__ from osc.core to osc - Fix resource warnings (unclosed files) - 1.0.0b1 - drop Python 2 support - switch http_request() to urllib3 and cryptography (drop M2Crypto dependency) - warn when using HTTP connection, Make HTTPS the default - add XDG compatible location for osc plugins - replace osc-wrapper.py with entry_points. - core: add functions for glob matching of multibuild flavors - fix multibuild packages in all osc commands where applicable - do not ask for login for -h,--help - move format_table() to util.helper - code cleanups OBS-URL: https://build.opensuse.org/request/show/1058838 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/osc?expand=0&rev=376
This commit is contained in:
parent
a56c7d992d
commit
837721237b
9
PKGBUILD
9
PKGBUILD
@ -1,13 +1,13 @@
|
||||
pkgname=osc
|
||||
pkgver=0.182.0
|
||||
pkgver=1.0.0~b3
|
||||
pkgrel=0
|
||||
pkgdesc="Open Build Service client"
|
||||
pkgdesc="Command-line client for the Open Build Service"
|
||||
arch=('x86_64')
|
||||
url="https://www.github.com/openSUSE/osc"
|
||||
license=('GPL-2.0+' 'GPL-2.0')
|
||||
groups=('base-devel')
|
||||
depends=('python-m2crypto')
|
||||
makedepends=('python-setuptools')
|
||||
depends=('python-cryptography' 'python-urllib3')
|
||||
makedepends=('python>=3.6' 'python-cryptography' 'python-setuptools' 'python-urllib3')
|
||||
source=(osc-${pkgver}.tar.gz)
|
||||
md5sums=('SKIP')
|
||||
|
||||
@ -20,5 +20,4 @@ package() {
|
||||
msg "Installing osc ..."
|
||||
cd "${srcdir}"/osc-${pkgver}
|
||||
python setup.py install --root="${pkgdir}/" --optimize=1 --prefix=/usr
|
||||
ln -s osc-wrapper.py ${pkgdir}/usr/bin/osc
|
||||
}
|
||||
|
4
_service
4
_service
@ -1,7 +1,7 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="version">0.182.0</param>
|
||||
<param name="revision">0.182.0</param>
|
||||
<param name="version">1.0.0~b3</param>
|
||||
<param name="revision">1.0.0b3</param>
|
||||
<param name="url">https://github.com/openSUSE/osc.git</param>
|
||||
<param name="scm">git</param>
|
||||
</service>
|
||||
|
@ -1,4 +1,4 @@
|
||||
osc (0.182.0-0) unstable; urgency=low
|
||||
osc (1.0.0~b3-0) unstable; urgency=low
|
||||
- Update to 0.174.0:
|
||||
- fix password deletion via "osc config -d <apiurl> pass"
|
||||
- support changing the password store via "osc config <apiurl>
|
||||
|
@ -1,23 +1,33 @@
|
||||
Source: osc
|
||||
Priority: extra
|
||||
Maintainer: Adrian Schroeter <adrian@suse.de>, Rene Engelhard <rengelhard@suse.de>
|
||||
Build-Depends: debhelper (>= 10), dh-python, python3-all, python3-setuptools
|
||||
Maintainer: Adrian Schroeter <adrian@suse.de>
|
||||
Build-Depends:
|
||||
debhelper (>= 10),
|
||||
dh-python,
|
||||
python3-all (>=3.6),
|
||||
python3-cryptography,
|
||||
python3-setuptools,
|
||||
python3-urllib3
|
||||
Standards-Version: 3.7.1
|
||||
Section: devel
|
||||
|
||||
Package: osc
|
||||
Section: devel
|
||||
Architecture: all
|
||||
Depends: ${shlibs:Depends},
|
||||
Architecture: any
|
||||
Depends:
|
||||
${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
${python3:Depends},
|
||||
python3,
|
||||
python3-cryptography,
|
||||
python3-urllib3,
|
||||
build | obs-build
|
||||
Recommends: python3-progressbar,
|
||||
Recommends:
|
||||
bash-completion,
|
||||
python3-progressbar,
|
||||
python3-rpm,
|
||||
python3-keyring,
|
||||
python3-m2crypto,
|
||||
bash-completion
|
||||
Suggests: sudo
|
||||
Description: Open Build Service Commander
|
||||
Commandline client for the Open Build Service.
|
||||
python3-keyring-keyutils,
|
||||
sudo,
|
||||
xdg-utils
|
||||
Description: Command-line client for the Open Build Service
|
||||
OpenSUSE Commander is a command-line client for the Open Build Service.
|
||||
|
@ -1,2 +1 @@
|
||||
README.md
|
||||
TODO
|
||||
|
@ -9,9 +9,9 @@ export PYBUILD_NAME=osc
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install
|
||||
install -Dm0644 dist/complete.csh debian/tmp/etc/profile.d/osc.csh
|
||||
install -Dm0644 dist/complete.sh debian/tmp/etc/bash_completion.d/osc.sh
|
||||
install -Dm0755 dist/osc.complete debian/tmp/usr/lib/osc/complete
|
||||
install -Dm0644 contrib/complete.csh debian/tmp/etc/profile.d/osc.csh
|
||||
install -Dm0644 contrib/complete.sh debian/tmp/etc/bash_completion.d/osc.sh
|
||||
install -Dm0755 contrib/osc.complete debian/tmp/usr/lib/osc/complete
|
||||
|
||||
|
||||
override_dh_auto_test:
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bfad8b79ff8f34b9ed665dd1246f09ec69a3963593fc63d21c42ee5da9c230fe
|
||||
size 381596
|
3
osc-1.0.0~b3.tar.gz
Normal file
3
osc-1.0.0~b3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1e03344bb8eb686e183c544c1fd962c360e1526d2a1fd42dd0bc087b25dc57a3
|
||||
size 375831
|
113
osc.changes
113
osc.changes
@ -1,3 +1,116 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 17 08:46:45 UTC 2023 - Daniel Mach <daniel.mach@suse.com>
|
||||
|
||||
1.0.0b3
|
||||
- add create-pbuild-config (cpc) command which allows to create a working
|
||||
config for pbuild tool based on OBS server side data
|
||||
- branch: Add --disable-build option
|
||||
- linkpac: Add --disable-build option
|
||||
- linkpac: Fix linking a locked package by not copying the lock to the target package
|
||||
- sr: Do not error out on using an alias to apiurl
|
||||
- rq: Fix the -M/--mine option to show only requests created by the user
|
||||
- rq list: Avoid conflict between --all and --state options
|
||||
- rq list: Fix traceback when there's no search criteria
|
||||
- rq list -i: Enable forwarding requests to the parent projects
|
||||
- rq show: Improve output
|
||||
- sr accept: Enable forwarding requests to the parent projects
|
||||
- setlinkrev: Write a log message on setting a revision
|
||||
- buildhistory: Produce proper output using build_table() and a CSV writer
|
||||
- buildinfo: Bring the -d/--debug option back
|
||||
- build: Bring the --verbose' option back as --verbose-mode=MODE to avoid conflicts with global --verbose
|
||||
- service: Add verbose option for running local services
|
||||
- service: Fix manual run of source service
|
||||
- conf: Avoid crash when deleting a password
|
||||
- connection: Fix the '9 - review the server certificate' option in cert trust prompt
|
||||
- Handle uncompressed Debian packages
|
||||
- Fix osc add for github /archive/ URLs
|
||||
- Handle empty EDITOR=/PAGER= env variable properly
|
||||
- Mute ssl/tls deprecation warnings
|
||||
- Add "--extra-pkgs-from" ("-X") option to osc build.
|
||||
- Fix a scenario when OBS sends unexpected md5s
|
||||
- Replace core.findpacs() with Package.from_paths() and Package.from_paths_nofail()
|
||||
- Always list requests with 'new,review' states by default
|
||||
- Change get_request_collection() not to list declined requests by default
|
||||
- Add information about osc vc using the EDITOR envar to the help output
|
||||
- Improve argument handling in many commands
|
||||
- Implement Store class handling '.osc' dirs, migrate some code to it
|
||||
- Code cleanups
|
||||
- Deprecated:
|
||||
- core.get_request_list() function
|
||||
- core.store_write_apiurl() function
|
||||
- core.store_read_scmurl() function
|
||||
- core.store_read_apiurl() function
|
||||
|
||||
1.0.0b2
|
||||
- Support ssh-agent forwarding
|
||||
- ssh auth: Avoid password prompt when using TransientCredentialsManager
|
||||
- Properly handle missing ssh-keygen and ssh-add
|
||||
- Add ssh-keygen as a recommends for ssh MFA authentication
|
||||
- Print user and apiurl when prompting for a password
|
||||
- Pass apiurl to all auth handlers
|
||||
- Do not list declined requests by default
|
||||
- Fix 'osc up' on project level for scm packages
|
||||
- Lock cookiejar to prevent unnecessary signature auth
|
||||
- Process input with configurable project separators
|
||||
- Add project_separator to config file
|
||||
- Fix race condition in using .old directory in Serviceinfo.execute()
|
||||
- Send HTTP header Accept: application/xml
|
||||
- Print URLs and xpaths in debug rather than verbose mode
|
||||
- Inject no-op print() into http.client when http debugging is off
|
||||
- Reset "file current position" on errors in HTTP requests
|
||||
- Create ~/.config/osc/trusted-certs if not exists
|
||||
- conf: Convert defaults to their expected types
|
||||
- Document `build` repo selection logic
|
||||
- Add debug print for REPO (and desc just in case)
|
||||
- Shortened `build` help and add debug prints
|
||||
- Replace unmaintained cmdln.py with a custom code
|
||||
- Allow intermixing positional and optional args
|
||||
- Add global options to subcommands so they can be specified in any place
|
||||
- Remove the '-A' option from the 'maintainer' command
|
||||
- Replace the '-q/--hide-legend' option in 'prjresults' command with global '-q/--quiet' option
|
||||
- Remove duplicated --debug and --verbose options
|
||||
- Add version command to print the used version
|
||||
- Remove deprecated 'plaintext_passwd' config option
|
||||
- Remove deprecated 'GnomeKeyringCredentialsManager' and related code
|
||||
- Remove deprecated '--skip-validation' option from the 'commit' command
|
||||
- Remove deprecated '--oldpkg', '--oldprj' options from the 'rdiff' command
|
||||
- Remove deprecated subcommands 'create', 'list', 'log', 'show', 'decline', 'accept', 'delete', 'revoke' from the 'submitrequest' command
|
||||
- Remove deprecated '--seperate-requests' option from the 'submitrequest' command
|
||||
- Remove deprecated '--raw' option from the 'develproject' command
|
||||
- Remove deprecated '--maintained' option from the 'search' command
|
||||
- Remove deprecated 'rlog' command
|
||||
- Remove deprecated 'rprjresults' command
|
||||
- Remove deprecated 'rresults' command
|
||||
- Remove deprecated 'results_meta' command
|
||||
- Remove deprecated 'deleteprj' command
|
||||
- Remove deprecated 'deletepac' command
|
||||
- Remove deprecated 'editmeta' command
|
||||
- Remove deprecated Request.get_creator()
|
||||
- Remove PROJ_PACK.txt file, move its content to GitHub issue #1099
|
||||
- Remove TODO file, move its content to GitHub issue #1098
|
||||
- Remove fuse support
|
||||
- Remove unused run_bandit.sh
|
||||
- Remove obsolete osc_expand_link.pl
|
||||
- Remove unused icons
|
||||
- Replace imp with importlib
|
||||
- Move files from dist/ to contrib/
|
||||
- Move osc.fish under contrib/
|
||||
- Move python package metadata from setup.py to setup.cfg
|
||||
- Move __version__ from osc.core to osc
|
||||
- Fix resource warnings (unclosed files)
|
||||
|
||||
- 1.0.0b1
|
||||
- drop Python 2 support
|
||||
- switch http_request() to urllib3 and cryptography (drop M2Crypto dependency)
|
||||
- warn when using HTTP connection, Make HTTPS the default
|
||||
- add XDG compatible location for osc plugins
|
||||
- replace osc-wrapper.py with entry_points.
|
||||
- core: add functions for glob matching of multibuild flavors
|
||||
- fix multibuild packages in all osc commands where applicable
|
||||
- do not ask for login for -h,--help
|
||||
- move format_table() to util.helper
|
||||
- code cleanups
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 8 11:53:22 UTC 2022 - Daniel Mach <daniel.mach@suse.com>
|
||||
|
||||
|
10
osc.dsc
10
osc.dsc
@ -1,8 +1,14 @@
|
||||
Format: 1.0
|
||||
Source: osc
|
||||
Version: 0.182.0-0
|
||||
Version: 1.0.0~b1-0
|
||||
Binary: osc
|
||||
Maintainer: Adrian Schroeter <adrian@suse.de>
|
||||
Architecture: any
|
||||
Standards-Version: 3.7.1
|
||||
Build-Depends: debhelper (>= 10), dh-python, python3-all, python3-setuptools
|
||||
Build-Depends:
|
||||
debhelper (>= 10),
|
||||
dh-python,
|
||||
python3-all (>=3.6),
|
||||
python3-cryptography,
|
||||
python3-setuptools,
|
||||
python3-urllib3
|
||||
|
281
osc.spec
281
osc.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package osc
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,75 +16,84 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} >= 1500 || 0%{?fedora} >= 29 || 0%{?rhel} >= 7 || 0%{?mageia} >= 8
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
|
||||
%define use_python python3
|
||||
%define use_python_pkg python3
|
||||
|
||||
# else if with python3
|
||||
%else
|
||||
%define use_python python
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1500
|
||||
# use python36 on SLE 12 and older
|
||||
%define use_python python3.6
|
||||
%define use_python_pkg python36
|
||||
%endif
|
||||
|
||||
%define version_unconverted 0.182.0
|
||||
%define completion_dir_bash %{_datadir}/bash-completion/completions
|
||||
%define completion_dir_csh %{_sysconfdir}/profile.d
|
||||
%define completion_dir_fish %{_datadir}/fish/vendor_completions.d
|
||||
%define osc_plugin_dir %{_prefix}/lib/osc-plugins
|
||||
%define macros_file macros.osc
|
||||
%if ! %{defined _rpmmacrodir}
|
||||
%define _rpmmacrodir %{_sysconfdir}/rpm
|
||||
# need to override python_sitelib because it is not set as we would expect on many distros
|
||||
%define python_sitelib %(RPM_BUILD_ROOT= %{use_python} -Ic "import sysconfig; print(sysconfig.get_path('purelib'))")
|
||||
|
||||
%if 0%{?is_opensuse}
|
||||
%define completion_dir_bash %{_sysconfdir}/bash_completion.d
|
||||
%endif
|
||||
|
||||
# generate manpages on distros where argparse-manpage >= 3 is available
|
||||
%if 0%{?suse_version} > 1500 || 0%{?fedora} >= 37
|
||||
%bcond_without man
|
||||
%else
|
||||
%bcond_with man
|
||||
%endif
|
||||
|
||||
%define argparse_manpage_pkg %{use_python_pkg}-argparse-manpage
|
||||
%if 0%{?fedora}
|
||||
%define argparse_manpage_pkg argparse-manpage
|
||||
%endif
|
||||
|
||||
Name: osc
|
||||
Version: 0.182.0
|
||||
Version: 1.0.0~b3
|
||||
Release: 0
|
||||
Summary: Open Build Service Commander
|
||||
Summary: Command-line client for the Open Build Service
|
||||
License: GPL-2.0-or-later
|
||||
Group: Development/Tools/Other
|
||||
URL: https://github.com/openSUSE/osc
|
||||
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
|
||||
%if 0%{?debian}
|
||||
Source1: debian.dirs
|
||||
Source2: debian.docs
|
||||
Source3: debian.osc.links
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: %{use_python}-devel
|
||||
BuildRequires: %{use_python}-setuptools
|
||||
BuildRequires: diffstat
|
||||
%if 0%{?mandriva_version} || 0%{?mageia}
|
||||
BuildRequires: python-rpm
|
||||
Requires: python-rpm
|
||||
%else
|
||||
%if 0%{?suse_version} >= 1500 || 0%{?fedora} >= 32 || 0%{?rhel} >= 7
|
||||
BuildRequires: %{use_python}-rpm
|
||||
Requires: %{use_python}-rpm
|
||||
%else
|
||||
BuildRequires: rpm-python
|
||||
Requires: rpm-python
|
||||
%endif
|
||||
%endif
|
||||
%if 0%{?suse_version} == 0 || 0%{?suse_version} >= 1120
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%if %{with man}
|
||||
BuildRequires: %{argparse_manpage_pkg}
|
||||
%endif
|
||||
Recommends: openssh
|
||||
%if 0%{?suse_version}
|
||||
Requires: %{use_python}
|
||||
Recommends: %{use_python}-progressbar
|
||||
BuildRequires: %{use_python}-xml
|
||||
Requires: %{use_python}-xml
|
||||
%if !%{with python3} && 0%{?suse_version} < 1020
|
||||
BuildRequires: python-elementtree
|
||||
Requires: python-elementtree
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1000
|
||||
BuildRequires: %{use_python_pkg}-cryptography
|
||||
BuildRequires: %{use_python_pkg}-devel >= 3.6
|
||||
BuildRequires: %{use_python_pkg}-rpm
|
||||
BuildRequires: %{use_python_pkg}-setuptools
|
||||
BuildRequires: %{use_python_pkg}-urllib3
|
||||
BuildRequires: diffstat
|
||||
|
||||
Requires: %{use_python_pkg}-cryptography
|
||||
Requires: %{use_python_pkg}-rpm
|
||||
Requires: %{use_python_pkg}-urllib3
|
||||
|
||||
# needed for showing download progressbars
|
||||
Recommends: %{use_python_pkg}-progressbar
|
||||
|
||||
# needed for storing credentials in kwallet/gnome-keyring
|
||||
Recommends: %{use_python_pkg}-keyring
|
||||
Recommends: %{use_python_pkg}-keyring-keyutils
|
||||
|
||||
Recommends: build
|
||||
Recommends: ca-certificates
|
||||
Recommends: diffstat
|
||||
Recommends: powerpc32
|
||||
Recommends: sudo
|
||||
# These packages are needed for "osc add $URL"
|
||||
|
||||
# needed for `osc add <URL>`
|
||||
Recommends: obs-service-recompress
|
||||
Recommends: obs-service-download_files
|
||||
Recommends: obs-service-format_spec_file
|
||||
@ -93,133 +102,107 @@ Recommends: obs-service-set_version
|
||||
Recommends: obs-service-source_validator
|
||||
Recommends: obs-service-tar_scm
|
||||
Recommends: obs-service-verify_file
|
||||
|
||||
%if 0%{?fedora}
|
||||
Recommends: openssh
|
||||
%endif
|
||||
%if 0%{?suse_version}
|
||||
Recommends: openssh-common
|
||||
%endif
|
||||
|
||||
# needed for `osc browse` that calls xdg-open
|
||||
Recommends: xdg-utils
|
||||
# for osc >= 0.167.0 the newest build version is needed.
|
||||
# Otherwise osc chroot might not work correctly.
|
||||
Conflicts: build < 20200106
|
||||
%endif
|
||||
%endif
|
||||
# needed for storing credentials in kwallet/gnome-keyring
|
||||
%if 0%{?suse_version} > 1000 || 0%{?mandriva_version} || 0%{?mdkversion} || 0%{?fedora} >= 29 || 0%{?rhel} >= 8
|
||||
%if %{with python3}
|
||||
Recommends: python3-keyring
|
||||
Recommends: python3-keyring-keyutils
|
||||
%else
|
||||
Recommends: python-keyring
|
||||
Recommends: python-keyring-keyutils
|
||||
%endif
|
||||
%endif
|
||||
%if 0%{?rhel} && 0%{?rhel} < 6
|
||||
BuildRequires: python-elementtree
|
||||
Requires: python-elementtree
|
||||
%endif
|
||||
%if 0%{?suse_version} || 0%{?mandriva_version} || 0%{?mageia}
|
||||
%if 0%{?suse_version} >= 1315
|
||||
BuildRequires: %{use_python}-M2Crypto > 0.19
|
||||
BuildRequires: %{use_python}-chardet
|
||||
Requires: %{use_python}-M2Crypto > 0.19
|
||||
Requires: %{use_python}-chardet
|
||||
%else
|
||||
BuildRequires: python-m2crypto > 0.19
|
||||
Requires: python-m2crypto > 0.19
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?fedora} >= 29 || 0%{?rhel} >= 7
|
||||
BuildRequires: python3-m2crypto
|
||||
Requires: python3-m2crypto
|
||||
%else
|
||||
BuildRequires: m2crypto > 0.19
|
||||
Requires: m2crypto > 0.19
|
||||
%endif
|
||||
%endif
|
||||
|
||||
Provides: %{use_python}-osc
|
||||
|
||||
%if %{with python3}
|
||||
%define python_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
%else
|
||||
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%endif
|
||||
Provides: %{use_python_pkg}-osc
|
||||
|
||||
%description
|
||||
Commandline client for the Open Build Service.
|
||||
OpenSUSE Commander is a command-line client for the Open Build Service.
|
||||
|
||||
See http://en.opensuse.org/openSUSE:OSC, as well as
|
||||
http://en.opensuse.org/openSUSE:Build_Service_Tutorial for a general
|
||||
introduction.
|
||||
http://en.opensuse.org/openSUSE:Build_Service_Tutorial
|
||||
for a general introduction.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
# the PATH hack/rewrite is needed for Fedora 20 builds, because /bin
|
||||
# is a symlink to /usr/bin and /bin precedes /usr/bin in PATH
|
||||
# => a "wrong" interpreter line ("#!/bin/python") is constructed
|
||||
# ("wrong", because no package provides "/bin/python").
|
||||
PATH="/usr/bin:$PATH" CFLAGS="%{optflags}" %{use_python} setup.py build
|
||||
%{use_python} setup.py build
|
||||
|
||||
cat << eom > %{macros_file}
|
||||
# write rpm macros
|
||||
cat << EOF > macros.osc
|
||||
%%osc_plugin_dir %{osc_plugin_dir}
|
||||
eom
|
||||
echo >> %{macros_file}
|
||||
EOF
|
||||
|
||||
# build man page
|
||||
%if %{with man}
|
||||
PYTHONPATH=. argparse-manpage \
|
||||
--output=osc.1 \
|
||||
--format=single-commands-section \
|
||||
--module=osc.commandline \
|
||||
--function=get_parser \
|
||||
--project-name=osc \
|
||||
--prog=osc \
|
||||
--description="OpenSUSE Commander" \
|
||||
--author="Contributors to the osc project. See the project's GIT history for the complete list." \
|
||||
--url="https://github.com/openSUSE/osc/"
|
||||
%endif
|
||||
|
||||
%install
|
||||
%{use_python} setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
sed -i -E 's|#!.*python|#!%{_bindir}/%{use_python}|' osc-wrapper.py
|
||||
ln -s osc-wrapper.py %{buildroot}/%{_bindir}/osc
|
||||
mkdir -p %{buildroot}%{osc_plugin_dir}
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/osc-plugins
|
||||
install -Dm0644 dist/complete.csh %{buildroot}%{_sysconfdir}/profile.d/osc.csh
|
||||
%if 0%{?suse_version}
|
||||
install -Dm0644 dist/complete.sh %{buildroot}%{_sysconfdir}/bash_completion.d/osc.sh
|
||||
%else
|
||||
install -Dm0644 dist/complete.sh %{buildroot}%{_sysconfdir}/profile.d/osc.sh
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1110
|
||||
install -Dm0755 dist/osc.complete %{buildroot}%{_prefix}/lib/osc/complete
|
||||
%else
|
||||
install -Dm0755 dist/osc.complete %{buildroot}%{_libdir}/osc/complete
|
||||
%{use_python} setup.py install -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix}
|
||||
|
||||
# create plugin dirs
|
||||
install -d %{buildroot}%{osc_plugin_dir}
|
||||
install -d %{buildroot}%{_sharedstatedir}/osc-plugins
|
||||
|
||||
# install completions
|
||||
install -Dm0755 contrib/osc.complete %{buildroot}%{_datadir}/osc/complete
|
||||
install -Dm0644 contrib/complete.csh %{buildroot}%{completion_dir_csh}/osc.csh
|
||||
install -Dm0644 contrib/complete.sh %{buildroot}%{completion_dir_bash}/osc.sh
|
||||
install -Dm0644 contrib/osc.fish %{buildroot}%{completion_dir_fish}/osc.fish
|
||||
|
||||
# install rpm macros
|
||||
install -Dm0644 macros.osc %{buildroot}%{_rpmmacrodir}/macros.osc
|
||||
|
||||
# install man page
|
||||
%if %{with man}
|
||||
install -Dm0644 osc.1 %{buildroot}%{_mandir}/man1/osc.1
|
||||
%endif
|
||||
|
||||
install -Dm644 osc.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/osc.fish
|
||||
|
||||
install -m644 %{macros_file} -D %{buildroot}%{_rpmmacrodir}/%{macros_file}
|
||||
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%check
|
||||
%{use_python} setup.py test
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%if 0%{?suse_version} >= 1500
|
||||
|
||||
# docs
|
||||
%license COPYING
|
||||
%doc AUTHORS README.md TODO NEWS
|
||||
%else
|
||||
%doc AUTHORS README.md TODO NEWS COPYING
|
||||
%endif
|
||||
%{_bindir}/osc*
|
||||
%{python_sitelib}/*
|
||||
%config %{_sysconfdir}/profile.d/osc.csh
|
||||
%if 0%{?suse_version}
|
||||
%config %{_sysconfdir}/bash_completion.d/osc.sh
|
||||
%else
|
||||
%config %{_sysconfdir}/profile.d/osc.sh
|
||||
%endif
|
||||
%{_rpmmacrodir}/%{macros_file}
|
||||
%dir %{_localstatedir}/lib/osc-plugins
|
||||
%doc AUTHORS README.md NEWS
|
||||
%if %{with man}
|
||||
%{_mandir}/man1/osc.*
|
||||
%if 0%{?suse_version} > 1110
|
||||
%{_prefix}/lib/osc
|
||||
%else
|
||||
%{_libdir}/osc
|
||||
%endif
|
||||
|
||||
# executables
|
||||
%{_bindir}/*
|
||||
|
||||
# python modules
|
||||
%{python_sitelib}/*
|
||||
|
||||
# rpm macros
|
||||
%{_rpmmacrodir}/*
|
||||
|
||||
# plugins
|
||||
%dir %{osc_plugin_dir}
|
||||
%dir %{_sharedstatedir}/osc-plugins
|
||||
|
||||
# completions
|
||||
%dir %{_datadir}/osc
|
||||
%{_datadir}/osc/complete
|
||||
%{completion_dir_bash}/*
|
||||
%{completion_dir_csh}/*
|
||||
%{completion_dir_fish}/*
|
||||
|
||||
# osc owns the dirs to avoid the "directories not owned by a package" build error
|
||||
%dir %{_datadir}/fish
|
||||
%dir %{_datadir}/fish/vendor_completions.d
|
||||
%{_datadir}/fish/vendor_completions.d/osc.fish
|
||||
%dir %{osc_plugin_dir}
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user