Compare commits

..

49 Commits

Author SHA1 Message Date
clrbuilder ec94c940d1 Update packages file for version 33920
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-11-03 00:07:41 -08:00
clrbuilder b655cd9a12 Update packages file for version 33910
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-29 00:07:16 -07:00
clrbuilder 6bc7acd818 Update packages file for version 33870
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-22 10:55:06 -07:00
clrbuilder 3dca4d2ecc Update packages file for version 33860
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-22 00:08:04 -07:00
clrbuilder 87d9c543ff Update packages file for version 33850
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-20 00:07:23 -07:00
clrbuilder 789f1ca94c Update packages file for version 33840
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-15 00:07:14 -07:00
Patrick McCarty 2b76e56f69 generateupstream: improve sha1sum invocation
Indicating end of options with `--` fixes the command invocation if the
filename begins with a hyphen.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-10-15 03:02:13 +00:00
clrbuilder 2ccf4b068a Update packages file for version 33830
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-13 00:08:03 -07:00
clrbuilder bf315f828f Update packages file for version 33810
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-06 00:07:33 -07:00
Patrick McCarty 5a5bac8596 Remove packages not referenced by bundles
It has been a while since the repo has been scanned for "unreferenced"
packages, i.e. packages not included in any Clear Linux OS bundles. This
is another cleanup pass.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-10-02 03:08:48 +00:00
clrbuilder 9e42d678ec Update packages file for version 33790
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-10-01 00:07:02 -07:00
clrbuilder 60b1c5cf68 Update packages file for version 33760
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-09-24 18:46:26 -07:00
clrbuilder 2325c43369 Update packages file for version 33730
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-09-22 00:08:12 -07:00
clrbuilder 9f72f5fc40 Update packages file for version 33710
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-09-15 00:09:12 -07:00
clrbuilder 757dcd348d Update packages file for version 33690
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-09-08 11:02:38 -07:00
clrbuilder d2e4833782 Update packages file for version 33680
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-09-03 00:07:17 -07:00
clrbuilder 9e5766df8c Update packages file for version 33670
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-09-01 00:07:38 -07:00
clrbuilder 009b7a10e1 Update packages file for version 33620
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-08-13 00:09:30 -07:00
clrbuilder 249cbb0ea6 Update packages file for version 33600
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-08-11 00:09:18 -07:00
clrbuilder 4a690a35dc Update packages file for version 33590
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-08-06 00:10:52 -07:00
clrbuilder d1a7caafcd Update packages file for version 33580
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-08-04 00:10:24 -07:00
clrbuilder 1023b3c6cc Update packages file for version 33570
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-07-30 00:09:53 -07:00
clrbuilder 2affe6047a Update packages file for version 33550
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-07-28 00:10:15 -07:00
clrbuilder 2a10dd326d Update packages file for version 33540
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-07-23 12:26:46 -07:00
clrbuilder 2d360228ce Update packages file for version 33530
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-07-23 00:09:24 -07:00
clrbuilder a8641f898f Update packages file for version 33520
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-07-21 00:10:16 -07:00
clrbuilder fd412b15a5 Update packages file for version 33510
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-07-16 00:10:54 -07:00
clrbuilder eb579ba11d Update packages file for version 33500
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-07-14 00:11:28 -07:00
clrbuilder c545a66185 Update packages file for version 33470
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-07-06 05:43:40 -07:00
clrbuilder f4f726d8e0 Update packages file for version 33430
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-06-25 00:10:36 -07:00
clrbuilder 8f385c3366 Update packages file for version 33400
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-06-18 10:10:39 -07:00
clrbuilder 305bf6f63b Update packages file for version 33360
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-06-11 22:09:57 -07:00
clrbuilder 4797950600 Update packages file for version 33340
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-06-09 22:10:26 -07:00
clrbuilder 18b1f4841d Update packages file for version 33320
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-06-07 22:10:26 -07:00
clrbuilder 2a061d8ec2 Update packages file for version 33290
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-06-03 13:20:19 -07:00
clrbuilder 47927ff332 Update packages file for version 33240
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-05-29 02:34:08 -07:00
clrbuilder 80bb811f5f Update packages file for version 33200
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-05-27 05:12:04 +00:00
clrbuilder 71827cbf99 Update packages file for version 33190
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-05-26 05:11:22 +00:00
clrbuilder 84a9b62e3f Update packages file for version 33150
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-05-20 05:10:30 +00:00
Thiago Macieira 0dfb2f6ef5 Pass the make's -j option to rpmbuild
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"
2020-05-19 13:47:42 -07:00
Patrick McCarty 59a46563cf Add some input validation for local repo handling
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>
2020-05-18 14:18:46 -07:00
Patrick McCarty a198b2d0a0 Make local repo support more parallel safe
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>
2020-05-18 13:55:19 -07:00
Patrick McCarty 9574f4ecde Remove R-R2Cuba
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-05-15 08:04:56 -07:00
clrbuilder 649f1e38de Update packages file for version 33110
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-05-15 05:10:58 +00:00
clrbuilder 0b86a75a10 Update packages file for version 33100
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-05-14 05:10:40 +00:00
clrbuilder a06eab078d Update packages file for version 33090
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-05-13 05:10:02 +00:00
clrbuilder d4ea9f57dc Update packages file for version 33060
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-05-08 05:09:10 +00:00
clrbuilder ee0847f750 Update packages file for version 33030
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-05-05 05:08:54 +00:00
clrbuilder 98047e4b8e Update packages file for version 33020
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2020-05-04 05:09:36 +00:00
4 changed files with 258 additions and 602 deletions
+31 -45
View File
@@ -21,7 +21,8 @@ RPMS ?= $(LATEST_RPMS)
WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo )
# MOCK_CONFIG_VAL is set in Makefile.shared
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(MOCK_CONFIG_VAL) $(MOCK_OPTS)
MOCK_SMP_FLAGS=$(patsubst -j%, -D_smp_mflags\ -j%,$(filter -j%, $(MAKEFLAGS)))
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(MOCK_CONFIG_VAL) $(MOCK_SMP_FLAGS) $(MOCK_OPTS)
ifneq ($(wildcard upstream),)
__allsources := $(notdir $(strip $(shell cat upstream)))
@@ -172,7 +173,7 @@ autospec: preautospec-checks pullrebase localreponotice clean-old-content
--name $(PKG_NAME) \
--archives $(ARCHIVES) \
--mock-config $(MOCK_CONFIG_VAL) \
--mock-opts="$(MOCK_OPTS)" \
--mock-opts="$(MOCK_SMP_FLAGS) $(MOCK_OPTS)" \
$${SETVERSION:+ --version $${SETVERSION}} \
$${NON_INTERACTIVE:+ --non_interactive} \
$${SKIP_GIT:+ --skip-git} \
@@ -349,11 +350,6 @@ rekoji-nowait:
logcheck:
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
$(TOPLVL)/repo:
@echo "Creating local RPM repository $(TOPLVL)/repo"
mkdir $(TOPLVL)/repo
$(MAKE) localrepocreate
#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.
@@ -361,22 +357,16 @@ 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; \
ln -f $$r $(TOPLVL)/repo/; \
done
$(MAKE) localrepocreate
$(call localrepoenable,${PM_CONF},${MOCK_CONF})
fi
$(MAKE) -s repodel NO_CREATEREPO=1
@echo "Adding new rpms:"; \
for rpm in ${LATEST_RPMS}; do \
echo "+$${rpm#rpms/}"; \
echo "$${rpm#rpms/}" >> .repo-index; \
done; \
flock $</repo.lock ln -f -t $< ${LATEST_RPMS}
$(MAKE) -s localrepocreate
$(MAKE) -s localrepoenable
#help repostage: Stages locally-built RPMs for this package to the local RPM
#help directory. If this directory does not yet exist, it is created and
@@ -385,37 +375,33 @@ repostage: $(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; \
ln -f $$r $(TOPLVL)/repo/; \
done
fi
$(MAKE) -s repodel NO_CREATEREPO=1
@for r in ${LATEST_RPMS}; do \
echo "+$${rpm#rpms/}"; \
echo "$${rpm#rpms/}" >> .repo-index; \
done; \
flock $</repo.lock ln -f -t $< ${LATEST_RPMS}
#help repodel: Removes RPMs from the local RPM repository that were
#help previously added by 'make repoadd' for this package.
repodel:
repodel: $(TOPLVL)/repo
@if [ -f .repo-index ]; then \
echo "Cleaning old rpms:"; \
for r in `cat .repo-index`; do \
echo "-$$r"; \
rm -f $(TOPLVL)/repo/$$r; \
done; \
mapfile -t rpms < <(sed 's|.*|$</&|' .repo-index); \
for rpm in "$${rpms[@]}"; do \
echo "-$${rpm#$</}"; \
done < .repo-index; \
flock $</repo.lock rm -f "$${rpms[@]}"; \
rm .repo-index; \
$(MAKE) localrepocreate; \
if [ -z "$$NO_CREATEREPO" ]; then \
$(MAKE) -s localrepocreate; \
fi; \
fi
#help repoenable: Enables the local RPM repository for use with Yum/DNF and
#help Mock. If this repository does not yet exist, it is created.
repoenable: $(TOPLVL)/repo ; $(call localrepoenable,${PM_CONF},${MOCK_CONF})
repoenable: localrepoenable ;
#help repodisable: Disables the local RPM repository.
repodisable: localrepodisable ;
@@ -512,7 +498,7 @@ generateupstream:
exit 1; \
fi; \
fi; \
echo $$(sha1sum $$filename | cut -d\ -f1)/$$filename >> upstream; \
echo $$(sha1sum -- $$filename | cut -d\ -f1)/$$filename >> upstream; \
done
@rm -f upstream.bak
@cat upstream
+47 -17
View File
@@ -93,34 +93,64 @@ $(MAKE) clone_$(1) || { \
}
endef
$(TOPLVL)/repo:
@echo "Creating local RPM repository $(TOPLVL)/repo"
mkdir $(TOPLVL)/repo
# Enables the local RPM repo by installing package manager and Mock configs.
# First argument is the path to the package manager config, and the second
# argument is the path to the mock config. Each of these config files is
# augmented for local repo support.
define localrepoenable
@cp $(1) $(TOPLVL)/repo/yum.conf
@printf "\n\n[local]\nname=Local\nfailovermethod=priority\nenabled=1\ngpgcheck=0\npriority=1\n" >> $(TOPLVL)/repo/yum.conf
@printf "baseurl=file://$$(realpath $(TOPLVL))/repo/\n\n" >> $(TOPLVL)/repo/yum.conf
@cp $(2) $(TOPLVL)/repo/clear.cfg
@printf "\n\n[localrepo]\nname=Local repo\nfailovermethod=priority\nenabled=1\ngpgcheck=0\npriority=1\n" >> $(TOPLVL)/repo/clear.cfg
@printf "baseurl=file://$$(realpath $(TOPLVL))/repo/\n\n" >> $(TOPLVL)/repo/clear.cfg
@sed -i '/^"""/d; $$a"""' $(TOPLVL)/repo/clear.cfg
endef
localrepoenable: $(TOPLVL)/repo
@if grep -qx '\[localrepo\]' ${PM_CONF}; then \
echo "[ERROR] ${PM_CONF} contains section named [localrepo]."; \
echo "[ERROR] Remove that section and try again."; \
exit 1; \
fi >&2
@if grep -qx '\[localrepo\]' ${MOCK_CONF}; then \
echo "[ERROR] ${MOCK_CONF} contains section named [localrepo]."; \
echo "[ERROR] Remove that section and try again."; \
exit 1; \
fi >&2
@last="$$(tail -n 1 ${MOCK_CONF})"; \
if [[ "$$last" != "\"\"\"" ]]; then \
echo "[ERROR] Last line of ${MOCK_CONF} is malformed; expected: \"\"\"; actual: $$last"; \
echo "[ERROR] Fix that line and try again."; \
exit 1; \
fi >&2
@pm_new=$$(mktemp -p $< yum.conf.XXXXXXX); \
pm_orig=$</yum.conf; \
mock_new=$$(mktemp -p $< clear.cfg.XXXXXXX); \
mock_orig=$</clear.cfg; \
cp ${PM_CONF} $$pm_new; \
printf "\n\n[localrepo]\nname=localrepo\nfailovermethod=priority\nenabled=1\ngpgcheck=0\npriority=1\n" >> $$pm_new; \
printf "baseurl=file://$$(realpath $<)/\n\n" >> $$pm_new; \
if ! cmp -s $$pm_new $$pm_orig; then \
flock $</repo.lock mv $$pm_new $$pm_orig; \
fi; \
rm -f $$pm_new; \
cp ${MOCK_CONF} $$mock_new; \
sed -i '$$d' $$mock_new; \
printf "\n\n[localrepo]\nname=localrepo\nfailovermethod=priority\nenabled=1\ngpgcheck=0\npriority=1\n" >> $$mock_new; \
printf "baseurl=file://$$(realpath $<)/\n\n" >> $$mock_new; \
sed -i '$$a"""' $$mock_new; \
if ! cmp -s $$mock_new $$mock_orig; then \
flock $</repo.lock mv $$mock_new $$mock_orig; \
fi; \
rm -f $$mock_new
# Disables the local RPM repo by removing the installed package manager and
# Mock configuration files.
localrepodisable:
@rm -f $(TOPLVL)/repo/yum.conf
@rm -f $(TOPLVL)/repo/clear.cfg
localrepodisable: $(TOPLVL)/repo
flock $</repo.lock rm -f $</yum.conf $</clear.cfg
# Runs createrepo_c (or createrepo) for the local RPM repo
localrepocreate:
( cd $(TOPLVL)/repo ; if type createrepo_c 1>/dev/null 2>&1; then createrepo_c .; else createrepo .; fi );
# Runs createrepo_c for the local RPM repo
localrepocreate: $(TOPLVL)/repo
cd $< && flock repo.lock createrepo_c .
# Remove all RPMs from the local RPM repo
localrepoclean:
@find $(TOPLVL)/repo -maxdepth 1 -name '*.rpm' -delete
localrepoclean: $(TOPLVL)/repo
flock $</repo.lock find $< -maxdepth 1 -name '*.rpm' -delete
# Summarizes the local RPM repo status
localrepostatus:
+1 -6
View File
@@ -290,14 +290,9 @@ autospecnewgo: preautospecnew-checks localreponotice
exit 1; \
fi
$(TOPLVL)/repo:
@echo "Creating local RPM repository $(TOPLVL)/repo"
mkdir $(TOPLVL)/repo
$(MAKE) localrepocreate
#help repoenable: Enables the local RPM repository for use with Yum/DNF and
#help Mock. If this repository does not yet exist, it is created.
repoenable: $(TOPLVL)/repo ; $(call localrepoenable,${PM_CONF},${MOCK_CONF})
repoenable: localrepoenable ;
#help repodisable: Disables the local RPM repository.
repodisable: localrepodisable ;
+179 -534
View File
File diff suppressed because it is too large Load Diff