Compare commits

..

53 Commits

Author SHA1 Message Date
clrbuilder b1ef20b90b Update packages file for version 24670
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-26 21:44:17 +00:00
clrbuilder b100150ca3 Update packages file for version 24660
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-25 15:25:50 +00:00
clrbuilder 482940952d Update packages file for version 24650
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-24 18:12:40 +00:00
clrbuilder b50fabd346 Update packages file for version 24640
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-24 12:35:46 +00:00
clrbuilder c383979d14 Update packages file for version 24610
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-23 12:28:01 +00:00
clrbuilder 08138ad889 Update packages file for version 24580
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-23 05:51:59 +00:00
clrbuilder b78940d18a Update packages file for version 24550
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-21 20:15:48 +00:00
clrbuilder bb74ceef8d Update packages file for version 24540
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-20 18:47:37 +00:00
clrbuilder 12800a51fa Update packages file for version 24520
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-19 18:30:26 +00:00
clrbuilder 9b445f1116 Update packages file for version 24510
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-18 20:38:58 +00:00
clrbuilder 40898f6ce0 Update packages file for version 24490
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-17 12:02:29 +00:00
clrbuilder 3b4b1b3053 Update packages file for version 24480
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-16 18:02:40 +00:00
clrbuilder e26fd3e022 Update packages file for version 24440
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-15 18:02:29 +00:00
clrbuilder 677fe6cbd5 Update packages file for version 24430
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-15 00:53:37 +00:00
clrbuilder 9e54179aea Update packages file for version 24410
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-14 12:02:12 +00:00
Kevron Rees 1145477b30 Add section to documentation about updating package version
Document includes a description for pumping the release, but what
if there is a completely new upstream version?  This patch adds a
section that describes how to update the upstream url for a
package and update the package information accordingly.

Signed-off-by: Kevron Rees <kevron.m.rees@intel.com>
2018-08-13 10:51:27 -07:00
Kevron Rees 19cb72b28e add link to autospec documentation
Documentation only describes how to tweak autospec behavior by
modifying one file ("buildreq_add").  A new developer might not be
aware that there are several other files that can be modified that
will change autospec behavior.  Link to the autospec documentation
so that developers can learn of the other files and how autospec
uses them.

Signed-off-by: Kevron Rees <kevron.m.rees@intel.com>
2018-08-13 10:51:27 -07:00
clrbuilder 497059b257 Update packages file for version 24390
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-13 12:02:49 +00:00
clrbuilder fbda0655f2 Update packages file for version 24370
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-11 23:16:43 +00:00
clrbuilder 1b32d114f3 Update packages file for version 24360
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-10 18:00:13 +00:00
clrbuilder 90a4ceb162 Update packages file for version 24340
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-10 12:02:33 +00:00
clrbuilder 2947369532 Update packages file for version 24330
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-09 18:03:38 +00:00
clrbuilder 26bb3f43f8 Update packages file for version 24310
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-09 06:14:47 +00:00
Patrick McCarty fd509a2295 Hardlink only the rpms created by Mock
In case git repos cloned by autospec into results/ contain RPMs, we do
not want to hardlink those files to rpms/.

Fix the issue by limiting the find depth to 1 level so that the tooling
only hardlinks rpms created by Mock.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-08-08 19:14:19 -07:00
clrbuilder eb4fcd4085 Update packages file for version 24300
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-08 18:51:20 +00:00
clrbuilder 4fd9e54785 Update packages file for version 24290
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-08 01:11:27 +00:00
Brett T. Warden 5bc6cc856b Error on specfile and upstreams only when missing
Previously, we always emitted an error and failed when the specfile or
upstream target was requested, breaking the -B switch. Now, we only fail
if the file doesn't actually exist, not just that it was requested via
make.
2018-08-07 09:03:54 -07:00
clrbuilder 3bfdb39ee1 Update packages file for version 24270
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-07 12:02:19 +00:00
clrbuilder b495687f7c Update packages file for version 24240
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-06 12:02:12 +00:00
clrbuilder c719db89dd Update packages file for version 24230
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-05 20:07:59 +00:00
clrbuilder ba9e38f3f0 Update packages file for version 24220
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-04 13:04:54 +00:00
clrbuilder 0d4b01ec83 Update packages file for version 24210
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-03 21:33:20 +00:00
clrbuilder 4867cefcb7 Update packages file for version 24200
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-03 18:02:54 +00:00
clrbuilder e88fcdc4bc Update packages file for version 24190
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-03 12:02:14 +00:00
clrbuilder a381875001 Update packages file for version 24150
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-02 07:07:54 +00:00
clrbuilder 114936fc23 Update packages file for version 24140
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-02 04:52:55 +00:00
Patrick McCarty 3739bc0e0f repoadd: use new rpms directory, and hardlink instead
Since binary RPMs are now stored in the "rpms" directory, follow a
similar method for storing them in the local repo, too.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-08-01 09:38:27 -07:00
Patrick McCarty f43a186a78 Store copies of binary RPMs in "rpms" dir
To improve visibility of which RPMs a user may want to install after a
build, copy (hardlink) them to a separate "rpms" directory.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-08-01 09:38:27 -07:00
Patrick McCarty da562cb750 Always clean rpms and logs from previous builds
I often find myself running "make clean proper", when by default, I
think the old build artifacts should be removed so that the results
directory is pristine at the start of a new build.

As a result, if users wish to keep all build artifacts from a previous
"make build" or "make autospec", they must keep manual backups, as the
tooling no longer keeps them around.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-08-01 09:38:27 -07:00
Patrick McCarty 16467cfbc0 Avoid appending to srpm logs
Mock will append the binary rpm build logs to the srpm logs, but this is
confusing. After the srpm finishes building, rename the log files to
avoid this behavior.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-08-01 09:38:27 -07:00
Patrick McCarty 16466cac02 Make results/ directory un-nested again
Because Mock dumps its logs and and resulting rpms in the same directory
(results), shuffling the logs and rpms only after a successful build is
confusing, since they will be untouched for the error case.

It's simpler to avoid moving the files entirely. The only exceptions
will be to avoid clobbering existing log files. Changes of this nature
will appear in later commits and in autospec.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-08-01 09:38:27 -07:00
clrbuilder 6e8d00eb30 Update packages file for version 24120
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-08-01 12:02:17 +00:00
clrbuilder c160c30218 Update packages file for version 24110
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-07-31 18:17:35 +00:00
clrbuilder 9b09c217da Update packages file for version 24100
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-07-31 12:02:22 +00:00
Thiago Macieira 00230e7d1d Use zstd for compressing the mock root cache
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-30 19:33:17 -07:00
Arjan van de Ven ff40498428 packages update 2018-07-31 01:40:40 +00:00
clrbuilder 6483c7dd86 Update packages file for version 24090
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-07-30 18:02:43 +00:00
clrbuilder d1079234d9 Update packages file for version 24080
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-07-30 12:03:58 +00:00
clrbuilder 51a2c03a4a Update packages file for version 24070
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-07-29 20:42:57 +00:00
clrbuilder 3d8c98b0d8 Update packages file for version 24060
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-07-29 14:30:22 +00:00
clrbuilder 243ad03d32 Update packages file for version 24030
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-07-27 14:38:37 +00:00
clrbuilder e1072736aa Update packages file for version 24010
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-07-27 02:28:58 +00:00
clrbuilder 9a557531f4 Update packages file for version 23980
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-07-26 12:02:28 +00:00
6 changed files with 511 additions and 36 deletions
+38 -33
View File
@@ -12,9 +12,9 @@ SHELL = /bin/bash
SPECFILE = $(addsuffix .spec, $(PKG_NAME))
SRPMVERS = $(shell [ ! -f $(SPECFILE) ] || rpmspec -D '_vendor clr' --srpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}\n' $(SPECFILE))
SRPMFILE = results/srpm/$(SRPMVERS).src.rpm
SRPMFILE = results/$(SRPMVERS).src.rpm
LATEST_RPMS = $(shell [ ! -s results/logs/build.log ] || for r in `egrep 'Wrote.*/RPMS/.*.rpm' results/logs/build.log | sed 's/.*\///;s/.*debuginfo/debuginfo\/&/'` ; do echo "results/$$r"; done)
LATEST_RPMS = $(wildcard rpms/*.rpm)
RPMS ?= $(LATEST_RPMS)
WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo )
@@ -28,16 +28,18 @@ __missingsources := $(filter-out $(wildcard ${__allsources}), ${__allsources})
endif
$(SPECFILE):
@echo Error: $(SPECFILE) is missing. Please run \`make autospec\` to try and auto
@echo Error: generate one for you.
@exit 1
@[[ -f "$@" ]] || (\
echo Error: $@ is missing. Please run \`make autospec\` to try and auto;\
echo Error: generate one for you.;\
exit 1 )
upstream:
@echo Error: The \"upstream\" file is missing. Try running \`make autospec\` to
@echo Error: auto generate one for you. If you are not using autospec to
@echo Error: generate a spec file, specify the proper "Source*" entries in the
@echo Error: spec header, and try running \`make generateupstream\`.
@exit 1
@[[ -f "$@" ]] || (\
echo Error: The \"$@\" file is missing. Try running \`make autospec\` to;\
echo Error: auto generate one for you. If you are not using autospec to;\
echo Error: generate a spec file, specify the proper "Source*" entries in the;\
echo Error: spec header, and try running \`make generateupstream\`.;\
exit 1 )
#help spdxcheck: Checks that the package license is a valid SPDX license,
#help or that it is in the exceptions list.
@@ -91,24 +93,20 @@ prebuild-checks:
#help Use MOCK_OPTS environment varible to pass down arbitrary mock options.
build: prebuild-checks configemail $(SPECFILE) upstream $(SRPMFILE)
$(MOCK) $(SRPMFILE) --result=results/ --no-cleanup-after --uniqueext=$(PKG_NAME)
mkdir -p results/logs results/debuginfo
mv results/*.log results/logs
-mv results/*-debuginfo*.rpm results/debuginfo/
@perl $(TOPLVL)/projects/common/logcheck.pl results/logs/build.log
@perl $(TOPLVL)/projects/common/count.pl results/logs/build.log &> testresults
$(MAKE) link-new-rpms PKG_REPO_DIR="."
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
@perl $(TOPLVL)/projects/common/count.pl results/build.log &> testresults
@$(MAKE) checkblacklist
#help build-nocheck: Same as 'make build', but do not run the package's test suite.
build-nocheck: configemail $(SPECFILE) upstream $(SRPMFILE)
$(MOCK) $(SRPMFILE) --nocheck --result=results/ --no-cleanup-after --uniqueext=$(PKG_NAME)
mkdir -p results/logs results/debuginfo
mv results/*.log results/logs
-mv results/*-debuginfo*.rpm results/debuginfo/
@perl $(TOPLVL)/projects/common/logcheck.pl results/logs/build.log
@perl $(TOPLVL)/projects/common/count.pl results/logs/build.log &> testresults
$(MAKE) link-new-rpms PKG_REPO_DIR="."
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
@perl $(TOPLVL)/projects/common/count.pl results/build.log &> testresults
@$(MAKE) checkblacklist
fmvpatches: results/logs/build.log
fmvpatches: results/build.log
@perl $(TOPLVL)/projects/common/fmvpatches.pl $(PKG_NAME)
#help rootshell: Puts you in a root shell at the top of your build root.
@@ -121,9 +119,11 @@ shell:
# Always rebuild the source rpm
.PHONY: $(SRPMFILE)
$(SRPMFILE): $(SPECFILE) $(__allsources) localreponotice
$(SRPMFILE): $(SPECFILE) $(__allsources) localreponotice clean-old-content
@$(MAKE) spdxcheck
$(MOCK) --buildsrpm --source=./ --spec=$(SPECFILE) --result=results/srpm/ --no-cleanup-after --uniqueext=$(PKG_NAME)
$(MOCK) --buildsrpm --source=./ --spec=$(SPECFILE) --result=results/ --no-cleanup-after --uniqueext=$(PKG_NAME)
mv results/root.log results/srpm-root.log
mv results/build.log results/srpm-build.log
# Do a git fetch and a git rebase to apply local commits on top of latest
# commits from the remote. A git fetch/rebase is used rather than a git pull so
@@ -160,8 +160,7 @@ pullrebase:
#help Use MOCK_OPTS environment varible to pass down arbitrary mock options
#help to autospec.
#help For more information, see the project at https://github.com/clearlinux/autospec
autospec: pullrebase localreponotice
rm -f results/srpm/*src.rpm
autospec: pullrebase localreponotice clean-old-content
@if [ -e $(SPECFILE) ] && ! grep -q "# Generated by: autospec.py" $(SPECFILE) ; then \
echo "Specfile already exists and was not created by autospec.py! Aborting."; \
exit 1; \
@@ -178,6 +177,7 @@ autospec: pullrebase localreponotice
$${SETVERSION:+ --version $${SETVERSION}} \
${NON_INTERACTIVE} ${SKIP_GIT} ${CLEANUP} \
$(firstword $(NEWURL) $(URL));
$(MAKE) link-new-rpms PKG_REPO_DIR="."
@$(MAKE) spdxcheck
@$(MAKE) checkblacklist
@if [ -e update_changelog.sh ] && [ -z "$$SKIP_GIT" ] ; then \
@@ -327,7 +327,7 @@ rekoji-nowait:
$(MAKE) KOJI_NOWAIT="--nowait --background" rekoji
logcheck:
@perl $(TOPLVL)/projects/common/logcheck.pl results/logs/build.log
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
$(TOPLVL)/repo:
@echo "Creating local RPM repository $(TOPLVL)/repo"
@@ -337,19 +337,24 @@ $(TOPLVL)/repo:
#help repoadd: Adds locally-built RPMs for this package to the local RPM
#help repository. If this repository does not yet exist, it is created and
#help enabled.
repoadd: results/logs/build.log $(TOPLVL)/repo
@if [ -z "`grep '^Wrote: .*$(shell basename $(SRPMFILE))$$' results/logs/build.log`" ]; then \
echo "You have not yet succesfully built this release yet"; exit 1; \
fi
@if [ -f .repo-index ]; then \
repoadd: $(TOPLVL)/repo
@if [ -z "${LATEST_RPMS}" ]; then \
echo "No rpms found in rpms/ directory."; \
exit 1; \
fi; \
if [ -f .repo-index ]; then \
echo "Cleaning old rpms:"; \
for r in `cat .repo-index`; do \
echo "-$$r"; \
rm -f $(TOPLVL)/repo/$$r; \
done; \
rm .repo-index; \
fi
for r in $(LATEST_RPMS); do echo "+$$r"; echo $$(basename $$r) >> .repo-index; cp $$r $(TOPLVL)/repo; done
fi; \
for r in ${LATEST_RPMS}; do \
echo "+$$r"; \
echo $$(basename $$r) >> .repo-index; \
ln -f $$r $(TOPLVL)/repo/; \
done
$(MAKE) localrepocreate
$(call localrepoenable,${PM_CONF},${MOCK_CONF})
+24
View File
@@ -138,6 +138,30 @@ localreponotice:
[ -f $(TOPLVL)/repo/opt-in-build ] || sleep 3; \
fi >&2
.PHONY: clean-old-rpms clean-old-logs clean-old-content
clean-old-rpms:
rm -rf ./rpms
rm -f ./results/*.rpm
clean-old-logs:
rm -f ./results/*.log
clean-old-content: clean-old-rpms clean-old-logs
.PHONY: require-pkg-repo-dir link-new-rpms
require-pkg-repo-dir:
@if [ -z ${PKG_REPO_DIR} ]; then \
echo "Please specify PKG_REPO_DIR to indicate package repo location."; \
exit 1; \
fi
link-new-rpms: require-pkg-repo-dir
mkdir -p ${PKG_REPO_DIR}/rpms
rm -f ${PKG_REPO_DIR}/rpms/*.rpm
find ${PKG_REPO_DIR}/results -maxdepth 1 -name '*.rpm' -exec ln {} ${PKG_REPO_DIR}/rpms/ \;
rm -f ${PKG_REPO_DIR}/rpms/*.src.rpm
.PHONY: help
##### Code
# Make sure that HELPSPACE has exactly HELPLEN spaces in it
+1
View File
@@ -224,6 +224,7 @@ autospecnew: localreponotice
$${SETVERSION:+ --version $${SETVERSION}} \
${NON_INTERACTIVE} ${SKIP_GIT} ${CLEANUP} \
$(URL); \
[ $$? -eq 0 ] && $(MAKE) link-new-rpms PKG_REPO_DIR="${TOPLVL}/packages/${NAME}"; \
$(TOPLVL)/projects/common/checkblacklist.sh $(TOPLVL)/projects/common/blacklist $(TOPLVL)/packages/${NAME}/results/*.rpm; \
else \
echo "$(NAME) already exists at $(TOPLVL)/packages/$(NAME)"; \
+14
View File
@@ -102,6 +102,10 @@ $ echo missing-build-req >> buildreq_add
$ make autospec
```
Please see https://github.com/clearlinux/autospec#common-files for
documention on buildreq_add and the other files autospec uses during the
build process.
### Bump the release number for a package
If you simply need to increment a package's release number and rebuild the
@@ -112,6 +116,16 @@ $ make bump
$ make build
```
### Update the release version for a package
If you have an update release version for a package, you can change the url
for the new release in the package/example-pkg/Makefile. After modifying the
new url, run `make autospec` again to fetch the new package and rebuild.
```
$ make autospec
```
## Other topics
### Customizing the mock config
+2
View File
@@ -6,6 +6,8 @@ config_opts['dist'] = 'clear' # only useful for --resultdir variable subst
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s %(user)s'
config_opts['plugin_conf']['ccache_enable'] = False
config_opts['plugin_conf']['root_cache_opts']['compress_program'] = 'zstd -5'
config_opts['plugin_conf']['root_cache_opts']['extension'] = '.zst'
config_opts['releasever'] = 'clear'
config_opts['package_manager'] = 'dnf'
config_opts['chrootgroup'] = 'mockbuild'
+432 -3
View File
File diff suppressed because it is too large Load Diff