[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: emboss-explorer



Hi David!

On 5/13/07, David Paleino <d.paleino@gmail.com> wrote:
> And some (more) doubts on README.Debian:
> How secure is to run the cron as root? Can't it be run with a less
> privileged user? (if yes, then it's better on my opinion)

Well, the cron removes files from /var/www/emboss/output. Usually, /var/www is
property of www-data and, unless you add your user to www-data and give g+w
recursively to the whole directory, you won't have right to do anything there.
That's why _root_. Maybe, better, I can suggest to add that line to www-data's
crontab. Suggestions?

As I said, it is a doubt that I have :-)
And I can't say to you "do this, that it's the correct thing to do".
Needs to see what other packages do (packages that use crontab).
(I will think on this tomorrow; maybe someone have a good solution for
this or they say "David's solution is OK") ;-)

> You have repackaged the original source code, but it's not necessary to
> do this.
> Copy the debian/ dir inside emboss-explorer/, rename the original
> emboss-explorer-2.2.0.tar.gz to emboss-explorer_2.2.0.orig.tar.gz and
> you will see that the package will be built normally, without
> problems. dpkg-source (if I remember correctly) can handle this,
> without the need to add the version to the dir and create a new
> .tar.gz file.

I'll try then. I remembered that the top source dir must be named package-x.y.z.
(isn't it a Policy requirement?)

Well... actually it works with both ways. See:

emboss-explorer-2.2.0.tar.gz is the upstream source code
emboss-explorer_2.2.0-1.diff.gz is your diff

We will rename emboss-explorer-2.2.0.tar.gz as
emboss-explorer_2.2.0.orig.tar.gz:

$ mv emboss-explorer-2.2.0.tar.gz emboss-explorer_2.2.0.orig.tar.gz:

Then build the package:

$ tar xzf emboss-explorer_2.2.0.orig.tar.gz && cd emboss-explorer
$ zcat ../emboss-explorer_2.2.0-1.diff.gz | patch -p1
(...)
$ chmod +x debian/rules
$ pdebuild
(...)
dpkg-deb: building package `emboss-explorer' in
`../emboss-explorer_2.2.0-1_i386.deb'.
(...)
And package builds perfectly. And I am using emboss-explorer as the
name of the dir.

The other way:

$ tar xzf emboss-explorer_2.2.0.orig.tar.gz:
$ mv emboss-explorer emboss-explorer-2.2.0 && cd emboss-explorer-2.2.0
$ zcat ../emboss-explorer_2.2.0-1.diff.gz | patch -p1
(...)
$ chmod +x debian/rules
$ pdebuild
(...)
dpkg-deb: building package `emboss-explorer' in
`../emboss-explorer_2.2.0-1_i386.deb'.
(...)

And we have the same result.

See http://www.debian.org/doc/developers-reference/ch-best-pkging-practices.en.html#s-bpp-origtargz

Section 2.3 of the New Maintainer's Guide says that the source package
should be moved to packagename-version (see
http://www.debian.org/doc/maint-guide/ch-first.en.html), but
sincerely, I didn't remember policy saying "You *must* rename it to
name-version" and what I see on the practical is that it works with or
without renaming. (I might be wrong however).
Maybe they say to rename so dh_make can get the version from the dir?
(just to make the packaging easier for people starting to package?)

But if you are going to rename, you just need to do this:

mv emboss-explorer-2.2.0.tar.gz emboss-explorer_2.2.0.orig.tar.gz
tar xzf emboss-explorer_2.2.0.orig.tar.gz
mv emboss-explorer emboss-explorer-2.2.0

And do what you need to do inside this dir. See that the original
tarball wasn't changed, just renamed.

Ah... just saw now. Shouldn't the package be arch all, instead arch
any? (on debian/control)
There is only perl scripts being installed (that are all arch
independent code, right?).

The updated package has been uploaded to mentors (everything noticed in your
mail has been fixed, but the crontab question. I'm waiting a reply from you for
that).

It's 5:50 AM here.
I won't verify anything now because I can say wrong things :-)
But when I wake up I will take another look on your package.

Thanks for your review :-)

You are welcome ;-)

Best regards,
Nelson



Reply to: