Skip to content

Commit

Permalink
snapcraft,makefile: use /etc/os-release instead of lsb-release (#250)
Browse files Browse the repository at this point in the history
* Makefile: read os-release instead

* Makefile: set CODENAME as a variable outside of target

* Makefile: expand once and use shell ident
  • Loading branch information
Meulengracht authored Sep 16, 2024
1 parent 9406fc3 commit 99cc1dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
TESTDIR ?= "prime/"
SNAP_NAME=core24
BUILDDIR=/build/$(SNAP_NAME)
CODENAME:="$(shell . /etc/os-release; echo "$$VERSION_CODENAME")"

# include any fips environmental setup if the file exists.
# Variables:
Expand Down Expand Up @@ -52,7 +53,6 @@ ifdef SNAP_FIPS_BUILD

# If we are doing a fips build, make sure updates are enabled
# and we export that to the hooks
CODENAME="$$(lsb_release -c -s)"
sed -n 's/$(CODENAME)-security/$(CODENAME)-updates/p' /etc/apt/sources.list >> $(DESTDIR)/etc/apt/sources.list;
endif
mkdir -p $(DESTDIR)/install-data
Expand Down

0 comments on commit 99cc1dc

Please sign in to comment.