70 Commits

Author SHA1 Message Date
William Douglas 94c6be068b Add file to skip verification for a single version
Sometimes a package will make a release without verification we
support, in these cases it is nice to be able to toggle off
verification just for that release. Add a new configuration file that
contains the version to not validate.

This file could be extended in the future to support adding specific
keys not to use in the verification process in cases where that key
has problems (though this might be better left to another
configuration file).

Signed-off-by: William Douglas <william.douglas@intel.com>
2025-01-21 09:57:09 -08:00
William Douglas a19cdc79b4 Always handle the common tmepfile prefix for license_skips
Modify license skips to handle the common tempfile prefix of '/tmp/*'
and normalize the case where lines lead with a slash vs not.

Also remove a duplicate test for globlike match.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-09-19 15:09:41 -07:00
William Douglas 7b01f0ba82 Add support for skipping license paths
Add support for a new config file with glob like handling of paths as
some projects contain license files that are not the license of the
project.

scan_for_licenses now looks at the configuration and does glob like
matching for all the potential license files it tries to add.

This change caused a few structural adjustments to the code and a
slight style change for importing just the toplevel util submodule
that are superficial.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-09-19 12:02:52 -07:00
William Douglas dc0ff31b43 Add support for a copy_prepend config file
This patch has a few interrelated changes in it but primarily it is
supporting a new copy_prepend configuration file for autospec. This is
intended to support cases where changes should be made to the source
directory prior to the source directory being copied for different
builds (avx2, 32bit, etc).

Also with this change some tweaks to how cmake builds are handled to
be more aligned with other build systems. Primarily that the source
directoy is now fully copied rather than just creating a cmake build
directory per build in the same source directory.

Finally check support has been updated to account for the new path and
update support for meson and apx.

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-07-01 01:36:31 -07:00
William Douglas f91eefa9d2 Add cargo build pattern support
This change adds the ability to use the cargo build system to build
rust packages. The content being installed will only be the bin
content that is put in ~/.cargo/bin by `cargo install`.

Also fixes up archive handling that was broken in a previous
change.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-03-23 15:11:54 -07:00
William Douglas 74c0833cf4 Remove ruby, golang and cargo build patterns
These patterns are being removed as they are not used or are going to
be reworked.

This change also removes support for multi-versioned packages which
were considered for go and cargo purposes.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-03-17 12:14:20 -07:00
William Douglas 0b297a8e43 Enable shell like glob matching for *extras files
This change allows *extras files to contain '*' matches. This somewhat
emulates the shell glob match in that '/foo*bar' will match '/foobar'
and '/foobazbar' but not '/foo/bar'. The globs are only allowed one
per directory such that '/foo*/bar*' is allowed but '/foo*bar*' is
not.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-11-05 06:02:53 -07:00
William Douglas a453f7be0e Enable provides configuration overrides
Add support for (*_)provides_{add,ban} configuration files.

This is occasionally useful for cases where a pypi() provide isn't
picked up as the packages isn't a python package but does provide a
python library. It also can be handy when doing some renames to
prevent mass rebuilds.

Signed-off-by: William Douglas <william.douglas@intel.com>
2022-06-29 14:06:17 -07:00
William Douglas 0c780b3205 Remove support for the java build systems
These are no longer used in Clear Linux so the code can be removed
without issue.

Signed-off-by: William Douglas <william.douglas@intel.com>
2021-12-17 11:56:08 -08:00
William Douglas 46573f1035 Add pyproject build_pattern
Enable building projects without setup.py and with a pyproject.toml.

Signed-off-by: William Douglas <william.douglas@intel.com>
2021-11-09 15:02:26 -08:00
William Douglas 5e05989bf0 Add make_command override file
Enable using an alternate command instead of make. This is useful as
some projects are enabling the use of ninja with cmake for instance.

Signed-off-by: William Douglas <william.douglas@intel.com>
2021-11-09 15:02:06 -08:00
William Douglas 281e89833a Add build_append_once configuration support
Include the ability to have a build_append_once configuration that is
only run once at the top of the build section (before the
build_append, which has gotten a documentation update).

This is motivated by some packages wanting their base build to be
slightly different than the alternate builds.

It is possible instead of this change to instead move to having these
special builds be handled entirely with configuration files or using
another package.

Modified-by: William Douglas <william.douglas@intel.com>
2021-10-20 16:39:14 -07:00
William Douglas 668822df6c Add pypi module version overrides
Enable selectively removing version dependencies for a given set of
python modules. The motiviation for this change is to avoid breaking
package builds when there are packages that often lag pypi in updating
their max version requirements.

