For most people simply running "make autospec" or "make build", this
will have no effect. The RPM macro %{_smp_mflags} is predefined to be
the number of CPUs in your system anyway (output of getconf
_NPROCESSORS_ONLN).
But if you do have MAKEFLAGS set in your environment to your CPU
number (and you should), that will get passed to rpmbuild, which then
uses it during the build. And if you, like me, have it set to a
slightly higher number, RPM will use that too.
But if you run "make -jN autospec", then that N will be passed to the
build. This is especially important if you have something doing "make
-j1": RPM will be -j1 too! So instead of "make -j1", run "MAKEFLAGS= make"
The local repo implementation makes some assumptions about the contents
of the package manager and mock conf files, so do some basic input
validation to assess whether the assumptions are correct, and exit with
informative errors if not.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
For commands that modify contents of $(TOPLVL)/repo, wrap them with
`flock`, using a lock file `repo.lock` within the repo directory. This
ensures that the repo directory tree is not otherwise modified while
each command is running.
To keep the implementation simple, I opted to not wrap entire makefile
targets with a lock (e.g. lock the entire operation of `make repoadd`).
If users need that level of control, they can implement locking in a
separate wrapper script.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Over the lifetime of Clear Linux OS, many packages have been added and
removed, but the package *repos* always remain once they have been
created.
Thus, if a package is removed at one point, and later added back to the
distro, the same package repo should be used. This commit adds support
to `make autospecnew` for that use case, always using a pre-existing
package repo if one is available.
(Note that the gitolite repo detection is more complicated because it
must support configurations with and without "wild repos" enabled.)
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
- FFLAGS/FCLAGS defaults were recently modified, so support both old and
new defaults.
- `rm -rf %{buildroot}` is another autospec default line for %install,
so it will never be a manual addition.
- The `name` field from options.conf is the same as the package name.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Add a new 'log' command that is similar to 'diff' but shows the log of
commits from HEAD to origin/master, thus listing all commits that have
not yet been pushed.
For example:
$ make log
packages/glib-networking
glib-networking: enable installed tests
packages/gnome-desktop
gnome-desktop: Autospec creation for update from version 3.34.3 to version 3.36.0
packages/gnome-terminal
gnome-terminal: Autospec creation for update from version 3.34.2 to version 3.36.0.1
Signed-off-by: Ross Burton <ross.burton@intel.com>
Modification of Source0 is more trustworthy, since not all packages use
autospec. Also, (to me) the line stands out more when it appears at the
top of the spec file diff.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>