summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Vu-Brugier <cvubrugier@fastmail.fm>2016-10-21 10:42:03 +0200
committerChristophe Vu-Brugier <cvubrugier@fastmail.fm>2016-10-24 20:22:54 +0200
commitb3f692f60bc933dce0c8c727d9028003014eeddb (patch)
tree9473424b9880949dee883168c98a11ca2adfd09b
parentd7ccfcf592a2051ddba9eecb2843aee3f0da8a8d (diff)
downloadrtslib-fb-b3f692f60bc933dce0c8c727d9028003014eeddb.tar.gz
Remove build scripts for RPM and Debian packages
Remove the "example-debian" and "example-rpm" directories because our in-repo packaging is less complete than the packaging made by distributions. Finally, this patch adds a few links to RPM and Debian build scripts in our README.md. Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
-rw-r--r--Makefile70
-rw-r--r--README.md16
-rw-r--r--example-debian/README.Debian13
-rw-r--r--example-debian/compat1
-rw-r--r--example-debian/control29
-rw-r--r--example-debian/copyright24
-rw-r--r--example-debian/python-rtslib-fb-docs.doc-base9
-rw-r--r--example-debian/python-rtslib-fb.install2
-rw-r--r--example-debian/python-rtslib-fb.manpages2
-rw-r--r--example-debian/python3-rtslib-fb.install2
-rw-r--r--example-debian/python3-rtslib-fb.manpages2
-rw-r--r--example-debian/python3-rtslib-fb.target.init41
-rwxr-xr-xexample-debian/rules51
-rw-r--r--example-debian/source/format1
-rw-r--r--example-rpm/python-rtslib.spec.tmpl44
15 files changed, 7 insertions, 300 deletions
diff --git a/Makefile b/Makefile
index 8716fe2..f72f324 100644
--- a/Makefile
+++ b/Makefile
@@ -22,8 +22,6 @@ VERSION = $$(basename $$(git describe --tags | tr - . | grep -o '[0-9].*$$'))
all:
@echo "Usage:"
@echo
- @echo " make deb - Builds debian packages."
- @echo " make rpm - Builds rpm packages."
@echo " make release - Generates the release tarball."
@echo
@echo " make clean - Cleanup the local repository build files."
@@ -32,15 +30,7 @@ all:
clean:
@rm -fv ${NAME}/*.pyc ${NAME}/*.html
@rm -frv ${NAME}.egg-info MANIFEST build
- @rm -frv debian/tmp
- @rm -fv build-stamp
- @rm -fv dpkg-buildpackage.log dpkg-buildpackage.version
- @rm -frv *.rpm
- @rm -fv debian/files debian/*.log debian/*.substvars
- @rm -frv debian/${PKGNAME}-doc/ debian/python2.5-${PKGNAME}/
- @rm -frv debian/python2.6-${PKGNAME}/ debian/python-${PKGNAME}/
@rm -frv results
- @rm -fv rpm/*.spec *.spec rpm/sed* sed*
@rm -frv ${PKGNAME}-*
@echo "Finished cleanup."
@@ -59,42 +49,6 @@ build/release-stamp:
@echo "Fixing version string..."
@sed -i "s/__version__ = .*/__version__ = '${VERSION}'/g" \
build/${PKGNAME}-${VERSION}/${NAME}/__init__.py
- @echo "Generating rpm specfile from template..."
- @cd build/${PKGNAME}-${VERSION}; \
- for spectmpl in example-rpm/*.spec.tmpl; do \
- sed -i "s/Version:\( *\).*/Version:\1${VERSION}/g" $${spectmpl}; \
- mv $${spectmpl} $$(basename $${spectmpl} .tmpl); \
- done; \
- rm -r example-rpm
- @mv build/${PKGNAME}-${VERSION}/example-debian build/${PKGNAME}-${VERSION}/debian
- @echo "Generating rpm changelog..."
- @( \
- version=$$(basename $$(git describe HEAD --tags | tr - .)); \
- author=$$(git show HEAD --format="format:%an <%ae>" -s); \
- date=$$(git show HEAD --format="format:%ad" -s \
- | awk '{print $$1,$$2,$$3,$$5}'); \
- hash=$$(git show HEAD --format="format:%H" -s); \
- echo '* '"$${date} $${author} $${version}-1"; \
- echo " - Generated from git commit $${hash}."; \
- ) >> $$(ls build/${PKGNAME}-${VERSION}/*.spec)
- @echo "Generating debian changelog..."
- @( \
- version=$$(basename $$(git describe HEAD --tags | tr - . | grep -o '[0-9].*$$')); \
- author=$$(git show HEAD --format="format:%an <%ae>" -s); \
- date=$$(git show HEAD --format="format:%aD" -s); \
- day=$$(git show HEAD --format='format:%ai' -s \
- | awk '{print $$1}' \
- | awk -F '-' '{print $$3}' | sed 's/^0/ /g'); \
- date=$$(echo $${date} \
- | awk '{print $$1, "'"$${day}"'", $$3, $$4, $$5, $$6}'); \
- hash=$$(git show HEAD --format="format:%H" -s); \
- echo "${PKGNAME} ($${version}) unstable; urgency=low"; \
- echo; \
- echo " * Generated from git commit $${hash}."; \
- echo; \
- echo " -- $${author} $${date}"; \
- echo; \
- ) > build/${PKGNAME}-${VERSION}/debian/changelog
@find build/${PKGNAME}-${VERSION}/ -exec \
touch -t $$(date -d @$$(git show -s --format="format:%at") \
+"%Y%m%d%H%M.%S") {} \;
@@ -108,27 +62,3 @@ build/release-stamp:
@echo "Generated release tarball:"
@echo " $$(ls dist/${PKGNAME}-${VERSION}.tar.gz)"
@touch build/release-stamp
-
-deb: release build/deb-stamp
-build/deb-stamp:
- @echo "Building debian packages..."
- @cd build/${PKGNAME}-${VERSION}; \
- dpkg-buildpackage -rfakeroot -us -uc
- @mv build/*_${VERSION}_*.deb dist/
- @echo "Generated debian packages:"
- @for pkg in $$(ls dist/*_${VERSION}_*.deb); do echo " $${pkg}"; done
- @touch build/deb-stamp
-
-rpm: release build/rpm-stamp
-build/rpm-stamp:
- @echo "Building rpm packages..."
- @mkdir -p build/rpm
- @build=$$(pwd)/build/rpm; dist=$$(pwd)/dist/; rpmbuild \
- --define "_topdir $${build}" --define "_sourcedir $${dist}" \
- --define "_rpmdir $${build}" --define "_buildir $${build}" \
- --define "_srcrpmdir $${build}" -ba build/${PKGNAME}-${VERSION}/*.spec
- @mv build/rpm/*-${VERSION}*.src.rpm dist/
- @mv build/rpm/*/*-${VERSION}*.rpm dist/
- @echo "Generated rpm packages:"
- @for pkg in $$(ls dist/*-${VERSION}*.rpm); do echo " $${pkg}"; done
- @touch build/rpm-stamp
diff --git a/README.md b/README.md
index a049e2c..a17a21f 100644
--- a/README.md
+++ b/README.md
@@ -20,15 +20,13 @@ mailing should be used for rtslib-fb discussion.
* Bugs: [GitHub](https://github.com/open-iscsi/rtslib-fb/issues) or [Trac](https://fedorahosted.org/targetcli-fb/)
* Tarballs: [fedorahosted](https://fedorahosted.org/releases/t/a/targetcli-fb/)
-In-repo packaging
------------------
-Packaging scripts for RPM and DEB are included, but these are to make end-user
-custom packaging easier -- distributions tend to maintain their own packaging
-scripts separately. If you run into issues with packaging, start with opening
-a bug on your distro's bug reporting system.
-
-Some people do use these scripts, so we want to keep them around. Fixes for
-any breakage you encounter are welcome.
+Packages
+--------
+rtslib-fb is packaged for a number of Linux distributions including
+RHEL,
+[Fedora](https://apps.fedoraproject.org/packages/python-rtslib),
+openSUSE, Arch Linux, and
+[Debian](https://tracker.debian.org/pkg/python-rtslib-fb).
"fb" -- "free branch"
---------------------
diff --git a/example-debian/README.Debian b/example-debian/README.Debian
deleted file mode 100644
index 78a1f14..0000000
--- a/example-debian/README.Debian
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright (c) 2011-2013 by Datera, Inc
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may
-not use this file except in compliance with the License. You may obtain
-a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-License for the specific language governing permissions and limitations
-under the License.
diff --git a/example-debian/compat b/example-debian/compat
deleted file mode 100644
index 7f8f011..0000000
--- a/example-debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-7
diff --git a/example-debian/control b/example-debian/control
deleted file mode 100644
index 0c831db..0000000
--- a/example-debian/control
+++ /dev/null
@@ -1,29 +0,0 @@
-Source: rtslib-fb
-Section: python
-Priority: optional
-Maintainer: Andy Grover <andy@groveronline.com>
-Build-Depends: debhelper(>= 8), python, python3 , python-epydoc, python-setuptools, python3-setuptools, python-six, python-pyudev, dh-python
-Standards-Version: 3.9.4
-X-Python-Version: >= 2.6
-X-Python3-Version: >= 3.1
-
-Package: python-rtslib-fb-docs
-Architecture: all
-Description: RisingTide Systems LIO target Python API (Documentation).
-
-Package: python-rtslib-fb
-Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
-Provides: ${python:Provides}
-Suggests: python-rtslib-fb-doc
-Conflicts: python-rtslib, rtsadmin-frozen
-Description: RisingTide Systems LIO target Python 2 API (free branch).
-
-Package: python3-rtslib-fb
-Architecture: all
-Depends: ${python3:Depends}, ${misc:Depends}
-Suggests: python-rtslib-fb-doc
-Conflicts: lio-utils
-Replaces: targetcli-fb (<< 2.1.fb32)
-Description: RisingTide Systems LIO target Python 3 API (free branch).
- This includes the LIO rc scripts to start and stop the target.
diff --git a/example-debian/copyright b/example-debian/copyright
deleted file mode 100644
index 638eeb9..0000000
--- a/example-debian/copyright
+++ /dev/null
@@ -1,24 +0,0 @@
-This package was originally debianized by Jerome Martin <jxm@risingtidesystems.com>
-on Fri Nov 18 12:00:01 UTC 2009. It is currently maintained by Andy Grover
-<andy@groveronline.com>.
-
-Upstream Author: Jerome Martin <jxm@risingtidesystems.com>
-
-Copyright:
-
-This file is part of RTSLib.
-Copyright (c) 2011-2013 by Datera, Inc
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may
-not use this file except in compliance with the License. You may obtain
-a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-License for the specific language governing permissions and limitations
-under the License.
-
-
diff --git a/example-debian/python-rtslib-fb-docs.doc-base b/example-debian/python-rtslib-fb-docs.doc-base
deleted file mode 100644
index 9d070d3..0000000
--- a/example-debian/python-rtslib-fb-docs.doc-base
+++ /dev/null
@@ -1,9 +0,0 @@
-Document: python-rtslib-fb
-Title: python-rtslib documentation
-Author: Jerome Martin <jxm@risingtidesystems.com>
-Abstract: Python library for configuring the Linux kernel-based multiprotocol SCSI target (LIO)
-Section: Programming/Python
-
-Format: HTML
-Index: /usr/share/doc/python-rtslib-fb-docs/html/index.html
-Files: /usr/share/doc/python-rtslib-fb-docs/html/*.html
diff --git a/example-debian/python-rtslib-fb.install b/example-debian/python-rtslib-fb.install
deleted file mode 100644
index 05ca243..0000000
--- a/example-debian/python-rtslib-fb.install
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib/python2*
-usr/bin
diff --git a/example-debian/python-rtslib-fb.manpages b/example-debian/python-rtslib-fb.manpages
deleted file mode 100644
index f620da6..0000000
--- a/example-debian/python-rtslib-fb.manpages
+++ /dev/null
@@ -1,2 +0,0 @@
-doc/saveconfig.json.5
-doc/targetctl.8
diff --git a/example-debian/python3-rtslib-fb.install b/example-debian/python3-rtslib-fb.install
deleted file mode 100644
index bf7cd62..0000000
--- a/example-debian/python3-rtslib-fb.install
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib/python3*
-usr/bin
diff --git a/example-debian/python3-rtslib-fb.manpages b/example-debian/python3-rtslib-fb.manpages
deleted file mode 100644
index f620da6..0000000
--- a/example-debian/python3-rtslib-fb.manpages
+++ /dev/null
@@ -1,2 +0,0 @@
-doc/saveconfig.json.5
-doc/targetctl.8
diff --git a/example-debian/python3-rtslib-fb.target.init b/example-debian/python3-rtslib-fb.target.init
deleted file mode 100644
index b011013..0000000
--- a/example-debian/python3-rtslib-fb.target.init
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-### BEGIN INIT INFO
-# Provides: target
-# Default-Start: 3 4 5
-# Default-Stop: 0 1 2 6
-# Required-Start: $local_fs $network
-# Required-Stop: $local_fs $network
-# Short-Description: Start LIO targets
-# Description: Loads configfs and restores LIO config with targetctl
-### END INIT INFO
-
-
-case "$1" in
- start)
- echo "Loading lio configuration"
- /usr/bin/targetctl restore
- if [[ $? -gt 0 ]]; then
- exit 1
- fi
- ;;
-
- stop)
- echo "Unloading lio configuration"
- /usr/bin/targetctl clear
- if [[ $? -gt 0 ]]; then
- exit 1
- fi
- ;;
-
- restart|force-reload)
- $0 stop
- sleep 3
- $0 start
- ;;
-
- *)
- echo "usage: $0 {start|stop|restart|force-reload}"
-esac
-
-exit 0
diff --git a/example-debian/rules b/example-debian/rules
deleted file mode 100755
index 3eae1a1..0000000
--- a/example-debian/rules
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/make -f
-
-build_dir = build
-install_dir = $(CURDIR)/debian/tmp
-pkgname = rtslib-fb
-name = rtslib
-
-#export DH_VERBOSE=1
-
-PYTHON2=$(shell pyversions -vr)
-PYTHON3=$(shell py3versions -vr)
-
-#prevent internet access to use PyPi
-export http_proxy = http://127.0.0.1:9
-
-
-%:
- dh $@ --with python2,python3
-
-
-build-python%:
- python$* setup.py build
-
-override_dh_auto_build: $(PYTHON3:%=build-python%) $(PYTHON2:%=build-python%)
- dh_auto_build
-
-
-install-python%:
- python$* setup.py install --root=$(install_dir) --install-layout=deb
-
-
-override_dh_auto_install: $(PYTHON3:%=install-python%) $(PYTHON2:%=install-python%)
- dh_auto_install
- # for using python 3 for targetctl
- # even though it is overwritten by python2 setup
- sed -i '1s|/usr/bin/python$$|/usr/bin/python3|' $(install_dir)/usr/bin/targetctl
-
-
-override_dh_installdocs:
- cd $(build_dir); epydoc --no-sourcecode --html -n $(pkgname) \
- --exclude configobj ../$(name)/*.py
- dh_installdocs $(build_dir)/html
-
-override_dh_installinit:
- dh_installinit --name target
-
-
-override_dh_auto_clean:
- dh_auto_clean
- rm -rf build
- rm -rf *.egg-info
diff --git a/example-debian/source/format b/example-debian/source/format
deleted file mode 100644
index 89ae9db..0000000
--- a/example-debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (native)
diff --git a/example-rpm/python-rtslib.spec.tmpl b/example-rpm/python-rtslib.spec.tmpl
deleted file mode 100644
index 2191b7a..0000000
--- a/example-rpm/python-rtslib.spec.tmpl
+++ /dev/null
@@ -1,44 +0,0 @@
-%define oname rtslib-fb
-
-Name: python-rtslib
-License: Apache License 2.0
-Group: System Environment/Libraries
-Summary: A framework to implement simple but nice CLIs.
-Version: VERSION
-Release: 1%{?dist}
-URL: http://www.risingtidesystems.com/git/
-Source: %{oname}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rpmroot
-BuildArch: noarch
-BuildRequires: python-devel, epydoc
-Vendor: Datera, Inc.
-
-%description
-API for RisingTide Systems generic SCSI target.
-
-%prep
-%setup -q -n %{oname}-%{version}
-
-%build
-%{__python} setup.py build
-mkdir -p doc
-epydoc --no-sourcecode --html -n %{oname} --exclude configobj rtslib_fb/*.py
-mv html doc/
-
-%install
-rm -rf %{buildroot}
-%{__python} setup.py install --skip-build --root %{buildroot} --prefix usr
-mkdir -p %{buildroot}/usr/share/doc/python-rtslib-doc-%{version}
-cp -r doc/* %{buildroot}/usr/share/doc/python-rtslib-doc-%{version}/
-
-%clean
-rm -rf %{buildroot}
-
-%files
-%defattr(-,root,root,-)
-%{python_sitelib}
-%{_bindir}/targetctl
-/usr/share/doc/python-rtslib-doc-%{version}
-%doc COPYING README.md
-
-%changelog