Fix fuel-createmirror spec

* Since we are in migration stage to python code implementation
we need to fix SPEC files both for RPM and DEB

* Small lintian fixes

Change-Id: I51e4a6aa27b2855805beab3c61b4d4c499df2732
Related-Bug: #1487077
This commit is contained in:
Sergey Kulanov 2015-10-16 23:10:20 +03:00
parent ccbb13c021
commit 843736e505
6 changed files with 25 additions and 11 deletions

4
debian/control vendored
View File

@ -9,6 +9,6 @@ Package: fuel-createmirror
Architecture: all
Depends: ${shlibs:Depends},python,dpkg-dev,openssl,rsync
Description: CLI script for MOS/upstream mirroring
**fuel-createmirror -- utility for creating local mirrors of MOS and
upstream OS repositories
**fuel-createmirror -- utility for creating local mirrors of MOS and
upstream OS repositories
.

2
debian/copyright vendored
View File

@ -1 +1 @@
Copyright: GPLv2
Copyright: GPLv2

2
debian/postinst vendored
View File

@ -1,3 +1,3 @@
#!/bin/bash
ln -sf /opt/fuel-createmirror-8.0/fuel-createmirror /usr/bin/
ln -sf /opt/fuel-createmirror-8.0/config /etc/fuel-createmirror
ln -sf /opt/fuel-createmirror-8.0/config /etc/fuel-createmirror

2
debian/postrm vendored
View File

@ -7,4 +7,4 @@ if [ "$1" = "1" ]; then
else
rm -f /usr/bin/fuel-createmirror
rm -f /etc/fuel-createmirror
fi
fi

17
debian/rules vendored
View File

@ -1,5 +1,12 @@
#!/usr/bin/make -f
# FIXME (skulanov)
# Since we are still building packages with ISO
# we have to define DEB_VERSION_EPOCH_UPSTREAM explicitly
DEB_VERSION_EPOCH_UPSTREAM=8.0
# otherwise this variable correctly defined below
# include /usr/share/dpkg/pkg-info.mk
export DH_ALWAYS_EXCLUDE=CVS:.git:specs
PACKAGE=$(shell dh_listpackages)
@ -24,9 +31,13 @@ binary-arch: build
dh_installchangelogs
# Copy the packages's files.
mkdir -p debian/$(PACKAGE)/opt/$(PACKAGE)-8.0
find . -maxdepth 1 -mindepth 1 -not -name debian -print0 | \
xargs -0 -r -i cp -a {} debian/$(PACKAGE)/opt/$(PACKAGE)-8.0
mkdir -p debian/$(PACKAGE)/opt/$(PACKAGE)-$(DEB_VERSION_EPOCH_UPSTREAM)
cp fuel-createmirror debian/$(PACKAGE)/opt/$(PACKAGE)-$(DEB_VERSION_EPOCH_UPSTREAM)
cp deb-mirror debian/$(PACKAGE)/opt/$(PACKAGE)-$(DEB_VERSION_EPOCH_UPSTREAM)
cp -r util debian/$(PACKAGE)/opt/$(PACKAGE)-$(DEB_VERSION_EPOCH_UPSTREAM)
cp -r config debian/$(PACKAGE)/opt/$(PACKAGE)-$(DEB_VERSION_EPOCH_UPSTREAM)
cp LICENSE debian/$(PACKAGE)/opt/$(PACKAGE)-$(DEB_VERSION_EPOCH_UPSTREAM)
cp README.md debian/$(PACKAGE)/opt/$(PACKAGE)-$(DEB_VERSION_EPOCH_UPSTREAM)
#
# If you need to move files around in debian/$(PACKAGE) or do some

View File

@ -30,15 +30,18 @@ Requires: rsync
rm -rf %{name}-%{version}
mkdir %{name}-%{version}
tar xzvf %{SOURCE0} -C %{name}-%{version}
rm -rf %{name}-%{version}/{debian,specs}
%build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/opt/%{name}-%{version}
cp -R %{name}-%{version}/* %{buildroot}/opt/%{name}-%{version}
rm -f %{buildroot}/opt/%{name}-%{version}/version*
cp %{name}-%{version}/%{name} %{buildroot}/opt/%{name}-%{version}
cp %{name}-%{version}/deb-mirror %{buildroot}/opt/%{name}-%{version}
cp -R %{name}-%{version}/util/ %{buildroot}/opt/%{name}-%{version}
cp -R %{name}-%{version}/config/ %{buildroot}/opt/%{name}-%{version}
cp %{name}-%{version}/LICENSE %{buildroot}/opt/%{name}-%{version}
cp %{name}-%{version}/README.md %{buildroot}/opt/%{name}-%{version}
%clean
rm -rf %{buildroot}