From eb9650b50d3e6f74e6f5b0815f5a782e9d82f7508100246ea38020bb6def0237 Mon Sep 17 00:00:00 2001 From: David Cassany Date: Tue, 20 Mar 2018 07:26:08 +0000 Subject: [PATCH] - Improve README - check rpm db of installed packages first - Adding simple changelog generator - Update installation strategy - Fix ./setup.py install - Adding travis.yml file - Initial commit OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/obs-service-replace_using_package_version?expand=0&rev=1 --- .gitattributes | 23 ++++++ .gitignore | 1 + ...vice-replace_using_package_version.changes | 34 +++++++++ ...service-replace_using_package_version.spec | 75 +++++++++++++++++++ replace_using_package_version-0.0.1.tar.gz | 3 + 5 files changed, 136 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 obs-service-replace_using_package_version.changes create mode 100644 obs-service-replace_using_package_version.spec create mode 100644 replace_using_package_version-0.0.1.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/obs-service-replace_using_package_version.changes b/obs-service-replace_using_package_version.changes new file mode 100644 index 0000000..2c9df9b --- /dev/null +++ b/obs-service-replace_using_package_version.changes @@ -0,0 +1,34 @@ +------------------------------------------------------------------- +Mon Mar 19 18:22:25 2018 +0100 dcassany@suse.com + +- Improve README + +------------------------------------------------------------------- +Mon Mar 19 16:12:27 2018 +0100 dcassany@suse.com + +- check rpm db of installed packages first + +------------------------------------------------------------------- +Mon Mar 19 14:52:12 2018 +0100 dcassany@suse.com + +- Adding simple changelog generator + +------------------------------------------------------------------- +Mon Mar 12 17:00:04 2018 +0100 dcassany@suse.com + +- Update installation strategy + +------------------------------------------------------------------- +Thu Mar 8 20:40:57 2018 +0100 dcassany@suse.com + +- Fix ./setup.py install + +------------------------------------------------------------------- +Thu Mar 8 20:06:11 2018 +0100 dcassany@suse.com + +- Adding travis.yml file + +------------------------------------------------------------------- +Thu Mar 8 19:14:44 2018 +0100 dcassany@suse.com + +- Initial commit diff --git a/obs-service-replace_using_package_version.spec b/obs-service-replace_using_package_version.spec new file mode 100644 index 0000000..d648877 --- /dev/null +++ b/obs-service-replace_using_package_version.spec @@ -0,0 +1,75 @@ +# +# spec file for package obs-service-replace_with_package_version +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# +%define service replace_using_package_version + +Name: obs-service-%{service} +Version: 0.0.1 +Release: 0 +Summary: An OBS service: Replaces a regex with the version value of a package +License: GPL-3.0+ +Group: Development/Tools/Building +Url: https://github.com/openSUSE/obs-service-%{service} +Source0: %{service}-%{version}.tar.gz +%if 0%{?suse_version} > 1315 +BuildRequires: python3-setuptools +Requires: python3-setuptools +Requires: python3-docopt +%else +BuildRequires: python-setuptools +Requires: python-setuptools +Requires: python-docopt +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch + +%description +This service replaces a given regex with the version value of +a given package. Can be used to align the version of you package or image +to the version of another package. + +%prep +%setup -q -n %{service}-%{version} + +%build +%if 0%{?suse_version} > 1315 +# Build Python 3 version +python3 setup.py build +%else +# Build Python 2 version +python2 setup.py build +%endif + +%install +%if 0%{?suse_version} > 1315 +# Install Python 3 version +python3 setup.py install --root %{buildroot} \ + --install-script %{_prefix}/lib/obs/service \ + --install-data %{_prefix}/lib/obs/service +%else +# Install Python 2 version +python2 setup.py install --root %{buildroot} \ + --install-script %{_prefix}/lib/obs/service \ + --install-data %{_prefix}/lib/obs/service +%endif + +%files +%defattr(-,root,root) +%dir %{_prefix}/lib/obs +%dir %{_prefix}/lib/obs/service +%{_prefix}/lib/obs/service + +%changelog diff --git a/replace_using_package_version-0.0.1.tar.gz b/replace_using_package_version-0.0.1.tar.gz new file mode 100644 index 0000000..937885a --- /dev/null +++ b/replace_using_package_version-0.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3b61d839820b87cd35f1a99913a637886260c4bf62face2bbd44f34494051ec +size 3154