Signed-off-by: William Douglas <william.douglas@intel.com>
2021-10-19 13:25:35 -07:00
Lucius Hu 9f6870c740 Removed infile features
https://github.com/clearlinux/autospec/issues/645
https://github.com/clearlinux/autospec/issues/646
2020-09-01 16:52:52 -07:00
Patrick McCarty 91329815ae Remove other Travis CI leftovers
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-04-24 20:12:02 -07:00
William Douglas 327801ba2b Add support for custom subpackage requires
Due to more systems being added for automated runtime dependency
injection for subpackages, we need a way for manual overrides of the
default detected dependencies.

This change provides support for specifying which subpackage runtime
dependencies should be added or removed and consolidates some of the
custom configuration file detection along with it.
2020-04-24 16:00:21 -07:00
Ross Burton 2c1a2bf656 config: support tests_extras
Some test suites install files that can't be auto-detected, so support a
tests-extras file to add extra files to the -tests package (not
-extras-tests).
2020-04-13 16:39:47 -07:00
Juro Bystricky 54a94e123f support for openmpi sections
Initial support for concurrent serial and parallel build.
Parallel MPI build enabled via a new setting in "options.conf":
    openmpi = false|true (false is default)

 * Serial builds remain unaffected.
 * Parallel build: Only OpenMPI is supported.
 * Parallel builds always assume AVX2.
 * Build patterns implemented: "configure" and "cmake".
   The build process is controlled by additional files:
   "cmake_arg_openmpi": same functionality as "cmake_args"
   "configure_openmpi": same functionality as "configure"

The openmpi (configure, build, check, install) sections follow these steps:

module load openmpi
...[configure,build,install,check]
module unload openmpi

Once "openmpi=true", the packages "openmpi-dev", "modules" and "openssh"
are automatically added to BuildRequires. ("openssh" is generally required
to run any MPI test suites).

Packages created:
   foo-openmpi:    binaries, libraries, docs, ...
   foo-dev :       contains both serial and MPI devel. files
   foo-staticdev:  contains both serial and MPI devel. files
2020-03-10 10:49:37 -07:00
William Douglas e4f229d10b Use the pypi api for distutils3 builds
Get metadata about the package from pypi for distutils3 build patterns
then use that metadata to get summary, description and provides
information (license and requires maybe leveraged in the future).

The description isn't always very useful (often too long) so only use
it if there isn't one already.
2020-02-27 12:30:33 -08:00
Thiago Macieira cd2fcdfc59 Add the ability to include more sources found in the Git dir
So we don't have to create extra sources by way of install_append. It's
much nicer to edit shell scripts and other files directly in-line.
2019-12-04 16:10:23 -08:00
William Douglas 1489b2776b Purge python2 support from autospec 2019-11-14 12:59:43 -08:00
Geoffroy Van Cutsem ed22e7ab5d README.rst: add missing options to the documentation
A few options available to configure the flags and optimization are missing from
the documentation (README.rst). This patch adds them.

Also fix a typo in the code

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-10-01 10:37:05 -07:00
Auke Kok d075f518e0 Add summary file support, just like description.
Only the first line is used.
2019-08-02 13:20:26 -07:00
William Douglas d9a7438dd0 Add ant build pattern 2019-07-24 15:32:34 -07:00
William Douglas 54fd6e27aa Improve go ecosystem support
Update support for handling go packages by handling missing go
dependencies. Make use of go modules and the go proxy (see
https://tip.golang.org/cmd/go/#hdr-Module_proxy_protocol for more
details on the proxy implementation) to discover what artifacts are
needed.

A new go-dep build_pattern that will package all versions that the
go-proxy finds is also added as part of this change. Additional rework
of the golang build_pattern (and Makefile build_pattern as a number of
go packages use Makefiles) to use module vendoring when module
configuration is detected was added as well.

The new functionality is also intended to be used by a higher level
tool that will wrap autospec calls to build missing dependencies as
well as the requested package.
2019-07-19 15:10:48 -07:00
Patrick McCarty 0e1c61f6e6 Implement new config for clr-service-restart units
To improve tracking of units that are enabled for restart by
clr-service-restart, add a new config file `service_restart`. It lists
one or more unit names (with full path), one unit per line. The %install
section is updated accordingly.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-07-01 21:33:09 -07:00
William Douglas eda43d5a81 Update format of custom_extras files
Switching to flat file handling using the same conf file parsing as
other config files like extras and dev_extras.

Moves to two different config files for the file list and the requires
list.
2019-05-31 15:28:43 -07:00
William Douglas 839550d1b9 Update README for changes to custom extras subpackages 2019-05-28 22:58:12 -07:00
Simental Magana, Marcos 9fa41d01a8 fix attrs usage for file controls
This commit changes the syntax of the attrs control file and
actually makes use of it for %file setup.

New syntax of the `attrs` file is `<mode> <user> <group> <filename>`
(space separated).

