FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 05-24-2011, 04:08 PM
Laszlo Papp
 
Default Packaging cups with cdbs

Hi,

I have tried to use the debian/rules that you can see below. My
concern is that I would like to make a test package (for maemo, but
actually should also work for debian) in case of using upstart for
init functionalities.
The problem is that if I try to use a debian/cups.upstart file for
that purpose, it seems to be hard coded. It installs the upstart job
into the /etc/init/ and I cannot customize that path, for instance to
/etc/init/apps/ as I would like to have it. I tried to set the
"--onlyscripts" option in order to hope that it does not generate any
init script/job inside the package and I could just make a workaround
by using postinst.

Other option is to change the whole packaging to "dh" usage. However
if I could just bypass the systemv init script and/or hard coded
upstart job installation, it would be easier for me because I am not a
packager. =)

I am not sure what I am doing wrong, so any help is welcome and thank
you in advance!

Best Regards,
Laszlo Papp

====

#!/usr/bin/make -f
export DH_VERBOSE=1

export LIBTOOL=

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

PACKAGE_TARGETS := $(foreach pkg,$(DEB_ALL_PACKAGES),binary/$(pkg))
$(PACKAGE_TARGETS)::
[ ! -f debian/$(notdir $@).aegis ] || aegis-deb-add -control
debian/$(notdir $@)/DEBIAN/control .. debian/$(notdir $@).aegis=_aegis

DEB_DH_INSTALLINIT_ARGS := --onlyscripts
DEB_MAKE_INSTALL_TARGET := install BUILDROOT=$(DEB_DESTDIR)


Best Regards,
Laszlo Papp


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTin_rE4NE9SNzOnmUbR1-v1SmOU9wg@mail.gmail.com">http://lists.debian.org/BANLkTin_rE4NE9SNzOnmUbR1-v1SmOU9wg@mail.gmail.com
 
Old 05-24-2011, 04:47 PM
Jonas Smedegaard
 
Default Packaging cups with cdbs

Hi Laszlo,

On 11-05-24 at 07:08pm, Laszlo Papp wrote:
> I have tried to use the debian/rules that you can see below. My
> concern is that I would like to make a test package (for maemo, but
> actually should also work for debian) in case of using upstart for
> init functionalities.
> The problem is that if I try to use a debian/cups.upstart file for
> that purpose, it seems to be hard coded. It installs the upstart job
> into the /etc/init/ and I cannot customize that path, for instance to
> /etc/init/apps/ as I would like to have it. I tried to set the
> "--onlyscripts" option in order to hope that it does not generate any
> init script/job inside the package and I could just make a workaround
> by using postinst.
>
> Other option is to change the whole packaging to "dh" usage. However
> if I could just bypass the systemv init script and/or hard coded
> upstart job installation, it would be easier for me because I am not a
> packager. =)


Not quite sure what is the central issue of yours here.


CDBS is *not* a tool for beginners to do packaging blind-folded!

I believe (and hope) same is true for short-form dh.


CDBS use (long-form) debhelper tools. If you experience a sensible
use-case impossible or awkward to express using CDBS, then please do
contact us at the [CDBS mailinglist] or file a bugreport against it.

[CDBS mailinglist]:
http://lists.alioth.debian.org/mailman/listinfo/build-common-hackers


If you know what you are doing but believe there is an issue more
enerally with how Debian (and debhelper and CDBS) deals with upstart,
then please isolate the problematic long-form debhelper command instead
of convoluting in some more specific packaging style.

If you need help packaging in general, then perhaps debian-users or
debian-mentors are more appropriate than this list.


Kind regards,

- Jonas

--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136 Website: http://dr.jones.dk/

[x] quote me freely [ ] ask before reusing [ ] keep private
 
Old 05-24-2011, 05:11 PM
Steve Langasek
 
Default Packaging cups with cdbs

Hi Laszlo,

On Tue, May 24, 2011 at 07:08:22PM +0300, Laszlo Papp wrote:
> I have tried to use the debian/rules that you can see below. My
> concern is that I would like to make a test package (for maemo, but
> actually should also work for debian) in case of using upstart for
> init functionalities.
> The problem is that if I try to use a debian/cups.upstart file for
> that purpose, it seems to be hard coded. It installs the upstart job
> into the /etc/init/ and I cannot customize that path, for instance to
> /etc/init/apps/ as I would like to have it. I tried to set the
> "--onlyscripts" option in order to hope that it does not generate any
> init script/job inside the package and I could just make a workaround
> by using postinst.

