[PKG-Openstack-devel] [MoM] Packaging manila

Malihe Asemani ml.asemani at gmail.com
Sat May 2 07:56:32 UTC 2015


Hey Andreas,

On Thu, Apr 30, 2015 at 6:41 PM, Andreas Tille <andreas at an3as.eu> wrote:

> Hi Malihe,
>
> On Wed, Apr 29, 2015 at 01:51:15AM +0430, Malihe Asemani wrote:
> > root at mali-Lenovo-IdeaPad-Z410:/git/debian/Debian-ops# gbp-clone ssh://
> > git.debian.org/git/openstack/manila_Mali.git
>
> I was able to clone this.
>
> One first important remark:  Please never ever do your packaging work as
> root.  All steps you do should be done by a normal user.
>
> Okay. But may I know what is wrong with do it as root?


>
> I'd like to repeat: Please never use your root account.
>
Sure :)


> Moreover I'd suggest to use ssh-agent to not need to provide the
> password all the time.  If you once use
>
>     ssh-add ${HOME}/.ssh/id_rsa_debian_2
>
> this should do the trick.
>
> Uhum. tnx


> > root at mali-Lenovo-IdeaPad-Z410:/git/manila_Mali# git tag
> > 2014.2
> > 2014.2.b3
> > 2014.2.rc1
> > 2014.2.rc2
> > 2015.1.0b1
> > 2015.1.0b2
> > 2015.1.0b3
> > 2015.1.0rc1
> > 2015.1.0rc2
> >
> > #I removed tag 2015.1.0rc2 because the last stable version of Manila in
> ubuntu is tag 2015.1.0rc1.
>
> Ahhh, I see your intention.  However, we do not want to package the last
> stable version of Manila in Ubuntu but rather the last stable version
> provided by *upstream*.  (I hope you are comfortable with the Debian
> "slang" that upstream are the authors of the software we are packaging.)
>
> > #I guess as the first step, it is better to work with the same version
> which is used in Ubuntu.
>
> I do not see any advantage in this - neither for learning the packaging
> (assume we would start from scratch we would have no orientation like
> this) nor for the result (why packaging old software and how should
> Ubuntu profit from our work if they do just have what we are working on)
>
> > #After first release of manila*.deb packages for Debian, we can pull
> other commits on Manila and merge them too.
> > #What do you think about this aproach?
>
> I see you point but lets be a bit more brave. ;-)
>
> :))) Okay. Let's do it :)


> The other things are looking good so far.  Would you agree with my
> arguments for taking the last upstream version?  If yes, you have
> two options.  Either you use as I suggested
>
>    gbp-clone ssh://git.debian.org/git/openstack/manila.git
>
> and continue to work from here or you redo what you did but stick
> to the latest tag.  This should give you the same repository.
>
> I cloned your repo.


> The next step should be to use git-buildpackage.  Did you tried this
> on your repository?  Did you also run into
>
>
> dpkg-buildpackage: warning: this is currently a non-fatal warning with -S,
> but will probably become fatal in the future
>  fakeroot debian/rules clean
> debian/rules:6: /usr/share/openstack-pkg-tools/pkgos.make: No such file or
> directory
> dh /usr/share/openstack-pkg-tools/pkgos.make --with python2,systemd
> dh: unable to load addon systemd: Can't locate Debian/Debhelper/Sequence/
> systemd.pm in @INC (you may need to install the
> Debian::Debhelper::Sequence::systemd module) (@INC contains: /etc/perl
> /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2
> /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5
> /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20
> /usr/local/lib/site_perl .) at (eval 12) line 2.
> BEGIN failed--compilation aborted at (eval 12) line 2.
>
>
> If yes, what's your take on fixing this.  I could provide a simple clue
> for this but I would like you to reproduce this kind of steps and learn
> the ways to solve it.
>
> Firstly, I should say I installed *openstack-pkg-tools* from Experimental
Repository, but there was not /usr/bin/pkgos-pob on system after installing
the package. After a little search I found out Thomas has added a link for
openstack-package-tools on *http://openstack.alioth.debian.org/
<http://openstack.alioth.debian.org/>*
So, I did 'wget' on "
http://kilo-jessie.pkgs.mirantis.com/debian/pool/jessie-kilo-backports/main/o/openstack-pkg-tools",
then installed the package and its dependencies.

The result of running pkgso-bop on Manila in this state was:

