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