Compare commits

...

18 Commits

Author SHA1 Message Date
clrbuilder d6cc120a3c Update packages file for version 22310
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-05-08 14:07:03 +00:00
clrbuilder 71c1bd013f Update packages file for version 22290
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-05-07 13:19:54 +00:00
clrbuilder aadbd40a21 Update packages file for version 22250
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-05-03 19:38:24 +00:00
clrbuilder 60020aebcc Update packages file for version 22230
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-05-03 13:01:47 +00:00
clrbuilder 3a00f7eda4 Update packages file for version 22220
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-05-02 19:02:26 +00:00
clrbuilder 0470861400 Update packages file for version 22210
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-05-02 13:01:58 +00:00
clrbuilder 4fac58a65e Update packages file for version 22190
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-05-01 13:02:34 +00:00
clrbuilder 743041a30c Update packages file for version 22180
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-04-30 17:25:53 +00:00
clrbuilder 59f9bb1f7a Update packages file for version 22150
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-04-28 21:26:16 +00:00
clrbuilder 1e74d17500 Update packages file for version 22120
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-04-26 19:20:29 +00:00
clrbuilder 6a7fac08d9 Update packages file for version 22060
Signed-off-by: clrbuilder <clrbuilder@intel.com>
2018-04-24 19:02:11 +00:00
Patrick McCarty 932c2236a7 generateupstream: fix upstream file handling
My previous change to handling of the 'upstream' file assumed that the
file exists already, but this need not be true.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-04-24 10:12:34 -07:00
Patrick McCarty 6c92ce3160 sources: download files directly if SOURCES_URL undefined
When SOURCES_URL is not defined, the current behavior of extracting
source files from SRPMs in the latest published Clear Linux release has
proven to not work so well: It is not optimal when users are adding new
packages, modifying existing packages, not building from latest master,
etc.

Instead, run 'generateupstream' automatically so that source files are
downloaded from the remote locations listed in the spec file. This
target creates the 'upstream' file too, which becomes useful if the user
later defines SOURCES_URL, when 'upstream' is actively consumed.

In the event that download errors occur, as a fallback mechanism, try to
find the corresponding SRPM from a published release of Clear Linux OS.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-04-23 16:07:33 -07:00
Patrick McCarty 3e2219c07e sources: move srpm fetch code to separate target
I will reusing this code (largely unmodified) in the next commit, so
move it into a separate target to easily inspect changes.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-04-23 16:07:33 -07:00
Patrick McCarty f0d2523151 sources/generateupstream: properly handle curl errors
If any of the curl commands fail, it's better for the entire target to
fail. In this way, developers will be properly notified.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-04-23 14:25:51 -07:00
Patrick McCarty de39e64e29 Fix some indentation issues
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-04-23 14:15:58 -07:00
Patrick McCarty 877fee6375 sources: follow SOURCES_URL redirects; remove noproxy requirement
The curl --no-proxy hint is not needed anymore, since Clear Linux OS has
an autoproxy, and curl will honor proxy environment variables.