mali at buildEnv:/home/mali/manila$ pkgos-bop
===> Cleaning-up old builds
debian/rules:12: warning: overriding recipe for target 'get-orig-source'
/usr/share/openstack-pkg-tools/pkgos.make:76: warning: ignoring old recipe
for target 'get-orig-source'
git tag -v 2015.1_b2 || true
error: tag '2015.1_b2' not found.
if [ ! -f ../manila_2015.1~b2.orig.tar.xz ] ; then \
        git archive --prefix=manila-2015.1~b2/ 2015.1_b2 | xz
>../manila_2015.1~b2.orig.tar.xz ; \
fi
[ ! -e ../build-area ] && mkdir ../build-area || true
[ ! -e ../build-area/manila_2015.1~b2.orig.tar.xz ] && cp
../manila_2015.1~b2.orig.tar.xz ../build-area

===> Building using git-buildpackage
dch warning: new version (2015.1~b2-0ubuntu1~bpo80+1) is less than
the current version number (2015.1~b2-0ubuntu1).
[debian/kilo d6bf29c] Rebuilt by bop.
 1 file changed, 6 insertions(+)
gbp:info: Exporting 'HEAD' to '/home/mali/build-area/manila-tmp'
gbp:info: Moving '/home/mali/build-area/manila-tmp' to
'/home/mali/build-area/manila-2015.1~b2'
 dpkg-buildpackage -rfakeroot -D -us -uc -i -I
dpkg-buildpackage: source package manila
dpkg-buildpackage: source version 2015.1~b2-0ubuntu1~bpo80+1
dpkg-buildpackage: source distribution UNRELEASED
dpkg-buildpackage: source changed by malihe <mali at mirror.xamin.ir>
 dpkg-source -i -I --before-build manila-2015.1~b2
dpkg-buildpackage: host architecture amd64
dpkg-checkbuilddeps: Unmet build dependencies: dh-systemd python-all (>=
2.6) alembic (>= 0.7.2) python-amqplib python-anyjson python-babel (>\
= 1.3) python-cinderclient python-ddt (>= 1.0.0) python-eventlet (>=
0.16.1) python-glanceclient python-greenlet (>= 0.3.2) python-hacking pyt\
hon-hp3parclient python-httplib2 (>= 0.7.5) python-iso8601
python-keystoneclient python-lxml python-manilaclient python-migrate
python-mock py\
thon-mox python-neutronclient python-nose python-novaclient
python-oslo-concurrency (>= 1.4.1) python-oslo-config (>= 1.6.0)
python-oslo-conte\
xt (>= 0.1.0) python-oslo-db (>= 1.4.1) python-oslo-i18n (>= 1.3.0)
python-oslo-messaging (>= 1.4.0) python-oslo-rootwrap (>= 1.3.0) python-os\
lo-serialization (>= 1.2.0) python-oslo-utils (>= 1.2.0) python-oslotest
python-paramiko python-paste python-pastedeploy python-pbr python-rou\
tes python-sqlalchemy python-stevedore python-swiftclient
python-testresources python-testtools python-webob subunit testrepositor
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -i -I failed
gbp:error: 'debuild -i -I' failed: it exited with 29
HEAD is now at 73cc358 Add gbp.conf
There was an error when bop called git-buildpackage: exiting.

I noticed to 3 part of the result:

   - debian/rules:12: warning: overriding recipe for target
   'get-orig-source' /usr/share/openstack-pkg-tools/pkgos.make:76: warning:
   ignoring old recipe for target 'get-orig-source' : I checked pkgos.make and
   found "get-orig-source recipe". I wondered if it is better to remove
   'get-orig-source' from manila/debian/rule or not?
   - error: tag '2015.1_b2' not found. reading pkgos.make, I found out the
   code finds the last tag of package from last entry of changelog. The last
   entry on changelog was some s/th like "manila (2015.1~b2-0ubuntu1) " so the
   script try to find tag 2015.1_b2. Therefore, I added an entry to
   changelog like this "manila (2015.1~rc2-0)" (BTW, It seems the
   tag 2015.1.0rc2 should be re-tagged by  2015.1_rc2 instead
   of  2015.1.0_rc2. Do u agree?)
   - Unmet build dependencies: so, I installed the proposed packages to
   resolve dependency issues.

