mirror of
https://github.com/clearlinux/common.git
synced 2026-06-16 19:16:00 +00:00
Compare commits
100 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 07fdbe3153 | |||
| b671ab5709 | |||
| fc29b4c1c3 | |||
| f108ac36d6 | |||
| 1c2bc9d50c | |||
| 8952175bc9 | |||
| 3812469ac2 | |||
| d1b434583a | |||
| dbd3c9accf | |||
| 6214fa5e9f | |||
| 8e9dd55e0f | |||
| 9ee80a2635 | |||
| 653105ffdf | |||
| a67fe47e39 | |||
| 103222eb4e | |||
| 0304bbd6b1 | |||
| 4ca1662790 | |||
| 94e2c39146 | |||
| d67be8a71b | |||
| 130f0f089e | |||
| a75e19a379 | |||
| d2e1c72c33 | |||
| b94a1c537f | |||
| 164dd8300e | |||
| 32141b9181 | |||
| bc66045b2d | |||
| 649a59bf12 | |||
| b1706fe2c4 | |||
| 6548a7a206 | |||
| a3fcd6a943 | |||
| 3c834e4761 | |||
| 77c334ec1a | |||
| 7c013dd5df | |||
| a499f61626 | |||
| 794174863b | |||
| dedad8c6c7 | |||
| 54737f7d97 | |||
| 56fdddbca3 | |||
| 58dff13c12 | |||
| 45a416f269 | |||
| b09ef7403e | |||
| 2059376f34 | |||
| 4501493d03 | |||
| df3579f538 | |||
| 3c01990ffc | |||
| 991e0baaaa | |||
| 434ab82632 | |||
| 0f814b2df9 | |||
| f2c3f4f95b | |||
| 590efe2b9c | |||
| 7919adae9f | |||
| 8ea05f2ae4 | |||
| 3560600fb6 | |||
| 0e54abbb3f | |||
| 3e7f5be6fc | |||
| 36d3edd56c | |||
| 9008cbccba | |||
| 04022fb765 | |||
| 424c34140e | |||
| f85cd42756 | |||
| e7afb1ae5e | |||
| 2c52a5ab39 | |||
| d84fec113e | |||
| f1b1424db4 | |||
| df8b789d60 | |||
| 78d7b4366b | |||
| 7be12344b6 | |||
| 04e58480cb | |||
| ebcc67f00b | |||
| f5b1aa8c87 | |||
| c61c91f9f2 | |||
| a57af837d8 | |||
| 03ba957d5f | |||
| d661496a4c | |||
| 4e1ce01d4e | |||
| dfeb8f9862 | |||
| 79c4befdea | |||
| c8c0c08100 | |||
| 877cd04101 | |||
| 7453e26bc7 | |||
| 11e0b5baee | |||
| 54c652944f | |||
| ef5179c975 | |||
| fc9793ff4e | |||
| 1508582709 | |||
| fca82072fa | |||
| 7fb07fdb29 | |||
| 387cb23c79 | |||
| c63ed02014 | |||
| d0773602f5 | |||
| 7b2b947843 | |||
| e619aeeab5 | |||
| f041821042 | |||
| 04e79ac6f7 | |||
| 942c21283f | |||
| 0803beead9 | |||
| 8bf3888935 | |||
| 3f2c7de583 | |||
| 514048840f | |||
| 012a1a3767 |
+38
-1
@@ -15,6 +15,7 @@ SRPMVERS = $(shell [ ! -f $(SPECFILE) ] || rpmspec -D '_vendor clr' --srpm -q --
|
||||
SRPMFILE = results/$(SRPMVERS).src.rpm
|
||||
|
||||
LATEST_RPMS = $(wildcard rpms/*.rpm)
|
||||
DEBUGINFO_RPM = $(wildcard rpms/*-debuginfo-*.rpm)
|
||||
RPMS ?= $(LATEST_RPMS)
|
||||
|
||||
WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo )
|
||||
@@ -154,13 +155,15 @@ pullrebase:
|
||||
fi \
|
||||
fi
|
||||
|
||||
preautospec-checks:
|
||||
|
||||
#help autospec: automatically generates a specfile. If there is
|
||||
#help already a specfile, it will be overwritten. Several files used by
|
||||
#help autospec will be created in the process.
|
||||
#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 clean-old-content
|
||||
autospec: preautospec-checks 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; \
|
||||
@@ -406,6 +409,31 @@ install:
|
||||
done
|
||||
@$(MAKE) loop-down DEVICE=6
|
||||
|
||||
#help install-debuginfo-local: Install locally built debuginfo RPM to
|
||||
#help the automatic debuginfo cache location (/var/cache/debuginfo)
|
||||
install-debuginfo-local:
|
||||
tmpdir=$$(mktemp -d); \
|
||||
rpm2cpio ${DEBUGINFO_RPM} | ( cd $$tmpdir; cpio -i -d -u); \
|
||||
dest=/var/cache/debuginfo/lib; \
|
||||
find $$tmpdir/usr/lib/debug/ -mindepth 1 -maxdepth 1 | while read -r d; do \
|
||||
sudo chown -R dbginfo:dbginfo "$$d"; \
|
||||
sudo cp -a "$$d" $$dest/; \
|
||||
done; \
|
||||
dest=/var/cache/debuginfo/src; \
|
||||
find $$tmpdir/usr/src/debug/ -mindepth 1 -maxdepth 1 | while read -r d; do \
|
||||
sudo chown -R dbginfo:dbginfo "$$d"; \
|
||||
sudo cp -a "$$d" $$dest/; \
|
||||
done; \
|
||||
sudo rm -rf $$tmpdir
|
||||
|
||||
#help install-local: Install locally built RPMs to the root filesystem. Note that the
|
||||
#help debuginfo RPM installs to /var/cache/debuginfo
|
||||
install-local:
|
||||
for r in $(filter-out ${DEBUGINFO_RPM},${RPMS}); do \
|
||||
rpm2cpio $$r | (cd /; sudo cpio -i -d -u); \
|
||||
done
|
||||
$(MAKE) install-debuginfo-local
|
||||
|
||||
#help generateupstream: Run this rule to create or update the 'upstream' file
|
||||
#help by downloading the upstream source tarballs listed in the spec file and
|
||||
#help calculating their hashes. Autospec performs this step automatically, so
|
||||
@@ -433,6 +461,15 @@ generateupstream:
|
||||
drop-abandoned: $(SPECFILE)
|
||||
python3 $(TOPLVL)/projects/common/drop-abandoned-patches.py $(SPECFILE)
|
||||
|
||||
#help cloc: Count lines of code with the `cloc` tool on the full sources of package
|
||||
cloc: $(SRPMFILE)
|
||||
@$(MOCK) -r $(TOPLVL)/repo/clear.cfg $(SRPMFILE) --result=results/ --no-cleanup-after
|
||||
@$(MOCK) --chroot --copyin /usr/bin/cloc /usr/bin/cloc --result=results/ --no-cleanup-after
|
||||
@$(MOCK) --result=results/ --no-cleanup-after --chroot '/usr/bin/cloc /builddir > /tmp/cloc.txt'
|
||||
@$(MOCK) --copyout /tmp/cloc.txt results/ --result=results/
|
||||
@$(MOCK) --clean --scrub=chroot --uniqueext=$(PKG_NAME)
|
||||
cat results/cloc.txt
|
||||
|
||||
# Define site local common targets in a separate makefile
|
||||
-include $(TOPLVL)/projects/common/Makefile.common.site_local
|
||||
|
||||
|
||||
+3
-1
@@ -190,13 +190,15 @@ releases: $(PACKAGES_FILE) $(addprefix packages/,$(PKGS_LOCAL))
|
||||
provides:
|
||||
@$(TOPLVL)/projects/common/provides.sh -f $(FP) -r $(RN)
|
||||
|
||||
preautospecnew-checks:
|
||||
|
||||
#help autospecnew: Creates a new autospec package with for a given URL=$(URL)
|
||||
#help with NAME=$(NAME). Several files used by autospec will be created in the
|
||||
#help process.
|
||||
#help Use MOCK_OPTS environment varible to pass down arbitrary mock options
|
||||
#help to autospec.
|
||||
#help For more information about autospec, see the project page on Github https://github.com/clearlinux/autospec
|
||||
autospecnew: localreponotice
|
||||
autospecnew: preautospecnew-checks localreponotice
|
||||
@if [ -z $(NAME) ] || [ -z $(URL) ]; then \
|
||||
echo "Please specify NAME and URL. The ARCHIVES variable is optional."; \
|
||||
exit 1; \
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+9
-1
@@ -43,11 +43,19 @@ if [ ! -f "$IMAGE" ]; then
|
||||
fi
|
||||
rm -f debug.log
|
||||
|
||||
# 10/25/2018: keep back compatibility for a while
|
||||
UEFI_BIOS="-bios OVMF.fd"
|
||||
|
||||
if [ -f OVMF_VARS.fd -a -f OVMF_CODE.fd ]; then
|
||||
UEFI_BIOS=" -drive file=OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on "
|
||||
UEFI_BIOS+=" -drive file=OVMF_VARS.fd,if=pflash,format=raw,unit=1 "
|
||||
fi
|
||||
|
||||
VMN=${VMN:=1}
|
||||
|
||||
qemu-system-x86_64 \
|
||||
-enable-kvm \
|
||||
-bios OVMF.fd \
|
||||
${UEFI_BIOS} \
|
||||
-smp sockets=1,cpus=4,cores=2 -cpu host \
|
||||
-m 1024 \
|
||||
-vga none -nographic \
|
||||
|
||||
+12
-3
@@ -6,6 +6,7 @@ SERVERCA=""
|
||||
CLIENTCA=""
|
||||
WORKSPACE="clearlinux"
|
||||
PACKAGE_REPOS=
|
||||
NEEDS_KVM_GROUP=
|
||||
|
||||
help() {
|
||||
printf "%s\n" >&2 "Usage: $SCRIPT [options]" \
|
||||
@@ -115,6 +116,10 @@ required_progs() {
|
||||
|
||||
required_progs
|
||||
|
||||
if ! groups | grep -qw kvm; then
|
||||
NEEDS_KVM_GROUP=1
|
||||
fi
|
||||
|
||||
echo "Initializing development workspace in \"$WORKSPACE\" . . ."
|
||||
|
||||
mkdir "$WORKSPACE"
|
||||
@@ -146,8 +151,10 @@ if [ "$USE_KOJI" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Adding user to kvm group . . ."
|
||||
sudo usermod -a -G kvm $USER
|
||||
if [ -n "$NEEDS_KVM_GROUP" ]; then
|
||||
echo "Adding user to kvm group . . ."
|
||||
sudo usermod -a -G kvm $USER
|
||||
fi
|
||||
|
||||
echo "Cloning special project repositories . . ."
|
||||
make ${JOBS_ARG} clone-projects
|
||||
@@ -179,7 +186,9 @@ if [ -z "$PACKAGE_REPOS" ]; then
|
||||
echo "NOTE: To clone all package repos, run \"cd $WORKSPACE; make [-j NUM] clone-packages\""
|
||||
echo "NOTE: To clone a single package repo with NAME, run \"cd $WORKSPACE; make clone_NAME\""
|
||||
fi
|
||||
echo 'NOTE: logout and log back in to finalize the setup process'
|
||||
if [ -n "$NEEDS_KVM_GROUP" ]; then
|
||||
echo 'NOTE: logout and log back in to finalize the setup process'
|
||||
fi
|
||||
|
||||
|
||||
# vi: ft=sh sw=2 et sts=2
|
||||
|
||||
Reference in New Issue
Block a user