Skip to content

Various linux packaging fixes - #128

Closed
c42f wants to merge 5 commits into
AcademySoftwareFoundation:masterfrom
c42f:cjf-packaging-fix2
Closed

Various linux packaging fixes#128
c42f wants to merge 5 commits into
AcademySoftwareFoundation:masterfrom
c42f:cjf-packaging-fix2

Conversation

@c42f

@c42f c42f commented Jul 25, 2011

Copy link
Copy Markdown
Contributor

In response to Richard Shaw's query on the mailing list, here's various changes to the build system to make linux packaging easier.

I've rebased these on top of a more recent development branch and squashed incidental fixes together for cleanliness.

See commit messages for details. There's still some issues with the external pugixml stuff, but it would be good to get this into the trunk anyway because it should be overall pretty safe and I don't want it to get stale again. (I already had to resolve two conflicts in rebasing this.)

c42f added 5 commits July 26, 2011 08:26
The API has tended to change between minor version numbers, so SOVERSION
(which is intended to be the API version, according to cmake) should
accept versions in the form x.y rather than only a single number as
previously supported.  This patch sets SOVERSION automatically to the
form MAJOR.MINOR, and updates the versioning namespace to have the
corresponding name vMAJOR_MINOR.  The user can still set SOVERSION to
whatever they like manually.  In addition, OIIO_MAJOR_VERSION is no
longer set to SOVERSION if they don't match.
Generate manual pages using a combination of a simple python script to
munge the output of "$tool --help", combined with the txt2man program.
This is done only on unix-like systems when the necessary tools are
found.
Clean up some things to allow greater flexibility in specifying the install
directory structure.  The following new user-visible cmake path variables are
defined:

BIN_INSTALL_DIR     - replaces BINDIR, renamed for clarity
LIB_INSTALL_DIR     - replaces LIBDIR
PYLIB_INSTALL_DIR   - replaces PYLIBDIR
INCLUDE_INSTALL_DIR - new
DOC_INSTALL_DIR     - new
MAN_INSTALL_DIR     - new

In addition, there is an INSTALL_DOCS option for the benefit of linux packagers
relying on the packaging system to do the docs install.

Finally, there is a variable SELF_CONTAINED_INSTALL_TREE to specify whether the
user will be installing into standard unix system directories, or into a
special self-contained oiio directory.  It is false by default, but is
explicitly set in the Makefile, so anybody doing makefile builds should see
very few changes.  Windows builds are always set up as "self-contained".

Also clean up the docs install to avoid installing a few developer-centric
things which will normally be obtained directly from git.
Various changes to allow the use of an external shared library version
of pugixml rather than the version bundled with OIIO.  This is required
to abide by Fedora (and possibly other linux distros') packaging rules
regarding bundled version of external libraries.
In order to generate the manual page documentation, the command line
utilities need to be run from the build tree, which means disabling
CMAKE_SKIP_RPATH.  CMAKE_INSTALL_RPATH is now unset if CMAKE_SKIP_RPATH
is true however, which gives an install tree free of rpaths as desired
for linux packaging.
@lgritz

lgritz commented Jul 25, 2011

Copy link
Copy Markdown
Collaborator

LGTM -- that is to say, I don't understand it, but I trust that you guys have worked out out. I tested it locally, and it doesn't break either my OSX or Linux builds, so I'm fine with you merging it into the development master. If there are problems later, we can always patch it.

@lgritz

lgritz commented Jul 25, 2011

Copy link
Copy Markdown
Collaborator

I can't remember now, do you have commit privileges? Or would you like me to merge it for you?
Do you think it should be squashed down to a single commit, or is the current set of 5 broken into a good logical sequence?

@c42f

c42f commented Jul 26, 2011

Copy link
Copy Markdown
Contributor Author

Cheers Larry, obviously I'll help patch it if it breaks things for some people. If anyone else was going to test/comment I assume they'd have done so in the last 20 days, so I think it's time to get this stuff in the trunk and we can go from there.

I've already squashed what I consider to be the redundant commits, I think these are good to go in as-is.

Regarding commit privileges: I'm happy to push it to the master repo if that's easier for you. I currently don't have commit privileges as far as I'm aware so you'll have to add me.

@lgritz

lgritz commented Jul 26, 2011

Copy link
Copy Markdown
Collaborator

OK, you have commit privileges now. Fire at will.

We tend to prefer doing a 'git rebase master' , 'git checkout master' , 'git reset newstuff --hard' (I think I have that sequence right) in order to make a nice linear history, versus doing a 'merge', if you know what I mean.

@c42f

c42f commented Jul 26, 2011

Copy link
Copy Markdown
Contributor Author

Righto, I've pushed this to the development branch now. Here's the way I'd do this with the rebase workflow ("upstream" is the offical OIIO repo since "origin" is my public fork):

git fetch upstream
git checkout feature-branch
git rebase upstream/master
git push upstream HEAD:master # <-- equivalent to "git push upstream feature-branch:master" since we're on the feature branch

It's more or less the same, but it means you don't need a local upstream_master branch, and the push command is a little clearer than a reset, I feel.

@c42f c42f closed this Jul 26, 2011
@lgritz

lgritz commented Jul 26, 2011

Copy link
Copy Markdown
Collaborator

Yes, good plan, that's a little tighter than what I was doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants