-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from sio2project/Michcioperz-master
Debian packaging v2 Co-authored-by: Michał Sidor <[email protected]>
- Loading branch information
Showing
16 changed files
with
197 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
boxes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM debian:bullseye | ||
|
||
RUN apt-get update && \ | ||
export DEBIAN_FRONTEND=noninteractive && \ | ||
apt-get install -y \ | ||
build-essential \ | ||
libcap-dev \ | ||
libtclap-dev \ | ||
libseccomp-dev \ | ||
libseccomp2 \ | ||
cmake \ | ||
g++-multilib \ | ||
gcc-multilib \ | ||
wget \ | ||
devscripts \ | ||
lintian \ | ||
debhelper \ | ||
ccache \ | ||
fakeroot | ||
|
||
ENV LIBRARY_PATH=/usr/lib/x86_64-linux-gnu | ||
ENV DEB_BUILD_OPTIONS "lang=en-US ccache nocheck" | ||
WORKDIR /app | ||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
CC := g++ | ||
INSTALL_PREFIX = $(HOME)/.local | ||
CONTAINER_NAME = sio2jail-dev-container | ||
CCACHE := $(shell ccache --version 2>/dev/null) | ||
|
||
ifdef CCACHE | ||
CC := ccache | ||
endif | ||
|
||
define run_in_docker | ||
docker build -t sio2jail-dev . | ||
- docker run -v $(shell pwd)/ccache:/ccache -v $(shell pwd):/app -e CCACHE_DIR=/ccache --rm --name $(CONTAINER_NAME) -d -it sio2jail-dev bash | ||
docker exec $(CONTAINER_NAME) $(1) | ||
docker exec $(CONTAINER_NAME) rm -rf build | ||
docker stop $(CONTAINER_NAME) | ||
endef | ||
|
||
install: clean | ||
mkdir -p ccache | ||
mkdir -p ccache/tmp | ||
cmake -DCMAKE_CXX_COMPILER_LAUNCHER=$(CC) -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX) . -B ./build | ||
make -C build | ||
make -C build install | ||
|
||
deb: | ||
mkdir -p out | ||
fakeroot debuild -us -uc -b | ||
mv ../*.deb out/ | ||
|
||
release: install deb | ||
mkdir -p out | ||
mv $(INSTALL_PREFIX)/bin/sio2jail out/ | ||
|
||
release-docker: clean-docker | ||
$(call run_in_docker,make release) | ||
|
||
install-docker: clean-docker | ||
$(call run_in_docker,make install) | ||
|
||
deb-docker: clean-docker | ||
$(call run_in_docker,make deb) | ||
|
||
test: | ||
make -C build check | ||
|
||
clean: | ||
- rm -rf build | ||
- rm -rf out | ||
- rm -rf obj-* | ||
- rm -rf install | ||
- rm -rf bin | ||
- rm -rf debian/.debhelper | ||
- rm -rf debian/sio2jail | ||
- rm debian/files | ||
- rm debian/sio2jail.substvars | ||
|
||
clean-docker: | ||
- docker run -v $(shell pwd):/app --rm --name $(CONTAINER_NAME) -d -it sio2jail-dev bash | ||
docker exec $(CONTAINER_NAME) make clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sio2jail (1.4.3) UNRELEASED; urgency=medium | ||
|
||
* Initial Release. | ||
|
||
-- Michał Sidor <[email protected]> Sun, 12 Jan 2020 15:24:25 +0100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Source: sio2jail | ||
Section: utils | ||
Priority: optional | ||
Maintainer: Oi Admins <[email protected]> | ||
Build-Depends: debhelper (>= 11), cmake | ||
Standards-Version: 4.1.3 | ||
Homepage: https://github.com/sio2project/sio2jail | ||
Vcs-Browser: https://github.com/sio2project/sio2jail | ||
Vcs-Git: https://github.com/sio2project/sio2jail.git | ||
|
||
Package: sio2jail | ||
Architecture: any | ||
Depends: ${shlibs:Depends}, ${misc:Depends} | ||
Description: Sandbox for programming contests. | ||
A tool for supervising execution of programs | ||
submitted in algorithmic competitions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 Wojciech Dubiel, Tadeusz Dudkiewicz, Przemysław Jakub Kozłowski, Maciej Wachulec | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/make -f | ||
|
||
#export DH_VERBOSE = 1 | ||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all | ||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic | ||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed | ||
|
||
%: | ||
dh $@ --buildsystem=cmake | ||
|
||
CCACHE := $(shell ccache --version 2>/dev/null) | ||
ifdef CCACHE | ||
CC := ccache | ||
endif | ||
|
||
OPTIONS = -DCMAKE_BUILD_TYPE=Release -DARCH=$(DEB_TARGET_ARCH) -DCMAKE_CXX_COMPILER_LAUNCHER=$(CC) -DWITH_DOCS=YES | ||
DEPENDENCIES_CONFIG = -DLINK=STATIC -DLIBCAP_BUILD_OWN=YES -DLIBSECCOMP_BUILD_OWN=YES -DLIBTCLAP_BUILD_OWN=YES -DSCDOC_BUILD_OWN=YES | ||
|
||
override_dh_auto_configure: | ||
dh_auto_configure -- $(OPTIONS) $(DEPENDENCIES_CONFIG) | ||
|
||
override_dh_auto_test: | ||
echo Tests skipped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
README |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0 (native) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters