Re: packaging help

2024-05-05 Thread Wookey
On 2024-05-04 03:44 +, james smith wrote:
> I am trying to package ly[1] I got everything up to the rules part, I am
> stuck thinking on how to edit/make the makefile, if you have any tips or
> tools that can make this a easier process, I would be much grateful

Any editor will do - note that tabs are syntactically important in makefiles

A tool like debmake will make you a template/base rules files (as well
as sample/template/base all the other files), or you can copy-and-modify one 
from
almost any other package that isn't hopelessly out of date (debmake is a better 
approach).

These days most rules files look like:

#!/usr/bin/make -f

#DH_VERBOSE=1

%:
dh $@ 

with maybe a few instances of environement variables and override rules

# see ENVIRONMENT in dpkg-buildflags(1)
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic

or
override_dh_clean:
-mv Doxyfile.orig Doxyfile
-mv libsquish.pc.in.orig libsquish.pc.in
dh_clean

Does that help?

Wookey
-- 
Principal hats:  Debian, Wookware, ARM
http://wookware.org/


signature.asc
Description: PGP signature


Re: packaging help

2024-05-03 Thread Andrey Rakhmatullin
On Sat, May 04, 2024 at 03:44:45AM +, james smith wrote:
> I am trying to package ly[1] I got everything up to the rules part, I am
> stuck thinking on how to edit/make the makefile, if you have any tips or
> tools that can make this a easier process, I would be much grateful
You don't normally need to "edit/make the makefile". Do you have any
specific problems you need hep with?

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Re: Packaging help: users and directories

2022-01-03 Thread Gavin Henry
Got access to salsa.debian.org today! Woot!

Hopefully one of the VoIP packaging group will get back to me re below in
the next few weeks.

Thanks.


On Thu, 30 Dec 2021, 09:01 Gavin Henry,  wrote:

> Thanks all for the help and pointers everyone.
>
> I've managed to build SentryPeer (
> https://github.com/SentryPeer/SentryPeer/tree/debian-packaging/debian).
> I'm just going through debuild now to clean up lintian issues and pbuilder
> runs for missing depends.
>
> Suprisingly enjoyable and "dh" in the rules file does a ton of work for
> you!
>
> I've emailed the VoIP packaging group to see if I can help now that I know
> some more. I'd like to look after the libosip2 package too as SentryPeer
> requires it and it looks like it's not been updated in 6 years?
>
> https://salsa.debian.org/pkg-voip-team/libosip2/-/blob/master/ChangeLog
>
> Thanks again everyone.
>
> Gavin.
>


Re: Packaging help: users and directories

2021-12-30 Thread Gavin Henry
Thanks all for the help and pointers everyone.

I've managed to build SentryPeer (
https://github.com/SentryPeer/SentryPeer/tree/debian-packaging/debian). I'm
just going through debuild now to clean up lintian issues and pbuilder runs
for missing depends.

Suprisingly enjoyable and "dh" in the rules file does a ton of work for
you!

I've emailed the VoIP packaging group to see if I can help now that I know
some more. I'd like to look after the libosip2 package too as SentryPeer
requires it and it looks like it's not been updated in 6 years?

https://salsa.debian.org/pkg-voip-team/libosip2/-/blob/master/ChangeLog

Thanks again everyone.

Gavin.


Re: Packaging help: users and directories

2021-12-29 Thread Gavin Henry
> Dear Gavin Henry,

Hi Chris!

> I didn't follow your whole discussion, but if you have time I would highly 
> appreciate if you could put all this information together at a well-findable 
> place (maybe: extend https://wiki.debian.org/UpstreamGuide ?)
>
> Reason:
> I'm probably going to search for similar information in the near future =)
>
>
> Regards
> Chris
>
> PS: This is not meant as a demand. Rather a "hint" that the work will pay of 
> at least for one more person. ... I just figured it's very difficult to 
> transport "nice" in letters. Everything sounds so demanding :/

I've Cc'd the list, sorry if that wasn't correct.

What do you class as "all this information"? Starting from scratch?
I'm coming from a Fedora/RH world so I've always wanted to do a Debian
package and I am starting to see the flexibility of all the
multi-files vs the one spec file I have:

https://github.com/SentryPeer/SentryPeer/blob/main/packaging/rpm/sentrypeer.spec
https://bugzilla.redhat.com/show_bug.cgi?id=2026516 <- main way to get
a package listed for inclusion

I'm pretty much done with the Fedora spec file, but I now understand
about how the rules/control file can do all the requirements for you
(if using autoconf?).

My main issue was having zero knowledge of the main terms, so this
page was hard to approach:

https://wiki.debian.org/Packaging

but this was good (as well as doing the RPM spec first and seeing how
others have done their rules file):

https://www.debian.org/doc/manuals/maint-guide/index.en.html

I think the main issue is getting your head around "creating the first
set of files" and then picking how to build it all moving forward.

Thanks.

-- 
Kind Regards,

Gavin Henry.
https://sentrypeer.org



Re: Packaging help: users and directories

2021-12-29 Thread Gavin Henry
On Wed, 29 Dec 2021 at 13:51, Robin Gustafsson  wrote:
>
> On Wed, Dec 29, 2021 at 2:03 PM Gavin Henry  wrote:
> >>
> >> > Is it best practice to have:
> >> >
> >> > 1. debian folder in your main repo
> >> > 2. debian folder branch in main repo
> >> > 3. Separate repo for this
> >>
> >> A separate repo hosted on salsa.debian.org.
> >
> > Thanks. That's for an official package, or?
>
> Yes, that's assuming you're pursuing inclusion in Debian. Otherwise
> alternative 2, a separate branch in your existing repository.

That's my plan! :-)

-- 
Kind Regards,

Gavin Henry.
https://sentrypeer.org



Re: Packaging help: users and directories

2021-12-29 Thread Robin Gustafsson
On Wed, Dec 29, 2021 at 2:03 PM Gavin Henry  wrote:
>>
>> > Is it best practice to have:
>> >
>> > 1. debian folder in your main repo
>> > 2. debian folder branch in main repo
>> > 3. Separate repo for this
>>
>> A separate repo hosted on salsa.debian.org.
>
> Thanks. That's for an official package, or?

Yes, that's assuming you're pursuing inclusion in Debian. Otherwise
alternative 2, a separate branch in your existing repository.



Re: Packaging help: users and directories

2021-12-29 Thread Gavin Henry
>
> > Is it best practice to have:
> >
> > 1. debian folder in your main repo
> > 2. debian folder branch in main repo
> > 3. Separate repo for this
>
> A separate repo hosted on salsa.debian.org.
>

Thanks. That's for an official package, or?

>


Re: Packaging help: users and directories

2021-12-29 Thread Gavin Henry
>
> > #DEBHELPER#
> >
> One of the first google hits:
>
> https://manpages.debian.org/bullseye/debhelper/debhelper.7.en.html



Thanks. I see it now. With quotes "#DEBHELPER#" didn't show up, but:

Automatic generation of Debian install scripts

Some debhelper commands will automatically generate parts of Debian
maintainer scripts. If you want these automatically generated things
included in your existing Debian maintainer scripts, then you need to add
*#DEBHELPER#* to your scripts, in the place the code should be added.
*#DEBHELPER#* will be replaced by any auto-generated code when you run
*dh_installdeb*.


Re: Packaging help: users and directories

2021-12-29 Thread Robin Gustafsson
Hi Gavin,

On Wed, Dec 29, 2021 at 12:35 PM Gavin Henry  wrote:
> [...]
> Is it best practice to have:
>
> 1. debian folder in your main repo
> 2. debian folder branch in main repo
> 3. Separate repo for this

A separate repo hosted on salsa.debian.org.

On Wed, Dec 29, 2021 at 12:37 PM Gavin Henry  wrote:
>
> What's this for, when it looks like this was written manually? Google
> shows nothing:
>
> https://salsa.debian.org/dns-team/bind9/-/blob/debian/main/debian/bind9.postinst#L35
>
> #DEBHELPER#

The debhelper man page explains it. [1]

[1] 
https://manpages.debian.org/unstable/debhelper/debhelper.7.en.html#Automatic_generation_of_Debian_install_scripts



Re: Packaging help: users and directories

2021-12-29 Thread Hilmar Preuße

Am 29.12.2021 um 12:36 teilte Gavin Henry mit:

Hi,


What's this for, when it looks like this was written manually? Google
shows nothing:

https://salsa.debian.org/dns-team/bind9/-/blob/debian/main/debian/bind9.postinst#L35

#DEBHELPER#


One of the first google hits:

https://manpages.debian.org/bullseye/debhelper/debhelper.7.en.html

Hilmar
--
sigfault



OpenPGP_signature
Description: OpenPGP digital signature


Re: Packaging help: users and directories

2021-12-29 Thread Gavin Henry
What's this for, when it looks like this was written manually? Google
shows nothing:

https://salsa.debian.org/dns-team/bind9/-/blob/debian/main/debian/bind9.postinst#L35

#DEBHELPER#

Thanks.



Re: Packaging help: users and directories

2021-12-29 Thread Gavin Henry
This is exactly what I wanted to see :-)

https://salsa.debian.org/dns-team/bind9/-/blob/debian/main/debian/bind9.postinst

Is it best practice to have:

1. debian folder in your main repo
2. debian folder branch in main repo
3. Separate repo for this

Thanks.



Re: Packaging help: users and directories

2021-12-29 Thread Gavin Henry
Hello Gavin,
>
> Le 2021-12-28 à 19 h 14, Gavin Henry a écrit :
> > I was given this advice from Arthur, a Debian developer, but I can't
> > find some of the finer details I'm looking for:
> >
>
> In addition to the developer reference and the other documentation, you
> can get some inspiration from packages with a postinst script ,where
> users and services are created, such as dnsmasq [1] or bind9 [2].
>
> To create sqlite3 databases, you will need dbconfig-comon [3].
>
> /Nicolas
>
> [1] https://salsa.debian.org/debian/dnsmasq/-/tree/master/debian
> [2] https://salsa.debian.org/dns-team/bind9/-/tree/debian/main/debian
> [3] https://www.debian.org/doc/manuals/dbconfig-common/ch-develguide.html



Hi Nicolas,

We meet again! :)

Thanks! I want to do this first one, then I'm going to use your project.
Just so I know how it all works.

SentryPeer will create the dB, just need /var/lib/sentrypeer directory
created with the right user ownership etc.

Gavin.


Re: Packaging help: users and directories

2021-12-28 Thread Nicolas Mora

Hello Gavin,

Le 2021-12-28 à 19 h 14, Gavin Henry a écrit :
I was given this advice from Arthur, a Debian developer, but I can't 
find some of the finer details I'm looking for:




In addition to the developer reference and the other documentation, you 
can get some inspiration from packages with a postinst script ,where 
users and services are created, such as dnsmasq [1] or bind9 [2].


To create sqlite3 databases, you will need dbconfig-comon [3].

/Nicolas

[1] https://salsa.debian.org/debian/dnsmasq/-/tree/master/debian
[2] https://salsa.debian.org/dns-team/bind9/-/tree/debian/main/debian
[3] https://www.debian.org/doc/manuals/dbconfig-common/ch-develguide.html



Re: Packaging help: users and directories

2021-12-28 Thread Gavin Henry
I was given this advice from Arthur, a Debian developer, but I can't find
some of the finer details I'm looking for:

---
I recommend looking at https://wiki.debian.org/UpstreamGuide to some
pointers about how to make it easy to ensure your software can be
easily packaged in Debian.

If you're looking to create a deb package that is ready to be included
in Debian it is best to have your debian/ directory on a separate
branch. I recommend using git-buildpackage, see
https://wiki.debian.org/PackagingWithGit (this is what most
collaboratively maintained packages use now).

For information on how to create Debian packages see
https://www.debian.org/doc/manuals/developers-reference/ (particularly
chapters 5 and 6). If you want to look at more of the background there
is the policy document, see https://www.debian.org/doc/debian-policy/

There are a lot of tools for efficiently building Debian packages. If
you want to test your builds in a more controlled environment you
should probably use pbuilder (of cowbuilder) because those use a clean
chroot to build your packages to ensure you have the correct
dependencies specified.

Hope this helps
--

Thanks


Re: packaging help

2012-05-03 Thread Whit Armstrong
This is going really well.  Thanks to all those who have shared advice.

How does one go about choosing ports for an application?

Obviously there are well known ports, but is there any doc in debian
that shows what ports have been 'reserved' by other applications?

Thanks,
Whit



On Tue, Apr 24, 2012 at 12:15 PM, Gergely Nagy alger...@balabit.hu wrote:
 Whit Armstrong armstrong.w...@gmail.com writes:

 I assume it has a main process, which when stopped, would result in the
 workers being killed too. If that is so, I do not think you need to
 store the pids of the workers anywhere.

 Perhaps I'm confusing terminology here.  The main deamon does not
 spawn the workers.  It and the workers are started by the init.d
 script.  The workers and the main daemon should be started and stopped
 together.

 In that case, it seems like I should store the pid's... so I can kill
 them upon stop.

 Have I understood correctly?

 Correct.

 As a suggestion, I'd store the pidfiles under /run/your-program-name/,
 under names like worker:0.pid, and main.pid or somesuch.

 start-stop-daemon can be of great help here, but unfortunately, I don't
 recall any package off the top of my head that would serve as a good
 example, even though I know I've met one or two.. :(

 --
 |8]


 --
 To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/87aa21umvh.fsf@algernon.balabit



--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAMi=pg43=Qrd0HfZoYLD8yTo_ZELVhqX2+-hTroLx5=o9r_...@mail.gmail.com



Re: packaging help

2012-05-03 Thread Matt Zagrabelny
Check /etc/services.

-mz

On Thu, May 3, 2012 at 3:22 PM, Whit Armstrong armstrong.w...@gmail.com wrote:
 This is going really well.  Thanks to all those who have shared advice.

 How does one go about choosing ports for an application?

 Obviously there are well known ports, but is there any doc in debian
 that shows what ports have been 'reserved' by other applications?

 Thanks,
 Whit



 On Tue, Apr 24, 2012 at 12:15 PM, Gergely Nagy alger...@balabit.hu wrote:
 Whit Armstrong armstrong.w...@gmail.com writes:

 I assume it has a main process, which when stopped, would result in the
 workers being killed too. If that is so, I do not think you need to
 store the pids of the workers anywhere.

 Perhaps I'm confusing terminology here.  The main deamon does not
 spawn the workers.  It and the workers are started by the init.d
 script.  The workers and the main daemon should be started and stopped
 together.

 In that case, it seems like I should store the pid's... so I can kill
 them upon stop.

 Have I understood correctly?

 Correct.

 As a suggestion, I'd store the pidfiles under /run/your-program-name/,
 under names like worker:0.pid, and main.pid or somesuch.

 start-stop-daemon can be of great help here, but unfortunately, I don't
 recall any package off the top of my head that would serve as a good
 example, even though I know I've met one or two.. :(

 --
 |8]


 --
 To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/87aa21umvh.fsf@algernon.balabit



 --
 To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: 
 http://lists.debian.org/camipg43qrd0hfzoyld8yto_zelvhqx2+-htrolx5o9r_...@mail.gmail.com



--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caolfk3vsh1ma96jkebnbwesra2ft3lyzymfxswqbhlw2h6w...@mail.gmail.com



Re: packaging help

2012-05-03 Thread Steven Ayre
Port numbers are reserved by IANA.
http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml

You can see a partial list of some of the most popular ones in
/etc/services, but it's rather incomplete compared to the source.

-Steve



On 3 May 2012 21:22, Whit Armstrong armstrong.w...@gmail.com wrote:
 This is going really well.  Thanks to all those who have shared advice.

 How does one go about choosing ports for an application?

 Obviously there are well known ports, but is there any doc in debian
 that shows what ports have been 'reserved' by other applications?

 Thanks,
 Whit



 On Tue, Apr 24, 2012 at 12:15 PM, Gergely Nagy alger...@balabit.hu wrote:
 Whit Armstrong armstrong.w...@gmail.com writes:

 I assume it has a main process, which when stopped, would result in the
 workers being killed too. If that is so, I do not think you need to
 store the pids of the workers anywhere.

 Perhaps I'm confusing terminology here.  The main deamon does not
 spawn the workers.  It and the workers are started by the init.d
 script.  The workers and the main daemon should be started and stopped
 together.

 In that case, it seems like I should store the pid's... so I can kill
 them upon stop.

 Have I understood correctly?

 Correct.

 As a suggestion, I'd store the pidfiles under /run/your-program-name/,
 under names like worker:0.pid, and main.pid or somesuch.

 start-stop-daemon can be of great help here, but unfortunately, I don't
 recall any package off the top of my head that would serve as a good
 example, even though I know I've met one or two.. :(

 --
 |8]


 --
 To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/87aa21umvh.fsf@algernon.balabit



 --
 To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: 
 http://lists.debian.org/camipg43qrd0hfzoyld8yto_zelvhqx2+-htrolx5o9r_...@mail.gmail.com



--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/cafiqyukk0n4y+erumxpacrtzm9d-gttmohty7bxhukfgkuc...@mail.gmail.com



Re: packaging help

2012-04-24 Thread Daniel Pocock

 I've read the package tutorials several times, but I'm having trouble
 finding out how to create a new user during the install (I don't want
 the daemon to run as root).
 
 Can someone point me in the right direction?

Two suggestions:

a) think about what type of user you want:

http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.2

b) look inside an existing package (e.g. reSIProcate, see debian/control
and debian/repro.postinst)


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f969fb9.7080...@pocock.com.au



Re: packaging help

2012-04-24 Thread Whit Armstrong
Thanks, Daniel.

I would be looking for 6-64999, assuming my package eventually
made it into debian, I suppose it would need to have a 'globally
allocated' uid.  The idea is simply not to give users executing an R
script on the machine root access.

Regarding, reSIProcate, it's cdbs based?  Would the postinst script be
the same format if I use dh?  Based on Lucas Nussbaum's tutorial
(http://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf)
I thought that dh would be the way to go for new packages.

-Whit


On Tue, Apr 24, 2012 at 8:42 AM, Daniel Pocock dan...@pocock.com.au wrote:

 I've read the package tutorials several times, but I'm having trouble
 finding out how to create a new user during the install (I don't want
 the daemon to run as root).

 Can someone point me in the right direction?

 Two suggestions:

 a) think about what type of user you want:

 http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.2

 b) look inside an existing package (e.g. reSIProcate, see debian/control
 and debian/repro.postinst)


 --
 To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/4f969fb9.7080...@pocock.com.au



-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAMi=pg4rj5t4zulc_e0fpcfzoqkwt7xlicrqvbqfxfji_+v...@mail.gmail.com



Re: packaging help

2012-04-24 Thread Gergely Nagy
Whit Armstrong armstrong.w...@gmail.com writes:

 Thanks, Daniel.

 I would be looking for 6-64999, assuming my package eventually
 made it into debian, I suppose it would need to have a 'globally
 allocated' uid.  The idea is simply not to give users executing an R
 script on the machine root access.

Why do you think you'd need a statically allocated id? Why wouldn't a
dynamic one work?

-- 
|8]


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87sjftuunw.fsf@algernon.balabit



Re: packaging help

2012-04-24 Thread Ansgar Burchardt
On 04/24/2012 03:16 PM, Whit Armstrong wrote:
 I would be looking for 6-64999, assuming my package eventually
 made it into debian, I suppose it would need to have a 'globally
 allocated' uid.  The idea is simply not to give users executing an R
 script on the machine root access.

You shouldn't need a statically allocated user id for this; just
creating a (system) user with adduser should be fine.  (The 100-999
range in policy 9.2.2.)

 Regarding, reSIProcate, it's cdbs based?  Would the postinst script be
 the same format if I use dh?  Based on Lucas Nussbaum's tutorial
 (http://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf)
 I thought that dh would be the way to go for new packages.

Maintainer scripts shouldn't differ (they are more or less just copied
into the binary packages[1]).

dh should be the most popular for new packages, but in the end it's a
matter of preferences.  I believe it might also be easier to find a
sponsor for packages using dh as more people are familiar with it than
with cdbs.

Regards,
Ansgar

[1] With a few modifications: debhelper (and cdbs as it uses debhelper)
might add some lines to them by replacing a special marker with
shell code (#DEBHELPER#).


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4f96ad1d.2050...@43-1.org



Re: packaging help

2012-04-24 Thread George Danchev
On Tue, 24 Apr 2012 15:39:41 +0200, Ansgar Burchardt ans...@43-1.org 
wrote:

On 04/24/2012 03:16 PM, Whit Armstrong wrote:

I would be looking for 6-64999, assuming my package eventually
made it into debian, I suppose it would need to have a 'globally
allocated' uid.  The idea is simply not to give users executing an R
script on the machine root access.


You shouldn't need a statically allocated user id for this; just
creating a (system) user with adduser should be fine.  (The 100-999
range in policy 9.2.2.)

Regarding, reSIProcate, it's cdbs based?  Would the postinst script 
be

the same format if I use dh?  Based on Lucas Nussbaum's tutorial

(http://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf)
I thought that dh would be the way to go for new packages.


Maintainer scripts shouldn't differ (they are more or less just 
copied

into the binary packages[1]).

dh should be the most popular for new packages, but in the end it's a
matter of preferences.  I believe it might also be easier to find a
sponsor for packages using dh as more people are familiar with it 
than

with cdbs.

Regards,
Ansgar

[1] With a few modifications: debhelper (and cdbs as it uses 
debhelper)

might add some lines to them by replacing a special marker with
shell code (#DEBHELPER#).



Agreed, and just to add few more bits to the above:

As a good reference of adding and removing system users have a look at
the vsftpd package, that is, its portinst and postrm scripts. However,
the project's general agreement is that system users, once added, 
should

not be removed [1] by packaging means, so you will only need to worry
about the addition part.

[1[ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621833


--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/7c5c04e5e99e1d8aef38840f2d1bb...@spnet.net



Re: packaging help

2012-04-24 Thread Matt Zagrabelny
On Tue, Apr 24, 2012 at 8:16 AM, Whit Armstrong
armstrong.w...@gmail.com wrote:
 Thanks, Daniel.

 I would be looking for 6-64999, assuming my package eventually
 made it into debian, I suppose it would need to have a 'globally
 allocated' uid.  The idea is simply not to give users executing an R
 script on the machine root access.

 Regarding, reSIProcate, it's cdbs based?  Would the postinst script be
 the same format if I use dh?  Based on Lucas Nussbaum's tutorial
 (http://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf)
 I thought that dh would be the way to go for new packages.

I've used the postinst script from the puppet package for creating a
user. Here is my version of it:

---{start}---
#!/bin/sh

set -e

if [ $1 = configure ]; then

  # Create the mailregx user
  if ! getent passwd mailregx  /dev/null; then
adduser --quiet --system --group --home /var/run/milter-regex  \
  --no-create-home \
  --gecos milter-regex daemon user \
  mailregx
  fi

  # Create the mailregx group, if it is missing, and set the
  # primary group of the mailregx user to this group.
  if ! getent group mailregx  /dev/null; then
  addgroup --quiet --system mailregx
  usermod -g mailregx mailregx
  fi
fi

#DEBHELPER#
---{end}---

The #DEBHELPER# chunk is a callback or an include. It allows dh to
insert code into the script.

After my package is built, the postinst looks like:

---{start}---
#!/bin/sh

set -e

if [ $1 = configure ]; then

  # Create the mailregx user
  if ! getent passwd mailregx  /dev/null; then
adduser --quiet --system --group --home /var/run/milter-regex  \
  --no-create-home \
  --gecos milter-regex daemon user \
  mailregx
  fi

  # Create the mailregx group, if it is missing, and set the
  # primary group of the mailregx user to this group.
  if ! getent group mailregx  /dev/null; then
  addgroup --quiet --system mailregx
  usermod -g mailregx mailregx
  fi
fi

# Automatically added by dh_installinit
if [ -x /etc/init.d/milter-regex ]; then
update-rc.d milter-regex defaults /dev/null
invoke-rc.d milter-regex start || exit $?
fi
# End automatically added section
---{end}---

You can see the things that dh can put into the various post/pre
scripts in /usr/share/debhelper/autoscripts.

HTH,

-mz


--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caolfk3u_atyqp7wztfw3yjv28bx-q4udzwfjk1mo-9htj5o...@mail.gmail.com



Re: packaging help

2012-04-24 Thread Whit Armstrong
Matt, Ansgar, and Gergely,

Thanks for the tips.

Can you also help with some advice on the init.d script?

The init.d script for deathstar launches a daemon which listens for
jobs, and one worker per core.

Can I use the same pid file for all of those processes?

-Whit


On Tue, Apr 24, 2012 at 9:46 AM, Matt Zagrabelny mzagr...@d.umn.edu wrote:
 On Tue, Apr 24, 2012 at 8:16 AM, Whit Armstrong
 armstrong.w...@gmail.com wrote:
 Thanks, Daniel.

 I would be looking for 6-64999, assuming my package eventually
 made it into debian, I suppose it would need to have a 'globally
 allocated' uid.  The idea is simply not to give users executing an R
 script on the machine root access.

 Regarding, reSIProcate, it's cdbs based?  Would the postinst script be
 the same format if I use dh?  Based on Lucas Nussbaum's tutorial
 (http://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf)
 I thought that dh would be the way to go for new packages.

 I've used the postinst script from the puppet package for creating a
 user. Here is my version of it:

 ---{start}---
 #!/bin/sh

 set -e

 if [ $1 = configure ]; then

  # Create the mailregx user
  if ! getent passwd mailregx  /dev/null; then
    adduser --quiet --system --group --home /var/run/milter-regex  \
      --no-create-home                                 \
      --gecos milter-regex daemon user \
      mailregx
  fi

  # Create the mailregx group, if it is missing, and set the
  # primary group of the mailregx user to this group.
  if ! getent group mailregx  /dev/null; then
      addgroup --quiet --system mailregx
      usermod -g mailregx mailregx
  fi
 fi

 #DEBHELPER#
 ---{end}---

 The #DEBHELPER# chunk is a callback or an include. It allows dh to
 insert code into the script.

 After my package is built, the postinst looks like:

 ---{start}---
 #!/bin/sh

 set -e

 if [ $1 = configure ]; then

  # Create the mailregx user
  if ! getent passwd mailregx  /dev/null; then
    adduser --quiet --system --group --home /var/run/milter-regex  \
      --no-create-home                                 \
      --gecos milter-regex daemon user \
      mailregx
  fi

  # Create the mailregx group, if it is missing, and set the
  # primary group of the mailregx user to this group.
  if ! getent group mailregx  /dev/null; then
      addgroup --quiet --system mailregx
      usermod -g mailregx mailregx
  fi
 fi

 # Automatically added by dh_installinit
 if [ -x /etc/init.d/milter-regex ]; then
        update-rc.d milter-regex defaults /dev/null
        invoke-rc.d milter-regex start || exit $?
 fi
 # End automatically added section
 ---{end}---

 You can see the things that dh can put into the various post/pre
 scripts in /usr/share/debhelper/autoscripts.

 HTH,

 -mz


--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAMi=pg5meoix4rasoyvjpu9g0owht31q1np+tg4ey41tib9...@mail.gmail.com



Re: packaging help

2012-04-24 Thread Matt Zagrabelny
On Tue, Apr 24, 2012 at 9:20 AM, Whit Armstrong
armstrong.w...@gmail.com wrote:
 Matt, Ansgar, and Gergely,

 Thanks for the tips.

 Can you also help with some advice on the init.d script?

Perhaps.

 The init.d script for deathstar launches a daemon which listens for
 jobs, and one worker per core.

This sounds a little like an apache that forks worker processes.
Perhaps check apache's init script for ideas.

 Can I use the same pid file for all of those processes?

Most Debian init scripts use start-stop-daemon (s-s-d) for controlling
the daemon. How s-s-d interacts with the daemon depends greatly on how
the daemon is written. Start with /etc/init.d/skeleton and tweak as
needed.

-mz


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/caolfk3xczkn7mypjjxc815rvq1-xmr6m1qae-pdgebhp2t_...@mail.gmail.com



Re: packaging help

2012-04-24 Thread Gergely Nagy
Whit Armstrong armstrong.w...@gmail.com writes:

 Matt, Ansgar, and Gergely,

 Thanks for the tips.

 Can you also help with some advice on the init.d script?

 The init.d script for deathstar launches a daemon which listens for
 jobs, and one worker per core.

 Can I use the same pid file for all of those processes?

I assume it has a main process, which when stopped, would result in the
workers being killed too. If that is so, I do not think you need to
store the pids of the workers anywhere.

-- 
|8]


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87k415ur40.fsf@algernon.balabit



Re: packaging help

2012-04-24 Thread Whit Armstrong
 I assume it has a main process, which when stopped, would result in the
 workers being killed too. If that is so, I do not think you need to
 store the pids of the workers anywhere.

Perhaps I'm confusing terminology here.  The main deamon does not
spawn the workers.  It and the workers are started by the init.d
script.  The workers and the main daemon should be started and stopped
together.

In that case, it seems like I should store the pid's... so I can kill
them upon stop.

Have I understood correctly?

-Whit


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAMi=pg6WaUT1Fi6YVk2gontQSPp2-5qOTHpwcbaL=b6yebp...@mail.gmail.com



Re: packaging help

2012-04-24 Thread Gergely Nagy
Whit Armstrong armstrong.w...@gmail.com writes:

 I assume it has a main process, which when stopped, would result in the
 workers being killed too. If that is so, I do not think you need to
 store the pids of the workers anywhere.

 Perhaps I'm confusing terminology here.  The main deamon does not
 spawn the workers.  It and the workers are started by the init.d
 script.  The workers and the main daemon should be started and stopped
 together.

 In that case, it seems like I should store the pid's... so I can kill
 them upon stop.

 Have I understood correctly?

Correct.

As a suggestion, I'd store the pidfiles under /run/your-program-name/,
under names like worker:0.pid, and main.pid or somesuch.

start-stop-daemon can be of great help here, but unfortunately, I don't
recall any package off the top of my head that would serve as a good
example, even though I know I've met one or two.. :(

-- 
|8]


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87aa21umvh.fsf@algernon.balabit



Re: packaging help

2010-09-02 Thread Robert James Clay


On Aug 31, 2010, at 11:45 AM, alma...@comcast.net wrote:

I am working with this tutorial to understand better the debian  
packaging process:


http://www.debian-administration.org/article/337/ 
Rolling_your_own_Debian_packages_part_2


One thing I noticed about that page;  the note there regarding  
the -n option to dh_make, (i.e. that is packaged by the original  
author), seems to me to be at best misleading...Wonder how much  
trouble that has caused people?




Jame


--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1ba0598f-fa8b-4f15-aaec-c52e84893...@rocasa.us



Re: Re: packaging help

2010-09-02 Thread Gobelli, Marcelo
Maybe you can point me to a *reliable* tutorial for debian packaging. I
picked that one because I wanted to play with packaging. 

 

Thanks.



Re: packaging help

2010-09-02 Thread The Fungi
On Thu, Sep 02, 2010 at 09:07:26AM -0700, Gobelli, Marcelo wrote:
 Maybe you can point me to a *reliable* tutorial for debian
 packaging.
[...]

The Debian New Maintainer's Guide is the most recommended:

http://www.debian.org/doc/maint-guide/

The debian-mentors FAQ also has some useful things to say on the
topic:

http://people.debian.org/~mpalmer/debian-mentors_FAQ.html#packaging

-- 
{ IRL(Jeremy_Stanley); PGP(97AE496FC02DEC9FC353B2E748F9961143495829);
SMTP(fu...@yuggoth.org); IRC(fu...@irc.yuggoth.org#ccl); ICQ(114362511);
AIM(dreadazathoth); YAHOO(crawlingchaoslabs); FINGER(fu...@yuggoth.org);
MUD(kin...@katarsis.mudpy.org:6669); WWW(http://fungi.yuggoth.org/); }


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100902163433.gm2...@yuggoth.org



re: packaging help

2010-08-31 Thread almagro

I am working with this tutorial to understand better the debian packaging 
process: 

http://www.debian-administration.org/article/337/Rolling_your_own_Debian_packages_part_2
 

it all goes well until I try to build the package from source. 
I am getting errors regarding SVN and APR (I think they are libraries) needed. 
I checked with Synaptic Manager and I see the libraries are installed. Do I 
have to make them available to the application? 

thanks for the help 


Re: packaging help

2010-08-31 Thread Matthew Palmer
On Tue, Aug 31, 2010 at 03:45:28PM +, alma...@comcast.net wrote:
 I am working with this tutorial to understand better the debian packaging 
 process: 
 
 http://www.debian-administration.org/article/337/Rolling_your_own_Debian_packages_part_2
  
 
 it all goes well until I try to build the package from source. I am
 getting errors regarding SVN and APR (I think they are libraries) needed.
 I checked with Synaptic Manager and I see the libraries are installed.

Normally, you'd be best off including the errors that you're seeing, as well
as the exact names of the packages you see installed, but my spidey sense is
telling me that you've installed the runtime library (eg libapr1), but not
the development library (eg libapr1-dev).  It is the latter that you need if
you want to build against a library, not (just) the former.

- Matt


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100831201657.gf...@hezmatt.org



Re: Packaging Help

2010-05-17 Thread Jonathan Wiltshire
On Sun, May 16, 2010 at 03:16:13PM +0200, James Stuckey wrote:
  So I'm not able to have debian-multimedia in my sources when I use
  pbuilder?

You *can* have it in, but you can't *only* have it in. You still need the
normal archives available because debian-multimedia does not include all
packages.

Additionally, if you plan to build for sid, you *shouldn't* have other
archives listed in pbuilder. Packages for sid should not need external
sources or packages to build or run.

-- 
Jonathan Wiltshire

1024D: 0xDB800B52 / 4216 F01F DCA9 21AC F3D3  A903 CA6B EA3E DB80 0B52
4096R: 0xD3524C51 / 0A55 B7C5 1223 3942 86EC  74C3 5394 479D D352 4C51


signature.asc
Description: Digital signature


Re: Packaging Help

2010-05-17 Thread James Stuckey
/etc/pbuilder/pbuilderrc contained:
# this is your configuration file for pbuilder.
# the file in /usr/share/pbuilder/pbuilderrc is the default template.
# /etc/pbuilderrc is the one meant for overwritting defaults in
# the default template
#
# read pbuilderrc.5 document for notes on specific options.
MIRRORSITE=ftp://ftp.debian-multimedia.org

I took out the last line and that fixed it. pbuilder create returns
without error. Is it not possible for me to run pbuilder with a DMM line in
my sources? I also use this machine for personal use and for that I need
some of the stuff that's in DMM. The machine by the way is squeeze with some
stuff from sid -- is that okay?

I should probably say something about what all I've do so far to this since
I'm sure I've missed or done something incorrectly.

I got the source, and untarred it. Then I made a directory like
packagename-1.0. Then I went into that directory and ran dh_make -f
../pathtotar. That made me a debian/ folder. I then ran pbuilder create
and now I've run pdebuild in the packagename-1.0 directory and I'm
getting this:
*beginning*
CMake Error at CMakeLists.txt:4 (add_subdirectory):
  add_subdirectory given source ../OALWrapper which is not an existing
  directory.


CMake Error at CMakeLists.txt:5 (add_subdirectory):
  add_subdirectory given source ../HPL1Engine which is not an existing
  directory.


-- Configuring incomplete, errors occurred!
dh_auto_configure: cmake .. -DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_VERBOSE_MAKEFILE=ON returned exit code 1
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
E: Failed autobuilding of package
I: unmounting dev/pts filesystem
I: unmounting proc filesystem
I: cleaning the build env
I: removing directory /var/cache/pbuilder/build//17926 and its
subdirectories
*ending*

Thanks,
James


Re: Packaging Help

2010-05-16 Thread James Stuckey
On Sun, May 16, 2010 at 3:34 AM, Paul Wise p...@debian.org wrote:

 On Sun, May 16, 2010 at 5:39 AM, James Stuckey jhstuc...@gmail.com
 wrote:

  I'm interested in learning more about development/packaging on Debian.
 I've
  downloaded some  source to package, ran dh_make on it, and now I'm trying
 to
  use pbuilder to create a package from it.
 ...
  I: Checking component main on ftp://ftp.debian-multimedia.org...
  E: Couldn't find these debs: apt
  E: debootstrap failed
 ...

 Looks like you chose the wrong ftp site. Try ftp.debian.org instead.

 --
 bye,
 pabs

 http://wiki.debian.org/PaulWise



So I'm not able to have debian-multimedia in my sources when I use pbuilder?


Re: Packaging Help

2010-05-16 Thread James Stuckey
On Sun, May 16, 2010 at 3:13 PM, James Stuckey jhstuc...@gmail.com wrote:



 On Sun, May 16, 2010 at 3:34 AM, Paul Wise p...@debian.org wrote:

 On Sun, May 16, 2010 at 5:39 AM, James Stuckey jhstuc...@gmail.com
 wrote:

  I'm interested in learning more about development/packaging on Debian.
 I've
  downloaded some  source to package, ran dh_make on it, and now I'm
 trying to
  use pbuilder to create a package from it.
 ...
  I: Checking component main on ftp://ftp.debian-multimedia.org...
  E: Couldn't find these debs: apt
  E: debootstrap failed
 ...

 Looks like you chose the wrong ftp site. Try ftp.debian.org instead.

 --
 bye,
 pabs

 http://wiki.debian.org/PaulWise



 So I'm not able to have debian-multimedia in my sources when I use
 pbuilder?



I commented out the dmm line from my sources, and then deleted it, and I'm
still getting the same error from pbuilder.


Re: Packaging Help

2010-05-16 Thread Osamu Aoki
On Sun, May 16, 2010 at 03:16:13PM +0200, James Stuckey wrote:
  So I'm not able to have debian-multimedia in my sources when I use
  pbuilder?

You can have it. 

 I commented out the dmm line from my sources, and then deleted it, and I'm
 still getting the same error from pbuilder.

Have you checked /etc/pbuilderrc contents created when pbuilder was
installed by you answering debconf question.

Osamu


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100516133634.ga19...@osamu.debian.net



Re: Packaging Help

2010-05-15 Thread Paul Wise
On Sun, May 16, 2010 at 5:39 AM, James Stuckey jhstuc...@gmail.com wrote:

 I'm interested in learning more about development/packaging on Debian. I've
 downloaded some  source to package, ran dh_make on it, and now I'm trying to
 use pbuilder to create a package from it.
...
 I: Checking component main on ftp://ftp.debian-multimedia.org...
 E: Couldn't find these debs: apt
 E: debootstrap failed
...

Looks like you chose the wrong ftp site. Try ftp.debian.org instead.

-- 
bye,
pabs

http://wiki.debian.org/PaulWise


--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktikjpfe_fsswfdnp5sof8lr-zgx9c-vp66-9h...@mail.gmail.com



Re: Packaging Help

2010-05-15 Thread Osamu Aoki
On Sat, May 15, 2010 at 11:39:53PM +0200, James Stuckey wrote:
 Hello,
 
 I'm interested in learning more about development/packaging on Debian. I've
 downloaded some  source to package, ran dh_make on it, and now I'm trying to
 use pbuilder to create a package from it.
 
 When I run pbuilder create I get the following error:
 I: Distribution is sid.
 I: Building the build environment
 I: running debootstrap
 /usr/sbin/debootstrap
 I: Retrieving Release
 I: Retrieving Packages
 I: Validating Packages
 I: Resolving dependencies of required packages...
 I: Resolving dependencies of base packages...
 I: Checking component main on ftp://ftp.debian-multimedia.org...

??? This should be Debian site.  

 E: Couldn't find these debs: apt
 E: debootstrap failed
 W: Aborting with an error
 I: cleaning the build env
 I: removing directory /var/cache/pbuilder/build//14503 and its
 subdirectories
 
 Any guidance would be appreciated.
 
 Thanks,
 James


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100516012546.ga9...@osamu.debian.net