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

Malihe Asemani ml.asemani at gmail.com
Sat May 2 16:35:23 UTC 2015


Hi Andreas,

I started from reading /usr/bin/pkgos-setup-sbuild and trying to understand
what is it doing. finally, I could run  "sudo pkgos-setup-sbuild dev mali"
(I used sudo because the script manipulates some config files and needs
permission for doing that).
hmmm.... let me confess I had some problems with lines 375 & 376:

    su ${THE_DEV_USER} -c pkgos-scan-repo
    su ${THE_DEV_USER} -c pkgos-scan-repo ${REPO_NOCHANGE_BACKPORT_DEST}

These commands complain about permissions when they are trying to upload
packages on repo. I ran the command manually by root user and it worked
correctly. finally I commented lines 375 and 376.
Anyway, these commands are trying to upload some build-ed packages on repo,
AFAIU. So, they are not our current concern, I guess.

 Afterwards, I ran pkgos-bop in manila again. git-buildpakage used sbuild
this time  and the current result is:

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~rc2'
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'
dh clean --with python2,systemd
   dh_testdir
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/mali/build-area/manila-2015.1~rc2'
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'
dh_auto_clean
pyversions: missing X(S)-Python-Version in control file, fall back to
debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
error in setup command: Error parsing
/home/mali/build-area/manila-2015.1~rc2/setup.cfg: Exception: Versioning
for this project requires either an sdist tarball, or access to an upstream
git repository. Are you sure that git is installed?
dh_auto_clean: python setup.py clean -a returned exit code 1
debian/rules:20: recipe for target 'override_dh_auto_clean' failed
make[1]: *** [override_dh_auto_clean] Error 1
make[1]: Leaving directory '/home/mali/build-area/manila-2015.1~rc2'
debian/rules:9: recipe for target 'clean' failed
make: *** [clean] Error 2
E: Failed to clean source directory /home/mali/build-area/manila-2015.1~rc2
(/home/mali/build-area/manila_2015.1~rc2-0~bpo80+1.dsc)
gbp:error: 'sbuild -v --no-apt-update' failed: it exited with 1
HEAD is now at c583895 Change package version in changelog
There was an error when bop called git-buildpackage: exiting.

I'm trying to solve this problem.
Indeed your help would be most welcome :)

best regards,
Mali


On Sat, May 2, 2015 at 12:26 PM, Malihe Asemani <ml.asemani at gmail.com>
wrote:

> 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
>



-- 
------------
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/44e72f4a/attachment-0001.html>


More information about the Openstack-devel mailing list