Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: dist and asc improvements #5916

Merged
merged 5 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 37 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -293,44 +293,54 @@ uninstall: config.mk
@echo "If you want to install a different version of firejail, you might also need to run 'rm -fr $(DESTDIR)$(sysconfdir)/firejail', see #2038."

DISTFILES = \
COPYING \
Makefile \
README \
RELNOTES \
config.mk.in \
config.sh.in \
configure \
configure.ac \
contrib \
etc \
install.sh \
m4 \
mkdeb.sh \
mketc.sh \
platform \
src

DISTFILES_TEST = test/Makefile test/apps test/apps-x11 test/apps-x11-xorg test/capabilities test/private-lib test/fnetfilter test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/fs test/sysutils
COPYING \
Makefile \
README \
RELNOTES \
config.mk.in \
config.sh.in \
configure \
configure.ac \
contrib \
etc \
install.sh \
m4 \
mkdeb.sh \
mketc.sh \
platform \
src

DISTFILES_TEST = \
test/Makefile \
test/apps \
test/apps-x11 \
test/apps-x11-xorg \
test/capabilities \
test/compile \
test/environment \
test/fcopy \
test/filters \
test/fnetfilter \
test/fs \
test/network \
test/private-lib \
test/profiles \
test/sysutils \
test/utils

.PHONY: dist
dist: config.mk
mv config.sh config.sh.old
mv config.status config.status.old
$(MAKE) distclean
mv config.status.old config.status
mv config.sh.old config.sh
dist: clean config.mk
rm -fr $(TARNAME)-$(VERSION) $(TARNAME)-$(VERSION).tar.xz
mkdir -p $(TARNAME)-$(VERSION)/test
cp -a $(DISTFILES) $(TARNAME)-$(VERSION)
cp -a $(DISTFILES_TEST) $(TARNAME)-$(VERSION)/test
rm -rf $(TARNAME)-$(VERSION)/src/tools
find $(TARNAME)-$(VERSION) -name .svn -delete
tar -cJvf $(TARNAME)-$(VERSION).tar.xz $(TARNAME)-$(VERSION)
rm -fr $(TARNAME)-$(VERSION)

.PHONY: asc
asc: config.mk
./mkasc.sh $(VERSION)
asc: config.sh
./mkasc.sh

.PHONY: deb
deb: dist config.sh
Expand Down
14 changes: 8 additions & 6 deletions mkasc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
# Copyright (C) 2014-2023 Firejail Authors
# License GPL v2

echo "Calculating SHA256 for all files in /transfer - firejail version $1"
. "$(dirname "$0")/config.sh"

printf 'Calculating SHA256 for all files in /transfer - %s version %s' "$TARNAME" "$VERSION"

cd /transfer || exit 1
sha256sum ./* > "firejail-$1-unsigned"
gpg --clearsign --digest-algo SHA256 < "firejail-$1-unsigned" > "firejail-$1.asc"
gpg --verify "firejail-$1.asc"
gpg --detach-sign --armor "firejail-$1.tar.xz"
rm "firejail-$1-unsigned"
sha256sum ./* > "$TARNAME-$VERSION-unsigned"
gpg --clearsign --digest-algo SHA256 < "$TARNAME-$VERSION-unsigned" > "$TARNAME-$VERSION.asc"
gpg --verify "$TARNAME-$VERSION.asc"
gpg --detach-sign --armor "$TARNAME-$VERSION.tar.xz"
rm "$TARNAME-$VERSION-unsigned"
Loading