Re: Creating symlinks to manpages
On Mon, Feb 11, 2013 at 04:29:21PM +0400, Игорь Пашев wrote: 2013/2/11 Kartik Mistry kartik.mis...@gmail.com: On Mon, Feb 11, 2013 at 4:48 PM, Игорь Пашев pashev.i...@gmail.com wrote: Is there any handy way to link manpages? That is I could just write `bar` is described in `foo`. I know about .so, but looks urgly because debhelper finally replaces it with symlink :-) dh_link will do. For example: dh_link usr/share/man/man1/ayttm.1.gz usr/share/man/man1/ayttm_streamer_wrapper.1.gz Yeah, that's what I do, but my problem is that I have to know final file name, e. i. take care of section and compression. You don't need to take care of compression. dh_compress is conventionally run after dh_link, and it knows how to fix up symlinks; so, in the above example, this is enough: dh_link usr/share/man/man1/ayttm.1 usr/share/man/man1/ayttm_streamer_wrapper.1 -- Colin Watson [cjwat...@debian.org] -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130212175325.gb...@riva.dynamic.greenend.org.uk
Re: Creating symlinks to manpages
On Mon, Feb 11, 2013 at 01:58:10PM +0100, Arno Töll wrote: On 11.02.2013 13:46, Игорь Пашев wrote: I have foo.1 in d/xxx.manpages, and only want to have bar.1 - foo.1, no matter where foo.1 get its location or how it is compressed. You should not use symlinks, but source pages such tasks [1]. Please don't. They're less efficient because man-db has to open the file to figure out the target; over a large number of pages this makes a difference. Install a manpage like: bar.1: .so man1/foo.1 [1] http://www.tldp.org/HOWTO/Man-Page/q4.html This reasoning makes no sense for the Debian system, because /usr/share/man will always be on a filesystem that supports symbolic links. Just use them. -- Colin Watson [cjwat...@debian.org] -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130212175517.gc...@riva.dynamic.greenend.org.uk
Re: Creating symlinks to manpages
On Mon, Feb 11, 2013 at 03:18:20PM +0400, Игорь Пашев wrote: The thing I concern it that I need to know exact file name for link target. If I write foo.1m in d/XXX.manpages, it results in foo.1M.gz (with capital M) in a package. There is, as far as I can see, no code in dh_installman that forces the section to upper-case. I think you have misidentified the cause. You can use the DH_VERBOSE=1 environment variable to see exactly what debhelper is doing. In general I do not think that needing to know this kind of thing for the link target is a problem. We've already established that you do not need to concern yourself with compression provided that you run dh_link before dh_compress, and sections rarely change so it's easy to just write them into your .manpages file. Is there any handy way to link manpages? That is I could just write `bar` is described in `foo`. I know about .so, but looks urgly because debhelper finally replaces it with symlink :-) Any file format for this needs to involve explicitly stating the section, because it's perfectly valid and possible for the same manual page name to exist in multiple sections even in the same package (for example, the po4a package ships both po4a(1) and po4a(7)). The current dh_link format seems fine to me for this. If having to maintain it bothers you, you can always encourage upstream to install the proper symlinks in whatever their equivalent of 'make install' is. -- Colin Watson [cjwat...@debian.org] -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130212180307.gd...@riva.dynamic.greenend.org.uk
Re: Creating symlinks to manpages
On Mon, Feb 11, 2013 at 05:19:11PM +0400, Sergei Golovan wrote: No, it doesn't. The original problem was that it's hard to create symlink if you don't know the manpage section (dh_installman takes section from the header inside manpages and doesn't use the filename). IMO it's rational to patch manual pages to lower-case the section in such cases, and forward that patch upstream so you don't need to continue maintaining it. You'd have to do the same thing if they specified an entirely wrong section number, which does happen sometimes. -- Colin Watson [cjwat...@debian.org] -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130212181003.ge...@riva.dynamic.greenend.org.uk
Re: Creating symlinks to manpages
2013/2/12 Colin Watson cjwat...@debian.org: There is, as far as I can see, no code in dh_installman that forces the section to upper-case. I guess this is due to .TH -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/call-q8xndjw-m3sekemaxzdrnd1jcco16jjt1yi2x0fstmo...@mail.gmail.com
Re: Creating symlinks to manpages
2013/2/12 Colin Watson cjwat...@debian.org: IMO it's rational to patch manual pages to lower-case the section in such cases, and forward that patch upstream so you don't need to continue maintaining it. You'd have to do the same thing if they specified an entirely wrong section number, which does happen sometimes. I like this idea. But not in this life :-D [1] [1] https://github.com/illumos/illumos-gate/tree/master/usr/src/man -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/call-q8zow6wg+hk-co3ekldqwh5phw+a6-b2lm7ves-srle...@mail.gmail.com
Re: Creating symlinks to manpages
On Mon, Feb 11, 2013 at 4:48 PM, Игорь Пашев pashev.i...@gmail.com wrote: Is there any handy way to link manpages? That is I could just write `bar` is described in `foo`. I know about .so, but looks urgly because debhelper finally replaces it with symlink :-) dh_link will do. For example: dh_link usr/share/man/man1/ayttm.1.gz usr/share/man/man1/ayttm_streamer_wrapper.1.gz -- Kartik Mistry | IRC: kart_ {0x1f1f, kartikm}.wordpress.com -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/capdygexy9muw95u29exwct4ptqt3wonssfxrjpbf8wsat_+...@mail.gmail.com
Re: Creating symlinks to manpages
* Игорь Пашев pashev.i...@gmail.com, 2013-02-11, 15:18: The thing I concern it that I need to know exact file name for link target. Why is that a problem? If I write foo.1m in d/XXX.manpages, it results in foo.1M.gz (with capital M) in a package. If dh_installman seems to install a man page into the wrong section or with the wrong extension, this is because the man page has the wrong section listed in its .TH or .Dt line. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130211122722.ga9...@jwilk.net
Re: Creating symlinks to manpages
2013/2/11 Kartik Mistry kartik.mis...@gmail.com: On Mon, Feb 11, 2013 at 4:48 PM, Игорь Пашев pashev.i...@gmail.com wrote: Is there any handy way to link manpages? That is I could just write `bar` is described in `foo`. I know about .so, but looks urgly because debhelper finally replaces it with symlink :-) dh_link will do. For example: dh_link usr/share/man/man1/ayttm.1.gz usr/share/man/man1/ayttm_streamer_wrapper.1.gz Yeah, that's what I do, but my problem is that I have to know final file name, e. i. take care of section and compression. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CALL-Q8zL5ueO3EbN04YH_yMG5wo9gmeXLA3c0HP=jzOLD7=k...@mail.gmail.com
Re: Creating symlinks to manpages
2013/2/11 Jakub Wilk jw...@debian.org: The thing I concern it that I need to know exact file name for link target. Why is that a problem? Because final file name is out of my control :-) It is controlled by dh_installman and dh_compress I have foo.1 in d/xxx.manpages, and only want to have bar.1 - foo.1, no matter where foo.1 get its location or how it is compressed. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/call-q8yembw_fe6z540ch_na+-mhjbdsjwtnv6tt_0d5ofu...@mail.gmail.com
Re: Creating symlinks to manpages
Hi, On 11.02.2013 13:46, Игорь Пашев wrote: I have foo.1 in d/xxx.manpages, and only want to have bar.1 - foo.1, no matter where foo.1 get its location or how it is compressed. You should not use symlinks, but source pages such tasks [1]. Install a manpage like: bar.1: .so man1/foo.1 [1] http://www.tldp.org/HOWTO/Man-Page/q4.html -- with kind regards, Arno Töll IRC: daemonkeeper on Freenode/OFTC GnuPG Key-ID: 0x9D80F36D signature.asc Description: OpenPGP digital signature
Re: Creating symlinks to manpages
Does it make sense? 1. Extend d/xxx.manpages to form: bar.1 foo.1 2. dh_installman will create symlink bar.1 - foo.1 3. dh_compress will take care of symlinks, e. i.: a) compress foo.1 to foo.1.gz (or whatever) b) rm bar.1 c) create symlink bar.1.gz - foo.1.gz I remember such a thing in Slackware :-) -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CALL-Q8w7bcjpgL9TQRrc1oGpcsZ2E3mQSTjvPMwweB==KU=c...@mail.gmail.com
Re: Creating symlinks to manpages
And http://www.debian.org/doc/debian-policy/ch-docs.html -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CALL-Q8x707OpshOhd6LzAf3ow_NT5dxz-UmK0YN_CiwR=j1...@mail.gmail.com
Re: Creating symlinks to manpages
2013/2/11 Игорь Пашев pashev.i...@gmail.com: a) compress foo.1 to foo.1.gz (or whatever) b) rm bar.1 c) create symlink bar.1.gz - foo.1.gz hm.. dh_compress does it already. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/call-q8zp9hmtbbyac60_kog6kg8aukz+fsn5ostqwnmo_vt...@mail.gmail.com
Re: Creating symlinks to manpages
2013/2/11 Arno Töll a...@debian.org: Hi, On 11.02.2013 13:46, Игорь Пашев wrote: I have foo.1 in d/xxx.manpages, and only want to have bar.1 - foo.1, no matter where foo.1 get its location or how it is compressed. You should not use symlinks, but source pages such tasks [1]. Install a manpage like: bar.1: .so man1/foo.1 If you look at dh_installman, you will see that it replaces such dummy pages with symlinks. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/call-q8wz5m8hs+ymcrmpszakv7kjhghaqqbxmqr2smso1gi...@mail.gmail.com
Re: Creating symlinks to manpages
Hi, On 11.02.2013 14:00, Игорь Пашев wrote: If you look at dh_installman, you will see that it replaces such dummy pages with symlinks. Which solves your problem, doesn't it? And no, I don't think that's ugly - it's a pragmatic workaround. -- with kind regards, Arno Töll IRC: daemonkeeper on Freenode/OFTC GnuPG Key-ID: 0x9D80F36D signature.asc Description: OpenPGP digital signature
Re: Creating symlinks to manpages
Hi! On Mon, Feb 11, 2013 at 5:14 PM, Arno Töll a...@debian.org wrote: Hi, On 11.02.2013 14:00, Игорь Пашев wrote: If you look at dh_installman, you will see that it replaces such dummy pages with symlinks. Which solves your problem, doesn't it? And no, I don't think that's ugly - it's a pragmatic workaround. No, it doesn't. The original problem was that it's hard to create symlink if you don't know the manpage section (dh_installman takes section from the header inside manpages and doesn't use the filename). To create the 'source' manpage (.so file.section) one has to know the section. It's the same problem. Cheers! -- Sergei Golovan -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/caoq2pxgrwnyrgaq_9zng5fnot2njr021ovu2o7kigzxpmwd...@mail.gmail.com
Re: Creating symlinks to manpages
* Игорь Пашев pashev.i...@gmail.com, 2013-02-11, 16:46: The thing I concern it that I need to know exact file name for link target. Why is that a problem? Because final file name is out of my control :-) It is controlled by dh_installman and dh_compress Both of them behave in a predictable, documented way. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130211134933.ga3...@jwilk.net