1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-14 15:37:11 +01:00
Commit graph

60 commits

Author SHA1 Message Date
fa4eff263b Cleanup: implement defaults for package functions
This commit adds an "emptypackage" template that implements defaults
for all package functions and is included before every package.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2020-04-16 15:16:58 +02:00
8dc1802a0e Add yet another autotools/musl clutch
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2020-04-07 04:38:10 +02:00
1a697b336f Fix sysroot directory
Use a seperate sysroot directory (stored in variable SYSROOT)
instead of installing everything into the toolchain directory.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2020-04-07 03:28:21 +02:00
055642ff26 Propperly quote automatically collected file names for packages
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-07-17 18:15:25 +02:00
7e1857c35a Fix check_version_simple for newer versions of bash
Apparently the variable substitution no longer works inside '', breaking
the check_update script.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-07-07 14:40:36 +02:00
0ef38e31ee cleanup: new pkg tool can be built with default root/repodir
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-06-10 17:03:06 +02:00
6c24bad53b Add helper function to produce a file listing from a directory
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-30 16:18:11 +01:00
94ccf6d7e2 cleanup: add common implementation of check_update
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-30 10:40:54 +01:00
afd023802f cleanup: merge package download/build phases
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-18 23:28:05 +01:00
34a1b2de68 Ignore errors if strip fails
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 19:13:02 +01:00
7496023d5f Use pkg tool for determining a build strategy
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 17:26:07 +01:00
ee56b08ffc fixup: also compress the prepare log after downloading
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 17:18:16 +01:00
b77f8892bb cleanup: move actual package build to helper function
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-09 17:15:58 +01:00
dd643ca334 fix: overwrite compressed logfile if it already exists
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-06 21:22:03 +01:00
e497ba164c Cleanup directories before and after building a package
In case a package build fails, we can simply restart the build script without
having to do manual cleanup of the intermediate directories.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-06 10:03:41 +01:00
8fa44569d8 cleanup: remove deploy directory argument from package command
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-06 10:03:12 +01:00
b3529c8deb cleanup: remove unneeded parameter from deploy_dev_cleanup
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-05 20:05:26 +01:00
705290a2cb Compress log files after a package stage has completed
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-05 20:04:16 +01:00
2c741e06f3 Eliminate latent, per package deploy directory
Same process as for the build dir. We have one intermediate deploy directory
that the packaes installs it self to, then we package the contents, finally
we nuke the build and deploy directory before starting with the next package.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-05 15:09:34 +01:00
a0f4d41cfe fix strip_files: don't check filename against ELF
If we use "file ... | grep -i elf" to detect if a file is an ELF binary,
a file *named* elf will erroneously trigger it.

This commit adds a flag to disable printing of the file name.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-03 23:54:47 +01:00
c8d01f966a Use pkgtool to resolve and manage dependencies, add sub package support
Been working on this for too long, don't remember the specifics, will add
documentation.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-03 17:47:02 +01:00
David Oberhollenzer
2fb62ec2f1 Update unfuck_libtool function
We tell the autoconf configure script that we are going to install stuff
to prefix "/" with libdir being set to "/lib", so the script ends up writing
"libdir='/lib'" to the libtool *.la scripts.

This is all fine and dandy until we do a 'make install' with DESTDIR set to
our actual package deploy directory. Libtool goes "OMG WTF we aren't
instaling to / afterall" and thinks it needs to do a relinking phase.

During relinking, it passes "-L$libdir" to gcc, which ends up as "-L/lib".
Now, gcc tries to link against local system libraries. Best case, the build
breaks and we know something stupid happened. It really bites us if we try
to cross compile from e.g. x86 to x86.

Until now, it worked to simply patch the *.la scripts before 'make install',
like other distros do, but recent versions of util-linux now ship with a
newer version of the libtool script which simply regenerates the *.la files.

