Skip to content

Commit 841232d

Browse files
Merge pull request #249 from ishan3299/fix/issue-210
Packaging: Add Debian packaging support and install target
2 parents 4cd66bc + 607cacd commit 841232d

7 files changed

Lines changed: 58 additions & 0 deletions

File tree

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,15 @@ uts.o: uts.h nsjail.h config.pb.h logs.h
131131
user.o: user.h nsjail.h config.pb.h logs.h macros.h subproc.h util.h
132132
util.o: util.h nsjail.h config.pb.h logs.h macros.h
133133
config.pb.o: config.pb.h
134+
135+
# Install
136+
PREFIX ?= /usr
137+
BINDIR ?= $(PREFIX)/bin
138+
MANDIR ?= $(PREFIX)/share/man/man1
139+
140+
.PHONY: install
141+
install: $(BIN)
142+
install -m 755 -d $(DESTDIR)$(BINDIR)
143+
install -m 755 $(BIN) $(DESTDIR)$(BINDIR)
144+
install -m 755 -d $(DESTDIR)$(MANDIR)
145+
install -m 644 nsjail.1 $(DESTDIR)$(MANDIR)

debian/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
nsjail (3.0-1) unstable; urgency=medium
2+
3+
* Initial release. (Closes: #210)
4+
5+
-- Ishan Patel <ishan.patel1998@gmail.com> Fri, 30 Jan 2026 23:45:00 +0530

debian/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

debian/control

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Source: nsjail
2+
Section: utils
3+
Priority: optional
4+
Maintainer: Ishan Patel <ishan.patel1998@gmail.com>
5+
Build-Depends: debhelper (>= 10), protobuf-compiler, libprotobuf-dev, libnl-route-3-dev, pkg-config, bison, flex, g++, make
6+
Standards-Version: 4.0.0
7+
Homepage: https://github.com/google/nsjail
8+
9+
Package: nsjail
10+
Architecture: any
11+
Depends: ${shlibs:Depends}, ${misc:Depends}
12+
Description: A light-weight process isolation tool
13+
NsJail is a process isolation tool for Linux. It makes use of Linux
14+
namespaces and seccomp-bpf syscall filters (with help of the kafel
15+
library) to sandbox processes.

debian/copyright

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: nsjail
3+
Source: https://github.com/google/nsjail
4+
5+
Files: *
6+
Copyright: 2014 Google Inc. All Rights Reserved.
7+
License: Apache-2.0
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
.
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
.
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
.
20+
On Debian systems, the complete text of the Apache version 2.0 license
21+
can be found in "/usr/share/common-licenses/Apache-2.0".

debian/rules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/make -f
2+
%:
3+
dh $@

debian/source/format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (native)

0 commit comments

Comments
 (0)