Commit Graph

884 Commits

Author SHA1 Message Date
Patrick McCarty 3552dff8db config: skip tracking of the 'packages' file
This 'packages' file looks like a config file, but because it typically
exists outside the package git repo, we want avoid a later attempt to
commit it.

This change also makes the "fatal: pathspec 'packages' did not match any
files" error message disappear.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-06-24 15:50:44 -07:00
Athenas Jimenez 24837cf7ad mvnbin pattern: Minor fixes on spec creation.
- Fix regex on specfile creation.
- Sort the archives.

Signed-off-by: Athenas Jimenez <athenas.jimenez.gonzalez@intel.com>
2019-06-24 13:10:44 -07:00
Patrick McCarty e5bf1b99b7 tests: fix up mocks for open_auto() use
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-06-24 13:08:39 -07:00
Patrick McCarty 4e889da4b8 Start using open_auto()
See previous commit for rationale of this new helper function.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-06-24 13:08:39 -07:00
Patrick McCarty dbf07550d5 util: add open_auto helper function
This helper function is meant to be used throughout autospec as a
replacement for most uses of open(), especially whenever reading
arbitrary data from upstream sources.

It reads/writes data in UTF-8 always, with invalid UTF-8 characters
escaped with Python's "surrogate" escaping mechanism. This ensures that
any Latin-1 or other non-UTF-8 compatible encoded data can successfully
be read in and later written out without data corruption.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-06-24 13:08:39 -07:00
Juro Bystricky 3d7189ab95 Blacklist GPL+ license
Autospec may encounter "GPL+" license. This is not a valid
SPDX license. The meaning of GPL+ is not well defined, therefore
blcklisting seems the proper way to handle it. This way it is
handled the same way as "GPL", which is blaclisted for the same reason.

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
2019-06-21 09:39:29 -07:00
Patrick McCarty 7d20bbbe5f build: skip blank lines when populating file list
If blank lines appear in the file list from the build log, skip them.

In particular, this fix also resolves a persistent autospec warning I am
seeing when testing the latest release of mock:

    [WARNING] Removing directory  from file list

The empty string in the above warning message originates from the empty
string being added to the files list, as two blank lines appear after
the files list from the build log.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-06-20 22:01:51 -07:00
Thiago Macieira 179d4e8e8c Make qmake builds produce fat LTO objects for static libraries
By default, qmake builds make thin objects.

Added a missing space for the non-LTO case, as that's concatenated to
the args in the package-supplied "configure" file.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-19 22:45:17 -07:00
Athenas Jimenez 8324e8ca9d mvnbin pattern: Add capitals and underscore on regex patterns.
Signed-off-by: Athenas Jimenez <athenas.jimenez.gonzalez@intel.com>
2019-06-13 15:20:06 -07:00
Athenas Jimenez b68fe15e1e mvnbin pattern: Add more regex patterns.
Signed-off-by: Athenas Jimenez <athenas.jimenez.gonzalez@intel.com>
2019-06-10 18:27:11 -07:00
Thiago Macieira 448323a7ec Fix the way to pass flags to the compiler, through qmake
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-07 14:48:45 -07:00
Athenas Jimenez d11f595c11 Add mvnbin build pattern
This pattern would add the ability to create bootstraps specfiles for
maven dependencies(aka artifacts). These boostraps would be use as a
way to solve the dependencies for Java projects that use Maven as a
build tool.

Signed-off-by: Athenas Jimenez <athenas.jimenez.gonzalez@intel.com>
2019-06-07 13:48:01 -07:00
Daniel Charles 9e79d6ca13 meson: add a missing space between buildtype and configure extras
fixing a typo when building for avx2, moved first argument to upper
line to make it more evident

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
2019-06-06 10:28:57 -07:00
Caio Marcelo de Oliveira Filho ed720c42e6 Add git.sr.ht tarball pattern 2019-06-04 13:42:45 -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
Thiago Macieira 171dd30e5e Add the ability to not auto-unpack archives
Usually needed when it's a .zip file without a prefix, which results
in weird mv errors when launching Autospec. This also makes it
possible to have more sources (like .jar).

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-31 15:18:53 -07:00
Brett T. Warden 06819ea152 Update UNZIP_OUT for build_zip unit tests
The actual output of the unzip -q -l commands used in build_zip()
doesn't include the archive name. Removing it from the mock UNZIP_OUT so
unit tests match reality.
2019-05-31 12:46:15 -07:00
Brett T. Warden 30f396c53b Fix zip archive scanning
ZIP info with -q starts on the 3rd line, not the 4th. In the case of an
archive with a single file, this will fail.

Fixes #393
2019-05-31 12:46:15 -07:00
Patrick McCarty db66426305 Ban any dependency on 'futures'
'futures' provides concurrent.futures, which has been part of the Python
standard library since the 3.2 release, so it should not be added as a
dependency anymore.

Any remaining Python 2 packages can manually require
'deprecated-futures-legacypython' as needed.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-05-29 08:43:49 -07:00
William Douglas b6d722db0e Fix-up using llvm and lto
https://github.com/clearlinux/distribution/issues/800 and
https://github.com/clearlinux/distribution/issues/799 point out an
issue with how autospec was creating a conflict when use_clang and
use_lto were both set. This change makes lto configuration dependent
on the compiler (a bit sadly).
2019-05-28 22:58:12 -07:00
William Douglas 839550d1b9 Update README for changes to custom extras subpackages 2019-05-28 22:58:12 -07:00
puneetse bb34d03bad Fix config use_lto default wanting to be a string
Introduced in f3914aa252 as a boolean
2019-05-21 23:06:35 -07:00
William Douglas 24815ea1ab Fixup make check gripes 2019-05-21 13:49:15 -07:00
Arjan van de Ven a95a5c499c support avx2 builds with meson
support building avx2 options using meson, now that more and more things
are moving to meson
2019-05-21 13:49:15 -07:00
Arjan van de Ven 555093249d set -fno-lto for non-lto builds and move the PGO directory to /var/tmp
we want to do LTO by default, so we need to make sure to pass -fno-lto
for builds that do not want it
2019-05-21 13:49:15 -07:00
Arjan van de Ven d9fcbb20bd name extra subpackages as -extras-<foo> as per architecture review
lets keep the namespace proper and simple
2019-05-21 13:49:15 -07:00
Arjan van de Ven f3914aa252 default to LTO on for new packages
With gcc9, LTO has matured significantly; enough so that we should default it to
on for new packages.

(other distros are going to this as well)
2019-05-21 13:49:15 -07:00
Arjan van de Ven 13188001d1 add a new pattern for R 2019-05-21 13:49:15 -07:00
Arjan van de Ven 311d4f4792 Deal better with python pypi names that swap - and _
in the pypi world, _  and - seems to be used inconsitently between pypi names
and the names of the python modules; make autospec more robust for this
2019-05-21 13:49:15 -07:00
Patrick McCarty 1f0b928a87 Fix misdetection of new CVEs for commit summaries
The names of existing CVE patches, as detected from an existing spec
file, have been detected as new CVE patches by mistake, and the
resulting git commit summaries explicitly mention the previously fixed
CVEs.

Fix the issue by lowercasing the patch names when populated the list of
old patches, because the code block below this one also lowercases them
prior to checking their names.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-05-21 12:54:44 -07:00
William Douglas 700cd1daa2 Don't require staticdev32 in the main package
The original implementation missed the staticdev32 exclude, this
change fixes that gap.
2019-05-21 12:53:59 -07:00
Thiago Macieira a18f1a32f3 "xemacs" package was removed 2019-05-20 13:32:03 -07:00
William Douglas c6ea001386 Add PyGObject -> pygobject translation 2019-05-13 15:23:27 -07:00
Brett T. Warden c9caf402ef Omit cp and mv commands for archives in main dir
Instead of adding --noclobber to the cp and mv commands for moving
archive contents into the destination directory, if the prefix paths
where the archive and main tarball were extracted match, ignore the
destination completely and don't even execute the mv or write the cp to
the spec file.
2019-05-09 12:21:47 -07:00
Brett T. Warden f996a19efb Allow unpacking archives in the main tarball's dir
Some software packages break distribution into a core tarball then
additional tarballs with extra features or content. LibreOffice is one
such example. The additional tarballs provide files in the same
directory tree. The most efficient way to unpack all of these with the
current archive functionality is to place them at the same base dir, ./

At two points during autospec, the code to handle archives attempts to
either move or copy the contents of archive tarballs to the final
directory. If ./ is the unpacking directory, the files are already in
the same place, so mv and cp will fail, complaining that src and dst are
the same.

Add '-n' (no clobber) to these mv and cp commands, so that they simply
do nothing when the files are already in the correct final destination.
2019-05-09 12:21:47 -07:00
Leandro Pereira c93dda3fcb Set ${GCC_IGNORE_WERROR} environment variable
Clear ships with a patch in GCC that allows ignoring the -Werror
compilation flag if this environment variable is set.  -Werror is a
useful flag for the upstream package maintainers, but is a source of
headaches for downstream users.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2019-05-09 09:02:01 -07:00
Leandro Pereira 87ec254510 license: Ignore file if couldn't be decoded
libcdio-2.1.0 has test files named "copying.iso" and "copying-rr.iso",
which are of course not text files -- but autospec considers those to
be license files.

Perform a little bit of refactoring, calculating the hash only after
the license has been properly detected.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2019-05-09 09:00:50 -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
Patrick McCarty 51b209744d Fix travis build
The CI infra will occasionally choose Ubuntu 16.04 LTS by default
instead of 14.04 LTS, which results in pycurl failing to build due to a
missing dependency (libgnutls-dev).

Resolve the issue by installing the missing dependency and forcing
xenial (16.04) as the default.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-05-06 12:46:44 -07:00
Patrick McCarty c24be6d169 Ignore for-review.txt
The Clear Linux OS developer tooling recently gained the ability to
create trimmed-down patches from autospec commits, dumping them to files
named "for-review.txt".

Update .gitignore to ignore these files.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2019-05-06 10:51:28 -07:00
Peter O'Connor 88f9522ba0 Set autoreconf when patch touches aclocal.m4
While less common, changes to aclocal.m4 also require configure to be
regenerated.
2019-04-17 06:40:59 -07:00
Arzhan Kinzhalin 64c349ab15 Fix excludes v extras.
When adding a file to extras (as well as excludes, setuid etc.), the
files are added to the exclude list dynamically. Instead, load all known
files upfront.

Also, process file-configured subpackages (-extras, custom-extras etc.)
first and only then process "built-in" (pattern-based) packages (such as
-lib64, -lib32, -autostart etc.)
2019-04-16 11:30:06 -07:00
Auke Kok 0a7f55c0d7 Add phpize package support.
This relies on the convention that phpize reads a config.m4
file and from that finds all the needed PHP stuff.

The build pattern is `phpize`
2019-04-16 09:16:50 -07:00
Thiago Macieira 71ff1b4400 CMake support: Don't make copies of sources for AVX2/AVX512/32-bit builds
The CMake pattern reuses the same sources by doing different
out-of-tree builds. The copied sources are not useful.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-09 19:14:34 -07:00
Brett T. Warden 0ec8e42f4f Update test for commit c296fa2f35
Updating expected dev package definition to accomodate:
    make -dev packages require: the main package
    so that installing -dev gives you a functional component
2019-04-09 19:10:47 -07:00
William Douglas 5bfea55c8b Fixup missing docstring for public function 2019-04-06 10:58:52 -07:00
Arjan van de Ven c296fa2f35 Add some more patterns
detect a few more meson patterns

add a staticdev subpackage to host .a files

make -dev packages require: the main package
so that installing -dev gives you a functional component
2019-04-06 10:58:35 -07:00
Leandro Pereira 2a7626d7a3 Ignore hidden files while looking for qmake .pro files
libyaml 0.2.2 contains a hidden ".indent.pro" that's completely
unrelated to qmake, and this causes the wrong build instructions
to be used.
2019-04-01 21:26:39 -07:00
Arzhan Kinzhalin 7055a25510 Minor doc fixes. 2019-04-01 21:25:30 -07:00
William Douglas b8fb00eaf4 Skip folders with names including test(s) from pkg-info scanning 2019-03-27 15:27:43 -07:00