Bug 14912 - Xorg build scripts
Summary: Xorg build scripts
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Build/Modular (show other bugs)
Version: git
Hardware: Other All
: low enhancement
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-09 03:55 UTC by Paulo César Pereira de Andrade
Modified: 2013-09-25 18:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
xorg-scripts.txt (3.48 KB, text/plain)
2008-03-09 03:55 UTC, Paulo César Pereira de Andrade
no flags Details
xorg-build.pl (72.07 KB, text/plain)
2008-03-09 03:57 UTC, Paulo César Pereira de Andrade
no flags Details
xorg-deps.pl (3.64 KB, text/plain)
2008-03-09 03:59 UTC, Paulo César Pereira de Andrade
no flags Details
xorg-symbols.pl (12.84 KB, text/plain)
2008-03-09 04:01 UTC, Paulo César Pereira de Andrade
no flags Details
xorg-trace.pl (5.61 KB, text/plain)
2008-03-09 04:03 UTC, Paulo César Pereira de Andrade
no flags Details
xorg-build.pl (71.11 KB, text/plain)
2008-03-12 19:12 UTC, Paulo César Pereira de Andrade
no flags Details
xorg-scripts.tar.bz2 (16.27 KB, application/x-bzip)
2008-04-03 10:57 UTC, Paulo César Pereira de Andrade
no flags Details
xorg-scripts.tar.bz2 (16.38 KB, application/x-bzip)
2008-04-13 01:37 UTC, Paulo César Pereira de Andrade
no flags Details
xorg-scripts.tar.bz2 (13.30 KB, application/octet-stream)
2009-01-09 12:54 UTC, Paulo César Pereira de Andrade
no flags Details
xorg build and test scripts (18.20 KB, application/x-bzip)
2009-02-07 10:35 UTC, Paulo César Pereira de Andrade
no flags Details

Description Paulo César Pereira de Andrade 2008-03-09 03:55:39 UTC
Created attachment 14970 [details]
xorg-scripts.txt

Not really a bug report, but using this to attach
some build scripts that may be useful.

  The script xorg-build.pl only works for git-master,
but should not be too hard to update to build for
specific versions. The major problem is the lack of
tags for several components  (I proposed to post such
tags some time ago at xorg@, but got no response...),
and several tags in a non standard format, but this
can easily be fixed by using the 'commit' field, but
it would be better to just use the 'version' field
and checkout $name-$verson tag, or something like
$name-$version-branch. In other words, an option to
build from the latest stable/released version.

  The file xorg-scripts.txt should describe better
what each script does.
Comment 1 Paulo César Pereira de Andrade 2008-03-09 03:57:33 UTC
Created attachment 14971 [details]
xorg-build.pl

This script can be used to update repository mirrors,
checkout from local mirror, check if upstream tarballs
are available, and of course, compile/install X org.
Comment 2 Paulo César Pereira de Andrade 2008-03-09 03:59:04 UTC
Created attachment 14972 [details]
xorg-deps.pl

  This script is used after compiling with xorg-build.pl, and
using the -g option, so it will parse the .deps and .files files,
and print information about the order modules should be built.
Comment 3 Paulo César Pereira de Andrade 2008-03-09 04:01:25 UTC
Created attachment 14973 [details]
xorg-symbols.pl

This script can be used to check for missing symbols,
symbol clashes, what symbols are exported but not
used by any other module, etc.

It can also be used in an existing install, i.e.
usually what your distro has installed, by using
the proper options to override the install paths,
assuming xorg-build.pl was not used to install over
the "standard" path (usually not what you want).
Comment 4 Paulo César Pereira de Andrade 2008-03-09 04:03:00 UTC
Created attachment 14974 [details]
xorg-trace.pl

This is a wrapper used by xorg-build.pl, that uses
strace to track what binaries are executed and when
new files are created. And use this information to
generate the information about order modules should
be built.
Comment 5 Paulo César Pereira de Andrade 2008-03-12 19:12:12 UTC
Created attachment 15078 [details]
xorg-build.pl

  Added latest version I am using, that fixes a few problems,
most notably changing "sudo-cmd args | args" to
"sudo-cmd /bin/sh -c \"args | args\""

  Added updated list of buildable modules.

  Minor changes that may be added are:
o executing a command in every directory checkout,
  i.e. something like: xorg-build.pl -c "some-command; some-script"
o listing external dependencies and not starting a build if a
  mandatory component, that should be provided by the "distro"
  is not installed.
o better logging support, currently something like
  "xorg-build.pl -d -g -n some-module build >& some-log-file.txt"
  doesn't generate a very good output.
Comment 6 Paulo César Pereira de Andrade 2008-04-03 10:57:47 UTC
Created attachment 15656 [details]
xorg-scripts.tar.bz2

  Update version of build scripts.

  Adding all of them in a single tarball.

  This new version should be more useful to people
that want to try to build from sources, as the new
script xorg-ext-deps.pl should be run before attempting
to build, and it will try to check for missing packages.

  Before running it (xorg-ext-deps.pl), at least perl5 and
pkg-config should be installed.

  The script will run pkg-config to check for external
packages, then check for some binaries, then some
files (that may reside in different paths in different
distros/os'es), and after that, check for some libraries.

  The original scripts I did were to build rpm packages,
and the rpm spec files did take care of dependencies.
But to build directly from sources there is no easy way
to map the pkg-config package name to the external package
required, but usually, when something is missing, just
running something like:

  # foo-package-manager-install pkg-config-package-devel

for a missing "pkg-config-package" should be enough, and
if it claims a file is missing, usually there should also
exist a command like:

  # foo-package-manager-file-package file-name

that should print the package of "file-name"

  Note that the champion of external requirements is compiz,
that pulls qt/kde, gtk/gnome and a lot of other devel
packages.

  The file xorg-scripts.txt should give the basic step by
step information.

  Once the dependencies are resolved, you can also choose
to use jhbuild, see http://www.x.org/wiki/JhBuildInstructions
Comment 7 Paulo César Pereira de Andrade 2008-04-13 01:37:45 UTC
Created attachment 15875 [details]
xorg-scripts.tar.bz2

  Latest version.
  Previous version had a bug when building a
command line for xorg-trace.pl, but if someone
tried to use it for a debug build should have
figured it out...
  This new version also ensures pkgconfigdir
exists before any build, or "make install" would
silently fail to install the *.pc file, and that
could cause trouble if installing in a non standard
directory, as it would end up falling back to
read system installed files, and confuse the
script that checks order packages should be
built (xorg-deps.pl).
  I believe there are still some problems with
installs that "silently" fail if the destdir
does not exist, instead of creating it. And to
make things worse, these are the first packages
to be built, i.e. libxtrans & co.
Comment 8 Paulo César Pereira de Andrade 2009-01-09 12:54:56 UTC
Created attachment 21842 [details]
xorg-scripts.tar.bz2

  These scripts were for some time used to build test
rpm packages, but now reverted for "hardcore" xorg
packages build.

  Trying to test/use xorg in a "destdir" other then
/usr is close to pointless, so the scripts now default
to use /usr as destdir, and the $sudo defaults to
"sudo".

  The scripts are useful to build xorg git master
from sources (support for using branches was also
removed from the script, as it was significantly
simplified).
Comment 9 Paulo César Pereira de Andrade 2009-02-07 10:35:57 UTC
Created attachment 22666 [details]
xorg build and test scripts

  Now it has an option to force rerun of autogen.sh or
autoreconf, and doesn't attempt to be smart and create
the xorg-build.ok file, instead, it always runs make.

  Now there is a new script, called xorg-install.sh,
and for the moment, it just does a ugly hack in
xorg-build.pl that is basically:

    if (-f "install-sh") {
	x_system("ln -sf $install install-sh");
    }

  And it would have failed at startup if it cannot find
xorg-install.sh in the path (the $install variable).

  xorg-install.sh is just automake-1.10 install-sh, but
modified to "default" to -C, and still the -C option
parsing modified to ignore attribute/owner/group
changes, that is, it only installs the file if it is
really different.

  This way, the fact that files must be installed to
build the next package should not "always" make it
required to rebuild everything. Hopefully, making it
easier to detect failures elsewhere after a change
in a package.
Comment 10 Gaetan Nadon 2013-09-25 18:30:56 UTC
The functionality described is achieved by build.sh and/or jhbuild which have been totally rewritten since then.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.