It installs it to /etc/init because this is the upstream path for upstart
jobs. There is no dh_installinit implementation that knows about this
maemo-specific /etc/init/apps/ path.

You could patch dh_installinit to do this in a maemo context, or you could
pass DEB_DH_INSTALLINIT_ARGS=--name=nonexistent to force dh_installinit to
only look for debian/cups.nonexistent.upstart.

> Other option is to change the whole packaging to "dh" usage. However
> if I could just bypass the systemv init script and/or hard coded
> upstart job installation, it would be easier for me because I am not a
> packager. =)

With dh the solution is certainly more easily discoverable and less
convoluted; you can override dh_installinit with a simple rule:

override_dh_installinit:
$stuff_to_manually_install_to_etc_init_apps


--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org
 
Old 05-24-2011, 05:57 PM
Laszlo Papp
 
Default Packaging cups with cdbs

Hi Steve,

On Tue, May 24, 2011 at 8:11 PM, Steve Langasek <vorlon@debian.org> wrote:
> Hi Laszlo,
>
> On Tue, May 24, 2011 at 07:08:22PM +0300, Laszlo Papp wrote:
>> I have tried to use the debian/rules that you can see below. My
>> concern is that I would like to make a test package (for maemo, but
>> actually should also work for debian) in case of using upstart for
>> init functionalities.
>> The problem is that if I try to use a debian/cups.upstart file for
>> that purpose, it seems to be hard coded. It installs the upstart job
>> into the /etc/init/ and I cannot customize that path, for instance to
>> /etc/init/apps/ as I would like to have it. I tried to set the
>> "--onlyscripts" option in order to hope that it does not generate any
>> init script/job inside the package and I could just make a workaround
>> by using postinst.
>
> It installs it to /etc/init because this is the upstream path for upstart
> jobs. *There is no dh_installinit implementation that knows about this
> maemo-specific /etc/init/apps/ path.

It is actually not maemo specific feature, it is more like a general
customization. (which seems to be missing from the dh_installinit
implementation right now).

>From the man page of that:
-o, --onlyscripts
Only modify postinst/postrm/prerm scripts, do not actually
install any init script, default files, or upstart job. May be useful
if the init script or upstart job is shipped and/or installed by
upstream in a
way that doesn't make it easy to let dh_installinit find it.

If no upstart job file is installed in the target directory
when dh_installinit --onlyscripts is called, this program will assume
that an init script is being installed and not provide the
compatibility symlinks
or upstart dependencies.

I thought it should eliminate the installation and I could do it
"manually" from the postinst script.

> You could patch dh_installinit to do this in a maemo context, or you could
> pass DEB_DH_INSTALLINIT_ARGS=--name=nonexistent to force dh_installinit to
> only look for debian/cups.nonexistent.upstart.

I have also tried this option, but I still get the /etc/init.d/cups
file somehow. I am not sure what I am doing wrong.
I hoped either this option you mentioned, or the "-o" should help to
not install anything, not /etc/init.d/cups either. It might well be, I
have just made some dumb mistake and it should work however. Anyway,
it would be nice if the installation path could be customizable in
case of the cdbs usage.

If nothing works, I think it is time to start thinking of the
debhelper usage, but I do still hope I did something wrong or I missed
something.

Thank you for your answer !

Best Regards,
Laszlo Papp


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTinF=QDhE_vUSLOhZLoaR=m=Vt1MKw@mail.gmail.com ">http://lists.debian.org/BANLkTinF=QDhE_vUSLOhZLoaR=m=Vt1MKw@mail.gmail.com
 
Old 05-25-2011, 07:20 AM
Laszlo Papp
 
Default Packaging cups with cdbs

Hi,

> override_dh_installinit:
> * * * *$stuff_to_manually_install_to_etc_init_apps

I am just about to make it this way for now. One question here: can I
override only the file installation path, I am interested in, instead
of doing manually for all the 100(0)+ files manually that the package
is supposed to contain ?

Thank you in advance!

Best Regards,
Laszlo Papp


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: BANLkTinLrg-Ugm++++0AWJuvOzE0Y+3PCQ@mail.gmail.com">http://lists.debian.org/BANLkTinLrg-Ugm++++0AWJuvOzE0Y+3PCQ@mail.gmail.com
 

Thread Tools




All times are GMT. The time now is 08:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org