Building debs

2 views
Skip to first unread message

Jonathan Share

unread,
Jul 16, 2008, 7:12:04 AM7/16/08
to mog...@googlegroups.com
Hi,

I'm currently going about setting up some new servers and decided to
investigate the debian packaging work that was recently checked into
trunk.

Building the server components appears to have gone well (waiting for
a test system to get debbootstrap itself right now) however the utls
package appears to have stumped me.

In the build dependencies the utils package lists libmogilefs-perl and
I assume that this is supposed to be based on the Perl module in the
trunk/utils/lib/ directory but I have no idea how to create a debian
package from this (I'm not really a perl guy).

Can anyone point me in the right direction of how to build this dependancy?

Thanks in advance.

Jon

Jonathan Share

unread,
Jul 16, 2008, 7:15:57 AM7/16/08
to mog...@googlegroups.com

As always I solved this just after asking in public... I hadn't built
the package in trunk/api/

Nick Andrew

unread,
Jul 16, 2008, 10:18:44 AM7/16/08
to mog...@googlegroups.com
On Wed, Jul 16, 2008 at 01:15:57PM +0200, Jonathan Share wrote:
> On 7/16/08, Jonathan Share <jon....@gmail.com> wrote:
> > In the build dependencies the utils package lists libmogilefs-perl and
> > I assume that this is supposed to be based on the Perl module in the
> > trunk/utils/lib/ directory but I have no idea how to create a debian
> > package from this (I'm not really a perl guy).

> As always I solved this just after asking in public... I hadn't built
> the package in trunk/api/

You'd have to install it too, right?

So ... build api, install api, build utils, build server. That's a bit
sucky. It should be possible to build all components of the mogilefs
system without installing any of it.

I'll post a patch which I hope will clarify and assist with the
whole build/install process. It doesn't solve the core dependency
problem though.

Nick.

Jonathan Share

unread,
Jul 16, 2008, 10:38:44 AM7/16/08
to mog...@googlegroups.com
On 7/16/08, Nick Andrew <ni...@nick-andrew.net> wrote:
>
> On Wed, Jul 16, 2008 at 01:15:57PM +0200, Jonathan Share wrote:
> > On 7/16/08, Jonathan Share <jon....@gmail.com> wrote:
>
> > > In the build dependencies the utils package lists libmogilefs-perl and
> > > I assume that this is supposed to be based on the Perl module in the
> > > trunk/utils/lib/ directory but I have no idea how to create a debian
> > > package from this (I'm not really a perl guy).
>
>
> > As always I solved this just after asking in public... I hadn't built
> > the package in trunk/api/
>
>
> You'd have to install it too, right?

Yes I had to install it too.

> So ... build api, install api, build utils, build server.

Actually build server didn't depend on any of the rest of that process.

> That's a bit
> sucky. It should be possible to build all components of the mogilefs
> system without installing any of it.

I was wondering if it's possible to create one config that builds everything.

>
> I'll post a patch which I hope will clarify and assist with the
> whole build/install process. It doesn't solve the core dependency
> problem though.
>

Looks good.

Thanks for the work on this packaging, other than that one issue above
it's pretty much worked out of the box. After I pinned
libdanga-socket-perl from debian testing and built libperlbal from
trunk (which required me to repackage libio-aio-perl due to the libc6
dependency) it looks like the packages are going to work fine.

Nick Andrew

unread,
Jul 16, 2008, 11:13:49 AM7/16/08
to mog...@googlegroups.com
On Wed, Jul 16, 2008 at 04:38:44PM +0200, Jonathan Share wrote:
> Thanks for the work on this packaging, other than that one issue above
> it's pretty much worked out of the box.

You're too kind. I expect to find the applications I want already
packaged so I can just type "apt-get install whatever" and the
system's running, except perhaps for editing some config files.
Life's too short to build everything from bare metal anymore.

> After I pinned
> libdanga-socket-perl from debian testing and built libperlbal from
> trunk (which required me to repackage libio-aio-perl due to the libc6
> dependency) it looks like the packages are going to work fine.

Are you on etch? I have to ask why; etch is now old and crufty and
lenny has reasonably modern versions of things.

Nick.

Jonathan Share

unread,
Jul 16, 2008, 11:20:26 AM7/16/08
to mog...@googlegroups.com
On 7/16/08, Nick Andrew <ni...@nick-andrew.net> wrote:
>

Yes, on etch as that is the company standard imposed by sysadmin. To
be honest all of the devs have asked for using ubuntu server, but
we've note managed to convince them yet. I hadn't thought of just
going running lenny, they might be a little more positive to that, but
as it is it looks like I've managed to do all the repackaging I needed
now.

Nick Andrew

unread,
Jul 16, 2008, 11:42:22 AM7/16/08
to mog...@googlegroups.com
On Wed, Jul 16, 2008 at 05:20:26PM +0200, Jonathan Share wrote:
> Yes, on etch as that is the company standard imposed by sysadmin.

Been there, done that.

> To
> be honest all of the devs have asked for using ubuntu server, but
> we've note managed to convince them yet.

The stability your sysadmins seek is false economy. After a while
it causes real problems in development, dealing with old libs and
inability to take advantage of new kernel features, and so on.

If the workload of continual updating is a problem they should
take advice from software development teams, and run regular
updated-distro tests on your applications. Joel Spolsky says it
nicely here:

http://www.joelonsoftware.com/articles/fog0000000023.html

... automatic, daily, complete testing rocks.

> I hadn't thought of just
> going running lenny, they might be a little more positive to that, but
> as it is it looks like I've managed to do all the repackaging I needed
> now.

Yep, until the next backlevel library problem hits.

Nick.

Jonathan Share

unread,
Jul 16, 2008, 12:07:42 PM7/16/08
to mog...@googlegroups.com
On 7/16/08, Nick Andrew <ni...@nick-andrew.net> wrote:
>

Kind of slipped off topic here.

Back on topic... I just noticed that although you have created a
mogilefsd user for the trackers the storage daemon gets run as root.
Should I hunt down the mogile bug tracker and file it as a bug?

Jonathan Share

unread,
Jul 17, 2008, 11:37:12 AM7/17/08
to mog...@googlegroups.com
On 7/16/08, Jonathan Share <jon....@gmail.com> wrote:

Quick 'n' dirty patch for this. Basically synched the mogstored debian
files with the mogilefsd config files.

A couple of issues with it though, but these exist anyway with what
was there previously;
* I didn't touch the translation related files after updating the
mogstored.templates
* If the postinst configure step only half completes due to an error
it will never try creating the $MOGSTORED_DOCROOT again (Perhaps that
check should be moved out of the if [ ! -d ......mogstored.conf ])
* The manpage for debconf-devel states "Make your postinst script
accept a first parameter of "reconfigure". It can treat it just like
"configure". This will be used in a later version of debconf to let
postinsts know when they are reconfigured." This is not yet done.

I'm sure there's more issues, this is just what I tripped across while
making my patch.

mogstored_runas.patch

Nick Andrew

unread,
Jul 17, 2008, 9:23:08 PM7/17/08
to mog...@googlegroups.com
On Thu, Jul 17, 2008 at 05:37:12PM +0200, Jonathan Share wrote:
> Quick 'n' dirty patch for this. Basically synched the mogstored debian
> files with the mogilefsd config files.

Thanks. This looks very nice.

Some comments ...

> +DEFAULTS=/etc/default/$NAME

Here you set a variable containing the filename but don't change the
line which uses the same file later:

> # Read configuration variable file if it is present
> [ -r /etc/default/$NAME ] && . /etc/default/$NAME

... and probably should be one if/else block.

> +if [ "$MOGSTORED_RUNASUSER" == "" ]

This works under bash, but I think not necessarily under other or
older shells. How about:

+if [ -z "$MOGSTORED_RUNASUSER" ]

If you agree can you send a new patch please?

Nick.

Jonathan Share

unread,
Jul 18, 2008, 5:50:52 AM7/18/08
to mog...@googlegroups.com

All of these issues were present in the existing mogilefsd.init but
yes all the changes seem sensible. How does this patch look? I
completely refactored the checking for the RUNASUSER in both init
scripts

mogstored_runas_2.patch

Nick Andrew

unread,
Jul 18, 2008, 11:00:57 PM7/18/08
to mog...@googlegroups.com
On Fri, Jul 18, 2008 at 11:50:52AM +0200, Jonathan Share wrote:
> All of these issues were present in the existing mogilefsd.init but
> yes all the changes seem sensible. How does this patch look? I
> completely refactored the checking for the RUNASUSER in both init
> scripts

Committed; thanks for doing this!

Nick.

Reply all
Reply to author
Forward
0 new messages