[Dev] New libretools on [libre-testing]

Luke T. Shumaker lukeshu at sbcglobal.net
Fri May 3 04:11:36 GMT 2013


I just uploaded a new libretools to [libre-testing].  I think that
it's ready for [libre], so I need all of you to test it :P.

It isn't quite to the target "don't break and confuse parabolers".  I
don't think it will break, but parts of it might still be confusing,
but those parts haven't really changed since the last release on
[libre].

Big changes from the version in [libre]:

 - Misc
   - Several trivial programs were removed
   - librerepkg has been removed/deprecated
   - `librefetch` was added
   - `/etc/libretools.conf` has changed significantly, be sure to
     merge your /etc/*.pac* files after upgrading
 - chroot related
   - the archroot version was bumped from 2 to 3, so existing chroots
     will have to be rebuilt (or you could just bump their version)
   - the dependency on `devtools` was dropped
   - the configuration has moved to from `libretools.conf` to
     `/etc/libretools.d/chroot.conf`.
   - `libremkchroot` has been removed/deprecated in favor of
     `librechroot make`
   - `update-cleansystem` and `/etc/libretools.d/cleansystem` have
     been removed/deprecated in favor of running `chcleanup`
   - `librechroot` and `libremakepkg` have been made more robust, and
     more capable. They should be simpler to use, but the invocation
     for both has changed, so check the help flag for each command.
   - `libremakepkg` is no longer chroot-only. It can be run by a user
     already inside of a chroot, and it will still do the right
     thing.

To talk a little more about the more complicated of those bullet
points:

librefetch
----------

librefetch streamlines creating packages that require a mksource()
function or a SRCBUILD.  Specifying a "libre://filename.tar.gz" URL in
source=() causes it to try downloading an already-built sourceball,
and if it doesn't exist to run SRCBUILD or mksource() automagically.
It's really neat and convienient; now one can build the source and the
package with one call to `makepkg`.

librechroot
-----------

Read `librechroot help`; it is really thourough and will explain
things.

libremakepkg
------------

Look at `librechroot -h` for invocation.

The advantage of libremakepkg, as opposed to plain makepkg, is that it
takes a few extra steps to ensure the quality of the package:
  - Removes packages that aren't dependencies or in 'base-devel', to
    ensure no unintended deps.
  - Disables networking during build() and package()
  - Has hooks to examine the PKGBUILD, source directory, and final
    package; though these are currently under-utilized, and it only
    runs `pkgbuild-check-nonfree`.

It will automatically add packages built to a local pacman repository,
so that they can be used as dependencies for other packages that you
are building.  The local repository is at `/repo` in the chroot.

It works from inside of the chroot! Fauno will be happy.  Notes about
using it from inside of a chroot:

  - It will fail at adding the packages to the local repository unless
    `PKGDEST=/pkgdest` and `SRCDEST=/srcdest`.[0]
    effort this will take to fix; the relevent 
  - It still must be run with `sudo`, but the user you run it with
    will properly own the files.
  - I haven't written anything to help you set up a user in the
    chroot.

Happy hacking,
~ Luke Shumaker

[0] I'm not sure how much effort this would be to fix. The relevent
function is `chroot_add_to_local_repo()` in `makechrootpkg.sh`.



More information about the Dev mailing list