[02:52] <c2tarun> What is the difference between a .cc file and .cc.rej file?
[02:54] <james_w> the latter was probably created by the patch command because that patch that was being applied didn't apply cleanly
[02:56] <c2tarun> james_w: In case if a patch fails rejects are saved in .cc.rej file. If the patch is already applied we should remove the patch. but what to do with .rej file? should we remove them too?
[02:56] <james_w> well, if you manually applied the failed parts then you can delete it
[02:56] <james_w> if not then you likely need to deal with the conflicts, otherwise things may not work
[02:57] <c2tarun> james_w: I checked in the source files, the patches are already applied, that's why it failed. So I should delete both the rej files and that particular patch?
[02:57] <james_w> I guess so
[02:58] <c2tarun> james_w: ok thanks :)
[03:43] <achiang> hm, i'm playing around with an upstream python program that would be nice to get into debian/ubuntu. they provide their own packaging, which is great. i made a test upload into a PPA, where it FTBFS because it is trying to install files into /usr/local/lib/python2.6, which is disallowed.
[03:44] <achiang> i've grepped through the source for just the string 'local' to see what might be making that happen, but that didn't turn up anything interesting
[03:44] <james_w> achiang, --install-layout=deb to "setup.py install" will fix that IIRC
[03:44] <achiang> any other clues?
[03:44] <achiang> james_w: ah, interesting, i will try that
[03:47] <achiang> james_w: you are a genius, thank you. i'll buy you a beer in budapest. :)
[03:47] <james_w> heh
[03:48] <achiang> james_w: where can you discover that information? googling for --install-layout=deb doesn't turn up much interesting
[03:49] <achiang> james_w: ah, a few more variations turned up -- http://wiki.debian.org/Python/Packaging
[03:53] <james_w> achiang, I just remember from the transition we did to dist-packages a couple of cycles ago. I don't know where you would have read it unfortunately
[03:53] <james_w> had upstream chosen a different approach to packaging then it would have been taken care of by the tools though
[03:54]  * achiang inherits some institutional knowledge
[05:50] <lifeless> whats the current best tool to use for a simple python package which needs to be buildable on lucid up
[05:57] <james_w> lifeless, tool in what sense?
[05:57] <james_w> or rather tool to do what?
[05:57] <lifeless> python-central, python-support, dh_python2, ...
[06:01] <kklimonda> no dh_python2 for lucid until someone decides to bacport it :)
[06:02] <kklimonda> lifeless: I'd go with python-support myself
[07:51] <MTecknology> any change anyone could explain this file to me? http://bazaar.launchpad.net/~ubuntu-server-edgers/apache2/apache2-packaging.trunk/view/head:/debian/apache2.2-common.lintian-overrides
[07:51] <lifeless> it looks like a url
[07:52] <MTecknology> package_name.lintian-overrides I get; the first two columns I get; but what is the stuff after that in the file
[07:52] <MTecknology> apache2.2-common: setuid-binary usr/lib/apache2/suexec 4754 root/www-data
[07:52] <MTecknology> package_name: lintain_tag ?? ?? ??
[07:52] <lifeless> I think it masks specific instances
[07:53] <MTecknology> oh.. saying; I know it happens in this exact case; but if it happens anywhere else, I still want you to yell at me?
[07:53] <lifeless> I think os
[07:53] <lifeless> *so*
[07:53] <MTecknology> is there any way to have a lintian-overrides file for everything?
[07:54] <MTecknology> so you can just have the one file for all packages
[07:54] <tsimpson> you just have a lintian-overrides file, instead of <package>.lintian-overrides
[07:54] <tsimpson> the same way you do for the install, dirs, manpages, etc files
[07:55] <MTecknology> makes a lot of sense :)
[07:55] <tsimpson> though it's generally considered bad practice to do that
[07:55] <MTecknology> I wish you could add a comment in there say why you added that override
[07:57] <tsimpson> usually you'll put that stuff in the changelog
[07:57] <tsimpson> if it's not obvious
[07:57] <MTecknology> oh
[08:02] <MTecknology> So.. if you have nginx-common; nginx-full; nginx-light; nginx-extras; and nginx; should there be a changelog file for each, even if it's the exact same changelog?
[08:02] <lifeless> one changelog
[08:03] <lifeless> Have you tried a # to add a comment to the overrides file?
[08:03] <MTecknology> i didn't; i just didn't see in the man page where it was possible and don't actually have an override file
[08:04] <tsimpson> you'll probably need a line for each package anyway, the lintian warnings are per-deb iirc
[08:05] <MTecknology> how do you handle that with dh_installchangelog if you only want one; just  'dh_installchangelogs -i -k CHANGES --package=nginx-common' and an overrides file for every package that isn't getting one?
[19:46] <Raydiation> am i right here asking for help for building deb packages?
[19:47] <Raydiation> i got this postinst script http://paste.pocoo.org/show/332732/ but install hangs at restarting apache
[19:49] <jmarsden> Raydiation: Try asking in #ubuntu-packaging also
[19:50] <Raydiation> ty
[19:53] <Raydiation> this is my first time that i made a deb package, so id be glad if you could give me some advice too on my scripts https://github.com/Raydiation/Laudio/tree/master/debian/DEBIAN
[19:56] <Bachstelze> Raydiation: for a first package, maybe you should try something that doesn't require maintainer scripts
[19:57] <Raydiation> Bachstelze: maintainer scripts?
[19:58] <Raydiation> i just want to provide an easy to install deb package for my app
[19:59] <Bachstelze> Raydiation: postint et al.
[20:00] <Raydiation> Bachstelze: well, is there an easiere way to do this? i know which cmds i need to install my software, unfortunately its no C program with makefile but a django webapplication which runs on apache
[20:00] <dapal> Raydiation: also, never EVER use DEBIAN/. Run dh_make on your source package, and create a proper debian/ directory.
[20:01] <Raydiation> dapal: i need a makfile + autotools for that right?
[20:01] <dapal> Raydiation: no.
[20:01] <dapal> Raydiation: read about dh7, and override_dh_auto_build
[20:04] <Raydiation> what can i do to remove the package from the packagemanager without executing postrm?
[20:04] <Raydiation> the current one doesnt install/uninstall properly
[20:05] <dapal> Raydiation: remove /var/lib/dpkg/info/yourpackage.postrm, then do an apt-get --purge remove yourpackage
[20:06] <Raydiation> dapal: ty!
[20:33] <Raydiation> do i have to create a makefile anyway?
[20:34] <Raydiation> i have 5 simple commands for installing
[20:40] <Bachstelze> Raydiation: how does your package install files if you don't have a Makefile?
[20:47] <Raydiation> Bachstelze: its a django web project
[20:47] <Raydiation> i just know where to extract it and what to run to get it working on any other pc
[20:47] <Bachstelze> right
[20:47] <Bachstelze> it has to install files somewhere
[20:48] <Raydiation> Bachstelze: so i need to write everything into a makefile?
[20:48] <Bachstelze> no
[20:48] <Bachstelze> but I'm trying to figure out how your package works
[20:49] <Raydiation> i need to copy a file to /etc/apache2/conf.d/
[20:49] <Raydiation> the rest is copied to /opt/laudio
[20:49] <Raydiation> then some rights adjustment and apache restart
[20:49] <Raydiation> ah yeah and a cmd to generate the sqlite db
[20:49] <Raydiation> thats all
[20:50] <dapal> Raydiation: /opt/ violates FHS.
[20:50] <dapal> or, at least, Debian policy :)
[20:50] <Raydiation> dapal: yes, i know, but for ease of use i set it to this dir
[20:50] <dapal> Raydiation: read about dh_install, and debian/install (or debian/<package>.install)
[20:51] <dapal> Raydiation: sure, but that way your package won't *ever* be accepted in Debian (can't tell about Ubuntu though)
[20:51] <dapal> Raydiation: but if it's for private use, then it's fine.
[20:51] <Raydiation> dapal: private use first :) ill think about an appropriate directory once i got a prototype
[21:11] <Raydiation> dapal: do you have a good resource for the dh_install?
[21:11] <Raydiation> other than the manpage
[21:11] <dapal> Raydiation: the manpage is sufficient, I believe :)
[21:12] <Raydiation> dapal: do i have to write that into the rules file?
[21:12] <Raydiation> i took a look at the 2 vids for packaging on youtube
[21:12] <dapal> Raydiation: the manpage says "debian/package.install"
[21:12] <dapal> so, debian/laudio.install (if the package is named "laudio")
[21:13] <Raydiation> dapal: ah, i must have overread this
[21:13] <dapal> Raydiation: and dh_install is one of the automatically-called commands if you use dh7
[21:13] <dapal> so no need to add anything to debian/rules
[21:17] <Raydiation> dapal: what about restarting apache? can i simply write /etc/init./apache2 restart into that file?
[21:17] <dapal> Raydiation: don't restart apache, that should be up to the user
[21:17] <dapal> anyways, no. The correct thing would be
[21:17] <dapal> ...
[21:17] <dapal> (wait a sec)
[21:18] <Raydiation> dapal: without restarting the app doesnt run (because of the additional config file for apache it has to read in)
[21:18] <Bachstelze> Raydiation: the point is that the user should restart apache when they wnt to
[21:18] <dapal> exactly Bachstelze
[21:18] <dapal> anyways, the right code would be
[21:18] <dapal> if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
[21:18] <dapal>     invoke-rc.d apache2 force-reload || exit $?
[21:18] <dapal> else
[21:18] <dapal>     /etc/init.d/dbus force-reload || exit $?
[21:18] <dapal> fi
[21:18] <Bachstelze> what if they have Important Stuff™ going on?
[21:19] <dapal> in the "configure" section of postinst
[21:19] <dapal> but I'd highly discourage it
[21:19] <Bachstelze> and anyway
[21:19] <Bachstelze> wouldn't a reload be sufficient ?
[21:19] <Raydiation> what would you do?
[21:20] <dapal> Raydiation: maybe drop the file in /etc/apache2/sites-available/, and that's it
[21:20] <Raydiation> Bachstelze: i dunno, i have to install mod_wsgi
[21:20] <dapal> and a note in README.Debian
[21:20] <dapal> btw, going to bed
[21:20] <dapal> g'night people
[21:26] <Raydiation> Bachstelze: do you know dh_install? if i want to move the laudio dir to /opt and the laudio_apache.conf to /etc/apache2/conf.d/ is this correct for laudio.install?
[21:26] <Raydiation> http://paste.pocoo.org/show/332787/
[21:28] <Bachstelze> Raydiation: could be, have you tried it ?
[21:30] <Bachstelze> you will probzbly need a .dirs file too
[21:31] <Bachstelze> for dh_installdirs, it will create the directories in debian/tmp
[21:31] <Bachstelze> and dh_install will install the files afterwards
[21:32] <Raydiation> Bachstelze: hm, wont moving the files be enough? i guess /opt/ is everywhere and after the apache install /etc/apache2/conf.d/ also exists
[21:33] <Bachstelze> when you create the packages
[21:34] <Bachstelze> the files are installed relative to debian/tmp
[21:34] <Bachstelze> and debian/tmp/opt and debian/tmp/etc/apache2/conf.d do not exist
[21:34] <Raydiation> ah, so just create those tmp dirs
[21:34] <Bachstelze> yes
[21:35] <Raydiation> so i just create laudio.dirs and add those 2 lines with the relative paths?
[21:36] <Raydiation> opt/
[21:36] <Raydiation> etc/apache2/conf.d
[21:36] <Bachstelze> yes
[21:36] <Raydiation> ty
[21:37] <Raydiation> imo its really hard to find information about what to do when youre not installing anything that installs via makefile
[21:38] <Raydiation> the thing is id rather not make a makefile since i need to copy the apache config file to the apache directory which is often named differently in each distro
[21:39] <Raydiation> in arch linux its etc/httpd/
[21:45] <Bachstelze> you can very well create the makefile in a patch you will put in deban/patches
[21:45] <Bachstelze> but for copying two files, I think it would be overkill
[21:46] <Raydiation> yes
[21:48] <Raydiation> Bachstelze: hm i just read this in the wiki: Many packages wrongly use dh_installdirs and .dirs files to create directories. 99% of those cases are not necessary, since dh_install and .install files will automatically take care of creating directories. You only need to use dh_installdirs if your package needs to ship empty nonstandard directories, e. g. /etc/mypackage/plugins.d/.
[21:49] <Raydiation> so i guess i dont need a dir file
[21:51] <Bachstelze> what?
[21:52] <Raydiation> Bachstelze: https://wiki.ubuntu.com/PackagingGuide/Basic#Abusing%20.dirs%20files
[21:52] <Bachstelze> whenever I want to install a file in a direcroy without creating it first, it gives me "no such file or directory"
[21:55] <Raydiation> hm, im leaving it in, cant go wrong
[21:56] <Raydiation> will configure in the postint file always be called after installing?
[21:56] <Bachstelze> no idea, I've never worked on packages with postints
[21:56] <Raydiation> thats what i got http://paste.pocoo.org/show/332798/
[21:57] <Raydiation> and thats the prerm http://paste.pocoo.org/show/332799/
[21:59] <Bachstelze> as I said, I can't help you with those at all
[22:10] <Raydiation> Bachstelze: is there a way to properly test my package?
[22:11] <jmarsden> Raydiation: lintian and perhaps piuparts ?
[22:13] <Raydiation> ty
[22:13] <Raydiation> btw, why does it generate an amd64 deb?
[22:14] <Raydiation> ive specified archicture any in the control file
[22:14] <Raydiation> its a python program and thus it runs everywhere
[22:15] <Raydiation> do i need all as architecture?
[22:15] <jmarsden> Raydiation: What did you put for Architecture?  All, or Any?
[22:16] <jmarsden> They do different things.
[22:16] <Raydiation> jmarsden: ah ok, i put in any, i thought it would make it for all archs
[22:16] <Raydiation> in this case i have to use all i guess
[22:17] <Raydiation> is there something like make clean? which deletes all build packages + folders?
[22:17] <Raydiation> dh_clean maybe?
[22:17] <jmarsden> Raydiation: Read Debian Policy: http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Architecture
[22:18] <Raydiation> jmarsden: ty
[22:18] <jmarsden> And for clean, do you mean make -f debian/rules clean ?  The clean target in the rules file?
[22:18] <Raydiation> jmarsden: just the files which get created after debuild
[22:18] <jmarsden> Raydiation: Ah, no I don't think there is a clean target for that.
[22:19] <Raydiation> btw do i need the source dir?
[22:19] <jmarsden> Well, you need it to build the package :)
[22:20] <Raydiation> jmarsden: i only have python files
[22:22] <jmarsden> Raydiation: I'm no expert on Python packaging... have you read http://www.debian.org/doc/packaging-manuals/python-policy/index.html
[22:31] <ScottK> Raydiation: If you use Python disutils to build a normal Python package any of the Python pacakging helpers mentioned in the Python policy will do a very good job of putting files in the right places.  There is also stdeb for semi-automatic Debian package creation from a Python package.
[22:50] <Raydiation> do i need to specify my own deinstallation mechanism?
[22:50] <Raydiation> because if i uninstall my package the /opt/laudio directory doesnt get erased
[22:51] <Raydiation> is that because ive deleted one file already which has also been installed?
[22:52] <Raydiation> i got 3 files which may be created in the directory: a sqlite db, a smylink and a log file
[22:52] <Raydiation> in prerm i check for those and remove them if i find them
[23:00] <jmarsden> Raydiation: does dpkg -S /opt/laudio    show your package name?
[23:15] <Raydiation> jmarsden: yes
[23:16] <jmarsden> Then as far as I know, it should also remove it when you uninstall the package.
[23:17] <jmarsden> Do you see any relevant warning or error messages when you do  apt-get remove PACKAGENAME ?
[23:18] <Raydiation> jmarsden: no
[23:19] <Raydiation> i cant remove it a second time also
[23:19] <Raydiation> in dpkg/info is only laudio.list now
[23:20] <Raydiation> jmarsden: if you wanna take a look at the build files: https://github.com/Raydiation/Laudio/tree/master/debian
[23:25] <Raydiation> do i even have to care about files which are created in my install path?
[23:25] <Raydiation> i mean do i need https://github.com/Raydiation/Laudio/blob/master/debian/prerm
[23:32] <jmarsden> Raydiation: If you do nothing with them they will be left there and so the removal of the /opt/laudio directory would fail, I think.  Would it not make more sense to put the database and logs under /var somewhere, more in line with FHS standards?
[23:35] <Raydiation> jmarsden: youre right
[23:35] <Raydiation> hm i didnt use the prerm script now and nothing got deleted
[23:38] <Raydiation> aah, maybe pyc files
[23:38] <Raydiation> jmarsden: do i have to remove all pyc files too?
[23:38] <Raydiation> pyc = python bytecode
[23:38] <Raydiation> gets generated when the program is executed
[23:39] <jmarsden> If they were installed automatically based on your debian/laudio.install file then no, otherwise yes.
[23:39] <Raydiation> theyre not installed
[23:39] <Raydiation> :/ this is kinda stupid
[23:39] <jmarsden> Then if you want them deleted, you need to do it yourself somewhere.
[23:40] <jmarsden> Why?  The packaging system won't delete a directory it installed when you the user have put stuff in there it knows nothing about!
[23:40] <jmarsden> That would be a really bad idea, it might be deleting your tax returns or something :)
[23:41] <Raydiation> jmarsden: yeah, but .pyc files usually dont have any sense
[23:42] <jmarsden> The packaging system has no way to automatically know that.  There may some Python specific packaging helper than deals with this.
[23:42] <Raydiation> im gonna use something like find . -name "*.pyc" -exec rm '{}' ';'
[23:43] <Raydiation> quicker :)
[23:43] <jmarsden> Did you use one of the Python packaging helpers that scott k mentioned ?  It doesn't look like it... so you may be "reinventing the wheel" here.
[23:43] <Raydiation> jmarsden: i took a look at distutils, but its not really what i want
[23:43] <Raydiation> distutils are more for distributing python modules
[23:46] <Raydiation> btw im really gratefull for your help
[23:46] <Raydiation> tried getting help
[23:47] <Raydiation> in #debian already but no success
[23:50] <Raydiation> jmarsden: works now :)
[23:50] <Raydiation> but the apache config file now doesnt get deleted
[23:50] <Raydiation> do i have to stop apache to rm it?
[23:51] <jmarsden> No, if the package installed it the package should uninstall it too.
[23:51] <Raydiation> dpgk -S laudio now only spits out this file
[23:51] <jmarsden> And sudo apt-get purge laudio does not remove it?
[23:52] <Raydiation> jmarsden: it did
[23:52] <Raydiation> ty!
[23:52] <Raydiation> :D
[23:52] <jmarsden> So it is working :)  You're welcome.
[23:52] <Raydiation> ty this channel is great