This commit adds an extension to the patch script that patches the actuall
libtool script itself.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2019-01-17 19:55:32 +01:00
David Oberhollenzer
f9a6cc2e73 Directly pipe checksum into comparison tool in download function
Don't create unneccessary temporary files.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-12-29 13:07:53 +01:00
David Oberhollenzer
e87a8ec43c Explicitly turn on size optimizations
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-03 19:28:43 +01:00
David Oberhollenzer
8e5c6d3a2e Make toolchain and user space hardening configurable
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-10-19 21:50:57 +02:00
David Oberhollenzer
7b0e1f182c Add hardening flags to autotools based packages
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-10-17 01:11:02 +02:00
David Oberhollenzer
38a9b5865c Add libdir to autotools configuration
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-30 02:36:59 +02:00
David Oberhollenzer
b4824a9f29 Fix missing LAYERCONF in check_update script
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-27 23:51:15 +02:00
David Oberhollenzer
c7231478d5 Restructure build system configuration
Add a generic, stackable layer based structure instead of special purpose
subdirectories with specific behaviour.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-23 16:19:52 +02:00
David Oberhollenzer
50dce293c1 Add helper macro for running configure with standard arguments
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-03 13:58:35 +02:00
David Oberhollenzer
9ed01eae34 Update config.guess
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-01 21:22:34 +02:00
David Oberhollenzer
7204b9dd75 Cleanup: strip executables in mk.sh
Automagically strip all executables (recursively for subdirectories in lib
and bin) inside the mk.sh build loop.

This removes the necessity in the build scripts to strip the files. This also
allows us to remove the error prone install-strip target from the build
scripts.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-17 20:22:10 +02:00
David Oberhollenzer
3d30afef75 Remove dev deploy split
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-17 20:22:10 +02:00
David Oberhollenzer
d5c8fce58b Add helper function to fixup libtool files
When "libdir" is not the final path where we install the library,
libtool will mess up the relinking process and prepend the global
library directories to the linker search path.

If we fix the libdir path, libtool will insert it into the rpath
in the binary, which is also pretty bonkers.

Maybe, there is a way to do this correctly, but the various GNU
mailing lists, Debian wiki, etc.. could not provide a better
alternative than patching up libtool scripts.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-05-19 23:05:30 +02:00
David Oberhollenzer
b472ff031a Move file override functions to seperate helper script file
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-05-10 16:01:53 +02:00
David Oberhollenzer
c6ae50eb40 Add helpers for override behaviour based shell inclusion
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-05-10 16:01:53 +02:00
David Oberhollenzer
e11477b9cf Remove common product configuration
The simplification of the overide behaviour may be worth the slight
duplication overhead.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-05-10 14:15:44 +02:00
David Oberhollenzer
b1bdce20a9 Add automatic update chacking script
Crunch project websites and try to find the latest version for each
package without having to do the work manually.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-05-08 15:01:23 +02:00
David Oberhollenzer
5388c0f925 Cleanup file override behaviour
Look for board specific product files in product/$product/$board/

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-05-06 00:21:09 +02:00
David Oberhollenzer
387281fae4 Add configuration for deterministic network interface names
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-05-05 18:27:57 +02:00
David Oberhollenzer
3907b48c1f Add eudev package
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-24 21:14:29 +01:00
David Oberhollenzer
94cc2d2c46 Implement board/product config schema
- build needs a pair of product and board name
 - some products can only be built for some boards
 - Config files in product/<name> directory override those in board/<name>
 - For some config files, like LDPATH or ROOTFS, the files are merged
 - product/common provides defaults

Add default config for various services:
 - Add default config for unbound
 - Add default config for dnsmasq

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-24 18:28:29 +01:00
David Oberhollenzer
9e361a4cd3 Use config.guess to determine the host tuple
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-24 18:28:29 +01:00
David Oberhollenzer
96966bf73b Minor cleanup
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-24 22:45:00 +01:00
David Oberhollenzer
b36d66bb9b Move checkfile test to package main loop
- Only one checkfile per package, not per stage
 - Have to rebuild entire package on failure anyway
 - Faster build since we can simply guard toolchain restore
   with checkfile test

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-24 22:45:00 +01:00
David Oberhollenzer
2147fbb3b2 Remove "-dev" prefix for development files
Instead of adding a prefix, move development files to a different
deploy directory.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-17 03:02:16 +01:00
David Oberhollenzer
fc278364e5 Cleanup package command arguments
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-17 03:02:16 +01:00
David Oberhollenzer
05ae80634c Don't keep build directory
Use $PKGBUILDDIR for building packages. Delete it again after
the deploy is done. If the build fails, the script aborts and it
is kept. If the build and deploy pass, there is no reason to keep
it around.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-17 03:02:15 +01:00
David Oberhollenzer
30aa5ce395 Use regular packaging for toolchain packages if applicable
- Store musl & kernel headers in dev packages
 - Store musl dynamic headers in regular package,
   shared libs in dev package
 - Carefully seperate headers and libaries installed by second GCC
   into packages
 - libgcc_files.txt no longer needed

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-17 03:02:15 +01:00
David Oberhollenzer
1636fc8aac Merge management of regular and toolchain packages
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-02-15 23:47:54 +01:00