Also, pass -L to curl to follow redirects, similarly to other curl calls
in this makefile.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-04-23 13:47:24 -07:00
Patrick McCarty e921a2a883 generateupstream: make URL extraction more robust
Improve the detection of source URLs by matching only non-commented
Source* lines with "://" present.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2018-04-23 13:30:21 -07:00
3 changed files with 91 additions and 35 deletions
+63 -32
View File
@@ -205,30 +205,12 @@ bumpnogit:
$(__missingsources): sources
#help sources: If SOURCES_URL is defined, download required upstream source
#help files from that location. Otherwise, try to extract source files from the
#help SRPM in the latest Clear Linux release, as specified by the LATEST_SRPMS
#help variable. This will run automatically, as a dependency. NOTE: A Koji
#help server can make use of this "make sources" command, since it lives in a
#help repo named "common". If you use this makefile in Koji, ensure
#help "make sources" continues to work for both remote and local builds, since
#help it is a prerequisite of several commands for building packages.
sources: upstream
ifneq ($(strip $(SOURCES_URL)),)
while read u; do \
case "$$u" in \
"") continue ;; \
*://*) n="$$u" ;; \
*) n="$(SOURCES_URL)/$$u" ;; \
esac; \
curl --fail --noproxy "*" "$$n" -o `basename "$$n"`; \
done < upstream
else
@tmp=$$(mktemp -d -p "."); \
# First argument is a Clear Linux build number (e.g. 22000)
define fetch-from-srpm
tmp=$$(mktemp -d -p "."); \
srpm=$$(rpmspec --srpm -q --qf "%{NVR}.src.rpm\n" $(SPECFILE)); \
if cd "$$tmp" && ! curl -f -L -O $(LATEST_SRPMS)/$$srpm; then \
echo "Failed to download $$srpm from latest Clear Linux release." >&2; \
echo "Run \"git pull\" and try again." >&2; \
if cd "$$tmp" && ! curl -s -S -f -L -O $(DOWNLOAD_MIRROR)/releases/$(1)/clear/source/SRPMS/$$srpm; then \
echo "Failed to download $$srpm from Clear Linux release $(1)." >&2; \
cd .. && rm -rf "$$tmp"; \
exit 1; \
fi; \
@@ -236,14 +218,58 @@ else
cd ..; \
srclist=$$(rpmspec --srpm -q --qf "[%{SOURCE}\n]" $(SPECFILE)); \
for s in $$srclist; do \
if ! mv "$$tmp"/$$s .; then \
if ! mv --no-clobber "$$tmp"/$$s .; then \
echo "Missing source file \"$$s\" in $${srpm}." >&2; \
rm -rf "$$tmp"; \
exit 1; \
fi; \
echo "Retrieved source file $$s ..."; \
done; \
rm -rf "$$tmp";
rm -rf "$$tmp"
endef
#help sources: If SOURCES_URL is defined, download required upstream source files
#help from that location. Otherwise, try to download source files according to the
#help URLs listed in the spec file. If any of the source files fail to download,
#help check for the relevant SRPM from published releases of Clear Linux OS, and
#help extract the files if found. Note that SRPMs are taken from the DOWNLOAD_MIRROR
#help location. This will run automatically, as a dependency. NOTE: A Koji server can
#help make use of this "make sources" command, since it lives in a repo named
#help "common". If you use this makefile in Koji, ensure "make sources" continues to
#help work for both remote and local builds, since it is a prerequisite of several
#help commands for building packages.
ifneq ($(strip $(SOURCES_URL)),)
sources: upstream
while read u; do \
case "$$u" in \
"") continue ;; \
*://*) n="$$u" ;; \
*) n="$(SOURCES_URL)/$$u" ;; \
esac; \
if ! curl --fail -L "$$n" -o `basename "$$n"`; then \
echo "Failed to download $$n"; \
exit 1; \
fi; \
done < upstream
else
sources:
@$(MAKE) generateupstream; \
[ $$? -eq 0 ] && exit 0; \
nvr="$$(rpmspec --srpm -q --qf '%{NAME}\t%{VERSION}\t%{RELEASE}\n' $(SPECFILE))"; \
latest_builds=$$(git -C $(TOPLVL)/projects/common tag -l | sort -rn); \
for b in $$latest_builds; do \
url="$(DOWNLOAD_MIRROR)/releases/$$b/clear/source/package-sources"; \
echo "Checking for source files in build $$b ..."; \
if grep -q "$$nvr" <(curl -s -f -L $$url); then \
$(call fetch-from-srpm,$$b); \
if [ $$? -eq 0 ]; then \
echo "Source files retrieved from build $$b"; \
exit 0; \
fi; \
fi; \
done; \
echo "Source files not found for package"; \
exit 1
endif
prekoji-checks:
@@ -365,15 +391,20 @@ install:
#help calculating their hashes. Autospec performs this step automatically, so ignore
#help it for packages managed with autospec.
generateupstream:
@rm -f upstream
@urls=$$(rpmspec -D '_vendor clr' -P $(SPECFILE) | grep Source | cut -d: -f2- | grep '://'); \
@[ -e upstream ] && mv upstream upstream.bak; \
urls=$$(rpmspec -D '_vendor clr' -P $(SPECFILE) | sed -n "s|^Source[0-9]*[[:blank:]]*:[[:blank:]]*\(..*://..*\)$$|\1|p"); \
for url in $$urls; do \
filename=$$(basename $$url); \
if [ ! -e $$filename ]; then \
curl --fail -L -O $$url; \
fi; \
echo $$(sha1sum $$filename | cut -d\ -f1)/$$filename >> upstream; \
filename=$$(basename $$url); \
if [ ! -e $$filename ]; then \
if ! curl --fail -L -O $$url; then \
echo "Failed to download $$url"; \
[ -e upstream.bak ] && mv --no-clobber upstream.bak upstream; \
exit 1; \
fi; \
fi; \
echo $$(sha1sum $$filename | cut -d\ -f1)/$$filename >> upstream; \
done
@rm -f upstream.bak
@cat upstream
#help drop-abandoned: Remove all unused patches from the git tree
+2 -2
View File
@@ -14,9 +14,9 @@ define loopup
@sudo partprobe /dev/loop$(DEVICE)
@sleep 1
@if [ -e /dev/loop$(DEVICE)p3 ]; then \
sudo mount /dev/loop$(DEVICE)p3 $(TOPLVL)/image; \
sudo mount /dev/loop$(DEVICE)p3 $(TOPLVL)/image; \
else \
sudo mount /dev/loop$(DEVICE)p2 $(TOPLVL)/image; \
sudo mount /dev/loop$(DEVICE)p2 $(TOPLVL)/image; \
fi
@sudo mount /dev/loop$(DEVICE)p1 $(TOPLVL)/image/boot
endef
+26 -1
View File
@@ -596,6 +596,7 @@ backports.weakref
baobab
bash
bash-completion
bash.static
bash_kernel
bashdb
bats
@@ -703,6 +704,7 @@ compat-SDL2-soname1
compat-efivar-soname0
compat-fuse-soname2
compat-gegl
compat-gegl-0.3
compat-glew-soname1
compat-gtksourceview-soname3
compat-guile-soname20
@@ -722,6 +724,7 @@ compositeproto
compute-image-packages
configobj
configparser
confuse
connect-proxy
connman
connman-gtk
@@ -774,6 +777,7 @@ diffoscope
diffstat
diffutils
dist-pam-configs
dmenu
dmidecode
dmxproto
dnf
@@ -868,6 +872,8 @@ funcsigs
functools32
fuse
futures
fwupd
fwupdate
garcon
gast
gawk
@@ -1028,6 +1034,9 @@ hyperscan
hyperstart
hypothesis
i2c-tools
i3
i3lock
i3status
ibus
icalendar
icdiff
@@ -1043,6 +1052,8 @@ iniparse
init-rdahead
inotify-tools
inputproto
intel-gpu-tools
intel-hybrid-driver
intltool
invm-frameworks
ioping
@@ -1097,6 +1108,7 @@ jupyterlab_launcher
kafka-dep
kbd
kbproto
kernel-install
kexec-tools
keyring
keyutils
@@ -1167,6 +1179,7 @@ libdmx
libdnf
libdrm
libepoxy
libev
libevdev
libevent
libexif
@@ -1202,6 +1215,7 @@ libmediaart
libmnl
libmspack
libmtp
libmypaint
libndp
libnetfilter_conntrack
libnetfilter_cthelper
@@ -1230,6 +1244,8 @@ libsass
libseccomp
libsecret
libsigc++
libsmbios
libsmi
libsndfile
libsolv
libsoup
@@ -1357,6 +1373,7 @@ murrine
musl
mutt
mutter
mypaint-brushes
mypy
nagios-plugins
nano
@@ -1402,6 +1419,7 @@ nss
nss-altfiles
ntfs-3g
numactl
numatop
numba
numpy
numpydoc
@@ -1435,6 +1453,7 @@ opusfile
orc
orca
ordereddict
osinfo-db-tools
ostree
ovirt-guest-agent
p11-kit
@@ -1595,6 +1614,7 @@ ply
pmdk
polkit
poppler
poppler-data
popt
portaudio
posix_ipc
@@ -1755,6 +1775,7 @@ seaborn
seahorse
secretstorage
sed
serf
setproctitle
setserial
setuptools
@@ -1780,6 +1801,7 @@ soundmodem
source-code-pro
source-highlight
sox
spandsp
spark-dep
speex
speexdsp
@@ -1897,7 +1919,6 @@ virt-viewer
virtualenv
vlc
volume_key
vorbis-tools
vsqlite
vte
vulkan-sdk
@@ -1917,6 +1938,7 @@ wheel
which
widgetsnbextension
wireless-regdb-master
wireshark
woff2
wol
wpa_supplicant
@@ -1929,9 +1951,12 @@ xauth
xbitmaps
xcb-proto
xcb-util
xcb-util-cursor
xcb-util-image
xcb-util-keysyms
xcb-util-renderutil
xcb-util-wm
xcb-util-xrm
xclip
xcmiscproto
xcursor-themes