Re: How to build systemd

2016-08-05 Thread J Fernyhough
On 04/08/16 15:45, Alex Lyakas wrote:
> Greetings,
>  
> I have downloaded the systemd package for trusty
> (http://packages.ubuntu.com/source/trusty/systemd) with “apt-get source
> systemd”.
>  
> Which commands should I issue to build it? Specifically I need to build
> udev and its accompanying tools (like scsi_id).
>  

The easiest way (I've found) to build packages from source is with
`debuild`, e.g.:

$> apt-get source systemd
$> cd systemd-204
$systemd-204> debuild

This will probably complain about missing dependencies. You can go
through the list and install manually, use `apt-get build-dep systemd`,
or install `equivs` and use `mk-build-deps` (which is what I would do as
it's then easy to remove the deps afterwards), e.g.:

$> mk-build-deps systemd
$> sudo gdebi systemd-build-deps_204-5ubuntu20.19_all.deb

(`gdebi` will automatically install dependencies, `dpkg -i` will not.
`mk-build-deps` will also run without an argument from within a source
directory, the above command makes it explicit and means there's not a
deb file created in the source directory.)

So, putting this together:

$~> sudo apt-get install equivs
$~> apt-get source systemd
$~> mk-build-deps systemd
$~> sudo gdebi systemd-build-deps_204-5ubuntu20.19_all.deb
$~> cd systemd-204
$systemd-204> debuild
$systemd-204> cd ..
$~> ls
[newly created package files]
$~> sudo apt-get purge systemd-build-deps
$~> sudo apt-get autoremove --purge


Be aware that this build will depend on the packages currently installed
on your system. A better approach (which is also used by e.g. Launchpad)
is to build in a chroot, probably using pbuilder:

https://wiki.ubuntu.com/PbuilderHowto
https://www.debian.org/doc/manuals/maint-guide/build.en.html

Once you have this set up you only need to use `pdebuild` instead of
`debuild`:

$~> apt-get source systemd
$~> cd systemd-204
$systemd-204> sudo pdebuild
$systemd-204> ls /var/cache/pbuilder/result/
[newly created package files]

This should automatically install all necessary buildeps within the
chroot and produce the debs (and other package files) in
/var/cache/pbuilder/result by default. To specify a target location use
`pbuilder --buildresult /target/location` (see `man pdebuild`).


There's an awful lot of documentation on the web to wade through for
package maintenance, and quite a bit is contradictory (or at least
inconsistent), but this should at least get you started.

J



signature.asc
Description: OpenPGP digital signature
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


How to build systemd

2016-08-04 Thread Alex Lyakas
Greetings,

I have downloaded the systemd package for trusty 
(http://packages.ubuntu.com/source/trusty/systemd) with “apt-get source 
systemd”.

Which commands should I issue to build it? Specifically I need to build udev 
and its accompanying tools (like scsi_id).

I tried running autogen.sh and eventually received:

root@vc-00-00-576-dev:/mnt/work/alex/tmp/systemd-204# ./autogen.sh
You don't have gtk-doc installed, and thus won't be able to generate the 
documentation.
configure.ac:457: warning: macro 'AM_PATH_LIBGCRYPT' not found in library
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: linking file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: linking file `m4/libtool.m4'
libtoolize: linking file `m4/ltoptions.m4'
libtoolize: linking file `m4/ltsugar.m4'
libtoolize: linking file `m4/ltversion.m4'
libtoolize: linking file `m4/lt~obsolete.m4'
configure.ac:457: warning: macro 'AM_PATH_LIBGCRYPT' not found in library
configure.ac:80: error: possibly undefined macro: AC_MSG_ERROR
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.
configure.ac:457: error: possibly undefined macro: AM_PATH_LIBGCRYPT
autoreconf: /usr/bin/autoconf failed with exit status: 1

Thanks,
Alex.
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss