From 063020faf6186a07000f520b782e9e7afd7e02f16909ba12d14926d6ed657de0 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Wed, 10 May 2017 12:48:58 +0000 Subject: [PATCH] Accepting request 494239 from home:matejcik:rpm-macros-build-test - version bump to 2017.05.09.fc237de - fix badly generated %posttrans snippets in cases where old %python_install_alternative syntax is used for secondary files - rework %if-macros - introduce %python_flavor, which configures behavior of generic %python_* macros, and can be overriden by the user - add --force to %python_install, to make install order fully deterministic - version bump to 2017.04.27.d2ca08c - switch versioning scheme to date-based - switch from using service to a custom script update.sh - auto-generate Provides: python2-modname in old distributions (only for main package though) OBS-URL: https://build.opensuse.org/request/show/494239 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python-rpm-macros?expand=0&rev=39 --- README.packaging | 10 ++++++++ _service | 23 ------------------- ...-macros-1.0.git.1490791775.6e5b01c.tar.bz2 | 3 --- python-rpm-macros-2017.05.09.fc237de.tar.bz2 | 3 +++ python-rpm-macros.changes | 20 ++++++++++++++++ python-rpm-macros.spec | 6 +++-- update.sh | 23 +++++++++++++++++++ 7 files changed, 60 insertions(+), 28 deletions(-) create mode 100644 README.packaging delete mode 100644 _service delete mode 100644 python-rpm-macros-1.0.git.1490791775.6e5b01c.tar.bz2 create mode 100644 python-rpm-macros-2017.05.09.fc237de.tar.bz2 create mode 100644 update.sh diff --git a/README.packaging b/README.packaging new file mode 100644 index 0000000..ff4f5f3 --- /dev/null +++ b/README.packaging @@ -0,0 +1,10 @@ +This file contains information for OpenBuildService packagers. + +To update this package from git, run the file update.sh + +It pulls the latest version from github, assigns a date-based version +number, removes previous tarball and creates a new one, inputs the +version number in the spec file, and notes the version bump in changelog. + +In the future, changelog should also be maintained in git and auto-dumped +into the changes file. diff --git a/_service b/_service deleted file mode 100644 index e13ed99..0000000 --- a/_service +++ /dev/null @@ -1,23 +0,0 @@ - - - - git - https://github.com/openSUSE/python-rpm-macros.git - - python-rpm-macros - 1.0.git - - - - - bz2 - *.tar - - - - *.tar.bz2 - */python-rpm-macros.spec - - - - diff --git a/python-rpm-macros-1.0.git.1490791775.6e5b01c.tar.bz2 b/python-rpm-macros-1.0.git.1490791775.6e5b01c.tar.bz2 deleted file mode 100644 index 42d813d..0000000 --- a/python-rpm-macros-1.0.git.1490791775.6e5b01c.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:65320aa38d36570e852a4711e8830b188b64dacf28fb43127d96073f3a762d31 -size 12054 diff --git a/python-rpm-macros-2017.05.09.fc237de.tar.bz2 b/python-rpm-macros-2017.05.09.fc237de.tar.bz2 new file mode 100644 index 0000000..f036786 --- /dev/null +++ b/python-rpm-macros-2017.05.09.fc237de.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03b68c6027ed30ad932ae4275f37e8fcfddbd06499f81e8f91ac941a6206f4e9 +size 12643 diff --git a/python-rpm-macros.changes b/python-rpm-macros.changes index d968e5a..3885a89 100644 --- a/python-rpm-macros.changes +++ b/python-rpm-macros.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Tue May 9 15:38:41 UTC 2017 - jmatejek@suse.com + +- version bump to 2017.05.09.fc237de +- fix badly generated %posttrans snippets in cases where + old %python_install_alternative syntax is used for secondary files +- rework %if-macros +- introduce %python_flavor, which configures behavior of generic %python_* + macros, and can be overriden by the user +- add --force to %python_install, to make install order fully deterministic + +------------------------------------------------------------------- +Thu Apr 27 15:43:20 UTC 2017 - jmatejek@suse.com + +- version bump to 2017.04.27.d2ca08c +- switch versioning scheme to date-based +- switch from using service to a custom script update.sh +- auto-generate Provides: python2-modname in old distributions + (only for main package though) + ------------------------------------------------------------------- Wed Mar 29 12:53:05 UTC 2017 - jmatejek@suse.com diff --git a/python-rpm-macros.spec b/python-rpm-macros.spec index a01ac26..0cd822e 100644 --- a/python-rpm-macros.spec +++ b/python-rpm-macros.spec @@ -17,19 +17,21 @@ Name: python-rpm-macros -Version: 1.0.git.1490791775.6e5b01c +Version: 2017.05.09.fc237de Release: 0 Summary: RPM macros for building of Python modules License: WTFPL Group: Development/Tools/Other Url: https://github.com/opensuse/multipython-macros Source: python-rpm-macros-%{version}.tar.bz2 +Source100: README.packaging +Source101: update.sh # Fedora compatibility Provides: python2-rpm-macros Provides: python3-rpm-macros +BuildRoot: %{_tmppath}/%{name}-%{version}-build #!BuildIgnore: python-rpm-macros BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This package contains SUSE RPM macros for Python build automation. diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..5fd4862 --- /dev/null +++ b/update.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +GIT_URL=https://github.com/openSUSE/python-rpm-macros.git +SPEC_FILE_NAME=python-rpm-macros.spec + +PREV_VERSION=$(sed -rn 's/^Version:\s+(.*)$/\1/p' $SPEC_FILE_NAME) +rm python-rpm-macros-$PREV_VERSION.tar.bz2 + +tmpdir=tmp.$RANDOM + +git clone --depth=1 $GIT_URL $tmpdir +cd $tmpdir +cp packaging/* .. + +VERSION=$(git log -n 1 --date=format:%Y.%m.%d --format=format:%cd.%h) +git archive --format=tar --prefix=python-rpm-macros-$VERSION/ HEAD \ + | bzip2 -c > ../python-rpm-macros-$VERSION.tar.bz2 + +cd .. +rm -rf $tmpdir +sed -i -r 's/^(Version:\s+)(.*)$/\1'$VERSION'/' $SPEC_FILE_NAME + +osc vc -m "version bump to $VERSION"