Skip to content

Commit

Permalink
[build] Migrate libyang2 sources download from wget to dget (#13394)
Browse files Browse the repository at this point in the history
According to its manual page,
"[dget in its] first form, [..] fetches the requested URLs.
If this is a .dsc or .changes file, then dget acts as a source-package
 aware form of wget: it also fetches any files referenced in the
.dsc/.changes file.
The downloaded source is then checked with dscverify and,
if successful, unpacked by dpkg-source."

Thus, when possible, dget use is preferable to wget so that sources
authenticity can be performed automatically by dscverify"

Signed-off-by: Guillaume Lambert <[email protected]>
  • Loading branch information
guillaumelambert authored Jan 19, 2023
1 parent e089147 commit 9a0bf56
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/libyang2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@
SHELL = /bin/bash
.SHELLFLAGS += -e

LIBYANG_URL = https://sonicstorage.blob.core.windows.net/debian/pool/main/liby/libyang

DSC_FILE = libyang2_$(LIBYANG2_FULLVERSION).dsc
ORIG_FILE = libyang2_$(LIBYANG2_VERSION).orig.tar.gz
DEBIAN_FILE = libyang2_$(LIBYANG2_FULLVERSION).debian.tar.xz

DSC_FILE_URL = $(LIBYANG_URL)/$(DSC_FILE)
ORIG_FILE_URL = $(LIBYANG_URL)/$(ORIG_FILE)
DEBIAN_FILE_URL = $(LIBYANG_URL)/$(DEBIAN_FILE)

MAIN_TARGET = $(LIBYANG2)
DERIVED_TARGETS = $(LIBYANG2_DEV) $(LIBYANG2_DBG) $(LIBYANG2_TOOLS) $(LIBYANG2_TOOLS_DBG)

Expand All @@ -20,10 +10,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -fr ./libyang2-$(LIBYANG2_VERSION)

# download debian libyang
wget -NO "$(DSC_FILE)" $(DSC_FILE_URL)
wget -NO "$(ORIG_FILE)" $(ORIG_FILE_URL)
wget -NO "$(DEBIAN_FILE)" $(DEBIAN_FILE_URL)
dpkg-source -x libyang2_$(LIBYANG2_FULLVERSION).dsc
dget https://deb.debian.org/debian/pool/main/liby/libyang2/libyang2_$(LIBYANG2_FULLVERSION).dsc

pushd libyang2-$(LIBYANG2_VERSION)
#sed -i 's/set(LIBYANG_MAJOR_SOVERSION 1)/set(LIBYANG_MAJOR_SOVERSION 2)/' CMakeLists.txt
Expand Down

0 comments on commit 9a0bf56

Please sign in to comment.