e.g:
4755 root messagebus /usr/libexec/dbus-daemon-launch-helper

Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
2019-05-09 08:56:52 -07:00
Arzhan Kinzhalin 7055a25510 Minor doc fixes. 2019-04-01 21:25:30 -07:00
William Douglas 0ddb695cfb Add custom extras subpackage support
Enable package builders to create custom extras subpackages (suffixed
by -extras). This enables content to be divided more exactly than just
the current extras subpackage support and also allows users to specify
requirements on other subpackages in the package. It is not intended
to replace extras usage as this feature should be used sparingly where
content really must be specificly placed.
2019-03-22 13:03:40 -07:00
Kevron Rees 8c75eda4fb Update README.rst 2019-03-19 12:18:24 -07:00
Brett T. Warden 25271c62cc Fix grammar in install_macro explanation 2018-10-06 17:07:25 -07:00
Brett T. Warden f904b21c59 Explain cmake_subdir in more detail 2018-10-06 17:07:25 -07:00
Thiago Macieira 26437a118e Add configure_{avx2,avx512} files
Those contain extra auto(re)conf arguments to be passed to AVX2 and
AVX512 builds, instead of configure64.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-03 12:57:58 -07:00
Thiago Macieira 37503fded9 Add "make_prepend" code
So the files are now:
 - prep_prepend
   %setup
   %patchN
 - build_prepend
   %configure
 - make_prepend
   %make
 - install_prepend
   %make_install
 - install_append

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-10 06:04:34 -07:00
Thiago Macieira ff96db88f6 Add the build_prepend rule to the extra builds too
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-10 06:04:34 -07:00
William Douglas ad997edbbe Document handling of systemd configuration template files 2018-08-31 11:13:54 -07:00
Patrick McCarty 3b30b271f3 Update documentation of current build patterns
Mark the golang, scons, and cargo build patterns as WIP, since they need
more work before considering them production-ready.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-08-30 18:52:51 -07:00
Patrick McCarty c5046c67ba Fix markdown typo in the README
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-08-30 18:52:51 -07:00
Thiago Macieira 8c48dbd286 Document the dev_extras file
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-24 21:30:03 -07:00
William Douglas f1796491bd Add prep, build and install edge case handlers
Add support for package specific configuration to be added before any
other actions in each of the %prep, %build and %install sections are
run. As part of this rename the prep_append configuration file to
build_prepend and make_install_append configuration file to
install_append.
2018-07-26 17:21:30 -07:00
Patrick McCarty 45937f81c1 Make git URI configuration optional
Fix #148

Previous to this commit, if the autospec.conf `git` configuration value
is unset, autospec would not instantiate a git repo and not commit any
changes.

However, because the purpose of that config value is to define a pattern
for the git remote URI, it should be completely optional. Users may not
be pushing their repo to a remote location, or the remote repo name may
not match the local repo name (e.g. with Github not allowing certain
characters to appear to repo names).

With this change, autospec will now always commit changes unless
--skip-git is passed on the command line.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-04-27 11:24:25 -07:00
Patrick McCarty 2ad5514017 Add new option to customize Mock config
Instead of hardcoding the "-r clear" option to specify the Mock config,
make this configurable with a new -m/--mock-config command line option.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-03-07 14:26:15 -08:00
Thiago Macieira e8767893cf Add support for qmake-based projects
qmake uses project files called *.pro, which we detect at the top-level,
so long as there's no configure script also present. We scan the *.pro
files for QT{,_PRIVATE,_FOR_CONFIG} += lines, which will give us the
extra dependencies, then convert from the qmake internal name to the
pkgconfig name.

This build pattern works for all Qt 5.10 modules, except that it
concludes that a module depends on itself, if it has a library depending
on another library that it's also building (example: libQtQuick.so
depends on libQtQml.so). For those modules, it's necessary to list the
libraries that are product of the package in the pkgconfig_ban file.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-16 08:20:27 -08:00
Thiago Macieira 4933777482 Update CMake instructions
Files in /usr/lib*/cmake are development files.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-13 15:27:44 -08:00
William Douglas 165752000c Add 32bit versions of make/make_install args
Add make32_args and make32_install_args config file handling to allow
specific options to be passed that are specific to the 32bit builds.
2018-01-17 13:42:50 -08:00
Gabi Beyer 77584ce991 Add README information for infile argument
Provide information ahout the infile parser to the README for a
better user experience.

Signed-off-by: Gabi Beyer <Gabib@live.com>
2017-12-06 15:02:32 -08:00
Patrick McCarty 9c5f24d17a Support spec %description section override
Resolves #34

In case the user wants to override the base package %description content
autodetected by autospec, add support for a config file named
"description" to provide the content instead.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2017-12-04 14:45:40 -08:00
Matthew Johnson be834de817 Clean up README format
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
2017-11-28 15:22:13 -08:00