mali at buildEnv:/home/mali/manila$ sudo apt-get install dh-systemd
python-all  alembic  python-amqplib python-anyjson python-babel
python-cinde\
rclient python-ddt  python-eventlet  python-glanceclient python-greenlet
python-hacking python-hp3parclient python-httplib2  python-iso8601 p\
ython-keystoneclient python-lxml python-manilaclient python-migrate
python-mock python-mox python-neutronclient python-nose python-novaclient \
python-oslo-concurrency  python-oslo-config  python-oslo-context
python-oslo-db  python-oslo-i18n  python-oslo-messaging
python-oslo-rootwra\
p  python-oslo-serialization  python-oslo-utils python-oslotest
python-paramiko python-paste python-pastedeploy python-pbr python-routes
pytho\
n-sqlalchemy python-stevedore python-swiftclient python-testresources
python-testtools python-webob subunit testrepository
[sudo] password for mali:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-oslo-config is a virtual package provided by:
  python-oslo.config-doc 1:1.3.0-2
    python-oslo.config 1:1.3.0-2
    You should explicitly select one to install.

E: Unable to locate package python-manilaclient
E: Unable to locate package python-oslo-concurrency
E: Package 'python-oslo-config' has no installation candidate
E: Unable to locate package python-oslo-context
E: Unable to locate package python-oslo-db
E: Unable to locate package python-oslo-i18n
E: Unable to locate package python-oslo-messaging
E: Unable to locate package python-oslo-rootwrap
E: Unable to locate package python-oslo-serialization
E: Unable to locate package python-oslo-utils

I removed the packages which were not on the repository, from list of
packaged that should be installed, and installed the other packages.
Then I rebuild-ed
the package. Result is:

===> Building using git-buildpackage
dch warning: new version (2015.1~b2-0ubuntu1~bpo80+1) is less than
the current version number (2015.1~b2-0ubuntu1).
[debian/kilo d6bf29c] Rebuilt by bop.
 1 file changed, 6 insertions(+)
gbp:info: Exporting 'HEAD' to '/home/mali/build-area/manila-tmp'
gbp:info: Moving '/home/mali/build-area/manila-tmp' to
'/home/mali/build-area/manila-2015.1~b2'
 dpkg-buildpackage -rfakeroot -D -us -uc -i -I
dpkg-buildpackage: source package manila
dpkg-buildpackage: source version 2015.1~b2-0ubuntu1~bpo80+1
dpkg-buildpackage: source distribution UNRELEASED
dpkg-buildpackage: source changed by malihe <mali at mirror.xamin.ir>
 dpkg-source -i -I --before-build manila-2015.1~b2
dpkg-buildpackage: host architecture amd64
dpkg-checkbuilddeps: Unmet build dependencies: alembic (>= 0.7.2)
python-ddt (>= 1.0.0) python-eventlet (>= 0.16.1) python-manilaclient
python\
-oslo-concurrency (>= 1.4.1) python-oslo-config (>= 1.6.0)
python-oslo-context (>= 0.1.0) python-oslo-db (>= 1.4.1) python-oslo-i18n
(>= 1.3.0\
) python-oslo-messaging (>= 1.4.0) python-oslo-rootwrap (>= 1.3.0)
python-oslo-serialization (>= 1.2.0) python-oslo-utils (>= 1.2.0)
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied;
aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -i -I failed
gbp:error: 'debuild -i -I' failed: it exited with 29
HEAD is now at 73cc358 Add gbp.conf
There was an error when bop called git-buildpackage: exiting.

I don t know how can I resolve the remained dependencies problems.

After doing these steps, I checked '*http://openstack.alioth.debian.org/
<http://openstack.alioth.debian.org/>*' page again. Thomas has mentioned
there that before doing a build for openstack packges, run
'pkgos-setup-sbuild dev USER_NAME'. So, I did it. But I had different
problems with this script every time that i tried to run it.
I guess I should read about sbuild and how it works. I am doing packaging
on a debootstrap-ed jessie. It seems sbuild do a debootstrap too. I need to
know what does 'setup-sbuild dev USER_NAME' do, exactly, to be able to
resolve its issue.
Or I can just forget setup-sbuild for now, and continue resolving
dependencies problems when run 'pkos-bop' in manila dir.
which one is better to be selected as next step, in ur mind?



Kind regards
>
>      Andreas.
>
> --
> http://fam-tille.de
>
> _______________________________________________
> Openstack-devel mailing list
> Openstack-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/openstack-devel
>



-- 
------------
you can't start the next chapter if you keep re-reading the last one

mali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/openstack-devel/attachments/20150502/38d2535b/attachment-0001.html>


More information about the Openstack-devel mailing list