Bug 682 - Allow specifying exampledir in ./configure (or change the default)
Allow specifying exampledir in ./configure (or change the default)
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Configure
1.8.12
PC Linux
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-10 09:31 MST by Evangelos Foutras
Modified: 2015-04-07 11:18 MDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evangelos Foutras 2015-02-10 09:31:42 MST
sudo 1.8.12 installs sample conf files to /usr/share/examples/sudo/ but I feel those would be better placed under /usr/share/doc/sudo/examples/.

Would it be possible to adjust this, or perhaps add a configure switch to able to specify an alternate example dir?

I'm packaging sudo for Arch; we don't have any particular policies regarding placement of example files. Debian, however, has such a policy and the new path suggested above would satisfy it as well:

https://www.debian.org/doc/debian-policy/ch-docs.html#s12.6
Comment 1 Todd C. Miller 2015-02-10 09:34:34 MST
Sure, I can make that configurable.  I don't mind changing the default to be under the doc/sudo directory either.
Comment 2 Evangelos Foutras 2015-02-10 09:46:18 MST
I'd suggest just sticking them under $(docdir)/examples and not making it configurable (though I might be missing a use case for it being configurable).

Thanks for the quick reply!
Comment 3 Todd C. Miller 2015-02-10 09:50:56 MST
Committed: http://www.sudo.ws/repos/sudo/rev/494d9a0484b6
Comment 4 Evangelos Foutras 2015-02-10 09:59:52 MST
(In reply to Todd C Miller from comment #3)
> Committed: http://www.sudo.ws/repos/sudo/rev/494d9a0484b6

Patch works, thanks!
Comment 5 Todd C. Miller 2015-03-21 19:17:07 MDT
Fixed in sudo 1.8.13, available now.
Comment 6 Renato Botelho 2015-03-23 08:34:22 MDT
It would be nice if it's configurable, same as infodir or docdir, on configure script. On FreeBSD port I needed to patch it to install examples on expected place.
Comment 7 Renato Botelho 2015-03-23 08:35:51 MDT
(In reply to Evangelos Foutras from comment #2)
> I'd suggest just sticking them under $(docdir)/examples and not
> making it configurable (though I might be missing a use case for it
> being configurable).
> 
> Thanks for the quick reply!

Other operating systems don't follow same guidelines. On FreeBSD it is supposed to be installed under /usr/local/share/examples/sudo.
Comment 8 Todd C. Miller 2015-04-07 10:52:56 MDT
http://www.sudo.ws/repos/sudo/rev/4c1271298712

Make exampledir configurable and default to DATAROOTDIR/examples/sudo on BSD systems.
Comment 9 Renato Botelho 2015-04-07 11:18:08 MDT
(In reply to Todd C Miller from comment #8)
> http://www.sudo.ws/repos/sudo/rev/4c1271298712
> 
> Make exampledir configurable and default to
> DATAROOTDIR/examples/sudo on BSD systems.

Thank you!