1
0
forked from pool/osc
osc-fork/osc.spec
Marco Strigl 84d92eb512 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
2023-01-18 11:09:07 +00:00

209 lines
5.6 KiB
RPMSpec

#
# spec file for package osc
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define use_python python3
%define use_python_pkg python3
%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 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
# 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: 1.0.0~b3
Release: 0
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
%endif
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with man}
BuildRequires: %{argparse_manpage_pkg}
%endif
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
# needed for `osc add <URL>`
Recommends: obs-service-recompress
Recommends: obs-service-download_files
Recommends: obs-service-format_spec_file
Recommends: obs-service-obs_scm
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
Provides: %{use_python_pkg}-osc
%description
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.
%prep
%autosetup -p1
%build
%{use_python} setup.py build
# write rpm macros
cat << EOF > macros.osc
%%osc_plugin_dir %{osc_plugin_dir}
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 -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
%check
%{use_python} setup.py test
%files
%defattr(-,root,root,-)
# docs
%license COPYING
%doc AUTHORS README.md NEWS
%if %{with man}
%{_mandir}/man1/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
%changelog