Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian....@packages.debian.org
Usertags: pu

[ Reason ]
This update is not for a regression. There are two bugs discovered recently.
With these bugs, jailkit will work partially. The bugs are #992420 and #992422.

[ Impact ]
Jailkit is a set of tools to help us to create jails for shells or services,
e.g. ssh.

If this request is not approved, the jailkit won't be able to create jails that
need to use files in /dev. Also, some checks for libraries will fail.

[ Tests ]
Some tests were made by me and users, creating new jails. Is not possible to
make automated tests because jailkit don't trust in $AUTOPKGTEST_TMP
environment since it uses permission 755, instead of 700.

[ Risks ]
The changes are trivial and they were reviewed by the upstream. I can't see
risks.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
There are two trivial patches, changing few lines in two files. The first patch
will change a division with floating point to an integer division to select the
right device. The second patch will fix a mistake, adding an option to a line.

[ Other info ]
No more info. Thanks.
diff -Nru jailkit-2.21/debian/changelog jailkit-2.21/debian/changelog
--- jailkit-2.21/debian/changelog       2021-07-16 11:31:18.000000000 -0300
+++ jailkit-2.21/debian/changelog       2021-09-26 22:24:08.000000000 -0300
@@ -1,3 +1,17 @@
+jailkit (2.21-4+deb11u1) bullseye; urgency=medium
+
+  * debian/patches/:
+      - 050_fix-incorrect-device.patch: created to fix the incorrect calc of
+        device major number. Without this patch, jailkit won't be able to
+        create jails that needs a device from /dev. Thanks to Jesse Norell
+        <je...@kci.net>. (Closes: #992422)
+      - 060_fix-typo-jk_init.patch: created to fix a typo in /usr/sbin/jk_init.
+        Without this patch, jailkit won't be able to check the presence of
+        some libraries. Thanks to Peter Viskup <skupko...@gmail.com>.
+        (Closes: #992420)
+
+ -- Joao Eriberto Mota Filho <eribe...@debian.org>  Sun, 26 Sep 2021 22:24:08 
-0300
+
 jailkit (2.21-4) unstable; urgency=medium
 
   * debian/control: bumped Standards-Version to 4.5.1.
diff -Nru jailkit-2.21/debian/patches/050_fix-incorrect-device.patch 
jailkit-2.21/debian/patches/050_fix-incorrect-device.patch
--- jailkit-2.21/debian/patches/050_fix-incorrect-device.patch  1969-12-31 
21:00:00.000000000 -0300
+++ jailkit-2.21/debian/patches/050_fix-incorrect-device.patch  2021-09-26 
22:19:07.000000000 -0300
@@ -0,0 +1,33 @@
+Description: fix the incorrect calc of device major number
+Author: Jesse Norell <je...@kci.net>
+Bug: https://savannah.nongnu.org/bugs/?61130
+Bug-Debian: https://bugs.debian.org/992422
+Forwarded: 
https://lists.nongnu.org/archive/html/jailkit-dev/2021-08/msg00004.html
+Last-Update: 2021-09-08
+Index: jailkit/py/jk_lib.py
+===================================================================
+--- jailkit.orig/py/jk_lib.py
++++ jailkit/py/jk_lib.py
+@@ -578,18 +578,18 @@ def copy_device(chroot, path, be_verbose
+       sb = os.stat(path)
+       try:
+               if (sys.platform[:5] == 'linux'):
+-                      major = sb.st_rdev / 256 #major = st_rdev divided by 
256 (8bit reserved for the minor number)
++                      major = sb.st_rdev // 256 #major = st_rdev divided by 
256 (8bit reserved for the minor number)
+                       minor = sb.st_rdev % 256 #minor = remainder of st_rdev 
divided by 256
+               elif (sys.platform == 'sunos5'):
+                       if (sys.maxint == 2147483647):
+-                              major = sb.st_rdev / 262144 #major = st_rdev 
divided by 256 (18 bits reserved for the minor number)
++                              major = sb.st_rdev // 262144 #major = st_rdev 
divided by 256 (18 bits reserved for the minor number)
+                               minor = sb.st_rdev % 262144 #minor = remainder 
of st_rdev divided by 256
+                       else:
+                               #64 bit solaris has 32 bit minor/32bit major
+-                              major = sb.st_rdev / 2147483647
++                              major = sb.st_rdev // 2147483647
+                               minor =  sb.st_rdev % 2147483647
+               else:
+-                      major = sb.st_rdev / 256 #major = st_rdev divided by 256
++                      major = sb.st_rdev // 256 #major = st_rdev divided by 
256
+                       minor = sb.st_rdev % 256 #minor = remainder of st_rdev 
divided by 256
+               if (stat.S_ISCHR(sb.st_mode)): 
+                       mode = 'c'
diff -Nru jailkit-2.21/debian/patches/060_fix-typo-jk_init.patch 
jailkit-2.21/debian/patches/060_fix-typo-jk_init.patch
--- jailkit-2.21/debian/patches/060_fix-typo-jk_init.patch      1969-12-31 
21:00:00.000000000 -0300
+++ jailkit-2.21/debian/patches/060_fix-typo-jk_init.patch      2021-09-26 
22:19:19.000000000 -0300
@@ -0,0 +1,18 @@
+Description: fix a typo in /usr/sbin/jk_init
+Author: Peter Viskup <skupko...@gmail.com>
+Bug: https://savannah.nongnu.org/bugs/index.php?61060
+Bug-Debian: https://bugs.debian.org/992420
+Last-Update: 2021-08-18
+Index: jailkit/py/jk_init.in
+===================================================================
+--- jailkit.orig/py/jk_init.in
++++ jailkit/py/jk_init.in
+@@ -116,7 +116,7 @@ class jk_init:
+               paths = paths + 
jk_lib.config_get_option_as_list(cfg,section,'regularfiles')
+               paths = paths + 
jk_lib.config_get_option_as_list(cfg,section,'directories')
+               paths2 = jk_lib.find_files_in_path(paths)
+-              self.didfiles = jk_lib.copy_binaries_and_libs(chroot, paths2, 
config['force'], config['verbose'], 1, 
try_hardlink=config['hardlink'],try_glob_matching=1,handledfiles=self.didfiles)
++              self.didfiles = jk_lib.copy_binaries_and_libs(chroot, paths2, 
config['force'], config['verbose'], check_libs=1, 
try_hardlink=config['hardlink'],try_glob_matching=1,handledfiles=self.didfiles)
+               
+               paths_w_owner = 
jk_lib.config_get_option_as_list(cfg,section,'paths_w_owner')
+               if (len(paths_w_owner)>0):
diff -Nru jailkit-2.21/debian/patches/series jailkit-2.21/debian/patches/series
--- jailkit-2.21/debian/patches/series  2021-07-16 11:31:18.000000000 -0300
+++ jailkit-2.21/debian/patches/series  2021-09-26 22:24:08.000000000 -0300
@@ -2,3 +2,5 @@
 020_remove-duplicate-option.patch
 030_fix-manpage-level.patch
 040_fix-crash-jk_update.patch
+050_fix-incorrect-device.patch
+060_fix-typo-jk_init.patch

Reply via email to